2010-07-12 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / ChangeLog
1 2010-07-12  Marek Safar  <marek.safar@gmail.com>
2
3         * generic.cs: Don't use Report directly.
4         
5         * expression.cs, ecore.cs: UserOperatorCall uses MethodSpec without
6         MethodGroupExpr, will be simplified later.
7
8 2010-07-09  Marek Safar  <marek.safar@gmail.com>
9
10         * property.cs, parameters.cs: Inflated IndexerSpec parameters.
11         
12         * import.cs: Don't build unused parameters.
13
14 2010-07-08  Marek Safar  <marek.safar@gmail.com>
15
16         * expression.cs (Invocation): Don't recreate simple-name expression.
17
18 2010-07-07  Marek Safar  <marek.safar@gmail.com>
19
20         * ecore.cs: Don't report NRE warning for lifted null.
21
22 2010-07-07  Marek Safar  <marek.safar@gmail.com>
23
24         * typemanager.cs, convert.cs, expression.cs: Another reference
25         equality implementation attack (Fixes #620025, #579058).
26
27 2010-07-05  Marek Safar  <marek.safar@gmail.com>
28
29         * context.cs, expression.cs, ecore.cs: BaseThis is fully based on
30         this expression (Fixes #619904).
31
32 2010-07-05  Marek Safar  <marek.safar@gmail.com>
33
34         * membercache.cs, class.cs: Don't use base member to check for
35         property or indexer base implementation.
36
37 2010-07-03  Marek Safar  <marek.safar@gmail.com>
38
39         * membercache.cs: Copy Membercache member state flags for 2 stage
40         inflate (Fixes #619555).
41         
42         * ecore.cs: Use resolved accessors everywhere.
43         
44 2010-07-02  Marek Safar  <marek.safar@gmail.com>
45
46         A fix for bug #360820
47         * membercache.cs, property.cs: Check accessors of base property and
48         not the closest one.
49
50 2010-07-02  Marek Safar  <marek.safar@gmail.com>
51
52         * modifiers.cs, membercache.cs, import.cs, class.cs: Moved imported
53         override method checks into import.
54
55         * expression.cs: Removed redundant check.
56
57 2010-06-30  Marek Safar  <marek.safar@gmail.com>
58
59         * nullable.cs, expression.cs, statement.cs, method.cs, ecore.cs,
60         delegate.cs, cs-parser.jay, visit.cs: Use MemberAccess to resolve
61         base access expression, it has all bits done correctly.
62
63 2010-06-30  Marek Safar  <marek.safar@gmail.com>
64
65         * support.cs: Removed unused code.
66         
67         * ecore.cs: Don't use memberlookup for operators.
68
69 2010-06-30  Marek Safar  <marek.safar@gmail.com>
70
71         * typemanager.cs, membercache.cs, convert.cs, expression.cs,
72         ecore.cs: Replace remaining MethodLookup with correct user operator
73         lookup (to do correct deep lookup). Clean up most of outstanding
74         quirks in binary operator overload resolution.
75
76 2010-06-29  Marek Safar  <marek.safar@gmail.com>
77
78         * import.cs: Operators must have between 1 and 2 parameters.
79         
80         * method.cs: Switch destructor to direct membercache lookup
81
82 2010-06-29  Marek Safar  <marek.safar@gmail.com>
83
84         * driver.cs, expression.cs: Use Membercache for StringConcat when
85         it got all what is needed.
86
87 2010-06-29  Marek Safar  <marek.safar@gmail.com>
88
89         * membercache.cs, expression.cs, statement.cs, doc.cs, ecore.cs:
90         Changed FindMembers to allocate a new list only when a filter is
91         used. Saves decent chunk of memory and should save even more in the
92         future when the filter is not used that often.
93
94 2010-06-28  Marek Safar  <marek.safar@gmail.com>
95
96         * field.cs, property.cs, assign.cs, const.cs, expression.cs,
97         ecore.cs, class.cs, cs-parser.jay, enum.cs: Don't use intermediate
98         structure for simple type fields (saves memory and makes few things
99         simpler). Clean up some hacks mostly for events.
100
101 2010-06-25  Marek Safar  <marek.safar@gmail.com>
102
103         * statement.cs, cs-parser.jay: Don't create expensive block for
104         simple statements.
105
106 2010-06-24  Marek Safar  <marek.safar@gmail.com>
107
108         * statement.cs, report.cs: Rethrow internal error when reporting is
109         disabled.
110         
111         * ecore.cs: Check for identical name only when simple name is set.
112         Fixes #616667
113
114 2010-06-24  Marek Safar  <marek.safar@gmail.com>
115
116         A fix for bug #616809
117         * generic.cs, expression.cs, ecore.cs: Added a new type expression
118         for open generic type to pass unbound type arguments to typeof
119         expression.
120
121 2010-06-24  Marek Safar  <marek.safar@gmail.com>
122
123         * statement.cs: Foreach collection implementation refactoring to
124         search for GetEnumerator more preciselly. Fixes #431453 and more
125         unreported bugs.
126
127         * linq.cs, decl.cs, ecore.cs, delegate.cs: Update methodgroup api.
128
129 2010-06-23  Marek Safar  <marek.safar@gmail.com>
130
131         * cs-parser.jay: Track more locations.
132
133 2010-06-22  Marek Safar  <marek.safar@gmail.com>
134
135         * cs-tokenizer.cs, location.cs, cs-parser.jay: Track more locations.
136
137 2010-06-18  Marek Safar  <marek.safar@gmail.com>
138
139         * cs-tokenizer.cs, anonymous.cs, expression.cs, statement.cs,
140         support.cs, location.cs, cs-parser.jay: Some work on full ast mode.
141
142 2010-06-18  Marek Safar  <marek.safar@gmail.com>
143
144         * convert.cs, typespec.cs, method.cs: Fixed few more dynamic
145         conversion.
146
147 2010-06-18  Marek Safar  <marek.safar@gmail.com>
148
149         * typemanager.cs, namespace.cs: Report more predefined types and
150         imported types collision types as a warning.
151         Fixes #537414, #601157
152
153 2010-06-18  Marek Safar  <marek.safar@gmail.com>
154
155         * generic.cs: Overrides base method constraint can use method type
156         parameter.
157
158         * import.cs: Removed redundant cache.
159         
160 2010-06-17  Marek Safar  <marek.safar@gmail.com>
161
162         * generic.cs: Propagate type only inflate downwards.
163
164 2010-06-17  Marek Safar  <marek.safar@gmail.com>
165
166         A fix for bug #614955
167         * method.cs: Do not reject binary dynamic operators.
168
169 2010-06-17  Marek Safar  <marek.safar@gmail.com>
170
171         * typespec.cs: Internal types have no generic parameters.
172         Fixes #615022.
173
174 2010-06-17  Marek Safar  <marek.safar@gmail.com>
175
176         A fix for bug #614955
177         * cs-parser.jay: Correctly set expression mode for default parameter
178         values.
179
180 2010-06-17  Marek Safar  <marek.safar@gmail.com>
181
182         A fix for bug #615023
183         * ecore.cs: Resolve dynamic namespace and keyword collision in the
184         favour of the keyword.
185
186 2010-06-17  Marek Safar  <marek.safar@gmail.com>
187
188         A fix for bug #614917
189         * convert.cs: Allow more undocumented 0 like values to enum type 
190         conversions.
191
192 2010-06-17  Marek Safar  <marek.safar@gmail.com>
193
194         * generic.cs, method.cs: Inflate copied type parameters from base
195         class or explicit interfaces.
196         
197         * convert.cs: Fixed conversion between two type parameters.
198         Fixes #614471
199
200 2010-06-16  Marek Safar  <marek.safar@gmail.com>
201
202         * membercache.cs, convert.cs: Correctly resize an array used by
203         GetUserOperator.
204
205 2010-06-15  Marek Safar  <marek.safar@gmail.com>
206
207         A fix for bug #599601
208         * dynamic.cs, ecore.cs: A new flag for dynamic resolver to ignore
209         generated member access left expression.
210         
211 2010-06-16  Marek Safar  <marek.safar@gmail.com>
212
213         * expression.cs: Dispatch dynamic invocation solely on left
214         expression type.
215
216 2010-06-16  Marek Safar  <marek.safar@gmail.com>
217
218         * expression.cs, statement.cs: Always persist explicit cast
219         semantic at expression level.
220         
221 2010-06-15  Marek Safar  <marek.safar@gmail.com>
222
223         * expression.cs, attribute.cs: Enable generic type parameters
224         attribute check.
225         
226 2010-06-15  Marek Safar  <marek.safar@gmail.com>
227
228         A fix for bug #612146
229         * generic.cs: Don't use fixed array for inflated type parameter
230         interface constraints.
231         
232 2010-06-15  Marek Safar  <marek.safar@gmail.com>
233
234         * typespec.cs: ElementTypeSpec has to use its own ITypeDefinition.
235         
236         * report.cs: Unwrap elements for related symbols reporting.
237
238 2010-06-15  Marek Safar  <marek.safar@gmail.com>
239
240         A fix for bug #612796
241         * cs-tokenizer.cs: Offset correctly keywords the first character
242         comparison.
243         
244 2010-06-15  Marek Safar  <marek.safar@gmail.com>
245
246         A fix for bug #613397
247         * expression.cs: Removed too aggressive object initializers
248         optimization.
249         
250 2010-06-15  Marek Safar  <marek.safar@gmail.com>
251         
252         * parameter.cs, property.cs, membercache.cs, decl.cs, iterators.cs,
253         anonymous.cs, expression.cs, support.cs, method.cs, pending.cs,
254         class.cs, cs-parser.jay: Simplify parsing of accessors by removing
255         any intermediate steps and fake nodes, also saves few MBs of memory.
256
257 2010-06-11  Marek Safar  <marek.safar@gmail.com>
258         
259         * modifiers.cs, rootcontext.cs, location.cs, cs-parser.jay: More
260         precise modifiers parsing.
261
262 2010-06-09  Marek Safar  <marek.safar@gmail.com>
263
264         * cs-tokenizer.cs, anonymous.cs, expression.cs, cs-parser.jay:
265         Fixed few shift/reduce conflicts.
266
267 2010-06-09  Marek Safar  <marek.safar@gmail.com>
268
269         * typemanager.cs, parameter.cs, dynamic.cs, typespec.cs,
270         expression.cs, ecore.cs, cs-parser.jay: Fully parse composed type
271         specifiers and stop using string in AST.
272
273 2010-06-07  Marek Safar  <marek.safar@gmail.com>
274
275         * typemanager.cs, eval.cs, iterators.cs, anonymous.cs, expression.cs
276         method.cs, class.cs, delegate.cs, cs-parser.jay, driver.cs, visit.cs
277         enum.cs: Hold location of predefined types.
278
279 2010-06-07  Marek Safar  <marek.safar@gmail.com>
280
281         A fix for bug #610878
282         * pending.cs: Clone cached list before modifying.
283
284 2010-06-04  Marek Safar  <marek.safar@gmail.com>
285
286         * convert.cs, typespec.cs, expression.cs: Start using array member
287         kind for better conversion checks.
288         
289         * import.cs, report.cs: Report better error message for runtime
290         reflection bugs.
291
292 2010-06-04  Marek Safar  <marek.safar@gmail.com>
293
294         * membercache.cs, convert.cs, nullable.cs, expression.cs: Optimize
295         user defined conversion probing and simplify user conversion for
296         nullabe types. Fixes #610940.
297
298 2010-06-03  Marek Safar  <marek.safar@gmail.com>
299
300         A fix for bug #610919
301         * parameter.cs, property.cs, cs-parser.jay: Use independent implicit
302         parameters for explicit event accessors. Anonymous method capturing
303         won't otherwise work for event implicit parameter.
304
305 2010-06-02  Marek Safar  <marek.safar@gmail.com>
306
307         A fix for bug #610088
308         * nullable.cs, expression.cs, statement.cs, method.cs, ecore.cs:
309         Ignore overrides for base overload resolution as for non-base
310         expressions and convert the best candidate to closest override
311         afterwards.
312
313 2010-06-01  Marek Safar  <marek.safar@gmail.com>
314
315         A fix for bug #610139
316         * generic.cs, convert.cs: Recursively check effective base interface
317
318 2010-06-01  Marek Safar  <marek.safar@gmail.com>
319
320         * statement.cs: Handle nullable types and type parameters in using
321         statement, avoid boxing value types. Also fixes #571010
322
323 2010-06-01  Marek Safar  <marek.safar@gmail.com>
324
325         * convert.cs, expression.cs: Emit unbox for underlying nullable
326         type boxing cast.
327
328 2010-05-29  Marek Safar  <marek.safar@gmail.com>
329
330         A fix for bug #610126
331         * expression.cs: Don't use branch optimization for types bigger than
332         int.
333
334 2010-05-28  Marek Safar  <marek.safar@gmail.com>
335
336         A fix for bug #609088
337         * import.cs: Check private modifier correctly.
338
339 2010-05-28  Marek Safar  <marek.safar@gmail.com>
340
341         A fix for bug #609049
342         * ecore.cs: Don't ignore override methods when looking for base
343         member.
344
345 2010-05-27  Marek Safar  <marek.safar@gmail.com>
346
347         A fix for bugs #608007, #572540, #566130, #476358
348
349         * generic.cs, linq.cs, expression.cs, statement.cs, cs-parser.jay:
350         More tricky refactoring of implicit linq blocks.
351         
352 2010-05-25  Marek Safar  <marek.safar@gmail.com>
353
354         * linq.cs, cs-parser.jay: Keep location for all linq clauses.
355
356 2010-05-25  Marek Safar  <marek.safar@gmail.com>
357
358         * context.cs, expression.cs, cs-parser.jay: Don't store current
359         block in This expression (it's too early for linq blocks).
360
361 2010-05-21  Marek Safar  <marek.safar@gmail.com>
362
363         * expression.cs: Use constrained prefix more broadly to avoid boxing.
364
365 2010-05-20  Marek Safar  <marek.safar@gmail.com>
366
367         A fix for bug #591149
368         * nullable.cs: Don't double wrap same expression.
369         
370 2010-05-20  Marek Safar  <marek.safar@gmail.com>
371
372         A fix for bug #569827
373         * anonymous.cs: Any issued error in probing mode means no match.
374
375 2010-05-20  Marek Safar  <marek.safar@gmail.com>
376
377         * expression.cs: Search for base indexer using the closest match
378         rule.
379
380 2010-05-20  Marek Safar  <marek.safar@gmail.com>
381
382         A fix for bug #572071
383         * method.cs: Set override constraints using unexpanded interface
384         list.
385
386 2010-05-20  Marek Safar  <marek.safar@gmail.com>
387
388         A fix for bug #572071
389         * ecore.cs: Include secondary extension method lookup in probing
390         mode.
391
392 2010-05-19  Marek Safar  <marek.safar@gmail.com>
393
394         A fix for bug #515801
395         * typespec.cs (MayBecomeEqualGenericTypes): Recursively check
396         type arguments.
397
398 2010-05-19  Marek Safar  <marek.safar@gmail.com>
399
400         A fix for bug #515801
401         * pending.cs: Advance counter correctly.
402
403 2010-05-19  Marek Safar  <marek.safar@gmail.com>
404
405         A fix for bug #480139
406         * method.cs, pending.cs: Indexer override uses base name.
407         
408 2010-05-19  Marek Safar  <marek.safar@gmail.com>
409
410         A fix for bug #424064
411         * generic.cs: Replace original with inflated type parameter on
412         failure.
413
414 2010-05-19  Marek Safar  <marek.safar@gmail.com>
415
416         A fix for bug #359733
417         * parameter.cs: Extension attribute can be defined in each assembly.
418
419 2010-05-18  Marek Safar  <marek.safar@gmail.com>
420
421         A fix for bug #446507
422         * method.cs: Only one method can implement an interface.
423
424 2010-05-18  Marek Safar  <marek.safar@gmail.com>
425
426         A fix for bug #594905
427         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
428         Typed null can be used as a source for expression methods.
429
430 2010-05-18  Marek Safar  <marek.safar@gmail.com>
431
432         A fix for bug #606551
433         * namespace.cs: Using directive imports only types and not nested
434         namespaces.
435
436 2010-05-17  Marek Safar  <marek.safar@gmail.com>
437
438         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
439         delegate.cs: Member instance is resolved after member overload
440         definitely resolves static/instance property of member expression.
441         Fixes #545047, #358848, #456605, #460016, #603299
442
443 2010-05-12  Marek Safar  <marek.safar@gmail.com>
444
445         A fix for bug #604981
446         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
447         details for nested anonymous methods stories.
448
449 2010-05-11  Marek Safar  <marek.safar@gmail.com>
450
451         A fix for bug #604735
452         * namespace.cs: Don't report namespace collision.
453
454 2010-05-11  Marek Safar  <marek.safar@gmail.com>
455
456         A fix for bug #604748
457         * class.cs, typespec.cs: Search full imported attribute hierarchy
458         for AttributeUsage.
459
460 2010-05-11  Marek Safar  <marek.safar@gmail.com>
461
462         * namespace.cs: Ignore missing dependencies failure at
463         initialization.
464
465 2010-05-11  Marek Safar  <marek.safar@gmail.com>
466
467         A fix for bug #604640
468         * namespace.cs: Don't resolve using constraints too early.
469
470 2010-05-11  Marek Safar  <marek.safar@gmail.com>
471
472         A fix for bug #604239
473         * generic.cs: Copy partial type constraints to partial container.
474
475 2010-05-10  Marek Safar  <marek.safar@gmail.com>
476
477         A fix for bug #557210
478         * import.cs: Relax underlying enum field rules.
479
480 2010-05-10  Marek Safar  <marek.safar@gmail.com>
481
482         A fix for bug #603476
483         * property.cs: Implement IParametersMember for indexer accessors.
484
485 2010-05-07  Marek Safar  <marek.safar@gmail.com>
486
487         A fix for bug #601141
488         * class.cs: Update all partial modifiers.
489
490 2010-05-06  Marek Safar  <marek.safar@gmail.com>
491
492         A fix for bug #601708
493         * method.cs, membercache.cs: Destructors cannot be hidden.
494
495 2010-05-06  Marek Safar  <marek.safar@gmail.com>
496
497         A fix for bug #602551
498         * class.cs: Resursive reference of type definition is allowed.
499
500 2010-05-06  Marek Safar  <marek.safar@gmail.com>
501
502         * anonymous.cs: Mutate cached storey instance types too.
503
504 2010-05-06  Marek Safar  <marek.safar@gmail.com>
505
506         A fix for bug #602443
507         * convert.cs: Explicit enum conversion cannot involve user operators
508
509 2010-05-05  Miguel de Icaza  <miguel@novell.com>
510
511         * class.cs (TypeContainer.DefineBaseTypes)
512         (TypeContainer.CheckRecursiveDefinition): check for the iface not
513         being null, as we could have failed resolution and crashed;
514         Fixes #442144
515
516         * cs-parser.jay: Productions to catch common mistakes when other
517         punctuation operators are used instead of comma.   Fixes 571702 
518
519 2010-05-05  Marek Safar  <marek.safar@gmail.com>
520
521         * anonymous.cs: Mutate correct set of constraints.
522
523 2010-05-05  Marek Safar  <marek.safar@gmail.com>
524
525         A fix for bug #602842
526         * expression.cs: Resolve all array bound arguments.
527
528 2010-05-05  Marek Safar  <marek.safar@gmail.com>
529
530         * import.cs: Don't import private fields.
531
532 2010-04-30  Marek Safar  <marek.safar@gmail.com>
533
534         Partially based on patch by <sami.lamti@gmail.com>
535
536         * eval.cs, ecore.cs: Fixed eval show methods.
537
538 2010-04-30  Marek Safar  <marek.safar@gmail.com>
539
540         * generic.cs, delegate.cs: Implement output type inference of
541         methodgroup now when the specification was cleared at least little
542         bit.
543
544 2010-04-29  Marek Safar  <marek.safar@gmail.com>
545
546         A fix for bug #575611
547         * class.cs: Fix recursive unmanaged recursice sruct check.
548         
549 2010-04-29  Marek Safar  <marek.safar@gmail.com>
550
551         A fix for bug #479776
552         * expression.cs: Implement typeof unbounded nested generic types.
553
554 2010-04-29  Marek Safar  <marek.safar@gmail.com>
555
556         A fix for bug #474953
557         * class.cs: Fix valid recursive base type definition.
558
559 2010-04-29  Marek Safar  <marek.safar@gmail.com>
560
561         A fix for bug #421737
562         * convert.cs, expression.cs: A boxing conversion exists from a
563         nullable-type to a reference type, if a boxing conversion exists
564         from the underlying non-nullable-value-type to the reference type.
565
566 2010-04-29  Marek Safar  <marek.safar@gmail.com>
567
568         A fix for bug #376875
569         * import.cs: Import volatile modifier.
570
571 2010-04-29  Marek Safar  <marek.safar@gmail.com>
572
573         A fix for bug #372412
574         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
575         generic arrays.
576
577 2010-04-29  Marek Safar  <marek.safar@gmail.com>
578
579         A fix for bug #568955
580         * statements.cs: Handle recursive scope initializers.
581
582 2010-04-28  Marek Safar  <marek.safar@gmail.com>
583
584         A fix for bug #566511
585         * anonymous.cs: Always get inflated version of hoisted variable
586         on generic type definition.
587
588 2010-04-28  Marek Safar  <marek.safar@gmail.com>
589
590         * import.cs, membercache.cs: Relax rules for valid properties.
591
592 2010-04-28  Marek Safar  <marek.safar@gmail.com>
593
594         * import.cs: Intern arrays used in generic arguments.
595
596 2010-04-28  Marek Safar  <marek.safar@gmail.com>
597
598         A fix for bug #600398
599         * convert.cs: Actually use effective base type for the comparison.
600
601 2010-04-28  Marek Safar  <marek.safar@gmail.com>
602
603         A fix for bug #600326
604         * ecore.cs: Pass arity to base member lookup.
605
606 2010-04-28  Marek Safar  <marek.safar@gmail.com>
607
608         A fix for bug #573385
609         * expression.cs: MemberAccess is of generic type based on right
610         arity length only.
611
612 2010-05-28  Marek Safar  <marek.safar@gmail.com>
613
614         * cs-tokenizer.cs: Made tab size configurable.
615
616 2010-05-27  Marek Safar  <marek.safar@gmail.com>
617
618         * attribute.cs: Ensure Obsolete members are defined before doing
619         ctor look-up.
620
621 2010-05-27  Marek Safar  <marek.safar@gmail.com>
622
623         * visit.cs: Add DOM visitor skeleton.
624         
625         * *.cs: Updated.
626
627 2010-05-27  Marek Safar  <marek.safar@gmail.com>
628
629         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
630         
631 2010-05-27  Marek Safar  <marek.safar@gmail.com>
632
633         * *.cs: Major rewrite of compiler internals to better work with
634         unmodified System.Reflection.Emit. Some of the key changes are
635         - TypeSpec replaces reflection specific System.Type.
636         - All Type(TypeSpec) operations are now done in compiler therefore
637         no dependency on SRE to inflate generic members and types or to
638         query unclosed types.
639         - MemberCache is now the only and full hierarchical topology.
640         - Generic constraints are implemented properly.
641         - And as a bonus compilation is on average 30% faster.
642
643 2010-04-15  Jb Evain  <jbevain@novell.com>
644
645         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
646
647 2010-04-12  Marek Safar  <marek.safar@gmail.com>
648
649         * expression.cs, attribute.cs, parameter.cs: More attribute type
650         checks.
651
652 2010-04-12  Marek Safar  <marek.safar@gmail.com>
653
654         A fix for bug #593342
655
656         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
657         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
658         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
659         codegen.cs: Add custom attribute encoder to deal with unfinished
660         types and easier corlib bootstrap from its own types.
661
662 2010-03-26  Marek Safar  <marek.safar@gmail.com>
663
664         * cs-parser.jay: Report invalid constraint types.
665
666 2010-03-16  Jb Evain  <jbevain@novell.com>
667
668         * Makefile: rename the net_2_1 profile to moonlight.
669
670 2010-03-11  Marek Safar  <marek.safar@gmail.com>
671
672         * statement.cs, cs-parser.jay: Use correct location for empty
673         statements.
674
675 2010-03-11  Marek Safar  <marek.safar@gmail.com>
676
677         * cs-parser.jay: Disable Location from expression.
678         
679         * generic.cs: Check constraints for overrides in the parser.
680
681 2010-03-09  Marek Safar  <marek.safar@gmail.com>
682
683         * cs-parser.jay (GetLocation): Use an expression when available.
684
685 2010-03-04  Marek Safar  <marek.safar@gmail.com>
686
687         A fix for bug #582579
688         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
689
690 2010-03-04  Marek Safar  <marek.safar@gmail.com>
691
692         A patch by kornelpal@gmail.com
693         
694         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
695         compiler generated classes sealed by default. Emit and close top
696         level compiler generated classes as well. 
697         
698         * support.cs: Use RuntimeHelpers.GetHashCode.
699
700 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
701
702         * Makefile: We need to use the internal bootstrapping gmcs for
703         net_2_1_bootstrap too now.
704
705 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
706
707         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
708
709 2010-03-02  Marek Safar  <marek.safar@gmail.com>
710
711         * cs-tokenizer.cs: Missed few locations in previous fix.
712
713 2010-03-02  Marek Safar  <marek.safar@gmail.com>
714
715         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
716         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
717         Report correct location for operator errors.
718
719 2010-03-02  Marek Safar  <marek.safar@gmail.com>
720
721         * typemanager.cs (IsDynamicType): Don't check external types when
722         the attribute is not external.
723
724 2010-02-24  Marek Safar  <marek.safar@gmail.com>
725
726         A fix for bug #582579
727         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
728         modifiers.
729
730 2010-02-24  Marek Safar  <marek.safar@gmail.com>
731
732         A fix for bug #581804
733         * ecore.cs: Fixed type comparison.
734
735 2010-02-08  Miguel de Icaza  <miguel@novell.com>
736
737         * namespace.cs (CompletionGetTypesStartingWith): Do not include
738         private types in the completion results.
739
740         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
741         ... let ?"
742
743 2010-02-17  Marek Safar  <marek.safar@gmail.com>
744
745         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
746         constraint parsing.
747
748 2010-02-14  Miguel de Icaza  <miguel@novell.com>
749
750         * eval.cs: Do not do the report printer dance unless the user has
751         set the DescribeTypes feature.
752
753 2010-02-10  Marek Safar  <marek.safar@gmail.com>
754
755         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
756
757 2010-02-08  Marek Safar  <marek.safar@gmail.com>
758
759         A fix for bug #577029
760         * anonymous.cs: Fixed TypeBuilder* check.
761
762 2010-02-06  Miguel de Icaza  <miguel@novell.com>
763
764         * eval.cs (CompileBlock): Also undo if there are problems during
765         semantic analysis, fixes various cases where invalid C# code would
766         be reported, but the internal changes would not be undone.
767
768 2010-02-03  Miguel de Icaza  <miguel@novell.com>
769
770         * driver.cs: Change the --fatal flag to allow a number to be
771         passed, this ignores the first N fatal errors.   Useful to debug
772         errors that do not happen on the first hit.
773
774         * cs-parser.jay (invocation_expression): accept both the
775         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
776         inside an invocation.
777
778         * driver.cs: Expose FatalErrors.
779
780         * eval.cs: Initialize the printer's Fatal property from the
781         Driver's FatalError flag, this allows csharp --fatal to work
782         again. 
783
784         Add support for calling Describe (typeof (TYPE)) if the expression
785         entered is a TYPE.
786         
787 2010-02-02  Marek Safar  <marek.safar@gmail.com>
788
789         A fix for bug #574991
790         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
791         --lint.
792
793 2010-02-02  Marek Safar  <marek.safar@gmail.com>
794
795         A fix for bug #575986
796         * expression.cs: Don't mutate typeof type definitions.
797
798 2010-01-28  Marek Safar  <marek.safar@gmail.com>
799
800         * decl.cs: Use only one set of modifiers.
801
802 2010-01-26  Marek Safar  <marek.safar@gmail.com>
803
804         A fix for bug #573329
805         * eval.cs: Don't disable error reporting completely on silent mode.
806         
807 2010-01-25  Marek Safar  <marek.safar@gmail.com>
808
809         A fix for bug #573312
810         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
811         pointer index of unknown size types greater than 2.
812
813 2010-01-15  Marek Safar  <marek.safar@gmail.com>
814
815         * *.cs: Use only 1 member kind enum.
816
817 2010-01-15  Marek Safar  <marek.safar@gmail.com>
818
819         * *.cs: Add event specification.
820
821 2010-01-14  Marek Safar  <marek.safar@gmail.com>
822
823         * membercache.cs: Extracted from decl.cs.
824         
825         * *.cs: Put more infrastructure in place.
826
827 2010-01-13  Marek Safar  <marek.safar@gmail.com>
828
829         * *.cs: Add property specification, unused yet.
830
831 2010-01-13  Marek Safar  <marek.safar@gmail.com>
832
833         * property.cs: Move all property based declarations into a new file.
834
835 2010-01-13  Marek Safar  <marek.safar at gmail.com>
836
837         * expression.cs (Conditional): Resolve reduced expression.
838
839 2010-01-13  Marek Safar  <marek.safar at gmail.com>
840
841         * *.cs: Introduced non-generic method specification.
842
843 2010-01-07  Marek Safar  <marek.safar@gmail.com>
844
845         * method.cs: Move all method based declarations into a new file.
846
847 2010-01-07  Marek Safar  <marek.safar@gmail.com>
848
849         * *.cs: Extract field specification.
850
851 2009-12-17  Marek Safar  <marek.safar@gmail.com>
852
853         * field.cs: Extracted from class.cs
854
855 2009-12-15  Marek Safar  <marek.safar@gmail.com>
856
857         * attribute.cs (GetFixedBuffer): Work on field definition only.
858
859 2009-12-15  Marek Safar  <marek.safar@gmail.com>
860
861         * *.cs: Clean up NET_4_0 conditional where possible.
862
863 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
864
865         support.cs (DynamicType): Assembly property returns the assembly builder.
866         This is required due to how compiler context works in corlib.
867
868 2009-12-14  Marek Safar  <marek.safar@gmail.com>
869
870         A fix for bug #564376
871         * assign.cs (LocalTemporary): Removed no longer needed special
872         by-ref handling.
873
874 2009-12-11  Marek Safar  <marek.safar@gmail.com>
875
876         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
877         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
878         enum for easier debugging.
879
880 2009-12-10  Marek Safar  <marek.safar@gmail.com>
881
882         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
883         point.
884         
885         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
886         directly.
887
888 2009-12-10  Marek Safar  <marek.safar@gmail.com>
889
890         * cs-parser.jay, statement.cs: Handle parser error in code
891         completition.
892
893 2009-12-10  Marek Safar  <marek.safar@gmail.com>
894
895         * ecore.cs: Ignore base imported methods when they are already
896         in method bag.
897         
898         * eval.cs: Handle non-existent keys.
899         
900         * report.cs, driver.cs: Make fatal work with console printer only.
901
902 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
903
904         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
905
906 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
907
908         * typemanager.cs: Add MakeGenericMethod that checks if the method
909         is really the generic method definition.
910
911         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
912         to inflate generic methods.
913
914 2009-12-08  Marek Safar  <marek.safar@gmail.com>
915
916         A fix for bug #561149
917         * anonymous.cs: Use actual type parameters when checking for generic
918         method host.
919
920 2009-12-08  Marek Safar  <marek.safar@gmail.com>
921
922         A fix for bug #561369
923         * expression.cs (DoNumericPromotion): Fixed typo.
924
925 2009-12-08  Marek Safar  <marek.safar@gmail.com>
926
927         *.cs: Moving to generics world.
928
929         cs-parser.jay: Removed current_array_type.
930
931 2009-12-07  Marek Safar  <marek.safar@gmail.com>
932
933         *.cs: Moving to generics world.
934
935 2009-12-04  Marek Safar  <marek.safar@gmail.com>
936
937         *.cs: Moving to generics world (day 2).
938
939 2009-12-03  Marek Safar  <marek.safar@gmail.com>
940
941         *.cs: Moving to generics world.
942
943 2009-12-02  Marek Safar  <marek.safar@gmail.com>
944
945         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
946         Encode dynamic type attribute for elements where attributes cannot
947         be used.
948
949 2009-12-01  Marek Safar  <marek.safar@gmail.com>
950
951          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
952          arguments by ref.
953
954 2009-12-01  Marek Safar  <marek.safar@gmail.com>
955
956         A fix for bug #360455
957         * class.cs: Never report a unused warning for generic events to
958         workaround wrong expression type.
959
960 2009-11-30  Marek Safar  <marek.safar@gmail.com>
961
962         A fix for bug #558305
963         * decl.cs, class.cs: Check partial method definitions using correct
964         flag.
965
966 2009-11-30  Marek Safar  <marek.safar@gmail.com>
967
968         * argument.cs: Don't cache rarely used dynamic flag.
969
970 2009-11-27  Marek Safar  <marek.safar@gmail.com>
971
972         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
973
974 2009-11-27  Marek Safar  <marek.safar@gmail.com>
975
976         * ecore.cs (SimpleName): Removed no longer needed in_transit as
977         Resolve is now non-reentrant (saves ~0.6MB for corlib).
978
979 2009-11-26  Marek Safar  <marek.safar@gmail.com>
980
981         A fix for bug #545081
982         * decl.cs: Check private nested types of nested types recursively.
983
984 2009-11-26  Marek Safar  <marek.safar@gmail.com>
985
986         A fix for bug #558305
987         * location.cs: Ignore self referencing #line directive
988
989 2009-11-26  Marek Safar  <marek.safar@gmail.com>
990
991         A fix for bug #558292
992         * class.cs: Allow single unsafe fixed buffer fields.
993
994 2009-11-26  Marek Safar  <marek.safar@gmail.com>
995
996         * expression: Optimize few more zero-based operations.
997
998 2009-11-26  Marek Safar  <marek.safar@gmail.com>
999
1000         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
1001         avoids boxing of literal values.
1002
1003 2009-11-26  Marek Safar  <marek.safar@gmail.com>
1004
1005         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
1006         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
1007         codegen.cs: LocatedToken redesing to avoid excessive allocation and
1008         boxing (saves ~7MB for corlib). Also fixes presise token location.
1009
1010 2009-11-25  Marek Safar  <marek.safar@gmail.com>
1011
1012         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
1013         common data buckers.
1014
1015 2009-11-24  Marek Safar  <marek.safar@gmail.com>
1016
1017         * expression.cs: Lower static array initializer barrier.
1018         
1019         * support.cs, driver.cs: Share reader buffer.
1020
1021 2009-11-23  Marek Safar  <marek.safar@gmail.com>
1022
1023         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
1024
1025 2009-11-23  Marek Safar  <marek.safar@gmail.com>
1026
1027         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
1028         cleanup some obsolete code.
1029
1030 2009-11-20  Marek Safar  <marek.safar@gmail.com>
1031
1032         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
1033         Expression.Resolve.
1034
1035 2009-11-20  Marek Safar  <marek.safar@gmail.com>
1036
1037         * *.cs: Resolved expressions are never resolved again, this helps to
1038         uncover some not easy to find bugs and improve the performance.
1039
1040 2009-11-19  Marek Safar  <marek.safar@gmail.com>
1041
1042         * *.cs: Made constant expressions fully compatible with any other
1043         expression.
1044
1045 2009-11-19  Marek Safar  <marek.safar@gmail.com>
1046
1047         * *.cs: DoResolve is a worker method and has to be protected.
1048
1049 2009-11-18  Marek Safar  <marek.safar@gmail.com>
1050
1051         * *.cs: More context specific handling.
1052
1053 2009-11-17  Marek Safar  <marek.safar@gmail.com>
1054
1055         * *.cs: More context specific handling.
1056
1057 2009-11-16  Marek Safar  <marek.safar@gmail.com>
1058
1059         * dynamic.cs, class.cs: Removed few fixed user types conversions.
1060         
1061         * symbolwriter.cs: Uses public ILOffset.
1062
1063 2009-11-13  Marek Safar  <marek.safar@gmail.com>
1064
1065         A fix for bug #553650
1066         * generic.cs: Another missing TypeToCoreType, still too many to fix.
1067
1068 2009-11-13  Marek Safar  <marek.safar@gmail.com>
1069
1070         A fix for bug #555170
1071
1072         * class.cs, delegate.cs, enum.cs: Constants have to be available
1073         for parameters resolve.
1074
1075 2009-11-12  Marek Safar  <marek.safar@gmail.com>
1076
1077         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
1078         arrays.
1079
1080 2009-11-12  Marek Safar  <marek.safar@gmail.com>
1081
1082         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
1083         with a statically known candidate set.
1084
1085 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
1086
1087         * generic.cs: Made type inflation for generic constraint checks
1088         recursive. This fixes BGO #553655.
1089
1090 2009-11-11  Marek Safar  <marek.safar@gmail.com>
1091
1092         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
1093         checks.
1094
1095 2009-11-10  Marek Safar  <marek.safar@gmail.com>
1096
1097         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
1098         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
1099         attribute.cs: Add some dynamic error checking.
1100
1101 2009-11-07  Marek Safar  <marek.safar@gmail.com>
1102
1103         A fix for bug #553465
1104
1105         * expression.cs: Fixed mixed version of expression tree anonymous
1106         type.
1107
1108 2009-11-06  Marek Safar  <marek.safar@gmail.com>
1109
1110         A fix for bug #553031
1111
1112         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
1113         expression tree version of anonymous type with members declaration.
1114
1115 2009-11-05  Marek Safar  <marek.safar@gmail.com>
1116
1117         * parameter.cs: Handle nullable parameter default expression.
1118         
1119         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
1120         class.cs, attribute.cs: Check for wrong dynamic arguments.
1121
1122 2009-11-05  Marek Safar  <marek.safar@gmail.com>
1123
1124         * statement.cs: Dynamic statements.
1125
1126 2009-11-04  Marek Safar  <marek.safar@gmail.com>
1127
1128         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
1129         Compound assignments over dynamic type.
1130
1131 2009-11-03  Marek Safar  <marek.safar@gmail.com>
1132
1133         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
1134         constructor arguments.
1135
1136 2009-10-30  Marek Safar  <marek.safar@gmail.com>
1137
1138         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
1139         codegen.cs: Unary mutator on dynamic member access expression.
1140
1141 2009-10-29  Marek Safar  <marek.safar@gmail.com>
1142
1143         A fix for bug #550580   
1144         * convert.cs: Don't eliminate explicit precission casts.
1145
1146 2009-10-28  Marek Safar  <marek.safar@gmail.com>
1147
1148         A fix for bug #550404
1149         
1150         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
1151         expression.cs, statement.cs, ecore.cs: Quote any nested expression
1152         tree.
1153
1154 2009-10-27  Marek Safar  <marek.safar@gmail.com>
1155
1156         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
1157         constant.
1158         
1159         * class.cs: Allow nullable binary user operators.
1160
1161 2009-10-26  Marek Safar  <marek.safar@gmail.com>
1162
1163         * expression.cs: Move binary expression optimization at the end of
1164         resolve.
1165
1166 2009-10-23  Marek Safar  <marek.safar@gmail.com>
1167
1168         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
1169         Separate NullConstant from NullLiteral.
1170
1171 2009-10-23  Marek Safar  <marek.safar@gmail.com>
1172
1173         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
1174         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
1175         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
1176         ModuleContainer. Add common unclosed member check routine.
1177
1178 2009-10-22  Marek Safar  <marek.safar@gmail.com>
1179
1180         * argument.cs: Use literal flag for real literals only.
1181
1182         * dynamic.cs: Use correct return type for custom delegates.
1183
1184 2009-10-22  Marek Safar  <marek.safar@gmail.com>
1185
1186         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
1187         resolver.
1188
1189 2009-10-22  Marek Safar  <marek.safar@gmail.com>
1190
1191         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
1192
1193 2009-10-21  Marek Safar  <marek.safar@gmail.com>
1194
1195         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
1196         conversion.
1197
1198 2009-10-21  Marek Safar  <marek.safar@gmail.com>
1199
1200         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
1201         binder flags.
1202
1203 2009-10-20  Marek Safar  <marek.safar@gmail.com>
1204
1205         * argument.cs, dynamic.cs, expression.cs: Latest API update.
1206
1207 2009-10-19  Marek Safar  <marek.safar@gmail.com>
1208
1209         * typemanager.cs, expression.cs: Dynamic array initializer.
1210
1211 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1212
1213         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
1214         is imported.
1215
1216 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1217
1218         A fix for bug #493523, #507067
1219         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
1220         standard nullable conversion using underlying standard conversion
1221         and not full conversion.
1222
1223 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1224
1225         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
1226         type in VerifyArgumentsCompat.
1227
1228 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1229
1230         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1231         Reject variable used with type arguments.
1232
1233 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1234
1235         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
1236         Implement dynamic expressions assignment.
1237
1238 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1239
1240         * expression.cs: Build underlying expression when resolving unary
1241         mutators.
1242
1243 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1244
1245         * expression.cs: Emit enum array initializer using binary blob.
1246
1247 2009-10-08  Marek Safar  <marek.safar@gmail.com>
1248
1249         * typemanager.cs, constant.cs: Optimize decimal constants which fit
1250         to long range.
1251
1252 2009-10-07  Marek Safar  <marek.safar@gmail.com>
1253
1254         * typemanager.cs: Reset object_type.
1255         
1256         * assign: Made SimpleAssign public.
1257
1258 2009-10-06  Marek Safar  <marek.safar@gmail.com>
1259
1260         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
1261         invocation assembly to IsThisOrFriendAssembly.
1262
1263 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1264
1265         * expression.cs: Equality comparison of generic parameter with
1266         class constraint.
1267
1268 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1269
1270         A fix for bug #543570
1271         * generic.cs: Import predefined constraints correctly.
1272
1273 2009-10-02  Marek Safar  <marek.safar@gmail.com>
1274
1275         * ecore.cs: Don't crash on overloads with optional paremeters where
1276         arguments count overflows.
1277         
1278         * parameter.cs: Import optional parameter constants using optional
1279         value type.
1280
1281 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1282
1283         * Makefile: Default is gmcs compiler.
1284
1285 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1286
1287         * cs-parser.jay: Fixed few NRE.
1288
1289 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1290
1291         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
1292
1293 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1294
1295         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
1296         ShimExpression, ImplicitCast.
1297
1298 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1299
1300         A fix for bug #542959
1301         * delegate.cs: Emit correct delegate instance variable when there
1302         are static and non-static overloads.
1303
1304 2009-09-29  Marek Safar  <marek.safar@gmail.com>
1305
1306         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
1307         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
1308
1309 2009-09-28  Marek Safar  <marek.safar@gmail.com>
1310
1311         A fix for bug #542487
1312         * ecore.cs: Resolve extension methods hidden by properties.
1313
1314 2009-09-25  Marek Safar  <marek.safar@gmail.com>
1315
1316         * expression.cs, ecore.cs: More dynamic binary expressions.
1317
1318 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1319
1320         * nullable.cs, expression.cs: Fixed null lifted conversion for
1321         bitwise enum operations.
1322
1323 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1324
1325         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
1326         values in checked context.
1327
1328 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1329
1330         * expression.cs, ecore.cs: Fixed array index constant conversion.
1331
1332 2009-09-20  Miguel de Icaza  <miguel@novell.com>
1333
1334         * expression.cs: Do not crash when MemberLookup returns something
1335         that is not a MemberExpr here.   Report error 582 instead. 
1336
1337         Fixes #499988.
1338
1339 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1340
1341         * decl.cs, class.cs: Check protected property accessors.
1342
1343 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1344
1345         * dynamic.cs, assign.cs: Dynamic compound assignment.
1346
1347 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1348
1349         * expression.cs: Fixed compound assignment explicit conversion.
1350
1351 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1352
1353         * expression.cs, ecore.cs: Cannot infer variables from method group.
1354
1355 2009-09-16  Marek Safar  <marek.safar@gmail.com>
1356
1357         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
1358         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
1359         codegen.cs: Dynamic binary operations scaffolding.
1360
1361 2009-09-15  Marek Safar  <marek.safar@gmail.com>
1362
1363         * expression.cs: Fixes nullable promotion for enum type variables.
1364
1365 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1366
1367         * driver.cs, dynamic.cs: Reset more static variables.
1368
1369 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1370
1371         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
1372         driver.cs: Introduced Expression::MakeExpression.
1373
1374 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1375
1376         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
1377
1378 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1379
1380         * eval.cs, report.cs: Use Console.Out for all eval error or warning
1381         output.
1382
1383 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1384
1385         A fix for bug #518707
1386         * expression.cs (Is): Optimize only generic parameter type
1387         expression probing value type generic parameter.
1388
1389 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1390
1391         A fix for bug #532571
1392         * ecore.cs: Check for simple name type arguments used with
1393         non-generic type.
1394
1395 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1396
1397         A fix for bug #497421
1398         * generic.cs (CheckConstraint): Don't use buildin types to check for
1399         parameterless constructor.
1400
1401 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1402
1403         A fix for bug #537402
1404         * generic.cs (CheckConstraint): Correctly inflate generic type
1405         arguments when checking generic method. 
1406
1407 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1408
1409         A fix for bug #536463
1410         * decl.cs (AddToContainer): Don't report collision between explicit
1411         and parameterless non-explicit members.
1412
1413 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1414
1415         * eval.cs: Reset more static stuff.
1416
1417 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1418
1419         A fix for bug #324625
1420         * expression.cs, ecore.cs: Create nested generic type expression
1421         using declaring and not current type.
1422
1423 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1424
1425         * *.cs: Changed Report class to accept various output printers and
1426         be an instance class. An expression resolver can now use different
1427         message reporter for each call and Report.Error can safely throw
1428         an exception. Part of ongoing work to turn mcs into proper library.
1429
1430 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1431
1432         * statement.cs, ecore.cs: Removed error reporting from emit code.
1433
1434 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1435
1436         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1437
1438 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1439
1440         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1441         parser checks out of constructors.
1442
1443 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1444
1445         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1446
1447 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1448
1449         A fix for bug #535448
1450         * anonymous.cs, class.cs: Copy return label between all contexts.
1451
1452 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1453
1454         A fix for bug #535395
1455         * namespace.cs: Resolve context can be null.
1456
1457 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1458
1459         A fix for bug #533912
1460         * generic.cs: Use correct context for constraints resolving.
1461
1462 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1463
1464         A fix for bug #532630
1465         * driver.cs: Trim conditional symbols.
1466
1467 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1468
1469         * context.cs: New file.
1470         
1471         * *.exe.sources, *.csproj: Updated.
1472
1473 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1474
1475         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1476         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1477         IMembercontext, some small cleanups.
1478
1479 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1480
1481         * *.cs: Split ResolveContext and EmitContext.
1482
1483 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1484
1485         * *.cs: Only ResolveContext implements IMemberContext.
1486
1487 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1488
1489         * *.cs: Renamed IResolveContext to IMemberContext.
1490
1491 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1492
1493         * *.cs: Detached ResolveContext from EmitContext.
1494
1495 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1496
1497         * codegen.cs: Moved flow-analysis to BlockContext.
1498
1499 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1500
1501         * *.cs: Detached BlockContext from EmitContext.
1502
1503 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1504
1505         * statement.cs: avoid nullref when the return value of GetEnumerator()
1506         does not contain any MoveNext() method.
1507
1508 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1509
1510         * *.cs: Removed IResolveContext::GenericDeclContainer.
1511
1512 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1513
1514         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1515
1516 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1517
1518         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1519         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1520
1521 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1522
1523         * *.cs: Removed boolean fields from EmitContext.
1524
1525 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1526
1527         * *.cs: Add IResolveContext::IsStatic.
1528
1529 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1530
1531         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1532
1533 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1534
1535         * *.cs: Removed DeclContainer from EmitContext.
1536
1537 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1538
1539         * *.cs: Add IResolveContext::CurrentTypeParameters.
1540
1541 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1542
1543         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1544
1545 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1546
1547         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1548         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1549
1550 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1551
1552         * decl.cs: Look in PartialContainer for parent type parameters.
1553
1554 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1555
1556         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1557         codegen.cs: Add IResolveContext::LookupTypeParameter.
1558
1559 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1560
1561         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1562         Moved resolved logic from Emit to Resolve.
1563
1564 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1565
1566         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1567         codegen.cs: Reworked atttributes handling of ResolveContext.
1568
1569 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1570
1571         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1572         LookupNamespaceOrType to ResolveContext.
1573
1574 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1575
1576         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1577         class.cs: Removed unused parameters and methods.
1578
1579 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1580
1581         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1582         codegen.cs: Finding the best common type of a set of expressions for
1583         lambda statements.
1584
1585 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1586
1587         * dynamic.cs, expression.cs: More dynamic conversions.
1588
1589 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1590
1591         * generic.cs: This loop was incorrect, it was increment ii, but
1592         checking for `i'.  This was a change introduced to fix #327497,
1593         now we fix #424012.
1594  
1595         * class.cs: Catch another case for cs0533 error, fixes #324782.
1596
1597 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1598
1599         * typemanager.cs (GetGenericArguments): SRE returns null for
1600         generic methods on type builder instances if they are not generic
1601         themselves. For example, for Foo<int>::Bar() it returns null, but
1602         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1603
1604 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1605
1606         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1607         delegate.cs: Work on dynamic binding.
1608
1609 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1610
1611         A second fix for bug #525342
1612         * class.cs: Attach partial method attributes to method
1613         implementation.
1614
1615 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1616
1617         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1618         restrictions.
1619         
1620         * rootcontext.cs: Default to langversion v4.
1621
1622 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1623
1624         * pending.cs: Check return type before member info is set.
1625
1626 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1627
1628         * anonymous.cs: Fully initialize generic hoisted field expression.
1629
1630 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1631
1632         * cs-parser.jay: Flag variables declared on the interactive shell
1633         as used to prevent the 168 warning about local variable not being
1634         used. 
1635
1636 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1637
1638         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1639         attribute.cs: Emit dynamic export attribute.
1640
1641 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1642
1643         * expression.cs: More verifier work.
1644
1645 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1646
1647         * nullable.cs: Fixed SRE crash during corlib compilation.
1648
1649 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1650
1651         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1652         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1653         More TypeManager.TypeToCoreType needed.
1654
1655 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1656
1657         * anonymous.cs: Update after recent SRE fixes.
1658
1659 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1660
1661         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1662         version of GetFieldHandle for fields of generic types.
1663
1664 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1665
1666         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1667         ecore.cs: Add TypeManager.IsDynamicType,
1668         PredefinedAttributes.Dynamic.
1669
1670 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1671
1672         A fix for bug #415375
1673         * expression.cs: Fixed object and reference type parameter
1674         comparison.
1675
1676 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1677
1678         A fix for bug #525342
1679         * class.cs: Attach partial method attributes to method
1680         implementation.
1681
1682 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1683
1684         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1685         Dynamic arguments.
1686
1687 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1688
1689         * anonymous.cs (MutateField): Add imported types handling.
1690
1691 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1692
1693         * expression.cs, delegate.cs: Moved arguments resolve into their
1694         counterparts expressions. Removed argument resolve from
1695         CollectionElementInitializer.
1696
1697 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1698
1699         A fix for bug #523683
1700         * convert.cs, delegate.cs: Use common overload mechanism for method
1701         group conversion check.
1702
1703 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1704
1705         A fix for bug #523899
1706         * generics.cs: Exact type inference with other bound types.
1707
1708 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1709
1710         Don't complain when the same type is implemented by the output
1711         assembly as well as multiple referenced assemblies
1712         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1713         'must_be_unique' flag.
1714         (GlobalRootNamespace): Update to changes.
1715         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1716         already have a type in hand.
1717
1718 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1719
1720         * expression.cs: More verifier instrumentation.
1721         
1722         * statement.cs: Do proper throw expression conversion.
1723
1724 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1725
1726         A fix for bug #522789
1727         * expression.cs: Mutate invocation return type.
1728
1729 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1730
1731         * anonymous.cs: Split assignable and readonly generated variable
1732         references.
1733
1734 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1735
1736         A fix for bug #521671
1737         * statement.cs: Fixed crash when checking missing type.
1738
1739 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1740
1741         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1742         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1743         class.cs, driver.cs: Work on dynamic binding.
1744
1745         * dynamic.cs: New file.
1746
1747         * *.sources, *.proj: Updated.
1748
1749 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1750
1751         * expression.cs (Conditional): Avoid double Resolve.
1752
1753 2009-07-13  Marcus Griep  <marcus@griep.us>
1754
1755         * ecore.cs: Fix obscure bug with resolving members of interfaces
1756         that hide parent interface members. Fixes bug #444388 and corrects
1757         bug #323096
1758
1759 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1760
1761         * expression.cs (LocalVariableReference): Bounce resolve.
1762
1763 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1764
1765         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1766         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1767         types to new class.
1768         
1769         * support.cs: New dynamic type wrapper.
1770
1771 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1772
1773         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1774         typed local variable.
1775
1776 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1777
1778         A fix for bug #519005
1779         * anonymous.cs: Use null_type as no return type placeholder.
1780
1781 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1782
1783         * generic.cs: Handle type inference of identical type parameters
1784         with different bounds.
1785
1786 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1787
1788         * expression.cs, class.cs: Events variance.
1789         
1790         * cs-parser.jay: Interface events error messages.
1791
1792 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1793
1794         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1795
1796 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1797
1798         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1799         parameter expression can be value-type New.
1800
1801         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1802
1803 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1804
1805         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1806         Implemented C# 4.0 named arguments.
1807
1808 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1809
1810         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1811         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1812         parameter modifier. Also fixes bug #515497.
1813
1814 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1815
1816         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1817         arguments expression to be implemented.
1818         
1819         *.sources: Add argument.cs
1820
1821 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1822
1823         * parameter.cs: Moved GetParameterIndexByName to base class.
1824         
1825         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1826         unused AType. Use argument's version of GetExpressionTree.
1827
1828 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1829
1830         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1831         arguments grammar.
1832
1833 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1834
1835         A fix for bug #514096
1836         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1837
1838 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1839
1840         * expression.cs: The first multi-dimensional array nested array
1841         initializers was not checked.
1842         
1843         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1844
1845 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1846
1847         A fix for bug #513400
1848         * nullable.cs (EmitEquality): Operands emit could be simplified for
1849         built-in types when we now emit user operators differently.
1850
1851 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1852
1853         * ecore.cs: Report inaccessible delegate methods correctly.
1854
1855 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1856
1857         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1858         cs-parser.jay: Implemented C# 4.0 optional parameters.
1859
1860 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1861
1862         * driver.cs: Removed broken DefineManifestResource.
1863
1864 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1865
1866         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1867         Use $(BOOTSTRAP_PROFILE) instead.
1868
1869 2009-06-12  Jb Evain  <jbevain@novell.com>
1870
1871         * rootcontext.cs: add a Platform field.
1872         * driver.cs: handle /platform.
1873         * codegen.cs: pass the proper flags according to
1874         the platform when saving the assembly.
1875
1876 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1877
1878         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1879         Add optional parameters grammar.
1880
1881 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1882
1883         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1884         driver.cs: Split lang version and metadata version.
1885
1886 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1887
1888         * decl.cs: Better overload ctor collision error message.
1889
1890 2009-06-05  Jb Evain  <jbevain@novell.com>
1891
1892         * driver.cs (EmbededResource): avoid using an internal method
1893         in gmcs to embed manifest resources.
1894
1895 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1896
1897         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1898         the compiler from older mono versions (like moon's bots)
1899
1900 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1901
1902         * namespace.cs (LookupTypeReflection): Ignore collisions between
1903         forwarded types.
1904
1905 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1906
1907         * codegen.cs: Enabled generic type forwarders.
1908
1909 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1910
1911         * dmcs.*: Add another version of SRE compiler.
1912
1913 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1914
1915         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1916         generic-mcs.cs: Fixed variant type conversions.
1917
1918 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1919
1920         A fix for bug #507863
1921         * codegen.cs: Fixes a crash on invalid string value attribute.
1922
1923 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1924
1925         A fix for bug #508334
1926         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1927         cs-parser.jay: Fully import __arglist modifier.
1928
1929 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1930
1931         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1932         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1933         actually work with closed generic types.
1934
1935 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1936
1937         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1938         Fix the build by replacing the use of 'var' with the actual type.
1939
1940 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1941
1942         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1943     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1944         declarations.
1945           
1946         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1947         filter.
1948
1949 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1950                         Marek Safar  <marek.safar@gmail.com>
1951
1952         A fix for bug #377509
1953         * parameter.cs: Use predefined and not empty name for implicit
1954         setters.
1955
1956 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1957
1958         * class.cs: Don't report wrong warnings for event fields.
1959
1960 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1961
1962         A fix for bug #504667
1963         * class.cs: Check for static class using parent container instead of
1964         parent type.
1965
1966 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1967
1968         A fix for bug #496922
1969         * expression.cs: Always use temporary variable when using object
1970         initializer.
1971
1972 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1973
1974         A fix for bug #495112
1975         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1976         local cache.
1977
1978 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1979
1980         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1981
1982 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1983
1984         * complete.cs: No idea how gonzalo got a null in the list, but
1985         avoid crashing.
1986
1987 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1988
1989         * complete.cs (CompletionElementInitializer): New completion class
1990         to support completing inside a C# 3 element initializer, so this
1991         allows completion for Silverlight situations where it is very
1992         common to do:
1993
1994         new TextBlock () { Fo<TAB>
1995
1996         (CompletionSimpleName): Expose the prefix that was
1997         passed to the simple name.
1998
1999         * cs-parser.jay (object_or_collection_initializer): Add support
2000         for element_initializers.
2001
2002         * expression.cs (CollectionOrObjectInitializers.DoResolve):
2003         special case completion expressions as this method aggressively
2004         collects data before it operates, and errors were being thrown
2005         earlier than we were able to complete.
2006
2007 2009-04-23  Miguel de Icaza  <miguel@novell.com>
2008
2009         * eval.cs: Make getcompletions silent and enable debugging output
2010         if the -v option is passed.
2011
2012         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
2013         Consider looking up the namespace that matches the prefix being
2014         used. 
2015
2016         This is part of the support for allowing completions like:
2017         `System.Co<TAB>' to complete to System.Console.
2018
2019         * complete.cs (CompletionSimpleName.AppendResults): Make this
2020         routine reusable.
2021
2022 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
2023
2024         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
2025         COMPLETE_COMPLETION as internal.
2026
2027 2009-04-17  Miguel de Icaza  <miguel@novell.com>
2028
2029         * complete.cs: Include namespace resolution in simple names as
2030         well as global types and types in the using scope in the
2031         resolution. 
2032
2033         * namespace.cs: Supporting infrastrcture to provide completions
2034         based on the current using scope. 
2035
2036         * eval.cs: Introduce an entry point that allows for initialization
2037         to return a list of the files passed on the command line.
2038
2039 2009-04-14  Marek Safar  <marek.safar@gmail.com>
2040
2041         A fix for bug #494243
2042         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
2043
2044 2009-04-13  Marek Safar  <marek.safar@gmail.com>
2045
2046         A fix for bug #493887
2047         * statement.cs: Don't skip string multi-section with default or
2048         null label when populating string hashtable.
2049
2050 2009-04-06  Marek Safar  <marek.safar@gmail.com>
2051
2052         A fix for bug #492329
2053         * expression.cs (New): Load variable when assigning type parameter
2054         to ref variable.
2055
2056 2009-04-06  Marek Safar  <marek.safar@gmail.com>
2057
2058         A fix for bug #488960
2059         * decl.cs: Compare MVAR types using non-null values.
2060
2061 2009-03-27  Marek Safar  <marek.safar@gmail.com>
2062
2063         * typemanager.cs, expression.cs: Removed unused nullable checks.
2064
2065 2009-03-27  Marek Safar  <marek.safar@gmail.com>
2066
2067         * *.cs: Removed some gmcs conditionals.
2068
2069 2009-03-26  Marek Safar  <marek.safar@gmail.com>
2070
2071         * generic.cs, support.cs: Moved generics stuff out of support.cs
2072
2073 2009-03-24  Marek Safar  <marek.safar@gmail.com>
2074
2075         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
2076         DeclaringType.
2077
2078 2009-03-23  Marek Safar  <marek.safar@gmail.com>
2079
2080         * attribute.cs: Consider all members for error reporting when
2081         checking named arguments.
2082
2083 2009-03-23  Marek Safar  <marek.safar@gmail.com>
2084
2085         A fix for bug #487625
2086         * namespace.cs: Use a warning for all predefined type conflicts.
2087
2088 2009-03-23  Marek Safar  <marek.safar@gmail.com>
2089
2090         A fix for bug #485706
2091         * statement.cs: Explicitly type catch type argument to pass verifier
2092         check.
2093
2094 2009-03-22  Miguel de Icaza  <miguel@novell.com>
2095
2096         Initial support to provide code completion facilities to consumers
2097         of the evaluator API.
2098         
2099         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
2100         support the completion engine.   When we reach the end of the
2101         input stream instead of returning EOF, when this flag is true the
2102         tokenizer instead produces:
2103
2104                 One GENERATE_COMPLETION token: this token then must be
2105                 handled in the grammar at every point where the user
2106                 would likely request a completion.
2107
2108                 As many COMPLETE_COMPLETION tokens as necessary.   These
2109                 tokens are generated to assist the parser in unwinding and
2110                 producing a valid parse tree.    
2111
2112         The parser rules do not have to be perfect, the parser needs to be
2113         augmented with judicious use of GENERATE_COMPLETION tokens to
2114         improve the areas where we can provide completion and the parser
2115         needs to add support for COMPLETE_COMPLETION tokens in productions
2116         to make them work.
2117
2118         It is common to not have enough support for COMPLETE_COMPLETION
2119         under certain rules and that even if we generated the
2120         GENERATE_COMPLETION token that the resulting tree will be invalid
2121         due to the missing rules that support COMPLETE_COMPLETION.
2122
2123         The final EOF token is produced by having the parser notify the
2124         tokenizer when it reaches the root production that the next token
2125         should be EOF.
2126
2127         * support.cs (CompletionResult): New Exception.   This exception
2128         is thrown to return the completion results when one of the special
2129         completion expressions is reached.
2130
2131         This exception is thrown by the completing ExpressionStatements
2132         classes that live in complete.cs
2133
2134         * complete.cs (CompletingExpression): a new base class for
2135         completing expressions.   This derives from the
2136         ExpressionStatement class and not from Expression as it allows
2137         completion to happen not only where expressions are expected in
2138         the grammar, but also where statements are expected.
2139
2140         (CompletionSimpleName): A new class used to provide completions
2141         for SimpleNames.     This currently only resolves to local
2142         variables from the evaluator context (GetVars call).
2143
2144         (CompletionMemberAccess): Implements support for completing member
2145         access patterns. 
2146
2147         * cs-parser.jay: Add support for completion in a few places. 
2148
2149         * eval.cs (GetCompletions): New public API for the evaluator that
2150         returns a list of possible completions given the input.   The
2151         return value is an array of completions 
2152
2153         * anonymous.cs (Compatible): If the exception thrown from the
2154         resolved expression is a CompletionResult exception let that one
2155         through instead of printing a diagnostic error in the try/catch. 
2156 <       
2157 2009-03-22  Miguel de Icaza  <miguel@novell.com>
2158
2159         * 
2160
2161         * driver.cs (Main): Use Environment.Exit to quit quickly and
2162         prevent the compiler from doing the usual wait for helper thread
2163         to terminate.  
2164
2165         This is to prevent a slowdown that was reported by Gonzalo on
2166         ASP.NET 
2167
2168 2009-03-19  Marek Safar  <marek.safar@gmail.com>
2169
2170         * ecore.cs: Load build-in types directly instead of accessing
2171         an internal field.
2172
2173 2009-03-18  Marek Safar  <marek.safar@gmail.com>
2174
2175         * ecore.cs: Always use unbox.any when available.
2176
2177 2009-03-18  Marek Safar  <marek.safar@gmail.com>
2178
2179         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
2180
2181 2009-03-17  Marek Safar  <marek.safar@gmail.com>
2182
2183         * generic.cs: Removed obsolete version of type inference.
2184
2185 2009-03-16  Marek Safar  <marek.safar@gmail.com>
2186
2187         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
2188         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
2189         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
2190         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
2191
2192 2009-03-11  Marek Safar  <marek.safar@gmail.com>
2193
2194         A fix for bug #482996
2195         * anonymous.cs: Make sure we are not infering return type when
2196         checking type compatibility.
2197
2198 2009-03-11  Marek Safar  <marek.safar@gmail.com>
2199
2200         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
2201         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
2202         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
2203         attributes in their own structure. Needed when accessing their
2204         properties before they are resolved.
2205
2206 2009-03-09  Marek Safar  <marek.safar@gmail.com>
2207
2208         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
2209         hashtable (~10x faster).
2210         
2211         * driver.cs: Removed wrong Reset.
2212
2213 2009-03-08  Marek Safar  <marek.safar@gmail.com>
2214
2215         * class.cs: Use correct common base type for unmanaged delayed
2216         check.
2217
2218         * rootcontext.cs: Wrap unhandled exception.
2219
2220 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
2221
2222         Make SeekableStreamReader self-tuning and arbitrarily seekable
2223         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
2224         the buffer.
2225         (SeekableStreamReader.Position.set): Use it.  Simplify logic
2226         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
2227         buffer size when the stream needs to be re-read from the beginning.
2228
2229 2009-03-05  Marek Safar  <marek.safar@gmail.com>
2230
2231         A fix for bug #480100
2232         * parameter.cs: A parameter is not hoisted when used directly as ET.
2233
2234 2009-03-04  Marek Safar  <marek.safar@gmail.com>
2235
2236         * statement.cs: Fixed an issue when using variable is of interface
2237         type.
2238
2239 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2240
2241         A fix for bug #480319
2242         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
2243
2244 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2245
2246         A fix for bug #480867
2247         * typemanager.cs, expression.cs, ecore.cs: Changed method group
2248         expression to have no valid type.
2249
2250 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2251
2252         A fix for bug #481258
2253         * class.cs: Set extension method flag in partial container.
2254
2255 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2256
2257         * statement.cs, typemanager.cs: Use expression for StringEmitter.
2258         
2259         * attribute.cs: Add sanity check.
2260
2261 2009-02-27  Marek Safar  <marek.safar@gmail.com>
2262
2263         * class.cs: Add external constructor error.
2264
2265 2009-02-26  Marek Safar  <marek.safar@gmail.com>
2266
2267         A fix for bug #475354
2268         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
2269         correctly user defined nullable equality operators.
2270
2271 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2272
2273         A fix for bug #479532
2274         * expression.cs: Implement NewInitialize::AddressOf.
2275
2276 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2277
2278         A fix for bug #413633
2279         * expression.cs: Iterate all base class-constraint types.
2280
2281 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2282
2283         A fix for bug #479209
2284         * literal.cs: Mutate null underlying type.
2285
2286 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2287
2288         A fix for bug #476295
2289         * convert.cs: Avoid wrapping implicitly convertible reference type.
2290
2291 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2292
2293         * iterators.cs: Create MemberName correctly.
2294
2295 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2296
2297         A fix for bug #478655
2298         * literal.cs: Check also underlying null type conversion.
2299
2300 2009-02-21  Marek Safar  <marek.safar@gmail.com>
2301
2302         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
2303
2304 2009-02-20  Marek Safar  <marek.safar@gmail.com>
2305
2306         A fix for bug #477447
2307         * statement.cs: Add reference to correct parent storey when this
2308         is accessible from deep children storey (more than 1 level).
2309
2310 2009-02-19  Marek Safar  <marek.safar@gmail.com>
2311
2312         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
2313         * class.cs: Define base type members before setting up member cache.
2314
2315 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2316
2317         A fix for bug #477378
2318         * nullable.cs, expression.cs, statement.cs: More precise null type
2319         sanity checks.
2320
2321 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2322
2323         A fix for bug #472805
2324         * typemanager.cs, namespace.cs: Import only visible extension method
2325         types.
2326
2327 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2328
2329         A fix for bug #476895
2330         * attribute.cs: Use correct resolve context for attribute type.
2331
2332 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2333
2334         A fix for bug #476266
2335         * anonymous.cs: Mutate multi-dimensional arrays.
2336
2337 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2338
2339         A fix for bug #476400
2340         * statement.cs, expression.cs: Removed wrong Dispose optimization.
2341
2342 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2343
2344         A fix for bug #476811
2345         * generics.cs: Fixed null-literal check.
2346
2347 2009-02-17  Marek Safar  <marek.safar@gmail.com>
2348
2349         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
2350         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
2351         messing with static variables.
2352
2353 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2354
2355         A fix for bug #475965
2356         * generics.cs: Check generic parameter type after extracting from
2357         Expression<T>.
2358
2359 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2360
2361         A fix for bug #475823
2362         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
2363         typed-null support.
2364
2365 2009-02-14  Marek Safar  <marek.safar@gmail.com>
2366
2367         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
2368         Simplified event field definition using backing field and not
2369         field builder directly.
2370
2371         * expression.cs (EmitLdArg): Optimize fast paths.
2372
2373 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2374
2375         A fix for bug #475327
2376         * expression.cs (ArrayCreation): Don't mutate values optimized away.
2377
2378 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2379
2380         A fix for bug #475342
2381         * cs-parser.jay: Using 'super' instead of 'base' to call base
2382         constructor crashes compiler.
2383
2384 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2385
2386         A fix for bug #475354
2387         * expression.cs (Constantify): Add nullable types.
2388         
2389         * const.cs (EmitDecimalConstant): Avoid explicit cast.
2390
2391 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2392
2393         A fix for bug #475246
2394         * expression.cs: More broken flowanalysis hacking needed.
2395
2396 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2397
2398         * attribute.cs: Compare only ref/out array modifiers. 
2399
2400 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2401
2402         * statement.cs: Use member cache when looking for foreach members.
2403
2404 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2405
2406         * expression.cs: Don't expose internal initializer types.
2407         
2408         * statement.cs: Check also explicit conversions for goto case.
2409
2410 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2411
2412         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2413
2414 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2415
2416         * *.cs: Replace null-type with NullLiteral where appropriate.
2417
2418 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2419
2420         * expression.cs: Initializer of reference argument use temporary
2421         variable to be verifiable.
2422         
2423         * parameter.cs: Share EmitLdArg.
2424
2425 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2426
2427         A fix for bug #473559
2428         * class.cs: Fixed: Not reporting error about nested class with the
2429         same name.
2430
2431 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2432
2433         Contributed under the MIT/X11 license.
2434
2435         * generic.cs: Added VerifyVariantTypeParameters which performs new
2436         variance verification logic. The old logic, based on the spec, was
2437         wrong because the spec is full of LIES!
2438
2439         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2440
2441         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2442
2443         * class.cs:
2444         * ecore.cs: Added calls to the new variance verification logic.
2445
2446         * parameter.cs:
2447         * delegate.cs: Removed calls to the old variance verification logic.
2448
2449 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2450
2451         * delegate.cs: Use cached Invoke method directly.
2452
2453 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2454
2455         * expression.cs: Emit expression tree for hoisted variable access.
2456
2457 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2458
2459         * namespace.cs: Add better extension class check.
2460
2461 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2462
2463         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2464
2465 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2466
2467         This patch adds initial generic variance support to the compiler.
2468         It is contributed under the MIT/X11 license.
2469
2470         * typemanager.cs: Modified ImplementsInterface to check variance.
2471         Added VerifyVariantTypeParameters which checks the specified type to see
2472         if it uses a variant type parameter as a type argument (which is not
2473         allowed). Added IsVariantOf which determins if the first type is a
2474         variant of the second. NOTE: This only supports reference types at
2475         the moment to conform with the current level of VM support. When the
2476         VM supports value types, this will follow step.
2477
2478         * generic.cs: Added the Variance enum. Added a Variance property to
2479         TypeParameter and added variance support to definition phase. Added a
2480         Variance property to TypeParameterName. Also check to make sure that
2481         no variant types appear in generic method parameters.
2482
2483         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2484         keywords if the langversion supports it.
2485
2486         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2487         that variant types are only used in legal positions. Also added
2488         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2489         parameters.
2490
2491         * decl.cs: Construct TypeParameter with the variance information.
2492
2493         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2494         and ImplicitConversionStandard.
2495
2496         * rootcontext.cs: Added new "Future" language version.
2497
2498         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2499         type parameters are not used as type arguments in interface inheritance.
2500         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2501         parameters are not used as method return types. In MemberBase.
2502         ResolveMemberType, ensure that variant type parameters are not used
2503         as type arguments. Also call VerifyNoVariantTypeParameters on every
2504         set of parameters which are resolved.
2505
2506         * delegate.cs: Modified Delegate.Define to ensure that variant
2507         parameters are not used as type arguments and that a contravariant
2508         parameter is not used as the return type. Also call
2509         VerifyNoVariantTypeParameters on the delegate parameters.
2510
2511         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2512         to specify generic variance.
2513
2514         * driver.cs: Added support for LanguageVersion.Future in the form of
2515         "-langversion:future".
2516
2517         * generic-mcs.cs: Stubbed out new members in generic.cs.
2518
2519 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2520
2521         * class.cs, generic.cs: Emit type parameter constraints for nested
2522         types.
2523
2524 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2525
2526         A fix for bug #471213
2527         * class.cs: Avoid emitting backing field for abstract event fields.
2528
2529 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2530
2531         A fix for bug #359731
2532         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2533         expressions.
2534
2535 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2536
2537         A fix for bug #470767
2538         * statement.cs: Introduced BlockScopeExpression, needed when 
2539         expression tree conversion has to emit scope variables.
2540
2541 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2542
2543         * class.cs: Remove duplicate CallingConvention.
2544
2545 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2546
2547         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2548         when I finally found the right naming convention.
2549
2550 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2551
2552         * cs-tokenizer.cs: Put back different open parens optimization.
2553
2554 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2555
2556         A fix for bug #470227
2557         * cs-tokenizer.cs: Remove too agressive parser optimization.
2558
2559 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2560
2561         A fix for bug #324319
2562         * class.cs: Remove too early base type resolve.
2563
2564 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2565
2566         A fix for bug #324319
2567         * ecore.cs: Explicitly type null when assigning to type argument to
2568         make pass verifier check.
2569
2570 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2571
2572         * anonymous.cs: Fixed recent regression when initializing captured 
2573         this.
2574
2575 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2576
2577         A fix for bug #469019
2578         * anonymous.cs: Use all parent type parameters when instantiating
2579         nested generic storey.
2580
2581 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2582
2583         * expression.cs: Check for null instance methodgroup expression.
2584
2585 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2586
2587         A fix for bug #469244
2588         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2589         instance inside a conditional expression.
2590
2591 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2592
2593         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2594         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2595         GetElementType and HasElementType. IsValueType clean up.
2596
2597 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2598
2599         * nullable.cs: Use common EmitCall.
2600         
2601         * expression.cs: Emit constraint. for virtual calls only.
2602
2603 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2604
2605         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2606         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2607         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2608         checks.
2609
2610 2009-01-22  Jb Evain  <jbevain@novell.com>
2611
2612         * anonymous.cs: make anonymous types' ToString implementation
2613         match what csc outputs.
2614
2615 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2616
2617         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2618         up.
2619
2620 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2621
2622         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2623         verifier checks.
2624
2625 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2626
2627         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2628         expressions.
2629
2630 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2631
2632         A fix for bug #466634
2633         * statement.cs: Add reference for nested storey when only this
2634         is captured.
2635
2636 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2637
2638         A fix for bug #466474
2639         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2640         was specified.
2641
2642 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2643
2644         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2645         Fixed nested stories parent referencing process. Also fixes #463985.
2646
2647 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2648
2649         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2650         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2651         implementation. Also fixes #463108.
2652
2653 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2654
2655         A fix for bug #416109
2656         * decl.cs: Issue correct CLSAttribute warning location.
2657
2658 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2659
2660         A fix for bug #456775
2661         * attribute.cs: Use attribute owner scope when resolving attribute
2662         arguments.
2663
2664 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2665
2666         A fix for bug #457257
2667         * decl.cs: Fixed incorrect member declaring type comparison.
2668
2669 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2670
2671         A fix for bug #460896
2672         * driver.cs: Handle /RES resources as embeddable.
2673
2674 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2675
2676         A fix for bug #462515
2677         * ecore.cs: Report inacessible members upwards.
2678
2679 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2680
2681         A fix for bug #463190, #463192
2682         * decl.cs, namespace.cs: Also import internal extension classes.
2683
2684 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2685
2686         A fix for bug #463415
2687         * generic.cs: Use right index for RemoveDependentTypes.
2688
2689 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2690
2691         A fix for bug #463196
2692         * expression.cs: Fixed enum to null comparison.
2693
2694 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2695
2696         A fix for bug #463121
2697         * nullable.cs: Fixed nullable user equality operator comparison.
2698
2699 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2700
2701         A fix for bug #462950
2702         * class.cs, decl.cs: Use full explicit name when defining automatic
2703         property backing field.
2704
2705 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2706
2707         A fix for bug #462592
2708         * pending.cs: Emit type arguments for generic proxy method.
2709
2710 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2711
2712         * expression.cs (As): Mutate all type arguments.
2713
2714 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2715
2716         A fix for bug #462622
2717         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2718         context.
2719
2720 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2721
2722         A fix for bug #450782
2723         * ecore.cs: Consider more variables of form V.I to be fixed.
2724
2725 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2726
2727         A fix for bug #460712
2728         * typemanager.cs: Core types could be imported.
2729
2730 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2731
2732         A fix for bugs #460847, #460772, #458049, #457339, #447807
2733         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2734         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2735         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2736         user lambdas used inside query clauses.
2737
2738 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2739
2740         A fix for bug #460229
2741         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2742
2743 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2744
2745         A fix for bug #459952
2746         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2747
2748 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2749
2750         A fix for bug #459630
2751         * convert.cs: Enum to valuetype conversion is not allowed.
2752
2753 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2754
2755         A fix for bug #457087
2756         * generic.cs: Don't crash when constraint comes from type
2757         declaration.
2758
2759 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2760
2761         A fix for bug #459221
2762         * anonymous.cs, statement.cs: Delay only captured this
2763         initialization.
2764
2765 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2766
2767         A fix for bug #457489
2768         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2769         and initialization to capture scope initializers correctly.
2770
2771 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2772
2773         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2774         ParameterReference refactoring.
2775
2776 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2777
2778         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2779         to be imported from any assembly.
2780
2781 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2782
2783         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2784         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2785         from anonymous method and lambda expression.
2786
2787 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2788
2789         A fix for bug #448560
2790         * expression.cs (As): Box any generic type arguments to be
2791         verifiable.
2792
2793 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2794
2795         Add tripwire for implicit conversion bugs
2796         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2797         for CS1501 error.
2798         (MethodGroupExpr.OverloadResolve): Add sanity check between
2799         IsApplicable and VerifyArgumentsCompat.
2800         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2801
2802 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2803
2804         Fix build break in System.Data_test
2805         * convert.cs (ImplicitConversionExists): Move NullLiteral
2806         conversions ...
2807         (ImplicitStandardConversionExists): ... here.
2808
2809 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2810
2811         * literal.cs: Emit correctly explicit null to nullable cast.
2812
2813 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2814
2815         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2816         resolve.
2817
2818 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2819
2820         A fix for bug #449005
2821         * convert.cs, nullable.cs: Use only one implicit nullable
2822         conversion.
2823
2824 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2825
2826         * convert.cs, literal.cs: More Convert cleanup is needed.
2827
2828 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2829
2830         * decl.cs, class.cs: Fixed misleading error message.
2831
2832 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2833
2834         A fix for bug #449005
2835         * nullable.cs (EmitEquality): Disable optimization for user operator
2836         operands.
2837
2838 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2839
2840         A fix for bug #447027
2841         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2842         with context variables stored as expression instances.
2843
2844 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2845
2846         A fix for bug #447027
2847         * delegate.cs: Fixed delegate VerifyMethod logic.
2848
2849 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2850
2851         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2852         but not verifiable.
2853
2854 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2855
2856         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2857         member type resolve to follow normal flow, instead of random
2858         property access.
2859
2860 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2861
2862         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2863         type.
2864
2865 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2866
2867         * const.cs: Emit decimal array constant as literal.
2868
2869 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2870
2871         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2872
2873 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2874
2875         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2876         into real property (saves 8 MB for corlib compilation).
2877
2878 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2879
2880         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2881         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2882         generic-mcs.cs: Small cleanup of TypeArguments.
2883
2884 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2885
2886         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2887         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2888         of ConstructedType expression, renamed to GenericTypeExpr.
2889
2890 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2891
2892         A fix for bug #445303
2893         * location.cs (IsConditionalDefined): Handle undefined global
2894         defines.
2895
2896 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2897
2898         A fix for bug #444678
2899         * expression.cs (TryReduceConstant): Always create new constant
2900         instance.
2901
2902 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2903
2904         A fix for bug #444673
2905         * ecore.cs: Ignore open generic types when used as generic type
2906         instance fields.
2907
2908 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2909
2910         A fix for bug #445458
2911         * expression.cs, cs-parser.jay: Don't crash when an expression
2912         statement is null.
2913
2914 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2915
2916         A fix for bug #445464
2917         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2918         inside unbound type.
2919
2920 2008-11-14  Jb Evain  <jbevain@novell.com>
2921
2922         * driver.cs: ignore empty -nowarn argument such as
2923         the one in -nowarn:12,13,,.
2924
2925 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2926
2927         A fix for bug #444271
2928         * anonymous.cs: Rescan parent storeys when best candidate was
2929         undone.
2930
2931 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2932
2933         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2934         useless UnboundTypeExpression.
2935         
2936         * attribute.cs: Do check obsolete attribute on generic types.
2937
2938 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2939
2940         A fix for bugs #425680, #400139
2941         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2942         refactoring.
2943
2944 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2945
2946         A fix for bug #435747
2947         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2948         compound value types assignment. Few micro optimizations added.
2949
2950 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2951
2952         A fix for bug #442610
2953         * anonymous.cs (MutateConstructor): More SRE hacking.
2954
2955 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2956
2957         A fix for bug #442579
2958         * ecore.cs: Also initialize expanded form of a method with 1 params
2959         parameter.
2960
2961 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2962
2963         * expression.cs (UnaryMutator): Do early l-side check.
2964
2965 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2966
2967         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2968         Init, otherwise we would crash later on when checking for friend
2969         assemblies. 
2970
2971         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2972         Otherwise we never get any meaningful information as to what
2973         failed. 
2974
2975 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2976
2977         A fix for bug #436318
2978         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2979
2980 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2981
2982         * namespace.cs: Turns out that it was a really bad idea to hide
2983         the errors for namespaces not found here in eval mode.    
2984
2985         * eval.cs: When we process using clauses, only enter those into
2986         the list of valid using clauses after they have been validated.   
2987
2988         The above change gives the proper semantics: it does not
2989         senselessly report the same errors with broken using statements by
2990         never storing them in the first place when they are invalid.
2991
2992 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2993
2994         A fix for bug #421839
2995         * cs-parser.jay: Remove expression from coalesce rule to force lower
2996         priority than the assignment operator.
2997
2998 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2999
3000         A fix for bug #437875
3001         * nullable.cs: Compile correctly method group operand used with null
3002         coalescing operator.
3003
3004 2008-11-04  Marek Safar  <marek.safar@gmail.com>
3005
3006         A fix for bug #434589
3007         * expression.cs (Binary): Ignore lifted conversions when at least
3008         one operand is of reference type.
3009
3010 2008-11-04  Marek Safar  <marek.safar@gmail.com>
3011
3012         * cs-parser.jay: Better syntax error report.
3013
3014 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3015
3016         A fix for bug #436792
3017         * cs-parser.jay: Use GetLocation to access location.
3018
3019 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3020
3021         A fix for bug #440774
3022         * cs-parser.jay: Also set current_array_type when parsing local
3023         variables types.
3024
3025 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3026
3027         A fix for bug #440785
3028         * expression.cs (As): Don't resolve self modifing expression
3029         multiple times.
3030
3031 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3032
3033         A fix for bug #439447
3034         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
3035
3036 2008-11-03  Marek Safar  <marek.safar@gmail.com>
3037
3038         A fix for bug #437571
3039         * cs-parser.jay: Fixes internal error for invalid expression
3040         statements.
3041
3042 2008-10-17  Marek Safar  <marek.safar@gmail.com>
3043
3044         * ecore.cs: Resolve correctly ambiguous params delegate methods.
3045
3046 2008-10-17  Marek Safar  <marek.safar@gmail.com>
3047
3048         * generic.cs, anonymous.cs: Simplified GetDeclarations.
3049
3050 2008-10-17  Marek Safar  <marek.safar@gmail.com>
3051
3052         * cs-tokenizer.cs: More precise cast parsing.
3053
3054 2008-10-16  Martin Baulig  <martin@ximian.com>
3055
3056         * anonymous.cs (AnonymousMethodStorey): Put back the
3057         `hoisted_locals' hashtable and use it in EmitType().
3058
3059 2008-10-15  Marek Safar  <marek.safar@gmail.com>
3060
3061         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
3062         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
3063         ~5MB for corlib.
3064
3065 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3066
3067         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
3068
3069 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3070
3071         * statement.cs: Mutate scope initializers.
3072
3073 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3074
3075         * expression.cs: Use typeless value for This constant.
3076         
3077         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
3078
3079 2008-10-14  Marek Safar  <marek.safar@gmail.com>
3080
3081         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
3082         tokenizer.
3083
3084 2008-10-13  Marek Safar  <marek.safar@gmail.com>
3085
3086         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
3087         type to type cast.
3088
3089 2008-10-13  Marek Safar  <marek.safar@gmail.com>
3090
3091         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
3092         parser and tokenizer. Fixes many ambiguities including #433258.
3093
3094 2008-10-10  Marek Safar  <marek.safar@gmail.com>
3095
3096         * cs-parser.jay: Fixed missing accessor recovery.
3097
3098 2008-10-10  Marek Safar  <marek.safar@gmail.com>
3099
3100         A fix for bug #433701
3101         * expression.cs: Better error message.
3102
3103 2008-10-10  Marek Safar  <marek.safar@gmail.com>
3104
3105         * cs-parser.jay, expression.cs: Start reporting real parser errors.
3106         
3107         * Makefile: Disabled unused debug symbols.
3108
3109         Also fixes: #320556, #321097, #321656, #321876, #351316
3110
3111 2008-10-09  Miguel de Icaza  <miguel@novell.com>
3112
3113         * eval.cs: rename "<interactive>" to "{interactive}", to work
3114         around a requirement in the compiler that this be a valid
3115         filename, and in Windows it is not (433886).
3116
3117 2008-10-09  Marek Safar  <marek.safar@gmail.com>
3118
3119         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
3120
3121 2008-10-08  Marek Safar  <marek.safar@gmail.com>
3122
3123         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
3124         cs-parser.jay: Generic type declaration and type arguments cleanup.
3125
3126 2008-10-05  Marek Safar  <marek.safar@gmail.com>
3127
3128         * cs-parser.jay: Allow parsing weird array creation construct.
3129
3130 2008-10-05  Marek Safar  <marek.safar@gmail.com>
3131
3132         * cs-parser.jay: Conflicts reduction.
3133
3134 2008-10-04  Marek Safar  <marek.safar@gmail.com>
3135
3136         * cs-parser.jay: Conflicts reduction.
3137
3138 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
3139
3140         Fix #398325
3141         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
3142         property.  Add a 'count' hint about the use of the shared vector.
3143         Ensure that we don't leak out dirty bits.
3144         (UsageVector.MergeChild): Throw away information about variables
3145         in child vectors.
3146         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
3147
3148 2008-10-03  Marek Safar  <marek.safar@gmail.com>
3149
3150         A fix for bug #431746
3151         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
3152         parameters when iterator is created.
3153
3154 2008-10-03  Marek Safar  <marek.safar@gmail.com>
3155
3156         A fix for bug #431827
3157         * expression.cs: Fixed right based pointer arithmetic operations
3158         emit.
3159
3160 2008-10-03  Marek Safar  <marek.safar@gmail.com>
3161
3162         A fix for bug #353779
3163         * assign.cs, expression.cs: Fixed compound assignment conversions.
3164
3165 2008-10-02  Marek Safar  <marek.safar@gmail.com>
3166
3167         A fix for bug #375262
3168         * statement.cs: Refactor ArrayForeach to be usable with string
3169         indexer. Optimized single dimentional arrays foreach.
3170
3171 2008-10-02  Marek Safar  <marek.safar@gmail.com>
3172
3173         A fix for bug #431255
3174         * anonymous.cs, expression.cs: Removed broken optimization.
3175
3176 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3177
3178         * anonymous.cs: Use full type parameters of parent generic
3179         containers. Removed unnecessary AddParentStoreyReference call.
3180
3181 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3182
3183         A fix for bug #324702
3184         * class.cs: Use better shorter names for explicit interface member
3185         implementations.
3186
3187         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
3188
3189 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3190         
3191         * expression.cs: Use new interface to check fixed expression.
3192
3193 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3194
3195         A fix for bug #421101
3196         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
3197         interface to check for fixed fixed-buffers.
3198
3199 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3200
3201         A fix for bug #429264
3202         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
3203         
3204         * delegate.cs: Removed unnecessary casts.
3205
3206 2008-09-30  Marek Safar  <marek.safar@gmail.com>
3207
3208         A fix for bug #352151
3209         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
3210         class.cs: Fixed already defined explicit interface members check.
3211
3212 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3213
3214         cs-tokenizer.cs: Fix typo.
3215
3216 2008-09-28  Miguel de Icaza  <miguel@novell.com>
3217
3218         * eval.cs (InteractiveBase): The quit command now just sets a
3219         flag, instead of calling Environment.Exit(), it is milder on
3220         embedded hosts. 
3221
3222         CompiledMethod is now in Mono.CSharp, not nested inside
3223         the Evaluator, it was inconvenient to use.
3224
3225 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3226
3227         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
3228         code to be invoked without having to reparse.
3229
3230 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3231
3232         * ecore.cs: The recent changes to FieldExpr broke this as well.
3233         Fixes LINQ queries in the interactive shell.
3234
3235         * Multiple files: indentation fixing for the Mono coding
3236         guidelines for the switch statement.
3237
3238         * eval.cs: Make the Evaluator API thread safe.
3239
3240 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3241
3242         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
3243         constructor parsing.
3244
3245 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3246
3247         A fix for bug #325326
3248         * statement.cs: Check possible mistaken empty statement using
3249         explicit blocks only.
3250
3251 2008-09-25  Miguel de Icaza  <miguel@novell.com>
3252
3253         * eval.cs (LoadAssembly, ReferenceAssembly): Call
3254         RootNamespace.ComputeNamespaces to update the internal list of
3255         namespaces, this is no longer done for us.
3256
3257         (InteractiveBase): Use the Evaluator APIs instead of calling into
3258         Driver directly
3259
3260 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3261
3262         A fix for bug #429264
3263         * expression.cs: Missing mutator for access to multidimensional
3264         arrays.
3265
3266 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3267
3268         * class.cs, statement: Emit DebuggerHidden attribute for iterator
3269         entry wrapper.
3270         
3271         * driver.cs: Missing input argument check.
3272
3273 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3274
3275         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
3276         expression.cs, statement.cs, rootcontext.cs, class.cs, 
3277         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
3278         DefineMembers.
3279
3280 2008-09-24  Miguel de Icaza  <miguel@novell.com>
3281
3282         * ecore.cs (FieldExpr): Only initialize eclass when we return a
3283         fully constructed FieldExpr, fixes the regression introduced in
3284         the last commit.
3285         
3286         * ecore.cs, expression.cs: Plug back the eclass initialization as
3287         otherwise it regresses `csharp'. 
3288
3289 2008-09-24  Marek Safar  <marek.safar@gmail.com>
3290
3291         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
3292         ecore.cs, attribute.cs: Moved obsolete method checks from emit
3293         phase to resolve phase. It resolves problems with expression trees
3294         and fixes bugs #323796, #325156.
3295
3296 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3297
3298         * codegen.cs: Report better error when symbol writer is missing.
3299
3300 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3301
3302         * codegen.cs: Set .NET symbol writer.
3303         
3304         * decl.cs: Guard against null generic arguments.
3305         
3306         * report.cs: Don't report exactly same additional details.
3307
3308 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3309
3310         A fix for bug #324917
3311         * cs-parser.jay: Add missing multidimensional non-expression type
3312         ranks.
3313         
3314 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3315
3316         A fix for bug #428191
3317         * anonymous.cs: Create an outer generic fields also for non-storey
3318         anonymous methods.
3319
3320 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3321
3322         A fix for bug #378294
3323         * class.cs: Make fixed size buffers gmcs feature only.
3324
3325 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3326
3327         A fix for bug #355622, #324993
3328         * assign.cs, const.cs, class.cs: Create new EmitContext for each
3329         field initializer.
3330
3331 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3332
3333         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
3334         error reporting.
3335
3336 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3337
3338         A fix for bug #416110
3339         * generic.cs: Struct constraint results in default ctor and
3340         ValueType base type constraint to be set.
3341
3342 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3343
3344         A fix for bug #423791
3345         * generic.cs: Fixed params output type type-inference.
3346
3347 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3348
3349         * cs-parser.jay, expression.cs: Fixed few expression crashes.
3350         
3351 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3352
3353         * cs-tokenizer.cs: Don't break on extra partial modifier.
3354
3355 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3356
3357         A fix for bug #427592
3358         * generic.cs: Use common parameter resolve method.
3359
3360 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3361
3362         A fix for bug #414758
3363         * expression.cs, ecore.cs: Fixed crash when accessing non-static
3364         property.
3365
3366 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3367
3368         * driver.cs, namespace.cs: Read types and namespaces after all
3369         requested assemblies are loaded, fixes issues with System.Core
3370         auto-reference, and #419888.
3371
3372 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3373
3374         A fix for bug #417705
3375         * cs-parser.jay: Fixed as/is operator expression split.
3376
3377 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3378
3379         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
3380         Fixed expression tree representation of empty new expression and
3381         new initializer expression.
3382
3383 2008-09-18  Miguel de Icaza  <miguel@novell.com>
3384
3385         * eval.cs: Remove warning, keep reference to driver around.
3386
3387         * Hide fields that do not need to be public.
3388
3389 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3390
3391         A fix for bug #426385
3392         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
3393         conversion for array elements.
3394
3395 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3396
3397         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
3398         void parsing conflicts.
3399
3400 2008-09-15  Marek Safar  <marek.safar@gmail.com>
3401
3402         A fix for bug #425601
3403         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
3404         System.Core only when there is no custom ExtensionAttribute
3405         implementation.
3406
3407 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3408
3409         * namespace.cs: Do not report CS0246 (name
3410
3411 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3412
3413         A fix for bug #425669
3414         * generic.cs: Don't cache generic static anonymous method 
3415         containers.
3416
3417 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3418
3419         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3420         conflicting constraints.
3421
3422 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3423
3424         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3425         mcs too.
3426
3427 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3428
3429         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3430         to null pointer conversion fixes.
3431
3432 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3433
3434         * cs-parser.jay, expression.cs: An implicitly typed local variable
3435         declarator cannot use an array initializer.
3436
3437 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3438
3439         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3440
3441 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3442
3443         * generic.cs (InflatedConstraints): Don't crash when constraints
3444         are different.
3445         
3446         * cs-parser.jay: const_declarator is a block.
3447
3448         * constant.cs: Check for not allowed NaN conversions.
3449
3450 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3451
3452         * driver.cs: Drop --shell argument, the compiler is no longer a
3453         REPL. 
3454
3455         * eval.cs: Move most of the code that deals with evaluation into
3456         this file and document the public API from repl.cs
3457
3458         * repl.cs: Remove from here.
3459         
3460 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3461
3462         A fix for bug #424684
3463         * generic.cs: Generic class constraints must come first.
3464
3465 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3466
3467         * cs-parser.jay: Improve error reporting for syntax errors in
3468         statements and expressions, we now report the expected tokens
3469         instead of reporting the useless "; expected".
3470
3471         Drop the strings from the token declaration, it turns out that
3472         they did not do what I thought they did.  Instead they were adding
3473         two sets of tokens to the tables.
3474
3475 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3476
3477         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3478         delegate.cs: Share special type check.
3479
3480 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3481
3482         A fix for bug #423981
3483         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3484
3485 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3486
3487         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3488         ConvertImplicitly.
3489
3490 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3491
3492         A fix for bugs: #324750, #335946
3493         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3494         lookup rule to determine ?-based tokens.
3495
3496 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3497
3498         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3499         expressions (like event adding or removing) end up here, so we
3500         need to treat those as statements.
3501
3502         Add LoadAssembly method.
3503
3504 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3505
3506         * repl.cs: Add Time method.
3507
3508 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3509
3510         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3511
3512 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3513
3514         * repl.cs: Add workaround for old compilers.
3515
3516 2008-09-04  Jb Evain  <jbevain@novell.com>
3517
3518         * repl.cs (PrettyPrint): pretty print everything that
3519         implements IDictionary, as well as IEnumerables. Also,
3520         add a quit helper property.
3521
3522 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3523
3524         * constant.cs: Better error reporting for decimal literals.
3525         
3526         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3527         field attributes.
3528         
3529 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3530                         Miguel de Icaza  <miguel@novell.com>
3531
3532         A fix for bug #422951
3533         * assign.cs (Assign.DoResolve): Perform the type conversions
3534         checks before we attempt to initialize `New' initializers. 
3535
3536 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3537
3538         A fix for bug #422853
3539         * delegate.cs (DelegateCreation): Add special handling for
3540         EmptyExpression.Null instance expression which is just another
3541         hack for undecided member instance exression.
3542
3543 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3544
3545         * expression.cs, ecore.cs: Emit full expression tree for reduced
3546         binary expressions.
3547
3548 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3549
3550         * expression.cs (This): Guard against multi-resolving.
3551         
3552         * ecore.cs, statement.cs (Throw): Simplified.
3553         
3554         * flowanalysis.cs: Also verify event fields.
3555
3556 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3557
3558         * assign.cs (Assign.DoResolve): Perform the type conversions
3559         checks before we attempt to initialize `New' initializers. 
3560
3561         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3562
3563         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3564         public. 
3565
3566         * repl.cs: Update help.
3567
3568 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3569
3570         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3571         handling of the default config handling, including the special
3572         treatment of System.Core assembly. 
3573
3574         Fixes the REPL processing for LINQ.
3575
3576 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3577
3578         A fix for bug #422507
3579         * expression.cs (UnboxCast): Add missing child expression mutator.
3580
3581 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3582
3583         * driver.cs: Don't self reference System.Core assembly.
3584
3585 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3586
3587         A fix for bug #422507
3588         * expression.cs (StringConcat): Add missing type mutator.
3589
3590 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3591
3592         * generic.cs (TypeInferenceContext): Follow equality rule for
3593         constructed type lower bound type inference.
3594
3595 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3596
3597         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3598         <dblank@cs.brynmawr.edu> which updates the cursor position on
3599         refresh.
3600         
3601 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3602
3603         A fix for bug #367145
3604         * driver.cs: Fixed import of extension methods when using -noconfig
3605         option.
3606
3607 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3608
3609         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3610         version from non-generic implementation instead.
3611
3612 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3613
3614         A fix for bug #418908
3615         * class.cs: Use AddScopeStatement for field initializers.
3616
3617 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3618
3619         A fix for bug #415385
3620         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3621
3622 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3623
3624         A fix for bug #421736
3625         * iterators.cs: Don't crash on unreachable iterators.
3626
3627 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3628
3629         A fix for bug #421628
3630         * parameter.cs, attribute.cs: Clone also parameter attributes.
3631
3632 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3633
3634         * namespace.cs (LookupType): In EvalMode, try to replace
3635         the TypeBuilder from our cache with a Type as Reflection.Emit does
3636         not  like to mix code from older assemblies emitted and new
3637         assemblies emitted. 
3638
3639         This sounds like a serious Mono bug that prevents multiple
3640         assemblies to be generated and consumed at the same time.
3641
3642         * cs-parser.jay (push_current_class): Do not make interactive
3643         classes internal or private, make them public as we currently
3644         generate each new class in a new assembly.   
3645
3646 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3647
3648         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3649         remove types that are entered into the global namespace during
3650         parsing so that we can remove them on failure.
3651  
3652         * cs-parser.jay: Parsing: we now keep track of types that are
3653         entered into global variables and queue those in case the parsing
3654         or resolution fail.
3655  
3656         This happens in a few situations: during partial-input, we invoke
3657         the parser repeatedly for example with the string "class X", this
3658         would cause X to be registed, and we need to remove this
3659         registration so that another parse attempt later with say "class X {"
3660         would actually work.
3661  
3662         Additionally, if there is an error in the resolution phase, for
3663         example: "class X : NonExistant {}" th
3664         
3665         * cs-parser.jay: Be more precise with the errors being raised,
3666         instead of flagging all exceptions during parsing to be attributed
3667         to the parsing process, distinguish those from errors happening in
3668         the actions and hint that using -v would produce the actual
3669         exception. 
3670
3671         * repl.cs: Do not load all compiler references on each reset,
3672         doing the partial reset takes care of this.
3673         
3674 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3675
3676         * repl.cs: Add support for loading all the files from
3677         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3678         as shell libraries.
3679
3680         Introduce a micro-parser that is able to deambiguate on its input
3681         whether we are dealing with a compilation unit (namespace, class,
3682         interface, struct, delegate) declaration or a statement.   This
3683         allows both declarations and statements to be entered. 
3684
3685         Set history size by default to 300 lines.
3686
3687         Instead of distinguishing based on the parser.InteractiveResult,
3688         have only two cases: statements were parsed, or a compilation unit
3689         was.   Always pull the Using statement additions from the
3690         compilation unit parse.
3691         
3692         * cs-tokenizer.cs: Rename tokens to better describe their intent
3693         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3694         
3695         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3696         EvalMode is used to trigger the lookup of global variables while
3697         StatementMode is used turn variable declarations into static
3698         fields.
3699
3700         * getline.cs: Allow history size to be set.
3701         
3702 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3703
3704         A fix for bug #360755
3705         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3706
3707 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3708
3709         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3710         
3711         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3712         member name, it is too confusing
3713         
3714         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3715         
3716         * rootcontext.cs: Finally default to warning level 4.
3717
3718 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3719
3720         * class.cs (CheckBase): Ignore overloaded operators.
3721
3722 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3723
3724         A fix for bug #420830
3725         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3726
3727 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3728
3729         A fix for bug #420832
3730         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3731
3732 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3733
3734         A fix for bug #420386
3735         * nullables.cs: Fixed logic of nullable user comparison operators involving
3736         null values.
3737
3738 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3739         
3740         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3741
3742 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3743
3744         * repl.cs: Add support for aborting the running code with C-c. 
3745
3746 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3747
3748         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3749
3750 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3751
3752         * cs-parser.jay (interactive_statement_list): A new set of rules
3753         for hosting statements that uses the "interactive_" prefix.   
3754
3755         * repl.cs: Add support for parsing `using' as a statement or as a
3756         directive.  Deambiguating before passing this to the parser.
3757
3758         We need to distinguish statement_expressions that occur at the
3759         toplevel vs those that occur embedded into expressions.
3760
3761         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3762         that fixes the cursor key handling, and a history bug.
3763         
3764 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3765
3766         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3767         limitations in Console, instead the 2.0 bootstrap libraries now
3768         include the Console bits.
3769
3770         Also, remove the use of Nullables from getline.cs
3771
3772         ------------
3773         
3774         Interactive support for the C# compiler.   Use gmcs --shell to
3775         enter a read-eval-print loop shell.
3776
3777         Docs: http://www.mono-project.com/CsharpRepl
3778         
3779         * sources: include repl.cs here and getline.cs for gmcs.exe,
3780         everything else is getline.cs impaired.
3781
3782         * Makefile: when bootstrapping pass a special flag
3783         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3784         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3785         This distinguishes those two cases.
3786
3787         * repl.cs: Support for a read-eval-print loop.   Will be soon
3788         refactored into eval support and then REPL on top of it.
3789
3790         * ecore.cs: If a simplename lookup fails, before erroring out,
3791         if we are in EvalMode to resolve the name to a declaration in the
3792         Eval-land.    
3793
3794         This means that variable declarations that happened in previous
3795         classes (as repl puts every statement in a separate class) are
3796         made visible in this way.
3797
3798         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3799         triggered an error due to the end of file being reached.   This is
3800         used to do multi-line input, and notify the caller that the user
3801         needs to provide more text before a successful parse.
3802
3803         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3804         to drive the evaluation with a custom wrapper. 
3805
3806         * driver.cs: Add support for --shell, and refactor some code to be
3807         reused from repl.cs
3808         
3809         * namespace.cs: Add support for serializing the contents of the
3810         namespaces and reloading them.  
3811
3812         * getline.cs: A managed implementation of ReadLine under
3813         X11/Apache2 license terms.  Easy to embed in other applications as
3814         well.
3815
3816         * namespace.cs: Add some functions to save and restore the
3817         namespace state.
3818
3819         * rootcontext.cs: New public field.
3820
3821         * cs-tokenizer.cs: Add support for one of the possible characters
3822         we introduce into the token stream.  
3823
3824         This patch does not affect the regular tokenization process, the
3825         only performance hit would happen if there is an invalid character
3826         on the input string.
3827
3828         * support.cs: Move isatty helper routine here.
3829
3830         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3831         code generator for in-memory assemblies.
3832
3833 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3834
3835         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3836         parameter cannot be always used as a type.
3837
3838 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3839
3840         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3841
3842 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3843
3844         * convert.cs: Implement explicit array to IList<T> conversion.
3845
3846 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3847
3848         A fix for bug #362740
3849         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3850
3851 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3852         
3853         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3854         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3855         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3856         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3857         handling to use just one type of infrastructure and deal with generics
3858         more effectivelly.
3859
3860 2008-07-23  Martin Baulig  <martin@ximian.com>
3861
3862         *** Merged this from trunk revision 108527 ***
3863
3864         * statement.cs
3865         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3866         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3867         scope variable.
3868
3869 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3870         
3871         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3872         error checks.
3873
3874 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3875         
3876         * delegate.cs: Fixed compiler crash when creating delegate using partial
3877         method.
3878         
3879         * typemanager.cs: MulticastDelegate is not a delegate.
3880
3881 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3882         
3883         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3884         checks.
3885
3886 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3887
3888         * cs-parser.jay (type): Allow 'var' in mcs too.
3889         (local_variable_type): Likewise.
3890
3891 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3892         
3893         * driver.cs: Removed broken -noconfig variants.
3894
3895 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3896         
3897         A fix for bug #417078
3898         * expression.cs: Emit correctly left side pointer operators.
3899
3900 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3901
3902         * generic.cs, lambda.cs: Inflate method generic arguments only.
3903
3904 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3905
3906         * class.cs: Fixed struct layout check regression.
3907
3908 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3909
3910         * cs-parser.jay, enum.cs: Simplified enum parsing.
3911         
3912         * decl.cs: Check all type parameters conflicts.
3913         
3914         * expression.cs, statement.cs, attribute.cs: More expression checks.
3915
3916 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3917
3918         * generic.cs: Add type inference types restriction.
3919         
3920         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3921         anonymous.cs, expression.cs: Allocate less accessor parameters.
3922
3923 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3924
3925         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3926         classes.
3927
3928 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3929
3930         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3931
3932 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3933
3934         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3935         Also fixes #362146 and #381592.
3936
3937 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3938
3939         * ecore.cs: Reduced constant cannot be used as an attribute value.
3940         
3941         * cs-parser.jay: Base expression has to be a type.
3942         
3943         * expression.cs (Conditional): Uses ReducedExpression.
3944
3945 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3946
3947         A fix for bug #376826
3948         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3949         address of hoisted local variable or parameter cannot be taken.
3950
3951 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3952
3953         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3954         anonymous method inside checked/unchecked expression.
3955
3956 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3957
3958         * typemanager.cs (IsEqual): Guard against null.
3959         
3960         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3961         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3962         routine. Fixed few misleading conversion errors.
3963
3964 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3965
3966         * class.cs: Consider generics when checking cycles in struct layout.
3967
3968 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3969
3970         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3971
3972 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3973
3974         A fix for bug #414165
3975         * anonymous.cs: Use same anonymous implementation method for all anonymous
3976         method emits.
3977
3978 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3979
3980         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3981         constraints.
3982
3983 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3984
3985         * cs-parser.jay: Typeof argument has to be a type expression.
3986         
3987         * namespace.cs: Check alias and namespace definitions collisions.
3988         
3989         * class.cs, pending.cs: Moved explicit interface accessor implementation
3990         check.
3991         
3992         * delegate.cs, expression.cs: Verify special name invocations.
3993         
3994 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3995
3996         * cs-parser.jay: Don't choke on empty generic type arguments.
3997         
3998         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3999         
4000         * expression.cs, ecore.cs: Minor expressions bugs.
4001
4002 2008-08-01  Marek Safar  <marek.safar@gmail.com>
4003
4004         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
4005         and added more error handling.
4006         
4007         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
4008         
4009         *  modifiers.cs, enum.cs: Fixed.
4010
4011 2008-07-31  Jb Evain  <jbevain@novell.com>
4012
4013         * driver.cs: remove -pkg ability of smcs.
4014
4015 2008-07-30  Marek Safar  <marek.safar@gmail.com>
4016
4017         * statement.cs (Switch): Correctly set empty default target for single
4018         blocks.
4019
4020 2008-07-30  Marek Safar  <marek.safar@gmail.com>
4021
4022         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
4023         string switch statement implementation to use string dictionary which
4024         significantly (2-8x) improves performance of generated code.
4025
4026 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4027
4028         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
4029         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
4030         
4031 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4032
4033         A fix for bug #412595
4034         * typemanager.cs, convert.cs, expression.cs: Some types are never
4035         convertible to each other.
4036
4037 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4038
4039         * nullable.cs (CreateNullConstant): An error messages update.
4040
4041 2008-07-29  Marek Safar  <marek.safar@gmail.com>
4042
4043         A fix for bug #412595
4044         * cfold.cs: Don't cast undefined bool constant.
4045
4046 2008-07-29  Martin Baulig  <martin@ximian.com>
4047
4048         * symbolwriter.cs
4049         (SymbolWriter.Reset): New public static method.
4050
4051         * driver.cs
4052         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
4053
4054 2008-07-28  Marek Safar  <marek.safar@gmail.com>
4055
4056         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
4057         
4058         * expression.cs (ElementAccess): Exact size allocation.
4059
4060 2008-07-26  Marek Safar  <marek.safar@gmail.com>
4061
4062         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
4063
4064 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4065
4066         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
4067         
4068         * class.cs: Removed $PRIVATE$ field hack which caused problems during
4069         flow analysis.
4070
4071 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4072
4073         A fix for bug #412217
4074         * assign.cs: Mutate also assignment type.
4075
4076 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4077
4078         A fix for bug #323644
4079         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
4080         indexers.
4081
4082 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4083
4084         A fix for bug #412134
4085         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
4086         non-enumerable operands when overloading equality or bitwise operators.
4087
4088 2008-07-25  Marek Safar  <marek.safar@gmail.com>
4089
4090         * anonymous.cs: Cache closed generic anonymous method delegates.
4091
4092 2008-07-24  Marek Safar  <marek.safar@gmail.com>
4093
4094         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
4095         anonymous.cs, statement.cs: Always emit anonymous method as static method
4096         when is instance free. Use nesting for nested anynomous methods blocks.
4097         
4098 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4099
4100         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
4101         types.
4102
4103 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4104
4105         * expression.cs: Removed MakeSimpleCall.
4106
4107 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4108
4109         A fix for bug #323012
4110         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
4111         Base method implementing interface has to be public.
4112
4113 2008-07-23  Marek Safar  <marek.safar@gmail.com>
4114
4115         * cs-parser.jay: Don't break on missing argument.
4116
4117 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4118
4119         A fix for bug #320993
4120         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
4121           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
4122
4123 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4124
4125         A fix for bug #320748
4126         * convert.cs: Implicit user operators cannot convert to interfaces
4127
4128 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4129
4130         A fix for bug #312686
4131         * driver.cs: Ignore empty assembly references.
4132
4133 2008-07-22  Marek Safar  <marek.safar@gmail.com>
4134
4135         A fix for bug #387040
4136         * ecore.cs: Skip constrains check for an explicit implementation.
4137
4138 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4139
4140         A fix for bug #409045
4141         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
4142           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
4143           identifiers are file specific unless passed as input arguments.
4144
4145 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4146
4147          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
4148          to emit UnmanagedMarshal data under 2.0 profile.
4149
4150 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4151
4152         A fix for bug #410369
4153         * parameter.cs: Clone correctly ParamsParameter.
4154
4155 2008-07-21  Marek Safar  <marek.safar@gmail.com>
4156
4157         * expression.cs (Argument): Always report type for type based expressions
4158         errors.
4159
4160 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4161
4162         A fix for bug #410666
4163         * anonymous.cs: Correctly initialize generic storey reference.
4164
4165 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4166
4167         * convert.cs: Don't box same type arguments.
4168
4169 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4170
4171         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
4172         Finished missing generic type mutators.
4173
4174 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4175
4176         * iterators.cs, statement.cs: Finished statements CloneTo.
4177
4178 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4179
4180         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
4181         
4182         * expression.cs: Emit optimized default value expressions in expression tree
4183         array initializer.
4184
4185 2008-07-18  Marek Safar  <marek.safar@gmail.com>
4186
4187         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
4188
4189 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4190
4191         A fix for bug #367536
4192         * cs-parser.jay: Check static constructor of generic types for an access
4193         modifier.
4194
4195 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4196
4197         A fix for bug #353800
4198         * lambda.cs: Emit ret for contextual statements.
4199         
4200         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
4201         up emitting redundant ret for all anonymous methods with return.
4202
4203 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4204
4205         A fix for bug #365188
4206         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
4207         create anonymous method storey in unreachable block.
4208
4209 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4210
4211         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
4212         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
4213         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
4214         statement.cs: Fixed relevant defects found by Gendarme.
4215
4216 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4217
4218         A fix for bug #325291
4219         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
4220         statement.cs: Replaced IAnonymousHost with top level block flag.
4221
4222 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4223
4224         * cs-parser.jay: Clean up unused open_parens.
4225
4226 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4227
4228         * ecore.cs: Custom error message for a range variable assignment.
4229
4230 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4231
4232         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
4233         load.
4234
4235 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4236
4237         * literal.cs: Null literal is of object type.
4238
4239 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4240
4241         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
4242         expression of nullable equality comparison.
4243
4244 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4245
4246         * expression.cs(PointerArithmetic): Removed redundant assignment.
4247
4248 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4249
4250         * decl.cs (GetSignatureForError): Report full namespace name for containers.
4251
4252 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4253
4254         A fix for bug #408361
4255         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
4256         they are replaced by GetMethod.
4257
4258 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4259
4260         A fix for bug #408721 by jeremie.laval@gmail.com
4261         * expression.cs (Indirection): Implemented CloneTo.
4262
4263 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4264
4265         * statement.cs (AssignableSlots): Temporary disabled variable initialization
4266         assert check.
4267
4268 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4269
4270         * report.cs (EnableReporting): Don't reinitialize 0-based values.
4271
4272 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4273
4274         * linq.cs: Reset tranparent parameter counter in probing mode.
4275
4276 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4277
4278         * anonymous.cs: Mutate anonymous method type.
4279
4280 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4281
4282         * ecore.cs, anonymous.cs: Mutate field expressions.
4283
4284 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4285
4286         A fix for bug #369670
4287         * linq.cs, statement.cs: Use explicit block for query expressions variables.
4288
4289 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4290
4291         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
4292
4293 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
4294
4295         Fix bug #314902
4296         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
4297         only one '>', and finds a '>>', abort the generic lookahead.
4298
4299 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4300
4301         A fix for bug #319902
4302         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
4303
4304 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4305
4306         A fix for bug #406371
4307         * statement.cs: Moved EmitSymbolInfo to Block.
4308
4309 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4310
4311         * ecore.cs: Report better error for extension method overload failures.
4312
4313 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4314
4315         * expression.cs (Is): No need to box reference values.
4316
4317 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4318
4319         * class.cs: Use event resolve context when initializing CreateEmitContext.
4320
4321 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4322
4323         A fix for bug #394436
4324         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
4325         method used inside expression trees. Added more LINQ to expression tree
4326         conversions.
4327
4328 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4329
4330         A fix for bug #378189, #370577
4331         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
4332         from expression.
4333
4334 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4335
4336         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
4337         hierarchically.
4338
4339 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4340
4341         A fix for bug #406702
4342         * anonymous.cs: Always park anonymous method in the nearest parent storey.
4343
4344 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4345
4346         A fix for bug #406648
4347         * cs-parser.jay: Report nullable use in mcs for some cases.
4348
4349 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4350
4351         * ecore.cs: Improved argument mismatch error messages.
4352
4353 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4354
4355         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
4356
4357 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4358
4359         * expression.cs (TypeOf): Mutate type argument.
4360
4361 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4362
4363         * class.cs: Report missing partial modifier for correct type.
4364
4365 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4366
4367         * ecore.cs, expression.cs (VariableReference): Variable property is 
4368         protected.
4369
4370 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4371
4372         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
4373         
4374 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4375
4376         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
4377         method delegates.
4378
4379 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4380
4381         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
4382         anonymous method storey to an instance method when only "this" is hoisted.
4383
4384 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4385
4386         A fix for bug #321615
4387         * expression.cs: Pointer comparisons use unsigned operator.
4388
4389 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4390
4391         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
4392
4393 2008-07-02  Marek Safar  <marek.safar@gmail.com>
4394
4395         A fix for bug #404905
4396         * class.cs: Always initialize local unsafe variables.
4397
4398 2008-06-30  Marek Safar  <marek.safar@gmail.com>
4399
4400         A fix for bug #396987
4401         * expression.cs (NewInitialize): Clear local temporary variable for next run
4402
4403 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4404
4405         A fix for bug #401020
4406         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4407
4408 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4409
4410         A fix for bug #398319
4411         * cs-parser.jay: Implemented undocumented base access expression inside
4412         anonymous types.
4413
4414 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4415
4416         A fix for bug #404227
4417         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4418
4419 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4420
4421         A fix for bug #404227
4422         * convert.cs: Fixed explicit array to interface cast.
4423
4424 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4425
4426         A fix for bug #403894
4427         * delegate.cs: Mutate DelegateInvocation type.
4428
4429 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4430
4431         A fix for bug #379348
4432         * delegate.cs: Box a load of generic parameters.
4433
4434 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4435
4436         * expression.cs: Add an array creation arguments mutate.
4437
4438 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4439
4440         A fix for bug #386068
4441         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4442         parameter.
4443
4444 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4445
4446         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4447         CloneTo.
4448
4449 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4450
4451         A fix for bug #403518
4452         * delegate.cs: Type correctly anonymous method new invocation.
4453
4454 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4455
4456         A fix for bug #394826
4457         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4458         calls.
4459
4460 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4461
4462         A fix for bug #394826
4463         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4464         needed.
4465
4466 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4467
4468         * class.cs: Clone indexer parameters for localized capturing.
4469
4470 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4471
4472         A fix for bug #402379
4473         * expression.cs: Don't crash when an object initializer resolve fails.
4474
4475 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4476
4477         A fix for bug #402888
4478         * expression.cs: Mutate conditional expression.
4479
4480 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4481
4482         A fix for bug #401012
4483         * class.cs: Keep StructLayout in shared container.
4484
4485 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4486
4487         A fix for bug #400438
4488         * decl.cs, class.cs: Only properties can be automatically implemented.
4489
4490 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4491
4492         * statement.cs (ChangeToIterator): Copy also labels.
4493
4494 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4495
4496         * ecore.cs: Pass type argument details to parent extension method.
4497
4498 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4499
4500         A fix for bug #375966
4501         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4502
4503 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4504
4505         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4506
4507 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4508
4509         A fix for bug #394347
4510         * anonymous.cs: Cache compatible delegates as compatibility check produces
4511         a new method every time.
4512
4513 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4514
4515         * anonymous.cs: Propagate storey reference for single references.
4516
4517 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4518
4519         A fix for bug #387615
4520         * assign.cs, expression.cs: Correctly clone compound assignment.
4521
4522 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4523
4524         A fix for bug #359611, #359604
4525         * anonymous.cs: Mutate all types of hoisted parameters.
4526
4527 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4528
4529         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4530         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4531         expression.cs, codegen.cs, statement.cs
4532         
4533         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4534         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4535         
4536         ** Anonymous methods, lambda expressions rewrite **
4537         
4538         Anonymous expressions are now resolved when an explicit block is resolved 
4539         and they don't require any registration procedure anymore. Further,
4540         anonymous methods are defined when explicit block is emitted which allows
4541         better control of whole process and opens possibilities for more
4542         optimizations as well as alternative to reverse whole process.
4543         
4544         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4545         process consistent and to correctly emit hoisted generic methods when they
4546         have at least 1 hoisted variable.
4547         
4548 2008-06-17  Martin Baulig  <martin@ximian.com>
4549
4550         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4551         iterator method.
4552         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4553         virtual property; check it in Emit().
4554         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4555         an iterator.
4556         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4557         an iterator.
4558         (Indexer.Define): Likewise.
4559
4560 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4561
4562         * convert.cs: Don't use IsInterface on type arguments.
4563         
4564         * delegate.cs: DelegateInvocation uses MethodInfo.
4565         
4566         * parameter.cs: Removed IsTypeParameter.
4567         
4568         * generic-mcs.cs: More missing stuff.
4569
4570 2008-06-16  Martin Baulig  <martin@ximian.com>
4571
4572         * modifiers.cs
4573         (Modifiers.DEBUGGER_HIDDEN): New public const.
4574
4575         * typemanager.cs
4576         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4577
4578         * class.cs
4579         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4580         (AbstractPropertyEventMethod): Likewise.
4581         (Constructor.Emit): Likewise.
4582         (SourceMethod.SetCompilerGenerated): Removed.
4583
4584         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4585         on MoveNext().
4586
4587         * anonymous.cs
4588         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4589         if we're an `IteratorHost'.
4590         (AnonymousMethodMethod..ctor): Don't set
4591         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4592         not on the method.
4593
4594 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4595
4596         * statement.cs: Clean-up foreach statements.
4597
4598 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4599
4600         * class.cs: Stop using public method which should not exist
4601         (MethodBuilder.SetGenericMethodSignature).
4602
4603 2008-06-11  Martin Baulig  <martin@ximian.com>
4604
4605         * location.cs
4606         (Location.LookupFile): Add `CompilationUnit' argument; when given
4607         a relative file name, make it relative to the directory the .cs
4608         file is located in instead of using the current directory.
4609
4610 2008-06-11  Martin Baulig  <martin@ximian.com>
4611
4612         * class.cs
4613         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4614         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4615         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4616         (SourceMethod.SetCompilerGenerated): Likewise.
4617
4618 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4619
4620         * codegen.cs, driver: Only write symbol file when it's asked for.
4621
4622 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4623
4624         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4625
4626 2008-06-10  Martin Baulig  <martin@ximian.com>
4627
4628         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4629
4630 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4631
4632         A fix for bug #316290
4633         * expression.cs: Include decimal operators in predefined table.
4634         
4635         * parameters.cs: More readonlyness.
4636
4637 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4638
4639         A fix for bug #397213
4640         * cs-parser.jay: One more missing current_local_parameters reset.
4641
4642 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4643
4644         A fix for bug #396633
4645         * class.cs: Host backing field in partial container.
4646
4647 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4648
4649         A fix for bug #397068
4650         * expression.cs: Check both operand types when predefined operator is used.
4651
4652 2008-06-05  Martin Baulig  <martin@ximian.com>
4653
4654         Merged the `debugger-kahalo' branch.
4655
4656         * class.cs
4657         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4658         we're an iterator method.
4659         (SourceMethod): Reflect latest symbol writer changes;
4660         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4661         now `start_row' and `end_row'.
4662         (Constructor.Emit): Fix the logic whether to emit symbol information.
4663
4664         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4665         generated methods.
4666
4667         * location.cs
4668         (CompilationUnit): New public class; derives from `SourceFile'.
4669         (SourceFileEntry.DefineSymbolInfo): New public method.
4670         (SourceFileEntry.SetChecksum): New public method.
4671         (Location): Encode hidden line numbers by using `column == 255';
4672         the .ctor now accepts `column == -1' to mark a hidden line number.
4673         (Location.Hidden): New public property.
4674         (Location.CheckPoint): Add `CompilationUnit'.
4675         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4676         (Location.Push): Add `CompilationUnit compile_unit' argument.
4677         (Location.CompilationUnit): New public property.
4678
4679         * statement.cs
4680         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4681
4682         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4683
4684         * driver.cs: `SourceFile' -> `CompilationUnit'.
4685
4686         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4687
4688         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4689
4690         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4691         `#line hidden'.
4692
4693         * symbolwriter.cs
4694         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4695         new symbol writer API to also pass the file.
4696
4697 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4698
4699         * statement.cs: Emit catch variable assignment using variable expression.
4700         
4701 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4702
4703         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4704         with other variable types.
4705
4706 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4707
4708         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4709         GetLength method emit, it breaks resolve rules.
4710         
4711 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4712             Marek Safar  <marek.safar@gmail.com>
4713                         
4714         A fix for bug #395542
4715         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4716         declaration.
4717         
4718 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4719
4720         A fix for bug #395287
4721         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4722
4723 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4724
4725         A fix for bug #395845
4726         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4727         non-nullable parameter type.
4728         
4729 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4730
4731         * class.cs: Handle contructor initializer as a statement in top-level block.
4732
4733 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4734
4735         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4736         security attributes.
4737
4738 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4739
4740         * ecore.cs, expression.cs: Small IVariable refactoring.
4741
4742 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4743
4744         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4745
4746 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4747
4748         * cs-parser.jay: Removed redundant catch type check.
4749
4750 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4751
4752         A fix for bug #390372
4753         * nullable.cs: Set correct return type.
4754
4755 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4756
4757         A fix for bug #391062
4758         * typemanager.cs: Fixed crash when comparing null types.
4759
4760 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4761
4762         A fix for bug #391871
4763         * cs-parser.jay: Better error handling for invalid catch type.
4764
4765 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4766
4767         A fix for bug #392155
4768         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4769
4770 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4771
4772         A fix for bug #390666
4773         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4774         expressions.
4775
4776 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4777
4778         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4779         in getter.
4780
4781 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4782
4783         A fix for bug #389625
4784         * delegate.cs, generic.cs: Some progress on method group return type
4785         inference.
4786
4787 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4788
4789         A fix for bug #378419
4790         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4791
4792 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4793
4794         * class.cs (Constructor): Added IsCompilerGenerated.
4795
4796 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4797
4798         * expression.cs: Enum binary operators can accept non-enum operand only when
4799         is implicitly convertible to underlying type.
4800
4801 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4802
4803         A fix for bug #389272
4804         * support.cs: Workaround System.InvalidOperationException for enums.
4805
4806 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4807
4808         A fix for bug #389073
4809         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4810
4811 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4812
4813         * driver.cs: Split Parse.
4814         
4815         * location.cs (LookupFile): Uses string.Empty.
4816
4817 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4818
4819         * expression.cs, parameter.cs: Small ParameterReference clean up.
4820
4821 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4822
4823         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4824         hack. Fixes #387502.
4825
4826 2008-05-06  Martin Baulig  <martin@ximian.com>
4827
4828         * class.cs (Constructor.Emit): Fix the logic whether to emit
4829         symbol information.
4830
4831 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4832
4833         Fix #385503
4834         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4835         InvalidOperationException when the iterator is before the start or
4836         after the end.
4837
4838 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4839
4840         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4841         when left is nullable type.
4842
4843 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4844
4845         A fix for bug #386628
4846         * expression.cs (LocalVariableReference): Continue in resolving when
4847         variable is not assigned.
4848
4849 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4850
4851         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4852         nullable operations.
4853
4854 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4855
4856         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4857         it saves many redundant temporary variables for nullable operations.
4858
4859 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4860
4861         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4862         
4863         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4864         method.
4865         
4866         * nullable.cs: Constant coalescing operator optimizations.
4867
4868 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4869
4870         * constant.cs: Use unsigned conversion for values which are unsigned only.
4871
4872 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4873
4874         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4875         coalescing operator as it should be.
4876
4877 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4878
4879         A fix for bug #371016
4880         * expression.cs: All predefined delegate operators require implicit method
4881         group conversion.
4882         
4883 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4884
4885         * constant.cs: Emit long constant as uint when fits the range.
4886         
4887         * convert.cs, expression.cs: Fixed few unsafe conversions.
4888
4889 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4890
4891         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4892
4893 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4894
4895         Fix #385758
4896         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4897         'expr'.
4898         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4899
4900 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4901
4902         * constant.cs, literal.cs: IsLiteral property for error reporting.
4903         
4904         * ecore.cs, expression.cs: Implemented Property expression.
4905
4906 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4907
4908         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4909         
4910         * nullable.cs: Implemented nullable coalescing null operator.
4911
4912         * ecore.cs, expression.cs: Expression trees work.
4913
4914 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4915
4916         * ecore.cs: CreateExpressionTree is finally abstract.
4917
4918         * expression.cs, linq.cs: Updated.
4919
4920 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4921
4922         * expression.cs, ecore.cs: Block base access expression inside expression
4923         tree.
4924
4925 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4926
4927         A fix for bug #385058
4928         * expression.cs: User-defined operator implementations always take
4929         precedence over predefined operator implementations.
4930
4931 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4932
4933         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4934         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4935         expression tree conversions.
4936         
4937 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4938
4939         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4940         operators method details to Operator class.
4941
4942 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4943
4944         * anonymous.cs: Pass unsafe flags to anonymous container.
4945         
4946         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4947         inside expression tree.
4948
4949 2008-04-29  Martin Baulig  <martin@ximian.com>
4950
4951         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4952         (Tokenizer.PopPosition): Also restore the `line'.
4953
4954 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4955
4956         * delegate.cs: Implemented Invoke expression.
4957
4958 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4959
4960         * expression.cs: Fixed equality reference comparison regression.
4961
4962 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4963
4964         * ecore.cs: Clean up EmptyCast hack.
4965         
4966         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4967         using correct conversion rules. Also fixes #383993.
4968
4969 2008-04-28  Martin Baulig  <martin@ximian.com>
4970
4971         * class.cs (Constructor.Emit): Don't emit debugging information
4972         for generated default .ctor's.
4973
4974 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4975
4976         * convert.cs: Empty-cast ushort to int conversion.
4977
4978 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4979
4980         A fix for bug #384191
4981         * ecore.cs, expression.cs: Fixed expression cloning.
4982
4983 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4984
4985         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4986
4987 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4988
4989         Fix #381559, test-638.cs, test-639.cs
4990         * assign.cs (CompoundAssign.Helper): New wrapper.
4991         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4992         access.
4993         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4994         Pass unconverted expressions to the params array creation expression.
4995         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4996         (PropertyExpr.EmitAssign): Likewise.
4997         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4998         element if it is of kind CompoundAssign.Helper.
4999         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
5000         first before anything else.
5001         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
5002         (ArrayAccess.LoadArrayAndArguments): Simplify.
5003
5004 2008-04-27  Marek Safar  <marek.safar@gmail.com>
5005
5006         * expression.cs: Fixed cloning of typeof(void).
5007
5008 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
5009
5010         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
5011         (Assign.Emit): Likewise.  Move it to ...
5012         (CompoundAssign.DoResolve): ... here and ...
5013         (CompoundAssign.Emit): ... here.
5014         (EventAddOrRemove): New helper to handle += and -= on events, and
5015         avoid the use of BinaryDelegates.
5016         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
5017         (EventExpr.EmitAddOrRemove): Improve.
5018         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
5019
5020         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
5021         create VarExprs for 'foo.bar.var'.
5022         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
5023         is a highly inappropriate name for its functionality.
5024
5025 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
5026
5027         Simplify handling of multiple assignments
5028         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
5029         inheritable-only.
5030         (SimpleAssign): New.  Class to be used for normal assignments.
5031         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
5032         * expression.cs, parameter.cs, statement.cs: Likewise.
5033
5034 2008-04-25  Marek Safar  <marek.safar@gmail.com>
5035
5036         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
5037         for incompatible underlying types, more to come, uff.
5038
5039 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
5040
5041         Fix gtest-388.cs
5042         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
5043         Handle 'leave_copy'.
5044
5045 2008-04-25  Marek Safar  <marek.safar@gmail.com>
5046
5047         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
5048
5049 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
5050
5051         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
5052         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
5053         * statement.cs (While, Do, For): Allow test to have side effects.
5054         (For.DoEmit): Always emit InitStatement.
5055
5056         Fix test-635.cs
5057         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
5058         Always create SideEffectConstant.
5059         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
5060         of type EnumConstant.
5061
5062         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
5063         Handle 'right' being SideEffectConstant of type 'bool'.
5064
5065         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
5066         Use left.EmitBranchable instead of open coding it, so as to
5067         improve optimization opportunities.
5068
5069         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
5070
5071         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
5072         assumptions.
5073         (Expression.EmitSideEffect): Document.
5074
5075 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5076
5077         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
5078
5079 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5080
5081         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
5082
5083 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5084
5085         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
5086         conversion to expression tree.
5087
5088 2008-04-23  Marek Safar  <marek.safar@gmail.com>
5089
5090         * ecore.cs: Removed unused expression.
5091
5092 2008-04-22  Marek Safar  <marek.safar@gmail.com>
5093
5094         * expression.cs: Implemented NegateChecked and New expressions.
5095
5096 2008-04-22  Marek Safar  <marek.safar@gmail.com>
5097
5098         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
5099
5100 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
5101
5102         Fix #351102
5103         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
5104         needing final 'ret' instruction.
5105
5106 2008-04-22  Marek Safar  <marek.safar@gmail.com>
5107
5108         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
5109
5110 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5111
5112         * expression.cs: Emit ldnull and not null expression as an instance argument
5113          of static method expression calls.
5114
5115 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5116
5117         A fix for bug #378200
5118         * expression.cs: Fixed crash when creating parameterless expression tree
5119         method call.
5120
5121 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5122
5123         A fix for bug #375297
5124         * anonymous.cs: Fixed crash when inferring from null argument anonymous
5125         method.
5126
5127 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5128
5129         A fix for bug #377596
5130         * decl.cs, class.cs: Emit delegate type argument attributes.
5131
5132 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5133
5134         A fix for bug #365314
5135         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
5136         
5137 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5138
5139         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
5140         only.
5141
5142 2008-04-21  Marek Safar  <marek.safar@gmail.com>
5143
5144         * generic.cs (TypeParameter): Removed redundant location.
5145
5146 2008-04-19  Marek Safar  <marek.safar@gmail.com>
5147
5148         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
5149         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
5150         FullNamedExpression in all declaration type expression, statements will come
5151         later.
5152
5153 2008-04-18  Marek Safar  <marek.safar@gmail.com>
5154
5155         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
5156         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
5157
5158 2008-04-18  Marek Safar  <marek.safar@gmail.com>
5159
5160         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
5161         code.
5162
5163 2008-04-17  Marek Safar  <marek.safar@gmail.com>
5164
5165         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
5166         constraints.
5167
5168 2008-04-17  Marek Safar  <marek.safar@gmail.com>
5169
5170         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
5171         name expressions.
5172         Also fixes #340463.
5173
5174 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
5175
5176         Hook up 'EmitSideEffect'
5177         * constant.cs (Constant.EmitSideEffect): New.
5178         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
5179         (SideEffectConstant.EmitSideEffect): New.
5180         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
5181         unconditional branch in EmitBranchable.
5182         (FieldExpr.EmitBranchable): New.
5183         * expression.cs (Unary.EmitSideEffect): New.
5184         (Binary.EmitSideEffect): New.
5185         (VariableReference.EmitSideEffect): New.  Do nothing.
5186
5187 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
5188
5189         Introduce 'EmitSideEffect'
5190         * ecore.cs (Expression.EmitSideEffect): New.
5191         (TypeCast): Rename from EmptyCast.
5192         (EmptyCast): New.
5193         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
5194         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
5195         * convert.cs, nullable.cs: Update to changes.
5196
5197 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5198
5199         * class.cs, cs-parser.jay: Early check for base types expression.
5200
5201 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5202
5203         * decl.cs (MemberName): Declare PrettyName as obsolete.
5204
5205 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5206
5207         * namespace.cs: Use MemberName comparison.
5208
5209 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
5210
5211         Fix build break
5212         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
5213         FullName.
5214         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
5215         (MemberName.FullyQualifiedName): New.  Provides the functionality
5216         that users assume FullName would have.
5217         * ecore.cs, namespace.cs: Update to changes.
5218
5219         * statement.cs (Using.assign): Make into ExpressionStatement.
5220         (Using.EmitPreTryBody): Simplify.
5221
5222 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5223
5224         * report.cs: ColorFormat is protected.
5225         
5226         * rootcontext.cs: Unused fields clean-up.
5227         
5228         * namespace.cs: Made UsingEntry name private.
5229
5230 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5231
5232         * cs-tokenizer.cs, location.cs: Removed unused field.
5233
5234 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
5235             Raja R Harinath  <harinath@hurrynot.org>
5236
5237         Fix #379822
5238         * constant.cs (SideEffectConstant.value): Rename from 'left'.
5239         (SideEffectConstant.side_effect): Rename from 'right'.
5240         (SideEffectConstant..ctor): Normalize 'side_effect'.
5241         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
5242         value of this constant.
5243         * cfold.cs: Update to changes.
5244
5245 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5246
5247         * cs-paser.jay: Removed unused variable.
5248         
5249         * driver.cs: Made Compile instance method.
5250
5251 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
5252
5253         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
5254
5255 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5256
5257         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
5258
5259 2008-04-13  Jb Evain  <jbevain@novell.com>
5260
5261         * namespace.cs: update the System.Core fullname for 2.1
5262         * driver.cs: update the list of required assemblies for 2.1.
5263         Merged from the Moonlight 2 branch.
5264
5265 2008-04-11  Marek Safar  <marek.safar@gmail.com>
5266
5267         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
5268         types and user defined operators. User operators arguments has to be checked
5269         for null value before invocation, which also means no operator is called
5270         when any argument is not convertible to unwrapped nullable type.
5271         
5272 2008-04-09  Marek Safar  <marek.safar@gmail.com>
5273
5274         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
5275         of Unary expressions to follow operator overloading rules precisely.
5276         Also fixes #321794, #323794
5277         
5278 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5279
5280         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
5281         expression.
5282         
5283 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5284
5285         * expression.cs, ecore.cs: Implemented MemberInit expression.
5286         
5287 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
5288
5289         Fix mono/tests/exception4.cs
5290         * statement.cs (ExceptionStatement, TryCatch): Revert to using
5291         ec.NeedReturnLabel () rather emitting a 'nop'.
5292
5293         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
5294         simple heuristic.
5295         (TryCatch.SomeCodeFollows): Likewise.
5296         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
5297         for 'break', 'continue' and 'return' statements inside a try.
5298         We're fairly sure that the generated IL stream will have more
5299         instructions textually following the try.
5300         (FlowBranchingTryCatch): Likewise.
5301
5302         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
5303         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
5304         overrides.
5305
5306         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
5307         wrapper -- forward everything to CollectionForeach.
5308         (CollectionForeach.NonDisposableWrapper): New.
5309         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
5310         instead of a pop + branch to end.
5311
5312 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5313
5314         A fix for bug #377485
5315         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
5316         Propagate location for extension method groups. Report conversion failure at
5317         right place.
5318
5319 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5320
5321         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
5322         ListInit and Field expressions.
5323
5324 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
5325
5326         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
5327         Since $PC is always -1 inside the body of MoveNext, the fault
5328         handler is a no-op.
5329         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
5330         * statement.cs (ExceptionStatement.emit_finally): Likewise.
5331         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
5332
5333         The denouement!  Fix #324708
5334         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
5335         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
5336         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
5337         'finally' inside the finally clause.
5338
5339         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
5340         inside an iterator.  Don't emit the body of the 'finally' inside
5341         the finally clause yet.
5342
5343         Use the ResumableStatement infrastructure for MoveNext ()
5344         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
5345         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
5346         'old_resume_points'.  Move dispatcher upfront.
5347         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
5348         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
5349         in an enumerator.  This encodes the main fix in this patch series
5350         -- we can only jump into the first instruction of a try from the
5351         outside, but we want to emit try/finally regions in iterators and
5352         resume in the middle of them.
5353
5354 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
5355
5356         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
5357         of NeedReturnLabel here.
5358
5359         Introduce a common point for emitting try/finally to IL
5360         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
5361         features of the various subclasses, which are now driven by ...
5362         (ExceptionStatement.EmitPreTryBody): ... this and ...
5363         (ExceptionStatement.EmitTryBody): ... this and the original
5364         EmitFinallyBody.
5365         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
5366         Remove DoEmit and update to follow above protocol.
5367
5368         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
5369         of the dispatcher are the same, skip emitting the 'switch'.
5370         * iterator.cs (Iterator.EmitDispose): Update to changes.
5371
5372         Clean up handling of 'using' statement
5373         * statement.cs (UsingTemporary): New.  Carved out of ...
5374         (Using): ... this.  Simplify drastically.  Handle exactly
5375         one variable.
5376         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
5377         or Using as appropriate.  If there are multiple variable declared,
5378         create nested Using statements.
5379         (resource_acquisition): Kill.
5380
5381         * statement.cs (ExceptionStatement.EmitForDispose): Use
5382         EmitFinallyBody, not EmitFinally.
5383
5384         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
5385         * iterator.cs: Update to changes.
5386
5387         Start using the ResumableStatement infrastructure
5388         * statement.cs (ResumeableStatement.PrepareForDispose): New.
5389         (ResumableStatement.EmitForDispose): New.
5390         (ExceptionStatement): Override them.
5391         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
5392         EmitForDispose to create the body of the Dispose method.  Don't
5393         use OldResumePoint.
5394
5395         * iterator.cs (Iterator.AddResumePoint): Move here from ...
5396         * statement.cs (Toplevel.AddResumePoint): ... here.
5397         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
5398         * flowanalysis.cs (FlowBranchingIterator): New.
5399         * codegen.cs (EmitContext): Update to changes.
5400
5401         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
5402         (Iterator.old_resume_points): Rename from 'resume_points'.
5403         (Iterator.MoveNextStatement): Remove unused class.
5404
5405         New infrastructure for try/finally in iterators (still unused)
5406         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5407         (FlowBranchingToplevel.AddResumePoint): Hook into
5408         ToplevelBlock.AddResumePoint.
5409         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5410         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5411         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5412         resume points and assign program-counter values.
5413         (ExceptionBlock.AddResumePoint): Collect resume points for
5414         de-muxer at the top of try block.
5415         * iterators.cs (Yield.CheckContext): Simplify.
5416         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5417
5418 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5419
5420         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5421         argument to an ExitStatement.
5422         (FlowBranchingException): Refactor saved origins code.
5423         * statement.cs (ExitStatement): Update to cahges.
5424         * iterator.cs (YieldBreak): Likewise.
5425
5426         * statement.cs (ResumableStatement): New.  Common base class for
5427         YieldReturn and ExceptionStatement.
5428         (ExitStatement): New.  Common base class for Return and YieldBreak.
5429         (Return): Update to changes.
5430         * iterator.cs (YieldBreak): Likewise.
5431         * lambda.cs (ContextualReturn): Likewise.
5432
5433         Fix #377028
5434         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5435         emit a meaningful error message.
5436
5437         Fix #324765, #319508
5438         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5439         (VariableInfo.SetAssigned): Set it.
5440         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5441         determine if CS0219 or CS0168 is appropriate.  Don't use
5442         flow-analysis information.
5443         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5444         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5445         (EmitContext.EndFlowBranching): ... this.
5446
5447 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5448
5449         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5450
5451 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5452
5453         A fix for bug #376508
5454         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5455         ImplicitConversionExists.
5456
5457 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5458
5459         * expression.cs (Binary): Added remaining binary operators to expression
5460         tree builder.
5461
5462         * nullable.cs: Optimize shift with null argument.
5463
5464 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5465
5466         Fix minor IL regression
5467         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5468         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5469         * cs-parser.jay (try_statement): Update to changes.
5470
5471         * statement.cs (TryFinally.need_exc_block): Delete.
5472         (TryFinally): Update to changes.
5473
5474         Now all ExceptionStatements are unconditional
5475         * statement.cs (CollectionForeach.DisposableWrapper): New.
5476         Extract out the try/finally code into a new wrapper.
5477         (CollectionForeach.Resolve): Use it to simplify the code.
5478
5479 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5480
5481         Start at simplifying ExceptionStatement semantics a bit
5482         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5483         * cs-parser.jay (try_statement): Update to changes.
5484         (opt_catch_clauses): Remove.
5485         * flowanalysis.cs: Update to changes.
5486         (FlowBranching.BranchingType.TryCatch): New.
5487         (FlowBranchingTryCatch): New.
5488
5489         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5490         (FlowBranching.CreateBranching): Update to changes.
5491         (FlowBranchingBlock.AddSibling): Add sanity check.
5492         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5493         Update to changes.
5494
5495         * iterators.cs (Iterator.MarkFinally): Remove.
5496         * statement.cs (ExceptionStatement): Update to changes.
5497
5498         Add support for skipping over finally blocks at runtime.  First
5499         in a series to fix #324708
5500         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5501         (Iterator.EmitMoveNext): Initialize it.
5502         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5503         branch over the body of the 'finally' clause.
5504
5505 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5506
5507         Avoid lopsided use of Foo/DoFoo names
5508         * statement.cs (ExpressionStatement.EmitFinallyBody):
5509         Rename from EmitFinally.
5510         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5511         * iterator.cs: Update to changes.
5512
5513 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5514
5515         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5516         based on UserOperatorCall. More binary nullable operators clean up.
5517
5518 2008-04-02  Martin Baulig  <martin@ximian.com>
5519
5520         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5521
5522 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5523
5524         * nullable.cs: Merge user and empty conversions when lifting expression
5525         trees.
5526         
5527         * expression.cs (StringConcat): Implemented expression tree representation.
5528
5529 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5530
5531         * nullable.cs: When lifting null literal and a user operator exists, no call 
5532         is made.
5533         
5534 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5535
5536         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5537         null.
5538
5539 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5540
5541         * nullable.cs, expression.cs: Use namespace instead heavily nested
5542         monster abstract class.
5543
5544 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5545
5546         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5547         lifting of null literal and user operators. Clean up of some temporary
5548         nullable hacks.
5549
5550 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5551
5552         Fix #368224, test-629.cs
5553         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5554         if it crossed an unwind-protect boundary.
5555         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5556         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5557         inside an unwind-protected region.
5558         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5559         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5560         'leave' instead of a 'br' if unwind-protected.
5561         (Iterator.EmitYieldBreak): Likewise.
5562
5563 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5564
5565         * driver.cs: Only define versioninfo resources if no win32 resource
5566         file was specified.
5567
5568 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5569
5570         A fix for bug #372375
5571         * convert.cs: Fixed boxing of nullable types.
5572
5573 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5574
5575         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5576         type.
5577
5578 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5579
5580         A fix for bug #374619
5581         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5582         
5583 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5584
5585         * lambda.cs: Check return type only for invocation.
5586         
5587 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5588
5589         A fix for bug #374214
5590         * ecore.cs: Correctly report argument type mismatch.
5591
5592 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5593
5594         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5595         and not rely on broken IsEnum.
5596
5597 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5598
5599         * nullable.cs: New file, extracted from generic.cs.
5600         
5601         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5602
5603 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5604
5605         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5606         predefined comparison operators and null literals.
5607         
5608         * report.cs: New warning ID.
5609         
5610 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5611
5612         A fix for bug #370577
5613         * lambda.cs: Check return type too.
5614
5615 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5616
5617         A fix for bug #372846
5618         * class.cs: Automatic properties can be declared as unsafe.
5619
5620 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5621
5622         * location.cs: Use string based concatenation.
5623         
5624         * expression.cs: LiftedBinaryOperator is gmcs only.
5625         
5626 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5627
5628         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5629         conversions rules and expression trees.
5630
5631 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5632
5633         * delegate.cs: Use extension method source as delegate target.
5634
5635 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5636
5637         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5638         binary operations to be purely based on binary operations and optimized
5639         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5640         and other ET refactoring.
5641         
5642         * typemanager.cs: Fixed warning.
5643         
5644 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5645
5646         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5647         
5648         * symbolwriter.cs: Fixed.
5649
5650 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5651
5652         * anonymous.cs, driver.cs: Reset anonymous types counters.
5653
5654 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5655
5656         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5657         
5658         * class.cs: Use fullname for all type member definitions.
5659         
5660 2008-02-19  Martin Baulig  <martin@ximian.com>
5661
5662         * class.cs
5663         (IMethodData.EmitExtraSymbolInfo): New interface method.
5664         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5665         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5666         interface method here as an empty public virtual method.
5667
5668         * anonymous.cs
5669         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5670         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5671         CodeGen.SymbolWriter.SetRealMethodName().       
5672
5673 2008-02-18  Martin Baulig  <martin@ximian.com>
5674
5675         * anonymous.cs
5676         (ScopeInfo.EmitType): Override this and emit debugging
5677         information for captured variables.
5678         (RootScopeInfo.EmitType): Override this and emit symbol
5679         information for a captured `this'.
5680
5681 2008-02-15  Martin Baulig  <martin@ximian.com>
5682
5683         * iterators.cs: Emit debugging info.
5684
5685         * codegen.cs
5686         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5687         (EmitContext.OmitDebuggingInfo): New public property.
5688
5689         * statement.cs
5690         (While): Override Emit() and don't emit symbol info there; do it
5691         inside DoEmit() instead.
5692         (Block.Emit): Omit symbol information while emitting the scope
5693         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5694         block logic.
5695         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5696         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5697         .ctor to make `IsIterator' work.
5698
5699 2008-03-14  Martin Baulig  <martin@ximian.com>
5700
5701         * symbolwriter.cs: Added the new symbol writer function from the
5702         debugger's `terrania' branch; temporarily enclose them inside
5703         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5704         my vacations.
5705
5706 2008-03-14  Martin Baulig  <martin@ximian.com>
5707
5708         * symbolwriter.cs
5709         (SymbolWriter): Make this a public static class.
5710
5711         * codegen.cs
5712         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5713         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5714
5715 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5716
5717         A fix for bug #370577
5718         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5719         return type.
5720         
5721 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5722
5723         * typemanager.cs (CSharpName): Made 250 times faster.
5724
5725 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5726
5727         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5728         
5729 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5730
5731         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5732         crash when predefined field does not exist.
5733         
5734 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5735
5736         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5737         
5738 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5739
5740         * class.cs (FixedField): Don't crash when contructors are missing.
5741
5742 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5743
5744         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5745         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5746         check internal types accessibility for internal and external types.
5747         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5748
5749 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5750
5751         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5752         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5753         attribute.cs, statement: Use corect instance of predefined types (work
5754         related to #364674).
5755
5756 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5757
5758         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5759         
5760 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5761
5762         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5763         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5764         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5765         predefined types clean up, delayed predefined types members initialization
5766         (work related to #364674).
5767
5768 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5769
5770         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5771         
5772 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5773
5774         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5775         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5776         predefined types clean up (work related to #364674).
5777
5778 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5779
5780         * ecore.cs: Print an error message instead of throwing exception.
5781         
5782 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5783
5784         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5785         expression.cs, statement.cs: Unififed null literal representation.
5786
5787 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5788
5789         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5790         expression.cs: Refactored binary operators resolve phase and improved speed.
5791         The nullable code is still missing and won't work correctly, more fixes
5792         required.
5793
5794         It also fixes #323726, #324312, #324248, and many other unreported issues.
5795
5796 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5797
5798         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5799         instead of 'gmcs'.
5800
5801 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5802
5803         * ecore.cs: Clean-up and split BetterConversion.
5804         
5805 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5806
5807         Fix #363791
5808         * enum.cs (EnumMember.Value): Only access 'value' if
5809         ResolveValue says it's ok.
5810         (EnumMember.DoResolveValue): Don't set prev_member.value.
5811         (Enum.GetDefinition): Reverse arguments of Equals --
5812         EnumMember.Value can return 'null'.
5813
5814         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5815
5816 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5817
5818         * generic.cs, expression.cs: More ongoing work on expression trees.
5819         
5820 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5821
5822         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5823         handle missing matches when mutiple operators exist.
5824         
5825 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5826
5827         A fix for bug #363218
5828         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5829         initializers.
5830         
5831 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5832
5833         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5834         update. This time to deal correctly with SideEffectConstant expression used
5835         as an argument for another constant folding.
5836
5837 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5838
5839         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5840         MethodBuilder.
5841
5842 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5843
5844         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5845
5846 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5847
5848         A fix for bug #328136
5849         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5850         side is a false constant, because we still need to evaluate the right-hand
5851         side.
5852
5853         * statement.cs (If): Emit two types of boolean constants (simple constant,
5854         side-effect constant).
5855
5856 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5857
5858         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5859
5860         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5861         constants.
5862
5863 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5864
5865         A fix for bug #361457
5866         * ecore.cs (IsApplicable): Params methods have lower priority.
5867
5868         * support.cs: Return correct parameter modifier for params types.
5869
5870 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5871
5872         * generic.cs (TypeParameter): Cache attribute target name.
5873
5874         * support.cs: Removed unused variable.
5875
5876         * typemanager.cs: Removed debugging leftover.
5877
5878         * ecore.cs: Use local type instead of a property;
5879
5880         * class.cs (VerifyMembers): Consider also parent to test whether type member
5881         is local or public.
5882
5883         * expression.cs (FullMethodDesc): Removed.
5884
5885         * attribute.cs (IsValidArgumentType): Made static.
5886
5887 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5888
5889         Cleanup to be more readable.
5890         * Makefile (GMCS_PROFILE): Remove.
5891         (COMPILER_NAME): New helper.
5892
5893 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5894
5895         * cs-tokenizer.cs: if a conditional expression happens inside a
5896         (...) this also means that we do not need to de-ambiguate between
5897         an parenthesized expression and a cast.
5898
5899         Fixes 346484.
5900
5901         * constant.cs (SideEffectConstant): a constant value that happens
5902         to have a side effect.
5903
5904         Fixes the build regressions introduced by the fix for #359789
5905
5906 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5907
5908         * expression.cs (Conditional.Emit): when emitting the ternary
5909         operator, use local variables to generate code verifiable code.
5910
5911         The verifier cannot infer that the type on stack before the
5912         stloc.0 is executed is of type ParentB. This happens because the
5913         stack merge algorithm uses only parent types when deciding which
5914         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5915         335.
5916
5917         This code compiled with mcs is not verifiable under MS. The MS
5918         verifier picks the first common interface of Foo and Bar, which is
5919         wrong, but doesn't use a full join type of the 2 interfaces.
5920
5921         CSC uses a clever hack to compile such code in a verifiable
5922         way. It stores the intermediate values in a local variable with
5923         the expected type.
5924
5925         Fixes: #358102
5926
5927 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5928
5929         * expression.cs: Do not fold BitwiseAnd operators when the left
5930         side is a false constant, because we still need to evaluate the
5931         right-hand side.
5932
5933         Fixes #359789
5934
5935         * support.cs: Instead of throwing an InternalErrorException when
5936         the position of the stream is outside the boundary of our buffer,
5937         reset the state of the reader, and restart the reading from the
5938         beginning of the file.
5939
5940 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5941
5942         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5943
5944 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5945
5946         A fix for bug #361686
5947         * decl.cs: A protected types used inside a private class which parents
5948         derives from the protected class are accessible.
5949
5950 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5951
5952         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5953         the parameterless constructor.
5954
5955 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5956
5957         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5958         lookup methods to use standard member cache when doing member lookup.
5959
5960 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5961
5962         * driver.cs: Don't report full path for referenced module as assembly error.
5963
5964 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5965
5966         * Makefile: Fixed `qh' target to work on all machines.
5967
5968         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5969         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5970         and HasElementType with TypeManager implementation.
5971
5972 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5973
5974         A fix for bugs #325134, #359749
5975         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5976         first binds point to non-method member expression.
5977
5978 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5979
5980         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5981
5982 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5983
5984         A fix for bugs #321394, #323028
5985         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5986         Reworked naive IsAccessibleAs implementation to handle nested types.
5987
5988 2008-02-05  Jb Evain  <jbevain@novell.com>
5989
5990         * class.cs: use generic type comparison for parameters
5991         as well.
5992
5993 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5994
5995         A fix for bug #325372
5996         * class.cs: Use generic type comparison when testing method signatures.
5997
5998 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5999
6000         A fix for bug #357047
6001         * ecore.cs: Applied C# 3.0 changes to better conversion.
6002
6003 2008-02-05  Marek Safar  <marek.safar@gmail.com>
6004
6005         A fix for bug #358374
6006         * cs-parser.jay: Correctly set modifiers for all constructor types.
6007
6008 2008-02-04  Marek Safar  <marek.safar@gmail.com>
6009
6010         A fix for bug #355251
6011         * generic.cs: Added base class constraint based type inference.
6012
6013 2008-02-01  Marek Safar  <marek.safar@gmail.com>
6014
6015         A fix for bug #357255
6016         * decl.cs: One more missing visibility check.
6017
6018 2008-02-01  Marek Safar  <marek.safar@gmail.com>
6019
6020         * support.cs: Fixed broken return.
6021
6022 2008-01-25  Marek Safar  <marek.safar@gmail.com>
6023
6024         * report.cs: Correctly reset warnings count after probing.
6025
6026 2008-01-25  Martin Baulig  <martin@ximian.com>
6027
6028         * namespace.cs
6029         (NamespaceEntry.SymbolFileID): Make this work again after
6030         MemberName.ToString() is gone.
6031
6032 2008-01-25  Marek Safar  <marek.safar@gmail.com>
6033
6034         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
6035         expressions.
6036
6037 2008-01-25  Marek Safar  <marek.safar@gmail.com>
6038
6039         * generic.cs: Use full implicit conversion for type inference fixing.
6040
6041 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6042
6043         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
6044         Fixed user operator conversions.
6045
6046 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6047
6048         * generic.cs: Do nullable type to null comparison optimization during
6049         resolve phase.
6050
6051 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6052
6053         A fix for bug #355163
6054         * generic.cs: Enabled l-value resolve on nullable expressions.
6055
6056 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6057
6058         A fix for bug #353986
6059         * class.cs: Ingore static ctors with parameters for any further checks.
6060
6061 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6062
6063         A fix for bug #354310
6064         * namespace.cs: Removed redundant check.
6065
6066 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6067
6068         A fix for bug #354928
6069         * expression.cs: ElementInitializers can be resolved only once.
6070
6071 2008-01-24  Marek Safar  <marek.safar@gmail.com>
6072
6073         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
6074         Condition expressions.
6075
6076 2008-01-23  Marek Safar  <marek.safar@gmail.com>
6077
6078         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
6079
6080 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6081
6082         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
6083         not allowed.
6084
6085         * generic.cs: Implemented coalesce expression.
6086
6087 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6088
6089         A fix for bug #355145
6090         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
6091         expression tree type inference.
6092
6093 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
6094
6095         Fix #354663
6096         * expression.cs (Binary.IsUnsignedType): Fix typo.
6097
6098 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6099
6100         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
6101
6102 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6103
6104         A fix for bug #355161
6105         * ecore.cs, expression.cs: Wider range of extension method supported
6106         expressions.
6107
6108 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
6109
6110         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
6111         AssemblyBuilder to operate in compiler context. Fixes mcs part of
6112         bug #354970.
6113
6114 2008-01-22  Marek Safar  <marek.safar@gmail.com>
6115
6116         A fix for bug #355148
6117         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
6118
6119 2008-01-22  Miguel de Icaza  <miguel@novell.com>
6120
6121         * expression.cs (CreateExpressionTree): Add support for or and
6122         logical or, and indent following the coding conventions.
6123
6124         * typemanager.cs (LinqExpression): renamed from
6125         ExpressionTreeManager, for a shorter name.
6126
6127         Use TypeManager.CoreLookupType to lookup types from our core
6128         assemblies and turn those into "Type" variables.
6129
6130         Consumers that previously used "Namespace" and "Type" from this
6131         class should instead use the TypeExpression which is a type that
6132         is fully resolved (without involving the regular C# resolution
6133         rules). 
6134
6135         This typically looks like this:
6136
6137         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
6138         new MemberAccess (texpr, name, type_arguments, loc)
6139
6140         This avoids the problem in: #355178
6141
6142 2008-01-21  Marek Safar  <marek.safar@gmail.com>
6143
6144         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
6145         feature in parser only as we do in other cases.
6146         
6147 2008-01-21  Marek Safar  <marek.safar@gmail.com>
6148
6149         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
6150         typemanager.cs: A refactoring of params arguments to reuse existing
6151         expressions (params -> array initializer) to emit params argument instead
6152         of specialized handling.
6153         It was required by expression tree implementation and it has other benefits
6154         as well, we now apply same optimization for params arguments as we do for
6155         array initializers.
6156         
6157 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6158
6159         A fix for bug #353526
6160         * generic.cs: A type inference of params arguments may not required any
6161         temporary array creation.
6162         
6163 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6164
6165         A fix for bug #353534
6166         * generic.cs, ecore.cs, expression.cs: A method group type inference is
6167         supported for delegates only.
6168         
6169 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6170
6171         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
6172         type for more than 1 candidates.
6173         
6174 2008-01-18  Marek Safar  <marek.safar@gmail.com>
6175
6176         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
6177         expressions.
6178         
6179 2008-01-16  Marek Safar  <marek.safar@gmail.com>
6180
6181         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
6182         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
6183         operator) expressions. 
6184                 
6185 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
6186
6187         * statement.cs: Avoid declaring an IL variable for this_variable since it is
6188         not accessed from the generated IL.
6189
6190 2008-01-14  Marek Safar  <marek.safar@gmail.com>
6191
6192         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
6193         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
6194         statement.cs: The first expression tree implementation drop, mostly
6195         infrastructure work.
6196
6197 2008-01-14  Marek Safar  <marek.safar@gmail.com>
6198
6199         * ecore.cs (IsNestedChild): Refactored.
6200
6201 2008-01-11  Marek Safar  <marek.safar@gmail.com>
6202
6203         * lambda.cs: Don't use a cast on unknown expression statement.
6204
6205 2008-01-10  Geoff Norton  <gnorton@novell.com>
6206
6207         * cs-tokenizer.cs: One more token to distinguish between method and lambda
6208         arguments
6209
6210 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6211
6212         * doc.cs: Report better /doc crash details.
6213         
6214 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6215
6216         A fix for bug #352536
6217         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
6218
6219 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6220
6221         A fix for bug #352287
6222         * ecore.cs, expression.cs: Do `this' access checking in all member access
6223         expressions.
6224         
6225 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6226
6227         * rootcontext.cs, driver.cs: Switch to linq mode by default.
6228         
6229         * report.cs: Reset message stacks.
6230         
6231 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6232
6233         * generic.cs (InferInPhases): Correctly calculate params position.
6234         
6235 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6236
6237         * cs-tokenizer.cs: No need to parse full string when parsing lambda
6238         arguments.
6239
6240 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6241
6242         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
6243         
6244         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
6245         
6246         * driver.cs: Updated --help option.
6247         
6248 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6249
6250         * generic.cs (InferParamsTypeArguments): Removed.
6251         (InferInPhases): Add params type inference.
6252         (LowerBoundInference): Fixed scoring mechanism.
6253         
6254         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
6255         
6256 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
6257
6258         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
6259         byte array for unsigned "baked" assemblies.
6260
6261 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
6262
6263         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
6264         array for assemblies that are not strongnamed.
6265
6266 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6267
6268         A fix for bug #351481
6269         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
6270         declaring type for nested generic types.
6271         
6272 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6273
6274         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
6275         instead of ToString.
6276         
6277 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6278
6279         A fix for bug #351047
6280         * expression.cs (Binary.ResolveOperator): Allow equality operators between
6281         null and structs only when equality and inequality operators are defined
6282         either as an user-operators or predefined operators.
6283         
6284 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6285
6286         A fix for bug #351047
6287         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
6288         
6289 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6290
6291         A fix for bug #351257
6292         * cs-tokenizer.cs: Advance line number for '\r' correctly.
6293         
6294 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6295
6296         A fix for bug #351157
6297         * class.cs (Using): Fixed yet another broken cloning.
6298         
6299         (Block): Put back more sensible default value for statements.
6300         
6301 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
6302
6303         * codegen.cs: Allow AssemblyVersion with only major version component.
6304         Fixes bug #351055.
6305
6306 2007-12-29  Marek Safar  <marek.safar@gmail.com>
6307
6308         A fix for bug #324654
6309         * class.cs: Use FullName property as member name.
6310
6311 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6312
6313         A fix for bug #342117
6314         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
6315         constructor constraint.
6316
6317 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6318
6319         A fix for bug #338273
6320         * class.cs (ProbertyBase): Access modifier checks are required for overrides
6321         only.
6322
6323 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6324
6325         A fix for bug #350839
6326         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
6327
6328 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6329
6330         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6331         GHOP:
6332         
6333         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6334
6335         * statement.cs: Changed some Hashtables to use HybridDictionaries
6336         instead. It was observed that some HashTables only contained a few
6337         items in the vast majority of cases. Since HybridDictionary is
6338         more efficient on small sets (<10 elements), "known_variables"
6339         from class ExplicitBlock as well as "labels" and "constants " from
6340         class Block were changed to HybridDictionaries. 
6341
6342         Atsai results: (56216kb->54987kb)
6343
6344         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
6345
6346
6347 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6348
6349         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6350         GHOP:
6351         
6352         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6353         
6354         * expression.cs: foreach loop to for loop, saved on allocation of
6355         enumerator (59333kb->59141kb)
6356
6357         * statement.cs. Changed foreach loops to for loops, saved on
6358         allocation of enumerator (59141kb->59006kb)
6359
6360         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
6361         when constructed with no specified capacity. This was causing a
6362         few ArrayLists to allocate more memory than they would potentially
6363         need in the Block class and MemberCache class. Setting the
6364         ArrayLists to construct with a capacity of 1 saves some
6365         memory. (56216kb->55585kb)
6366
6367 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6368
6369         A fix for bug #347189 (2nd issue)
6370         * expression.cs (MemberAccess): Nested type can be found in base non-generic
6371         type.
6372
6373 2007-12-27  Miguel de Icaza  <miguel@novell.com>
6374         
6375         * report.cs: Do not use colors if stdout and stderr are not a
6376         terminal.
6377
6378 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6379
6380         A fix for bug #346998
6381         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
6382         overloads.
6383
6384 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6385
6386         A fix for bug #343465
6387         * class.cs: Explicit method name for nested types uses dots only.
6388
6389 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6390
6391         A fix for bug #343707
6392         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
6393
6394 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6395
6396         * ecore.cs: Report type inference errors only when arguments count matches
6397         parameter count.
6398         
6399         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
6400         
6401         * expression.cs, report.cs: New warning.
6402         
6403         * typemanager.cs: Catch anonymous method type too.
6404
6405 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6406
6407         A fix for bug #346379
6408         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6409
6410 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6411
6412         A fix for bug #347359
6413         * expression.cs (Invocation): Don't resolve already resolved expression.
6414
6415 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6416
6417         A fix for bug #347189
6418         * class.cs (FixedField): Use non-dependent code only in the define phase.
6419
6420 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6421
6422         A fix for bug #348076
6423         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6424
6425 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6426
6427         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6428         discovered extension methods.
6429
6430 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6431
6432         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6433         method.
6434
6435 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6436
6437         * report.cs (ErrorMessage): Add support for using colors on
6438         terminals that support it. 
6439
6440 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6441
6442         * ecore.cs: Use information about expanded params for error reporting.
6443
6444 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6445
6446         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6447         and logic for params overloads.
6448         
6449 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6450
6451         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6452         as this is also created from the parser.  Fixes #349034
6453
6454 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6455
6456         * statement.cs (Throw.CloneTo): it is valid to have empty
6457         expressions for throw. 
6458
6459 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6460
6461         * cs-parser.jay: Set delegate constraint parsing region correctly.
6462
6463 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6464
6465         A fix for bug #345467
6466         * typemanager.cs (IsEqual): Compare generic parameters position only.
6467         
6468 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6469
6470         * expression.cs (BaseAccess): Type arguments can be null.
6471
6472 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6473
6474         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6475         consistent even when an error has occured.
6476         (Switch.Resolve): Likewise.
6477
6478 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6479
6480         A fix for bug #334505
6481         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6482         overrides.
6483         
6484 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6485
6486         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6487         refactorings required to resolve extension methods correctly when mixing
6488         generics and non-generics members.
6489         
6490 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6491
6492         A fix for bug #342584
6493         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6494         conversion.
6495         
6496 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6497
6498         A fix for bug #342512
6499         * delegate.cs: Use delegate argument expression when is available. Don't
6500         emit virtual call when class is sealed.
6501         
6502 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6503
6504         A fix for bug #325423
6505         * assign.cs (FieldInitializer): Use resolved expression for emit.
6506         
6507         * class.cs: Print less confusing error message.
6508         
6509 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6510
6511         * cs-tokenizer.cs: Removed GMCS ifdefs.
6512         
6513         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6514         mcs.
6515         
6516         * cs-parser.jay: Disabled nullable check.
6517         
6518         * generic-mcs: Copied more generic stuff.
6519                 
6520 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6521
6522         * gcs-parser.jay: Merged to cs-parser.jay.
6523         
6524         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6525         * *.csproj, *.sources: Updated to use only jay parser file.
6526
6527 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6528
6529         * gcs-parser.jay: Added nullable and default expression feature checks.
6530         
6531 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6532
6533         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6534         it fixes many TODOs and hidden bugs.
6535         
6536         * expression: Removed duplicate error check.
6537
6538 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6539
6540         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6541         implicitly type local variable only when it is used in a declaration.
6542
6543 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6544
6545         * attribute.cs: Use CS0612 for empty strings.
6546
6547 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6548
6549         * lambda.cs, statement.cs: Contextual return may act as a statement.
6550
6551 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6552
6553         A fix for a regression cause by #324222
6554         * class.cs: Don't report unused even when it implements an interface.
6555         
6556 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6557
6558         A fix for bug #341205
6559         * ecore.cs, expression.cs: Method group expression cannot do static
6560         method access with an instance reference check before overloading takes
6561         a place.
6562         
6563 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6564
6565         A fix for bug #325359
6566         * class.cs: Use predictable name for automatically generated property.
6567         
6568 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6569
6570         A fix for bug #324996
6571         * expression.cs (Is): Handle case where D is nullable and T is not
6572         correctly.
6573         
6574         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6575         
6576 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6577
6578         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6579         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6580         Flush small error reporting changes.
6581         
6582 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6583
6584         A fix for bug #324996
6585         * expression.cs: Rewrote Is expression implementation to work with
6586         generics, nullable types, anonymous method. A const result expression 
6587         uses existing infrastructure instead of custom not fully-featured one.
6588         
6589 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6590
6591         A fix for bug #340202
6592         * class.cs: Consider generics for volatile field.
6593
6594 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6595
6596         A fix for bug #335594
6597         * expression.cs: Use conversion rules when handling string addition.
6598         
6599 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6600
6601         A fix for bug #336651
6602         * expression.cs: Fixed a crash when probing is on.
6603         
6604 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6605
6606         A fix for bug #324242
6607         * covert.cs: Added a conversion from any nullable-type with an 
6608         underlying enum-type to the type System.Enum.
6609         
6610 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6611
6612         A fix for bug #324222
6613         * class.cs: Report all non-used event fields.
6614         
6615 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6616
6617         A fix for bug #325161
6618         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6619         qualifier for generic types.
6620         
6621 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6622
6623         A fix for bug #322971
6624         * expression.cs, ecore.cs: Added intermediate result value check for
6625         indexers. 
6626         
6627 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6628
6629         A fix for bug #324754
6630         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6631         when it was requested.
6632
6633 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6634
6635         A fix for bug #325101
6636         * expression.cs: Do type not value comparison for `is' expression.
6637
6638 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6639
6640         A fix for bug #320236
6641         * convert.cs: Don't apply user conversion on underlying target type.
6642
6643 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6644
6645         * expression.cs: Don't use unresolved expression for error reporting.
6646  
6647 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6648
6649         A fix for bugs #337712, #324490
6650         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6651         overloading resolution too.
6652         
6653         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6654         the process consistent and more robust.
6655         
6656         * expression.cs, linq.cs, report.cs: Update.
6657
6658 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6659
6660         A fix for bug #332909
6661         * attribute.cs: Resolve attributes in correct context using error
6662         handling procedure.
6663         
6664         * rootcontext.cs: Define Obsolete attribute members as core members.
6665         
6666 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6667
6668         * statement.cs: Removed unused methods.
6669         
6670 2007-10-31  Wade Berrier  <wberrier@novell.com>
6671
6672         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6673         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6674         during 'make dist')
6675
6676 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6677
6678         A fix for bug #338102
6679         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6680         methods registered as non-generics.
6681         
6682 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6683
6684         A fix for bugs #337712, #324490
6685         * delegate.cs: Delegate covariance and contravariance is not allowed for
6686         value types.
6687         
6688 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6689
6690         A fix for bug #337719 
6691         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6692         `from' keyword.
6693         
6694 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6695  
6696         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6697
6698 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6699  
6700         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6701         query expressions.
6702
6703 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6704
6705         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6706
6707 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6708  
6709         A fix for bug #334652
6710         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6711         extension methods when we have not found the best candidate in normal
6712         container.
6713
6714 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6715
6716         * AssemblyInfo.cs: Keep up-to-date.
6717
6718 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6719
6720         * Makefile: Fixed generics compiler name.
6721         
6722 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6723
6724         * lambda.test: removed, lambda parsing is done differently.
6725         
6726         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6727
6728 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6729
6730         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6731
6732 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6733
6734         * Makefile, *.sources : All C# compilers are in mcs folder.
6735         
6736         * *.cs: Use existing 2_1 define for smcs.
6737
6738 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6739
6740         A fix for bug #335847
6741         * assign.cs, expression.cs: Couple of changes to avoid creating a
6742         temporary variable for each object initializer assignment statement. It
6743         simplifies struct initialization too, otherwise two temporary variables
6744         would be required.
6745         Implemented optimization of redundant default element initializers.
6746         
6747 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6748
6749         A fix for bug #336766
6750         * expression.cs (Class.CheckBase): Use generic name when method is
6751         generic.
6752         
6753 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6754
6755         A fix for bug #334737
6756         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6757         variable and not variable argument for prepared copies.
6758
6759 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6760
6761         A fix for bug #325110
6762         * class.cs, expression.cs, attribute.cs: Use open generic method when
6763         checking conditional attribute.
6764         
6765 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6766
6767         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6768         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6769         FeatureIsNotAvailable.
6770
6771 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6772
6773         ** C# 3.0 Partial methods
6774         
6775         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6776         methods support. Because of member cache issue with generics only
6777         non-generics partial methods are fully supported.
6778         
6779 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6780         
6781         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6782         generics and to use member cache for member checking. It also improves
6783         performance and fixes remaining overloads issues.
6784         
6785 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6786         
6787         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6788         roottypes.cs, typemanager.cs:
6789                 
6790         A member cache creation logic changed to add members immediately and
6791         not rely on fallback. The member cache is now only prefered way
6792         how to access and find type declaration members. It saves 5 MB of memory
6793         during MWF compilation and makes code ready for more optimizations and
6794         clean-ups, it's also a pre-requirement for partial methods.
6795         
6796 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6797
6798         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6799         handling for generic parameters.
6800
6801 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6802         
6803         * class.cs (FixedField): Removed redundant volatile check.
6804         
6805 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6806         
6807         * class.cs, decl.cs: Fixed overload members verification to do only one
6808         check per possible collision.
6809         
6810 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6811         
6812         A fix for bug #325478
6813         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6814         and create only one disposable flags container.
6815         
6816 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6817         
6818         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6819         * statement.cs (Fixed): Fixed variables cloning.
6820         
6821 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6822         
6823         A fix for bug #333342
6824         * class.cs (EventField): Don't mark value type event as synchronized. 
6825         
6826 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6827         
6828         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6829         inference to identify best candidate method correctly.
6830         (ProperyExpr): A range variable is read only and cannot be modified.
6831         
6832 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6833         
6834         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6835         logic to identify best candidate method correctly.
6836         
6837 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6838         
6839         * location.cs (Equals, GetHashCode): Removed.
6840         
6841 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6842         
6843         * report.cs: Implemented message recorder. It is used mainly for lambda
6844         expressions to capture otherwise swallowed error messages.
6845         
6846         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6847
6848         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6849         and not at the top.
6850         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6851                 
6852         * expression.cs (MemberAccess): Always report lookup failure.
6853         
6854         * location.cs: Implemented Equals, GetHashCode.
6855         
6856         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6857         
6858 2007-10-10  Jb Evain  <jbevain@novell.com>
6859
6860         * codegen.cs: re-enable assembly version check.
6861
6862 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6863         
6864         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6865         checks.
6866         
6867         * namespace.cs (UsingAlias): Do correct version check.
6868         
6869 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6870         
6871         * expresison.cs, ecore.cs: Issue extension method error message when
6872         appropriate.
6873         
6874         * rootcontext.cs: Added ISO_2 compiler mode option.
6875
6876 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6877         
6878         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6879          message.
6880         
6881 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6882         
6883         * attribute.cs (GetString, GetBoolean): Work with both literal and
6884         constant.
6885         
6886         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6887         Moved method overload specific methods to MethodGroupExpr.
6888         
6889         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6890         it should be less memory consuming.
6891         
6892 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6893
6894         * codegen.cs: remove the assembly version check until the buildbot is
6895         fixed.
6896
6897 2007-10-07  Jb Evain  <jbevain@novell.com>
6898
6899         * attribute.cs (Attribute.GetString): if the value
6900         expression is a StringConstant, return its string value.
6901
6902 2007-10-07  Jb Evain  <jbevain@novell.com>
6903
6904         * typemanager.cs: add `assembly_version_attribute_type`.
6905         * codegen.cs: on attribute emission, check that the
6906         AssemblyVersionAttribute doesn't overflow.
6907
6908 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6909         
6910         A fix for bug #324677
6911         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6912         parent container of a scope container with currently resolved one. 
6913         
6914 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6915         
6916         A fix for bug #325534
6917         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6918         only.
6919         
6920 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6921         
6922         A fix for bug #327504
6923         * class.cs (Operator.Define): Refactored implicit and explicit user
6924         operator conversion rules.
6925         
6926 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6927         
6928         A fix for bug #327520
6929         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6930         
6931 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6932         
6933         A fix for bug #328022
6934         * class.cs (MethodData.Define): Use correct method to check whether
6935         a method implementents an accessor.
6936         
6937 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6938         
6939         A fix for bug #330069
6940         * statement.cs (Fixed.Resolve): Read the first array element only when
6941         an array is instantiated. 
6942         
6943 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6944         
6945         * expression.cs, assign.cs, generics.cs: Print correct operator when
6946         compound assignment is used.
6947         
6948 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6949         
6950         A fix for bug #325841
6951         * expression.cs (ArrayAccess): Use full argument cloning only for
6952         string compound concatenation.
6953         
6954 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6955         
6956         A fix for bug #328774
6957         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6958         assignment.
6959         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6960         assignment.
6961
6962 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6963
6964         Fix #328490
6965         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6966         Event accessibility checks here.  Remove some bogus code that
6967         accidently made GenericMethods work.
6968         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6969
6970 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6971         
6972         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6973         
6974         * statement.cs (Block): Refactored AddVariable to allow error handling
6975         customization.
6976         
6977         * generic.cs: New stub.
6978         
6979 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6980         
6981         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6982         flag.
6983         
6984 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6985
6986         * class.cs: Use partial container to record whether any partial part
6987         contains static field initializer and therefore default contructor has
6988         to be defined.
6989         
6990 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6991
6992         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6993         mono-list when only one of two partial parts has defined accessibility
6994         modifier.
6995         
6996 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6997
6998         A fix for bug #82845
6999         
7000         * class.cs (TypeContainer): Set correct resolve context for all field
7001         initializers.
7002         
7003 2007-09-13  Marek Safar  <marek.safar@gmail.com>
7004
7005         * assign.cs: Fixed a crash when field is resolved twice with an error.
7006         
7007         * codegen.cs: Changed InFieldInitializer to be flag.
7008         
7009         * anonymous.cs, ecore.cs, expression.cs: Update after
7010         IsInFieldInitializer rename.
7011         
7012         * const.cs: Removed unused parameter.
7013         
7014         * class.cs: Changed the way how we resolve and emit field initializers.
7015         The field initilizers have to have access to contructor block to emit
7016         compiler generated code.
7017
7018 2007-09-13  Marek Safar  <marek.safar@gmail.com>
7019
7020         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
7021         generics use TypeContainer instead.
7022         
7023 2007-09-12  Marek Safar  <marek.safar@gmail.com>
7024         
7025         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
7026
7027         * lambda.cs (ResolveParameters): Use more powerful
7028         InflateGenericArgument.
7029         
7030         * parameters.cs: Better exception message.
7031                 
7032 2007-09-10  Marek Safar  <marek.safar@gmail.com>
7033
7034         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
7035         correct expression block type. 
7036         
7037         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
7038         
7039         * expression.cs (Invocation): Extracted method group resolve to
7040         DoResolveOverload.
7041         
7042 2007-09-07  Marek Safar  <marek.safar@gmail.com>
7043
7044         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
7045         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
7046         
7047         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
7048         generic extension methods.
7049
7050 2007-09-06  Marek Safar  <marek.safar@gmail.com>
7051
7052         A fix for bug #82676 (Do I get it right now?)
7053         * convert.cs (Binary.ResolveOperator): An interface is converted to the
7054         object before a standard conversion is applied.
7055         
7056 2007-09-06  Marek Safar  <marek.safar@gmail.com>
7057
7058         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
7059         #82676.
7060         
7061 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7062
7063         A fix for bug #82676
7064         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
7065         non-generic interface types.
7066         
7067 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7068
7069         A fix for bug #82690
7070         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
7071         
7072 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7073
7074         A fix for bug #82571
7075         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
7076         modifier for container based methods.
7077         
7078 2007-09-05  Marek Safar  <marek.safar@gmail.com>
7079
7080         A fix for bug #82676
7081         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
7082         any interface-type T means to any of interface type T.
7083
7084 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7085
7086         * namespace.cs: We have 2 versions of System.Core assembly.
7087
7088 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7089
7090         A fix for bug #82652
7091         * class.cs (Class.GetClassBases): Compare types and not expressions.
7092
7093 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7094
7095         A fix for bug #82620
7096         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
7097         actually never worked before.
7098         (IndexerAccess): Emit prepared arguments before they are modified.
7099         
7100 2007-09-04  Marek Safar  <marek.safar@gmail.com>
7101
7102         A fix for bug #82563
7103         * assign.cs: Revert wrong fix.
7104         
7105         * expression.cs (VariableReference.EmitAssign): Handle ref reference
7106         correctly.
7107         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
7108         Instead of ldelema/stdind we have to use temporary variables to handle
7109         cases like String.Concat (params string[]).
7110         
7111 2007-08-31  Marek Safar  <marek.safar@gmail.com>
7112
7113         * class.cs: EmitAttributes to Emit rename.
7114         
7115         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
7116         null.
7117         (MemberCore.HasClsCompliantAttribute): Don't depend on 
7118         GetClsCompliantAttributeValue execution.
7119         
7120 2007-08-31  Marek Safar  <marek.safar@gmail.com>
7121
7122         * anonymous.cs: Use shorter type prefix.
7123         
7124         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
7125         when exist.
7126         
7127         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
7128         variables when probing is on.
7129         
7130         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
7131         unresolved variables.
7132         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
7133         handle transparent identifiers.
7134         
7135 2007-08-26  Marek Safar  <marek.safar@gmail.com>
7136
7137         * attribute.cs (IsClsCompliant): Add nullable types test.
7138         
7139 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
7140
7141         * doc.cs : catch other types of exception than XmlException to
7142           report CS1570. Fixed bug #82565.
7143
7144 2007-08-23  Marek Safar  <marek.safar@gmail.com>
7145
7146         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
7147         The number of delegate parameters has to match.
7148         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
7149         arrays.
7150
7151 2007-08-21  Marek Safar  <marek.safar@gmail.com>
7152
7153         * anonymous.cs (AnonymousMethod): Generate private anonymous method
7154         to fix problem with private arguments.
7155
7156 2007-08-20  Marek Safar  <marek.safar@gmail.com>
7157
7158         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
7159         
7160         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
7161         
7162         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
7163         empty. Add cloning suport.
7164         
7165         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
7166
7167 2007-08-20  Marek Safar  <marek.safar@gmail.com>
7168
7169         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
7170         to create EmptyCast. It handles EmptyConstantCast specialization for
7171         constants.
7172         
7173 2007-08-18  Marek Safar  <marek.safar@gmail.com>
7174
7175         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
7176         (EmitArrayArgument): One routine for array arguments.
7177         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
7178         
7179 2007-08-17  Marek Safar  <marek.safar@gmail.com>
7180
7181         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
7182
7183 2007-08-17  Marek Safar  <marek.safar@gmail.com>
7184
7185         * anonymous.cs: MemberLookupFinal update.
7186
7187         * class.cs (ConstructorInitializer): Is expression based.
7188         
7189         * delegate.cs: MethodGroupExpr update.
7190         
7191         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
7192         messages.
7193         (Error_MemberLookupFailed): Customizable error override.
7194         (MethodGroupExpr): Keep queried type for later usage.
7195         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
7196         resolve.
7197         
7198         * expression.cs: Error_MemberLookupFailed refactoring.
7199         (New.DoResolve): Resolve as much as possible.
7200         (ElementInitializer.Error_MemberLookupFailed): Object initializer
7201         customization for invalid member types.
7202
7203         * statement.cs: MethodGroupExpr update.
7204         
7205 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7206
7207         * modifier.cs (Check): Check all modifiers and not only accessibility
7208         ones.
7209
7210 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7211
7212         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
7213         type and not an expression.
7214
7215 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7216
7217         * statement.cs (Catch.Clone): Type and variable can be null.
7218
7219 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7220
7221         A fix for bug #81979
7222         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
7223         I am really not sure whether this is the best fix.
7224         
7225         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
7226         only once.
7227         
7228 2007-08-14  Marek Safar  <marek.safar@gmail.com>
7229
7230         ** C# 3.0 Object and collection initializers (major re-write)
7231         
7232         * assign.cs (DoResolve): Initializers are not assign related.
7233         
7234         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
7235         used during collection or object initialization.
7236         
7237         * expression.cs (Error_InvalidArguments): Add initializers specific
7238         messages. More will come later because it requires some general
7239         refactoring.
7240         (New.DoResolve): Better error handling for unsafe types.
7241         (EmptyExpressionStatement): New class.
7242         (ElementInitializer): An object initializer expression.
7243         (CollectionElementInitializer): A collection initializer expression.
7244         (CollectionOrObjectInitializers): A block of object or collection
7245         initializers.
7246         (NewInitialize): New expression with element/object initializers.
7247         
7248         * statement.cs: Reverted object/collection initializer hacks.
7249         
7250         * typemanager.cs (CSharpName): Filter __arglist type.
7251         
7252 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7253
7254         ** C# 3.0 Anonymous Types (update to the latest standard)
7255         
7256         * expression.cs (Binary.ResolveOperator): Threat all null based types
7257         same.
7258         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
7259         (AnonymousTypeParameter): Updated.
7260         
7261         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
7262         (AnonymousTypeClass): New anonymous type container.
7263         
7264         * class.cs (AddField): Return operation result.
7265         
7266         * generic.cs: Another empty TypeArguments overload.
7267         
7268         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
7269         are stored at top of normal hierarchy.
7270         
7271         * typemanager.cs (CSharpName): Filter anonymous types.
7272         
7273 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7274
7275         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
7276         as single Concat call. How could we miss that :-(
7277         
7278 2007-08-08  Marek Safar  <marek.safar@gmail.com>
7279
7280         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
7281         
7282 2007-08-07  Miguel de Icaza  <miguel@novell.com>
7283
7284         * expression.cs: Fix the previous commit, the creation of the
7285         arguments array list needs also to be conditional on the arguments
7286         not being null.
7287
7288         * class.cs: Add a little bit of help to help narrow down problems.
7289
7290         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
7291         not try to copy in that case. 
7292
7293         * driver.cs: When building SMCS, include a new different set of
7294         default assemblies here.   Do this here so we can control whether
7295         to include the default assemblies with /noconfig.
7296
7297 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7298
7299         A fix for bug #81979
7300         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
7301         only.
7302
7303 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7304
7305         A fix for bug #82300
7306
7307         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
7308         we are in probing scope.
7309
7310 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7311
7312         A fix for bug #82301
7313
7314         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
7315         (Statement.CloneTo): Clone and not map children blocks.
7316
7317 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7318
7319         A fix for bug #82299
7320
7321         * expression.cs (LocalVariableReference.CloneTo): Remap local info
7322         variable too.
7323         
7324         * statement.cs (Statement.CloneTo): Clone variables before statements
7325         to allow remaping of local variables.
7326
7327 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7328
7329         A fix for bug #82296
7330
7331         * anonymous.cs,
7332         * report.cs: Log crash details for future clone problems.
7333         
7334         * statement.cs (Return.Clone): Don't clone non-existent expression.
7335
7336 2007-08-03  Raja R Harinath  <harinath@gmail.com>
7337
7338         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
7339         (Class.AddBasesForPart): Move CS0537 check here from ...
7340         * cs-parser.jay (class_declaration): ... here.  Move calling of
7341         'AddBasesForPart' to ...
7342         (class_bases): ... here.
7343         (struct_declaration, interface_declaration): Update to changes.
7344
7345 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7346
7347         A fix for bug #81923
7348
7349         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
7350         conversion is allowed.
7351
7352 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7353
7354         A fix for bug #81564
7355
7356         * ecore.cs (EventExpr): Add IsBase handling.
7357
7358         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
7359         too.    
7360         
7361 2007-08-02  Raja R Harinath  <harinath@gmail.com>
7362
7363         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
7364         * cs-parser.jay: Some whitespace cleanups.
7365         (current_delegate): New.
7366         (type_name): New.
7367         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
7368         a dummy code block, and use 'type_name' instead of 'member_name'.
7369         (interface_declaration, class_declaration): Likewise.
7370         (delegate_declaration): Likewise.  Rearrange slightly and use
7371         'current_delegate'.
7372         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
7373         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
7374
7375 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7376
7377         A fix for bug #82039
7378
7379         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
7380         available.
7381
7382         * typemanager.cs (CSharpName): Split to string overload.
7383
7384 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7385
7386         * expression.cs,
7387         * report.cs: Updated warning CS0472.
7388
7389 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7390
7391         A fix for bug #82181
7392         * cs-parser.jay,
7393         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
7394
7395 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7396
7397         A fix for bug #82277
7398         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
7399
7400 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7401
7402         ** C# 3.0 Type Inference (major bits are working)
7403         
7404         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
7405         (.ImplicitStandardConversionExists): Uses compatible.
7406         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7407         (.InferReturnType): New method.
7408         (.Compatible): Refactored.
7409         (.ResolveParameters): Uses factory to create resolved parameters.
7410         (.CompatibleMethod): Add probing mode support.
7411         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7412         clearly distinguish between 2 different operations.
7413         (LambdaMethod): Moved to lambda.cs.
7414         (AnonymousMethod): Removed unused fields and methods.
7415         (AnonymousDelegate): Simplified.
7416         
7417         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7418         
7419         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7420         
7421         * delegate.cs (Delegate): New mehods to reduce code duplication.
7422         (.GetConstructor): New method.
7423         (.GetInvokeMethod): New method.
7424         (DelegateCreation): Updated.
7425         
7426         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7427         does not exist.
7428         (OverloadResolve): Made probing little bit faster.
7429         
7430         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7431         when probing is on.
7432         
7433         * generic.cs (TypeInferenceContext): Dummy implementation.
7434         
7435         * iterators.cs: Updated after Resolve/Define rename.
7436         
7437         * lambda.cs (LambdaExpression)
7438         (.ResolveParameters): Handles both type of arguments and type inference too.
7439         
7440         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7441         (InflateTypes): Updated.
7442         
7443         * support.cs (InflateTypes): Changed signature and updated.
7444         
7445         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7446         (MemberLookup_FindMembers): More MS tricks.
7447         (GetParameterData): Ditto.
7448         (GetDelegateParameters): Uses quick path for dynamic types.
7449         
7450 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7451
7452         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7453         only.
7454
7455 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7456
7457         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7458         syntax.
7459         
7460 2007-07-26  Jb Evain  <jbevain@novell.com>
7461
7462         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7463         which takes a boolean 'report_errors', similar to the GetMethod.
7464         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7465         in .net 2.1, do not report errors here.
7466
7467         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7468         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7469         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7470         in .net 2.1.
7471
7472         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7473         of the type InternalsVisibleToAttribute before the first call
7474         to CoreLookupType which is allowed to fail (third boolean parameter
7475         to true). Because, during the resolution for a type that is not
7476         immediately found, we try to check if the type is not defined in
7477         a friend assembly, and to do so, we need the
7478         InternalVisibleToAttribute.
7479
7480 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7481
7482         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7483         feature that allows structs to be compared against null and inline
7484         the result as true or false.
7485
7486         Notice that the same code is not permitted inside a generic block
7487         of code that would do:
7488
7489         class Foo<T> where T : struct {
7490             bool Eval (T x)
7491             {
7492                  return x == null;
7493             }
7494         }
7495
7496         It is only allowed if the type of T is not bound (no where
7497         clause).   In my opinion, this CSC 2 behavior is broken but people
7498         seem to be using it (IronRuby does, a few bug reports on bugzilla
7499         have it and some people have complained about it).
7500
7501         All of the users that depend on this behavior have code that is
7502         very likely broken. 
7503         
7504         * report.cs (Warning, Error): make these take object arguments,
7505         not strings, as that allows us to take advantage of Format.
7506
7507 2007-07-20  William Holmes  <billholmes54@gmail.com>
7508
7509         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7510           Left member variable for the Count.
7511         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7512           MemberName.CountTypeArguments to avoid a NRE. 
7513
7514         This code is contributed under the MIT X11 license
7515
7516 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7517
7518         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7519
7520 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7521
7522         * doc.cs : generic method arguments are written as ``x while generic
7523           type arguments are `x. Combined with the previous change, fixed bug
7524           #79706.
7525
7526 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7527
7528         Fix #82120
7529         * expression.cs (Binary.ResolveOperator): When converting
7530         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7531
7532 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7533
7534         * doc.cs : when T: or whatever x: is specified, it does not really
7535           check the doc comment's syntax correctness. Fixed bug #82006.
7536
7537 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7538
7539         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7540         LambdaExpression better.
7541         
7542         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7543         
7544         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7545         
7546         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7547         as it can be generated.
7548         
7549         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7550         modifiers.
7551         
7552         * lambda.cs (LambdaExpression): Refactored to share same code with
7553         AnonymousMethodExpression.
7554         
7555 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7556
7557         * anonymous.cs (MakeName): Include host name for easier debugging.
7558         (LambdaMethod): New class for lambda spcecific stuff.
7559         
7560         * attribute.cs: Set EmitContext return type.
7561
7562         * class.cs: Set EmitContext return type.
7563         
7564         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7565         with null/void meaning.
7566         
7567         * iterators.cs (ContainerType): Implemented.
7568         
7569         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7570         
7571         * statement.cs (Return): Updated to lambda expressions.
7572         (Block.CloneTo): Parent can be null.
7573                 
7574 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7575
7576         A fix for bug #81917
7577         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7578         
7579         * class.cs (FixedField): Check whether field is in unsafe scope.
7580
7581         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7582         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7583
7584         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7585         FieldExpr.
7586         
7587         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7588                 
7589 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7590
7591         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7592         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7593         from Report class.
7594
7595 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7596
7597         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7598         
7599 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7600
7601         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7602         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7603         
7604         * codegen.cs(EmitContext): Add ProbingMode flag.
7605         
7606         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7607         
7608         * driver.cs: For now set both warning values.
7609         
7610         * ecore.cs (SimpleName): Name is readonly.
7611         (MethodGroup.OverloadResolve): One quick path for probing.
7612         
7613         * expression.cs (Unary): Set Oper r/o.
7614         (Binary): Set Oper r/o.
7615         (ParameterReference): Set few instance variables as r/o.
7616         (ParameterReference.DoResolveBase): Don't capture aruments when 
7617         the probing is on.
7618         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7619         (Arglist): arguments are private.
7620         (SizeOf): type is private and r/o.
7621         (MemberAccess): arguments are private.
7622
7623         * report.cs: Enhanced reporting on/off capabilities.
7624         
7625         * lambda.cs: Uses ec.IsInProbingMode.
7626         (ContextualReturn): Derives from return.
7627         
7628         * rootcontext.cs: For now set both warning values.
7629         
7630         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7631         copy if one exists.
7632         (Return.Resolve): Don't die immediately.
7633         (Block.Resolve): Speed-up probing.
7634         (Block.CloneTo): Clone only child blocks.
7635
7636 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7637
7638         * iterators.cs: reverted Miguel's latest change (r81925) as it
7639         breaks the build in System.
7640
7641 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7642
7643         * iterators.cs (Yield.CheckContext): Check for the iterator type
7644         also here as we can call into Yield even in codepaths that are not
7645         directly checked by
7646         (MethodOrOperator is the only path that was checked).
7647
7648         In addition to the standard check, use a more specific check for
7649         constructors to report a more verbose error. 
7650
7651 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7652
7653         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7654         report the warning and continue 
7655
7656         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7657         values on the stack on the call to Emit.   Use EmitStatement if
7658         possible, or using Emit + Pop if not possible.   Fixes #82064
7659
7660 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7661
7662         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7663         avoid try...finally in some cases.
7664
7665 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7666
7667         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7668         
7669         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7670         instead of method. Re-use standard error handling.
7671         (ConstructorInitializer.Emit): Simplified.
7672         
7673         * delegate.cs: Updated after Invocation.EmitCall change.
7674         
7675         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7676         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7677         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7678         method and don't permanently changing input arguments.
7679         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7680         is resolved it has one of the candidates is the best one which is later
7681         used to emit. Removed a few unused method.
7682         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7683
7684         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7685         (Binary.ResolveOperator): Ditto.
7686         (ConditionalLogicalOperator.DoResolve): Ditto.
7687         (Invocation): Uses method group.
7688         (Invocation.DoResolve): Simplified.
7689         (Invocation.EmitCall): Removed useless is_static.
7690         (Invocation.Emit): Delegate to method group.
7691         (Invocation.EmitStatement): Simplified.
7692         (New): Uses method group.
7693         (MemberAccess.DoResolve): Don't destroy original expression.
7694         
7695         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7696         
7697 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7698
7699         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7700         
7701         * anonymous.cs,
7702         * lambda.cs: Add custom error message type.
7703
7704 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7705
7706         * lambda.cs: Simplified little bit.
7707         
7708         * parameter.cs: Introduced ImplicitLambdaParameter.
7709         (Parameters.CreateFullyResolved): New factory instead of ctor.
7710         
7711         * anonymous.cs,
7712         * class.cs,
7713         * delegate.cs: Updated parameter creation.
7714         
7715 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7716
7717         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7718         arguments.
7719         
7720         * generic.cs: Synchronized with gmcs.
7721         
7722 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7723
7724         * class.cs (Indexer): Check return type as soon as possible.
7725         
7726         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7727         members too.
7728         
7729         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7730         
7731         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7732         
7733         * parameter.cs (Parameter): Use expression type when it is available.
7734         
7735         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7736         method modifier for the first parameter only.
7737
7738 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7739
7740         A fix for bug #81938
7741         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7742         
7743         * constant.cs: Tide up an exception message.
7744
7745 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7746
7747         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7748         an uninitialized variable is used.
7749         
7750         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7751
7752 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7753
7754         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7755         not found error handling.
7756
7757         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7758         simplified.
7759         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7760         (ArrayCreation.DoResolve): Simplified.
7761         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7762         its own resolve process.
7763         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7764
7765 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7766
7767         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7768         more error details.
7769         
7770 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7771
7772         * cs-tokenizer.cs: Removed var related stuff.
7773         
7774         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7775         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7776         a type and a keyword at same time.
7777         
7778         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7779         matches to "var".
7780         
7781         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7782         implicitly typed arrays, more changes will follow.
7783         
7784         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7785         
7786 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7787
7788         * ecore.cs (VarExpr): Removed Handled field.
7789         
7790         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7791         build-in assign functionality.
7792         (ForEach.Resolve): Removed all implicitly typed local variable code and
7793         simplified.
7794         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7795         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7796
7797 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7798
7799         * assign.cs: Removed implicitly typed local variable check.
7800         
7801         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7802         referencing implicitly typed local variable.
7803         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7804         variable here.
7805         
7806         * statement.cs (Fixed): Removed unsupported implicitly typed local
7807         variable code.
7808
7809 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7810
7811         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7812
7813 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7814
7815         A fix for bugs #81855 and #76274
7816         * attribute.cs (AttachTo): Always set owner for global attributes to
7817         prefined owner.
7818         
7819         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7820         usefull too.
7821         
7822         * cs-parser.jay: Assembly and module attributes must precede all other
7823         elements except using clauses and extern alias declarations.
7824
7825 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7826
7827         A fix for bug #81748
7828         * cs-tokenizer.cs,
7829         * expression.cs: More checks for non ISO-1 features.
7830
7831 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7832
7833         A fix for bug #81807
7834         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7835         present inside switch statement and it is required by nullable check.
7836
7837 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7838
7839         A fix for bug #81840
7840         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7841         when type matching fails.
7842         
7843         * namespace.cs: Tiny error message change.
7844
7845 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7846
7847         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7848         reporting. Added automatic property check.
7849         
7850         * class.cs: Updated after CheckAbstractAndExtern relocation.
7851         (AEventPropertyAccessor.GetSignatureForError): Customized.
7852         
7853 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7854
7855         * class.cs (DefineBaseTypes): Base type can be undefined.
7856         
7857         * ecore.cs (TypeLookup): Minor refactoring.
7858         (DoResolveAsTypeStep): Removed redundant check.
7859
7860         * namespace.cs (Lookup): Removed redundant check.
7861                 
7862         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7863         ResolveAsTypeTerminal step.
7864         (BootstrapCorlib_*): Simplified.
7865         (PopulateCoreType): Core types can be now external.
7866
7867 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7868
7869         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7870          verification only.
7871          (InferTypeArguments): Infers anonymous expression type arguments.
7872          (Compatible): Split to Compatible and InferTypeArguments. 
7873         
7874         * lambda.cs: Updated.
7875
7876 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7877
7878         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7879
7880 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7881
7882         Fix #80477, cs0135-2.cs, cs0135-3.cs
7883         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7884         names to the "known" variables list.
7885         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7886         parameter names are also "known".
7887         (Block.CheckError136): Remove.
7888         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7889         null.
7890
7891 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7892
7893         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7894
7895 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7896
7897         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7898         internal error not an user error.
7899          
7900         * expression.cs (IsApplicable): Refactored to make debugging easier.
7901
7902         * support.cs: More tricks for non-mono runtimes.
7903         
7904         * typemanager.cs (CoreLookupType): Made public.
7905         (InitSystemCore): All linq specific stuff moved to linq.cs
7906
7907 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7908
7909         * typemanager.cs (CSharpSignature): One more missing build-in types
7910         replacement.
7911         More tricks for non-mono runtime.
7912
7913 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7914
7915         * statement.cs (Block.CheckError136_InParents): Remove.
7916         (Block.AddVariable): Use GetParameterInfo instead.
7917         (ToplevelBlock.ProcessArguments): Likewise.
7918
7919 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7920
7921         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7922         information too.
7923         (ToplevelBlock.GetParameterInfo): Split out of ...
7924         (ToplevelBlock.GetParameterRefernce): ... this.
7925         (ToplevelBlock.ParameterMap): Remove.
7926         * expression.cs (ParameterReference): Update to use
7927         ToplevelParameterInfo.
7928
7929         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7930         regression.
7931
7932         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7933         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7934
7935         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7936         (ToplevelBlock.ProcessParameters) ... here.
7937         (ToplevelBlock..ctor): Invoke it.
7938
7939         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7940         new parameters.
7941
7942         * statement.cs (IKnownVariable): New interface.
7943         (LocalInfo): Implement it.
7944         (ToplevelParameterInfo): New class.
7945         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7946         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7947         GetKnownVariableInfo.
7948
7949 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7950
7951         Partly speed up CS0136 error checks.
7952         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7953         'recurse' parameter.
7954         (Block.DoCheckError136): Only check errors in parameters.  Move
7955         local variable checks ...
7956         (Block.AddVariable): ... here, and ...
7957         (ToplevelBlock.ResolveMeta): ... here.
7958
7959 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7960
7961         * statement.cs (Block.IsChildOf): Remove.
7962
7963         * statement.cs (Statement.Clone): Move special case code ...
7964         (Block.CloneTo): ... here.
7965
7966 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7967
7968         * statement.cs (ToplevelBlock.container): Remove field.  It's
7969         redundant with 'Parent'.
7970         (ToplevelBlock.ContainerBlock): Remove accessor.
7971         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7972         child with parent here, ...
7973         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7974         current_block.
7975         (start_anonymous): Don't save current_block.
7976         (top_current_block): Remove.
7977
7978         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7979         (Block.Resolve): Update to changes.
7980         (Block..ctor): Move setting of "correct" 'Toplevel'
7981         and 'Explicit' fields to ...
7982         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7983
7984 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7985
7986         Kill Block.Implicit
7987         * statement.cs (Block.Implicit): Remove.
7988         (Block): Update to changes.
7989         * flowanalysis.cs: Likewise.
7990
7991         Mildly speed up CheckInvariantMeaningInBlock
7992         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7993         Recursively call AddKnownVariable to all enclosing blocks.
7994         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7995         Remove recursive calls.
7996         (Block): Update to changes.
7997
7998         New ExplicitBlock invariants
7999         * statement.cs (Block.Explicit): New field.  It points to the
8000         immediately enclosing non-implicit block.
8001         (Block..ctor): Maintain the invariant.
8002         * cs-parser.jay: Take advantage of invariant.
8003
8004         Introduce ExplicitBlock
8005         * statement.cs (ExplicitBlock): New.
8006         (ToplevelBlock): Derive from it.
8007         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
8008         sense of flag.
8009         (Block.Implicit): Update to changes.
8010         * cs-parser.jay: Update to changes.
8011
8012         Remove unused field
8013         * codegen.cs (EmitContext.IsLastStatement): Remove.
8014         * statement.cs (Block.DoEmit): Update to changes.
8015
8016 2007-05-25  Raja R Harinath  <rharinath@novell.com>
8017
8018         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
8019         modifying current_block directly.
8020
8021 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
8022         
8023         * class.cs: Implemented automatic properties (C# 3.0)
8024           Thanks to Marek for the help.
8025
8026 2007-05-23  Raja R Harinath  <rharinath@novell.com>
8027
8028         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
8029         variable as assigned, note also that all its components are
8030         assigned too.
8031         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
8032
8033 2007-05-19  Marek Safar  <marek.safar@gmail.com>
8034
8035         * anonymous.cs, class.cs: Emit Compiler generated attribute when
8036         member is marked as compiler generated.
8037         
8038         * decl.cs (MemberCore): Refactored ModFlags into property.
8039
8040         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
8041         (Check): Check only accessibility modifiers.
8042
8043 2007-05-18  Raja R Harinath  <rharinath@novell.com>
8044
8045         Track all assignable slots in one bit array
8046         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
8047         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
8048         logic from VariableMap constructor here.  Use the same 'offset'
8049         variable that's later used for computing offsets of local
8050         variables.
8051         * flowanalysis.cs (UsageVector.parameters): Remove.
8052         (UsageVector): Update to changes.
8053         (VariableMap): Remove.
8054
8055         Avoid creating ParameterMap in every block
8056         * statement.cs (Block.ParameterMap): Move ...
8057         (ToplevelBlock.ParameterMap): ... here.
8058         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
8059         only once.
8060         * flowanalysis.cs (FlowBranching.param_map): Remove.
8061         (FlowBranching.UsageVector): Update to changes.
8062         (FlowBranchingToplevel.CheckOutParameters): Likewise.
8063
8064         * statement.cs (Block.CloneTo): Clone Toplevel field too.
8065
8066         * expression.cs (ParameterReference): Distinguish between block
8067         where parameter was referenced and declared.
8068
8069 2007-05-18  Marek Safar  <marek.safar@gmail.com>
8070
8071         * flowanalysis.cs, statement.cs: Put back improved error handling.
8072
8073 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
8074         
8075         * assign.cs:
8076         * expression.cs:
8077           Imporved object and collection initialization (C# 3.0).
8078
8079 2007-05-15  Marek Safar  <marek.safar@gmail.com>
8080
8081         A fix for bug #81380
8082         * expression.cs (Is.DoResolve): Only value types have constant `is'
8083         behaviour.
8084
8085 2007-05-15  Raja R Harinath  <rharinath@novell.com>
8086
8087         * statement.cs (ToplevelBlock.child): Remove.
8088
8089 2007-05-15  Raja R Harinath  <harinath@gmail.com>
8090
8091         Rationalize ResolveMeta: refactoring
8092         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
8093         out constant handling code into ...
8094         (Block.DoResolveConstants): ... this.
8095
8096         Rationalize ResolveMeta: kill local_map
8097         * statement.cs (Block.local_map, Block.LocalMap): Remove.
8098         (Block.AssignableSlots): New.
8099         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
8100         for locals -- move code from VariableMap here.  Avoid unnecessary
8101         allocations.
8102         * flowanalysis.cs (FlowBranching.local_map): Remove.
8103         (FlowBranching..ctor): Use Block.AssignableSlots.
8104         (VariableMap): Remove unused constructors.
8105
8106 2007-05-11  Raja R Harinath  <rharinath@novell.com>
8107
8108         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
8109
8110 2007-05-11  Marek Safar  <marek.safar@gmail.com>
8111
8112         * typemanager.cs (IsFriendAssembly): Should not be called for building
8113         assembly.
8114
8115 2007-05-09  Marek Safar  <marek.safar@gmail.com>
8116
8117         * literal.cs (NullConstant): Print null in all cases.
8118         
8119         * expression.cs (Binary.ResolveOperator): Implemented delegate
8120          comparison based on C# 2.0 changes.
8121
8122 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
8123
8124         This code is contributed under the MIT X11 license
8125         
8126         The following enables support for several C# 3.0 language features:
8127         
8128         * cs-tokenizer.cs: Added support for the "var" keyword.
8129         
8130         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
8131           Added VarExpr class to facilitate type inferencing.
8132         
8133         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
8134           to support anonymous types.
8135         
8136         * assign.cs: Added support for type inferencing and initialization.
8137         
8138         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
8139         
8140         * expression.cs: Added implicit array support to ArrayCreation.
8141           Added 5 types and 1 interface:
8142           
8143           IInitializable                Implementing classes can inject initializing
8144                                         statements after object instantiation.
8145           
8146           Initializer                   Stores data for object initialization.
8147           
8148           AnonymousType                 An expression for anonymous types.
8149           
8150           AnonymousTypeParameter        Stores data about an anonymous type's field.
8151           
8152           NewInitialize                 An expression for object initialization.
8153           
8154           CollectionInitialize          An expression for collection initialization.
8155         
8156         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
8157           statements.
8158
8159 2007-05-06  Marek Safar  <marek.safar@gmail.com>
8160
8161         A fix for bug #81500
8162         * cs-tokenizer.cs: Add special handling for coalescing operator.
8163
8164 2007-05-06  Marek Safar  <marek.safar@gmail.com>
8165
8166         A fix for bug #81529
8167         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
8168         its value from base class until it is redefined.
8169
8170 2007-05-02  Raja R Harinath  <rharinath@novell.com>
8171
8172         Fix regression in cs0631-3.cs
8173         * cs-parser.jay (operator_declarator): Add opt_attributes to error
8174         fallback.  Make error fallback catch more cases.
8175
8176 2007-05-01  Miguel de Icaza  <miguel@novell.com>
8177
8178         * cs-parser.jay: Allow parameters in operator declarations to have
8179         attributes. 
8180
8181 2007-04-27  Miguel de Icaza  <miguel@novell.com>
8182
8183         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
8184         exists. 
8185
8186         * lambda.cs (ContextualReturn.Resolve): An expression is valid
8187         inside the ContextualReturn, it does not have to be an
8188         ExpressionStatement. 
8189
8190 2007-04-24  Miguel de Icaza  <miguel@novell.com>
8191
8192         * lambda.cs (ContextualReturn.Resolve): if the return type is not
8193         set, set it.
8194
8195 2007-04-23  Miguel de Icaza  <miguel@novell.com>
8196
8197         * anonymous.cs (AnonymousContainer): split the virtual Resolve
8198         method in two methods: ResolveNoDefine and Resolve.
8199
8200         ResolveNoDefine will stop just after ResolveTopBlock has been
8201         called.   
8202
8203         Resolve will then continue by creating a method and issuing the
8204         call to method.Define ().
8205
8206         (AnonymousMethod): Split and implement the new Resolve and
8207         ResolveNoDefine as well.
8208
8209         * lambda.cs (LambdaExpression): Split the anonymous method
8210         resolution code into a separate routine (CoreCompatibilityTest)
8211         from DoCompatibleTest.
8212
8213         (LambdaExpression.TryBuild): New method, this method tries to
8214         build the LambdaExpression with the given set of types to be used
8215         as the types for the various parameters of the lambda expression. 
8216
8217         If the compilation succeed with the given types, the infered type
8218         of the Anonymous method is returned, otherwise null is returned.
8219
8220 2007-04-23  Marek Safar  <marek.safar@gmail.com>
8221
8222         A fix for bug #81414
8223         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
8224
8225 2007-04-22  Miguel de Icaza  <miguel@novell.com>
8226
8227         * cs-tokenizer.cs: Change various identifiers here from the
8228         camelCasing to the recommended Linux-like style for instance
8229         variables from the Coding Guidelines. 
8230
8231 2007-04-19  Martin Baulig  <martin@ximian.com>
8232
8233         * convert.cs
8234         (Convert.ImplicitReferenceConversionCore): Allow conversions from
8235         System.Enum to System.ValueType.
8236
8237 2007-04-13  Martin Baulig  <martin@ximian.com>
8238
8239         Rewrote implicit reference conversions.  We need to distinguish
8240         between implicit reference conversions (13.1.4) and implicit
8241         boxing conversions (13.1.5).
8242
8243         According to the spec, there's an an implicit conversion
8244         "From a one-dimensional array-type S[] to IList<T> and base
8245         interfaces of this interface, provided there is an implicit
8246         reference conversion from S to T."  Note that this does not
8247         include boxing conversions.
8248
8249         * convert.cs
8250         (Convert.ImplicitTypeParameterBoxingConversion): New method.
8251         (Convert.ImplicitReferenceConversion): Split into
8252         ImplicitReferenceConversionCore() and
8253         ImplicitBoxingConversionExist().
8254         (Convert.ImplicitReferenceConversionExists): Use the new
8255         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
8256
8257 2007-04-12  Martin Baulig  <martin@ximian.com>
8258
8259         * convert.cs (Convert.ImplicitReferenceConversion): Move the
8260         `TypeManager.null_type' checks up to the top of the method.
8261
8262 2007-04-11  Marek Safar  <marek.safar@gmail.com>
8263
8264         A fix for bug #81350
8265         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
8266         extension methods.
8267
8268 2007-04-11  Martin Baulig  <martin@ximian.com>
8269
8270         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
8271         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
8272         to make this work for generic classes; fixes #79561.
8273
8274 2007-04-11  Martin Baulig  <martin@ximian.com>
8275
8276         * expression.cs (As): Add support for nullable types; fixes #79371.
8277
8278 2007-04-11  Martin Baulig  <martin@ximian.com>
8279
8280         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
8281         `type.FullName' is null; fixes #80243.
8282
8283 2007-04-11  Martin Baulig  <martin@ximian.com>
8284
8285         * expression.cs (Invocation.IsApplicable): Don't modify the method
8286         if type inference succeeded, but the method was not applicable.
8287         Fixes #81250.
8288
8289 2007-04-10  Marek Safar  <marek.safar@gmail.com>
8290
8291         A fix for bug #81324
8292         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
8293         internal and external namespaces containers.
8294
8295 2007-04-10  Martin Baulig  <martin@ximian.com>
8296
8297         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
8298         TypeManager.DropGenericMethodArguments() so we also call
8299         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
8300
8301 2007-04-10  Martin Baulig  <martin@ximian.com>
8302
8303         * iterators.cs (Iterator.CreateIterator): Don't crash if
8304         `method.ReturnType' is null.  This happens if something went wrong
8305         while resolving that typ (we already reported an error in this case).
8306
8307 2007-04-10  Martin Baulig  <martin@ximian.com>
8308
8309         * expression.cs (New.DoResolve): Don't call CheckComImport() on
8310         generic interfaces; report the CS0144 directly.
8311
8312 2007-04-10  Martin Baulig  <martin@ximian.com>
8313
8314         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
8315         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
8316
8317 2007-04-10  Martin Baulig  <martin@ximian.com>
8318
8319         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
8320
8321 2007-04-09  Raja R Harinath  <rharinath@novell.com>
8322
8323         A better fix
8324         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
8325         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
8326
8327         Fix #81338
8328         * statement.cs (For.Resolve): If resolution fails, use
8329         KillFlowBranching.
8330
8331 2007-04-08  Marek Safar  <marek.safar@gmail.com>
8332
8333         * anonymous.cs (MakeName): Make faster and zero-based.
8334         (VerifyExplicitParameterCompatibility): Back to mode where generic
8335         parameter is ignored.
8336         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
8337
8338         * class.cs (EmitType): Method can emit another new method.
8339
8340         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
8341
8342         * driver.cs: Updated.
8343
8344         * lambda.cs: Reuse predefined empty parameters.
8345
8346         * parameter.cs: Updated
8347
8348         * support.cs: Implemented InflateTypes.
8349
8350         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
8351         (InitSystemCore): Introduced to isolate 3.0 dependencies.
8352
8353 2007-04-03  Martin Baulig  <martin@ximian.com>
8354
8355         Fix #80632.
8356
8357         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
8358         version of TypeManager.IsOverride() which also works with generic
8359         types.  
8360
8361 2007-04-03  Martin Baulig  <martin@ximian.com>
8362
8363         Fix #81044.
8364
8365         * convert.cs
8366         (Convert.ExplicitReferenceConversion): We need to cast when
8367         converting from IList<T> to S[].
8368
8369 2007-04-01  Marek Safar  <marek.safar@gmail.com>
8370
8371         * decl.cs (FindExtensionMethods): Consider all candidates with same name
8372         at this level.
8373         
8374         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
8375
8376 2007-03-31  Marek Safar  <marek.safar@gmail.com>
8377
8378         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
8379         argument and return type inferring.
8380
8381         * codegen.cs (InferReturnType): Flag whether return can be inferred.
8382         (ReturnType): Turned to property.
8383
8384         * statement.cs (Return): Implemented return type inferring.
8385
8386         * support.cs (ReflectionParameters): Use local types if possible.
8387
8388 2007-03-30  Raja R Harinath  <rharinath@novell.com>
8389
8390         * flowanalysis.cs (FlowBranching.Reachability): Remove.
8391         (FlowBranching.UsageVector): Update to changes.
8392
8393         Prepare to kill 'Reachability'
8394         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
8395         argument of constructor.
8396
8397 2007-03-29  Raja R Harinath  <rharinath@novell.com>
8398
8399         Prepare to kill 'Reachability'
8400         * flowanalysis.cs (UsageVector.is_unreachable): New.
8401         (UsageVector): Update to maintain 'is_unreachable' in parallel to
8402         'reachability', and verify they're consistent.
8403
8404         Fix #81121
8405         * expression.cs (New.EmitStatement): Handle type parameters here too.
8406
8407 2007-03-29  Martin Baulig  <martin@ximian.com>
8408
8409         Fix #79148.
8410
8411         * anonymous.cs
8412         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8413         CompilerGeneratedClass.
8414         (ScopeInfo.EmitScopeInstance): Make this protected.
8415         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8416         `ec.CurrentAnonymousMethod.Scope == Scope'.
8417
8418         * statement.cs (Block.ScopeInfo): Make this a property.
8419
8420 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8421
8422         Prepare to kill 'Reachability'
8423         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8424         (FlowBranching.UsageVector.Reachability): Remove property.
8425         (FlowBranching.UsageVector.IsUnreachable): New property.
8426         (FlowBranching.UsageVector.ResetBarrier): New.
8427         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8428         * codegen.cs, statement.cs: Update to changes.
8429
8430 2007-03-27  Martin Baulig  <martin@ximian.com>
8431
8432         Fix #81209.
8433
8434         * decl.cs
8435         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8436         generic types.
8437
8438 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8439
8440         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8441         instead of TriState.  Remove all mention of TriState.
8442
8443         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8444         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8445         and maintain invariants.
8446
8447 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8448
8449         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8450
8451 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8452
8453         * expression.cs: Stop using obsolete 2.0 opcodes.
8454
8455 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8456
8457         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8458         one of the latests Martin's fixes.
8459
8460 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8461
8462         * expression.cs: On BigEndian systems, swap the bytes, temporary
8463         solution until we get a new bitconverter class.
8464
8465 2007-03-23  Martin Baulig  <martin@ximian.com>
8466
8467         Fix #81158.
8468
8469         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8470         "Method" and "Method`1".  Normally, a cache lookup is done on the
8471         "Method" form (ie. without the generic arity), but this one makes
8472         lookups on the full form work as well.
8473
8474 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8475
8476         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8477         unused properties.
8478
8479 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8480         * class.cs: 
8481         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8482         ordered_member_list, to TypeBuilder to store members to be defined
8483         in the order they were parsed in.
8484         - ordered_explicit_member_list contains all properties indexers
8485           and methods that are defined as explicit implementation of an
8486           interface or base class.
8487         - ordered_member_list contains all properties indexers and methods
8488           that are not defined as explicit implementation of an interface
8489           or base class.
8490
8491         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8492         functionality in these removed classes has been replaced with 
8493         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8494         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8495
8496         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8497         to CheckForDuplications inside GetMethod and SetMethod Define Method
8498         to handle method property and indexer name conflicts.
8499
8500         Fixes #79434
8501
8502         All code is contributed under the MIT/X11 license.
8503
8504 2007-03-20  Martin Baulig  <martin@ximian.com>
8505
8506         * class.cs (TypeContainer.Interfaces): Removed; they're now
8507         included in `TypeContainer.Types'.
8508
8509 2007-03-20  Martin Baulig  <martin@ximian.com>
8510
8511         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8512
8513         * class.cs (TypeContainer.CreateType): New public method.  This is
8514         now called before DefineType() to create the TypeBuilders.
8515         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8516         has already been created by CreateType().
8517         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8518         don't resolve our base classes here; this has been moved into
8519         DefineBaseTypes().  We're now called from CreateType().
8520         (TypeContainer.DefineBaseTypes): New private method; resolve our
8521         base classes here.  We're now called from DefineType().
8522
8523         * rootcontext.cs
8524         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8525         our types first to create all the TypeBuilders.  After that, call
8526         TypeContainer.DefineType() on all the types which'll resolve their
8527         base classes and setup the resolve order.
8528
8529 2007-03-20  Martin Baulig  <martin@ximian.com>
8530
8531         * class.cs (TypeContainer.Enums): Removed; they're now included in
8532         `TypeContainer.Types'.  
8533
8534 2007-03-20  Martin Baulig  <martin@ximian.com>
8535
8536         * class.cs
8537         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8538         (TypeContainer.DoResolveMembers): Call DefineType() on our
8539         `compiler_generated' classes; moved here from DefineNestedTypes().
8540
8541         * rootcontext.cs
8542         (RootContext.ResolveTree): Call ResolveMembers() on all
8543         TypeContainer's in the `type_container_resolve_order'.
8544
8545 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8546
8547         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8548
8549 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8550
8551         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8552         implementation flags.
8553
8554 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8555
8556         * class.cs: More optimizations for type parameters.
8557
8558 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8559
8560         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8561
8562         * ecore.cs, parameter.cs: More common code for both corlibs.
8563
8564         * typemanager.cs (IsGenericMethod): Simplified.
8565
8566 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8567
8568         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8569         'returns'.
8570         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8571
8572         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8573         unconditionally.  Simplify explanation.
8574         (Try.Resolve, Using.Resolve): Likewise.
8575
8576 2007-03-15  Martin Baulig  <martin@ximian.com>
8577
8578         Fix #80731.
8579
8580         * decl.cs (DeclSpace): If we're a partial class, use our
8581         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8582
8583 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8584
8585         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8586         'throws'.
8587         (FlowBranching.UsageVector): Update to changes.
8588         (FlowBranching.MergeSiblings): Likewise.
8589         * statement.cs: Likewise.
8590
8591 2007-03-15  Martin Baulig  <martin@ximian.com>
8592
8593         Fix #79302.
8594
8595         * decl.cs
8596         (MemberCache): Added a special .ctor for type parameters.
8597
8598         * typemanager.cs
8599         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8600         `MemberCache'.  
8601
8602 2007-03-09  Martin Baulig  <martin@ximian.com>
8603
8604         * enum.cs (Enum): Make this a TypeContainer.
8605         (EnumMember): Derive from `Const'.
8606
8607         * const.cs
8608         (Const.DoResolveValue): New protected virtual method; move most of
8609         the functionality of ResolveValue() here so we can override it in
8610         `EnumMember'.
8611         (Const.CreateConstantReference): Make this virtual.
8612
8613         * class.cs (Kind): Add `Kind.Enum'.
8614         (TypeContainer.Emit): Don't emit the enums here; they're already
8615         in the `RootContext.typecontainer_resolve_order'.
8616
8617         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8618         here; they're already in the `typecontainer_resolve_order'.
8619
8620         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8621         TypeManager.DropGenericTypeArguments().
8622
8623         * typemanager.cs
8624         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8625         (TypeManager.IsEnumType): Likewise.
8626         (TypeManager.EnumToUnderlying): Likewise.
8627         (TypeManager.IsEqual): Add support for enums.
8628
8629 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8630
8631         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8632         DefaultParameterValueAttribute to be undefined, say if System.dll
8633         is not referenced.
8634
8635 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8636
8637         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8638         any mscorlib.
8639
8640 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8641
8642         * class.cs, parameter.cs: Unified parameters verification.
8643
8644 2007-03-08  Martin Baulig  <martin@ximian.com>
8645
8646         * cs-parser.jay (constructor_header): Pass the location to the
8647         newly created TopLevelBlock.
8648
8649 2007-03-07  Martin Baulig  <martin@ximian.com>
8650
8651         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8652
8653 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8654
8655         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8656         with the changes from David, fixes the build.
8657
8658 2007-03-05  David Mitchell  <dmitchell@logos.com>
8659
8660         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8661         and its base interfaces to a one-dimensional array type S[],
8662         provided there is an implicit or explicit reference conversion
8663         from S to T.
8664
8665 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8666
8667         * cs-tokenizer.cs: Implemented basic linq grammar.
8668
8669         * driver.cs: Set linq lang version on demand.
8670
8671 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8672
8673         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8674
8675 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8676
8677         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8678         (Fixes #80455)
8679
8680         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8681         here.
8682         Check property and event extern attributes.
8683
8684         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8685         charset.
8686
8687 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8688
8689         A fix for bug #80407
8690         * ecore.cs: Don't report ambiguity error when methods have same parent.
8691
8692 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8693
8694         A fix for bug #80878
8695         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8696
8697 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8698
8699         * attribute.cs: Enable ExtensionAttribute presence test.
8700
8701 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8702
8703         * class.cs: Warn about missing GetHashCode only when Equals is override.
8704
8705         * decl.cs: Check accessibility of type arguments.
8706
8707         * typemanager.cs: Correctly report nullable array.
8708
8709 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8710
8711         * class.cs, report.cs: Capture more details when things go wrong.
8712
8713 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8714
8715         A fix for bug #80650
8716         * cs-parser.jay: Anonymous container starts at constructor declaration
8717         and not at block beginning because it has to be usable in constructor
8718         initializer.
8719
8720         * statement.cs: Use context location and not block one for error reporting.
8721
8722 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8723
8724         A fix for bug #78712
8725         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8726         too.
8727
8728 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8729
8730         A fix for bug #80493 by Atsushi Enomoto
8731         * cs-parser.jay: Ignore invalid attribute target.
8732
8733 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8734  
8735         * cs-tokenizer.cs: Ignore '\0' as white space character.
8736
8737 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8738
8739         * cs-parser.jay: Add support for lambda expressions to the mcs
8740         compiler as well.
8741
8742         * lambda.cs: Only clone when we are probing, not on the final call
8743         (Compatible is the final call). 
8744
8745         * statement.cs (CloneContext): Introduce class to provide block
8746         remapping during clone.
8747
8748         All statements Clone themselves now.
8749
8750         (Clone): special handling for blocks, when we clone a block, we
8751         register the block inside this routine, as children of the block
8752         might trigger a lookup. 
8753         
8754         * expression.cs: Add support for CloneContext in all expressions. 
8755         
8756 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8757  
8758         A fix for bug #80493
8759         * statement.cs: Report ambiguous warning when interfaces are not related.
8760
8761 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8762
8763         C# 3.0 extension methods.
8764
8765         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8766         cannot be used directly.
8767
8768         * class.cs (Class.Emit): Emit extension attribute if any class method
8769         is extension method.
8770         (Method.Define): Add basic extension method validation conditions.
8771         (Method.Emit): Emit extension attribute for method.
8772
8773         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8774         extension method exists. Currently we follow same approach as Microsoft
8775         does, emit even if a method or a class are private but this can change
8776         later.
8777
8778         * cs-parser.jay: Add handling of `this' keyword in method parameters
8779         context.
8780
8781         * decl.cs (DeclSpace.IsStaticClass): New property.
8782         (MemberCache.FindExtensionMethods): Looks for extension methods with
8783         defined name and extension type.
8784
8785         * doc.cs: Updated after OverloadResolve changes.
8786
8787         * driver.cs: Add new soft reference to System.Core.dll.
8788
8789         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8790         (ExtensionMethodGroupExpr): Represents group of extension methods.
8791
8792         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8793         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8794         to MethodGroupExpr and made non-static for easier customization.
8795         (Invocation.DoResolve): Add extension method lookup when no standard
8796         method was found.
8797         (MemberAccess.DoResolve): Try extension methods if no member exists.
8798
8799         * modifiers.cs: Add METHOD_EXTENSION modifier.
8800
8801         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8802         as well as candidate extension type.
8803         (ComputeNamespaces): When assembly constains extension methods registers
8804         them.
8805         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8806         extension method lookup.
8807         (Namespace.LookupExtensionMethod): Looks for extension method in this
8808         namespace.
8809         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8810         find a method which matches name and extensionType.
8811
8812         * parameter.cs (Parameter): Add This modifer.
8813         (HasExtensionMethodModifier): New property.
8814         (Resolve): Add extension parameter check.
8815         (ModFlags): turned to property to exclude this modifier as it is not real
8816         parameter modifier.
8817         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8818
8819         * support.cs (ParameterData): Add ExtensionMethodType.
8820         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8821
8822         * typemanager.cs: Add type and ctor extension attribute type.
8823
8824 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8825
8826         * report.cs (DisableErrors, EnableErrors): used to prevent error
8827         output when we are "trying" to compile various methods with
8828         different types. 
8829
8830         * ecore.cs (Expression): Add Clone method that calls the virtual
8831         CloneTo method.  The current CloneTo method in Expression throws
8832         an exception so we can track down all the places where this must
8833         be implemented (not using abstract, because that would be a lot of
8834         up-front-work before we can start testing the implementation
8835         idea). 
8836
8837         Important: we only need Clone capabilities for expressions created
8838         by the parser, as the expressions we will be cloning are
8839         expressions in the pre-resolved state.   This vastly simplifies
8840         the work required. 
8841         
8842         (SimpleName): Add CloneTo that does nothing.
8843         (EmptyCast): Add CloneTo.
8844         
8845         * expression.cs (Binary): Implement CloneTo.
8846         (Invocation.IsApplicable): Store the current ec in
8847         EmitContext.TempEc and restore it on return.  This is used so we
8848         do not have to sprinkle hundres of methods with an extra
8849         EmitContext, we know that the only user is the lambda expression
8850         ImplicitConversionExists code. 
8851         
8852         (Argument): Add Cloning capabilities.
8853         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8854         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8855         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8856         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8857         IndexerAccess): Add Clone capability.
8858
8859         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8860
8861         (Argument): Add cloning capability.
8862
8863         * assign.cs (Assign): Implement CloneTo.
8864
8865         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8866         
8867         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8868         version by calling Convert with the EmitContext (that we are
8869         currently storing in ec, this is not great, but will do for now,
8870         to avoid passing EmitContext parameters to hundreds of functions
8871         that do not need them now).
8872
8873         (SetExpression): Remove, it is not needed.
8874         
8875         (ContextualReturn): Implement CloneTo.
8876
8877         * statement.cs (Statement): Implement cloning infrastructure,
8878         similar to expressions.
8879
8880         (Block): Partial implementation of Clone for statements.
8881
8882         (Return): Implement clone.
8883         
8884         * constant.cs (Constant.CloneTo): New method, does nothing.
8885
8886         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8887         solution, until we decide how to exactly do this.  
8888         
8889 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8890  
8891         A fix for bug #80493
8892         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8893         a property is override we need to use second accessor.
8894
8895 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8896  
8897         A fix for bug #80418
8898         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8899         methods.
8900
8901 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8902
8903         Another fix for bug #80749
8904         * pending.cs: Abstract class has priority over interfaces.
8905
8906 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8907
8908         Another fix for bug #80749
8909         * pending.cs: Abstract class has priority over interfaces.
8910
8911 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8912
8913         Another fix for bug #80749
8914         * pending.cs: Abstract class has priority over interfaces.
8915
8916 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8917
8918         Another fix for bug #80749
8919         * pending.cs: Abstract class has priority over interfaces.
8920
8921 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8922
8923         * class.cs Better error message.
8924
8925         * driver.cs: Add shorter versions of -optimize option.
8926
8927 2007-02-13  Martin Baulig  <martin@ximian.com>
8928
8929         * class.cs (Constructor.Emit): Check the return value of
8930         ec.ResolveTopBlock() and return on error.
8931
8932 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8933
8934         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8935         message to fix error message regression.
8936
8937 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8938
8939         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8940
8941 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8942
8943         A fix for bug #80749
8944         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8945         its parent container.
8946
8947         * class.cs (DefineFieldInitializers): Each initializer can has different
8948         resolve context.
8949
8950         * const.cs: Updated.
8951
8952 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8953
8954         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8955         now all the heavy lifting to check that embedded statements or
8956         expressions have the right form is done in the ContextualReturn.
8957
8958         (ContextualReturn): New class.  
8959
8960         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8961         method that can be invoked to report 201, so we do not replicate
8962         this everywhere.
8963
8964         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8965         
8966         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8967         treating tabs as spaces. 
8968
8969 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8970
8971         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8972         * assign.cs: Use full implicit conversion for right side check.
8973
8974 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8975
8976         * statement.cs (Switch): Switch over boolean type is not standardized.
8977
8978 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8979
8980         A fix for bug #80755
8981         * decl.cs (FindBaseEvent): Don't use method cache for events.
8982
8983 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8984
8985         * cs-parser.jay: Better syntax error handling.
8986
8987         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8988         instead of underlying type value.
8989
8990 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8991
8992         * driver.cs: Check define identifier before is registered.
8993
8994         * namespace.cs: Use existing error message.
8995
8996         * report.cs: New warning.
8997
8998 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8999
9000         A fix for bug #80742
9001         * expression.cs: Delegate Invoke method can be called directly.
9002
9003 2007-02-06  Marek Safar  <marek.safar@gmail.com>
9004
9005         A fix for bug #80676
9006         * class.cs (IsEntryPoint): The Main method can have params modifier.
9007
9008 2007-02-04  Miguel de Icaza  <miguel@novell.com>
9009
9010         * parameter.cs (Parameter, Parameters): Add Clone method.
9011
9012         * anonymous.cs (Compatible): Turn method into virtual method, so
9013         LambdaExpression can implement a different behavior.
9014
9015         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
9016         out the basic checking here, so it can be used by
9017         LambdaExpressions.
9018         
9019         * lambda.cs: Introduce "Compatible" function that will do the
9020         heavy lifting.
9021
9022 2007-02-02  Marek Safar  <marek.safar@gmail.com>
9023
9024         * attribute.cs: Unified one error message.
9025
9026         * class.cs (Class): Use type attributes and not properties to test static
9027         class.
9028         (IsEntryPoint): Don's pass local variable.
9029
9030         * convert.cs: Removed duplicate check.
9031
9032         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
9033
9034         * driver.cs: Don't crash when soft reference does not exist.
9035
9036         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
9037         (UsingEntry): Removed redundant allocation.
9038
9039         * parameter.cs: Add fast path for type parameters.
9040
9041         * support.cs: Don't allocate attribute when it's not used.
9042
9043 2007-01-30  Miguel de Icaza  <miguel@novell.com>
9044
9045         * anonymous.cs
9046         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
9047         this into a virtual method, so we can override it in LambdaExpression.
9048
9049         * driver.cs: Improve diagnostics in case of failure. 
9050
9051         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
9052         write a function that is slightly more complex and that parses:
9053
9054         type identifier [, type identifier]* )
9055
9056         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
9057         this expression:
9058
9059                 (canEmpty ? i >= 0 : i > 0)
9060
9061 2007-01-30  Raja R Harinath  <rharinath@novell.com>
9062
9063         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
9064         exception on possibly valid code.
9065
9066 2007-01-29  Raja R Harinath  <rharinath@novell.com>
9067
9068         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
9069         Push/PopPosition.
9070         (parse_opt_type_arguments): Remove.  It's almost the same as
9071         parse_less_than.
9072         (parse_namespace_or_typename): Use parse_less_than.
9073
9074 2007-01-28  Miguel de Icaza  <miguel@novell.com>
9075
9076         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
9077         this bug took a few hours to find, because the state saved and
9078         restored by PushPosition and PopPosition was ignoring the state of
9079         parse_generic_less_than.
9080
9081         I can also now remove the handling of OP_LT and OP_GT, this solves
9082         the big mistery.
9083         
9084         * cs-tokenizer.cs: store the location for the ARROW token, we use
9085         that in the parser.
9086
9087         (PushPosition, PopPosition): save/restore also `current_token',
9088         restore `parse_generic_less_than' (was missing).
9089
9090         (parse_opt_type_arguments): use parse_type, not
9091         parse_namespace_or_typename to parse types.
9092
9093         * lambda.cs: Empty new file, will eventually have the lambda
9094         expression implementation.
9095
9096         * lambda.test: used to test the internal tokenizer. 
9097
9098         * report.cs (FeatureIsNotISO1): Rename from
9099         FeatureIsNotStandardized, because it was about the language level
9100         (1 vs 2) it was not about standarization.
9101
9102         (FeatureRequiresLINQ): New.
9103
9104         * support.cs (SeekableStreamReader): Only require that the reader
9105         is a TextReader, not a StreamReader, so we can plug StringReader. 
9106
9107         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
9108         given position in the input stream the following tokens can be
9109         parsed as a type followed by an identifier.
9110
9111         (is_punct): after a '(' if parse_type_and_parameter returns true,
9112         then return a special token OPEN_PARENS_LAMBDA which is used to
9113         avoid reduce/reduce errors in the grammar for the
9114         lambda_expression rules.
9115
9116         (parse_type): implement a type parser inside the
9117         tokenizer, the parser only returns true or false depending on
9118         whether the input at a given position can be parsed as a type.
9119
9120         (peek_token): new method used during type parsing.
9121
9122 2007-01-28  Raja R Harinath  <rharinath@novell.com>
9123
9124         Fix #80531
9125         * anonymous.cs (ScopeInfo.InflateParameters): New.
9126         (AnonymousContainer.Resolve): Use it to redirect types of
9127         delegate parameters.
9128
9129 2007-01-27  Raja R Harinath  <rharinath@novell.com>
9130
9131         Fix #80530
9132         * expression.cs (Error_InvalidArguments): Don't use two different
9133         messages for CS1503.  Use ExtraInformation and
9134         SymbolRelatedToPreviousError instead.
9135
9136         Fix #80358
9137         * decl.cs (DeclSpace.initialize_type_params): Don't access
9138         'type_params' of a partial class directly.
9139
9140 2007-01-26  Miguel de Icaza  <miguel@novell.com>
9141
9142         * constant.cs: Removed a handful of out-of-range checks that were
9143         not necessary. 
9144
9145 2007-01-25  Marek Safar  <marek.safar@gmail.com>
9146
9147         * expression.cs (CheckUselessComparison): Add additional check for char
9148         constants.
9149
9150         * namespace.cs: Fixed typo.
9151
9152 2007-01-23  Miguel de Icaza  <miguel@novell.com>
9153
9154         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
9155         gone, instead we inline the test, preventing the needless casts to
9156         longs, ulongs and doubles for the parameters, avoiding calls to
9157         methods that overchecked stuff, and instead inlined things
9158         nicely. 
9159
9160 2007-01-20  Marek Safar  <marek.safar@gmail.com>
9161
9162         * cs-parser.jay: Better parameter error handling.
9163
9164 2007-01-17  Marek Safar  <marek.safar@gmail.com>
9165
9166         A fix for bug #80368, #80522
9167         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
9168         whether array initializer contains constants only.
9169         (ArrayCreation.Emit): Use better formula to decide when
9170         are array initializers for static initialization.
9171         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
9172         have to emit even constants otherwise they are pre-initialized.
9173
9174 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
9175             Raja R Harinath  <rharinath@novell.com>
9176
9177         Fix emit order of 'get' vs. 'set'.
9178         * support.cs (Accessors): New.
9179         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
9180         Note the order in which accessors are declared in the source.
9181         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
9182         Refactored from Property.Define and Indexer.Define.
9183         (PropertyBase.DefineAccessors): New helper that calls the above in
9184         appropriate order as noted by the parser.
9185         (Property.Define, Indexer.Define): Update to changes.
9186         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
9187
9188 2007-01-17  Raja R Harinath  <rharinath@novell.com>
9189
9190         Fix cs0029-6.cs and gcs0029-2.cs (regression)
9191         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
9192         there's an implicit conversion from the current type to the target
9193         type before converting the underlying constant.
9194
9195 2007-01-16  Marek Safar  <marek.safar@gmail.com>
9196
9197         * const.cs (ResolveValue): Updated after constant conversion was made more
9198         generic.
9199
9200         * constant.cs (GetAttributableValue): constant to object conversion is
9201         used for attributes only.
9202         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
9203         constant conversions.
9204         (LongConstant.ConvertImplicitly): Ditto.
9205
9206         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
9207         (ImplicitConversionStandard): Handle constant conversion as extra step.
9208         It solves the issue when constant conversion was called indirectly like
9209         inside array initializer and constant folding was skipped.
9210
9211         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
9212         this change.
9213
9214         * statement.cs(ImplicitConversionStandard): Updated after constant
9215         conversion was made more generic.
9216
9217 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
9218
9219         * expression.cs (As.DoResolve): Use GenericConstraints instead of
9220         Constraints, solves the problem where the compiler incorrectly
9221         reported that a type parameter was not constrained to a class (Bug
9222         80518)
9223
9224 2007-01-14  Marek Habersack  <grendello@gmail.com>
9225
9226         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
9227
9228 2007-01-14  Marek Safar  <marek.safar@gmail.com>
9229
9230         A fix for bug #80368
9231         * assign.cs (FieldInitializer): New class implements field
9232         initializer statement.
9233
9234         * attribute.cs: Update after FieldMember rename.
9235
9236         * class.cs (PropertyBasedMember): New common class for property based
9237         types.
9238         (InterfaceMemberBase): New base class for all members which can be used as
9239         an interface members.
9240         (MethodCore): Moved really common code to InterfaceMemberBase.
9241         (Method.Define): Equal and GetHasCode detection is relevant for methods
9242         only.
9243         (MethodData.Define): Don't assume that public event implements an
9244         interface automatically.
9245         (MethodData.DefineMethodBuilder): Issue an error even if only extern
9246         modifier is used.
9247         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
9248         (FieldMember): Merged with FieldBase.
9249         (EventProperty.AEventPropertyAccessor): New specialization to check whether
9250         event extern modifier can be used.
9251         (EventField.EventFieldAccessor): Moved event field specific code here.
9252         (Event.AllowedModifiers): Even event can be extern.
9253         (Event.FindOutBaseMethod): New override specific to events.
9254         (Indexer.parameters): Reintroduce parameters because base class holds
9255         only properties common data.
9256         (Indexer.CheckForDuplications): Indexers are threated as methods so we
9257         need do extra parameters check.
9258
9259         * const.cs: Update after FieldMember rename.
9260
9261         * decl.cs (MemberCache.FindBaseEvent): New method.
9262
9263         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
9264         to reflect that indexer is now derived from PropertyBased.
9265
9266         * ecore.cs (GetMemberType): Made public.
9267         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
9268         obsolete event.
9269
9270         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
9271         
9272         * typemanager.cs (CSharpSignature): Correctly print event accessors.
9273         (RegisterEvent): Removed.
9274         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
9275         (GetPrivateFieldOfEvent): Renamed to GetEventField.
9276
9277 2007-01-11  Raja R Harinath  <rharinath@novell.com>
9278
9279         Fix #80249
9280         * statement.cs (CollectionForeach.TryType): Prefer generic
9281         GetEnumerator over non-generic variant.  Fix code to follow comments.
9282
9283 2007-01-09  Raja R Harinath  <rharinath@novell.com>
9284
9285         Fix #80446
9286         * support.cs (ReflectionParameter): Don't use an invalid index on
9287         the generic parameter data.
9288
9289 2007-01-08  Miguel de Icaza  <miguel@novell.com>
9290
9291         * driver.cs: Just add a tiny bit of infrastructure.
9292
9293 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9294
9295         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
9296         where field type is struct from current assembly.
9297         
9298         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
9299         it is possible.
9300
9301 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9302
9303         A fix for bug #80381
9304         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
9305         the core types.
9306
9307         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
9308         messages.
9309         (Namespace.LookupType): Always use core types from corlib when speficied.
9310
9311         * report.cs: A new warning.
9312
9313         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
9314         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
9315         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
9316
9317         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
9318         (InitCoreTypes): Set expression type of object_type and value_type
9319         immediately after lookup.
9320
9321 2007-01-01  Miguel de Icaza  <miguel@novell.com>
9322
9323         * cs-tokenizer.cs: Accept Pc class characters (Connector
9324         Punctuation) as valid identifiers.  Fixes #78259
9325
9326         * expression.cs (Invocation.DoResolve): Moved the check for the
9327         use of `this' for doing method calls to the Invocation resolution
9328         step, after overload resolution has taken place instead of doing
9329         the check at the low-level `This.DoResolve' level.
9330
9331         The `This.DoResolve'(appens before overload resolution, so it has
9332         no way of knowing if the method that will be called will be
9333         instace or static, triggering an erroneous report for cs0188 (Bug
9334         78113).
9335
9336         We now do the check for instance method invocations after we know
9337         what method will be called.
9338
9339         (This.CheckThisUsage): Move the actual use of this structure
9340         checking into its own method and expose it. 
9341
9342         * Everywhere that called Error_ValueCannotBeConverted: pass a new
9343         EmitContext.
9344
9345         Exceptions: Null.ConvertImplicitly,
9346         Constant.ImplicitConversionRequired as there are too many call
9347         sites for passing the ec. 
9348
9349         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
9350         EmitContext, if the value is null, then we do not try to provide
9351         the extra information from the error (If a userdefined conversion
9352         exists, as UserDefinedConversion requires a non null-EmitContext).
9353
9354         Fixes: #80347
9355
9356 2006-12-30  Raja R Harinath  <rharinath@novell.com>
9357
9358         * flowanalysis.cs (MyBitVector): Document some invariants.
9359         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
9360         introduced below, and add a couple of others, 
9361
9362 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9363
9364         * attribute.cs (GetMethodObsoleteAttribute): Uses new
9365         GetPropertyFromAccessor and GetEventFromAccessor.
9366         
9367         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
9368         overrides non-obsolete one.
9369         (Indexer.Define): Error message has been moved to the parser.
9370
9371         * cs-parser.jay: Better syntax errors handling.
9372
9373         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
9374         when an invocation has no arguments.
9375
9376         * ecore.cs: Removed not used caching.
9377
9378         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
9379         implementation.
9380
9381         * report.cs: Add a new warning.
9382
9383         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
9384
9385         * typemanager.cs (enumeration_type): Removed.
9386         (CSharpSignature): Reuses IsSpecialMethod.
9387         (IsEqual): Hack for MS BCL.
9388         (GetPropertyFromAccessor): New method.
9389         (GetEventFromAccessor): New method.
9390         (IsSpecialMethod): Fixed to handle more cases.
9391
9392 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9393
9394         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
9395         Made white spaces array static.
9396
9397         * ecore.cs (RemoveGenericArity): Optimized.
9398
9399         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
9400         10 times faster).
9401         (MyBitVector.initialize_vector): Simplified.
9402
9403 2006-12-22  Miguel de Icaza  <miguel@novell.com>
9404
9405         * ecore.cs: Am not entirely happy with this hack, but it seems to
9406         address the issue in 80257 (a small test case for
9407         CreativeDocs.NET). 
9408
9409         I set the MethodGroupExpr.Type to an internal compiler type
9410         (itself in this case) to force the resolution to take place.   Why
9411         it does not take place with a null is beyond me.
9412
9413 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9414
9415         A fix for bug #80288
9416         * expression.cs (ResolveOperator): Consider user defined conversion for
9417         logical and operator too.
9418         (EmitBranchable): Optimization for logical and when full constant folding
9419         could not be applied but one operand is constant.
9420
9421 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9422
9423         * class.cs (GetClassBases): Write 5 times every day, will never use
9424         FullName for error reporting.
9425
9426         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9427
9428 2006-12-19  Martin Baulig  <martin@ximian.com>
9429
9430         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9431         the symbol file info here.
9432
9433 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9434
9435         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9436         of `elseif' is taking then following sections are not taking.
9437         Fixes an issue reported on mono mailing list.
9438
9439 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9440
9441         A fix for bug #80300
9442         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9443         a caller is not taking.
9444
9445 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9446
9447         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9448         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9449         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9450         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9451         * class.cs: Update to changes.
9452
9453 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9454
9455         A fix for bug #79934
9456         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9457         partial container.
9458
9459         * class.cs (ResolveMembers): Register an iterator in current container and
9460         not in shared one.
9461
9462 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9463
9464         Fix test-543.cs
9465         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9466         satisfy a params annotated parameter.
9467
9468 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9469
9470         A fix for bug #77014
9471         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9472         paramters correctly and not rely on hacks in Parameters class.
9473         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9474         at any possition.
9475         (Invocation.VerifyArgumentsCompat): Ditto.
9476         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9477         any possition.
9478
9479         * parameter.cs (HasParams): Don't assume that params is the last one.
9480
9481         * support.cs (ReflectionParameters.ctor): Look for params attribute
9482         correctly.
9483         (ReflectionParameters.ParameterType): Removed hack when we returned last
9484         parameter for out of range parameters.
9485         (ParameterName, ParameterModifier): Ditto.
9486
9487 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9488
9489         A fix for bug #79987
9490         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9491         when assembly is not CLS compliant but type is. I have no idea why is this
9492         allowed.
9493
9494         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9495
9496 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9497
9498         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9499         in struct constructors, they are basically no-ops.
9500
9501 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9502
9503         * cs-tokenizer.cs (Position): Save preprocessor status too.
9504
9505 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9506
9507         A fix for bug #77794
9508         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9509
9510 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9511
9512         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9513         Fixes #69299.
9514         (pp_expr): Report error for an invalid expression.
9515         (handle_preprocessing_directive): Simplified; add more error checking.
9516
9517 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9518
9519         A fix for bug #74939
9520         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9521         directives handling.
9522
9523 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9524
9525         A fix for bugs #80093, and #75984
9526         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9527         logic, it seems to me as it worked before "by coincidence".
9528         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9529         (cleanup): Enabled endif check.
9530
9531 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9532
9533         A fix for bug #80162
9534         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9535         enumerators are never ambiguous.
9536
9537 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9538
9539         Fix #80060
9540         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9541
9542 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9543
9544         A fix for bug #80144
9545         * class.cs (EventProperty.Define): Explicit implementation means
9546         that an even is used.
9547
9548 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9549
9550         Fixes the operators implementation (part II)
9551
9552         * cfold.cs (DoConstantNumericPromotions): Renamed to
9553         DoBinaryNumericPromotions and simplified.
9554         (BinaryFold): Couple of conversion fixes; simplified.
9555
9556         * constant.cs, ecore.cs, literal.cs
9557         (ToType): Renamed to ConvertImplicitly.
9558         (Reduce): Renamed to ConvertExplicitly.
9559
9560         * class.cs, convert.cs: Updated.
9561
9562         * expression.cs: TryReduce doesn't throw an exception.
9563
9564 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9565
9566         A fix for bug #80108
9567         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9568         compatible.
9569
9570 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9571
9572         Fixes unary operators implementation (part I)
9573         Also fixes #80026
9574
9575         * cfold.cs (Error_CompileTimeOverflow): Made internal
9576
9577         * const.cs (IConstant): Changed to use reference to constant and
9578         not constant itself.
9579         Updated IConstant implementations.
9580
9581         * constant.cs (CreateConstant): New factory method.
9582         Updated IConstant implementation.
9583
9584         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9585
9586         * ecore.cs: Updated to use CreateConstantReference.
9587
9588         * enum.cs: Reflects IConstant changes.
9589
9590         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9591
9592         * literal.cs (NullConstant): Change to be independently usable.
9593
9594 2006-11-29  Martin Baulig  <martin@ximian.com>
9595
9596         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9597         we need to emit the scope initializer before calling the base .ctor.
9598
9599         * anonymous.cs: Merged back from the new anonymous methods branch.
9600         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9601
9602         * expression.cs (ParameterReference.DoResolveBase): Create a
9603         "normal" ScopeInfo when capturing parameters rather than using the
9604         root scope; this makes things work with anonymous methods having
9605         parameters.
9606
9607         * statement.cs
9608         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9609
9610 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9611
9612         A fix for bug #79987
9613         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9614         check to a base class.
9615         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9616         only when assembly has missing attribute.
9617         * report.cs: Update.
9618
9619 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9620
9621         * cs-tokenizer.cs: Merged with gmcs version.
9622
9623 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9624
9625         * cs-tokenizer.cs,
9626         * cs-parser.jay: Better error message when partial keyword is misplaced.
9627
9628 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9629
9630         A fix for bug #79810
9631         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9632         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9633         a RuntimeWrappedException by default.
9634
9635 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9636
9637         A fix for bug #79843
9638         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9639         implementation.
9640         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9641
9642 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9643
9644         * driver.cs, namespace.cs: Uses faster IndexOf version.
9645
9646 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9647
9648         A fix for bug #79941
9649         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9650         operators.
9651         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9652         even if internal name is different.
9653         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9654         (UserDefinedConversion): Simplified as the operators cannot be internal.
9655         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9656         conversions.
9657         (MethodLookup): Replaced EmitContext with parentType.
9658         * expression.cs: Updated.
9659
9660 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9661
9662         * driver.cs (BadAssembly): Handle all the ugliness of
9663         DefineDynamicAssembly.
9664
9665 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9666
9667         Address parts of #58244 -- most of what's left is in the runtime
9668         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9669         CS1509 error checks, and handle them for all assembly loads, not
9670         just the first invocation.
9671         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9672         * codegen.cs (AssemblyClass.AddModule): ... here.
9673
9674 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9675
9676         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9677         IEnumerable<T> is ambiguous.
9678
9679 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9680
9681         A fix for bug #67689
9682         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9683         GetEnumerator is ambiguous.
9684
9685         * report.cs: Add new warning.
9686
9687 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9688
9689         A fix for bug #78602
9690         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9691         to protected member can be nested type.
9692
9693 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9694
9695         A fix for bug #78965
9696         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9697         to protected member must derive from current type.
9698
9699 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9700
9701         assign.cs: Reuses error method.
9702
9703         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9704         instead of type for constants.
9705         (Expression.Error_ValueAssignment): Common error method.
9706
9707         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9708         for any assignment.
9709
9710 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9711
9712         A fix for bug #79081
9713         * expression.cs (MemberAccess.DoResolve): Check nested type
9714         accessibility.
9715
9716 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9717
9718         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9719
9720 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9721
9722         A fix for bug #76591
9723         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9724
9725 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9726
9727         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9728         type forwarder of the same type multiple times.
9729
9730 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9731
9732         Fix #78820
9733         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9734         instance as an rvalue, even when we later resolve as an lvalue.
9735
9736 2006-10-25  Martin Baulig  <martin@ximian.com>
9737
9738         * anonymous.cs: Fix #79673.
9739
9740 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9741
9742         A fix for bug #79666
9743         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9744         ignored when is optimized (= default value) as its value is already set.
9745
9746 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9747
9748         A fix for bug #79724
9749         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9750         TypeContainer for type lookup.
9751
9752 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9753
9754         A fix for bug #79231
9755         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9756         * expression.cs (OverloadResolve): Always convert type name for
9757         an error message.
9758         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9759         other member.
9760
9761 2006-10-18  Martin Baulig <martin@ximian.com>
9762
9763         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9764
9765 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9766
9767         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9768         an int32, but requesting an int64 from the conversion
9769
9770 2006-10-12  Martin Baulig  <martin@ximian.com>
9771
9772         * anonymous.cs
9773         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9774         
9775 2006-10-12  Martin Baulig  <martin@ximian.com>
9776
9777         * statement.cs
9778         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9779
9780 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9781
9782         * convert.cs: Remove broken code: I was doing the "Existance"
9783         tests for Implicit conversions.
9784
9785 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9786
9787         * convert.cs: Added one missing case in
9788         ImplicitStandardConversionExists uint64 to intptr.
9789
9790         Fixes #59800
9791         
9792         * typemanager.cs (uintptr_type): another core known type.   
9793
9794         * ecore.cs (OperatorCast): routine used to do cast operations that
9795         depend on op_Explicit.  We could change some of the Decimal
9796         conversions to use this.
9797
9798         This one has a probe mechanism that checks both types for an op_
9799         which it coudl be used to eliminate two classes: CastToDecimal
9800         and CastFromDecimal.
9801
9802         * convert.cs: Implement the conversions documented in #59800
9803         
9804 2006-10-10  Martin Baulig  <martin@ximian.com>
9805
9806         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9807         before RootScope.ResolveMembers().
9808
9809         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9810         `CurrentType' if appropriate.
9811
9812 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9813
9814         A fix for bug #78568
9815         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9816         when contains binary operators.
9817         * cs-parser.jay: Updated.
9818
9819 2006-10-09  Martin Baulig  <martin@ximian.com>
9820
9821         * delegate.cs
9822         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9823         moved that into Define() and also do the other type parameter
9824         checks there.  Fixes #79094.  Added gtest-292.cs.
9825
9826         * expression.cs
9827         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9828         since that doesn't include type parameters; don't use `Ldelema'
9829         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9830
9831 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9832
9833         A fix for #77796
9834         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9835         conversion is allowed.
9836
9837 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9838
9839         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9840         error reporting when no error occurs.
9841
9842 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9843
9844         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9845         does not exist.
9846
9847 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9848
9849         Fix #79584
9850         * class.cs (DefineTypeBuilder): Check circular dependencies before
9851         setting the parent of the TypeBuilder.
9852         (CheckRecursiveDefinition): Don't use 'BaseType', since
9853         it may not be valid until after DefineTypeBuilder.  Use
9854         'base_type' instead.
9855
9856 2006-10-04  Martin Baulig  <martin@ximian.com>
9857
9858         Merged the Anonymous Methods patch.
9859
9860         * anonymous.cs, iterators.cs: The new anonymous methods code.
9861
9862         * statement.cs (Variable): New public abstract class.
9863         (LocalInfo.Variable): New public property.
9864         (LocalInfo.ResolveVariable): New public method.
9865         (Block.Flags): Add `IsIterator'.
9866         (Block.AddVariable): Improved the CS0136 check.
9867         (Block.AnonymousChildren): New public property.
9868         (Block.AddAnonymousChild): New public method.
9869         (ToplevelBlock): Update to use the new anonymous method framework.
9870         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9871         `ToplevelBlock'; this is required to correctly implement the
9872         CS0136 check.
9873         (Fixed, Using): Use `TemporaryVariable' instead of directly
9874         creating the `LocalBuilder'.
9875
9876         * parameter.cs (Parameter.ResolveVariable): New public method.
9877         (Parameters.ResolveVariable): Likewise.
9878
9879         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9880
9881         * class.cs (TypeContainer): Replaced the `iterators' list and
9882         corresponding methods with a list of `CompilerGeneratedClass'es.
9883         (TypeContainer.ResolveMembers): New public method.
9884         (Method): `IIteratorContainer' has been replaced by
9885         `IAnonymousHost'.
9886
9887         * expression.cs (VariableReference): New public abstract base
9888         class for `LocalVariableReference', `ParameterReference' and
9889         `This'.
9890
9891         * codegen.cs (EmitContext): Removed `capture_context',
9892         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9893         (EmitContext.EmitThis): Removed.
9894
9895         * cs-parser.jay: Replace `iterator_container' with
9896         `anonymous_host'.       
9897
9898 2006-10-04  Martin Baulig  <martin@ximian.com>
9899
9900         * generic.cs (GenericMethod): Don't make this abstract.
9901         (Constraints.Clone): Added dummy implementation.
9902
9903 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9904
9905         Fix #79577
9906         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9907         'declspaces'.  Avoid allocating arrays willy-nilly.
9908
9909         Fix #79553
9910         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9911         cases out of the switch.
9912
9913 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9914
9915         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9916         message when non-generic type is used with the type arguments.
9917         * expression.cs: Updated.
9918
9919 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9920
9921         Fix #79013
9922         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9923         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9924         Change semantics slightly.  Don't insist on having only one
9925         temporary EmptyExpression -- just throttle the creation of new ones.
9926
9927         Fix #79451
9928         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9929         non-interfaces too.  If no methods are found, don't try to create
9930         a MethodGroupExpr.
9931
9932 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9933
9934         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9935         generic type.
9936
9937         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9938         us produce better error message.
9939
9940 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9941
9942         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9943         of the `|' operator.
9944
9945         * report.cs: A new warning added.
9946
9947 2006-09-27  Martin Baulig  <martin@ximian.com>
9948
9949         * generic.cs (GenericMethod): Don't make this abstract.
9950
9951 2006-09-27  Martin Baulig  <martin@ximian.com>
9952
9953         * report.cs
9954         (InternalErrorException): Added overloaded ctor taking a params array.
9955
9956 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9957
9958         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9959         Fixed the cases when same error was reported twice.
9960
9961         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9962         now report symbol information.
9963
9964 2006-09-25  Martin Baulig  <martin@ximian.com>
9965
9966         * class.cs: Completely unified with the gmcs version.
9967
9968 2006-09-25  Martin Baulig  <martin@ximian.com>
9969
9970         * typemanager.cs (TypeManager.IsNullableType): New public function.
9971         (TypeManager.IsNullableTypeOf): Likewise.
9972         (TypeManager.IsNullableValueType): Likewise.
9973
9974         * class.cs (MethodCore): Added the `GenericMethod' argument from
9975         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9976
9977 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9978
9979         * convert.cs: Unify with gmcs version.
9980
9981 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9982
9983         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9984         verify them as well.
9985
9986         * report.cs: New warning.
9987
9988 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9989
9990         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9991         for anonymous block with out argument.
9992
9993 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9994
9995         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9996         not used private events only.
9997
9998 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9999
10000         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
10001
10002         * const.cs (Const.Define): Check for constant type.
10003         (Const.IsConstantTypeValid): Looks for valid constant types.
10004
10005         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
10006
10007         * ecore.cs (EmptyConstantCast): New common class for all constant based
10008         EmptyCast(s).
10009
10010         * expression.cs (Is.DoResolve): Handle null constant especially.
10011         (New.DoResolve): Check for new void().
10012         (MemberAccess.DoResolve): Cope with all kind of nulls.
10013
10014         * literal.cs (NullConstant): Uses EmptyConstantCast.
10015         (NullDefault): Based on EmptyConstantCast.
10016         (NullLiteral): Uses EmptyConstantCast.
10017
10018         * statement.cs (Block.ResolveMeta): Check for constant type.
10019
10020 2006-09-22  Martin Baulig  <martin@ximian.com>
10021
10022         * delegate.cs, attribute.cs: Merged with the gmcs versions.
10023
10024 2006-09-22  Raja R Harinath  <rharinath@novell.com>
10025
10026         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
10027         not the null type.
10028
10029         Fix part of #79451
10030         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
10031         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
10032         code slightly.
10033
10034 2006-09-22  Martin Baulig  <martin@ximian.com>
10035
10036         * ecore.cs: Merged with the gmcs version.
10037
10038         * generic.cs (ConstructedType): New dummy class.
10039         (TypeArguments): Don't make this abstract.
10040
10041         * typemanager.cs
10042         (TypeManager.IsGenericTypeDefinition): New method.
10043         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
10044
10045 2006-09-22  Raja R Harinath  <rharinath@novell.com>
10046
10047         * expression.cs (ComposedCast): Check for arrays of TypedReference
10048         before creating the type, not after.
10049
10050 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
10051
10052         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
10053         after ToType change.
10054
10055         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
10056         when constant must be implicitly convertible.
10057
10058         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
10059
10060         * ecore.cs (NullCast): Derives from NullConstant.
10061
10062         * expression.cs (Is.DoResolve): Removed useless variables.
10063         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
10064         (New.Constantify): Add enum support.
10065         (MemberAccess.DoResolve): Add warning when accessing null constant or
10066         variable.
10067
10068         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
10069         property.
10070
10071         * literal.cs (NullConstant): New abstract class with common
10072         functionality for all null specializations.
10073         (NullDefault): Represents default(X) when result can be
10074         reduced to null.
10075         (NullLiteral): Updated.
10076
10077         * report.cs: Add new warning.
10078
10079 2006-09-21  Martin Baulig  <martin@ximian.com>
10080
10081         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
10082
10083 2006-09-21  Martin Baulig  <martin@ximian.com>
10084
10085         * generic.cs (GenericConstraints): New dummy class.
10086         (Constraints): Likewise.
10087         (TypeParameter): Likewise.
10088         (TypeParameterName): Likewise.
10089         (GenericMethod): Likewise.
10090
10091         * typemanager.cs (TypeManager.GetGenericArguments): New method.
10092
10093         * decl.cs: Merged with the gmcs version.
10094
10095 2006-09-21  Raja R Harinath  <rharinath@novell.com>
10096
10097         * generic.cs (TypeParameter): Implement IMemberContainer.
10098         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
10099
10100         * rootcontext.cs: Unify with gmcs version.
10101
10102         * report.cs: Unify with gmcs version.
10103         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
10104         from gmcs/generics.cs.
10105         * generics.cs (TypeParameter): New dummy class.
10106
10107         * support.cs: Unify with gmcs version.
10108
10109 2006-09-20  Raja R Harinath  <rharinath@novell.com>
10110
10111         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
10112         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
10113
10114         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
10115         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
10116         * mcs.exe.sources: Add generic.cs.
10117
10118         * codegen.cs: Unify with gmcs version.
10119
10120         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
10121         (EmitContext): Add GenericDeclContainer implementation.
10122         * decl.cs (MemberCore, DeclSpace): Likewise.
10123         * namespace.cs: Remove #ifdef GMCS_SOURCE.
10124
10125         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
10126         MCS TypeManager has a corresponding dummy method.
10127
10128 2006-09-19  Martin Baulig  <martin@ximian.com>
10129
10130         * expression.cs: Completely merged with the gmcs version.
10131
10132 2006-09-19  Martin Baulig  <martin@ximian.com>
10133
10134         * expression.cs (Invocation): Merged with the gmcs version.
10135         (ArrayAccess.GetStoreOpcode): Likewise.
10136
10137 2006-09-19  Martin Baulig  <martin@ximian.com>
10138
10139         * typemanager.cs
10140         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
10141         (TypeManager.IsGenericMethodDefinition): Likewise.
10142
10143 2006-09-19  Martin Baulig  <martin@ximian.com>
10144
10145         * typemanager.cs
10146         (TypeManager.IsEqual): Moved the gmcs implementation here.
10147         (TypeManager.DropGenericTypeArguments): Likewise.
10148         (TypeManager.DropGenericMethodArguments): Likewise.
10149         (TypeManager.GetTypeArguments): Moved here from gmcs.
10150         (TypeManager.HasGenericArguments): Likewise.
10151
10152 2006-09-19  Martin Baulig  <martin@ximian.com>
10153
10154         * expression.cs (Binary): Merged with the gmcs version.
10155
10156 2006-09-19  Martin Baulig  <martin@ximian.com>
10157
10158         * expression.cs (Probe, As, Is): Merged with the gmcs version.
10159
10160 2006-09-19  Martin Baulig  <martin@ximian.com>
10161
10162         * typemanager.cs: Merged with the gmcs version.
10163
10164 2006-09-16  Raja R Harinath  <rharinath@novell.com>
10165
10166         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
10167         * driver.cs: Likewise.
10168
10169 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
10170
10171         A fix for #79401
10172         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
10173         only if parent type is class.
10174         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
10175         update.
10176
10177 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
10178
10179         * cs-parser.jay,
10180         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
10181         keywords are used.
10182         * typemanager.cs(CSharpName): Converts NullType to null.
10183
10184 2006-09-15  Martin Baulig  <martin@ximian.com>
10185
10186         * typemanager.cs
10187         (TypeManager.GetMethodName): Added mcs implementation.
10188         (TypeManager.IsEqual): Likewise.
10189
10190         * ecore.cs
10191         (SimpleName.RemoveGenericArity): Added dummy implementation.
10192
10193         * pending.cs: Merged with the gmcs version.     
10194
10195 2006-09-15  Martin Baulig  <martin@ximian.com>
10196
10197         * statement.cs: Merge with the gmcs version.
10198
10199 2006-09-15  Martin Baulig  <martin@ximian.com>
10200
10201         * statement.cs (Switch): Merge with the gmcs implementation
10202         (without nullables), which is newer.
10203
10204 2006-09-15  Martin Baulig  <martin@ximian.com>
10205
10206         * statement.cs (Block.Variables): Make this public.
10207         (ToplevelBlock.Parameters): Make this a property.
10208         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
10209
10210 2006-09-15  Martin Baulig  <martin@ximian.com>
10211
10212         * namespace.cs: Merge with the gmcs version.
10213
10214 2006-09-15  Martin Baulig  <martin@ximian.com>
10215
10216         * decl.cs (MemberName): Minor code cleanups.
10217
10218 2006-09-15  Martin Baulig  <martin@ximian.com>
10219
10220         * parameter.cs: Merge with the gmcs version.
10221
10222 2006-09-15  Martin Baulig  <martin@ximian.com>
10223
10224         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
10225         and an error in mcs.
10226
10227 2006-09-15  Martin Baulig  <martin@ximian.com>
10228
10229         * flowanalysis.cs: Merged from GMCS; added the generics code into
10230         a `GMCS_SOURCE' conditional so we can share this file.
10231
10232 2006-09-08  Martin Baulig  <martin@ximian.com>
10233
10234         * typemanager.cs (TypeManager.interlocked_type): New public field.
10235         (TypeManager.int_interlocked_compare-exchange): New public field.
10236         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
10237         enumerator types here and call InitGenericCoreTypes().
10238         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
10239         after calling InitEnumUnderlyingTypes().
10240
10241         * rootcontext.cs
10242         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
10243         `classes_second_stage'. 
10244
10245 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
10246
10247         * assign.cs, ecore.cs, expression.cs: Share error message text.
10248         * class.cs (FieldMember.Define): Check for varible of static type.
10249         * driver.cs (LoadAssembly): Uses error output for errors.
10250         * statement.cs: Updated.
10251
10252 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
10253
10254         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
10255         type instance.
10256
10257 2006-09-07  Martin Baulig  <martin@ximian.com>
10258
10259         * driver.cs
10260         (MainDriver): Revert r62663 from Marek; see #70506 for details.
10261
10262 2006-08-29  Miguel de Icaza  <miguel@novell.com>
10263
10264         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
10265         
10266 2006-08-17  Miguel de Icaza  <miguel@novell.com>
10267
10268         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
10269         #52019 and #79064, the use of the \uXXXX sequence in source code
10270         to represent unicode characters.
10271
10272 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
10273
10274         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
10275         support.
10276         * class.cs, ecore.cs, statement.cs: Merged to one error message.
10277
10278 2006-08-13  Miguel de Icaza  <miguel@novell.com>
10279
10280         * assign.cs: Catch attempts to assign to a method groups in += and
10281         report as 1656
10282
10283 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
10284
10285         A fix for #79056
10286         * cs-parser.jay: Don't destroy current array type by typeof of array's.
10287
10288 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
10289
10290         * class.cs (Method.Define): Issue a warning when generic method looks like
10291         an entry point.
10292         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
10293         as well.
10294
10295 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
10296  
10297         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
10298         looking for ctor.
10299         * decl.cs (MemberCache.FindMembers): When container is interface we need to
10300         search all base interfaces as a member can be ambiguous.
10301         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
10302         Constructor member type filter. 
10303         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
10304         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
10305         reporting for returned memberinfos.
10306         * report.cs: Updated.
10307         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
10308         version to work on all runtimes.
10309         (TypeManager.RealMemberLookup): Removed members filtering.
10310
10311 2006-08-08  Raja R Harinath  <rharinath@novell.com>
10312
10313         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
10314         (PropertyExpr.EmitAssign): Likewise.
10315         * expression.cs (Indirection.EmitAssign): Likewise.
10316         (LocalVariableReference.EmitAssign): Likewise.
10317         (ParameterReference.EmitAssign): Likewise.
10318         (Invocation.EmitArguments): Likewise.
10319         (ArrayAccess.EmitAssign): Likewise.
10320         (IndexerAccess.EmitAssign): Likewise.
10321         (This.EmitAssign): Likewise.
10322         (ConditionalLogicalOperator.Emit): Likewise.
10323
10324         Fix #79026
10325         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
10326         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
10327         leave it in after returning it.
10328         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
10329
10330 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
10331
10332         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
10333         message.
10334
10335 2006-08-03  Raja R Harinath  <rharinath@novell.com>
10336
10337         Fix cs0146-3.cs and cs0146-4.cs.
10338         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
10339         enclosing types don't depend on the current type.
10340
10341 2006-08-02  Raja R Harinath  <rharinath@novell.com>
10342
10343         Fix #77963
10344         * class.cs (TypeContainer.DoDefineMembers): Use
10345         FindBaseMemberWithSameName on Parent, since we're interested in
10346         whether we hide inherited members or not.
10347         (FindBaseMemberWithSameName): Make slightly more robust.
10348
10349         Fix the non-generic testcase from #77396
10350         * decl.cs (DeclSpace.DeclContainer): Remove override.
10351
10352         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
10353         declspaces for doppelgangers too.
10354         (UsingEntry): Implement IResolveContext.
10355         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
10356         'this' as the resolve context.
10357         (LocalAliasEntry): Likewise.
10358
10359         Implement parts of #77403
10360         * roottypes.cs (RootDeclSpace): New.  Used to represent the
10361         toplevel declaration space.  Each namespace declaration introduces
10362         a "partial" root declaretion space.
10363         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
10364         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
10365         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
10366         from 'current_namespace.SlaveDeclSpace'.
10367         (namespace_declaration): Likewise.
10368         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
10369         check.  It can't happen now.
10370         * decl.cs (DeclSpace.LookupType): Likewise.
10371         * driver.cs (MainDriver): Sanity check.
10372
10373 2006-08-01  Raja R Harinath  <rharinath@novell.com>
10374
10375         * decl.cs (DeclSpace.FindNestedType): Remove.
10376         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
10377         LookupTypeContainer to get the container of the nested type.
10378         * class.cs (TypeContainer.FindNestedType): Make non-override.
10379
10380 2006-07-31  Raja R Harinath  <rharinath@novell.com>
10381
10382         * decl.cs (DeclSpace.PartialContainer): Move field from ...
10383         * class.cs (TypeContainer.PartialContainer): ... here.
10384         (TypeContainer.AddBasesForPart): New helper.
10385         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
10386         instead.
10387         * cs-parser.jay (current_class): Convert to DeclSpace.
10388         (struct_declaration, interface_declaration, class_declaration):
10389         Use AddBasesForPart instead of .Bases directly.
10390         * const.cs, iterators.cs: Update to changes.
10391
10392 2006-07-28  Raja R Harinath  <rharinath@novell.com>
10393
10394         * class.cs (TypeContainer.AddMemberType): Rename from
10395         AddToTypeContainer.
10396         (TypeContainer.AddMember): Rename from AddToMemberContainer.
10397         (AddTypeContainer): New.  Combine AddClassOrStruct and
10398         AddInterface.
10399         (AddPartial): Update.  Add 'is_partial' argument.
10400         * roottypes.cs: Update to changes.
10401         * cs-parser.jay (push_current_class): New helper for handling
10402         current_container and current_class.
10403         (struct_declaration, interface_declaration, class_declaration):
10404         Use it.
10405
10406 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10407
10408         * roottypes.cs: Rename from tree.cs.
10409
10410         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10411         * tree.cs (Tree, ITreeDump): Remove types.
10412         * rootcontext.cs (tree, Tree): Remove fields.
10413         (root, ToplevelTypes): New.
10414         * *.cs: Update to rename.
10415
10416         * tree.cs (Tree.RecordDecl): Remove.
10417         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10418         namespace here.
10419         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10420
10421 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10422
10423         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10424         DoFlowAnalysis and OmitStructFlowAnalysis here.
10425         (ec.With): Rename from WithUnsafe and generalize.
10426         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10427         (ec.WithFlowAnalyis): New.
10428         * ecore.cs, expression.cs, statement.cs: Update.
10429
10430 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10431
10432         * statement.cs (Block.ResolveMeta): Simplify slightly.
10433
10434         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10435         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10436         check_state to flags.
10437         (CheckState, ConstantCheckState): Update.
10438         (InUnsafe): New read-only property.
10439         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10440         arbitrary flags.
10441         (WithUnsafe): New helper similar to WithCheckState.
10442         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10443         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10444
10445 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10446
10447         Make comparisons use the same IL irrespective of whether they're
10448         in a 'checked' or 'unchecked' context: one of the issues in #78899
10449         * codegen.cs (EmitContext.CheckState): Make read-only property.
10450         (EmitContext.ConstantCheckState): Likewise.
10451         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10452         helper that implement a save/restore stack for CheckState
10453         values.  This is the only way to change check-state.
10454         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10455         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10456         (CheckedExpr.EmitBranchable): New forwarding method.
10457         (UnCheckedExpr): Likewise.
10458         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10459         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10460         (Checked.Resolve, checked.DoEmit): Likewise.
10461
10462 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10463
10464         * anonymous.cs: Cache the resolved anonymous delegate, and return
10465         this so that the ResolveTopBlock is only triggered once, not
10466         twice.
10467
10468         Currently we trigger ResolvetopBlock twice due to a first pass of
10469         argument check compatibility, and a second pass that does the
10470         actual resolution.   
10471         
10472 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10473
10474         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10475         modifiers.
10476         * rootcontext.cs (Reset): Add helper_classes.
10477
10478 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10479
10480         A fix for #78860
10481         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10482         correctly.
10483
10484 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10485
10486         * statement.cs (Lock): Handle expressions of type
10487         TypeManager.null_type specially.  Fixes #78770
10488
10489 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10490
10491         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10492         to an event.
10493
10494 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10495
10496         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10497         for accessors as well.
10498         * ecore.cs (EventExpr): Add AccessorTable.
10499
10500 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10501
10502         A fix for #78738
10503         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10504         for CS0122 where appropriate.
10505         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10506         level attributes.
10507         (Filter): Assembly can be null in the case of top level attributes.
10508
10509 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10510
10511         A fix for #78690
10512
10513         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10514         is done at global level.
10515
10516 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10517
10518         A fix for #77002, Implemented TypeForwarder support.
10519
10520         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10521         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10522         * typemanager.cs (): Add type_forwarder_attr_type.
10523
10524 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10525
10526         * report.cs: Add CS0469 warning.
10527
10528 2006-06-21  Martin Baulig  <martin@ximian.com>
10529
10530         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10531         the `try'-block, so we also report CS0016 etc. there.
10532
10533 2006-06-21  Martin Baulig  <martin@ximian.com>
10534
10535         * delegate.cs
10536         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10537
10538 2006-06-21  Martin Baulig  <martin@ximian.com>
10539
10540         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10541         also report CS1686 for parameters.
10542
10543 2006-06-21  Martin Baulig  <martin@ximian.com>
10544
10545         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10546         instead of an error if the value is not implicitly convertible to
10547         the switch types; fixes #77964.
10548
10549 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10550
10551         Fix #78673
10552         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10553         FieldBuilder is null.
10554
10555         Fix #78662
10556         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10557         'left' and 'right' before error-checking.
10558
10559 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10560
10561         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10562         Fixed bug #78601.
10563         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10564         (FieldExpr.DoResolve): likewise.
10565         (PropertyExpr.InstanceResolve): likewise.
10566         (EventExpr.InstanceResolve): likewise. 
10567
10568 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10569
10570         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10571         attribute applicable tests for attribute argument.
10572
10573 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10574
10575         Fix #78079
10576         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10577         (Binary.OverloadResolve_PredefinedIntegral): New.
10578         (Binary.OverloadResolve_PredefinedFloating): New.
10579         (Binary.OverloadResolve_PredefinedString): New.
10580         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10581         Follow the standard more closely, and treat numeric promotions in
10582         terms of overload resolution.
10583         (Binary.CheckShiftArguments): Simplify.
10584
10585 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10586
10587         * flowanalysis.cs (MyBitVector): Simplify representation.
10588         (MyBitVector.Clone): Avoid allocating BitArray.
10589         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10590         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10591         (*): Update.  Change all references to MyBitVector.And and
10592         MyBitVector.Or to &= and |=.
10593
10594 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10595
10596         Fix cs0231-[34].cs.
10597         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10598         to param arguments too.
10599
10600 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10601
10602         * cs-parser.jay: Catch another parsing form for arglist being
10603         followed by other arguments.  Fixes #78313.
10604
10605 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10606
10607         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10608         checking of out parameters to ...
10609         (FlowBranchingToplevel.Merge): ... here.
10610         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10611         set, propagate the origin upward, and only complain if there was
10612         no other error.
10613         (FlowBranchingException.AddContinueOrigin): Likewise.
10614         (FlowBranchingException.AddReturnOrigin): Likewise.
10615         (FlowBranchingException.AddGotoOrigin): Likewise.       
10616
10617 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10618
10619         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10620         unreachable, skip it.
10621         (FlowBranchingException.Merge): Always propagate jumps, even if
10622         the finally block renders subsequent code unreachable.
10623
10624 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10625
10626         Fix #77601
10627         * statement.cs (Goto.Resolve): Move responsibility for resolving
10628         'goto' to FlowBranching.AddGotoOrigin.
10629         (Goto.SetResolvedTarget): New.  Callback to set the
10630         LabeledStatement that's the target of the goto.
10631         (Goto.DoEmit): Use Leave instead of Br when crossing an
10632         unwind-protect boundary.
10633         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10634         LookupLabel and adjust to new semantics.
10635         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10636         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10637         Goto.SetResolvedTarget to update target.
10638         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10639         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10640         AddBreakOrigin & co.  Delay propagation until ...
10641         (FlowBranchingException.Merge): ... this.
10642
10643         * statement.cs (Block.Resolve): Always depend on flow-branching to
10644         determine unreachability.  Kill workaround that originally emitted
10645         only one statement after an "unreachable" label (see infloop in
10646         test-515.cs).
10647
10648         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10649         This is still "wrong", but anything better would probably need a
10650         multi-pass algorithm.
10651         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10652         usage vector.  Force current usage vector to be reachable, to
10653         optimistically signify backward jumps.
10654         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10655         detected.
10656         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10657         detected, return the original salted-away usage vector instead,
10658         updated with appropriate changes.  Print unreachable warning if
10659         necessary.
10660         * statement.cs (Block.Resolve): Don't print unreachable warning on
10661         a labeled statement.
10662
10663 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10664
10665         * driver.cs: Pass filename without path to AssemblyBuilder's 
10666         AddResourceFile. Fixes bug #78407.
10667
10668 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10669
10670         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10671         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10672         (FlowBranching.MergeChild): Overwrite
10673         reachability information from Labeled branchings too.
10674
10675 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10676
10677         * statement.cs (Goto.Resolve): Merge jump origins here ...
10678         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10679
10680         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10681         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10682         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10683         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10684         here, ...
10685         * statement.cs (Goto.Resolve): ... not here.
10686         (Goto.Emit): Remove CS1632 check.
10687
10688 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10689
10690         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10691         error message.
10692
10693 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10694
10695         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10696         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10697         (FlowBranchingException.Label): Likewise.
10698
10699         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10700         given value.
10701         (MyBitVector.Or): Use it to avoid losing information (Count).
10702         (FlowBranching.MergeOrigins): Likewise.
10703
10704         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10705         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10706         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10707         (UsageVector.ToString): Simplify.
10708         (UsageVector.MergeSiblings): Move here from ...
10709         (FlowBranching.Merge): ... here.
10710         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10711         not a MyBitVector.
10712
10713 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10714
10715         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10716         null bitvector is treated as all-true.
10717
10718         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10719         (MyBitVector): Rationalize invariants.  'vector != null' implies
10720         that we have our own copy of the bitvector.  Otherwise,
10721         'InheritsFrom == null' implies all inherited bits are true.
10722
10723 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10724
10725         * statement.cs (LocalInfo): Add IsConstant.
10726         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10727         local variable for constants.
10728
10729 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10730
10731         * flowanalysis.cs (MyBitVector.Empty): New.
10732         (MyBitVector): Don't allow InheritedFrom to be null.
10733         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10734         (UsageVector, FlowBranching): Update to changes.
10735
10736         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10737         recursion.  The 'Parent == null' condition isn't sufficient for
10738         anonymous methods.
10739         (FlowBranching.AddBreakOrigin): Likewise.
10740         (FlowBranching.AddContinueOrigin): Likewise.
10741         (FlowBranching.AddReturnOrigin): Likewise.
10742         (FlowBranching.StealFinallyClauses): Likewise.
10743         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10744         (FlowBranching.CheckOutParameters): Likewise.
10745         (FlowBranchingToplevel): Terminate all the above recursions here.
10746         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10747         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10748
10749         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10750         toplevel block.
10751         (FlowBranchingToplevel): New.  Empty for now.
10752         (FlowBranching.MergeTopBlock): Update.
10753         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10754         branching for the anonymous delegate.
10755         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10756
10757         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10758         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10759         information at the start of the merge.  Reorganize.
10760
10761 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10762
10763         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10764
10765 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10766
10767         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10768         to newly introduced ctor.
10769
10770         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10771         message to one place.
10772         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10773         global namespace.
10774
10775 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10776
10777         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10778
10779         * ecore.cs (Expression.ResolveAsConstant): Updated.
10780
10781         * statement.cs (ResolveMeta): Updated.
10782
10783 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10784
10785         * cs-parser.jay: __arglist cannot be used in initializer.
10786
10787 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10788
10789         A fix for #77879
10790         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10791         private types.
10792
10793 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10794
10795         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10796         (LabeledStatement): Add 'name' parameter.
10797         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10798         (Block.AddLabel): Update to changes.
10799         * cs-parser.jay (labeled_statement): Likewise.
10800
10801         * flowanalysis.cs (BranchingType.Labeled): New.
10802         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10803         (FlowBranchingLabeled): New.  Does nothing for now, but will
10804         eventually handle 'goto' flows.
10805         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10806         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10807         that's terminated ...
10808         (Block.Resolve): ... here.
10809
10810         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10811         (UsageVector.MergeFinallyOrigins): Likewise.
10812         (FlowBranching.InTryOrCatch): Likewise.
10813         (FlowBranching.AddFinallyVector): Likewise.
10814         (FlowBranchingException): Update to changes.
10815
10816         Fix #78290
10817         * statement.cs (Return.Resolve): Move error checking to ...
10818         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10819         (FlowBranchingException): Handle return origins like break and
10820         continue origins.
10821         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10822
10823 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10824
10825         A fix for #76122
10826         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10827         filter.
10828
10829 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10830
10831         A fix for #77543
10832         * class.cs (MethodData.Define): Do public accessor check only when method
10833         implements an interface.
10834
10835 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10836
10837         Remove special handling of 'break'
10838         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10839         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10840         (UsageVector.Break): Remove.
10841         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10842         reachability.
10843         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10844
10845         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10846         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10847
10848 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10849
10850         A fix for #75726
10851         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10852         be the interface member.
10853
10854 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10855
10856         A fix for #60069
10857         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10858         for emitting small (int) values.
10859
10860 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10861
10862         Fix #59427
10863         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10864         control-flow passes through the 'finally' after merging-in all the
10865         control-flows from 'try' and the 'catch' clauses.
10866
10867         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10868         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10869         always true at the only non-recursive entry point.
10870         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10871         FlowBranchingBreakable.
10872         (FlowBranchingLoop): Remove.
10873         * statement.cs (Return.DoResolve): Update to changes.
10874
10875         Fix #76471, #76665
10876         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10877         (FlowBranching.CreateBranching): Handle it: create a
10878         FlowBranchingContinuable.
10879         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10880         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10881         except that it handles the 'continue' command.
10882         (FlowBranching.UsageVector.MergeOrigins): Rename from
10883         MergeBreakOrigins.
10884         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10885         except that it overrides AddContinueOrigin.
10886         (FlowBranchingException): Override AddContinueOrigin, similar to
10887         AddBreakOrigin.
10888         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10889         Create a new branching around the embedded statement.
10890         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10891         control flow after the embedded statement.
10892         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10893
10894         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10895         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10896         FlowBranchingBreakable.
10897         (FlowBranchingSwitch): Remove.
10898
10899         Fix test-503.cs
10900         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10901         error reporting to ...
10902         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10903         Rename from 'AddBreakVector'.  Add new location argument.  Return
10904         a bool indicating whether the 'break' crosses an unwind-protect.
10905         (FlowBranchingException.AddBreakOrigin): Add.
10906         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10907         flowbranching after updating with the effects of the 'finally'
10908         clause.
10909         (FlowBranchingBreakable): New common base class for
10910         FlowBranchingLoop and FlowBranchingSwitch.
10911
10912         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10913         embedded statement.
10914         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10915
10916 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10917
10918         * statement.cs (Do.Resolve): If the loop is infinite, set the
10919         barrier.
10920         (While.Resolve, For.Resolve): Set a barrier after the embedded
10921         statement.  There's no direct control flow that goes from the end
10922         of the embedded statement to the end of the loop.
10923         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10924         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10925         above ensure that the reachability is correctly computed.
10926
10927         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10928         (UsageVector.MergeBreakOrigins): If the current path is
10929         unreachable, treat it as if all parameters/locals are initialized.
10930         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10931         infinite loops before merging-in break origins.
10932
10933         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10934         (Reachability.Reachable): Split part into ...
10935         (Reachability.Unreachable): ... this.  Simplify.
10936         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10937
10938         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10939         (Reachability.SetThrowsSometimes): Likewise.
10940         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10941         TriState.Always, use corresponding property.
10942         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10943         (Block.Resolve): Likewise.  Remove some redundant checks.
10944
10945 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10946
10947         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10948         (Reachability.Meet): Don't bother checking AlwaysThrows --
10949         barrier is always set.
10950         (FlowBranchingBlock.Merge): Likewise.
10951
10952 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10953
10954         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10955         checks for unreachable.
10956
10957 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10958
10959         A fix for #77980
10960         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10961
10962         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10963         whether field is really assigned.
10964
10965 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10966
10967         * flowanalysis.cs (Reachability): Make 4-argument constructor
10968         private.
10969         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10970         (Reachability.Always): Rename from the highly misleading
10971         'Reachability.Never'.
10972         (FlowBranching.Merge): Update to changes.  Mark an impossible
10973         situation with a 'throw'.
10974         (*): Update to changes.
10975
10976 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10977
10978         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10979         Remove 'Undefined'.
10980         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10981         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10982         (*): Update to changes.
10983         * statement.cs: Update to changes.
10984
10985 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10986
10987         A fix for #78049
10988         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10989
10990 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10991
10992         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10993         dummy UsageVector.
10994
10995         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10996         argument to two arguments: an usage-vector and a bool.  Move call
10997         to FlowBranching.Merge () ...
10998         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10999
11000         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
11001         handling of loop and switch reachability to ...
11002         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
11003
11004 2006-04-27  Raja R Harinath  <harinath@gmail.com>
11005
11006         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
11007         handling to FlowBranchingLoop.InLoop.
11008         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
11009
11010 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
11011
11012         A fix for #78115
11013         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
11014         anonymous method is allowed from AnonymousContainer here.
11015
11016         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
11017
11018 2006-04-24  Raja R Harinath  <rharinath@novell.com>
11019
11020         Fix #78156
11021         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
11022
11023 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
11024
11025         A fix for #49011.
11026         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
11027         (DoubleConstant.Reduce): Ditto.
11028
11029 2006-04-23  Raja R Harinath  <rharinath@novell.com>
11030
11031         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
11032         Remove 'lvalue_right_side' argument.  Move parts to ...
11033         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
11034         (LocalVariable.DoResolveLValue): ... these.
11035
11036 2006-04-21  Raja R Harinath  <rharinath@novell.com>
11037
11038         Fix cs1655.cs
11039         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
11040         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
11041         (LocalVariableReference.DoResolveBase): Use it to implement new
11042         CS1655 check.
11043         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
11044         (Argument.Resolve): Simplify.  Move CS1510 check ...
11045         * ecore.cs (Expression.ResolveLValue): ... here.
11046         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
11047         (PropertyExpr.DoResolveLValue): Likewise.
11048         (FieldExpr.Report_AssignToReadonly): Likewise.
11049         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
11050         LValueMemberAccess or LValueMemberOutAccess on instance depending
11051         on it.
11052         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
11053         DoResolve as appropriate.
11054
11055 2006-04-20  Raja R Harinath  <rharinath@novell.com>
11056
11057         Fix #75800
11058         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
11059         implicit conversions on 'out' and 'ref' arguments.
11060
11061         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
11062         improve clarity.  Remove dead code.
11063
11064         Fix #66031
11065         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
11066         (Catch.Resolve): Resolve VarBlock if it exists.
11067
11068 2006-04-19  Miguel de Icaza  <miguel@novell.com>
11069
11070         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
11071         twice, this was some residual code, the enumerator was emitted
11072         properly in the two branche of if later.
11073
11074 2006-04-19  Raja R Harinath  <rharinath@novell.com>
11075
11076         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
11077         cast is never an lvalue.
11078         (Cast.DoResolve, Cast.ResolveRest): Combine.
11079         (Argument.Emit): Simplify slightly.  Move 'Expr is
11080         IMemoryLocation' check ...
11081         (Argument.Resolve): ... here.
11082         (Argument.Error_LValueRequired): Remove.  Inline into only user.
11083
11084         Simplifications.  Fix cs0191-2.cs
11085         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
11086         CS1649 and CS1651 to ...
11087         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
11088         the actual selection of the error code and message to a lookup
11089         table.  Add a dummy return value to simplify callsites.
11090         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
11091         readonly fields of other instances of the same type.  Move CS0197
11092         warning from ...
11093         * expression.cs (Argument.Resolve): ... here.  Simplify code.
11094         Ensure that ec.InRefOutArgumentResolving is only set during LValue
11095         resolution of an out or ref argument.  The code simplification
11096         above uses this invariant.
11097
11098 2006-04-18  Raja R Harinath  <rharinath@novell.com>
11099
11100         Possibly fix #77752.  Fix cs1690-[4-7].cs.
11101         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
11102         CheckMarshallByRefAccess.  Drop parameter.
11103         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
11104         warning.
11105         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
11106         InstanceExpression.
11107         * report.cs (AllWarnings): Add CS1690.
11108         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
11109         for ref access too.
11110         (LocalVariableReference.DoResolveBase): Update.
11111
11112 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11113
11114         * class.cs (MethodOrOperator): Moved common parts from method class.
11115         detect obsolete attributes.
11116         (Method.Define): Simplified as it reuses code from base.
11117         (Constructor.ValidAttributeTargets): Fixed issue found during
11118         refactoring.
11119         (Destructor.ValidAttributeTargets): Fixed issue found during
11120         refactoring.
11121         (Operator): Finished refactoring set off by #78020. Operator class is now
11122         ordinary method class.
11123
11124         * anonymous.cs: Updated.
11125
11126         * decl.cs (DeclSpace): Add IsGeneric
11127
11128 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11129
11130         * class.cs (Constructor.Emit): Don't emit the attributes twice.
11131
11132 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11133
11134         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
11135         detect obsolete attributes.
11136         (Method.CreateEmitContext): Moved to MethodOrOperator.
11137
11138 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
11139
11140         A fix for #78048.
11141         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
11142         customized exception to make crash detection easier.
11143         (MethodOrOperator): Started to work on new base class for methods and
11144         operators.
11145         (Method): Derives from MethodOrOperator.
11146         (Constructor.Emit): Emits its own attributes.
11147         (AbstractPropertyEventMethod.Emit): Ditto.
11148         (Operator): Derives from MethodOrOperator, will refactor fully in extra
11149         patch.
11150         (Operator.Emit): It's temporary more tricky than should be.
11151         
11152         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
11153
11154         * report.cs (InternalErrorException): Add ctor with inner exception.
11155
11156 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
11157
11158         A fix for #76744.
11159         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
11160         only not visible.
11161
11162 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
11163
11164         A fix for #77916.
11165         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
11166         array.
11167
11168 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
11169
11170         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
11171         attribute is present and Guid not.
11172         (Interface.ApplyAttributeBuilder): Ditto.
11173
11174         * attribute.cs: Add error message.
11175
11176 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
11177
11178         A fix for #78020.
11179
11180         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
11181         sources (it's composite) so hold them in extra array as they are used in
11182         Emit phase only. It worked in the previous versions by mistake.
11183         (Attribute.Emit): Emit attribute for more owners when exist.
11184
11185         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
11186         it has now different behaviour.
11187
11188 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
11189
11190         * constant.cs (Constant.IsDefaultInitializer): New method.
11191
11192         * class.cs: Updated.
11193
11194         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
11195         re-initialize default values. It saves KBs almost for every assembly.
11196         Thanks Zoltan for the idea.
11197         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
11198         (ArrayCreation.DoResolve): Resolve only once.
11199         (ArrayCreation.Emit): Emit static initializer only when it is faster.
11200         (ArrayCreation.GetAttributableValue): Cope with optimized values.
11201
11202 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
11203
11204         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
11205         From #77961.
11206
11207 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11208
11209         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
11210         in an embedded statement too.
11211
11212 2006-04-01  Raja R Harinath  <rharinath@novell.com>
11213
11214         Fix #77958
11215         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
11216
11217 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11218
11219         A fix for #77966.
11220
11221         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
11222         was not specified.
11223
11224         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
11225
11226 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
11227
11228         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
11229         phase.
11230
11231         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
11232         LocalTemporary change.
11233
11234         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
11235         TypeContainer.
11236         (ClassOrStruct.DefineFieldInitializers): Implemented static field
11237         initializers optimization.
11238         (ClassOrStruct.TypeAttr): Moved from modifiers.
11239         (Constructor.CheckBase): Don't crash when static ctor has parameters.
11240         (FieldBase.ResolveInitializer): Resolves initializer.
11241         (FieldBase.HasDefaultInitializer): New property.
11242
11243         * cs-parser.jay: Removed message.
11244
11245         * expression.cs (CompilerGeneratedThis): New specialization.
11246
11247         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
11248
11249 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
11250
11251         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
11252
11253 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11254
11255         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
11256         be now EnumConstants only.
11257
11258 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11259
11260         * attribute.cs, driver.cs: Reset more caches.
11261
11262 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11263
11264         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
11265
11266 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11267
11268         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
11269         for easier reuse. Updated all overrides.
11270         (IntegralConstant): New base class for all integral constants.
11271         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
11272         of the constant range, report custom error.
11273         (UIntConstant.Reduce): Fixed uint conversion.
11274
11275         * ecore.cs, literal.cs: Reduce updates.
11276
11277 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11278
11279         A fix for #75813.
11280
11281         * class.cs (Constructor.Define): Removed extra if for default ctors.
11282         A patch from Atsushi Enomoto.
11283
11284 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11285
11286         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
11287         GetAttributableValue.
11288
11289         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
11290         when required.
11291
11292         * convert.cs (ImplicitConversionRequired): Error message moved to
11293         DoubleLiteral.
11294
11295         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
11296         automatic implicit conversion of an output value.
11297         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
11298
11299         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
11300         conversion.
11301         (TypeOf.GetAttributableValue): Add extra handling for object type.
11302
11303         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
11304         special error message.
11305
11306 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
11307
11308         * class.cs (Constructor.Emit): Don't crash when struct ctor is
11309         InternalCall.
11310         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
11311         compatible with MS runtime.
11312
11313 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
11314
11315         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
11316         attribute arguments here.
11317
11318         * class.cs (Indexer.Define): The check was moved to attribute class.
11319
11320 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
11321
11322         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
11323         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
11324         easier.
11325
11326 2006-03-22  Raja R Harinath  <rharinath@novell.com>
11327
11328         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
11329         mcs to keep code differences small.
11330         * attribute.cs (Attribute.GetParameterDefaultValue): New.
11331         * typemanager.cs (parameter_default_value_attribute_type): New.
11332         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
11333         CS1908 check.
11334
11335 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11336
11337         * expression.cs (StringConcat.Append): Reverted back to no warning state.
11338
11339 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11340
11341         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
11342
11343         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
11344         the blocks too.
11345
11346 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
11347
11348         * doc-bootstrap.cs : fix build.
11349
11350 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11351
11352         * expression.cs (StringConcat.Append): Issue a warning when empty string
11353         is going to append.
11354
11355 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11356
11357         * assign.cs (CompoundAssign.ResolveSource): Removed.
11358
11359         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
11360         clean up.
11361
11362         * class.cs (TypeContainer.FindMethods): Removed.
11363         (TypeContainer.CheckMemberUsage): Made static.
11364
11365         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
11366
11367         * constant.cs (CheckRange): Removed unused type argument.
11368         (CheckUnsigned): Removed unused type argument.
11369
11370         * cs-parser.jay: Updated after MemberAccess clean up.
11371         Uses Length for empty string test.
11372
11373         * cs-tokenizer.cs: Uses Length for empty string test.
11374         (IsCastToken): Made static.
11375         (is_hex): Made static.
11376         (real_type_suffix): Made static.
11377
11378         * decl.cs (SetupCache): Made static.
11379         (OnGenerateDocComment): Removed unused ds argument.
11380
11381         * delegate.cs (VerifyDelegate): Removed unused argument.
11382
11383         * doc.cs: Uses Length for empty string test.
11384
11385         * driver.cs: Uses Length for empty string test.
11386
11387         * enum.cs (IsValidEnumType): Made static
11388
11389         * expression.cs (EnumLiftUp): Removed unused argument.
11390         (ResolveMethodGroup): Ditto.
11391         (BetterConversion): Ditto.
11392         (GetVarargsTypes): Ditto.
11393         (UpdateIndices): Ditto.
11394         (ValidateInitializers): Ditto.
11395         (MemberAccess.ctor): Ditto.
11396         (GetIndexersForType): Ditto.
11397
11398         * flowanalysis.cs: (MergeFinally): Removed unused argument.
11399
11400         * iterators.cs: Updated after MemberAccess clean up.
11401
11402         * location.cs: Uses Length for empty string test.
11403
11404         * namespace.cs: Uses Length for empty string test.
11405
11406          * report.cs (CheckWarningCode): Made static.
11407
11408         * statement.cs (LabeledStatement): Removed unused argument.
11409
11410         * typemanager.cs (FilterNone): Removed.
11411
11412 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11413
11414         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11415         obsolete.
11416
11417         * class.cs: Updated.
11418
11419 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11420
11421         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11422
11423 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11424
11425         A fix for #77822.
11426
11427         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11428         reporting, it's more tricky than I thought.
11429
11430 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11431
11432         A fix for #77816.
11433
11434         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11435         host container.
11436         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11437         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11438         Add more error reporting; Fixed issue with params.
11439
11440         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11441
11442         * cs-parser.jay: AnonymousMethod requires host container.
11443
11444         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11445
11446 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11447
11448         * class.cs: Change 'TypeContainer ds' constructor argument to
11449         'DeclSpace parent'.  Some classes were missed below due to
11450         different naming convention.
11451
11452         * class.cs (MemberCore.Parent): Delete.  This makes the
11453         ParentContainer changes below enforceable by the compiler.
11454
11455         Treat pointers to enclosing declaration space as 'DeclSpace', not
11456         'TypeContainer'.
11457         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11458         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11459
11460         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11461         of TypeContainer.
11462         (Block.AddThisVariable): Likewise.
11463         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11464         (AbstractPropertyEventMethod.Emit): Likewise.
11465         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11466         (GetMethod.Define, SetMethod.Define): Likewise.
11467         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11468         (DelegateMethod.EmitMethod): Likewise.
11469
11470         Fix regression test-partial-13.cs.
11471         Rationalize use of PartialContainer.  Ensure that the partial
11472         class semantics can be tied to type-correctness, i.e., any
11473         violation will cause a compile error.
11474         * class.cs, const.cs: Access all fields that belong to class
11475         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11476         Resolve()-like functions still use 'Parent'.
11477
11478         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11479         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11480         (PropertyMethod.CheckModifiers): Remove unused argument.
11481         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11482         DeclSpace.
11483
11484 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11485
11486         Make semantics of PartialContainer simpler.
11487         * decl.cs (DeclSpace.IsPartial): Remove.
11488         * class.cs (TypeContainer.IsPartial): Likewise.
11489         (TypeContainer..ctor): Set PartialContainer to point to self.
11490         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11491         (TypeContainer.FindNestedType): Likewise.
11492         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11493
11494 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11495
11496         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11497
11498 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11499
11500         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11501         classes.
11502
11503 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11504
11505         * class.cs (Operator.Define): An error for base conversion was not
11506         reported correctly.
11507
11508 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11509
11510         * iterator.cs : yield break is allowed in try statement which has
11511           catch clauses. Fixed bug #77767.
11512
11513 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11514
11515         A fix for #77593, #77574.
11516
11517         * class.cs (MethodCore.CheckBase): Another if for operator.
11518
11519 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11520
11521         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11522         were not resolved
11523
11524         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11525         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11526         conversion test.
11527         
11528         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11529         not needed.
11530
11531         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11532         Updated after another emitcontext usage was clean up. It should help us to
11533         synchronize with gmcs easier.
11534
11535 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11536
11537         A fix for #77353.
11538
11539         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11540         (Event.Define): ditto
11541         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11542
11543         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11544         Removed redundant code and set NewSlot for Invoke method too.
11545
11546         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11547         (Parameters.MergeGenerated): New method. Use this method when you merge
11548         compiler generated argument with user arguments.
11549
11550 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11551
11552         * attribute.cs (ResolveAsTypeTerminal): Removed.
11553
11554         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11555         specialization for predefined types; 30% speed up.
11556         Finally placed obsolete check to right place.
11557         (Expression.ResolveType): Removed.
11558
11559         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11560         Updated after ResolveType was removed.
11561
11562         * expression.cs (Cast.ctor): Check void cast.
11563         (Binary.ResolveAsTypeTerminal): Is never type.
11564         (Conditional.ResolveAsTypeTerminal): Is never type.
11565
11566         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11567
11568 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11569
11570         Fix #77679.
11571         * expression.cs (ParameterReference.DoResolveBase): Change return
11572         type to bool.
11573         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11574         Update.
11575
11576         Fix #77628.
11577         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11578
11579         Fix #77642.
11580         * typemanager.cs (GetFullNameSignature): Don't nullref on
11581         protected accessors.
11582
11583 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11584
11585         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11586         these two separated members to simplify the code.
11587         (Attribute.Resolve): Refactored to use new fields and methods.
11588         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11589         implemented obsolete attribute checking.
11590         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11591         implemented obsolete checking again. It look line never ending quest ;-)
11592         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11593
11594         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11595
11596         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11597
11598         *class.cs (Property.Define): Add RegisterProperty call.
11599
11600         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11601         argument groups (only 2).
11602
11603         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11604         encoding expression to arguments.
11605         (Expression.ExprClassToResolveFlags): Just turned to property.
11606
11607         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11608         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11609         optimized as well as implemented support for zero-length attributes.
11610
11611         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11612         Add caching of PropertyInfo's.
11613
11614 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11615
11616         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11617         error multiple times.
11618
11619 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11620
11621         New partial class implementation.
11622         A fix for #77027, #77029, #77403
11623
11624         * attribute.cs (Attributable): Made attributes protected.
11625
11626         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11627         the replacements of ClassPart and PartialContainer.
11628         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11629         (TypeContainer.AddInterface): Ditto.
11630         (TypeContainer.AddPartial): The main method for partial classes. It checks
11631         for errors and merges ModFlags and attributes. At the end class is added to
11632         partial_parts list.
11633         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11634         required here.
11635         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11636         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11637         from the rest of partial classes.
11638         (TypeContainer.GetClassBases): Simplified.
11639         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11640         DefineType.
11641         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11642         (TypeContainer.HasExplicitLayout): Uses Flags now.
11643         (PartialContainer): Removed.
11644         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11645         (StaticClass): Was merged with Class.
11646         (Class.GetClassBases): class and static class bases are verified here.
11647         (Class.TypeAttr): Added static attributes when class is static.
11648         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11649         (MemberBase): In some cases we need to call parent container for partial
11650         class. It should be eliminated but it's not easy now.
11651
11652         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11653
11654         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11655         partial classed to accumulate class comments.
11656         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11657
11658         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11659
11660         * driver.cs (MainDriver): Tree.GetDecl was removed.
11661
11662         * modifiers.cs (Modifiers): Add partial modifier.
11663
11664         * tree.cs (Tree.decl): Removed.
11665         (RootTypes): Started to use this class more often for root types
11666         specializations.
11667
11668 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11669
11670         A fix for #77615
11671
11672         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11673         external interface does not have an attribute.
11674
11675 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11676
11677         Another prerequisites for new partial classs implementation.
11678         
11679         * attribute.cs (Attribute.Equal): Implemented.
11680         (Attribute.Emit): Changed as attributes can be applied more than twice.
11681         (Attributes.Emit): Check for duplicate attributes here.
11682
11683         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11684         as a parameter, clean-up.
11685
11686 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11687
11688         A fix for #77485
11689
11690         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11691         contains obsolete attribute check which can in some cases look for base
11692         type of current class which is not initialized yet.
11693         (TypeContainer.BaseType): Replacement of ptype.
11694
11695         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11696
11697 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11698
11699         First of prerequisites for new partial classs implemention.
11700         
11701         * attribute.cs (Attributable): Extended by ResolveContext;
11702         Attributes finally have correct context for resolving in all cases.
11703         (AttachTo): Attribute owner is assigned here.
11704
11705         * codegen.cs (IResolveContext): Introduce new interface to hold
11706         all information needed in resolving phase.
11707         (EmitContext): Implements IResolveContext; more clean-up needed here.
11708         
11709         * decl.cs (MemberCore): Implemented IResolveContext.
11710
11711         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11712         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11713         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11714         Refactored to use new IResolveContext instead of EmitContext; cleanup
11715
11716 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11717
11718         * codegen.cs (EmitScopeInitFromBlock): check here the
11719         capture_context, there is no need to make two calls to the
11720         EmitContext. 
11721
11722         * anonymous.cs: Add some debugging messages that might help me
11723         track other instances of this problem in the future (the
11724         regression of test 467).
11725
11726         * cs-parser.jay: track the variable block, as we need to initalize
11727         any captured variables declared in this block for the "catch"
11728         portion of the "Try" statement.
11729
11730         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11731         scope initialization for captured variables. 
11732
11733         Also, move the emit for the variables after the block location has
11734         been marked.
11735
11736 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11737
11738         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11739
11740 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11741
11742         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11743         commit yesterday, the initialization for the roots is necessary.
11744         What is not necessary is the scope activation.
11745
11746 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11747
11748         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11749         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11750         CS0206 checks.
11751         (Argument.Resolve): Remove CS0206 checks.
11752
11753 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11754
11755         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11756         scopes for all the roots, the scopes will now be emitted when the
11757         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11758
11759         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11760         code.  This reduces a lot of existing cruft.
11761         
11762         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11763         that the ScopeInfo is generated as we enter the scope, not at the
11764         time of use, which is what we used to do before.
11765
11766         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11767         every time a Block is about to be emitted if we have a
11768         CaptureContext. 
11769
11770 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11771
11772         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11773         (Reset): Update.
11774         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11775
11776         * typemanager.cs (cons_param_array_attribute): Make private.
11777         (Reset): Set it to null.
11778         (InitCoreHelpers): Don't initialize it.
11779         (ConsParamArrayAttribute): New.  Initialize it as needed.
11780         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11781
11782 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11783
11784         * expression.cs: There might be errors reported during the
11785         selection of applicable methods.  If there are errors, do not
11786         continue execution as it will lead the compiler to crash.
11787
11788 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11789
11790         * expression.cs: Member access is not allowed on anonymous
11791         methods.  Fixes #77402.
11792
11793 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11794
11795         Fix #77401
11796         * cs-parser.jay (VariableDeclaration): Don't set
11797         current_array_type to null.
11798         (field_declaration, event_declaration, declaration_statement):
11799         Set it to null here.
11800
11801 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11802
11803         * typemanager.cs (GenericParameterPosition): New.
11804         * doc.cs: Use it.
11805
11806 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11807
11808         * doc.cs : To process "include" elements, first we should create
11809           another list than XmlNodeList, because it could result in node
11810           removal, which could result in that the XmlNodeList gives up
11811           yielding next node.
11812
11813           (Also made code identical to gmcs again.)
11814
11815 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11816
11817         * ecore.cs: Introduce an error report that we were not catching
11818         before, if not silent, we must report the error.  Gonzalo ran into
11819         it.
11820
11821 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11822
11823         A fix for bug: #76957
11824         
11825         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11826         ComputeMethodHost before creating the method, this is a new
11827         requirement. 
11828
11829         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11830         that this method references (RegisterScope).  The actual scope
11831         where the method is hosted is computed with the ComputeMethodHost
11832         before we create the method.
11833
11834         Moved the Deepest routine here.
11835
11836         (AnonymousContainer.ComputeMethodHost): New routine used to
11837         compute the proper ScopeInfo that will host the anonymous method.
11838
11839         (ScopeInfo): Deal with multiple roots.  The problem was that we
11840         did not have a unique root where all ScopeInfos could be hanged
11841         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11842         of roots.  
11843
11844         Remove AdjustMethodScope which is now computed at the end.  Remove
11845         LinkScope which did a partial link, instead link all ScopeInfos
11846         before code generation from the new "LinkScopes" routine. 
11847
11848         Simplify all the Add* routines as they no longer need to maintain
11849         the tree, they just need to record that they are using variables
11850         from a ScopeInfo.
11851
11852         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11853         routines to produce the forest of ScopeInfo trees.
11854
11855         * class.cs (TypeContainer.AppendMethod): This is just like
11856         AddMethod, but ensures that an interface implementation method
11857         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11858         methods, but at the end.
11859
11860         We use this functionality to ensure that the generated MoveNext
11861         method in the iterator class is resolved/emitted before the
11862         enumerator methods created.   
11863
11864         This is required because the MoveNext method computes the right
11865         ScopeInfo for the method.  And the other methods will eventually
11866         need to resolve and fetch information computed from the anonymous
11867         method. 
11868
11869 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11870             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11871
11872         Fix rest of #76995.
11873         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11874         the 'aliases' hash.
11875         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11876         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11877
11878 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11879
11880         Fix #76656, cs0231-2.cs.
11881         * cs-parser.jay (formal_parameter_list): Make error case catch
11882         more issues.
11883         (parenthesized_expression_0): Add CS1026 check.
11884         (invocation_expression): Remove unused { $$ = lexer.Location }.
11885
11886 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11887
11888         Fix #76824.
11889         * cs-parser.jay (statement_expression): Don't list out the
11890         individual statement-expressions.  Convert syntax error into
11891         CS0201 check.
11892
11893 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11894
11895         Fix #76874.
11896         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11897         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11898         CheckIntermediateModification.
11899         (FieldExpr.DoResolve): Add new two-argument version that
11900         allows us to resolve the InstanceExpression as an lvalue.
11901         The one-argument variant is now just a wrapper.
11902         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11903         Resolve the lhs as an lvalue if the it has a value type.
11904         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11905         from Assign.DoResolve.
11906         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11907         resolved as an lvalue.
11908         (PropertyExpr.DoResolve): Update.
11909         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11910         has a value type.  Move CS1612 check here from
11911         CheckIntermediateModification.
11912         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11913         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11914         'right_side' of a ResolveLValue on an 'out' argument.
11915         (EmptyExpression.LValueMemberAccess): New.  Used as the
11916         'right_side' of a propagated ResolveLValue on a value type.
11917         (LocalVariableReference.DoResolveBase): Recognize
11918         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11919         Add CS1654 check.
11920         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11921         EmptyExpression.Null.
11922
11923 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11924
11925         * typemanager.cs : added IsGenericParameter(). In mcs it always
11926           return false.
11927         * doc.cs : for generic parameters, use GenericParameterPosition,
11928           not FullName.
11929
11930 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11931
11932         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11933
11934 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11935
11936         This fixes the problem where we used ldfld instead of ldflda to
11937         load the "THIS" pointer on captured parameters, when THIS is a
11938         value type.  See bug #77205.
11939         
11940         * iterators.cs (CapturedThisReference.Emit): Pass false to
11941         EmitThis (we do not need the address).
11942
11943         * codegen.cs (EmitThis): it needs to know whether we need the
11944         address of `this' or not.  This is used by value types.  
11945
11946         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11947         every other call passes false.
11948
11949 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11950
11951         Fix #77221.
11952         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11953         GetOverride.
11954         * expression.cs (Invocation.OverloadResolve): Update.
11955         (Invocation.DoResolve): Avoid double resolution of invocation.
11956
11957 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11958
11959         Fix #77180.
11960         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11961         unary negation of floating point types as 0-expr; negation cannot
11962         overflow in floating point types.
11963
11964         Fix #77204.
11965         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11966         on operands of 'void' type.
11967
11968         Fix #77200.
11969         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11970         and ExclusiveOr for boolean constants too.
11971
11972 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11973
11974         Fix #75636.
11975         * expression.cs (Invocation.OverloadResolve): Replace reflected
11976         override methods with their base virtual methods, rather than
11977         skipping over them.
11978         * typemanager.cs (TypeManager.GetOverride): New.
11979
11980 2006-01-05  Jb Evain  <jbevain@gmail.com>
11981
11982         * class.cs (Property.Define, Indexer.Define): do not tag the
11983         properties as SpecialName | RTSpecialName.
11984
11985 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11986
11987         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11988         doing a low-level comparission of parameter types.  It was lacking
11989         a check for __argslist. 
11990
11991 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11992
11993         * expression.cs (ParameterReference.DoResolveBase): Allow
11994         reference parameters if they are local to this block. 
11995
11996         This allows the ref and out parameters of a delegate to be used in
11997         an anonymous method, for example:
11998
11999         delegate void set (out int x);
12000
12001         set s = delegate (out int x){
12002                 x = 0;
12003         };
12004
12005         This is used by functionality introduced late in the C# language.
12006         
12007         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
12008         method that take ref and out parameters. 
12009
12010         Fixes #77119 which was a late change in the spec.
12011
12012 2005-12-23  Miguel de Icaza  <miguel@novell.com>
12013
12014         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
12015         parent if its the same scope.  Fixes #77060.
12016
12017 2005-12-21  Miguel de Icaza  <miguel@novell.com>
12018
12019         * driver.cs: Report the case of no source files and no -out:
12020         argument provided.
12021
12022 2005-12-20  Raja R Harinath  <rharinath@novell.com>
12023
12024         Fix #77035.
12025         * expression.cs (ComposedCast.GetSignatureForError): Define.
12026
12027 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12028
12029         Fix #76995
12030
12031         * namespace.cs (NamespaceEntry): Add extern_aliases as a
12032         ListDictionary, to contain the ExternAliasEntry entries (in
12033         addition to the NamespaceEntry.aliases hashtable). This field is
12034         shared between the original entry and its doppelganger (bodyless 
12035         copy of it).
12036         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
12037         extern_aliases field.
12038         (NamespaceEntry.Lookup): Move the IsImplicit check after the
12039         lookup in extern_aliases.
12040
12041 2005-12-16  Raja R Harinath  <rharinath@novell.com>
12042
12043         Fix #77006.
12044         * class.cs (TypeContainer.Mark_HasEquals): New.
12045         (TypeContainer.Mark_HasGetHashCode): New.
12046         (ClassPart): Override them.
12047         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
12048
12049         Fix #77008.
12050         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
12051         'parent' argument to the base constructor.
12052
12053         Remove all mention of TypeContainer from decl.cs.
12054         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
12055         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
12056         (DeclSpace.DeclSpace): Likewise.
12057         (DeclSpace.DefineMembers): Remove unused argument.
12058         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
12059         debugging check -- we don't care if the debug code throws an
12060         InvalidCastException instead of an InternalErrorException.
12061         * class.cs (TypeContainer.DefineMembers): Update to changes.
12062         (TypeContainer.DoDefineMembers): Likewise.
12063         (TypeContainer.GetMethods): Likewise.
12064         (PropertyMember.Define): Likewise.
12065         (MemberBase.Parent): New property that forwards to
12066         MemberCore.Parent, but ensures that we get a TypeContainer.
12067         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
12068         (RootContext.PopulateTypes): Likewise.  Remove special case code
12069         for !RootContext.StdLib: DefineMembers is idempotent.
12070
12071 2005-12-14  Miguel de Icaza  <miguel@novell.com>
12072
12073         * convert.cs (ExplicitConversionCore): Check the return value from
12074         ExplicitConversionCore which can return null on failure.  Fixes #76914
12075
12076 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
12077
12078         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
12079
12080 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
12081
12082         * doc.cs : The search for referenced namespace was insufficient to
12083           get global one as it used to do. Fixed bug #76965.
12084
12085 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
12086
12087         * doc.cs : check name in cref in the last phase that whether it is
12088           namespace or not.
12089
12090 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
12091
12092         * cs-tokenizer.cs : reverted the latest change: it somehow broke
12093           Mono.C5.
12094
12095 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
12096
12097         * doc.cs : so it turned out that we cannot skip override check for 
12098           interface members. Fixed bug #76954.
12099
12100 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
12101
12102         * cs-tokenizer.cs : fixed bug #75984:
12103           - #warning and #error should not be handled when the source line
12104             is disabled.
12105           - #line is not checked strictly when the source line is disabled.
12106           - #define and #undef is on the other hand checked strictly at any
12107             state.
12108
12109 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
12110
12111         * cs-tokenizer.cs : missing Location (actually, filename) in one of
12112           CS1027 report.
12113
12114 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
12115
12116         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
12117
12118         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
12119         event initializers.
12120         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
12121         (FieldBase.Initializer): Initializer is now optional.
12122         (EventField.Define): Only event field can have initializer.
12123
12124         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
12125
12126         * const.cs (Const): Reuse initializer.
12127
12128         * cs-parser.jay: Updated after FieldBase changes.
12129         Added current_array_type to simplify array initializers.
12130
12131         * ecore.cs (NullCast.IsDefaultValue): Implemented.
12132
12133         * expression.cs, iterators.cs: Updated.
12134
12135         * namespace.cs (NamespaceEntry): Made UsingFound private.
12136
12137 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
12138
12139         * parameterCollection.cs: Obsolete, removed.
12140         * parser.cs: Obsolete, removed.
12141
12142 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
12143
12144         Fix #76849.
12145         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
12146
12147         * enum.cs (Enum.Define): Set obsolete context here.
12148
12149 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
12150
12151         * doc.cs :
12152           - FindDocumentedMember() now expects 1) paramList as null
12153             when "we don't have to check the number of parameters" and
12154             2) Type.EmptyTypes when "there is no arguments".
12155           - Introduced FoundMember struct to hold the exact type which was
12156             used to find the documented member (the above change broke
12157             test-xml-044; it might be better just to use DeclaringType than
12158             what MS does, like this change does, but it depends on usage.)
12159
12160 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
12161
12162         * doc.cs : documented member might be from DeclaringType for nested
12163           types. Fixed bug #76782.
12164
12165 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
12166
12167         * anonymous.cs: Have the param code handle leaving copies on the
12168         stack etc. Allows anonymous params to take part in the assignment
12169         code (++, +=, etc). Fixes bug #76550
12170
12171         * expression.cs: Handle the prepare_for_load/leave_copy by passing
12172         it down to the anon code.
12173
12174         * iterators.cs: Use dummy var here
12175
12176         * codegen.cs: Handle new vars
12177
12178 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
12179
12180         Fix #76849.
12181         * class.cs (MethodData.Define): Set proper Obsolete context.
12182
12183         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
12184         obsolete context.
12185         (FieldExpr.DoResolve): Ditto.
12186
12187 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
12188
12189         Fix #76849.
12190         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
12191         parent is not obsolete.
12192
12193 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
12194
12195         * doc.cs : (FindDocumentedMember) find parameterless members first
12196           and get CS0419 in the early stage. Fixed first case of bug #76727.
12197
12198 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
12199
12200         Fix #76859.
12201         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
12202         no error was reported.
12203
12204         *expression.cs (Binary.DoResolve): left can be null.
12205
12206 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
12207
12208         Fix #76783.
12209         * class.cs (MethodData.Emit): Parameters should be labeled first.
12210
12211 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
12212
12213         Fix #76761.
12214         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
12215
12216 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
12217
12218         * attribute.cs (AreParametersCompliant): Moved to Parameter.
12219
12220         * class.cs (MethodCore): Parameter clean up.
12221         (IMethodData): Added ParameterInfo.
12222         (MethodData): Parameter clean up.
12223         (Indexer.Define): Parameter clean up.
12224
12225         * anonymous.cs,
12226         * codegen.cs,
12227         * cs-parser.jay,
12228         * decl.cs,
12229         * doc.cs,
12230         * ecore.cs,
12231         * flowanalysis.cs,
12232         * iterators.cs,
12233         * pending.cs,
12234         * statement.cs,
12235         * typemanager.cs: Parameter clean up.
12236
12237         * delegate.cs (Define): Get rid of duplicated code.
12238
12239         * expression.cs (ParameterReference): Removed useless parameters
12240         and simplified.
12241         (Invocation): Ditto.
12242
12243         * parameter.cs (ParamsParameter): New class, params specialization.
12244         (ArglistParameter): Attemp to separate arglist.
12245         (Parameter): Refactored to be reusable and faster.
12246         (Parameter.Modifier): Made understandable.
12247         (Parameters): Changed to be used as a class for `this' assembly
12248         parameters. Refactored to use new specialized classes.
12249
12250         * support.cs (ParameterData): Added Types property.
12251         (InternalParameters): Deleted.
12252
12253 2005-08-20  Martin Baulig  <martin@ximian.com>
12254
12255         Merging this patch from GMCS to fix #75867.
12256
12257         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12258         scope if we don't already have it.
12259
12260 2005-11-17  Martin Baulig  <martin@ximian.com>
12261
12262         * anonymous.cs
12263         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
12264         inherit the scope from our parent.  Fixes #76653.
12265
12266 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12267
12268         * doc.cs : the previous patch does not actually fix the bug.
12269           PropertyInfo override check is now implemented and really fixed it.
12270         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
12271
12272 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12273
12274         * doc.cs : apply "override filter" also to properties.
12275           Fixed bug #76730.
12276
12277 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12278
12279         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
12280           no need to check overrides. For classes, omit those results from 
12281           interfaces since they must exist in the class. Fixed bug #76726.
12282
12283 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12284
12285         * typemanager.cs : (GetFullNameSignature) differentiate indexers
12286           with different parameters. Fixed the second problem in #76685.
12287
12288 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12289
12290         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
12291           get expected 'protected' access in CheckValidFamilyAccess()).
12292           Fixed bug #76692.
12293
12294 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12295
12296         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
12297           Fixed bug #76705.  CS1569 was incorrectly commented out.
12298
12299 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12300
12301         * doc.cs : use Invocation.IsOverride() to do real override check.
12302         * expression.cs : made Invocation.IsOverride() internal.
12303
12304 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12305
12306         * doc.cs : use TypeManager.FindMembers() instead of (possible)
12307           TypeBuilder.FindMembers() and filter overriden base members out.
12308           Fixed bug #76990.
12309
12310 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12311
12312         * doc.cs : ref/out parameters are represented as '@' (instead of
12313           '&' in type FullName). Fixed bug #76630 (additionally crefs).
12314
12315 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12316
12317         * doc.cs : when there was no '.' in cref to methods in doc comment,
12318           then parameters were missing in the output. Fixed bug #76691.
12319
12320 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12321
12322         * driver.cs : don't output docs when there is an error.
12323           Fixed bug #76693.
12324
12325 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12326
12327         * doc.cs :
12328           Now it should detect indexers. Fixed primary concern in bug #76685.
12329           Fixed CS0419 message to not show the identical member signature in
12330           the message.
12331
12332 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12333
12334         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
12335           instead of Type.FindMembers() since it does not handle events.
12336           Fixed bug #71604.
12337
12338 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
12339
12340         * codegen.cs: Fixed typo (speficied -> specified).
12341
12342 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12343
12344         Fix #76369.
12345         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
12346
12347 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12348
12349         * attribute.cs: Changed error message.
12350
12351         * cs-tokenizer.cs: One more check.
12352
12353 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12354
12355         * statement.cs (Block.Resolve): Ignore empty statement.
12356
12357 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12358
12359         * report.cs: Made error/warning methods more strict to avoid
12360         their misuse.
12361
12362         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
12363         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
12364         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
12365         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
12366
12367 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
12368
12369         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
12370         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
12371
12372         * class.cs (TypeContainer.IsComImport): New property.
12373         (Constructor.Define): Create proper ctor for ComImport types.
12374
12375         * expression.cs (New.CheckComImport): Fixed.
12376
12377 2005-11-07  Miguel de Icaza  <miguel@novell.com>
12378
12379         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
12380         that a parameter has been captured does not mean that we do not
12381         have to do the rest of the processing.  This fixes the second part
12382         of #76592.  If there was another anonymous method capturing
12383         values in the past, the Scope would never be set for the second
12384         method that captured the same parameter.
12385
12386         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
12387         properly manipulate the stack.   Second part of fix for #76592.
12388
12389         * expression.cs (New): Add support for invoking "new" on
12390         interfaces that have been flagged with the ComImport attribute and
12391         the CoClass.  Fixes #76637 
12392
12393         * statement.cs (Try.DoEmit): When a variable is captured, do not
12394         try to emit the vi.LocalBuilder variable as it has been captured.
12395         Create a temporary variable and store the results on the
12396         FieldBuilder.  Fixes #76642
12397
12398 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
12399
12400         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
12401
12402         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
12403
12404         * expression.cs (Binary.DoResolve): Added && optimalization.
12405     
12406         * typemanager.cs (AddUserType): Removed useless argument.
12407
12408 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12409
12410         * statement.cs (Block.variables): Uses ListDictionary.
12411
12412 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12413
12414         Fix #75969.
12415         * class.cs (PartialContainer.EmitType): Customized to emit
12416         security attributes.
12417         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12418         for partial classes.
12419
12420 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12421
12422         Fix #76599.
12423         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12424         access has to be fixed.
12425         
12426         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12427
12428 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12429
12430         Fix #76590.
12431         * ecore.cs (NullCast.Reduce): Implemented.
12432
12433         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12434         constant type.
12435         
12436         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12437         properly.
12438         (Foreach.Resolve): Catch null properly.
12439
12440 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12441  
12442         * cs-tokenizer.cs: Warning text fix.
12443
12444         * driver.cs: AllWarningNumbers exposed on public interface.
12445
12446         * report.cs (): Reviewed warning numbers.
12447         (IsValidWarning): Use binary search.
12448
12449 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12450  
12451         * driver.cs: Implemeted resource visibility.
12452         (Resources): New class for code sharing between /res: and
12453         /linkres:
12454  
12455 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12456
12457         Fix #76568.
12458         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12459         folding.
12460         
12461         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12462         contants only.
12463         
12464         * ecore.cs (NullCast): Child is contant only.
12465         
12466         * literal.cs (NullLiteral.Reduce): null can be converted to any
12467         reference type.
12468
12469 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12470
12471         * driver.cs: Use Encoding.Default as default code page instead
12472           of ISO-28591.
12473
12474 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12475
12476         Fix #76085.
12477         * expression.cs (Invocation.Error_InvalidArguments): Handle
12478         __arglist parameters.
12479         (Invocation.VerifyArgumentsCompat): Likewise.
12480         * support.cs (ReflectionParameters.GetSignatureForError): Print
12481         __arglist parameters.
12482         (InternalParamters.GetSignatureForError): Likewise.
12483         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12484
12485 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12486
12487         * attribute.cs (GetPropertyValue): Made public.
12488
12489         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12490         Resolve.
12491         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12492         attribute.
12493         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12494         is not defined.
12495         
12496         * driver.cs: Reflect method name change.
12497         
12498         * statement.cs (Try.Resolve): Warn when try has both general
12499         exception handlers.
12500         
12501         * typemanager.cs: runtime_compatibility_attr_type new predefined
12502         type.
12503
12504 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12505
12506         Fix #76419.
12507         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12508         treat it as an empty parameter list.
12509
12510 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12511
12512         Fix #76271.     
12513         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12514         ResolveAsTypeStep silent.
12515         * statement.cs (Block.AddConstant): Mark block as used.
12516         (Block.ResolveMeta): Avoid piling on error messages
12517         if a constant initializer resolution fails.
12518
12519 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12520
12521         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12522         Remove.
12523         (NamespaceEntry.VerifyAllUsing): New.
12524         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12525         behaviour.  Delegates actual resolution of alias to ...
12526         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12527         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12528         Update.
12529         * driver.cs (Driver.MainDriver): Update.
12530         
12531         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12532         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12533         property.
12534         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12535         Remove.
12536         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12537         RootNamespace.DefineNamespacesForAll.
12538
12539 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12540
12541         * typemanager.cs (assemblies, external_aliases, modules)
12542         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12543         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12544         overhead.  Move resposibility ...
12545         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12546         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12547
12548 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12549
12550         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12551         cached_namespaces.  Improve usage.
12552         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12553         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12554         Move from GlobalRootNamespace and simplify.
12555         (RootNamespace.Global): Make instance variable.
12556         (RootNamespace.RootNamespace): Add "alias name" parameter.
12557         (GlobalRootNamespace): Simplify drastically.
12558         (Namespace.Lookup): Don't use GetNamespace.
12559         * typemanager.cs (GetRootNamespace): Rename from
12560         ComputeNamespaceForAlias.
12561         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12562
12563 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12564
12565         * anonymous.cs (AnonymousContainer): Don't crash when container
12566         doesn't exist.
12567
12568 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12569
12570         * expression.cs (Binary.DoResolve): Warn when comparing same
12571         values.
12572
12573 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12574
12575         Fix #76486.
12576         * expression.cs (Binary.DoResolve): It looks like there are no
12577         convetsion rules in enum context.
12578
12579 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12580
12581         Add support for extern alias qualifiers.
12582         * typemanager.cs: Move some LookupTypeReflection code
12583         to namespace.cs, to have cleaner code. Added some methods
12584         to help us keep track of the extern aliased references.
12585         * driver.cs: Add suport for extern alias assemblies on command
12586         line and check for their warnings/errors. Also keep track of the
12587         extern aliased assemblies.
12588         * namespace.cs: Move the global functionality of Namespace
12589         to GlobalRootNamespace/RootNamespace. Now the global namespace
12590         is GlobalRootNamespace.Globa. Also the code moved from 
12591         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12592         Finally added LocalAliasEntry (AliasEntry before) and
12593         ExternAliasEntry, to handle alias statements.
12594         * cs-parser.jay: Add support in the grammar for extern alias
12595         statement.
12596         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12597         Update callings to Namespace (now in GlobalRootNamespace).
12598
12599 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12600
12601         Fix #76371.
12602         * class.cs (TypeContainer.DefineType): Move updating of
12603         topological sort earlier in the code.
12604         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12605
12606 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12607
12608         Fix #76273.
12609         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12610         
12611         * constant.cs (Constant.TryReduce): Moved from Cast class.
12612         (Reduce): Made little bit more OO and fixed missing conversions.
12613         
12614         * ecore.cs (Reduce): Implemented.
12615         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12616         
12617         * literal.cs (Reduce): Implemented.
12618         
12619         * class.cs: Reverted Miguel's wrong commit.
12620
12621 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12622
12623         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12624
12625 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12626
12627         * cs-parser.jay, expression.cs : CS0214 was missing error location
12628           for constants. Fixed bug #76404.
12629
12630 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12631
12632         Fix #76370.
12633         * convert.cs (ExplicitConversionCore): Fixed object->enum
12634         conversion.
12635
12636 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12637
12638         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12639         InstanceExpression.
12640         (PropertyExpr.EmitCall): Likewise.
12641         * expression.cs (Invocation.EmitArguments): Handle case where
12642         arguments == null.
12643         (Invocation.EmitCall): Avoid allocating temporary variable if
12644         there are no arguments.
12645
12646 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12647
12648         Fix #76323.
12649         * convert.cs (ImplicitConversionStandard): Move conversion of
12650         void* to arbitrary pointer types ...
12651         (ExplicitConversionStandard): .. here.
12652         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12653         error to always print typenames.
12654
12655 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12656
12657         * convert.cs (GetConversionOperator): Rename from
12658         GetConversionOperators.  Move operator selection code from ...
12659         (UserDefinedConversion): ... here.
12660
12661 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12662
12663         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12664         conversion.
12665
12666 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12667
12668         * assign.cs (Assign.DoResolve): Error method changed.
12669
12670         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12671         
12672         * const.cs (ResolveValue): Reset in_transit immediately.
12673         
12674         * constant.cs: Error method changed.
12675         
12676         * convert.cs: Removed useless location parameter.
12677         (ExplicitNumericConversion): Don't do double enum check.
12678         (ExplicitConversionCore): Renamed from ExplicitConversion.
12679         (ExplicitUnsafe): Extracted from ExplicitConversion.
12680         (ExplicitConversion): Uses for error reporting.
12681         
12682         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12683         error messages.
12684         (ResolveBoolean): Uses common error method.
12685         (CastToDecimal): Get rid of ec.
12686         (CastFromDecimal): Optimized.
12687         (ConvCast): Get rid of ec.
12688         
12689         * enum.cs (ResolveValue): Reset in_transit immediately.
12690         (Emit): Return after first error.
12691         
12692         * expression.cs: Convert changes.
12693         
12694         * literal.cs: Error method changed.
12695         
12696         * statement.cs: Error method changed.
12697
12698 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12699
12700         * support.cs (SeekableStreamReader.Position): Don't error out when
12701         the requested position is just beyond the end of the current
12702         buffered data.
12703
12704 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12705
12706         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12707         try to keep in sync with the byte count of the underlying Stream.
12708         However, this limits us to a window size of 2048 characters: i.e.,
12709         the maximum lookahead of our lexer/parser can be 2048 characters.
12710
12711 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12712
12713         Fix #76255.
12714         * driver.cs: Fix compilation files with full root path.
12715
12716 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12717
12718         * report.cs (SymbolRelatedToPreviousError): Format the output so
12719         it does not use an open parenthesis that is never closed. 
12720
12721         * driver.cs: Follow coding guidelines
12722
12723 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12724
12725         Fix #72930.
12726         * const.cs (Const.ResolveValue): Check for assigning non-null
12727         value to reference type.
12728
12729 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12730
12731         * anonymous.cs: Implemented ExprClassName.
12732         
12733         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12734         delegate.
12735         
12736         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12737         check.
12738         
12739         * class.cs (StaticClass.DefineContainerMembers): Report protected
12740         members as error.
12741         
12742         * codegen.cs: if(ed) PRODUCTION.
12743         
12744         * convert.cs (Error_CannotImplicitConversion): Better error
12745         distinction.
12746         
12747         * cs-parser.jay: More error checks.
12748         
12749         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12750         
12751         * driver.cs (CSCParseOption): Enabled wrong option check.
12752         
12753         * ecore.cs (Expression.ExprClassName): Turned to property.
12754         (MemberExpr.CheckIntermediateModification): For checking boxed
12755         value types     modification.
12756         
12757         * statement.cs (Fixed.Resolve): Expression type must be
12758         convertible to fixed type.
12759         (CollectionForeach.GetEnumeratorFilter,TryType):
12760         Small refactoring for easier error checking.
12761
12762 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12763
12764         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12765         attributes.
12766         
12767         * class.cs (GeneratedBaseInitializer): New class for customization
12768         compiler generated initializers.
12769         (MemberBase.DoDefine): Check Obsolete attribute here.
12770         (FieldMember.DoDefine): Ditto.
12771         
12772         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12773         constants.
12774         
12775         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12776         (MemberCore.GetObsoleteAttribute): Removed argument.
12777         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12778         (MemberCore.CheckObsoleteType): New helper.
12779         
12780         * delegate.cs,
12781         * enum.cs,
12782         * statement.cs: Updates after MemberCore changes.
12783         
12784         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12785         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12786         
12787         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12788         obsolete attribute for compiler construct.
12789         (As.DoResolve): Cache result.
12790         
12791         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12792
12793 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12794
12795         Fix #76133.
12796         * expression.cs (This.VerifyFixed): In a value type T, the type of
12797         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12798         value type R, 'this' is treated as a value parameter.
12799
12800 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12801
12802         * statement.cs (Lock): Use the TemporaryVariable class instead of
12803         manually using local variables as those do not work when variables
12804         are captured.
12805
12806         * ecore.cs: Moved the TemporaryVariable class from being a nested
12807         class inside Foreach to be a public class that can be employed in
12808         other places. 
12809
12810 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12811
12812         * cs-parser.jay: interface_accessors replaced by
12813         accessor_declarations.
12814
12815         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12816         location.
12817         
12818         * statement.cs (GotoCase.Resolve): Convert null constant to
12819         null case.
12820         (SwitchLabel.ResolveAndReduce): Ditto.
12821         (SwitchLabel.NullStringCase): Custom null stamp.
12822         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12823         
12824         typemanager.cs (CSharpSignature): Don't skip first argument
12825         for full names.
12826
12827 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12828
12829         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12830
12831         * location.cs (InEmacs): in this mode, do not report column
12832         location as it confuses Emacs.
12833
12834 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12835
12836         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12837         expression.cs, iterators.cs, literal.cs: Store constants and
12838         literals location.
12839         
12840         * class.cs (MemberBase.ShortName): Pass location.
12841         
12842         * cs-parser.jay: Some location fixes.
12843         
12844         * ecore.cs (Expression.Location): Made virtual.
12845
12846 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12847
12848         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12849         if the underlying types are the same, otherwise we need to produce
12850         code that will do the proper cast.
12851
12852         This was exposed by Marek's constant rewrite which produced
12853         invalid code for the call site:
12854
12855         enum X : long { a }
12856         void Method (X v) {}
12857
12858         Method ((X) 5)
12859
12860         This fixes test-49.cs
12861
12862 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12863
12864         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12865           Type/Object should be allowed as well. Fixed bug #75968.
12866
12867 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12868
12869         * expression.cs : (Binary.DoResolve): when one is enum constant and
12870           another is constant 0, then return enum one *as enum type*.
12871           Fixed bug 74846.
12872
12873 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12874
12875         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12876         internal.
12877
12878         Fix #75941.
12879         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12880         flow-branching for LocalVariableReferences in case we were invoked
12881         from a MemberAccess.
12882         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12883         Carved out of ...
12884         (LocalVariableReference.DoResolveBase): ... this.
12885         (MemberAccess.Resolve): Do the check that was disabled during
12886         SimpleNameResolve.
12887
12888 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12889
12890         * class.cs :
12891           (PartialContainer.Create): check abstract/sealed/static strictly
12892           but abstract/sealed can exist only at one side. Fixed bug #75883.
12893
12894 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12895
12896         Fix #75945.
12897         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12898         specified, don't default to UnmanagedType.I4.
12899
12900 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12901
12902         * expression.cs : conditional operator should check possibly
12903           incorrect assign expression. Fixed bug #75946.
12904
12905 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12906
12907         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12908           Reverting the change. gmcs is much complex than mcs on this matter.
12909
12910 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12911
12912         * cs-tokenizer.cs : To read another token ahead of the actual 
12913           consumption, use new SavedToken and cache token instead of moving
12914           back the stream with SeekableStreamReader (it seemed problematic).
12915         * cs-parser.jay,
12916           driver.cs : Thus use StreamReader directly.
12917         * support.cs : Thus removed SeekableStreamReader.
12918
12919 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12920
12921         Fix #75934.
12922         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12923         (ScopeInfo.EmitScopeType): Use it to construct field names from
12924         names of captured locals.
12925
12926         Fix #75929.
12927         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12928         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12929         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12930         (ExplicitConversion): Remove enum cases already handled by
12931         implicit conversion.  Move implicit conversion check to the beginning.
12932         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12933         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12934         Don't treat System.Enum as a struct.
12935
12936 2005-08-30  Jb Evain  <jbevain@gmail.com>
12937
12938         * attribute.cs: handles as expression in parameters.
12939
12940 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12941
12942         Fix #75802.
12943         * class.cs (TypeContainer.VerifyClsName): Don't use a
12944         PartialContainer when verifying CLS compliance.
12945         (AbstractPropertyEventMethod): Set Parent here, ...
12946         (PropertyMethod): ... not here.
12947
12948 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12949
12950         * attribute.cs : escaped attribute name should not be allowed to be
12951           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12952
12953 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12954
12955         Fix #75927.
12956         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12957         when converting a long constant to unsigned long.
12958         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12959         detect where IsApplicable and VerifyArgumentsCompat disagree.
12960
12961 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12962         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12963
12964         Fix #75848.
12965         * class.cs (TypeContainer.CanElideInitializer): New helper.
12966         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12967         can safely emitting the initializer of a field.
12968
12969 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12970
12971         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12972           allowed inside a switch (without loop). Fixed bug #75433.
12973
12974 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12975
12976         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12977         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12978
12979 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12980
12981         * driver.cs : kinda reverting the default encoding changes (not exact 
12982           revert since I noticed that "codepage:reset" might not work fine).
12983
12984 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12985
12986         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12987           Location. Now getter and setter store location correctly.
12988           (errors/cs0111-12.cs now reports the expected location.)
12989
12990 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12991
12992         * driver.cs : Use default encoding on the environment.
12993           Removed (now that) extra parameter for SeekableStreamReader.
12994         * support.cs : (SeekableStreamReader) third .ctor() argument for
12995           StreamReader is not required (always true). preamble size could
12996           be acquired in simpler and safe way.
12997
12998 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12999
13000         * cs-parser.jay: report CS0642 at warning level 3
13001           and report CS0642 for an if else statement also
13002           fixes bug #74745. Patch by John Luke (and a bit
13003           modified by me).
13004           Removed extra CS0642 warning check for "while",
13005           "for" and "fixed".
13006         * statement.cs: In Block.Resolve(), CS0642 check
13007           is reimplemented to check a sequence of an empty
13008           statement and a block.
13009
13010           Both fix bug #66777.
13011
13012 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
13013
13014         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
13015         detection until I fix it.
13016         
13017         * cs-tokenizer.cs: Changed error message.
13018         
13019         * cs-parser.jay: Fixed 2 error locations.
13020         
13021         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
13022         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
13023         properties.
13024         
13025         * enum.cs (GetSignatureForError): Fixed.
13026         
13027         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
13028         method detection.
13029         
13030         * class.cs,
13031         * typemanager.cs (RegisterProperty): Removed.
13032         
13033         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
13034
13035 2005-08-24  Raja R Harinath  <rharinath@novell.com>
13036
13037         Fix #75874.
13038         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
13039         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
13040
13041 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13042
13043         * expression.cs : tiny fix is required for not warning positive ulong.
13044           See test-441.cs.
13045
13046 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13047
13048         * expression.cs : add CS0652 check for constant and integral
13049           expression. Fixed bug #53974.
13050
13051 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13052
13053         * expression.cs : in DoNumericPromotions(), check if there is implicit
13054           conversion overload for string (to check CS0034). Fixed bug #52492.
13055
13056 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13057
13058         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
13059
13060 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13061
13062         * ecore.cs : report location when it is *not* Null.
13063
13064 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
13065
13066         * codegen.cs,
13067           ecore.cs,
13068           flowanalysis.cs,
13069           expression.cs:
13070           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
13071           correctly. Fixed bug #75721.
13072
13073 2005-08-23  Raja R Harinath  <rharinath@novell.com>
13074
13075         * support.cs (SeekableStreamReader.Position): Avoid an expensive
13076         loop that performs 'min (pos, char_count)'.
13077
13078         Fix #75862.
13079         * expression.cs (Unary.ResolveOperator): Don't discard implicit
13080         converted value in Operator.OnesComplement.
13081
13082 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
13083
13084         * anonymous.cs: If the anon method is pulled into a helper class,
13085         it needs to be `internal' not `private'. Fixes runtime behavior on
13086         msft. bug #75704
13087
13088 2005-08-20  Martin Baulig  <martin@ximian.com>
13089
13090         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
13091         scope if we don't already have it.
13092
13093         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
13094         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
13095         fixes #75867.
13096
13097 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
13098
13099         Fix #75803
13100         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
13101         is a partial class.
13102
13103 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
13104
13105         The big constants rewrite
13106         Fix #75746, #75685 and more
13107         As a side effect saved 1MB for MWF ;-)
13108         
13109         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
13110         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
13111         enum based for corlib compilation.
13112         
13113         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
13114         subtractions.
13115         
13116         * class.cs (FixedField.Define): Use ResolveAsConstant.
13117         
13118         * const.cs (IConstant): Interface constants and enums.
13119         (Const.ResolveValue): New method for constant resolvning.
13120         (ExternalConstant): Constants from imported assemblies.
13121         
13122         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
13123         conversion; like enums.
13124         (Constant.ToType): Converts this constant to different type.
13125         (Constant.Increment): Adds 1.
13126         
13127         * convert.cs (ImplicitConversionRequired): Simplified.
13128         
13129         * cs-parser.jay: Create EnumMember directly.
13130         
13131         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
13132         
13133         * doc.cs (GenerateEnumDocComment): Removed.
13134         
13135         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
13136         (ConvertIntLiteral): Removed.
13137         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
13138         
13139         * enum.cs (EnumMember): Implement IConstant.
13140         (Enum.IsValidEnumConstant): Removed.
13141         (Enum.GetNextDefaultValue): Removed.
13142         (Enum.FindMembers): Updated.
13143         (Enum.GenerateDocComment): Iterate enum members.
13144         
13145         * expression.cs (Cast.TryReduce): Handle enums correctly.
13146         (New.Constantify): Made public.
13147         (MemberAccess.DoResolve): Removed contant specific if(s).
13148         
13149         * literal.cs (NullLiteral): Implement new abstract methods.
13150         
13151         * statement.cs (GotoCase.Resolve): Use new constant methods.
13152         (SwitchLabel.ResolveAndReduce): Use new constant methods.
13153         
13154         * typemanager.cs (LookupEnum): Removed.
13155         (IsEnumType): Fixed to work with corlib.
13156         (RegisterConstant): Removed.
13157         (LookupConstant): Removed.
13158         (GetConstant): Changed to work with IConstant.
13159
13160 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
13161
13162         * location.cs : Fixed overflown (>255) column number.
13163
13164 2005-08-03  Raja R Harinath  <rharinath@novell.com>
13165
13166         First cut of the qualified-alias-member feature.
13167         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
13168         token.
13169         * cs-parser.jay (DOUBLE_COLON): New token.
13170         (namespace_or_type_name): Add rule for recognizing
13171         qualified-alias-members.
13172         (primary_expression): Likewise.
13173         (element_access): Allow QualifiedAliasMember as a possible
13174         type-bearing expression.
13175         (local_variable_type, local_variable_pointer_type): Likewise.
13176         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
13177         aliases in the current and enclosing namespace declarations.
13178         (NamespaceEntry.UsingAlias): Add CS0440 warning.
13179         * decl.cs (MemberName.is_double_colon): New.
13180         (MemberName.MemberName): Add new constructor for alias-member.
13181         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
13182         * expression.cs (QualifiedAliasMember): New expression type.
13183
13184 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13185
13186         * location.cs : it borked when no argument was specified.
13187
13188 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13189
13190         * location.cs : tiny ToString() format fix.
13191
13192 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13193
13194         * statement.cs : oops, it was missing.
13195
13196 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13197
13198         A set of fixes for precise line/column location.
13199
13200         * location.cs :
13201           "token" field now holds a file/line "delta", a line number offset 
13202           from the segment, and a column number. See also:
13203           http://lists.ximian.com/pipermail/mono-devel-list/2004-
13204           December/009508.html
13205           Removed static IsNull. Use instance IsNull property instead.
13206         * cs-tokenizer.cs :
13207           For some tokens it stores Location. For Identifier it stores
13208           LocatedToken which is a pair of string name and location.
13209           Column numbers are adjusted only at getChar().
13210         * report.cs :
13211           Use Location.ToString() for reporting (it now contains column).
13212         * cs-parser.jay :
13213           Largely modified to use LocatedToken instead of
13214           string (IDENTIFIER), and to acquire Location from some tokens.
13215         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
13216           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
13217           codegen.cs :
13218           Now MemberName holds Location. DeclSpace.ctor() receives Location
13219           as a parameter. Removed extra parameters to all derived classes.
13220           Replaced Location.IsNull() with instance property.
13221         * assign.cs, expression.cs :
13222           Added .ctor() overload that omits Location.
13223         * attribute.cs :
13224           Added "nameEscaped" flag that indicates the identifier was escaped
13225           in the source file. This fixes bug #57047.
13226
13227 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
13228
13229         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
13230         New method, looking for lo-case imported cls type.
13231
13232         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
13233         here.
13234
13235         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
13236
13237         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
13238
13239         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
13240         all_imported_types.
13241         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
13242
13243         Optimized to save 3.5 MB for SWF compilation.
13244
13245 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13246
13247         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
13248         (PartialContainer.Create): Moved logic AddToContainer.
13249         (PartialContainer.MarkForDuplicationCheck): Shares name.
13250         
13251         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
13252         place.
13253         
13254         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
13255         initialization.
13256         (Namespace.GetSignatureForError): New method.
13257         
13258         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
13259         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
13260
13261 2005-08-01  Raja R Harinath  <rharinath@novell.com>
13262
13263         Fix #75669.
13264         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
13265         member lookup rather than qualifier_type, since qualifier_type can
13266         be null.
13267
13268 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13269
13270         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
13271         enum member.
13272
13273 2005-07-31  Miguel de Icaza  <miguel@novell.com>
13274
13275         * statement.cs: Copy the local exception into the exception
13276         captured local.  Fixes 75674
13277
13278 2005-07-31  Raja R Harinath  <harinath@gmail.com>
13279
13280         Fix #75658.
13281         * expression.cs (Invocation.OverloadResolve): Don't report error
13282         CS1501 if error CS1502 has been reported.
13283         (New.DoResolve): Delegate CS1501 reporting to
13284         Invocation.OverloadResolve.
13285
13286         Fix #75656.
13287         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
13288         invariant-meaning-in-block property in an enclosing block if
13289         necessary.
13290
13291 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
13292
13293         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
13294         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
13295         (Switch.CheckSwitch): Just save 50kb for SWF.
13296
13297 2005-07-27  Martin Baulig  <martin@ximian.com>
13298
13299         * anonymous.cs (CaptureContext.AddField): Added
13300         `AnonymousContainer am' argument; compute its toplevel scope if
13301         it's not already computed.  Fixes #75649.
13302
13303 2005-07-26  Raja R Harinath  <rharinath@novell.com>
13304
13305         Fix #75628.
13306         * class.cs (Constructor.Emit): Reset block to null if the block
13307         resolve fails.
13308
13309 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13310
13311         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
13312
13313 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13314
13315         * class.cs (MethodData.Define): Check whether accessor implementing
13316         interface is public.
13317
13318         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
13319
13320 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
13321
13322         Fix #57245
13323         * namespace.cs (LookupType): Moved same type check to...
13324         
13325         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
13326         with the same name.
13327
13328 2005-07-21  Raja R Harinath  <rharinath@novell.com>
13329
13330         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
13331         already found a typebuilder.
13332         * class.cs (MethodCore.IsDuplicateImplementation): Compare
13333         MemberNames, not strings.
13334
13335         * const.cs (Error_ExpressionMustBeConst): 
13336         Rename from Error_EpressionMustBeConst.
13337         * const.cs, class.cs, statement.cd: Update.
13338
13339 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
13340
13341         Fix #65573
13342
13343         * const.cs (Const.LookupConstantValue): Report missing contant expression
13344         everytime.
13345         (Error_EpressionMustBeConstant): Only one error method.
13346
13347         * class.cs, statement.c: Updated.
13348
13349 2005-07-20  Raja R Harinath  <rharinath@novell.com>
13350
13351         * statement.cs (Block.Flags): Add back HasVarargs.
13352         (Block.flags): Make protected.
13353         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
13354
13355         * typemanager.cs (types, typecontainers, user_types): Remove.
13356         (UserTypes, TypeContainers): Likewise.
13357         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
13358         (CleanUp, Reset): Update.
13359         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
13360         (GetNestedType): Use Type.GetNestedType.
13361         (CoreLookupType): Take two arguments, the namespace and the
13362         basename of the type.  Update to use the Namespace.Lookup
13363         mechanism.
13364         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
13365         (RealMemberLookup): Use IsNestedChildOf instead of playing with
13366         string concatenation and substring matches.
13367         * class.cs, enum.cs, delegate.cs: Update to changes.
13368
13369 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
13370
13371         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
13372         Expression and made virtual.
13373
13374         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
13375         (ImplicitStandardConversionExists): Fixed `byte' typo ?
13376
13377         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
13378
13379         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
13380         error message.
13381
13382         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
13383         change.
13384
13385 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
13386
13387         Fix #57707
13388         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
13389         AssemblyCultureAttribute is not used on executable.
13390
13391         * rootcontext.cs,
13392         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
13393
13394 2005-07-16  Raja R Harinath  <rharinath@novell.com>
13395
13396         Fix #60638.
13397         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
13398         New.  Reports CS0252/CS0253.
13399         Mostly taken from preliminary patch by Duncak Mak.
13400         (Binary.DoResolveOperator): Store results of operator lookup.
13401         Use them to detect if we need to warn about unintended reference
13402         comparisons.
13403
13404 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13405
13406         Fix #72969.
13407         * namespace.cs (Namespace.Lookup): Add back location parameter.
13408         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13409         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13410
13411         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13412         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13413         (Namespace.LookupType): ... this.
13414         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13415         of namespaces.
13416         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13417         purported to handle pointers.
13418         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13419         CoreLookupType.
13420
13421 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13422
13423         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13424         type as namespace.
13425
13426 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13427
13428         * namespace.cs (Namespace.Lookup): Drop location parameter.
13429         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13430         (NamespaceEntry.Lookup): ... this.
13431         (NamespaceEntry.Error_AmbiguousTypeReference):
13432         Move here from DeclSpace.
13433         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13434         names ...
13435         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13436         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13437         Move to NamespaceEntry.
13438         * delegate.cs, expression.cs: Update to changes.
13439
13440 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13441
13442         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13443         CheckAttributeType and refactored.
13444         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13445         ResolveAsTypeTerminal error handling.
13446         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13447         handling.
13448         (GetSignatureForError): Print errors in same way.
13449
13450         * class.cs,
13451         * codegen.cs: Reflect attribute GetSignatureForError change.
13452
13453         * ecore.cs,
13454         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13455
13456         * namespace.cs (UsingEntry): Refactored to make fields private.
13457
13458         * assign.cs,
13459         statement.cs: Error_UnexpectedKind has extra parameter.
13460
13461 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13462
13463         * ecore.cs (IAlias): Remove.
13464         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13465         that implement the interface.
13466         * namespace.cs (Namespace): Likewise.
13467         (Namespace.declspaces): Renamed from 'defined_names'.
13468         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13469         DeclSpace instead of an IAlias.
13470         * tree.cs (Tree.AddDecl): Update.
13471
13472 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13473
13474         * statement.cs (Block.Flags); Remove HasVarargs.
13475         (Block.HasVarargs): Move to ToplevelBlock.
13476         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13477         (Block.Variables): Make protected.  Initialize variable hashtable
13478         if necessary.
13479         (Block.AddVariable): Update.
13480         (Block.Resolve): Update to changes.
13481         (ToplevelBlock.HasVarargs): New boolean.
13482         (ToplevelBlock.ThisVariable): Move here from Block.
13483         (ToplevelBlock.AddThisVariable): Likewise.
13484         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13485         * expression.cs (This.ResolveBase): Update to changes.
13486         (ArglistAccess.DoResolve): Likewise.
13487
13488 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13489
13490         Fix #75321
13491         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13492
13493         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13494         not used and not used & assigned.
13495         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13496
13497 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13498
13499         Fix #75053
13500         * expression.cs (Is.DoResolve): null is never provided type.
13501
13502 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13503
13504         Fix #52496
13505         * cs-parser.jay: Less strict event error rule to catch more errors.
13506
13507 2005-07-08  Martin Baulig  <martin@ximian.com>
13508
13509         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13510         gettter (allowed) or setter (not allowed).
13511
13512         * class.cs (Accessor): Implement IIteratorContainer.
13513         (Accessor.Yields): New public field.
13514         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13515         per-accessor basis.
13516
13517         * cs-parser.jay
13518         (get_accessor_declaration, set_accessor_declaration): Set the
13519         `yields' flag on the accessor, not the property.
13520         (property_declaration): Do the iterators check on a per-accessor
13521         basis and not for the whole property.
13522
13523 2005-07-08  Martin Baulig  <martin@ximian.com>
13524
13525         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13526         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13527
13528 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13529
13530         Fix #74975
13531         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13532         (ExtractSecurityPermissionSet): Cope with self referencing security
13533         attributes properly.
13534
13535         * driver.cs (SetOutputFile): Made public property OutputFile.
13536
13537 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13538
13539         Fix #75486.
13540         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13541         has_nonstatic_fields.  Make into a FieldBase pointer.
13542         (TypeContainer.AddField): Add CS0282 check.
13543         (TypeContainer.EmitType): Update.
13544
13545 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13546
13547         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13548         compare if they start with __.
13549
13550 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13551
13552         * statement.cs (Switch.SwitchGoverningType): Only look at
13553         UserCasts that don't need implicit standard conversions to one of
13554         the allowed switch types (Fixes test-322.cs).
13555         (LocalInfo.Resolve): Re-enable sanity-test.
13556
13557 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13558
13559         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13560         
13561         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13562         
13563         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13564
13565 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13566
13567         Fix #75472.
13568         * ecore.cs (SimpleName.GetSignatureForError): Add.
13569         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13570         (MemberAccess.GetSignatureForError): Add.
13571
13572 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13573  
13574         The big error and warning messages review.
13575         
13576         * anonymous.cs,
13577         * assign.cs,
13578         * attribute.cs,
13579         * class.cs,
13580         * codegen.cs,
13581         * convert.cs,
13582         * cs-parser.jay,
13583         * cs-tokenizer.cs,
13584         * decl.cs,
13585         * delegate.cs,
13586         * doc.cs,
13587         * driver.cs,
13588         * ecore.cs,
13589         * enum.cs,
13590         * expression.cs,
13591         * flowanalysis.cs,
13592         * iterators.cs,
13593         * literal.cs,
13594         * location.cs,
13595         * modifiers.cs,
13596         * namespace.cs,
13597         * parameter.cs,
13598         * pending.cs,
13599         * report.cs,
13600         * rootcontext.cs,
13601         * statement.cs,
13602         * support.cs,
13603         * tree.cs,
13604         * typemanager.cs: Updated.
13605         
13606         * class.cs: (MethodCore.SetYields): Moved here to share.
13607         (PropertyMethod.Define): Moved iterator setup here.
13608         
13609         * iterators.cs: Add orig_method to have full access to parent
13610         container.
13611
13612 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13613
13614         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13615         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13616         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13617         variable of struct type.
13618         * expression.cs (Unary.ResolveOperator): Update to change.
13619         (Indirection.VerifyFixed): Likewise.
13620         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13621         (ParameterReference.VerifyFixed): Value parameters are fixed.
13622         (This.VerifyFixed): Treat 'this' as a value parameter.
13623         * statement.cs (LocalInfo.IsFixed): Remove.
13624
13625 2005-07-01  Martin Baulig  <martin@ximian.com>
13626
13627         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13628         `ec.EmitThis ()' to get the correct scope.
13629
13630 2005-07-01  Martin Baulig  <martin@ximian.com>
13631
13632         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13633         instance is a ParameterReference; fixes #75299.
13634
13635 2005-07-01  Martin Baulig  <martin@ximian.com>
13636
13637         Reverted Marek's latest patch (r46725):
13638         - it contains structural changes which are neither mentioned in
13639           the ChangeLog nor explained anywhere; for example the additional
13640           argument of EmitContext's and Iterator's .ctor's and the
13641           TypeContainer.DefineMembers() change.
13642         - structural changes like this should go in in seperate patches
13643           and not be hidden in a huge patch which just seems to affect
13644           warnings and errors.
13645           a big and hard to understand patch.
13646         - it breaks iterators and causes regressions, for instance in
13647           test-iter-03.cs.      
13648
13649 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13650
13651         Fix #75412.
13652         * expression.cs (Indexers.map): Remove.
13653         (Indexers.Append): Filter out inaccessible setters and getters.
13654         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13655
13656         Fix #75283.
13657         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13658         Refactored from ...
13659         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13660         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13661         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13662         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13663
13664 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13665
13666         Fix #75322
13667         * class.cs (FieldBase.GetInitializerExpression): One more field
13668         for backup.
13669
13670 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13671
13672         * pending.cs: Do not define a proxy if the base method is virtual,
13673         it will be picked up by the runtime (bug 75270).
13674
13675 2005-06-08  Martin Baulig  <martin@ximian.com>
13676
13677         The big Iterators rewrite :-)
13678
13679         * iterators.cs: Rewrite this to use the anonymous methods framework.
13680
13681         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13682         before the TypeContainers; see 2test-21.cs.
13683
13684         * class.cs
13685         (TypeContainer.DefineType): Don't create a new EmitContext if we
13686         already have one (this only happens if we're an Iterator).
13687         (TypeContainer.Define): Also call Define() on all our iterators.
13688         (Method.CreateEmitContext): Added support for iterators.
13689
13690         * anonymous.cs
13691         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13692         (AnonymousContainer.CreateMethodHost): Moved here from
13693         AnonymousMethod and made abstract.
13694         (AnonymousContainer.CreateScopeType): New abstract method.
13695         (AnonymousContainer.IsIterator): New public property.
13696         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13697         get the ScopeTypeBuilder rather than manually defining it here. 
13698         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13699         iterators here.
13700
13701         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13702         before RootContext.DefineTypes().
13703
13704         * codegen.cs (EmitContext.RemapToProxy): Removed.
13705         (EmitContext.CurrentAnonymousMethod): Changed type from
13706         AnonymousMethod -> AnonymousContainer.
13707         (EmitContext.ResolveTopBlock): Protect from being called twice.
13708         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13709         (EmitContext.EmitThis): Removed the iterators hacks; use the
13710         anonymous methods framework for that.
13711
13712         * statement.cs
13713         (ToplevelBlock.Container): Make this a property, not a field.
13714         (ToplevelBlock.ReParent): New public method; move the
13715         ToplevelBlock into a new container.
13716         (Foreach.TemporaryVariable): Simplify.
13717
13718 2005-06-05  Martin Baulig  <martin@ximian.com>
13719
13720         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13721         (Block.AddTemporaryVariable): New public method; creates a new
13722         `LocalInfo' for a temporary variable.
13723         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13724         variables here.
13725         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13726         non-iterator variables.
13727
13728 2005-06-05  Martin Baulig  <martin@ximian.com>
13729
13730         * statement.cs (Foreach.TemporaryVariable): Create the
13731         LocalBuilder in the Emit phase and not in Resolve since in some
13732         situations, we don't have an ILGenerator during Resolve; see
13733         2test-19.cs for an example.
13734
13735 2005-06-04  Martin Baulig  <martin@ximian.com>
13736
13737         **** Merged r45395 from GCS ****
13738
13739         The big Foreach rewrite - Part II.
13740
13741         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13742         with `PropertyInfo ienumerator_getcurrent'.
13743
13744         * codegen.cs (VariableStorage): Removed.
13745
13746         * statement.cs
13747         (Foreach): Derive from Statement, not ExceptionStatement.
13748         (Foreach.CollectionForeach): New nested class.  Moved all the code
13749         dealing with collection foreach here.
13750         (Foreach.ForeachHelperMethods): Removed.
13751         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13752
13753 2005-05-23  Martin Baulig  <martin@ximian.com>
13754
13755         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13756         don't need to.  Fix #75014.
13757
13758 2005-05-20  Martin Baulig  <martin@ximian.com>
13759
13760         Merged r44808 from GMCS.
13761
13762         * class.cs (TypeContainer.CircularDepException): Removed.
13763         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13764         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13765         (CS0146) and interface (CS0529) dependencies here.
13766
13767 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13768
13769         * expression.cs (Invocation.EmitCall): Fix initialization
13770         'this_call' to reflect current behaviour.  Fix indentation.
13771
13772         * convert.cs (FindMostEncompassedType): Add two trivial special
13773         cases (number_of_types == 0 || number_of_types == 1).
13774         (FindMostEncompasingType): Likewise.
13775
13776 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13777
13778         Some cleanups preparing for the fix of #75283.
13779         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13780         error testing.
13781         (EventExpr.InstanceResolve): Likewise.
13782         (EventExpr.DoResolve): Remove redundant checks.
13783
13784 2005-06-10  Duncan Mak  <duncan@novell.com>
13785
13786         * cs-tokenizer.cs (process_directives): New flag for controlling
13787         the processing of preprocessor directives.
13788         (x_token): After seeing a '#', return Token.NONE instead of going
13789         to handle_preprocessing_directive() when not processing
13790         directives. This avoids unnecessary processing during the token peek in
13791         is_punct().
13792
13793         This fixes #74939.
13794
13795         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13796         the existing error reporting methods instead of Report.Error.
13797
13798         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13799         after Raja's rewrite.
13800
13801 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13802
13803         * class.cs: Small fix.
13804
13805 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13806
13807         Fix #75160.
13808         * class.cs (GetPartialBases): Fix return value check of
13809         part.GetClassBases.
13810
13811 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13812
13813         Ensure that partial classes are registered in their enclosing
13814         namespace.  Initial part of fix of #75160.
13815         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13816         Register declspace with namespace here, not in
13817         DeclSpace.RecordDecl.
13818         * cs-parser.jay: Pass namespace to RecordDecl.
13819         * class.cs (PartialContainer.Create): Likewise.
13820         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13821         called.
13822         * decl.cs (Declspace.RecordDecl): Remove.
13823         * namespace.cs (NamespaceEntry.DefineName): Remove.
13824
13825 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13826
13827         * rootcontext.cs: Reset TargetExt as well.
13828
13829 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13830
13831         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13832         -langversion:ISO-1.
13833
13834 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13835
13836         Fix #75080, cs0119.cs.
13837         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13838         of ...
13839         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13840         allowing ExprClass.Type and ExprClass.Namespace for
13841         ResolveFlags.VariableOrValue.
13842         (Expression.Resolve) [1-argument variant]: Change default resolve
13843         flags based on language version.
13844         (Expression.Error_UnexpectedKind): Use a simple string array
13845         rather than an ArrayList.
13846         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13847         not ExprClass.Type.
13848         (TypeOfVoid.DoResolve): Likewise.
13849         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13850         flags argument -- it always has the same value.
13851
13852 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13853
13854         Fix #75081.
13855         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13856         Use it in the error message.
13857         * assign.cs, expression.cs, statement.cs: Update.
13858
13859 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13860
13861         Fix #75088.
13862         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13863         the "almostMatchedMember" case too.
13864         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13865         that failed the accessibility checks to 'almost_match'.
13866
13867 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13868
13869         * attribute.cs: Use internal MethodBuilder methods to set
13870         ExactSpelling and SetLastError on PInvoke methods, instead
13871         of passing them via charset.  Fixes #75060.
13872
13873 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13874
13875         * parameter.cs (Parameter): Remove TODO comment.
13876         (Parameter.DefineParameter): Remove Location parameter.
13877         (Parameters.LabelParameters): Likewise.
13878         * class.cs (Constructor.Emit): Update to change.
13879         (MethodData.Emit): Likewise.
13880         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13881         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13882
13883 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13884
13885         * parameter.cs,
13886           Removed Parameters.Location and added Parameter.Location instead.
13887           Removed Location parameter from Emit() and GetSignature().
13888         * anonymous.cs,
13889           class.cs,
13890           cs-parser.jay,
13891           delegate.cs,
13892           iterators.cs,
13893           statement.cs :
13894           Modified all related calls.
13895
13896 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13897
13898         Improve user-defined conversion handling.
13899         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13900         applicable operators.
13901         (AddConversionOperators): New.  Helper for GetConversionOperators.
13902         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13903         there is only one most encompassed/encompassing type.
13904         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13905         "applicable operator" handling.
13906         (UserConversion): Move cache here from GetConversionOperators.
13907         Directly cache the chosen operator, rather than the whole
13908         MethodGroup.
13909         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13910         case.  Allow conversion of decimal to sbyte and byte too.
13911         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13912         New static methods.  Used to avoid allocating EmptyExpressions in
13913         convert.cs.
13914
13915 2005-05-24  Duncan Mak  <duncan@novell.com>
13916
13917         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13918         another class, used in Convert.ExplicitNumericConversion.
13919         (CastToDecimal): New class, similar to above, but casts to
13920         System.Decimal, used in Convert.ImplicitNumericConversion and also
13921         in explicit convesion from double/float to decimal.
13922
13923         * convert.cs (ImplicitNumericConversion): Handle implicit
13924         conversions to System.Decimal.
13925         (ExplicitNumericConversion): handle explicit conversions to
13926         System.Decimal.
13927
13928         This fixes #68711.
13929         
13930 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13931
13932         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13933         know the type at this stage, just break through.   Fixes #75008 
13934
13935 2005-05-19  Martin Baulig  <martin@ximian.com>
13936
13937         * delegate.cs
13938         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13939         to disable error reporting.
13940
13941         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13942         here since we don't want to report an error; see the new test-336.cs.
13943
13944 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13945
13946         * statement.cs (ToplevelBlock.GetParameterReference)
13947         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13948         Move here from class Block.
13949         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13950         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13951
13952 2005-05-18  Martin Baulig  <martin@ximian.com>
13953
13954         Fix #74978.
13955
13956         * flowanalysis.cs
13957         (FlowBranching.Reachability): Add non-static public And() and Or()
13958         methods.
13959         (FlowBranchingSwitch): New class; do the `break_origins' thing
13960         like in FlowBranchingLoop.
13961         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13962         reachability, not just locals and parameters.
13963         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13964         switch; MergeBreakOrigins() now takes care of that.
13965
13966 2005-05-18  Martin Baulig  <martin@ximian.com>
13967
13968         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13969         a loop and may leave it, reset the barrier; fixes #74974.
13970
13971 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13972         
13973         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13974         is back.
13975         
13976         * cs-parser.jay: Catch more lexical errors.
13977         
13978         * report.cs: Add one more Error method.
13979         
13980         * rootcontext.cs,
13981         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13982
13983 2005-05-17  Martin Baulig  <martin@ximian.com>
13984
13985         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13986         #70970. 
13987
13988 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13989
13990         Fix test-382.cs.  Emit values of decimal constants.
13991         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13992         Carved out of ...
13993         (TypeContainer.AddField): ... this.
13994         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13995         with initializers to include 'Const's.
13996         (ClassPart.RegisterFieldForInitialization): Forward to
13997         PartialContainer.
13998         * const.cs (Const.Const): Pass initializer to base class.
13999         (Const.Define): In case of decimal constants, register them for
14000         initialization in a static constructor.
14001
14002 2005-05-14  Martin Baulig  <martin@ximian.com>
14003
14004         * statement.cs (Block.Resolve): Correctly handle unreachable code;
14005         do not call ResolveUnreachable() on unreachable statements in
14006         here, see the comment in the source code.
14007
14008 2005-05-13  Raja R Harinath  <rharinath@novell.com>
14009
14010         Fix #74934.
14011         * expression.cs (BinaryResolveOperator): If one of the operands of
14012         an equality comparison is 'null' and the other is a pointer type,
14013         convert the null to a NullPointer.
14014         * convert.cs (ImplicitReferenceConversion): If the expression is a
14015         NullLiteral and the target type is a pointer type, return a
14016         NullPointer instead.
14017         (ImplicitConversionStandard): Likewise.
14018
14019 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
14020         
14021         * cs-parser.jay: Set readonly context based on special constructs.
14022         
14023         * expression.cs (LocalVariableReference.DoResolveBase): Improved
14024         readonly variable error handling.
14025         
14026         * rootcontext.cs (EmitCode): Don't verify members when error
14027         occurred.
14028         
14029         * statement.cs (LocalInfo): Add reaodnly context information.
14030         (SetReadOnlyContext, GetReadOnlyContext): New methods.
14031
14032 2005-05-13  Raja R Harinath  <rharinath@novell.com>
14033
14034         * statement.cs (Block.Resolve): Revert change below.  Modify fix
14035         for #74041 to initialize 'resolved' to false only for explicit
14036         blocks.  Fixes #74873.
14037
14038 2005-05-12  Raja R Harinath  <harinath@gmail.com>
14039
14040         Fix #74920.
14041         * typemanager.cs (unmanaged_enclosing_types): New.
14042         (IsUnmanagedType): Avoid infloops by using
14043         'unmanaged_enclosing_types' to talk with recursive invocations.
14044
14045 2005-05-13  Martin Baulig  <martin@ximian.com>
14046
14047         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
14048         instance variable, not a local.  Fix #74873.
14049         (Block.ResolveUnreachable): Set it to true here.
14050
14051 2005-05-11  Duncan Mak  <duncan@novell.com>
14052
14053         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
14054         continuing to process for 'arg'.
14055         (handle_preprocessing_directive): Check the argument of the #endif
14056         directive and report error CS1025 if there are any trailing
14057         characters.
14058
14059         According to the C# spec, having even whitespace after the #endif
14060         directive is illegal; however, because we call arg.TrimEnd ()
14061         beforehand, we have the same behavior as csc, allowing whitespace
14062         after the directive.
14063
14064         Fixes #74892.
14065
14066 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
14067
14068         Fix #74863.
14069         
14070         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
14071         (Constructor.GetObsoleteAttribute): Implemented correctly.
14072
14073 2005-05-10  Martin Baulig  <martin@ximian.com>
14074
14075         * support.cs (ReflectionParameters.ParameterModifier): Use
14076         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
14077         and `ParameterAttributes.In'.  Fixes #74884.
14078
14079 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
14080
14081         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
14082         
14083         * expression.cs (Argument.GetParameterModifier): Turned to property.
14084         (Invocation.Error_InvalidArguments): Add more descriptive errors.
14085         
14086         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
14087         its C# equivalent.
14088         
14089 2005-05-09  Raja R Harinath  <rharinath@novell.com>
14090
14091         Fix #74852.
14092         * decl.cs (MemberCache.AddMethods): Register override methods,
14093         rather than non-override methods.
14094         * typemanager.cs (RegisterOverride): New.
14095         (IsOverride): Update.
14096
14097 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
14098
14099         Fix #73105.
14100         
14101         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
14102         recursive declaration.
14103         
14104         * statement.cs (Block.ResolveMeta): Report any error in resolving.
14105         
14106 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
14107
14108         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
14109         
14110         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
14111
14112 2005-05-05  Raja R Harinath  <rharinath@novell.com>
14113
14114         Fix #74797.
14115         * decl.cs (DeclSpace.FamilyAccessible): 
14116         Use TypeManager.IsNestedFamilyAccessible.
14117
14118         Fix reopened #64812.
14119         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
14120         internal'.
14121
14122 2005-05-04  Raja R Harinath  <rharinath@novell.com>
14123             Abin Thomas  <projectmonokochi@rediffmail.com>
14124             Anoob V E  <projectmonokochi@rediffmail.com>
14125             Harilal P R  <projectmonokochi@rediffmail.com>
14126
14127         Fix #64812.
14128         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
14129         allow access to all static members.
14130
14131 2005-05-04  Martin Baulig  <martin@ximian.com>
14132
14133         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
14134
14135 2005-05-04  Martin Baulig  <martin@ximian.com>
14136
14137         Fix #74655.
14138
14139         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
14140         section at the end; make things work if `default' is not the last
14141         section.        
14142
14143 2005-05-04  Martin Baulig  <martin@ximian.com>
14144
14145         Fix #70400.
14146
14147         * statement.cs (Switch): Replaced the `got_default' field with a
14148         `default_section' one.
14149         (Switch.CheckSwitch): Set `default_section' here.
14150         (Switch.Resolve): If we're a constant switch and the constant is
14151         not found, use the default section.
14152
14153 2005-05-03  Martin Baulig  <martin@ximian.com>
14154
14155         * expression.cs (ArrayAccess.EmitGetLength): New public method.
14156
14157         * statement.cs (Foreach.ArrayForeach): New nested class.
14158         (Foreach.TemporaryVariable): New nested class.
14159         (Foreach.EmitArrayForeach): Removed; this is now in the new
14160         ArrayForeach class.
14161
14162 2005-05-03  Raja R Harinath  <rharinath@novell.com>
14163
14164         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
14165         more conservative.
14166         (VerifyPendingMethods): Revert change below.
14167
14168         * typemanager.cs (IsOverride, RegisterNonOverride): New.
14169         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
14170         that used to trigger warning -28.  Remove warning -28.
14171         * expression.cs (Invocation.OverloadResolve): Use
14172         TypeManager.IsOverride to distinguish override methods.
14173
14174         Fix #74773.
14175         * pending.cs (VerifyPendingMethods): If a base type implements the
14176         requested interface, don't bother checking individual methods of
14177         the base type.  As a side-effect, this prevents the creation of
14178         unnecessary proxies.
14179
14180 2005-05-02  Martin Baulig  <martin@ximian.com>
14181
14182         Fix #70182.
14183
14184         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
14185         Also `And' the locals if the old vector is null.
14186         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
14187         null; in this case we basically reset all the variables.        
14188
14189 2005-05-02  Martin Baulig  <martin@ximian.com>
14190
14191         Fix #74529.
14192
14193         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
14194         Added `FlowBranching branching' argument; always `and' the
14195         variables instead of `or'ing them unless we're an infinite loop.
14196
14197         * statement.cs (While.Resolve): Create a new sibling unless we're
14198         infinite.       
14199
14200 2005-05-02  Martin Baulig  <martin@ximian.com>
14201
14202         Fix #70140.
14203
14204         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
14205         arguments; use it instead of creating a new TopLevelBlock.
14206         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
14207         our ConstructorInitializer.
14208
14209         * statement.cs
14210         (TopLevelBlock.TopLevelBranching): New public property.
14211         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
14212         and create our `TopLevelBranching'.
14213
14214         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
14215         anonymous method host, use `block.TopLevelBranching' rather than
14216         creating a new branching.
14217
14218 2005-04-20  Miguel de Icaza  <miguel@novell.com>
14219
14220         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
14221         a ScopeInfo, if any of the current children is a child of the new
14222         entry, move those children there.
14223
14224 2005-04-30  Martin Baulig  <martin@ximian.com>
14225
14226         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
14227         at the beginning of a SwitchSection.  Fix #73335.
14228
14229 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
14230
14231         Fix #74378
14232         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
14233         
14234         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
14235         (FieldExpr.DoResolve): Obsolete members are ignored for field
14236         initializers.
14237         
14238 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
14239
14240         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
14241         of arrays detection.
14242
14243         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
14244         verification.
14245         (Field.VerifyClsCompliance): Volatile fields are not compliant.
14246
14247         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
14248         arrays report.
14249
14250 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
14251
14252         * cs-parser.jay: Use the prefered version of -unsafe in error
14253         message.
14254
14255 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
14256
14257         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
14258         circumstances.
14259
14260 2005-04-20  John Luke  <john.luke@gmail.com>
14261
14262         * driver.cs: fix typo in error message, --outout to --output
14263
14264 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
14265
14266         * codegen.cs (InRefOutArgumentResolving): New field.
14267         
14268         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
14269         fields outside contructor.
14270         
14271         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
14272         
14273 2005-04-19  Miguel de Icaza  <miguel@novell.com>
14274
14275         * anonymous.cs (CaptureContext.EmitParameterInstance): The
14276         parameter code was not completed ever, so it was not as up-to-date
14277         as local variables.  Must finish it.
14278
14279         The bug fix was to compare the Toplevel of the block, not the
14280         current block.  Thanks for Ben for pointing this out. 
14281
14282 2005-04-19  Raja R Harinath  <rharinath@novell.com>
14283
14284         * decl.cs (AddMethods): Use the declaring type of the problem
14285         method to determine if we want to squash a warning.
14286
14287 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
14288
14289         * attribute.cs: Removed debug output.
14290
14291         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
14292         
14293         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
14294         Report.Stderr.
14295         
14296 2005-04-18  Raja R Harinath  <rharinath@novell.com>
14297
14298         Fix #74481.
14299         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
14300         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
14301         all null comparisons against reference types.
14302
14303 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
14304
14305         Fix# 74565
14306         * class.cs (TypeContainer.CircularDepException) New nested
14307         exception class.
14308         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
14309         (TypeContainer.DefineType): Removed error, reset InTransit before
14310         exit.
14311         (Class.DefineType): Throw exception when is in Transit.
14312         Catch exception and report error.
14313         (Struct.DefineType): Throw exception when is in Transit.
14314         Catch exception and report error.
14315         (Interface.DefineType): Throw exception when is in Transit.
14316         Catch exception and report error.
14317
14318         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
14319         handle nested exception handlers.
14320
14321         * flowanalysis.cs (InTryWithCatch): New method, search for try with
14322         a catch.
14323
14324         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
14325         InFinally and InCatch storage.
14326
14327         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
14328         (Catch.Resolve): Set and Restore ec.InCatch.
14329         (Try.Resolve): Set and Restore ec.InFinally.
14330         (Try.HasCatch): True when try has catch.
14331
14332 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
14333
14334         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
14335           for the same event member, so exclude such cases from warning 419.
14336           Fixed bug #74633.
14337
14338 2005-04-16  Miguel de Icaza  <miguel@novell.com>
14339
14340         * expression.cs (Binary.ResolveOperator): Apply patch from John
14341         Luke to fix bug 59864: operators &, | and ^ on enumerations
14342         require that the same enum type on both sides.
14343
14344         * driver.cs: Add warnings to old flag usage, this is to assist
14345         people who produce Makefiles and hope that the Makefiles will be
14346         used on Windows.
14347
14348         * class.cs (TypeContainer.EmitType): Moved the definition of the
14349         special $PRIVATE$ field from the resolve phase to the Emit phase.
14350         During resolve we do not know if we are a struct with
14351         HasExplicitLayout, we know this only after the attributes for the
14352         type are emitted.
14353
14354         Set the FieldOffset to zero on the dummy field that we create for
14355         the class.   Fixes 74590.
14356
14357 2005-04-16  Raja R Harinath  <rharinath@novell.com>
14358
14359         Fix #73834.
14360         * ecore.cs (PropertyExpr.resolved): New.
14361         (DoResolve): Use it to handle a case of double resolution here.
14362         Handle a case of identical-name-and-type-name.
14363         * expression.cs (ArrayCreation.CheckIndices): Avoid double
14364         resolution by storing the results of expression resolution back
14365         into the "probes" array.
14366
14367 2005-04-15  Raja R Harinath  <rharinath@novell.com>
14368
14369         Fix cs0208-7.cs and cs0208-8.cs.
14370         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
14371         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
14372         error reporting to point out the reason a struct is not unmanaged.
14373
14374 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14375
14376         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
14377           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
14378
14379 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14380
14381         Fix #74528.
14382         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
14383         IdenticalNameAndTypeName here.
14384         (EventExpr.InstanceResolve): Likewise.
14385
14386 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
14387
14388         C# 2.0 DefaultCharSetAttribute implementation
14389         
14390         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
14391         which allows us to set GlobalNamespace for every resolve.
14392         (Attribute.ResolveArguments): Cut from Resolve.
14393         (Attribute.GetCharSetValue): Returns CharSet named argument.
14394         (Attribute.DefinePInvokeMethod): Gets default charset from
14395         module settings.
14396         (GlobalAttribute.ResolveAsTypeStep): Override.
14397         (GlobalAttribute.ResolveArguments): Override.
14398         
14399         * class.cs (TypeAttr): Is protected.
14400         
14401         * codegen.cs (ModuleClass.DefaultCharSet): New member.
14402         (ModuleClass.DefaultCharSetType): New memeber.
14403         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
14404         
14405         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
14406         charset from module.
14407         
14408         * delegate.cs (TypeAttr): Override.
14409         (Delegate.DefineType): Use this TypeAttr.
14410         
14411         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14412         at very early stage (before types are defined) to resolve model
14413         module attributes. It will probably not work with corlib but it
14414         should be ok.
14415         
14416         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14417         charset from module.
14418         
14419         * typemanager.cs (default_charset_type): New type.
14420
14421 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14422
14423         * decl.cs (MemberCache.AddMethods): Don't warn if
14424         System.Object.Finalize has buggy MethodAttributes.
14425
14426         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14427         removed below.
14428
14429 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14430
14431         * doc.cs : detect ambiguous reference to overloaded members.
14432           Fixed bug #71603. MS 1.1 csc does not detect it.
14433
14434 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14435
14436         * doc.cs : delegates must not be referenced with parameters.
14437           Fixed bug #71605.
14438
14439 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14440
14441         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14442
14443 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14444
14445         * driver.cs (MainDriver): Stop processing if the CLS stage found
14446         errors. 
14447
14448         (CompilerCallableEntryPoint.InvokeCompiler): Always
14449         reset after execution;   Take a TextWriter argument for the
14450         output.
14451
14452         * report.cs: Use the error stream instead of hardcoding stderr. 
14453
14454 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14455
14456         * class.cs: Reduce code paths to test, too small of an
14457         optimization to make it worth the extra testing.  Always perform
14458         it. 
14459
14460 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14461
14462         Fix #74510.
14463         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14464         operators that had errors reported on them.
14465
14466 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14467
14468         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14469         argument types.
14470         (Attribute.Resolve): Add named argument type checking.
14471         
14472         * class.cs (FixedField.Define): Use IsPrimitiveType
14473         
14474         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14475         
14476         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14477         unsafe parameter types.
14478         
14479         * statement.cs (Using.ResolveExpression): Add better error description.
14480         
14481         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14482         
14483 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14484
14485         Fix #74484.
14486         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14487         AttributeUsageAttribute in the emitcontext of the attribute class,
14488         not in the emitcontext of the attributable entity it was attached to.
14489         * cs-parser.jay: Use 'current_class', not 'current_container',
14490         when creating a GlobalAttribute.
14491
14492 2005-04-08  Alp Toker  <alp@atoker.com>
14493
14494         * pending.cs: The fix to #58413 failed to compile methods implementing
14495         interfaces with/without params modifiers and vice versa, even though
14496         params modifiers aren't part of the signature. Make the modifier check
14497         less strict as in csc.
14498
14499 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14500             Anoob V E  <projectmonokochi@rediffmail.com>
14501             Harilal P R  <projectmonokochi@rediffmail.com>
14502
14503         Fix #58413.
14504         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14505         modifiers of pending methods.
14506         (PendingImplementation.PendingImplementation): Initialize it.
14507         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14508         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14509         with ParameterData.  Add check for modifiers.
14510         * class.cs (MethodData.Define): Update to changes.
14511
14512 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14513
14514         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14515
14516 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14517
14518         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14519         property.
14520         
14521         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14522         
14523         * rootcontext.cs,
14524         * typemanager.cs: Registered RequiredAttributeAttribute.
14525         
14526 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14527
14528         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14529         Warning CS0169 is back at level 3.
14530         (IMethodData.SetMemberIsUsed): New method.
14531         
14532         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14533         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14534         
14535         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14536
14537         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14538         contants.
14539         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14540         is used.
14541         
14542         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14543         is used.
14544         
14545         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14546         to avoid the problems with nested types.
14547
14548 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14549             Anoob V.E  <projectmonokochi@rediffmail.com>
14550             Harilal P.R  <projectmonokochi@rediffmail.com>
14551             Raja R Harinath  <rharinath@novell.com>
14552
14553         Fix #73820.
14554         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14555         attribute.
14556         * typemanager (GetConstructor): Make public.
14557
14558 2005-04-05  John Luke  <john.luke@gmail.com>
14559             Raja R Harinath  <rharinath@novell.com>
14560
14561         Fix #62232.
14562         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14563         struct too.  Return false quicker in a few cases.
14564         (VerifyUnManaged): Use it.
14565
14566 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14567
14568         Fix #74041.
14569         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14570         not 'unreachable_seen'.
14571
14572 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14573
14574         * attribute.cs (Attribute.GetValue): Removed unused.
14575         
14576         * codegen.cs (CodeGen.TrimExt): Removed unused.
14577         
14578         * cs-parser.jay (output): Removed unused.
14579         
14580         * cs-tokenizer.cs (hex_digits): Removed unused.
14581         
14582         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14583         
14584         * expression.cs (Indirection.LoadExprValue): Removed unused.
14585         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14586         
14587         * iterators.cs (Iterator.param_types): Removed unused.
14588         
14589         * statement.cs (Goto.block): Removed unused.
14590         (ToplevelBlock.did): Removed unused.
14591         (Switch.ResolveConstantSwitch): Removed unused.
14592
14593 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14594
14595         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14596         resetting thingy.
14597
14598 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14599
14600         Fix #74232 and cs0208-3.cs.
14601         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14602         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14603         unmanaged type.  Don't use FieldBuilders when 't' is a
14604         TypeBuilder.  Use ModFlags and MemberType fields.
14605         * class.cs (MemberBase.member_type): Rename from MemberType.
14606         (MemberBase.MemberType): New property.  Determines member_type on
14607         demand.
14608         (MemberBase.DoDefine): Don't initialize MemberType here.
14609         (FieldMember.Define): Likewise.
14610
14611 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14612
14613         Fix #74241
14614         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14615         Attributes are emitted there.
14616         
14617 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14618
14619         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14620         keyword in 'partial enum' too.
14621         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14622         is not allowed).
14623         Report from Kamil Skalski <nazgul@omega.pl>.
14624
14625         Fix #74309.
14626         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14627         have partial containers too.
14628
14629         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14630         in block' checks to Block.CheckInvariantMeaningInBlock.
14631         * statement.cs (Block.GetKnownVariableInfo): Make private.
14632         (Block.IsVariableUsedInChildBlock): Remove.
14633         (Block.IsVariableUsedInBlock): Likewise.
14634         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14635         conflicting declaration.
14636         (Block.AddVariable): Make error messages less long-winded and more
14637         specific.  Show location of conflicting declaration.
14638         * parameter.cs (Parameters.Location): New readonly property.
14639
14640 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14641
14642         Clean up semantics of invoking ResolveMemberAccess.
14643         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14644         can have an instance, ensure that we pass in a non-TypeExpression
14645         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14646         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14647         argument.  Update to changes and simplify.
14648         (FieldExpr.Emitinstance): Remove CS0120 check.
14649         (PropertyExpr.EmitInstance): Likewise.
14650         * expression.cs (Argument.Resolve): Likewise.
14651         (Invocation.DoResolve): Update to changes in semantics of
14652         InstanceExpression.
14653
14654 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14655
14656         Fix #74241
14657         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14658         customization.
14659         
14660         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14661
14662 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14663
14664         Fix difference in behaviour with commandline invocation.
14665         * driver.cs (Driver.Reset): New.
14666         (CompilerCallableEntryPoint): Call it.
14667
14668         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14669         variable" warnings if the boolean expression failed to resolve.
14670
14671 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14672
14673         * attribute.cs: Fix the union of several permissions when some of them
14674         are unrestricted (so the result isn't an unrestricted permission set).
14675         Fix #74036.
14676
14677 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14678
14679         * ecore.cs (MemberExpr): New class.  Convert from interface
14680         IMemberExpr.
14681         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14682         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14683         error checks.
14684         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14685         (MethodGroupExpr.IsExplicitImpl): Remove.
14686         (Expression.GetFieldFromEvent): Remove.
14687         (SimpleName.MemberStaticCheck): Remove.
14688         (SimpleName.DoSimpleNameResolve): Update to changes.
14689         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14690         (MemberAccess.IdenticalNameAndTypeName): Remove.
14691         (MemberAccess.error176): Move to MemberExpr.
14692         (MemberAccess.DoResolve): Update to changes.
14693         (BaseAccess.DoResolve): Likewise.
14694
14695 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14696
14697         C# 2.0 Conditional attribute class implementation
14698         
14699         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14700         Analyzes class whether it has attribute which has ConditionalAttribute
14701         and its condition is not defined.
14702         
14703         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14704         (Class.IsExcluded): New method. Search for at least one defined
14705         condition in ConditionalAttribute of attribute class.
14706
14707 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14708
14709         * ecore.cs (PropertyExpr): Derive from Expression, not
14710         ExpressionStatement.
14711         (PropertyExpr.EmitStatement): Remove.
14712
14713 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14714
14715         Fix #74060.
14716         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14717         internal field "value__" of an enum be private.  The examples for
14718         "value__" that I found on MSDN all used FieldAttributes.Private.
14719
14720         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14721         Don't mention IL method attribute names.
14722
14723         Fix #47991.  Remove a TODO.
14724         * statement.cs (Block.Toplevel): Make into a field.
14725         (Block.Parameters): Move into ToplevelBlock.
14726         (Block.known_variables): Rename from child_variable_names.
14727         (Block.Block): Remove variants that take Parameters.  Initialize
14728         'Toplevel' with the immediately surrounding toplevel block.
14729         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14730         LocalInfo parameter.
14731         (Block.GetKnownVariableInfo): New.
14732         (Block.IsVariableNameUsedInChildBlock): Update.
14733         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14734         the block, even though it may not be in scope.
14735         (Block.AddVariable): Remove Parameters parameter.  Use
14736         Toplevel.Parameters instead.
14737         (Block.AddConstant): Remove Parameters parameter.
14738         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14739         (Block.IsParamaterReference): Likewise.
14740         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14741         (ToplevelBlock.Parameters): New.  Moved from Block.
14742         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14743         initialize Parameters to a non-null value.
14744         * cs-parser.jay: Update to changes.
14745         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14746         simple names that mean different things in the same block.  Use
14747         Block.IsVariableNameUsedInBlock.
14748
14749 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14750
14751         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14752         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14753         GetTypeHandle.  It is possible for a reflected type to derive from
14754         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14755         System.Array during mscorlib compilation).
14756         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14757         contain a method_hash, don't create one either.  Don't create a
14758         deep copy of the base cache's method_hash.
14759         (MemberCache.SetupCache): Rename back from DeepCopy.
14760         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14761         already initialized.  If we see an override function, add its
14762         underlying base virtual function to the member_hash too.
14763
14764         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14765
14766 2005-03-26  Raja R Harinath  <harinath@acm.org>
14767
14768         Fix #73038.
14769         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14770         fails to resolve, ensure that the LHS is still resolved as an
14771         lvalue.
14772
14773 2005-03-25  Raja R Harinath  <harinath@acm.org>
14774
14775         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14776         ec.ContainerType.
14777         (Enum.current_ec): Remove.
14778         (Enum.LookupEnumValue): Remove EmitContext argument.
14779         Just uses the one created during DefineType.
14780         (Enum.FindMembers): Update.
14781         * expression.cs (MemberAccess.DoResolve): Update.
14782
14783 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14784
14785         * assign.cs (Assign.DoResolve): Check for CS1717 when
14786         source and target are same (uses Equals).
14787
14788         * expression.cs (LocalVariableReference, ParameterReference,
14789         This): Implemented Equals, GetHashCode.
14790
14791         * statement.cs (Block.GetParameterReference): Removed useless
14792         local variable.
14793
14794 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14795
14796         Fix cs0128.cs
14797         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14798         blocks before deciding whether the error is cs0136 or cs0128.
14799
14800         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14801         (using_alias_directive, using_namespace_directive): Pass
14802         MemberName, not an expression to Namespace.UsingAlias and
14803         Namespace.Using.
14804         (MakeName): Use the MemberName of the namespace.
14805         * namespace.cs (Namespace.MemberName): New.
14806         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14807         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14808         Likewise.
14809         * decl.cs (MemberName.Name): Make readonly.
14810         (MemberName.FromDotted): New "constructor".
14811         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14812         (MemberCore.Name): Compute from MemberName on demand.
14813         (MemberCore.SetMemberName): Provide a way to change the
14814         MemberName.
14815         (MemberCore.AddToContainer): Don't take a fullname parameter.
14816         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14817         fully qualified name of the container to the member name.
14818         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14819         only if the type is a member of the root container.
14820         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14821         MemberName.Left rather than searching for an embedded ".".
14822         (PartialContainer.CreatePart): Update to changes in RootContext.
14823         (MemberBase.ShortName): Turn into a property.  Use
14824         MemberCore.SetMemberName.
14825         (MemberBase.ExplicitInterfaceName): Remove.
14826         (MemberBase.UpdateMemberName): Remove.
14827         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14828         (PropertyBase.SetMemberName): New override.
14829         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14830         (Tree.GetDecl): New.
14831         (Tree.AllDecls): Rename from Decls.
14832         * attribute.cs, enum.cs, report.cs: Update to changes.
14833         * driver.cs (MainDriver): Use MemberName.FromDotted on
14834         RootContext.MainClass.
14835
14836 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14837
14838         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14839         checks.
14840
14841         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14842
14843 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14844
14845         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14846         property accessor modifiers.
14847
14848         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14849         fixed buffer attribute (CS1716).
14850         (PropertyMethod.HasCustomAccessModifier): When property accessor
14851         has custom modifier.
14852
14853         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14854         modifiers.
14855         (PropertyExpr.DoResolveLValue): Add CS0272.
14856
14857 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14858
14859         * convert.cs: When converting to a pointer, use the proper Conv.U
14860         or Conv.I depending on the source data type.
14861
14862         * cs-tokenizer.cs: Make the size for large decimal constants,
14863         fixes #72957.
14864
14865 2005-03-17  Martin Baulig  <martin@ximian.com>
14866
14867         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14868         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14869
14870 2005-03-17  Martin Baulig  <martin@ximian.com>
14871
14872         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14873         to bool so we can return an error condition.
14874         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14875         returned an error.
14876
14877 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14878
14879         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14880         attributes.
14881
14882 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14883
14884         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14885         Refactor to avoid traversing the list of assemblies, and to avoid
14886         string concatenation.
14887         * typemanager.cs (guid_attr_type): Remove.
14888         (negative_hits, pointers, references): Remove hashes.
14889         (type_hash): New.
14890         (GetConstructedType): New.  Uses type_hash to handle constructed
14891         types (arrays, references, pointers).
14892         (GetReferenceType, GetPointerType): Use it.
14893         (GetNestedType): New.  Uses type_hash to handle nested types of
14894         reflected types.
14895         (LookupType, LookupTypeDirect): Remove.
14896         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14897         'types' hash and LookupTypeReflection directly.
14898         (params_string, params_object): Use GetConstructedType.
14899         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14900         top-level types.
14901         (Namespace.Lookup): Use cached_types.
14902         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14903         provided by old TypeManager.LookupType.
14904         * rootcontext.cs (MakeFQN): Remove.
14905         * decl.cs (DeclSpace.MakeFQN): Likewise.
14906         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14907         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14908         TypeManager.GetConstructedType.
14909         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14910
14911 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14912
14913         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14914         indexers.
14915
14916         * cs-parser.jay: Reports CS1527 for any namespace element.
14917
14918         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14919         Added CS0407.
14920
14921         * expression.cs (ParameterReference.IsAssigned): Changed error to
14922         CS0269.
14923         (Error_WrongNumArguments): Moved CS0245 detection here.
14924
14925         * statement.cs (Return.Resolve): Add CS1622 report.
14926
14927 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14928
14929         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14930
14931 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14932
14933         * attribute.cs expression.cs: Get rid of some allocations.
14934
14935 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14936
14937         * doc.cs : just eliminate the latest change.
14938
14939 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14940
14941         * doc.cs : commented out the latest change. It breaks xml-030.cs
14942
14943 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14944
14945         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14946           fail. So invoke CreateType() in FindDocumentedType().
14947
14948 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14949
14950         * cs-tokenizer.cs : added IsKeyword().
14951         * doc.cs : Detect keyword incorrectly used as identifier.
14952           Allow identifiers prefixed by @.
14953
14954 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14955
14956         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14957         It caused exception in namespace resolving (again!).
14958         
14959         * class.cs (Class.ctor): Removed exit.
14960         (PropertyMethod.ctor): ditto.
14961         
14962         * codegen.cs (Codegen.Reset): Reset static data.
14963         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14964         
14965         * cs-tokenizer.cs (Cleanup): Removed.
14966         
14967         * driver.cs (GetSystemDir): Rewrote to one line command.
14968         It caused problem with unloaded dynamic modules.
14969         (UnixParseOption): Removed Exit.
14970         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14971         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14972         Now can be mcs used as library.
14973         
14974         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14975         empty location.
14976         
14977         * location.cs (Reset): Reset static data.
14978         
14979         * namespace.cs (Reset): Reset static data.
14980         
14981         * report.cs (Report.Reset): Reset static data.
14982         
14983         * rootcontext.cs (RootContext.Reset): Reset static data.
14984         
14985         * tree.cs (RootTypes.ctor): Use Location.Null
14986         
14987         * typemanager.cs (TypeManager.Reset): Reset static data.
14988         (CoreLookupType): Removed Exit.
14989         (TypeHandle.Reset): Reset static data.
14990         
14991 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14992
14993         Fix #73516.
14994         * typemanager.cs (ComputeNamespaces): Import namespaces from
14995         referenced modules too.
14996
14997 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14998
14999         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
15000         than '.'.
15001
15002 2005-03-09  Raja R Harinath  <rharinath@novell.com>
15003
15004         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
15005         enclosing DeclSpace.  This ensures that a name-lookup populates
15006         more caches and there are fewer 'TypeExpression's.  Carve out
15007         nested type lookup into ...
15008         (LookupNestedTypeInHierarchy): ... this.
15009
15010 2005-03-09  Raja R Harinath  <rharinath@novell.com>
15011
15012         Clean up a few partial-class semantics.  
15013         Fixes test-357.cs and cs1618-2.cs.
15014         * cs-parser.jay (struct_declaration): Use 'current_class' as
15015         parent of newly-created struct.  Remove call to Register ().
15016         Use 'pop_current_class' to complete handing the current struct.
15017         (interface_declaration): Likewise.
15018         (class_declaration): Likewise.
15019         (enum_declaration): Use 'current_class' as parent of newly created
15020         enum.
15021         (delegate_declaration): Likewise.
15022         (pop_current_class): New function.  This is used to handle closing
15023         up the 'current_class' and 'current_container', and pointing them
15024         to the enclosing class/container.
15025         (CSharpParser): Initialize 'current_class' too.
15026         * decl.cs (MemberCore): Add check for invariant: a partial
15027         container is not a parsed entity, and thus does not enclose any
15028         parsed members.
15029         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
15030         (DeclSpace.BaseTypeExpr): Use it.
15031         (DeclSpace.LookupType): Add check for invariant.
15032         * class.cs (TypeContainer): Add check for invariant: a nested
15033         class should have the same NamespaceEntry as its enclosing class.
15034         (TypeContainer.EmitFieldInitializers): Make virtual.
15035         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
15036         MemberCore.
15037         (TypeContainer.Register): Remove.
15038         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
15039         null.  Use TypeResolveEmitContext for resolving base types and
15040         interfaces.  Move initialization of Parts.TypeBuilder here from
15041         ...
15042         (TypeContainer.DefineNestedTypes): ... here.
15043         (PartialContainer): Take a Namespace not a NamespaceEntry.
15044         (PartialContainer.Create): Don't use Register.  Call the
15045         appropriate Add... function directly.
15046         (ClassPart): Take both the PartialContainer and the enclosing
15047         class as constructor arguments.
15048         (ClassPart.EmitFieldInitializers): Override.
15049         (ClassPart.PartFindNestedTypes): Remove.
15050         (FieldBase.GetInitializerExpression): Resolve the initializer
15051         expression in the emit context of the enclosing class.
15052         * tree.cs (RootTypes): Remove Register ().
15053         
15054 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
15055
15056         * cs-parser.jay: Removed CS0134.
15057         
15058         * driver.cs: Removed CS1901.
15059         
15060         * expression.cs (SizeOf.DoResolve): Don't report CS0233
15061         for predefined types.
15062
15063 2005-03-07  Duncan Mak  <duncan@novell.com>
15064
15065         * codegen.cs (Save):  Catch UnauthorizedAccessException as
15066         well. Fixes bug #73454.
15067
15068 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
15069
15070         * cs-tokenizer.cs (xtoken): Add CS1035.
15071         
15072         * class.cs (MethodData.Define): Add CS0683.
15073         (FieldMember.ctor): Add CS0681.
15074
15075 2005-03-07  Raja R Harinath  <rharinath@novell.com>
15076
15077         * ecore.cs (SimpleName.DoResolve): Rename from
15078         SimpleName.DoResolveAllowStatic.
15079         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
15080         Pass 'intermediate' flag to MemberStaticCheck.
15081         (SimpleName.MemberStaticCheck): Skip "static check" only in case
15082         of "intermediate" lookups via MemberAccess.
15083         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
15084         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
15085
15086 2005-03-07  Raja R Harinath  <rharinath@novell.com>
15087
15088         Fix #73394.
15089         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
15090         slipped in because of variable names that are identical to a
15091         builtin type's BCL equivalent ('string String;', 'int Int32;').
15092         (PropertyExpr.EmitInstance): Likewise.
15093
15094 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
15095
15096         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
15097         
15098         * report.cs (warning_ignore_table): Made public.
15099
15100 2005-03-04  Raja R Harinath  <rharinath@novell.com>
15101
15102         Fix #73282.
15103         * class.cs (MethodData.Emit): Pass 'container' to
15104         container.GetObsoleteAttribute instead of 'container.Parent'.
15105
15106 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
15107
15108         * cs-parser.jay: Add 1534 error test.
15109
15110         * iterators.cs (Yield.CheckContext): Add error 1629.
15111         (Iterator.ctor): Save unsafe modifier.
15112         (MoveNextMethod.DoEmit): Restore unsafe context.
15113
15114         * namespace.cs (UsingAlias): Better error message.
15115
15116 2005-03-03  Dan Winship  <danw@novell.com>
15117
15118         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
15119         the warning message [#73219]
15120
15121 2005-03-03  Raja R Harinath  <rharinath@novell.com>
15122
15123         Fix compile with MCS 1.0.0.0.
15124         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
15125         w_restore to not depend on string constant folding.
15126
15127 2005-03-03  Raja R Harinath  <rharinath@novell.com>
15128
15129         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
15130         CS0246 check to users who passed 'silent = false'.
15131         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
15132         check.
15133         (SimpleName.SimpleNameResolve): Update.
15134         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
15135         (MemberAccess.IdenticalNameAndTypeName): Update.
15136         * doc.cs (FindDocumentedTypeNonArray): Update.
15137
15138 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
15139
15140         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
15141         * parameters.cs (ComputeAndDefineParameters): Remove.
15142         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
15143         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
15144         Use GetParameterInfo.
15145
15146 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
15147
15148         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
15149
15150 2005-03-02  Raja R Harinath  <rharinath@novell.com>
15151
15152         Unify DeclSpace.LookupType and DeclSpace.FindType.
15153         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
15154         is in charge of defining nested types on demand.
15155         (DeclSpace.LookupType): Use it when the current_type is a
15156         TypeBuilder.  Use LookupTypeDirect for reflected types.
15157         (DeclSpace.FindType): Remove.
15158         (DeclSpace.LookupInterfaceOrClass): Likewise.
15159         (DeclSpace.DefineTypeAndParents): Likewise.
15160         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
15161         DeclSpace.LookupType.
15162         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
15163         * typemanager.cs (LookupType): Simplify.
15164         (AddUserType): Remove type from negative_hits.
15165         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
15166         * class.cs (TypeContainer.FindMembers): Move handling of nested
15167         types ...
15168         (TypeContainer.FindMembers_NestedTypes): ... here.
15169         (TypeContainer.FindNestedType): Implement override.
15170         (ClassPart.FindNestedType): Delegate to PartialContainer.
15171         (ClassPart.PartFindNestedType): Looks up the nested types of the
15172         part alone.
15173
15174 2005-03-02  Martin Baulig  <martin@ximian.com>
15175
15176         * class.cs (TypeContainer.DoDefineMembers): We also need a default
15177         static constructor in static classes.
15178
15179 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
15180
15181         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
15182         sizeParamIndex is not specified.
15183
15184 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
15185
15186         Fix #73117
15187         * report.cs (WarningMessage.IsEnabled): Missing null check.
15188
15189 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15190
15191         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
15192         in the fields and not in the properties.
15193
15194 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
15195
15196         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
15197         fields as well.
15198
15199 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15200
15201         * attribute.cs: Small refactoring (improved robustness).
15202         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
15203         (ValidateGuid): Removed.
15204         (Resolve): Removed referenced to above mentioned.
15205         (GetAttributeUsage): Made private and changed to work without
15206         class assistance.
15207         (GetIndexerAttributeValue): Don't crash.
15208         (GetConditionalAttributeValue): Ditto.
15209         (GetClsCompliantAttributeValue): Ditto.
15210         (ExtractSecurityPermissionSet): All attributes exceptions are
15211         error 648.
15212         (GetPropertyValue): New helper.
15213         (GetMethodImplOptions): New method.
15214         (DefinePInvokeMethod): Reuse common code. Implemented handling of
15215         some missing properties.
15216         
15217         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
15218         (Method.ApplyAttributeBuilder): Updated.
15219         
15220         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
15221         exception.
15222
15223 2005-02-28  Raja R Harinath  <rharinath@novell.com>
15224
15225         Fix #73052.
15226         * report.cs (Report.SymbolRelatedToPreviousError): Handle
15227         non-simple types (array, pointer, reference).
15228
15229 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15230
15231         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
15232
15233         * class.cs (MethodCore.IsDuplicateImplementation): Special error
15234         for operators.
15235         (Method.CheckBase): Catch wrong destructor here.
15236         (MethodData.Define): Add errors 550, 668.
15237
15238         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
15239
15240         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
15241
15242         * pending.cs (VerifyPendingMethods): Add error 551.
15243
15244         * typemanager.cs (CSharpName): Next error report helper.
15245
15246 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
15247
15248         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
15249         attributes. Removed useless attribute double check.
15250         It saves almost 2MBs for corlib.
15251
15252 2005-02-25  Raja R Harinath  <rharinath@novell.com>
15253
15254         Fix #72924.
15255         * statement.cs (ExpressionStatement.Resolve): Make robust to being
15256         called twice in case of error.
15257
15258 2005-02-23  Chris Toshok  <toshok@ximian.com>
15259
15260         Fix compiler portions of #72827.
15261         * statement.cs (Block.Emit): call Begin/EndScope on the
15262         EmitContext instead of the ILGenerator.
15263
15264         * codegen.cs (EmitContext.BeginScope): new method, call
15265         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
15266         we have one.)
15267         (EmitContext.BeginScope): same, but EndScope and CloseScope
15268
15269         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
15270         offset and call the superclass's OpenScope(int) with it.
15271         (SymbolWriter.CloseScope): get the current il
15272         offset and call superclass's CloseScope(int) with it.
15273
15274 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
15275
15276         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
15277         CS1677 for out and ref as well.
15278
15279         * class.cs (Method.Define): Add error CS1599 detection.
15280         
15281         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
15282         
15283         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
15284         
15285         * delegate.cs (Delegate.Define): Add error CS1599 detection.
15286         
15287         * support.cs.cs (ModifierDesc): New helper method.
15288
15289 2005-02-23  Raja R Harinath  <rharinath@novell.com>
15290             Abin Thomas  <projectmonokochi@rediffmail.com>
15291             Anoob V E  <projectmonokochi@rediffmail.com>
15292             Harilal P R  <projectmonokochi@rediffmail.com>
15293
15294         Fix #57851, #72718.
15295         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
15296         MemberLookup (used for error reporting) actually returns a result.
15297         Fix error report number (122, not 112).
15298
15299 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
15300             Anoob V E  <projectmonokochi@rediffmail.com>
15301             Harilal P R  <projectmonokochi@rediffmail.com>
15302
15303         Fix #71134.
15304         * pending.cs (PendingImplementation.GetAbstractMethods):
15305         Find NonPublic members too.
15306
15307 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
15308
15309         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
15310         Fixed error 217.
15311         
15312         * class.cs (MethodCore.CheckMethodAgainstBase):
15313         Add error 239 report.
15314
15315 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15316
15317         Fix #68955.
15318         * expression.cs (Invocation.IsApplicable): Make public.
15319         (Invocation.IsParamsMethodApplicable): Likewise.
15320         * delegate.cs (Delegate.VerifyApplicability): Don't use
15321         Invocation.VerifyArgumentCompat for parameter applicability
15322         testing.  Use Invocation.IsApplicable and
15323         Invocation.IsParamsMethodApplicable.
15324
15325 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15326
15327         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
15328         
15329         * class.cs (Operator.Define): Add error 217 report.
15330         
15331 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15332
15333         * namespace.cs (UsingEntry.Resolve): Undo change below.
15334
15335 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15336
15337         Fix #72756.
15338         * ecore.cs (Expression.MemberLookupFailed): Add argument to
15339         disable the error message when the extended MemberLookup also
15340         fails.
15341         (Expression.MemberLookupFinal): Update.
15342         (SimpleName.DoSimpleNameResolve): Update.
15343         * expression.cs (MemberAccess.ResolveNamespaceOrType):
15344         Don't use MemberLookupFinal.
15345         (New.DoResolve): Update.
15346         (BaseAccess.CommonResolve): Update.
15347
15348 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15349
15350         Fix #72732.
15351         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
15352         occured previously, don't resolve again.
15353
15354 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15355
15356         Fix #69949
15357         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
15358         argument. Call ResolveAttributeUsage for unresolved.
15359         when types doesn't match ctor arguments.
15360         
15361         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
15362         for nested attribute classes.
15363         (Class.attribute_usage): Removed.
15364         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
15365         for attribute class.
15366         
15367         * ecore.cs (IsAttribute): Removed.
15368         
15369         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
15370         
15371         * rootcontext.cs (RegisterAttribute): Removed, attributes are
15372         now normal types.
15373         (attribute_types): Removed.
15374         (EmitCode): Global attributes are emited as the latest.
15375
15376 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
15377
15378         * class.cs (EmitFieldInitializers): Don't emit field initializer
15379         for default values when optimilization is on.
15380         
15381         * constant.cs (Constant.IsDefaultValue): New property.
15382         
15383         * driver.cs: Add /optimize handling.
15384         
15385         * constant.cs,
15386         * ecore.cs,
15387         * literal.cs: Implement new IsDefaultValue property.
15388         
15389         * rootcontext.cs (Optimize): New field, holds /optimize option.
15390
15391 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15392
15393         Fix crasher in re-opened #72347.
15394         * namespace.cs (Namespace.Lookup): Return null if
15395         DeclSpace.DefineType returns null.
15396
15397         Fix #72678.
15398         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
15399
15400 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15401
15402         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
15403         now returns null if it cannot resolve to an lvalue.
15404         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
15405         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
15406         returned null.  Remove check for SimpleName.
15407         (EventExpr.DoResolveLValue): New.
15408         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15409         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15410         error from ...
15411         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15412         avoid CS0131 error.
15413         (Unary.ResolveOperator): Move CS0211 check ...
15414         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15415         CS0131 error.
15416         (Unary.DoResolveLValue): Simplify.
15417         (AddressOf.DoResolveLValue): New.
15418         (ArrayAccess.DoResolveLValue): New.
15419
15420 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15421
15422         * attribute.cs (Attribute.Resolve): Add arguments casting for
15423         when types doesn't match ctor arguments.
15424
15425 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15426
15427         Fix parts of #63202.
15428         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15429         lookup of operator in base type.  Ensure that all checks happen
15430         when the operator resolves to an "op_..." method.
15431
15432 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15433
15434         Fix #71992.
15435         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15436         'ignore_cs0104' parameter.  Pass it to ...
15437         (NamespaceEntry.Lookup): ... this.
15438         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15439         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15440         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15441         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15442         Update.  Request that cs0104 errors be ignored.
15443         (ComposedCast.ResolveAsTypeStep): Update.
15444
15445 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15446
15447         Fix #59209.
15448         * expression.cs (Invocation.BetterFunction): Remove support for
15449         comparing virtual functions and their overrides.
15450         (Invocation.IsOverride): New.
15451         (Invocation.OverloadResolve): Don't consider 'override' functions
15452         during candidate selection.  Store them in a lookaside list.
15453         If the selected method is a 'virtual' function, use the list to
15454         find any overrides that are closer to the LHS type.
15455
15456 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15457
15458         * expression.cs (New.DoResolve): Add complex core type reduction.
15459         (New.Constantify): Converts complex core type syntax like 'new int ()'
15460         to simple constant.
15461         
15462 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15463
15464         * decl.cs (EntryType.EntryType): New constructor to create an
15465         updated copy of a cache entry.
15466         (MemberCache.AddMethods): Use it.
15467         (MemberCache.ClearDeclaredOnly): Remove.
15468         (MemberCache.MemberCache): Update.
15469
15470 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15471
15472         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15473         variable.  This one is represents the actual low-level declaration
15474         of the method, as opposed to the semantic level `IsStatic'.   
15475
15476         An anonymous method which is hosted into a static method might be
15477         actually an instance method.  IsStatic would reflect the
15478         container, while MethodIsStatic represents the actual code
15479         generated.
15480
15481         * expression.cs (ParameterReference): Use the new MethodIsStatic
15482         instead of IsStatic.
15483
15484         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15485         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15486         set on the current EmitContext. 
15487
15488         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15489         resolve our casted expression as an LValue.  This triggers the
15490         proper LValue processing that is later required by Assign.
15491
15492         This fixes 72347.
15493
15494         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15495
15496 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15497
15498         C# 2.0 Fixed buffer implementation
15499
15500         * anonymous.cs: Update after RegisterHelperClass renaming.
15501
15502         * attribute.cs (AttributeTester.fixed_buffer_cache):
15503         Cache of external fixed buffers.
15504         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15505         implementation if field is fixed buffer else null.
15506
15507         * class.cs
15508         (TypeContainer.AddField): Accept FieldMember instead of Field.
15509         (FieldBase.IsFieldClsCompliant): Extracted code from
15510         VerifyClsCompliance descendant customization.
15511         (FixedField): New class handles fixed buffer fields.
15512         (FixedFieldExternal): Keeps information about imported fixed
15513         buffer.
15514         (IFixedField): Make access to internal or external fixed buffer
15515         same.
15516
15517         * cs-parser.jay: Add fixed buffer parsing.
15518
15519         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15520         buffer.
15521
15522         * expression.cs (Indirection): Extended implementation to accept
15523         fixed buffer field.
15524         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15525         (ElementAccess.MakePointerAccess): Get type as parameter.
15526         (DoResolve): Add fixed buffer field expression conversion.
15527         (DoResolveLValue): Ditto.
15528         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15529         (ArrayPtr): Derives from FixedBufferPtr.
15530         (ArrayPtr.Emit): Add extra emit for array elements.
15531
15532         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15533
15534         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15535         for compiler generated types.
15536         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15537
15538         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15539         and consume less memory.
15540         (Fixed.Resolve): Add fixed buffer case.
15541
15542         * typemanager.cs (compiler_generated_attr_ctor,
15543         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15544         (HasElementType): Add our own implementation to work on every
15545         runtime.
15546
15547 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15548
15549         * anonymous.cs (CaptureContext): Track whether `this' has been
15550         referenced.   
15551
15552         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15553         only captured `this' if it was implicitly done (instance
15554         methods/variables were used). 
15555
15556         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15557         `this' must be captured.
15558
15559 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15560  
15561         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15562         is null it means that there has been no need to capture anything,
15563         so we just create a sibling.
15564
15565         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15566
15567         Just a partial fix.  The other half is fairly elusive.
15568         
15569 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15570
15571         Fix #52586, cs0121-4.cs.
15572         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15573         and return a hashtable.
15574         (MemberCache.ClearDeclaredOnly): New.
15575         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15576         the method_hash of a base type too.
15577         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15578         type methods.  Overwrite entries with the same MethodHandle so
15579         that the ReflectedType is correct.  The process leaves in base
15580         virtual functions and their overrides as distinct entries.
15581         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15582         matters since it was boxed in a ArrayList before.
15583         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15584         modifier.
15585         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15586         case of a virtual function and its override (choose the overload
15587         as better).
15588         (Invocation.OverloadResolve): Avoid 'override' members during
15589         'applicable_type' calculation.
15590
15591 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15592
15593         Combine two near-redundant caches.
15594         * typemanager.cs (method_params): Rename from method_internal_params.
15595         (TypeManager.GetParameterData): New.  Replace
15596         Invocation.GetParameterData.
15597         (TypeManager.LookupParametersByBuilder): Remove.
15598         * expression.cs (Invocation.method_parameter_cache): Remove.
15599         (Invocation.GetParameterData): Remove.
15600         Update to changes.
15601         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15602         Update to changes.
15603
15604 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15605
15606         Fix #72015.
15607         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15608         TypeManager.multicast_delegate_type is null, resolve it by looking
15609         up "System.MulticastDelegate".
15610         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15611
15612 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15613             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15614             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15615
15616         Fix cs0164.cs.
15617         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15618         (LabeledStatement.AddReference): New.  Set 'referenced'.
15619         (Goto.Resolve): Use it.
15620
15621 2005-02-05  John Luke  <john.luke@gmail.com>
15622
15623         * driver.cs: remove duplicate -doc line in Usage ()
15624
15625 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15626
15627         * location.cs (Location.AddFile): Fix CS2002 error report.
15628
15629 2005-02-02  Martin Baulig  <martin@ximian.com>
15630
15631         * delegate.cs (Delegate.DefineType): Report an internal error if
15632         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15633         details.        
15634
15635 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15636
15637         Fix a crasher in a variant of #31984.
15638         * const.cs (Constant.CheckBase): New override that defers the
15639         new-or-override check in case the base type hasn't been populated
15640         yet.
15641         (Constant.Define): Ensure the new-or-override check is performed.
15642
15643 2005-02-01  Duncan Mak  <duncan@ximian.com>
15644
15645         * const.cs (LookupConstantValue): Check that `ce' is not null
15646         before calling GetValue ().
15647
15648 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15649
15650         Fix test-334.cs (#69519).
15651         * cs-parser.jay (using_alias_directive): Pass in an expression to
15652         NamespaceEntry.UsingAlias.
15653         (using_namespace_directive): Pass in an expression to
15654         NamespaceEntry.Using.
15655         (namespace_name): Don't flatten to a string.
15656         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15657         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15658         ResolveAsTypeStep.
15659         (NamespaceEntry.UsingEntry): Likewise.
15660         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15661         changes.
15662         (NamespaceEntry.LookupForUsing): Remove.
15663         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15664         names.
15665         (NamespaceEntry.Lookup): Remove support for dotted names.
15666
15667 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15668
15669         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15670         split into two.
15671         (NamespaceEntry.ImplicitParent): Compute on demand.
15672         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15673         parallels the current.
15674         (NamespaceEntry.LookupForUsing): Use it.
15675         (NamespaceEntry.Lookup): If the current namespace-entry is
15676         implicit, don't search aliases and using tables.
15677
15678 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15679
15680         Fix #31984.
15681         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15682         BaseCache here.
15683         (TypeContainer.BaseCache): Compute on demand.
15684         (TypeContainer.FindMembers): Define constants and types if they're
15685         not already created.
15686         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15687         check.
15688         * const.cs (Constant.Define): Make idempotent.
15689
15690 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15691
15692         * pending.cs: Produce better code (no nops produced by using Ldarg
15693         + value).
15694         
15695         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15696         i - 1' it should be arg + 1.
15697
15698         Fixes bug #71819.
15699
15700 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15701
15702         * attribute.cs (Attribute.CheckAttributeType): Make private
15703         non-virtual.
15704         (Attribute.ResolveType): Make virtual.
15705         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15706         handling of RootContext.Tree.Types.
15707
15708 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15709
15710         Update attribute-handling to use the SimpleName/MemberAccess
15711         mechanisms.
15712         * cs-parser.jay (attribute): Pass in an expression to the
15713         constructors of Attribute and GlobalAttribute.
15714         * attribute.cs (Attribute): Take an expression for the name.
15715         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15716         passed in attribute name expression.
15717         (Attribute.CheckAttributeType): Use it.
15718         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15719         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15720         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15721         argument to prevent error messages if the lookup fails.
15722
15723 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15724
15725         * expression.cs (Indirection): Implemented IVariable interface
15726         to support indirection in AddressOf operator.
15727         (PointerArithmetic.Emit): Add optimalization for case where
15728         result can be precomputed.
15729
15730 2005-01-26  Martin Baulig  <martin@ximian.com>
15731
15732         * class.cs (TypeContainer.AttributeTargets): Return the correct
15733         AttributeTargets depending on our `Kind' instead of throwing an
15734         exception; fixes #71632.
15735
15736 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15737
15738         Fix #71257
15739         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15740         constant members.
15741
15742 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15743
15744         Fix #71602.
15745         * expression.cs (MemberAccess.DoResolve): Don't complain with
15746         cs0572 when the LHS of a member access has identical name and type
15747         name.
15748
15749 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15750
15751         Fix #71651, #71675
15752         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15753         CreatePermission.
15754         Create custom PermissionSet only for PermissionSetAttribute.
15755
15756 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15757
15758         Fix #71649
15759         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15760         delegates in static class.
15761
15762 2005-01-24  Martin Baulig  <martin@ximian.com>
15763
15764         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15765         merging an implicit block, just use its reachability.
15766
15767         * statement.cs (Block.Resolve): Make the unreachable code check
15768         work wrt. implicit blocks; see test-337 from #63842.
15769
15770 2005-01-21  Alp Toker  <alp@atoker.com>
15771  
15772         * cs-parser.jay: destructor_declaration's container is PartialContainer
15773         not Class when partial types are used, so use Kind prop instead of
15774         'is'.
15775         
15776 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15777
15778         * cs-parser.jay: Improve error reporting when an interface
15779         declares new types.
15780
15781 2005-01-20  Dick Porter  <dick@ximian.com>
15782
15783         * support.cs: SeekableStreamReader fix from Sandor Dobos
15784         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15785         chars are read.  Fixes bug 70369.
15786
15787 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15788
15789         * cs-parser.jay (catch_clause): Simplify current_block handling
15790         somewhat.
15791
15792 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15793
15794         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15795         code with ImplicitStandardConversion to handle the implicit
15796         conversion of method groups into valid delegate invocations. 
15797
15798         The problem is that in parameter handling we were using this code
15799         path.  Fixes bug #64698
15800
15801 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15802
15803         * cs-parser.jay: Fix several infelicities.
15804         - Avoid assigning to the parser value stack.  Code like 
15805           '$3 = null' is unclean.  Synthesize a value for the code block
15806           instead. 
15807         - Avoid using oob_stack for storing location information.  Use ...
15808         (_mark_): ... this.  New (empty) rule.  Saves the current location
15809         in $$.
15810         (foreach_statement): Avoid using oob_stack for current_block
15811         handling.  Use technique used in for_statement and
15812         using_statement.  Synthesize a value for the code block to store
15813         additional intermediate information.
15814
15815 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15816
15817         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15818         of a different type is only allowed to private fields of a
15819         containing type, not on fields of a base class.
15820
15821         See test-174.cs and error cs0122-9.cs
15822
15823 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15824
15825         Fix test-335.cs (bug #58126).
15826         * cs-parser.jay (argument): Split out non-expression parts of the
15827         rule into 'non_simple_argument'.
15828         (invocation_expression): Support parenthesized invocations with
15829         multiple arguments, and with single non-simple arguments.
15830
15831 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15832
15833         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15834         places.
15835
15836 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15837
15838         Fix cs0038-1.cs, cs1640-6.cs.
15839         * ecore.cs (Expression.Resolve): Remove special-case for
15840         SimpleName in error-handling.
15841         (Expression.almostMatchedMembers): Relax access permission to
15842         protected.
15843         (Expression.MemberLookupFailed): Handle duplicates in
15844         almostMatchedMembers list.
15845         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15846         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15847         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15848         overload if the passed in MemberInfo is a MethodBase.
15849
15850 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15851
15852         Fix #70749
15853         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15854         for non-CAS & merge permission sets properly.
15855
15856 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15857
15858         Improve standard-compliance of simple name and member access 
15859         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15860         * ecore.cs (FullNamedExpression): New abstract base class 
15861         for Namespaces and TypeExpressions.
15862         (ResolveFlags.SimpleName): Remove.
15863         (SimpleName): Remove support for dotted names.
15864         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15865         DeclSpace.FindType and DeclSpace.LookupType.
15866         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15867         (Expression.ExprClassName): Make member function.
15868         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15869         a namespace.  Remove creation of dotted "SimpleName"s.
15870         (MemberAccess.DoResolve): Likewise.
15871         * decl.cs (DeclSpace.Cache): Make private.
15872         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15873         (DeclSpace.FindType): Update.
15874         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15875         FullNamedExpression.
15876         * namespace.cs (Namespace): Derive from FullNamedExpression
15877         so that it can be part of expression resolution.
15878         (Namespace.Lookup): Return an FullNamedExpression.
15879         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15880         namespace.
15881         * rootcontext.cs (NamespaceLookup): Remove.
15882         (LookupType): Move to DeclSpace.
15883         * attribute.cs (CheckAttributeType): Update.
15884         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15885         (FindDocumentedTypeNonArray): Likewise.
15886
15887 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15888
15889         Fix cs0509.cs, cs1632.cs.
15890         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15891         is the same as IsInterface.
15892         (TypeContainer.GetClassBases): Likewise.
15893         * statement.cs (LabeledStatement.ig): New field.
15894         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15895         label.
15896         (LabeledStatement.DoEmit): Check that the label was created with
15897         the same ILGenerator.
15898
15899 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15900
15901         Fix #71058
15902         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15903         accessors to its properties.
15904
15905         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15906         from accessors to property.
15907         
15908 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15909
15910         Fix #70722
15911         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15912         only for overrides.
15913         
15914 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15915
15916         * attribute.cs: Check for null and empty strings.  
15917
15918         I have lost another battle to Paolo.
15919
15920 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15921
15922         Fix #70942
15923         * class.cs (PropertyMethod): Set Parent field in ctors.
15924         (SetMethod.InternalParameters): Add unsafe switch hack.
15925         Override MarkForDuplicationCheck where it is appropriate.
15926
15927         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15928         It says whether container allows members with the same name.
15929         Base default is no.
15930         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15931         Removed is_method parameter.
15932
15933 2005-01-06  Duncan Mak  <duncan@ximian.com>
15934
15935         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15936         because the previous change led to incorrect reporting of CS1032
15937         ("Cannot define/undefine preprocessor symbols after first token in
15938         file"). Instead of using `tokens_seen' as the only flag that
15939         triggers CS1040, introduce `comments_seen'. This new flag is used
15940         to signify having seen comments on the current line, so it is
15941         unset after a newline.
15942
15943 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15944
15945         * doc.cs : When searching for a type, find nested type too.
15946           This fixes bug #71040.
15947
15948 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15949
15950         * doc.cs :
15951           - Warn missing member comment on those classes which also does not
15952             have doc comments. Fixed bug #71041.
15953           - Don't warn missing doc comment on default constructor.
15954             Fixed bug #71042.
15955
15956 2005-01-06  Duncan Mak  <duncan@ximian.com>
15957
15958         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15959         comments, set `tokens_seen' to true. This allows us to detect
15960         misplaced preprocessor directives (i.e. not at the beginning of
15961         the a line, nor after whitespaces). In that case, report error
15962         CS1040. This fixes bug #56460.
15963
15964         * cs-parser.jay (interface_member_declaration): Add checks for
15965         IsExplicitImpl, and report CS0541 error if an interface member is
15966         defined as an explicit interface declaration.
15967
15968 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15969
15970         Fix #70817
15971         * class.cs (PropertyMethod): Set Parent field in ctors.
15972         (SetMethod.InternalParameters): Add unsafe switch hack.
15973         
15974         * decl.cs (MemberCore.Parent): Cannot be readonly.
15975
15976 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15977
15978         * decl.cs (DeclSpace.ResolveType): Remove.
15979         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15980         Merge in code from ...
15981         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15982         * class.cs, enum.cs: Update to changes.
15983
15984 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15985
15986         * anonymous.cs: Ensure that we init the scope of our parent if it
15987         has not been initialized yet.
15988
15989 2004-12-30  Duncan Mak  <duncan@ximian.com>
15990
15991         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15992         if field.FieldBuilder is null. Fixes #70758.
15993
15994         * convert.cs: Fixed some typos and updated some of the comments.
15995         (ImplicitStandardConversionExists):
15996         (TryImplicitIntConversion): If `target_type' is an interface and
15997         the type of `ic' implements this interface, return true or a new
15998         BoxedCast instead of null. This fixes #70468.
15999
16000 2004-12-29  Duncan Mak  <duncan@ximian.com>
16001
16002         * expression.cs (Argument.Emit): Check that Expr is
16003         IMemoryLocation before casting to it, and report CS1510 otherwise.
16004
16005         This fixes #70402.
16006
16007 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
16008
16009         * statement.cs (Block.ThisVariable): remove the recursion here, to
16010         make the --profile more sane.
16011
16012 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
16013
16014         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
16015         assembly, by JB Evain.
16016
16017 2004-12-17  Raja R Harinath  <rharinath@novell.com>
16018
16019         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
16020           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
16021         "parent" refers to enclosing type/class.  "base" refers to superclass.
16022
16023 2004-12-17  Raja R Harinath  <rharinath@novell.com>
16024
16025         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
16026         Ensure that we only have GlobalAttributes.
16027         * attribute.cs (Attribute.Emit): Make non-virtual.
16028         (GlobalAttribute.Emit): Remove.
16029         (Attribute.Resolve): Make virtual.
16030         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
16031         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
16032         the argument. Don't create one.
16033         (Attribute.GetObsoleteAttribute): Likewise.
16034         (Attribute.GetClsCompliantAttributeValue): Likewise.
16035         * class.cs, decl.cs: Update to changes.
16036
16037 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
16038
16039         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
16040         
16041         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
16042         
16043         * statement.cs (Foreach.Resolve): Add error 186 report.
16044
16045 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
16046
16047         * expression.cs (Conditional.DoResolve): Add warning 429.
16048         
16049         * statement.cs (If.Resolve): Add warning 665.
16050
16051 2004-12-16  Raja R Harinath  <rharinath@novell.com>
16052
16053         New invariant: RootContext.Tree.Types.NamespaceEntry == null
16054         except when in the parser, and in GlobalAttribute.
16055         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
16056         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
16057         RootContext.Tree.Types.NamespaceEntry once work is done.
16058         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
16059         and resets RootContext.Tree.Types.NamespaceEntry.
16060
16061 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
16062
16063         * cs-parser.jay: Don't create a block for every variable.
16064
16065 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
16066
16067         * location.cs: Provide extra information.
16068
16069         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
16070         variables from the captured environment, it is the ldarg_0.
16071
16072 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
16073
16074         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
16075         find a conclusion.
16076         
16077         * class.cs: Changed warning level for 169 to avoid developer
16078         displeasure from warning flooding. It will be changed back when they
16079         fix most of current BCL warnings.
16080         
16081         * RootContext.cs: Pushed default WarningLevel to 3.
16082         
16083         * statement.cs: Removed unused variable.
16084
16085 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
16086
16087         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
16088         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
16089         Add error 502 report.
16090         (StaticClass.DefineType): Add error 441 report.
16091         (Class.AllowedModifiersProp): New virtual property as temporary
16092         extension to AllowedModifiers.
16093         (Class.DefineType): Add error 418 report. Moved ModFlags check here
16094         to share implementation with StaticClass and don't call virtual
16095         methods from ctor.
16096         
16097         * driver.cs (MainDriver): Add error 1558 test.
16098
16099         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
16100         report. Moved error 36 test here.
16101
16102         * statement.cs (Throw.Resolve): Add error 724 report.
16103
16104         * typemanager.cs: Add out_attribute_type core type.
16105         
16106 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
16107
16108         * class.cs (TypeContainer.VerifyClsCompliance): Add error
16109         3018 report.
16110         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
16111
16112         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
16113         3017 report.
16114         
16115         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
16116
16117         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
16118         Add error 3023 report.
16119         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
16120
16121         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
16122         implementation.
16123
16124 2004-12-12  John Luke  <john.luke@gmail.com>
16125
16126         * driver.cs (AddArgs): take -- into account when
16127         adding arguments, fixes bug 65710 
16128
16129 2004-12-12  Martin Baulig  <martin@ximian.com>
16130
16131         * expression.cs (Unary.TryReduceNegative): Added support for
16132         SByteConstant and ByteConstant.
16133         (Unary.Reduce): Check error values from TryReduceNegative().
16134
16135 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
16136
16137         * attributes.cs (Attribute.Resolve): Avoid multiple error report
16138         and report exception as error 182.
16139
16140 2004-12-10  Raja R Harinath  <rharinath@novell.com>
16141
16142         * driver.cs (Main): Fix message when there are warnings.
16143
16144 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
16145
16146         * delegate.cs: Fixed my fix from yesterday, sorry about that.
16147
16148 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
16149
16150         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
16151         Reduced number of warnings.
16152         
16153         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
16154
16155 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
16156
16157         * driver.cs: Removed message.
16158
16159         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
16160
16161 2004-12-08    <vargaz@freemail.hu>
16162
16163         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
16164
16165 2004-12-08  Martin Baulig  <martin@ximian.com>
16166
16167         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
16168         instead of a CS3002 for properties and indexer.
16169
16170 2004-12-08  Martin Baulig  <martin@ximian.com>
16171
16172         * decl.cs (MemberName.ToString): Make this work again.
16173
16174 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
16175
16176         * attribute.cs (Resolve): Add error 591 detection.
16177
16178         * class.cs (FieldMember.Define): Add error 1547 detection.
16179         (Indexer.Define): Add error 620 detection.
16180         (Operator.Define): Add error 590 detection.
16181
16182         * ecore.cs: Missing argument for error 79.
16183
16184         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
16185         detection.
16186
16187 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
16188
16189         Fix #70106
16190         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
16191         only.
16192
16193 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
16194
16195         * cs-parser.jay : handle doc comments on implicit/explicit operators.
16196           Some operator comments were suppressed.
16197         * doc.cs : Implicit/explicit operator name in doc comments are like
16198           "op_Explicit(type)~returnType", so added suffix handling.
16199
16200 2004-12-07  Martin Baulig  <martin@ximian.com>
16201
16202         * decl.cs
16203         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
16204         (MemberCore.GetClsCompliantAttributeValue): Likewise.
16205         (DeclSpace.ec): New protected field; store the EmitContext here.
16206         (DeclSpace.EmitContext): New public property; moved here from
16207         `TypeContainer'.
16208         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
16209         EmitContext.
16210
16211         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
16212         (Enum.Emit): Don't create a new EmitContext.
16213
16214         * delegate.cs (Delegate.DefineType): Always create the
16215         EmitContext.
16216
16217         * iterators.cs (Iterators.DefineIterator): Create a new
16218         EmitContext and store it in `ec'.
16219
16220 2004-08-24  Martin Baulig  <martin@ximian.com>
16221
16222         * typemanager.cs
16223         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
16224         this for accessibility checks.
16225         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
16226         IsNestedFamilyAccessible.
16227         (TypeManager.IsSubclassOf): New method, do what the name actually
16228         says.   
16229
16230 2004-12-06  Raja R Harinath  <rharinath@novell.com>
16231
16232         Fix crash on cs0657-17.cs.
16233         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
16234         Use RootContext.Tree.Types, not 'new RootTypes ()'.
16235         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
16236         the case where the NamespaceEntry gets overwritten.
16237
16238 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
16239
16240         Fixed #69195, #56821
16241         * ecore.cs (ResolveBoolean): Tiny refactoring.
16242
16243         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
16244         of right expression resolving when left is false constant and
16245         operator is LogicalAnd OR true constant and operator is LogicalOr.
16246
16247         * statement.cs (ResolveUnreachable): Always reports warning.
16248
16249 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
16250
16251         * class.cs: Distinguish between 1721 and 1722 (just a little help
16252         for the programmer).
16253
16254 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
16255
16256         * delegate.cs: Only allow this on new versions of the language. 
16257
16258 2004-12-02  Duncan Mak  <duncan@ximian.com>
16259
16260         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
16261         Expression class.
16262         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
16263         here as a static method. Take an additional bool out parameter
16264         `must_do_cs1540_check' for signaling to InstanceResolve.
16265         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
16266         member field from PropertyExpr class and made it an argument of
16267         the method instead.
16268         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
16269         check for MarshalByRefObject, and report CS0122 instead of CS1540.
16270         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
16271         and `remove_accessor' as well as InstanceResolve: report CS0122
16272         where applicable.
16273
16274         Fixes #70129.
16275
16276 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16277
16278         Fix test-327.cs, test-328.cs, and put in early infrastructure
16279         for eventually fixing #52697.
16280         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
16281         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
16282         from other methods.
16283         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
16284         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
16285         (VerifyUsing, error246): Update.
16286         * rootcontext.cs (RootContext.NamespaceLookup): Just use
16287         'NamespaceEntry.LookupNamespaceOrType'.
16288
16289 2004-12-03  Martin Baulig  <martin@ximian.com>
16290
16291         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16292         method as our child, call AnonymousMethod.Compatible() on it.
16293
16294 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16295
16296         Disable XML documentation support in 'basic' profile.
16297         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
16298         Redirect XmlElement to System.Object.
16299         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
16300         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
16301         * mcs.exe.sources: Add doc-bootstrap.cs.
16302         * doc-bootstrap.cs: New file.  Contains empty stub implementation
16303         of doc.cs.
16304
16305 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
16306
16307         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
16308           comments are allowed.
16309
16310 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16311
16312         * delegate.cs: Add checks for subtypes in paramaters and return values
16313         in VerifyMethod () to add support for Covariance/Contravariance
16314         in delegates.
16315         
16316 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
16317
16318         * report.cs: Remove extra closing parenthesis.
16319
16320         * convert.cs (Error_CannotImplicitConversion): If the name of the
16321         types are the same, provide some extra information.
16322
16323         * class.cs (FieldBase): Use an unused bit field from the field to
16324         encode the `has_offset' property from the FieldMember.  This saves
16325         a couple of Ks on bootstrap compilation.
16326
16327         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16328         method as our child, return the AnonymousMethod resolved
16329         expression.
16330
16331         * expression.cs (New.DoResolve): Allow return values from
16332         NewDelegate to also include AnonymousMethods.
16333
16334         Fixes #70150.
16335
16336 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
16337
16338         Fix bug #70102
16339         * attribute.cs (Resolve): Improved implementation of params
16340         attribute arguments.
16341
16342         * support.cs (ParameterData): Add HasParams to be faster.
16343
16344 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
16345
16346         all things are for /doc support:
16347
16348         * doc.cs: new file that supports XML documentation generation.
16349         * mcs.exe.sources: added doc.cs.
16350         * driver.cs:
16351           Handle /doc command line option.
16352           Report error 2006 instead of 5 for missing file name for /doc.
16353           Generate XML documentation when required, after type resolution.
16354         * cs-tokenizer.cs:
16355           Added support for picking up documentation (/// and /** ... */),
16356           including a new XmlCommentState enumeration.
16357         * cs-parser.jay:
16358           Added lines to fill Documentation element for field, constant,
16359           property, indexer, method, constructor, destructor, operator, event
16360           and class, struct, interface, delegate, enum.
16361           Added lines to warn incorrect comment.
16362         * rootcontext.cs :
16363           Added Documentation field (passed only when /doc was specified).
16364         * decl.cs:
16365           Added DocComment, DocCommentHeader, GenerateDocComment() and
16366           OnGenerateDocComment() and some supporting private members for
16367           /doc feature to MemberCore.
16368         * class.cs:
16369           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
16370         * delegate.cs:
16371           Added overriden DocCommentHeader.
16372         * enum.cs:
16373           Added overriden DocCommentHeader and GenerateDocComment().
16374
16375 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
16376
16377         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
16378         unwrapping the enumeration values, chain to
16379         DoConstantNumericPromotions again, so we can promote things to the
16380         fundamental types (takes care of enums that are bytes, sbytes).
16381
16382         Fixes bug #62054.
16383
16384 2004-12-01  Raja R Harinath  <rharinath@novell.com>
16385
16386         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
16387         Fix long-standing bug in type-lookup.  Use FindType instead of
16388         LookupType when ec.ResolvingTypeTree.
16389         (Attribute.ResolveType, Attribute.Resolve)
16390         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
16391         Update to changes.
16392         (Attributes.Search): Remove internal version.  Update.
16393         (Attributes.SearchMulti): Update.
16394         (Attributes.GetClsCompliantAttribute): Remove.
16395         (Attributes.GetIndexerNameAttribute): Remove.
16396         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
16397         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
16398         * class.cs (Indexer.Define): Likewise.
16399
16400 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
16401
16402         Fix bug #68790
16403         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
16404         MarshallByReference members access.
16405
16406         * expression.cs: Use CheckMarshallByRefAccess;
16407         Better error CS0197 message.
16408
16409         * report.cs: Print whole related error message.
16410
16411 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16412
16413         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16414         the current directory to help debugging.
16415
16416 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16417
16418         * class (GetClassBases): Better error 60 report.
16419         (EventProperty): Disabled warning 67 detection.
16420
16421 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16422
16423         Fix bug #60324
16424         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16425
16426         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16427         precise values.
16428
16429 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16430
16431         Fix bug #49488
16432         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16433
16434         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16435
16436 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16437
16438         * attribute.cs (Attribute.Resolve): Refine error reporting and
16439         report a cs0117 if the identifier does not exist, to distinguish
16440         from 0617 which is a miss-use of the actual identifier.
16441
16442         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16443         between cs0070 and cs0079.
16444
16445         * class.cs (MemberBase.DoDefine): When reporting a wrong
16446         accessibility level, we use MethodCore to compare instead of
16447         Method (this was a regression in some refactoring effort).
16448
16449         So now we correctly report cs0056 again.
16450
16451         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16452         testing the target_type (which was known to be object_type) and
16453         not the source type (which is anonymous_method).
16454
16455         Fixed reporting of error cs1660.
16456
16457         * expression.cs (UserCast.Source): Expose the underlying cast.
16458
16459         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16460         allowed types to find a match to int32 first (most common).
16461
16462         In addition, it ignores any ImplicitUserConversions that did an
16463         internal implicit conversion (as the switch statement allows only
16464         one integral conversion to exist).
16465
16466         * class.cs (PartialContainer.Create): rename `name' to
16467         `member_name' for clarity.  Then replace the string calls with a
16468         call to MemberName.GetPartialName, as now using
16469         MemberName.ToString is an error (this is due to the side effects
16470         it had, that were fixed in the past).
16471
16472         This will restore the error reporting on a number of partial class
16473         errors that were missusing this (and getting an exception as a
16474         results, which is now just a plain textual warning, because
16475         yyparse debug output would crash otherwise).
16476
16477 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16478
16479         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16480
16481 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16482
16483         * rootcontext.cs (LookupType): Make sure to cache lookups that
16484         don't give us a negative result. This saves about 5% of corlib
16485         compilation time.
16486
16487 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16488
16489         * report.cs (AbstractMessage.Print): messages are sent to stderr
16490
16491         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16492         non-interface in the list of interfaces (at this point, either
16493         parent was properly set, or a base class is being listed in the
16494         interfaces section).
16495
16496         This flags error 1722, and resolves the crash from bug 69259.
16497
16498 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16499
16500         * statement.cs (Using.EmitExpressionFinally): make this work right
16501         for valuetypes. Fixes 69926.
16502
16503 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16504
16505         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16506         converted to an enum" here, before we try to change the underlying
16507         type.  This code exists, but it is a different code path than the
16508         one used while encoding constants.
16509
16510         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16511         old bug: when converting from the null literal to a pointer,
16512         return an EmptyCast, not the NullLiteral.
16513
16514         This fixes #69921, the recent null_type changes probably made this
16515         bug more prominent.
16516
16517         (ImplicitReferenceConversionExists): In addition, resynchronized
16518         the code here, so it matches the same code in
16519         ImplicitReferenceConversionExists for the `from any class-type S
16520         to any interface-type T'.
16521         
16522
16523 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16524
16525         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16526
16527 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16528
16529         * cs-parser.jay: Use verbosity accordingly. 
16530
16531 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16532
16533         * expression.cs (Unary.ResolveOperator): Do not report warning;
16534         AddressOf reads from variable.
16535         
16536         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16537
16538 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16539
16540         Fix bug #69462
16541
16542         * attribute.cs (Attributable): Removed CheckTargets.
16543         (Attributes.Emit): Explicit attribute targets are tested here.
16544
16545         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16546         not enabled for interfaces.
16547
16548         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16549         (GetAssemblyName): Ouch next bug there.
16550
16551 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16552
16553         * expression.cs: Error 275 added.
16554         
16555 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16556
16557         Fix bug #69177 (Implemented decimal constant support)
16558
16559         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16560         (BinaryFold): Add DecimalConstant.
16561
16562         * const.cs (Define): Decimal constant 
16563         (is not constant.
16564         (ChangeType): Add decimal type handling.
16565         (LookupConstantValue): Don't set value for decimal type but
16566         emit DecimalConstantAttribute. Needed for constant optimization.
16567
16568         * constant.cs (ToDecimal): New method.
16569         (ConvertToDecimal): New method.
16570         (IntConstant): Implemented ConvertToDecimal.
16571         (DecimalConstant.Emit): Emit optimized version for decimals in
16572         int range.
16573
16574         * expression.cs (ResolveOperator): Changed order of constant
16575         reduction to work correctly with native types which have
16576         overloaded operators.
16577         (ResolveMemberAccess): Extract constant value from attribute
16578         for decimal type.
16579
16580         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16581
16582         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16583         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16584         (ChangeType): Decimal is special.
16585         (TypeToCoreType): Add decimal type.
16586
16587 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16588
16589         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16590         decimal types.
16591
16592 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16593
16594         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16595         test cs1667-5.cs.
16596
16597 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16598
16599         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16600
16601         * pending.cs (PendingImplementation): Grab only interfaces.
16602
16603 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16604
16605         * statement.cs (ForeachHelperMethods): Add location member and
16606         error 202 detection.
16607
16608 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16609
16610         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16611         automatically handled by executable.make.
16612         (PROGRAM): Make profile-specific.
16613
16614 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16615
16616         * expression.cs (DoResolveBase): Fixed wrong warning for out
16617         variables.
16618
16619 2004-11-18  Martin Baulig  <martin@ximian.com>
16620
16621         Merged latest changes into gmcs.  Please keep this comment in
16622         here, it makes it easier for me to see what changed in MCS since
16623         the last time I merged.
16624
16625 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16626
16627         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16628         (TypeHandle.GetMemberCache): New.
16629         (TypeHandle.TypeHandle): Update.
16630         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16631         (TypeManager.LookupParentInterfacesCache):
16632         Rename from LookupInterfaceCache.  Optimize slightly.
16633         (TypeManager.MemberLookup_FindMembers): Update.
16634         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16635         multi-type variant.
16636         (AddCacheContents): Rename from AddHashtable.
16637         * class.cs (TypeContainer.parent_container): Remove.
16638         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16639         (TypeContainer.DoDefineMembers): Don't initialize it.
16640         Update to name changes.
16641         
16642 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16643
16644         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16645         that factors the code to check access modifiers on override.  
16646
16647         (PropertyBase): Use the code here.
16648
16649         Patch from Lluis S'anchez, fixes bug #69361.
16650
16651 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16652
16653         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16654         routine that is used to report the use of a captured variable
16655         whose address has been taken.
16656
16657         There are two checks: one when variables are being captured and
16658         the other check is when the address of a variable is taken. 
16659         
16660         (because an anonymous methods might be resolved before *or* after
16661         the address has been taken) and 
16662
16663         * expression.cs (Conditional.DoResolve): Remove the special
16664         casing that Martin added to trueExpr and falseExpr being both
16665         NullLiteral.  We get the right behavior now just by introducing
16666         the null_type into the compiler. 
16667
16668         * convert.cs (ExplicitConversion): Change the code to use
16669         null_type instead of testing `expr is NullLiteral'.
16670         (ImplicitConversionStandard): use null_type too.
16671         (ImplicitReferenceConversionExists): use null_type too.
16672         (ImplicitReferenceConversion): use null_type too.
16673
16674         * literal.cs: The type of `NullLiteral' is now null_type instead
16675         of object_type. 
16676         (Resolve): Set the type here.
16677
16678         * typemanager.cs: Introduce null_type.
16679
16680 2004-11-17  Martin Baulig  <martin@ximian.com>
16681
16682         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16683         direction, like FindMembers() does.  Fixes #69546, testcase is in
16684         test-315.cs.    
16685
16686 2004-11-16  Martin Baulig  <martin@ximian.com>
16687
16688         This is based on a patch from Marek Safar, see bug #69082.
16689         Fixes bugs #63705 and #67130.
16690
16691         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16692         method; create a MemberCache for an interface type and cache the
16693         result.
16694
16695         * decl.cs (IMemberContainer.ParentContainer): Removed.
16696         (IMemberContainer.ParentCache): New property.
16697         (MemberCache.SetupCacheForInterface): Removed.
16698         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16699         to create a cache for an interface's "parent".
16700
16701         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16702         interfaces too.
16703
16704 2004-11-16  Martin Baulig  <martin@ximian.com>
16705
16706         Merged back from gmcs; these changes already went into gmcs a
16707         couple of weeks ago.
16708
16709         * typemanager.cs
16710         (TypeManager.AddUserType): Removed the `ifaces' argument.
16711         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16712         `TypeExpr []'.
16713         (TypeManager.AddUserInterface): Removed.
16714         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16715         `TypeExpr []'.
16716         (TypeManager.GetInterfaces): Likewise.
16717         (TypeManager.GetExplicitInterfaces): Likewise.
16718
16719         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16720
16721         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16722         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16723
16724 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16725
16726         * statement.cs: Avoid adding bools to a hashtable.
16727
16728 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16729
16730         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16731         calling an unsafe method from a safe location.
16732
16733 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16734
16735         Fix #69167
16736         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16737
16738 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16739
16740         * namespace.cs (VerifyUsing): use GetPartialName instead of
16741         ToString. 
16742
16743 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16744
16745         * statement.cs (Return.Resolve): Fix regression in typo: if
16746         `in_exc', we have to request a NeedReturnLabel, this was a typo
16747         introduced in the anonymous method check-in.  Fixes #69131.
16748
16749         * Indexers were using the ShortName when defining themselves,
16750         causing a regression in the compiler bootstrap when applying the
16751         patch from 2004-11-02 (first part), now they use their full name
16752         and the bug is gone.
16753
16754 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16755
16756         * driver.cs: Strip the path from the names of embedded resources. Fixes
16757         #68519.
16758
16759 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16760
16761         Fix error message regression: cs0104-2.cs.
16762         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16763         (AliasEntry.Resolve): Update.
16764         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16765         'silent' flag.
16766         (RootContext.LookupType): Update.
16767
16768 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16769
16770         * cs-parser.jay: Add support for handling accessor modifiers
16771         * class: Add support port accessor modifiers and error checking,
16772         define PropertyMethod.Define as virtual (not abstract anymore)
16773         * ecore.cs: Add checking for proeprties access with access modifiers
16774         * iterators.cs: Modify Accessor constructor call based in the modified
16775         constructor
16776 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16777
16778         * expression.cs (StringConcat): Handle being called twice,
16779         as when we have a concat in a field init with more than two
16780         ctors in the class
16781
16782 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16783
16784         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16785         special case explicit implementations, we should always produce
16786         the .property or .event declaration.
16787         
16788         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16789         since it will not return correct data if people use this
16790         unresolved in the presence of using statements (see test-313).
16791
16792         * class.cs (MethodData.Define): If we are an explicit interface
16793         implementation, set the method name to the full name of the
16794         interface plus the name of the method.  
16795
16796         Notice that using the method.MethodName.GetFullName() does not
16797         work, as it will only contain the name as declared on the source
16798         file (it can be a shorthand in the presence of using statements)
16799         and not the fully qualifed type name, for example:
16800
16801         using System;
16802
16803         class D : ICloneable {
16804                 object ICloneable.Clone ()  {
16805                 }
16806         }
16807
16808         Would produce a method called `ICloneable.Clone' instead of
16809         `System.ICloneable.Clone'.
16810
16811         * namespace.cs (Alias.Resolve): Use GetPartialName.
16812         
16813 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16814
16815         * cs-parser.jay: Add error 1055 report.
16816
16817 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16818
16819         * assign.cs (Assign.DoResolve): Only do the transform of
16820         assignment into a New if the types are compatible, if not, fall
16821         through and let the implicit code deal with the errors and with
16822         the necessary conversions. 
16823
16824 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16825
16826         * cs-parser.jay: Add error 1031 report.
16827
16828         * cs-tokenizer.cs: Add location for error 1038.
16829
16830 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16831
16832         * cs-parser.jay: Add error 1016 report.
16833
16834 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16835
16836         * cs-parser.jay: Add errors 1575,1611 report.
16837
16838 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16839
16840         * cs-parser.jay: Add error 1001 report.
16841
16842 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16843
16844         Fix #68850
16845         * attribute.cs (GetMarshal): Add method argument for
16846         caller identification.
16847
16848         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16849         agument for GetMarshal and RuntimeMissingSupport.
16850
16851 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16852
16853         * attribute.cs (ExtractSecurityPermissionSet): Removed
16854         TypeManager.code_access_permission_type.
16855
16856         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16857
16858 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16859
16860         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16861         for obsolete use of a variable here.   Fixes regression on errors
16862         cs0619-25 and cs0619-26.
16863
16864 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16865
16866         Fix #62358, implemented security attribute encoding.
16867
16868         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16869         Tests permitted SecurityAction for assembly or other types.
16870         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16871         data from SecurityPermissionAttribute to PermisionSet class.
16872
16873         * class.cs (ApplyAttributeBuilder): Added special handling
16874         for System.Security.Permissions.SecurityAttribute based types.
16875
16876         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16877         special handling for System.Security.Permissions.SecurityAttribute
16878         based types.
16879
16880         * enum.cs (ApplyAttributeBuilder): Added special handling
16881         for System.Security.Permissions.SecurityAttribute based types.
16882
16883         * parameter.cs (ApplyAttributeBuilder): Added special handling
16884         for System.Security.Permissions.SecurityAttribute based types.
16885
16886         * rootcontext.cs: Next 2 core types.
16887
16888         * typemanager.cs (TypeManager.security_permission_attr_type):
16889         Built in type for the SecurityPermission Attribute.
16890         (code_access_permission_type): Build in type.
16891
16892 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16893
16894         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16895         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16896         all of this information into
16897         EmitContext.EmitCapturedVariableInstance.
16898         
16899         * codegen.cs (EmitCapturedVariableInstance): move here the
16900         funcionality of emitting an ldarg.0 in the presence of a
16901         remapping.   This centralizes the instance emit code.
16902
16903         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16904         then emit a load of this: it means that we have reached the
16905         topmost ScopeInfo: the one that contains the pointer to the
16906         instance of the class hosting the anonymous method.
16907
16908         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16909         captures to the topmost CaptureContext.
16910
16911 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16912
16913         * expression.cs (LocalVariableReference): Move the knowledge about
16914         the iterators into codegen's EmitCapturedVariableInstance.
16915
16916 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16917
16918         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16919         all code paths return a value from an anonymous method (it is the
16920         same as the 161 error, but for anonymous methods).
16921
16922 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16923
16924         The introduction of anonymous methods in the compiler changed
16925         various ways of doing things in the compiler.  The most
16926         significant one is the hard split between the resolution phase
16927         and the emission phases of the compiler.
16928
16929         For instance, routines that referenced local variables no
16930         longer can safely create temporary variables during the
16931         resolution phase: they must do so from the emission phase,
16932         since the variable might have been "captured", hence access to
16933         it can not be done with the local-variable operations from the runtime.
16934         
16935         * statement.cs 
16936
16937         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16938         is a toplevel block.
16939
16940         (ToplevelBlock): A new kind of Block, these are the blocks that
16941         are created by the parser for all toplevel method bodies.  These
16942         include methods, accessors and anonymous methods.
16943
16944         These contain some extra information not found in regular blocks:
16945         A pointer to an optional CaptureContext (for tracking captured
16946         local variables and parameters).  A pointer to the parent
16947         ToplevelBlock.
16948         
16949         (Return.Resolve): Catch missmatches when returning a value from an
16950         anonymous method (error 1662).
16951         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16952         phase.
16953
16954         (Break.Resolve): ditto.
16955
16956         (SwitchLabel): instead of defining the labels during the
16957         resolution phase, we now turned the public ILLabel and ILLabelCode
16958         labels into methods called GetILLabelCode() and GetILLabel() that
16959         only define the label during the Emit phase.
16960
16961         (GotoCase): Track the SwitchLabel instead of the computed label
16962         (its contained therein).  Emit the code by using
16963         SwitchLabel.GetILLabelCode ().
16964
16965         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16966         whether the Local has been captured or not.
16967
16968         (LocalInfo.IsCaptured): New property, used to tell whether the
16969         local has been captured.
16970         
16971         * anonymous.cs: Vastly updated to contain the anonymous method
16972         support.
16973
16974         The main classes here are: CaptureContext which tracks any
16975         captured information for a toplevel block and ScopeInfo used to
16976         track the activation frames for various local variables.   
16977
16978         Each toplevel block has an optional capture context associated
16979         with it.  When a method contains an anonymous method both the
16980         toplevel method and the anonymous method will create a capture
16981         context.   When variables or parameters are captured, they are
16982         recorded on the CaptureContext that owns them, for example:
16983
16984         void Demo () {
16985              int a;
16986              MyDelegate d = delegate {
16987                  a = 1;
16988              }
16989         }
16990
16991         Here `a' will be recorded as captured on the toplevel
16992         CapturedContext, the inner captured context will not have anything
16993         (it will only have data if local variables or parameters from it
16994         are captured in a nested anonymous method.
16995
16996         The ScopeInfo is used to track the activation frames for local
16997         variables, for example:
16998
16999         for (int i = 0; i < 10; i++)
17000                 for (int j = 0; j < 10; j++){
17001                    MyDelegate d = delegate {
17002                         call (i, j);
17003                    }
17004                 }
17005
17006         At runtime this captures a single captured variable `i', but it
17007         captures 10 different versions of the variable `j'.  The variable
17008         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
17009         recorded on a child.  
17010
17011         The toplevel ScopeInfo will also track information like the `this'
17012         pointer if instance variables were referenced (this is necessary
17013         as the anonymous method lives inside a nested class in the host
17014         type of the method). 
17015
17016         (AnonymousMethod): Expanded to track the Toplevel, implement
17017         `AnonymousMethod.Compatible' to tell whether an anonymous method
17018         can be converted to a target delegate type. 
17019
17020         The routine now also produces the anonymous method content
17021
17022         (AnonymousDelegate): A helper class that derives from
17023         DelegateCreation, this is used to generate the code necessary to
17024         produce the delegate for the anonymous method that was created. 
17025
17026         * assign.cs: API adjustments for new changes in
17027         Convert.ImplicitStandardConversionExists.
17028
17029         * class.cs: Adjustments to cope with the fact that now toplevel
17030         blocks are of type `ToplevelBlock'. 
17031
17032         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
17033         insteda of standard blocks.
17034
17035         Flag errors if params arguments are passed to anonymous methods.
17036
17037         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
17038         `CurrentAnonymousMethod' which points to the current Anonymous
17039         Method.  The variable points to the AnonymousMethod class that
17040         holds the code being compiled.  It is set in the new EmitContext
17041         created for the anonymous method.
17042
17043         (EmitContext.Phase): Introduce a variable and an enumeration to
17044         assist in enforcing some rules about when and where we are allowed
17045         to invoke certain methods (EmitContext.NeedsReturnLabel is the
17046         only one that enfonces this right now).
17047
17048         (EmitContext.HaveCaptureInfo): new helper method that returns
17049         whether we have a CapturedContext initialized.
17050
17051         (EmitContext.CaptureVariable): New method used to register that a
17052         LocalInfo must be flagged for capturing. 
17053
17054         (EmitContext.CapturedParameter): New method used to register that a
17055         parameters must be flagged for capturing. 
17056         
17057         (EmitContext.CapturedField): New method used to register that a
17058         field must be flagged for capturing. 
17059
17060         (EmitContext.HaveCapturedVariables,
17061         EmitContext.HaveCapturedFields): Return whether there are captured
17062         variables or fields. 
17063
17064         (EmitContext.EmitMethodHostInstance): This is used to emit the
17065         instance for the anonymous method.  The instance might be null
17066         (static methods), this (for anonymous methods that capture nothing
17067         and happen to live side-by-side with the current method body) or a
17068         more complicated expression if the method has a CaptureContext.
17069
17070         (EmitContext.EmitTopBlock): Routine that drives the emission of
17071         code: it will first resolve the top block, then emit any metadata
17072         and then emit the code.  The split is done so that we can extract
17073         any anonymous methods and flag any captured variables/parameters.
17074         
17075         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
17076         during this phase, the ILGenerator should not be used as labels
17077         and local variables declared here might not be accessible to any
17078         code that is part of an anonymous method.  
17079
17080         Exceptions to this include the temporary variables that are
17081         created by some statements internally for holding temporary
17082         variables. 
17083         
17084         (EmitContext.EmitMeta): New routine, in charge of emitting all the
17085         metadata for a cb
17086
17087         (EmitContext.TemporaryReturn): This method is typically called
17088         from the Emit phase, and its the only place where we allow the
17089         ReturnLabel to be defined other than the EmitMeta.  The reason is
17090         that otherwise we would have to duplicate a lot of logic in the
17091         Resolve phases of various methods that today is on the Emit
17092         phase. 
17093
17094         (EmitContext.NeedReturnLabel): This no longer creates the label,
17095         as the ILGenerator is not valid during the resolve phase.
17096
17097         (EmitContext.EmitThis): Extended the knowledge in this class to
17098         work in anonymous methods in addition to iterators. 
17099
17100         (EmitContext.EmitCapturedVariableInstance): This emits whatever
17101         code is necessary on the stack to access the instance to a local
17102         variable (the variable will be accessed as a field).
17103
17104         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
17105         EmitContext.EmitAddressOfParameter): Routines to support
17106         parameters (not completed at this point). 
17107         
17108         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
17109         will also remove the parameters.
17110
17111         * convert.cs (Convert): Define a `ConstantEC' which points to a
17112         null.  This is just to prefity some code that uses
17113         ImplicitStandardConversion code and do not have an EmitContext
17114         handy.
17115
17116         The idea is to flag explicitly that at that point in time, it is
17117         known that the conversion will not trigger the delegate checking
17118         code in implicit conversions (which requires a valid
17119         EmitContext). 
17120
17121         Everywhere: pass new EmitContext parameter since
17122         ImplicitStandardConversionExists now requires it to check for
17123         anonymous method conversions. 
17124
17125         (Convert.ImplicitStandardConversionExists): If the type of an
17126         expression is the anonymous_method_type, and the type is a
17127         delegate, we invoke the AnonymousMethod.Compatible method to check
17128         whether an implicit conversion is possible. 
17129
17130         (Convert.ImplicitConversionStandard): Only do implicit method
17131         group conversions if the language level is not ISO_1.
17132
17133         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
17134         MethodInfo for the Invoke method.  used by Delegate and
17135         AnonymousDelegate.
17136
17137         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
17138         method conversions if the target type is a delegate.
17139
17140         Removed extra debugging nops.
17141
17142         (LocalVariableReference): Turn the `local_info' into a public
17143         field. 
17144
17145         Add `prepared' field, the same hack used for FieldExprs to cope
17146         with composed assignments, as Local variables do not necessarily
17147         operate purely on the stack as they used to: they can be captured
17148         fields. 
17149
17150         Add `temp' for a temporary result, like fields.
17151
17152         Refactor DoResolve and DoResolveLValue into DoResolveBase.
17153
17154         It now copes with Local variables that are captured and emits the
17155         proper instance variable to load it from a field in the captured
17156         case. 
17157
17158         (ParameterReference.DoResolveBase): During the resolve phase,
17159         capture parameters if we are in an anonymous method.
17160
17161         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
17162         anonymous method, use the EmitContext helper routines to emit the
17163         parameter reference.
17164
17165         * iterators.cs: Set RemapToProxy to true/false during the
17166         EmitDispose class.
17167
17168         * parameters.cs (GetParameterByName): New helper method. 
17169
17170         * typemanager.cs (anonymous_method_type) a new type that
17171         represents an anonyous method.  This is always an internal type,
17172         used as a fencepost to test against the anonymous-methodness of an
17173         expression. 
17174         
17175 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
17176
17177         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
17178         561 report.
17179         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
17180
17181 2004-10-18  Martin Baulig  <martin@ximian.com>
17182
17183         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
17184         `Type' directly, but call ResolveType() on it.
17185         (Catch.Resolve): Likewise.
17186         (Foreach.Resolve): Likewise.
17187
17188 2004-10-18  Martin Baulig  <martin@ximian.com>
17189
17190         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
17191         `Type' directly, but call ResolveType() on it.
17192         (Probe.DoResolve): Likewise.
17193         (ArrayCreation.LookupType): Likewise.
17194         (TypeOf.DoResolve): Likewise.
17195         (SizeOf.DoResolve): Likewise.
17196
17197 2004-10-18  Martin Baulig  <martin@ximian.com>
17198
17199         * expression.cs (Invocation.BetterFunction): Put back
17200         TypeManager.TypeToCoreType().
17201
17202 2004-10-18  Raja R Harinath  <rharinath@novell.com>
17203
17204         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
17205         the ResolveType.
17206
17207 2004-10-18  Martin Baulig  <martin@ximian.com>
17208
17209         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
17210         `Type' directly, but call ResolveType() on it.
17211
17212 2004-10-18  Martin Baulig  <martin@ximian.com>
17213
17214         * class.cs (FieldMember.Define): Don't access the TypeExpr's
17215         `Type' directly, but call ResolveType() on it.
17216         (MemberBase.DoDefine): Likewise.
17217
17218         * expression.cs (New.DoResolve): Don't access the TypeExpr's
17219         `Type' directly, but call ResolveType() on it.
17220         (ComposedCast.DoResolveAsTypeStep): Likewise.
17221
17222         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
17223         `Type' directly, but call ResolveType() on it.
17224
17225 2004-10-17  John Luke  <john.luke@gmail.com>
17226
17227         * class.cs (Operator.GetSignatureForError): use CSharpName
17228
17229         * parameter.cs (Parameter.GetSignatureForError): Returns
17230         correct name even if was not defined.
17231
17232 2004-10-13  Raja R Harinath  <rharinath@novell.com>
17233
17234         Fix #65816.
17235         * class.cs (TypeContainer.EmitContext): New property.
17236         (DefineNestedTypes): Create an emitcontext for each part.
17237         (MethodCore.DoDefineParameters): Use container's emitcontext.
17238         Pass type array to InternalParameters.
17239         (MemberBase.DoDefine): Use container's emitcontext.
17240         (FieldMember.Define): Likewise.
17241         (Event.Define): Likewise.
17242         (SetMethod.GetParameterInfo): Change argument to EmitContext.
17243         Pass type array to InternalParameters.
17244         (SetIndexerMethod.GetParameterInfo): Likewise.
17245         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
17246         * delegate.cs (Define): Pass emitcontext to
17247         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
17248         array to InternalParameters.
17249         * expression.cs (ParameterReference.DoResolveBase): Pass
17250         emitcontext to GetParameterInfo.
17251         (ComposedCast.DoResolveAsTypeStep): Remove check on
17252         ec.ResolvingTypeTree.
17253         * parameter.cs (Parameter.Resolve): Change argument to
17254         EmitContext.  Use ResolveAsTypeTerminal.
17255         (Parameter.GetSignature): Change argument to EmitContext.
17256         (Parameters.ComputeSignature): Likewise.
17257         (Parameters.ComputeParameterTypes): Likewise.
17258         (Parameters.GetParameterInfo): Likewise.
17259         (Parameters.ComputeAndDefineParameterTypes): Likewise.
17260         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
17261         * support.cs (InternalParameters..ctor): Remove variant that takes
17262         a DeclSpace.
17263         * typemanager.cs (system_intptr_expr): New.
17264         (InitExpressionTypes): Initialize it.
17265
17266 2004-10-12  Chris Toshok  <toshok@ximian.com>
17267
17268         * cs-parser.jay: fix location for try_statement and catch_clause.
17269
17270 2004-10-11  Martin Baulig  <martin@ximian.com>
17271
17272         * report.cs: Don't make --fatal abort on warnings, we have
17273         -warnaserror for that.
17274
17275 2004-10-07  Raja R Harinath  <rharinath@novell.com>
17276
17277         More DeclSpace.ResolveType avoidance.
17278         * decl.cs (MemberCore.InUnsafe): New property.
17279         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
17280         with newly created EmitContext.
17281         (FieldMember.Define): Likewise.
17282         * delegate.cs (Delegate.Define): Likewise.
17283         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
17284         only if normal name-lookup fails.
17285         (TypeExpr.DoResolve): Enable error-checking.
17286         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
17287         (SizeOf.DoResolve): Likewise.
17288         (ComposedCast.DoResolveAsTypeStep): Likewise.
17289         (StackAlloc.DoResolve): Likewise.
17290         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
17291         (Block.Unsafe): New property.
17292         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
17293         (Unsafe): Set 'unsafe' flag of contained block.
17294         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
17295         (Fixed.Resolve): Likewise.
17296         (Catch.Resolve): Likewise.
17297         (Using.ResolveLocalVariableDecls): Likewise.
17298         (Foreach.Resolve): Likewise.
17299
17300 2004-10-05  John Luke <john.luke@gmail.com>
17301
17302         * cs-parser.jay: add location to error CS0175
17303
17304 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
17305
17306         * ecore.cs (Expression.Constantity): Add support for turning null
17307         into a constant.
17308
17309         * const.cs (Const.Define): Allow constants to be reference types
17310         as long as the value is Null.
17311
17312 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
17313
17314         * namespace.cs (NamespaceEntry.Using): No matter which warning
17315         level is set, check if this namespace name has already been added.
17316
17317 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
17318
17319         * expression.cs: reftype [!=]= null should always use br[true,false].
17320         # 67410
17321
17322 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
17323
17324         Fix #67108
17325         * attribute.cs: Enum conversion moved to 
17326         GetAttributeArgumentExpression to be applied to the all
17327         expressions.
17328
17329 2004-10-01  Raja R Harinath  <rharinath@novell.com>
17330
17331         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
17332         * class.c (TypeContainer.DefineType): Flag error if
17333         base types aren't accessible due to access permissions.
17334         * decl.cs (DeclSpace.ResolveType): Move logic to
17335         Expression.ResolveAsTypeTerminal.
17336         (DeclSpace.ResolveTypeExpr): Thin layer over
17337         Expression.ResolveAsTypeTerminal.
17338         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
17339         Refactor code into NestedAccess.  Use it.
17340         (DeclSpace.NestedAccess): New.
17341         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
17342         argument to silence errors.  Check access permissions.
17343         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
17344         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
17345         (Cast.DoResolve): Likewise.
17346         (New.DoResolve): Likewise.
17347         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
17348         (TypeOf.DoResolve): Likewise.
17349
17350         * expression.cs (Invocation.BetterConversion): Return the Type of
17351         the better conversion.  Implement section 14.4.2.3 more faithfully.
17352         (Invocation.BetterFunction): Make boolean.  Make correspondence to
17353         section 14.4.2.2 explicit.
17354         (Invocation.OverloadResolve): Update.
17355         (Invocation): Remove is_base field.
17356         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
17357         (Invocation.Emit): Likewise.
17358
17359 2004-09-27  Raja R Harinath  <rharinath@novell.com>
17360
17361         * README: Update to changes.
17362
17363 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
17364
17365         * cs-parser.jay: Reverted 642 warning fix.
17366
17367 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17368
17369         Fix bug #66615
17370         * decl.cs (FindMemberWithSameName): Indexer can have more than
17371         1 argument.
17372
17373 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17374
17375         * expression.cs (LocalVariableReference.DoResolveLValue):
17376         Do not report warning 219 for out values.
17377         (EmptyExpression.Null): New member to avoid extra allocations.
17378
17379 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17380
17381         * cs-parser.jay: Fix wrong warning 642 report.
17382
17383         * cs-tokenizer.cs (CheckNextToken): New helper;
17384         Inspect next character if is same as expected.
17385
17386 2004-09-23  Martin Baulig  <martin@ximian.com>
17387
17388         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
17389         (Convert.ImplicitReferenceConversionExists): Likewise.
17390
17391 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17392
17393         * class.cs (Operator.Define): Add error 448 and 559 report.
17394
17395 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17396
17397         * class.cs (MemberBase.IsTypePermitted): New protected
17398         method for checking error CS0610.
17399
17400 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17401
17402         * class.cs (TypeContainer.HasExplicitLayout): New property
17403         Returns whether container has StructLayout attribute set Explicit.
17404         (FieldMember): New abstract class for consts and fields.
17405         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
17406         (Field): Reuse FieldMember.
17407
17408         * const.cs (Const): Reuse FieldMember.
17409
17410         * rootcontext.cs: EmitConstants call moved to class.
17411
17412 2004-09-22  Martin Baulig  <martin@ximian.com>
17413
17414         Thanks to Peter Sestoft for this bug report.
17415
17416         * expression.cs (Conditional): If both the `trueExpr' and the
17417         `falseExpr' is a NullLiteral, return a NullLiteral.
17418
17419 2004-09-22  Martin Baulig  <martin@ximian.com>
17420
17421         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17422         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17423         for the "get_Current" call.
17424
17425 2004-09-22  Martin Baulig  <martin@ximian.com>
17426
17427         Marek and me just fixed one of our oldest bugs: #28562 :-)
17428
17429         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17430
17431         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17432         we're an EnumConstant, just return that.
17433         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17434         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17435         to get the value which'll actually be written into the attribute.
17436         However, we have to use GetValue() to access the attribute's value
17437         in the compiler.        
17438
17439 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17440
17441         * constant.cs (Constant.IsNegative): New abstract property
17442         IsNegative.
17443
17444         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17445         (StackAlloc.DoResolve): Reused IsNegative.
17446
17447 2004-09-21  Martin Baulig  <martin@ximian.com>
17448
17449         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17450         if we're used in an iterator, we may be called from different
17451         methods.
17452
17453         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17454         we actually have an exception block.
17455
17456 2004-09-20  John Luke <jluke@cfl.rr.com>
17457
17458         * class.cs, cs-parser.jay: Improve the error report for 1520:
17459         report the actual line where the error happens, not where the
17460         class was declared.
17461
17462         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17463         Pass location information that was available elsewhere.
17464
17465 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17466
17467         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17468         runtime to delay sign assemblies.
17469
17470 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17471
17472         * cs-parser.jay: Do not report the stack trace, this is barely
17473         used nowadays.
17474
17475 2004-08-22  John Luke  <john.luke@gmail.com>
17476  
17477         * driver.cs : check that a resource id is not already used
17478         before adding it, report CS1508 if it is, bug #63637
17479
17480 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17481
17482         * ecore.cs: Removed dead code.
17483
17484 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17485
17486         * class.cs: Do not report warning CS0067 on the interfaces.
17487
17488 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17489
17490         * cs-parser.jay: Add error 504 report.
17491
17492 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17493
17494         * rootcontext.cs: WarningLevel is 4 by default now.
17495
17496         * statement.cs (Fixed.Resolve): Do not null
17497         VariableInfo.
17498
17499 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17500
17501         Fixed bug #55780
17502         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17503         deep search when property is not virtual.
17504         (PropertyExpr.ResolveAccessors): Make one call for both
17505         accessors.
17506
17507 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17508
17509         Fixed bug #65766
17510         * statement.cs: Error 152 report constains also location.
17511
17512 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17513
17514         Fixed bug #65766
17515         * const.cs: Explicitly set constant as static.
17516
17517 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17518
17519         Fixed bug #64226
17520         * cs-parser.jay: Add error 1017 report.
17521
17522 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17523
17524         Fixed bug #59980, #64224
17525         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17526
17527         * typemanager.cs (IsSpecialMethod): Simplified
17528
17529 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17530
17531         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17532         condition with better params.
17533
17534 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17535
17536         Fixed bug #65238
17537         * attribute.cs (Resolve): Property has to have both
17538         accessors.
17539
17540 2004-09-14  Martin Baulig  <martin@ximian.com>
17541
17542         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17543
17544 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17545
17546         Fixed bug #61902
17547         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17548         called and is obsolete then this member suppress message
17549         when call is inside next [Obsolete] method or type.
17550
17551         * expression.cs: Use TestObsoleteMethodUsage member.
17552
17553 2004-09-14  Martin Baulig  <martin@ximian.com>
17554
17555         * cs-parser.jay: Sync a bit with the GMCS version.
17556
17557 2004-09-14  Martin Baulig  <martin@ximian.com>
17558
17559         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17560         (CSharpParser.yacc_verbose_flag): New public field.
17561
17562         * genericparser.cs: Removed.
17563
17564 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17565
17566         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17567
17568 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17569
17570         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17571
17572 2004-09-10  Martin Baulig  <martin@ximian.com>
17573
17574         Backported my MemberName changes from GMCS into MCS.
17575
17576         - we are now using a special `MemberName' class instead of using
17577         strings; in GMCS, the `MemberName' also contains the type
17578         arguments.
17579
17580         - changed the grammar rules a bit:
17581           * the old `member_name' is now a `namespace_or_type_name':
17582             The rule is that we use `namespace_or_type_name' everywhere
17583             where we expect either a "member name" (GetEnumerator) or a
17584             "member name" with an explicit interface name
17585             (IEnumerable.GetEnumerator).
17586             In GMCS, the explicit interface name may include type arguments
17587             (IEnumerable<T>.GetEnumerator).
17588           * we use `member_name' instead of just `IDENTIFIER' for
17589             "member names":
17590             The rule is that we use `member_name' wherever a member may
17591             have type parameters in GMCS.       
17592
17593         * decl.cs (MemberName): New public class.
17594         (MemberCore.MemberName): New public readonly field.
17595         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17596         (DeclSpace): Likewise.
17597
17598         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17599         * enum.cs (Enum.ctor): Likewise.
17600
17601         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17602         MemberName.     
17603         (AliasEntry.ctor): Take a MemberName, not an Expression.
17604         (AliasEntry.UsingAlias): Likewise.
17605
17606         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17607         (IMethodData.MemberName): Changed type from string to MemberName.
17608         (MemberBase.ExplicitInterfaceName): Likewise.
17609         (AbstractPropertyEventMethod.SetupName): Make this private.
17610         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17611         argument; compute the member name here.
17612         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17613         on the `member.MemberName' and the `prefix'.
17614
17615         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17616         not `type_name'.
17617         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17618         thus, we get a `MemberName' instead of a `string'.  These
17619         declarations may have type parameters in GMCS.
17620         (interface_method_declaration, delegate_declaration): Likewise.
17621         (class_declaration, interface_declaration): Likewise.
17622         (method_header): Use `namespace_or_type_name' instead of
17623         `member_name'.  We may be an explicit interface implementation.
17624         (property_declaration, event_declaration): Likewise.
17625         (member_name): This is now just an `IDENTIFIER', not a
17626         `namespace_or_type_name'.
17627         (type_name, interface_type): Removed.
17628         (namespace_or_type_name): Return a MemberName, not an Expression.
17629         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17630         call GetTypeExpression() on the MemberName to get an expression.
17631         (IndexerDeclaration.interface_type): Changed type from string to
17632         MemberName.
17633         (MakeName): Operate on MemberName's instead of string's.
17634
17635 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17636
17637         Fix bug #55770.
17638         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17639         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17640         lookup to avoid symbols introduced by 'using'.
17641         * rootcontext.cs (NamespaceLookup): Update.
17642
17643 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17644
17645         * class.cs (TypeContainer.DoDefineMembers): Do not call
17646         DefineDefaultConstructor for static classes.
17647
17648 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17649
17650         * attribute.cs (Attribute.Resolve): Add error 653 report.
17651
17652         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17653         report.
17654         (Method.ApplyAttributeBuilder): Add error 685 report.
17655         (Operator.Define): Add error 564 report.
17656
17657         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17658
17659         * expression.cs (Invocation.DoResolve): Add error
17660         245 and 250 report.
17661
17662         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17663         error 674 report.
17664
17665 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17666
17667         * class.cs (ConstructorInitializer.Resolve):
17668         Wrong error number (515->516).
17669
17670 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17671
17672         * class.cs (Indexer.Define): Add error 631 report.
17673
17674 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17675
17676         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17677
17678 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17679
17680         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17681
17682 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17683
17684         * cs-parser.jay: Added error CS0241 report.
17685
17686 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17687
17688         * cs-parser.jay (fixed_statement): Introduce a scope for the
17689         declaration in the 'fixed' statement.
17690
17691 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17692
17693         * cs-parser.jay: Added CS0230 error report.
17694
17695 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17696
17697         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17698
17699 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17700
17701         * expression.cs (Argument.Resolve): Added error CS0192 and
17702         CS0199 report.
17703
17704 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17705
17706         C# 2.0 #pragma warning feature
17707
17708         * cs-tokenizer.cs (PreProcessPragma): New method; 
17709         Handles #pragma directive.
17710
17711         * report.cs (WarningRegions): New class; Support
17712         class for #pragma warning directive. It tests whether
17713         warning is enabled for a given line.
17714
17715 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17716
17717         * const.cs: Add more descriptive error report, tahnks to
17718         Sebastien. 
17719
17720 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17721
17722         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17723
17724 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17725
17726         * expression.cs: Apply patch from Ben: Remove dead code from
17727         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17728         as that code just threw an exception anwyays.
17729
17730         * const.cs: Remove the call to the turnintoconstant, for details
17731         see bug: #63144
17732         
17733         * literal.cs: The type of the null-literal is the null type;  So
17734         we use a placeholder type (literal.cs:System.Null, defined here)
17735         for it.
17736
17737         * expression.cs (Conditional.DoResolve): Remove some old code that
17738         is no longer needed, conversions have been fixed.
17739
17740         (ArrayCreationExpression.DoResolve): Return false if we fail to
17741         resolve the inner expression.
17742
17743 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17744
17745         Fix test-290.cs.
17746         * cs-parser.jay (delegate_declaration): Record a delegate
17747         declaration as a type declaration.
17748         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17749
17750 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17751
17752         * parameter.cs: Do not crash if the type can not be resolved. 
17753
17754         * expression.cs: Report errors with unsafe pointers, fixes #64896
17755
17756 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17757
17758         * expression.cs: Pointer arith always needs to do a conv.i
17759         if the operand is a long. fix 65320
17760
17761 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17762
17763         Fixed cs0619-37.cs, cs0619-38.cs
17764
17765         * enum.cs (GetObsoleteAttribute): Removed.
17766
17767         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17768         on Enum member is double staged. The first is tested member
17769         and then enum.
17770
17771 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17772
17773         Fixed #56986, #63631, #65231
17774
17775         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17776         adds member to name container.
17777         (TypeContainer.AddToTypeContainer): New method, adds type to
17778         name container.
17779         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17780         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17781         AddOperator): Simplified by reusing AddToMemberContainer.
17782         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17783         instead of field.
17784         (Method.CheckForDuplications): Fixed implementation to test all
17785         possibilities.
17786         (MemberBase): Detection whether member is explicit interface
17787         implementation is now in constructor.
17788         (MemberBase.UpdateMemberName): Handles IndexerName.
17789         (Accessor): Changed to keep also location information.
17790         (AbstractPropertyEventMethod): Is derived from MemberCore.
17791         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17792         will be emited or not.
17793         (PropertyBase.AreAccessorsDuplicateImplementation):
17794         Tests whether accessors are not in collision with some method.
17795         (Operator): Is derived from MethodCore to simplify common
17796         operations.
17797
17798         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17799         must be performed.
17800         (DeclSpace.AddToContainer): Adds the member to defined_names
17801         table. It tests for duplications and enclosing name conflicts.
17802
17803         * enum.cs (EnumMember): Clean up to reuse the base structures
17804
17805 2004-09-03  Martin Baulig  <martin@ximian.com>
17806
17807         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17808         into TypeContainer, to make partial classes work again.
17809
17810 2004-09-03  Martin Baulig  <martin@ximian.com>
17811
17812         * rootcontext.cs (RootContext.V2): Removed.
17813
17814 2004-03-23  Martin Baulig  <martin@ximian.com>
17815
17816         * expression.cs (Invocation.OverloadResolve): Added `bool
17817         may_fail' argument and use it instead of the Location.IsNull() hack.
17818
17819 2004-09-03  Martin Baulig  <martin@ximian.com>
17820
17821         Merged latest changes into gmcs.  Please keep this comment in
17822         here, it makes it easier for me to see what changed in MCS since
17823         the last time I merged.
17824
17825 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17826
17827         Fix #61128.
17828         * expression.cs (BetterConversion): Don't allow either conversion 
17829         to be null.  Remove redundant implicit conversion test when 'q ==
17830         null' -- when this function is invoked, we already know that the
17831         implicit conversion exists.
17832         (BetterFunction): Assume that 'best' is non-null.  Remove
17833         redundant reimplementation of IsApplicable when 'best' is null.
17834         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17835         number of arguments.
17836         (IsAncestralType): Extract from OverloadResolve.
17837         (OverloadResolve): Make robust to the MethodGroupExpr being
17838         unsorted.  Implement all the logic of Section 14.5.5.1, and
17839         support overloading of methods from multiple applicable types.
17840         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17841
17842         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17843         (RealError, Warning): Append type of report to related symbol.
17844
17845 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17846
17847         * enum.cs: Fixed CLS-Compliance checks for enum members.
17848         Error tests cs3008-8.cs, cs3014-8.cs
17849
17850 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17851
17852         Fixed bug #62342, #63102
17853         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17854         like ImplementMethod.
17855
17856 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17857
17858         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17859         Fixed bug #65170.
17860
17861 2004-09-02  Martin Baulig  <martin@ximian.com>
17862
17863         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17864         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17865         on the MethodBase.
17866
17867 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17868
17869         C# 2.0 Static classes implemented
17870
17871         * class.cs (TypeContainer): instance_constructors,
17872         initialized_fields, initialized_static_fields,
17873         default_constructor, base_inteface_types are protected to be
17874         accessible from StaticClass.
17875         (TypeContainer.DefineDefaultConstructor): New virtual method
17876         for custom default constructor generating
17877         (StaticClass): New class to handle "Static classes" feature.
17878
17879         * cs-parser.jay: Handle static keyword on class like instance
17880         of StaticClass.
17881
17882         * driver.cs: Added "/langversion" command line switch with two
17883         options (iso-1, default).
17884
17885 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17886
17887         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17888
17889 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17890
17891         * delegate.cs: Style.
17892
17893 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17894
17895         * delegate.cs: Add seperate instance expr field for miguel.
17896
17897 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17898
17899         * PointerArithmetic (Resolve): make sure we are not doing
17900         pointer arith on void*. Also, make sure we are resolved
17901         by not setting eclass until resolve.
17902
17903         All callers: Make sure that PointerArithmetic gets resolved.
17904
17905 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17906
17907         * ArrayCreation (LookupType): If the type does not resolve 
17908         to an array, give an error.
17909
17910 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17911
17912         * statement.cs (Try.Resolve): Fixed bug #64222
17913
17914 2004-08-27  Martin Baulig  <martin@ximian.com>
17915
17916         * class.cs
17917         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17918         crash here.     
17919
17920 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17921
17922         * ecore.cs (Constantify): Get underlying type via
17923         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17924         Windows in special cases.
17925
17926 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17927
17928         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17929         for obtaining also private methods.
17930         (GetRemoveMethod): Used GetRemoveMethod (true)
17931         for obtaining also private methods.
17932
17933 2004-08-24  Martin Baulig  <martin@ximian.com>
17934
17935         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17936         MethodAttributes.HideBySig for operators.
17937
17938 2004-08-23  Martin Baulig  <martin@ximian.com>
17939
17940         Back to the old error reporting system :-)
17941
17942         * report.cs (Message): Removed.
17943         (Report.MessageData, ErrorData, WarningData): Removed.
17944         (Report.Error, Warning): Back to the old system.
17945
17946 2004-08-23  Martin Baulig  <martin@ximian.com>
17947
17948         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17949
17950         * class.cs (TypeContainer.ParentContainer): New public virtual
17951         method; replaces the explicit interface implementation.
17952         (ClassPart.ParentContainer): Override.
17953
17954 2004-08-23  Martin Baulig  <martin@ximian.com>
17955
17956         * statement.cs (Switch): Added support for constant switches; see
17957         #59428 or test-285.cs.
17958
17959 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17960
17961         Fixed bug #62740.
17962         * statement.cs (GetEnumeratorFilter): Removed useless
17963         logic because C# specs is strict. GetEnumerator must be
17964         public.
17965
17966 2004-08-22  Martin Baulig  <martin@ximian.com>
17967
17968         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17969         a switch and may break, reset the barrier.  Fixes #59867.
17970
17971 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17972
17973         CLS-Compliance speed up (~5% for corlib)
17974
17975         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17976         New method. Tests container for CLS-Compliant names
17977
17978         * class.cs (TypeContainer.VerifyClsName): New method.
17979         Checks whether container name is CLS Compliant.
17980         (Constructor): Implements IMethodData.
17981
17982         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17983         low-case table for CLS Compliance test.
17984         (MemberCache.VerifyClsParameterConflict): New method.
17985         Checks method parameters for CS3006 error.
17986
17987         * enum.cs (EnumMember): Is derived from MemberCore.
17988         (Enum.VerifyClsName): Optimized for better performance.
17989
17990 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17991
17992         * report.cs: Renamed Error_T to Error and changed all
17993         references.
17994
17995 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17996
17997         * class.cs (TypeContainer.IndexerArrayList): New inner class
17998         container for indexers.
17999         (TypeContainer.DefaultIndexerName): New constant for default
18000         indexer name. Replaced all "Item" with this constant.
18001         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
18002
18003         * typemanager.cs (TypeManager.default_member_ctor): Cache here
18004         DefaultMemberAttribute constructor.
18005
18006 2004-08-05  Martin Baulig  <martin@ximian.com>
18007
18008         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
18009         Fix bug #59429.
18010
18011 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
18012
18013         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
18014         multi platforms problem.
18015
18016         * compiler.csproj: Included shared files.
18017
18018 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
18019
18020         Fix bug 60333, 55971 in the more general way
18021         * attribute.cs (Attribute.GetAttributeArgumentExpression):
18022         Added arg_type argument for constant conversion.
18023         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
18024
18025 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
18026
18027         Fix bug #59760
18028         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
18029         OperatorArrayList, MethodCoreArrayList for typecontainer
18030         containers. Changed class member types to these new types.
18031         (MethodArrayList.DefineMembers): Added test for CS0659.
18032
18033 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
18034
18035         * cfold.cs: Synchronize the folding with the code in expression.cs
18036         Binary.DoNumericPromotions for uint operands.
18037
18038         * attribute.cs: Revert patch from Raja, it introduced a regression
18039         while building Blam-1.2.1 (hard to isolate a test case).
18040
18041 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
18042
18043         Fix for #55382
18044         * class.cs:
18045         (TypeContainer.Define): Renamed to DefineContainerMembers because of
18046         name collision.
18047         (MethodCore.parent_method): New member. The method we're overriding
18048         if this is an override method.
18049         (MethodCore.CheckBase): Moved from Method class and made common.
18050         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
18051         private.
18052         (MethodCore.CheckForDuplications): New abstract method. For custom
18053         member duplication search in a container
18054         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
18055         method and its return type.
18056         (Event.conflict_symbol): New member. Symbol with same name in the
18057         parent class.
18058
18059         * decl.cs:
18060         (MemberCache.FindMemberWithSameName): New method. The method
18061         is looking for conflict with inherited symbols.
18062
18063 2004-08-04  Martin Baulig  <martin@ximian.com>
18064
18065         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
18066
18067         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
18068
18069 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
18070
18071         * report.cs (Message): New enum for better error, warning reference in
18072         the code.
18073         (MessageData): New inner abstract class. It generally handles printing of
18074         error and warning messages.
18075         Removed unused Error, Warning, Message methods.
18076
18077 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
18078
18079         Fix for cs0592-8.cs test
18080         * attribute.cs
18081         (Attributable.ValidAttributeTargets): Made public.
18082         (Attribute.ExplicitTarget): New member for explicit target value.
18083         (Attribute.CheckTargets): Now we translate explicit attribute
18084         target to Target here.
18085
18086 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
18087
18088         * ecore.cs (MethodGroupExpr): new IsBase property.
18089
18090         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
18091
18092         * delegate.cs (DelegateCreation): store a MethodGroupExpr
18093         rather than an instance expr.
18094
18095         (DelegateCreation.Emit): Use the method group rather than
18096         the instance expression. Also, if you have base.Foo as the
18097         method for a delegate, make sure to emit ldftn, not ldftnvirt.
18098
18099         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
18100
18101         (NewDelegate.DoResolve): Only check for the existance of Invoke
18102         if the method is going to be needed. Use MethodGroupExpr.
18103
18104         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
18105
18106         * expression.cs: For pointer arith., make sure to use
18107         the size of the type, not the size of the pointer to
18108         the type.
18109
18110 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
18111
18112         Fix for #60722
18113         * class.cs (Class): Added error CS0502 test.
18114
18115 2004-08-03  John Luke  <jluke@cfl.rr.com>
18116             Raja R Harinath  <rharinath@novell.com>
18117
18118         Fix for #60997.
18119         * attribute.cs (Attribute.complained_before): New flag.
18120         (Attribute.ResolveType, Attribute.Resolve),
18121         (Attribute.DefinePInvokeMethod): Set it.
18122         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
18123         
18124 2004-08-03  Martin Baulig  <martin@ximian.com>
18125
18126         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
18127         use a user-defined operator; we still need to do numeric
18128         promotions in case one argument is a builtin type and the other
18129         one has an implicit conversion to that type.  Fixes #62322.
18130
18131 2004-08-02  Martin Baulig  <martin@ximian.com>
18132
18133         * statement.cs (LocalInfo.Flags): Added `IsThis'.
18134         (LocalInfo.IsThis): New public property.
18135         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
18136
18137 2004-08-01  Martin Baulig  <martin@ximian.com>
18138
18139         * class.cs (TypeContainer.GetClassBases): Don't set the default
18140         here since we may get called from GetPartialBases().
18141         (TypeContainer.DefineType): If GetClassBases() didn't return a
18142         parent, use the default one.
18143
18144 2004-07-30  Duncan Mak  <duncan@ximian.com>
18145
18146         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
18147
18148 2004-07-30  Martin Baulig  <martin@ximian.com>
18149
18150         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
18151
18152         * class.cs (SourceMethod): New public class, derive from the
18153         symbol writer's ISourceMethod.
18154         (Method): Use the new symbol writer API.
18155
18156         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
18157         as argument and use the new symbol writer.
18158
18159         * location.cs
18160         (SourceFile): Implement the symbol writer's ISourceFile.
18161         (Location.SymbolDocument): Removed.
18162         (Location.SourceFile): New public property.
18163
18164         * symbolwriter.cs: Use the new symbol writer API.
18165
18166 2004-07-30  Raja R Harinath  <rharinath@novell.com>
18167
18168         * Makefile (install-local): Remove.  Functionality moved to
18169         executable.make.
18170
18171 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
18172
18173         * Makefile: Install mcs.exe.config file together with mcs.exe.
18174         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
18175         correct runtime version.
18176         
18177 2004-07-25  Martin Baulig  <martin@ximian.com>
18178
18179         * class.cs
18180         (TypeContainer.RegisterOrder): Removed, this was unused.
18181         (TypeContainer, interface_order): Removed.
18182         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
18183         TypeContainer as argument since we can also be called with a
18184         `PartialContainer' for a partial class/struct/interface.
18185         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
18186         of checking whether we're an `Interface' - we could be a
18187         `PartialContainer'.
18188         (PartialContainer.Register): Override; call
18189         AddClass()/AddStruct()/AddInterface() on our parent.
18190
18191         * cs-parser.jay (interface_member_declaration): Add things to the
18192         `current_container', not the `current_class'.
18193
18194         * rootcontext.cs (RegisterOrder): The overloaded version which
18195         takes an `Interface' was unused, removed.
18196
18197         * typemanager.cs (TypeManager.LookupInterface): Return a
18198         `TypeContainer', not an `Interface'.
18199         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
18200         contain a `PartialContainer' for an interface, so check it's
18201         `Kind' to figure out what it is.
18202
18203 2004-07-25  Martin Baulig  <martin@ximian.com>
18204
18205         * class.cs (Class.DefaultTypeAttributes): New public constant.
18206         (Struct.DefaultTypeAttributes): Likewise.
18207         (Interface.DefaultTypeAttributes): Likewise.
18208         (PartialContainer.TypeAttr): Override this and add the
18209         DefaultTypeAttributes.
18210
18211 2004-07-25  Martin Baulig  <martin@ximian.com>
18212
18213         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
18214         we can just use the `Parent' field instead.
18215
18216 2004-07-25  Martin Baulig  <martin@ximian.com>
18217
18218         * class.cs (TypeContainer.Emit): Renamed to EmitType().
18219
18220 2004-07-25  Martin Baulig  <martin@ximian.com>
18221
18222         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
18223         our parts before defining any methods.
18224         (TypeContainer.VerifyImplements): Make this virtual.
18225         (ClassPart.VerifyImplements): Override and call VerifyImplements()
18226         on our PartialContainer.
18227
18228 2004-07-25  Martin Baulig  <martin@ximian.com>
18229
18230         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
18231
18232         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
18233         argument, we can just use the `Parent' field instead.
18234
18235         * class.cs
18236         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
18237         (MemberBase.DoDefine): Likewise.
18238
18239 2004-07-24  Martin Baulig  <martin@ximian.com>
18240
18241         * decl.cs (MemberCore.Parent): New public field.
18242         (DeclSpace.Parent): Moved to MemberCore.
18243
18244         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
18245         (MemberBase.ctor): Added TypeContainer argument, pass it to our
18246         parent's .ctor.
18247         (FieldBase, Field, Operator): Likewise.
18248         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
18249         (EventField, Event): Likewise.
18250
18251 2004-07-23  Martin Baulig  <martin@ximian.com>
18252
18253         * class.cs (PartialContainer): New public class.
18254         (ClassPart): New public class.
18255         (TypeContainer): Added support for partial classes.
18256         (TypeContainer.GetClassBases): Splitted some of the functionality
18257         out into GetNormalBases() and GetPartialBases().
18258
18259         * cs-tokenizer.cs (Token.PARTIAL): New token.
18260         (Tokenizer.consume_identifier): Added some hacks to recognize
18261         `partial', but only if it's immediately followed by `class',
18262         `struct' or `interface'.
18263
18264         * cs-parser.jay: Added support for partial clases.
18265
18266 2004-07-23  Martin Baulig  <martin@ximian.com>
18267
18268         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
18269         a `DeclSpace' and also made it readonly.
18270         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
18271         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
18272         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
18273
18274         * cs-parser.jay: Pass the `current_class', not the
18275         `current_container' (at the moment, this is still the same thing)
18276         to a new Method, Property, Event, Indexer or Constructor.
18277
18278 2004-07-23  Martin Baulig  <martin@ximian.com>
18279
18280         * cs-parser.jay (CSharpParser): Added a new `current_class' field
18281         and removed the `current_interface' one.
18282         (struct_declaration, class_declaration, interface_declaration):
18283         Set `current_class' to the newly created class/struct/interface;
18284         set their `Bases' and call Register() before parsing their body.
18285
18286 2004-07-23  Martin Baulig  <martin@ximian.com>
18287
18288         * class.cs (Kind): New public enum.
18289         (TypeContainer): Made this class abstract.
18290         (TypeContainer.Kind): New public readonly field.
18291         (TypeContainer.CheckDef): New public method; moved here from
18292         cs-parser.jay.
18293         (TypeContainer.Register): New public abstract method.
18294         (TypeContainer.GetPendingImplementations): New public abstract
18295         method.
18296         (TypeContainer.GetClassBases): Removed the `is_class' and
18297         `is_iface' parameters.
18298         (TypeContainer.DefineNestedTypes): Formerly known as
18299         DoDefineType().
18300         (ClassOrStruct): Made this class abstract.
18301
18302         * tree.cs (RootTypes): New public type. 
18303
18304 2004-07-20  Martin Baulig  <martin@ximian.com>
18305
18306         * tree.cs (Tree.RecordNamespace): Removed.
18307         (Tree.Namespaces): Removed.
18308
18309         * rootcontext.cs (RootContext.IsNamespace): Removed.
18310
18311         * cs-parser.jay (namespace_declaration): Just create a new
18312         NamespaceEntry here.
18313
18314 2004-07-20  Martin Baulig  <martin@ximian.com>
18315
18316         * statement.cs (ExceptionStatement): New abstract class.  This is
18317         now used as a base class for everyone who's using `finally'.
18318         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
18319         our local variables before using them.
18320
18321         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
18322         virtual method.  This is used by Yield.Resolve() to "steal" an
18323         outer block's `finally' clauses.
18324         (FlowBranchingException): The .ctor now takes an ExceptionStatement
18325         argument.
18326
18327         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
18328         version which takes an ExceptionStatement.  This version must be
18329         used to create exception branchings.
18330
18331         * iterator.cs
18332         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
18333         (Iterator.EmitMoveNext): Added exception support; protect the
18334         block with a `fault' clause, properly handle 'finally' clauses.
18335         (Iterator.EmitDispose): Run all the `finally' clauses here.
18336
18337 2004-07-20  Martin Baulig  <martin@ximian.com>
18338
18339         * iterator.cs: This is the first of a set of changes in the
18340         iterator code.  Match the spec more closely: if we're an
18341         IEnumerable, then GetEnumerator() must be called.  The first time
18342         GetEnumerator() is called, it returns the current instance; all
18343         subsequent invocations (if any) must create a copy.
18344
18345 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
18346
18347         * expression.cs: Resolve the constant expression before returning
18348         it. 
18349
18350 2004-07-19  Martin Baulig  <martin@ximian.com>
18351
18352         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
18353         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
18354         the return type of the new EmitContext.
18355
18356 2004-07-18  Martin Baulig  <martin@ximian.com>
18357
18358         * class.cs (Property.Define): Fix iterators.
18359
18360         * iterators.cs (Iterator.Define): Moved the
18361         `container.AddInterator (this)' call here from the .ctor; only do
18362         it if we resolved successfully.
18363
18364 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
18365
18366         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
18367         `true' for preprocessing directives that we parse.  The return
18368         value indicates whether we should return to regular tokenizing or
18369         not, not whether it was parsed successfully.
18370
18371         In the past if we were in: #if false ... #line #endif, we would
18372         resume parsing after `#line'.  See bug 61604.
18373
18374         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
18375         building: IsEnumType should return true only for enums, not for
18376         enums or System.Enum itself.  This fixes #61593.
18377
18378         Likely what happened is that corlib was wrong: mcs depended on
18379         this bug in some places.  The bug got fixed, we had to add the
18380         hack, which caused bug 61593.
18381
18382         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
18383         that was a workaround for the older conditions.
18384
18385 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
18386
18387         * assign.cs: IAssignMethod has a new interface, as documented
18388         inline. All assignment code now uses this new api.
18389
18390         * ecore.cs, expression.cs: All classes which implement
18391         IAssignMethod now use the new interface.
18392
18393         * expression.cs (Invocation): add a hack to EmitCall so that
18394         IndexerAccess can be the target of a compound assignment without
18395         evaluating its arguments twice.
18396
18397         * statement.cs: Handle changes in Invocation api.
18398
18399 2004-07-16  Martin Baulig  <martin@ximian.com>
18400
18401         * iterators.cs: Rewrote this.  We're now using one single Proxy
18402         class for both the IEnumerable and the IEnumerator interface and
18403         `Iterator' derives from Class so we can use the high-level API.
18404
18405         * class.cs (TypeContainer.AddIterator): New method.
18406         (TypeContainer.DoDefineType): New protected virtual method, which
18407         is called from DefineType().
18408         (TypeContainer.DoDefineMembers): Call DefineType() and
18409         DefineMembers() on all our iterators.
18410         (TypeContainer.Emit): Call Emit() on all our iterators.
18411         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18412
18413         * codegen.cs (EmitContext.CurrentIterator): New public field.
18414
18415 2004-07-15  Martin Baulig  <martin@ximian.com>
18416
18417         * typemanager.cs
18418         (TypeManager.not_supported_exception_type): New type.   
18419
18420 2004-07-14  Martin Baulig  <martin@ximian.com>
18421
18422         * iterators.cs: Use real error numbers.
18423
18424 2004-07-14  Martin Baulig  <martin@ximian.com>
18425
18426         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18427         requires this to be a System.Collection.IEnumerable and not a
18428         class implementing that interface.
18429         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18430
18431 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18432
18433         * class.cs: Fixed previous fix, it broke some error tests.
18434
18435 2004-07-12  Martin Baulig  <martin@ximian.com>
18436
18437         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18438         Fixes #61293.
18439
18440 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18441
18442         * assign.cs (LocalTemporary): Add new argument: is_address,If
18443         `is_address' is true, then the value that we store is the address
18444         to the real value, and not the value itself.
18445         
18446         * ecore.cs (PropertyExpr): use the new local temporary
18447         stuff to allow us to handle X.Y += z (where X is a struct)
18448
18449 2004-07-08  Martin Baulig  <martin@ximian.com>
18450
18451         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18452         not always return, just like we're doing in Using.Resolve().
18453
18454 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18455
18456         * cs-parser.jay (fixed_statement): flag this as Pinned.
18457
18458 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18459
18460         * typemanager.cs (TypeManager): Removed MakePinned method, this
18461         mechanism is replaced with the .NET 2.x compatible mechanism of
18462         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18463
18464         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18465         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18466         `IsFixed' property which has a different meaning.
18467
18468 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18469
18470         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18471         visible from inside a nested class, not just the names of the
18472         immediately enclosing class.
18473         Fix for bug #60730.
18474
18475 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18476
18477         * expression.cs (BetterConversion): Remove buggy special-case
18478         handling of "implicit constant expression conversions".  At this
18479         point, we already know that the conversion is possible -- we're
18480         only checking to see which is better.
18481
18482 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18483
18484         * cs-parser.jay: Added error CS0210 test.
18485
18486 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18487
18488         * cs-parser.jay: Added error CS0134 test.
18489
18490 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18491
18492         Fix bug #52507
18493         * cs-parser.jay: Added error CS0145 test.
18494
18495 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18496
18497         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18498
18499 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18500         
18501         * expression.cs (StackAlloc.Resolve): The argument may not
18502         be a constant; deal with this case.
18503         
18504 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18505
18506         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18507         GetIndexerAttributeValue.
18508         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18509
18510         * class.cs (Indexer.Define): Added error tests for CS0415,
18511         CS0609.
18512
18513 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18514
18515         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18516         property code.
18517
18518 2004-06-23  Martin Baulig  <martin@ximian.com>
18519
18520         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18521         neither return nor throw, reset the barrier as well.  Fixes #60457.
18522
18523 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18524
18525         * class.cs : EventAttributes is now set to None by default.
18526           This fixes bug #60459.
18527
18528 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18529
18530         Fix bug #60219
18531         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18532         Don't throw exception but return null (it's sufficient now).
18533
18534 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18535
18536         * typemanager.cs (GetArgumentTypes): Faster implementation.
18537
18538 2004-06-18  Martin Baulig  <martin@ximian.com>
18539
18540         * attribute.cs (Attribute.Resolve): Check whether we're an
18541         EmptyCast which a Constant child.  Fixes #60333.
18542
18543 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18544
18545         * statement.cs (EmitCollectionForeach): Account for the fact that
18546         not all valuetypes are in areas which we can take the address of.
18547         For these variables, we store to a temporary variable. Also, make
18548         sure that we dont emit a `callvirt' on a valuetype method.
18549
18550 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18551
18552         * expression.cs (StackAlloc.DoReSolve): Added test for
18553         negative parameter (CS0247).
18554
18555 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18556
18557         Fix bug #59792
18558         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18559
18560 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18561
18562         Fix bug #59781
18563         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18564         ulong.
18565
18566 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18567
18568         Fix bug #58254 & cs1555.cs, cs1556.cs
18569         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18570
18571 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18572
18573         * cs-parser.jay: Added error CS1669 test for indexers.
18574
18575 2004-06-11  Martin Baulig  <martin@ximian.com>
18576
18577         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18578         call this twice: for params and varargs methods.
18579
18580 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18581
18582         * class.cs:
18583         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18584
18585 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18586
18587         * attribute.cs (Attribute.GetValidTargets): Made public.
18588
18589         * class.cs: 
18590         (AbstractPropertyEventMethod): New class for better code sharing.
18591         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18592         CS1667 report.
18593         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18594
18595 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18596
18597         Fix bug #59477.
18598         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18599         that the call to Resolve is part of a MemberAccess.
18600         (Expression.Resolve): Use it for SimpleName resolution.
18601         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18602         Add 'intermediate' boolean argument.
18603         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18604         error message when the SimpleName can be resolved ambiguously
18605         between an expression and a type.
18606         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18607         public.
18608         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18609         call on the left-side.
18610
18611 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18612
18613         * class.cs:
18614         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18615
18616 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18617
18618         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18619
18620 2004-06-11  Martin Baulig  <martin@ximian.com>
18621
18622         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18623         varargs methods if applicable.
18624
18625 2004-06-11  Martin Baulig  <martin@ximian.com>
18626
18627         * expression.cs (Invocation.EmitCall): Don't use
18628         `method.CallingConvention == CallingConventions.VarArgs' since the
18629         method could also have `CallingConventions.HasThis'.
18630
18631 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18632
18633         * class.cs (Event.GetSignatureForError): Implemented.
18634         Fixed crash in error test cs3010.cs
18635
18636 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18637
18638         * cs-tokenizer.cs: Change the way we track __arglist to be
18639         consistent with the other keywords.
18640
18641 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18642
18643         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18644         tomorrow.
18645
18646 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18647
18648         * codegen.cs: Check that all referenced assemblies have a strongname
18649         before strongnaming the compiled assembly. If not report error CS1577.
18650         Fix bug #56563. Patch by Jackson Harper.
18651         * typemanager.cs: Added a method to return all referenced assemblies.
18652         Fix bug #56563. Patch by Jackson Harper.
18653
18654 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18655
18656         * class.cs:
18657         (Method.ApplyAttributeBuilder): Moved and added conditional
18658         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18659
18660         * delegate.cs:
18661         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18662
18663 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18664
18665         Fixed #59640
18666         * class.cs: (EventField.attribute_targets): Changed default target.
18667
18668 2004-06-08  Martin Baulig  <martin@ximian.com>
18669
18670         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18671
18672 2004-06-08  Martin Baulig  <martin@ximian.com>
18673
18674         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18675
18676 2004-06-07  Martin Baulig  <martin@ximian.com>
18677
18678         Added support for varargs methods.
18679
18680         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18681         keyword.
18682
18683         * cs-parser.jay: Added support for `__arglist'.
18684
18685         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18686
18687         * expression.cs (Argument.AType): Added `ArgList'.
18688         (Invocation): Added support for varargs methods.
18689         (ArglistAccess): New public class.
18690         (Arglist): New public class.
18691
18692         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18693
18694         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18695         a method's top-level block if the method has varargs.
18696
18697         * support.cs (ReflectionParameters, InternalParameters): Added
18698         support for varargs methods.    
18699
18700 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18701
18702         * class.cs: Provide location in indexer error report.
18703
18704         * driver.cs: Use standard names.
18705
18706         * namespace.cs: Catch the use of using after a namespace has been
18707         declared also on using aliases.
18708
18709 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18710
18711         Bug #50820.
18712         * typemanager.cs (closure_private_ok, closure_invocation_type)
18713         (closure_qualifier_type, closure_invocation_assembly)
18714         (FilterWithClosure): Move to ...
18715         (Closure): New internal nested class.
18716         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18717         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18718         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18719         (MemberLookup, MemberLookupFailed): Use it.
18720         * expression.cs (New.DoResolve): Treat the lookup for the
18721         constructor as being qualified by the 'new'ed type.
18722         (Indexers.GetIndexersForTypeOrInterface): Update.
18723
18724 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18725
18726         * attribute.cs
18727         (GetConditionalAttributeValue): New method. Returns
18728         condition of ConditionalAttribute.
18729         (SearchMulti): New method.  Returns all attributes of type 't'.
18730         Use it when attribute is AllowMultiple = true.
18731         (IsConditionalMethodExcluded): New method.
18732
18733         * class.cs
18734         (Method.IsExcluded): Implemented. Returns true if method has conditional
18735         attribute and the conditions is not defined (method is excluded).
18736         (IMethodData): Extended interface for ConditionalAttribute support.
18737         (PropertyMethod.IsExcluded): Implemented.
18738
18739         * decl.cs
18740         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18741
18742         * expression.cs
18743         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18744         on the method.
18745
18746 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18747
18748         * expression.cs (ArrayCreationExpression): Make this just an
18749         `expression'. It can't be a statement, so the code here was
18750         dead.
18751
18752 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18753
18754         Fixed #59072
18755         * typemanager.cs (GetFullNameSignature): New method for
18756         MethodBase types.
18757
18758 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18759
18760         Fixed #56452
18761         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18762         Use this method when MethodBuilder is null.
18763         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18764         Added test for error CS0626 (MONO reports error for this situation).
18765         (IMethodData.GetSignatureForError): Extended interface.
18766
18767 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18768
18769         * attribute.cs
18770         (AttributeTester.GetObsoleteAttribute): Returns instance of
18771         ObsoleteAttribute when type is obsolete.
18772
18773         * class.cs
18774         (TypeContainer.VerifyObsoleteAttribute): Override.
18775         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18776         (MethodCode.VerifyObsoleteAttribute): Override.
18777         (MemberBase.VerifyObsoleteAttribute): Override.
18778
18779         * decl.cs
18780         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18781         and report proper error.
18782
18783         *delegate.cs
18784         Delegate.VerifyObsoleteAttribute): Override.
18785
18786         * ecore.cs
18787         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18788         and report proper error.
18789         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18790
18791         * enum.cs
18792         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18793         and enum member.
18794
18795         * expression.cs
18796         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18797         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18798         Added test for ObsoleteAttribute.
18799
18800         * statement.cs
18801         (Catch): Derived from Statement.
18802
18803 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18804  
18805         Fixed bug #59071 & cs0160.cs
18806  
18807         * statement.cs (Try.Resolve): Check here whether order of catch
18808         clauses matches their dependencies.
18809
18810 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18811
18812         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18813         caused a regression: #59343.  Referencing nested classes from an
18814         assembly stopped working.
18815
18816 2004-05-31  Martin Baulig  <martin@ximian.com>
18817
18818         MCS is now frozen for beta 2.
18819
18820 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18821
18822         * convert.cs: add a trivial cache for overload operator resolution.
18823
18824 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18825
18826         * decl.cs: If possible, use lookuptypedirect here. We can only do
18827         this if there is no `.' after the namespace. Avoids using
18828         LookupType, which does lots of slow processing.
18829         (FindNestedType) New method, does what it says :-).
18830         * namespace.cs: use LookupTypeDirect.
18831         * rootcontext.cs: use membercache, if possible.
18832         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18833
18834 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18835
18836         * expression.cs:
18837         According to the spec, 
18838
18839         In a member access of the form E.I, if E is a single identifier,
18840         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18841         field, property, localvariable, or parameter with the same type as
18842         the meaning of E as a type-name (§3.8), then both possible
18843         meanings of E are permitted.
18844
18845         We did not check that E as a simple-name had the same type as E as
18846         a type name.
18847
18848         This trivial check gives us 5-7% on bootstrap time.
18849
18850 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18851
18852         * expression.cs (Invocation.OverloadResolve): Avoid the
18853         use of hashtables and boxing here by allocating on demand.
18854
18855 2004-05-30  Martin Baulig  <martin@ximian.com>
18856
18857         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18858         we're doing a silent lookup.  Don't try to lookup nested types in
18859         TypeManager.object_type (thanks to Ben Maurer).
18860
18861 2004-05-30  Martin Baulig  <martin@ximian.com>
18862
18863         Committing a patch from Ben Maurer.
18864
18865         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18866
18867 2004-05-29  Martin Baulig  <martin@ximian.com>
18868
18869         * class.cs (IMethodData.ShouldIgnore): New method.
18870
18871         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18872         `Location' argument, we don't need it anywhere.  Use
18873         `IMethodData.ShouldIgnore ()' instead of
18874         `MethodData.GetMethodFlags ()'.
18875         (TypeManager.AddMethod): Removed.
18876         (TypeManager.AddMethod2): Renamed to AddMethod.
18877
18878 2004-05-29  Martin Baulig  <martin@ximian.com>
18879
18880         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18881
18882         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18883         converting from a class type S to an interface type and we already
18884         have an object on the stack, don't box it again.  Fixes #52578.
18885
18886 2004-05-29  Martin Baulig  <martin@ximian.com>
18887
18888         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18889         Added support for `params' parameters.  Fixes #59267.
18890
18891 2004-05-29  Martin Baulig  <martin@ximian.com>
18892
18893         * literal.cs (NullPointer): Provide a private .ctor which sets
18894         `type' to TypeManager.object_type.  Fixes #59048.
18895
18896 2004-05-29  Martin Baulig  <martin@ximian.com>
18897
18898         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18899         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18900
18901         * ecore.cs (EventExpr.instance_expr): Make the field private.
18902
18903 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18904
18905         Fixed bug #50080 & cs0214-2.cs
18906         * expression.cs (Cast.DoResolve): Check unsafe context here.
18907         
18908         * statement.cs (Resolve.DoResolve): Likewise.
18909
18910 2004-05-26  Martin Baulig  <martin@ximian.com>
18911
18912         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18913
18914         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18915         (RootContext.LookupType): Pass down the `silent' flag.
18916
18917 2004-05-25  Martin Baulig  <martin@ximian.com>
18918
18919         * expression.cs
18920         (MethodGroupExpr.IdenticalTypeName): New public property.
18921         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18922         expression actually refers to a type.
18923
18924 2004-05-25  Martin Baulig  <martin@ximian.com>
18925
18926         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18927         for #56176 and made it actually work.
18928
18929 2004-05-25  Martin Baulig  <martin@ximian.com>
18930
18931         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18932         (FieldExpr, PropertyExpr): Override and implement
18933         CacheTemporaries.  Fixes #52279.
18934
18935 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18936
18937         * location.cs: In the new compiler listing a file twice is a
18938         warning, not an error.
18939
18940 2004-05-24  Martin Baulig  <martin@ximian.com>
18941
18942         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18943         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18944
18945 2004-05-24  Martin Baulig  <martin@ximian.com>
18946
18947         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18948         walking the `using' list.  Fixes #53921.
18949
18950 2004-05-24  Martin Baulig  <martin@ximian.com>
18951
18952         * const.cs (Const.LookupConstantValue): Added support for
18953         EmptyCast's; fixes #55251.
18954
18955 2004-05-24  Martin Baulig  <martin@ximian.com>
18956
18957         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18958         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18959         which does the CS0135 check.  The reason is that we first need to
18960         check whether the variable actually exists.
18961
18962 2004-05-24  Martin Baulig  <martin@ximian.com>
18963
18964         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18965         than RootContext.LookupType() to find the explicit interface
18966         type.  Fixes #58584.
18967
18968 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18969
18970         * Makefile: Simplify.  Use executable.make.
18971         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18972
18973 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18974
18975         * decl.cs:
18976         * enum.cs:
18977         Use the invariant culture when doing String.Compare for CLS case
18978         sensitivity.
18979         
18980 2004-05-23  Martin Baulig  <martin@ximian.com>
18981
18982         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18983         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18984
18985         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18986         
18987 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18988
18989         * class.cs (MemberBase.Define): Reuse MemberType member for 
18990         resolved type. Other methods can use it too.
18991
18992 2004-05-23  Martin Baulig  <martin@ximian.com>
18993
18994         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18995         the variable also exists in the current block (otherwise, we need
18996         to report a CS0103).  Fixes #58670.
18997
18998 2004-05-23  Martin Baulig  <martin@ximian.com>
18999
19000         * flowanalysis.cs (Reachability.Reachable): Compute this
19001         on-the-fly rather than storing it as a field.
19002
19003 2004-05-23  Martin Baulig  <martin@ximian.com>
19004
19005         * flowanalysis.cs (Reachability.And): Manually compute the
19006         resulting `barrier' from the reachability.      
19007        
19008 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
19009
19010         Fix bug #57835
19011         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
19012         instance of ObsoleteAttribute when symbol is obsolete.
19013
19014         * class.cs
19015         (IMethodData): Extended interface for ObsoleteAttribute support.
19016
19017 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
19018
19019         * attribute.cs: Fix bug #55970
19020
19021 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
19022
19023         Fix bug #52705
19024         * attribute.cs
19025         (GetObsoleteAttribute): New method. Creates the instance of
19026         ObsoleteAttribute.
19027         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
19028         ObsoleteAttribute when member is obsolete.
19029         (AttributeTester.Report_ObsoleteMessage): Common method for
19030         Obsolete error/warning reporting.
19031
19032         * class.cs
19033         (TypeContainer.base_classs_type): New member for storing parent type.
19034
19035         * decl.cs
19036         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
19037         for this MemberCore.
19038
19039 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
19040
19041         * attribute.cs, const.cs: Fix bug #58590
19042
19043 2004-05-21  Martin Baulig  <martin@ximian.com>
19044
19045         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
19046         out parameters if the end of the method is unreachable.  Fixes
19047         #58098. 
19048
19049 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
19050
19051         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
19052         Hari was right, why extra method.
19053
19054 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
19055
19056         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
19057
19058 2004-05-20  Martin Baulig  <martin@ximian.com>
19059
19060         Merged this back from gmcs to keep the differences to a minumum.
19061
19062         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
19063         instead of a Declspace.
19064         (Attribute.ResolveType): Likewise.
19065         (Attributes.Search): Likewise.
19066         (Attributes.Contains): Likewise.
19067         (Attributes.GetClsCompliantAttribute): Likewise.
19068
19069         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
19070         argument.
19071         (MethodData.ApplyAttributes): Take an EmitContext instead of a
19072         DeclSpace.
19073
19074 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
19075
19076         Fix bug #58688 (MCS does not report error when the same attribute
19077         is assigned twice)
19078
19079         * attribute.cs (Attribute.Emit): Distinction between null and default.
19080
19081 2004-05-19  Raja R Harinath  <rharinath@novell.com>
19082
19083         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
19084         of a top-level attribute without an attribute target.
19085         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
19086         Make non-static.
19087         (Attribute.Conditional_GetConditionName), 
19088         (Attribute.Obsolete_GetObsoleteMessage): Update.
19089         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
19090         part of ScanForIndexerName.
19091         (Attribute.CanIgnoreInvalidAttribute): New function.
19092         (Attribute.ScanForIndexerName): Move to ...
19093         (Attributes.ScanForIndexerName): ... here.
19094         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
19095         (Attributes.Search): New internal variant that can choose not to
19096         complain if types aren't resolved.  The original signature now
19097         complains.
19098         (Attributes.GetClsCompliantAttribute): Use internal variant, with
19099         complaints suppressed.
19100         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
19101         only if it not useful.
19102         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
19103         top-level for attributes that are shared between the assembly
19104         and a top-level class.
19105         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
19106         * class.cs: Update to reflect changes.
19107         (DefineIndexers): Fuse loops.
19108         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
19109         a couple more variants of attribute names.
19110
19111 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
19112
19113         Fix bug #52585 (Implemented explicit attribute declaration)
19114
19115         * attribute.cs:
19116         (Attributable.ValidAttributeTargets): New abstract method. It gets
19117         list of valid attribute targets for explicit target declaration.
19118         (Attribute.Target): It holds target itself.
19119         (AttributeSection): Removed.
19120         (Attribute.CheckTargets): New method. It checks whether attribute
19121         target is valid for the current element.
19122
19123         * class.cs:
19124         (EventProperty): New class. For events that are declared like
19125         property (with add and remove accessors).
19126         (EventField): New class. For events that are declared like field.
19127         class.cs
19128
19129         * cs-parser.jay: Implemented explicit attribute target declaration.
19130
19131         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
19132         Override ValidAttributeTargets.
19133
19134         * parameter.cs:
19135         (ReturnParameter): Class for applying custom attributes on 
19136         the return type.
19137         (ParameterAtribute): New class. Class for applying custom
19138         attributes on the parameter type.
19139
19140 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
19141
19142         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
19143         definitions. 
19144
19145         (Method): Allow UNSAFE here.
19146
19147         * modifiers.cs: Support unsafe reporting.
19148
19149 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
19150
19151         * decl.cs: Fix bug #58478.
19152
19153 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19154
19155         * statement.cs: When checking for unreachable code on an EmptyStatement,
19156         set the location. Fixes bug #58488.
19157
19158 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
19159
19160         * driver.cs: Add -pkg handling.
19161
19162         From Gonzalo: UseShelLExecute=false
19163
19164 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
19165
19166         * attribute.cs:
19167         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
19168         for attribute.
19169         (Attribute.IsClsCompliaceRequired): Moved to base for better
19170         accesibility.
19171         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
19172         when attribute is AttributeUsageAttribute.
19173         (Attribute.GetValidTargets): Simplified.
19174         (Attribute.GetAttributeUsage): New method returns AttributeUsage
19175         attribute for this type.
19176         (Attribute.ApplyAttributes): Method renamed to Emit and make
19177         non-static.
19178         (GlobalAttributeSection): New class for special handling of global
19179         attributes (assembly, module).
19180         (AttributeSection.Emit): New method.
19181
19182         * class.cs: Implemented Attributable abstract methods.
19183         (MethodCore.LabelParameters): Moved to Parameter class.
19184         (Accessor): Is back simple class.
19185         (PropertyMethod): Implemented Attributable abstract class.
19186         (DelegateMethod): Implemented Attributable abstract class.
19187         (Event): New constructor for disctintion between normal Event
19188         and Event with accessors.
19189
19190         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
19191
19192         * codegen.cs, const.cs, decl.cs, delegate.cs:
19193         (CommonAssemblyModulClass): Implemented Attributable abstract class
19194         and simplified.
19195
19196         * enum.cs: Implement IAttributeSupport interface.
19197         (EnumMember): New class for emum members. Implemented Attributable
19198         abstract class
19199
19200         * parameter.cs:
19201         (ParameterBase): Is abstract.
19202         (ReturnParameter): New class for easier [return:] attribute handling.
19203
19204         * typemanager.cs: Removed builder_to_attr.
19205
19206 2004-05-11  Raja R Harinath  <rharinath@novell.com>
19207
19208         Fix bug #57151.
19209         * attribute.cs (Attribute.GetPositionalValue): New function.
19210         * class.cs (TypeContainer.VerifyMembers): New function.
19211         (TypeContainer.Emit): Use it.
19212         (ClassOrStruct): New base class for Class and Struct.
19213         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
19214         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
19215         class.
19216         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
19217         then each non-static field should have a FieldOffset attribute.
19218         Otherwise, none of the fields should have a FieldOffset attribute.
19219         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
19220         and FieldOffset attributes.
19221         * typemanager.cs (TypeManager.struct_layout_attribute_type)
19222         (TypeManager.field_offset_attribute_type): New core types.
19223         (TypeManager.InitCoreTypes): Initialize them.
19224
19225 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
19226
19227         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
19228         Return correct type.
19229         From bug #58270.
19230
19231 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
19232
19233         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
19234         be implicitly converted to ulong.
19235         
19236         * expression.cs: The logic for allowing operator &, | and ^ worked
19237         was wrong, it worked before because we did not report an error in
19238         an else branch.  Fixes 57895.
19239
19240         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
19241         allow volatile fields to be reference types.
19242
19243 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
19244
19245         * driver.cs: Add support for /debug-
19246
19247 2004-05-07  Raja R Harinath  <rharinath@novell.com>
19248
19249         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
19250         Add a 'complain' parameter to silence errors.
19251         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
19252         silently overlooked type-resolutions.
19253         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
19254         to reflect changes.
19255         (Attributes.Search): New function.
19256         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
19257         (Attributes.GetAttributeFullName): Remove hack.
19258         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
19259         Update to reflect changes.
19260         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
19261         Use Attributes.Search instead of nested loops.
19262
19263 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
19264
19265         * decl.cs:
19266         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
19267         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
19268         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
19269
19270         * report.cs: (Report.Warning): Renamed to Warning_T because of
19271         parameter collision.
19272
19273 2004-05-05  Raja R Harinath  <rharinath@novell.com>
19274
19275         * expression.cs (MemberAccess.ResolveMemberAccess):
19276         Exit with non-zero status after Report.Error.
19277         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
19278         Likewise.
19279         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
19280
19281 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19282
19283         * support.cs: Don't hang when the file is empty.
19284
19285 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19286
19287         * support.cs: In SeekableStreamReader, compute the preamble size of the
19288           underlying stream. Position changes should take into account that initial
19289           count of bytes.
19290
19291 2004-05-03  Todd Berman  <tberman@sevenl.net>
19292
19293         * driver.cs: remove unused GetSysVersion function.
19294
19295 2004-05-03  Todd Berman  <tberman@sevenl.net>
19296
19297         * driver.cs: Remove the hack from saturday, as well as the hack
19298         from jackson (LoadAssemblyFromGac), also adds the CWD to the
19299         link_paths to get that bit proper.
19300
19301 2004-05-01  Todd Berman  <tberman@sevenl.net>
19302
19303         * driver.cs: Try a LoadFrom before a Load, this checks the current
19304         path. This is currently a bug in mono that is be fixed, however, this
19305         provides a workaround for now. This will be removed when the bug
19306         is fixed.
19307
19308 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
19309
19310         * CryptoConvert.cs: Updated to latest version. Fix issue with 
19311         incomplete key pairs (#57941).
19312
19313 2004-05-01  Todd Berman  <tberman@sevenl.net>
19314
19315         * driver.cs: Remove '.' from path_chars, now System.* loads properly
19316         from the GAC
19317
19318 2004-04-30  Jackson Harper  <jackson@ximian.com>
19319
19320         * codegen.cs: Open keys readonly.
19321         
19322 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19323
19324         * typemanager.cs: don't report cyclic struct layout when a struct
19325         contains 2 or more fields of the same type. Failed for Pango.AttrShape
19326         which has 2 Pango.Rectangle fields.
19327
19328 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19329
19330         * expression.cs: Handle IntPtr comparisons with IL code
19331         rather than a method call.
19332
19333 2004-04-29  Martin Baulig  <martin@ximian.com>
19334
19335         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
19336         the list of PropertyInfo's in class hierarchy and find the
19337         accessor.  Fixes #56013.
19338
19339 2004-04-29  Martin Baulig  <martin@ximian.com>
19340
19341         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
19342
19343 2004-04-29  Martin Baulig  <martin@ximian.com>
19344
19345         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19346
19347         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
19348
19349 2004-04-29  Martin Baulig  <martin@ximian.com>
19350
19351         * class.cs (ConstructorInitializer.Resolve): Check whether the
19352         parent .ctor is accessible.  Fixes #52146.
19353
19354 2004-04-29  Martin Baulig  <martin@ximian.com>
19355
19356         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19357
19358         * statement.cs (Using.EmitLocalVariableDecls): Use
19359         TypeManager.idisposable_type, not typeof (IDisposable).
19360         (Foreach.EmitCollectionForeach): Added support for valuetypes.
19361
19362 2004-04-29  Martin Baulig  <martin@ximian.com>
19363
19364         * class.cs (Event.Define): Don't emit the field and don't set
19365         RTSpecialName and SpecialName for events on interfaces.  Fixes
19366         #57703. 
19367
19368 2004-04-29  Raja R Harinath  <rharinath@novell.com>
19369
19370         Refactor Attribute.ApplyAttributes.
19371         * attribute.cs (Attributable): New base class for objects that can
19372         have Attributes applied on them.
19373         (Attribute): Make AttributeUsage fields public.
19374         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
19375         (Attribute.IsInternalCall): New property.
19376         (Attribute.UsageAttr): Convert to a public read-only property.
19377         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
19378         (Attribute.ResolveType, Attribute.Resolve)
19379         (Attribute.ScanForIndexerName): Update to reflect changes.
19380         (Attribute.CheckAttributeTarget): Re-format.
19381         (Attribute.ApplyAttributes): Refactor, to various
19382         Attributable.ApplyAttributeBuilder methods.
19383         * decl.cs (MemberCore): Make Attributable.
19384         * class.cs (Accessor): Make Attributable.
19385         (MethodData.ApplyAttributes): Use proper attribute types, not
19386         attribute names.
19387         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
19388         (TypeContainer.ApplyAttributeBuilder)
19389         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
19390         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
19391         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
19392         (Operator.ApplyAttributeBuilder): New factored-out methods.
19393         * const.cs (Const.ApplyAttributeBuilder): Likewise.
19394         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
19395         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
19396         * parameter.cs (ParameterBase): New Attributable base class
19397         that can also represent Return types.
19398         (Parameter): Update to the changes.
19399
19400 2004-04-29  Jackson Harper  <jackson@ximian.com>
19401
19402         * driver.cs: Prefer the corlib system version when looking for
19403         assemblies in the GAC. This is still a hack, but its a better hack
19404         now.
19405         
19406 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19407
19408         * decl.cs, enum.cs: Improved error 3005 reporting.
19409   
19410         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19411         (related_symbols): New private member for list of symbols
19412         related to reported error/warning.
19413         
19414         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19415
19416 2004-04-29  Martin Baulig  <martin@ximian.com>
19417
19418         * ecore.cs (Expression.Constantify): If we're an enum and
19419         TypeManager.TypeToCoreType() doesn't give us another type, use
19420         t.UnderlyingSystemType.  Fixes #56178.  
19421
19422 2004-04-29  Martin Baulig  <martin@ximian.com>
19423
19424         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19425         interfaces and for each interface, only add members directly
19426         declared in that interface.  Fixes #53255.
19427
19428 2004-04-28  Martin Baulig  <martin@ximian.com>
19429
19430         * expression.cs (ConditionalLogicalOperator): Use a temporary
19431         variable for `left' to avoid that we evaluate it more than once;
19432         bug #52588.
19433
19434 2004-04-28  Martin Baulig  <martin@ximian.com>
19435
19436         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19437         `void[]' (CS1547).
19438
19439 2004-04-28  Martin Baulig  <martin@ximian.com>
19440
19441         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19442         void (CS1547).
19443
19444         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19445         whether the type is not void (CS1547).
19446
19447 2004-04-28  Martin Baulig  <martin@ximian.com>
19448
19449         * expression.cs (Unary.DoResolveLValue): Override this and report
19450         CS0131 for anything but Operator.Indirection.
19451
19452 2004-04-28  Martin Baulig  <martin@ximian.com>
19453
19454         Committing a patch from Ben Maurer; see bug #50820.
19455
19456         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19457         check for classes.
19458
19459         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19460         classes.        
19461
19462 2004-04-28  Martin Baulig  <martin@ximian.com>
19463
19464         Committing a patch from Ben Maurer; see bug #50820.
19465
19466         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19467         check for classes.
19468
19469         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19470         classes.        
19471
19472 2004-04-28  Martin Baulig  <martin@ximian.com>
19473
19474         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19475         (Block.AddLabel): Call DoLookupLabel() to only search in the
19476         current block.
19477
19478 2004-04-28  Martin Baulig  <martin@ximian.com>
19479
19480         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19481         comparing StringConstants and NullLiterals in Equality and Inequality.
19482
19483 2004-04-28  Jackson Harper  <jackson@ximian.com>
19484
19485         * driver.cs: Attempt to load referenced assemblies from the
19486         GAC. This is the quick and dirty version of this method that
19487         doesnt take into account versions and just takes the first
19488         canidate found. Will be good enough for now as we will not have more
19489         then one version installed into the GAC until I update this method.
19490
19491 2004-04-28  Martin Baulig  <martin@ximian.com>
19492
19493         * typemanager.cs (TypeManager.CheckStructCycles): New public
19494         static method to check for cycles in the struct layout.
19495
19496         * rootcontext.cs (RootContext.PopulateTypes): Call
19497         TypeManager.CheckStructCycles() for each TypeContainer.
19498         [Note: We only need to visit each type once.]
19499
19500 2004-04-28  Martin Baulig  <martin@ximian.com>
19501
19502         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19503
19504         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19505         success and added `out object value'.  Use a `bool resolved' field
19506         to check whether we've already been called rather than
19507         `ConstantValue != null' since this breaks for NullLiterals.
19508
19509 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19510
19511         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19512         setting of this flag, since the 'set' method may be non-public.
19513
19514 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19515
19516         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19517         check on current_vector.Block.
19518
19519 2004-04-27  Martin Baulig  <martin@ximian.com>
19520
19521         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19522         a field initializer.  Fixes #56459.
19523
19524 2004-04-27  Martin Baulig  <martin@ximian.com>
19525
19526         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19527         we're not attempting to use an indexer.  Fixes #52154.
19528
19529 2004-04-27  Martin Baulig  <martin@ximian.com>
19530
19531         * statement.cs (Return): Don't create a return label if we don't
19532         need it; reverts my change from January 20th.  Thanks to Ben
19533         Maurer for this.
19534
19535 2004-04-27  Martin Baulig  <martin@ximian.com>
19536
19537         According to the spec, `goto' can only leave a nested scope, but
19538         never enter it.
19539
19540         * statement.cs (Block.LookupLabel): Only lookup in the current
19541         block, don't recurse into parent or child blocks.
19542         (Block.AddLabel): Check in parent and child blocks, report
19543         CS0140/CS0158 if we find a duplicate.
19544         (Block): Removed this indexer for label lookups.
19545         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19546         this already does the error reporting for us.
19547
19548         * flowanalysis.cs
19549         (FlowBranching.UsageVector.Block): New public variable; may be null.
19550         (FlowBranching.CreateSibling): Added `Block' argument.
19551         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19552         label for the target of a `goto' and check whether we're not
19553         leaving a `finally'.
19554
19555 2004-04-27  Martin Baulig  <martin@ximian.com>
19556
19557         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19558         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19559         just for returns).
19560
19561 2004-04-27  Martin Baulig  <martin@ximian.com>
19562
19563         * statement.cs (Block.AddLabel): Also check for implicit blocks
19564         and added a CS0158 check.
19565
19566 2004-04-27  Martin Baulig  <martin@ximian.com>
19567
19568         * flowanalysis.cs (FlowBranchingLoop): New class.
19569         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19570         UsageVector's instead of an ArrayList.
19571         (FlowBranching.Label): Likewise.
19572         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19573         (FlowBranching.AddBreakVector): New method.
19574
19575 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19576
19577         * attribute.cs: Small regression fix: only convert the type if we
19578         the type is different, fixes System.Drawing build.
19579
19580 2004-04-27  Martin Baulig  <martin@ximian.com>
19581
19582         * attribute.cs (Attribute.Resolve): If we have a constant value
19583         for a named field or property, implicity convert it to the correct
19584         type.
19585
19586 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19587
19588         * statement.cs (Block.Block): Implicit blocks share
19589         'child_variable_names' fields with parent blocks.
19590         (Block.AddChildVariableNames): Remove.
19591         (Block.AddVariable): Mark variable as "used by a child block" in
19592         every surrounding block.
19593         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19594         been used in a child block, complain about violation of "Invariant
19595         meaning in blocks" rule.
19596         * cs-parser.jay (declare_local_variables): Don't use
19597         AddChildVariableNames.
19598         (foreach_statement): Don't create an implicit block: 'foreach'
19599         introduces a scope.
19600
19601 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19602
19603         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19604         converting from 0L to ulong.  Fixes 57522.
19605
19606 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19607
19608         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19609         derived class hides via 'new' keyword field from base class (test-242.cs).
19610         TODO: Handle this in the more general way.
19611         
19612         * class.cs (CheckBase): Ditto.
19613
19614 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19615
19616         * decl.cs (caching_flags): New member for storing cached values
19617         as bit flags.
19618         (MemberCore.Flags): New enum where bit flags for caching_flags
19619         are defined.
19620         (MemberCore.cls_compliance): Moved to caching_flags.
19621         (DeclSpace.Created): Moved to caching_flags.
19622
19623         * class.cs: Use caching_flags instead of DeclSpace.Created
19624         
19625 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19626
19627         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19628         if we are only a derived class, not a nested class.
19629
19630         * typemanager.cs: Same as above, but do this at the MemberLookup
19631         level (used by field and methods, properties are handled in
19632         PropertyExpr).   Allow for the qualified access if we are a nested
19633         method. 
19634
19635 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19636
19637         * class.cs: Refactoring.
19638         (IMethodData): New inteface; Holds links to parent members
19639         to avoid member duplication (reduced memory allocation).
19640         (Method): Implemented IMethodData interface.
19641         (PropertyBase): New inner classes for get/set methods.
19642         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19643         (Event): New inner classes for add/remove methods.
19644         (Event.DelegateMethod): Implemented IMethodData interface.
19645
19646         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19647         EmitContext (related to class.cs refactoring).
19648
19649 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19650
19651         * delegate.cs (Delegate.VerifyApplicability): If the number of
19652         arguments are the same as the number of parameters, first try to
19653         verify applicability ignoring  any 'params' modifier on the last
19654         parameter.
19655         Fixes #56442.
19656
19657 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19658
19659         * class.cs (TypeContainer.AddIndexer): Use
19660         'ExplicitInterfaceName' to determine if interface name was
19661         explicitly specified.  'InterfaceType' is not initialized at this time.
19662         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19663         Indexers array is already in the required order.  Initialize
19664         'IndexerName' only if there are normal indexers.
19665         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19666         (TypeContainer.Emit): Emit DefaultMember attribute only if
19667         IndexerName is initialized.
19668         Fixes #56300.
19669
19670 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19671
19672         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19673         Fixes #57007
19674
19675 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19676
19677         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19678         attributes.
19679         Fix for #56456.
19680
19681         * attribute.cs (Attribute.Resolve): Check for duplicate named
19682         attributes.
19683         Fix for #56463.
19684
19685 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19686
19687         * iterators.cs (MarkYield): track whether we are in an exception,
19688         and generate code accordingly.  Use a temporary value to store the
19689         result for our state.
19690
19691         I had ignored a bit the interaction of try/catch with iterators
19692         since their behavior was not entirely obvious, but now it is
19693         possible to verify that our behavior is the same as MS .NET 2.0
19694
19695         Fixes 54814
19696
19697 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19698
19699         * iterators.cs: Avoid creating temporaries if there is no work to
19700         do. 
19701
19702         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19703         Enumerations, use TypeManager.EnumToUnderlying and call
19704         recursively. 
19705
19706         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19707         bug #57013
19708
19709         (This.Emit): Use EmitContext.EmitThis to emit our
19710         instance variable.
19711
19712         (This.EmitAssign): Ditto.
19713
19714         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19715         codepaths, we will move all the functionality into
19716         Mono.CSharp.This 
19717
19718         (FieldExpr.EmitAssign): Ditto.
19719
19720         This fixes several hidden bugs that I uncovered while doing a code
19721         review of this today.
19722
19723         * codegen.cs (EmitThis): reworked so the semantics are more clear
19724         and also support value types "this" instances.
19725
19726         * iterators.cs: Changed so that for iterators in value types, we
19727         do not pass the value type as a parameter.  
19728
19729         Initialization of the enumerator helpers is now done in the caller
19730         instead of passing the parameters to the constructors and having
19731         the constructor set the fields.
19732
19733         The fields have now `assembly' visibility instead of private.
19734
19735 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19736
19737         * expression.cs (Argument.Resolve): Check if fields passed as ref
19738         or out are contained in a MarshalByRefObject.
19739
19740         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19741         another compiler type.
19742
19743 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19744
19745         * class.cs (Indexer.Define): use the new name checking method.
19746         Also, return false on an error.
19747         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19748         (is_identifier_[start/part]_character): make static.
19749
19750 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19751
19752         * expression.cs (Binary.ResolveOperator): Do no append strings
19753         twice: since we can be invoked more than once (array evaluation)
19754         on the same concatenation, take care of this here.  Based on a fix
19755         from Ben (bug #56454)
19756
19757 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19758
19759         * codegen.cs: Fix another case where CS1548 must be reported (when 
19760         delay-sign isn't specified and no private is available #56564). Fix
19761         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19762         error when MCS is used on the MS runtime and we need to delay-sign 
19763         (which seems unsupported by AssemblyBuilder - see #56621).
19764
19765 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19766
19767         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19768         (TypeManager.ComputeNamespaces): Faster implementation for
19769         Microsoft runtime.
19770
19771         * compiler.csproj: Updated AssemblyName to mcs.
19772
19773 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19774
19775         * rootcontext.cs: Add new types to the boot resolution.
19776
19777         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19778         MulticastDelegate is not allowed.
19779
19780         * typemanager.cs: Add new types to lookup: System.TypedReference
19781         and ArgIterator.
19782
19783         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19784         check for TypedReference or ArgIterator, they are not allowed. 
19785
19786         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19787         makes us properly catch 1510 in some conditions (see bug 56016 for
19788         details). 
19789
19790 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19791
19792         * CryptoConvert.cs: update from corlib version
19793         with endian fixes.
19794
19795 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19796
19797         * class.cs (Indexer.Define): Check indexername declaration
19798
19799 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19800
19801         * attribute.cs (IsClsCompliant): Fixed problem with handling
19802         all three states (compliant, not-compliant, undetected).
19803
19804 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19805
19806         * attribute.cs (Attribute): Location is now public.
19807         (Resolve): Store resolved arguments (pos_values) in attribute class.
19808         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19809         (GetClsCompliantAttributeValue): New method that gets
19810         CLSCompliantAttribute value.
19811         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19812         if exists else null.
19813         (AttributeTester): New class for CLS-Compliant verification routines.
19814
19815         * class.cs (Emit): Add CLS-Compliant verification.
19816         (Method.GetSignatureForError): Implemented.
19817         (Constructor.GetSignatureForError): Implemented
19818         (Constructor.HasCompliantArgs): Returns if constructor has
19819         CLS-Compliant arguments.
19820         (Constructor.Emit): Override.
19821         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19822         is needed to test only parameters.
19823         (FieldBase.GetSignatureForError): Implemented.
19824         (TypeContainer): New member for storing base interfaces.
19825         (TypeContainer.FindMembers): Search in base interfaces too.
19826
19827         * codegen.cs (GetClsComplianceAttribute): New method that gets
19828         assembly or module CLSCompliantAttribute value.
19829         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19830         for assembly.
19831         (ModuleClass.Emit): Add error 3012 test.
19832
19833         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19834
19835         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19836         state for all decl types.
19837         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19838         if CLS-Compliant tests are required.
19839         (IsClsCompliaceRequired): New method. Analyze whether code
19840         must be CLS-Compliant.
19841         (IsExposedFromAssembly): New method. Returns true when MemberCore
19842         is exposed from assembly.
19843         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19844         value or gets cached value.
19845         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19846         is explicitly marked with CLSCompliantAttribute.
19847         (IsIdentifierClsCompliant): New abstract method. This method is
19848         used to testing error 3005.
19849         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19850         for identifier and parameters CLS-Compliant testing.
19851         (VerifyClsCompliance): New method. The main virtual method for
19852         CLS-Compliant verifications.
19853         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19854         null. I don't know why is null (too many public members !).
19855         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19856         and get value of first CLSCompliantAttribute that found.
19857
19858         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19859         (VerifyClsCompliance): Override and add extra tests.
19860
19861         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19862         clscheck- disable CLS-Compliant verification event if assembly is has
19863         CLSCompliantAttribute(true).
19864
19865         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19866         ApllyAttribute is now called in emit section as in the other cases.
19867         Possible future Emit integration.
19868         (IsIdentifierClsCompliant): New override.
19869         (VerifyClsCompliance): New override.
19870         (GetEnumeratorName): Returns full enum name.
19871
19872         * parameter.cs (GetSignatureForError): Implemented.
19873
19874         * report.cs (WarningData): New struct for Warning message information.
19875         (LocationOfPreviousError): New method.
19876         (Warning): New method. Reports warning based on the warning table.
19877         (Error_T): New method. Reports error based on the error table.
19878
19879         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19880         verifications are done here.
19881
19882         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19883
19884         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19885         CLSCompliantAttribute.
19886         (all_imported_types): New member holds all imported types from other
19887         assemblies.
19888         (LoadAllImportedTypes): New method fills static table with exported types
19889         from all referenced assemblies.
19890         (Modules): New property returns all assembly modules.
19891
19892 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19893
19894         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19895         throwing a parser error.
19896
19897         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19898         which removes the hardcoded get_/set_ prefixes for properties, as
19899         IL allows for the properties to be named something else.  
19900
19901         Bug #56013
19902
19903         * expression.cs: Do not override operand before we know if it is
19904         non-null.  Fix 56207
19905
19906 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19907
19908         * typemanager.cs: support for pinned variables.
19909
19910 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19911
19912         * decl.cs, typemanager.cs: Avoid using an arraylist
19913         as a buffer if there is only one result set.
19914
19915 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19916
19917         * expression.cs: Make sure you cant call a static method
19918         with an instance expression, bug #56174.
19919
19920 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19921
19922         * class.cs (IsDuplicateImplementation): Improve error reporting to
19923         flag 663 (method only differs in parameter modifier).
19924
19925         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19926         in preprocessor directives.
19927
19928         * location.cs (LookupFile): Allow for the empty path.
19929
19930         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19931         better approach for some of that patch, but its failing with the
19932         CharSet enumeration.  For now try/catch will do.
19933
19934         * typemanager.cs: Do not crash if a struct does not have fields.
19935         Fixes 56150.
19936
19937 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19938
19939         * expression.cs: cs0213, cant fix a fixed expression.
19940         fixes 50231.
19941
19942 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19943
19944         * cs-parser.jay: detect invalid embeded statements gracefully.
19945         bug #51113.
19946
19947 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19948
19949         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19950         As a regex:
19951         s/
19952         the invocation type may not be a subclass of the tye of the item/
19953         The type of the item must be a subclass of the invocation item.
19954         /g
19955
19956         Fixes bug #50820.
19957
19958 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19959
19960         * attribute.cs: Added methods to get a string and a bool from an
19961         attribute. Required to information from AssemblyKeyFileAttribute,
19962         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19963         * codegen.cs: Modified AssemblyName creation to include support for
19964         strongnames. Catch additional exceptions to report them as CS1548.
19965         * compiler.csproj: Updated include CryptoConvert.cs.
19966         * compiler.csproj.user: Removed file - user specific configuration.
19967         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19968         Mono.Security assembly. The original class is maintained and tested in
19969         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19970         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19971         like CSC 8.0 (C# v2) supports.
19972         * Makefile: Added CryptoConvert.cs to mcs sources.
19973         * rootcontext.cs: Added new options for strongnames.
19974
19975 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19976
19977         * driver.cs: For --expect-error, report error code `2'
19978         if the program compiled with no errors, error code `1' if
19979         it compiled with an error other than the one expected.
19980
19981 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19982
19983         * compiler.csproj: Updated for Visual Studio .NET 2003.
19984         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19985         * compiler.sln: Updated for Visual Studio .NET 2003.
19986
19987 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19988
19989         * expression.cs: Fix bug #47234. We basically need to apply the
19990         rule that we prefer the conversion of null to a reference type
19991         when faced with a conversion to 'object' (csc behaviour).
19992
19993 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19994
19995         * statement.cs: Shorter form for foreach, eliminates
19996         a local variable. r=Martin.
19997
19998 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19999
20000         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
20001         checks if we can use brtrue/brfalse to test for 0.
20002         * expression.cs: use the above in the test for using brtrue/brfalse.
20003         cleanup code a bit.
20004
20005 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20006
20007         * expression.cs: Rewrite string concat stuff. Benefits:
20008
20009         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
20010         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
20011         rather than a concat chain.
20012
20013         * typemanager.cs: Add lookups for more concat overloads.
20014
20015 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20016
20017         * expression.cs: Emit shorter il code for array init.
20018
20019         newarr
20020         dup
20021         // set 1
20022
20023         // set 2
20024
20025         newarr
20026         stloc.x
20027
20028         ldloc.x
20029         // set 1
20030
20031         ldloc.x
20032         // set 2
20033
20034 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
20035
20036         * statement.cs: Before, two switch blocks would be merged if the
20037         total size of the blocks (end_item - begin_item + 1) was less than
20038         two times the combined sizes of the blocks.
20039
20040         Now, it will only merge if after the merge at least half of the
20041         slots are filled.
20042
20043         fixes 55885.
20044
20045 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
20046
20047         * class.cs : csc build fix for GetMethods(). See bug #52503.
20048
20049 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
20050
20051         * expression.cs: Make sure fp comparisons work with NaN.
20052         This fixes bug #54303. Mig approved this patch a long
20053         time ago, but we were not able to test b/c the runtime
20054         had a related bug.
20055
20056 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
20057
20058         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
20059
20060 2004-03-19  Martin Baulig  <martin@ximian.com>
20061
20062         * class.cs (MemberCore.IsDuplicateImplementation): Report the
20063         error here and not in our caller.
20064
20065 2004-03-19  Martin Baulig  <martin@ximian.com>
20066
20067         * interface.cs: Completely killed this file.
20068         (Interface): We're now a TypeContainer and live in class.cs.
20069
20070         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
20071         argument; we're now also called for interfaces.
20072         (TypeContainer.DefineMembers): Allow this method being called
20073         multiple times.
20074         (TypeContainer.GetMethods): New public method; formerly known as
20075         Interface.GetMethod().  This is used by PendingImplementation.
20076         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
20077         it's now private and non-static.
20078         (Interface): Moved this here; it's now implemented similar to
20079         Class and Struct.
20080         (Method, Property, Event, Indexer): Added `bool is_interface'
20081         argument to their .ctor's.
20082         (MemberBase.IsInterface): New public field.
20083
20084         * cs-parser.jay: Create normal Method, Property, Event, Indexer
20085         instances instead of InterfaceMethod, InterfaceProperty, etc.
20086         (opt_interface_base): Removed; we now use `opt_class_base' instead.
20087         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
20088
20089 2004-03-19  Martin Baulig  <martin@ximian.com>
20090
20091         * class.cs (MethodCore.IsDuplicateImplementation): New private
20092         method which does the CS0111 checking.
20093         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
20094         Use IsDuplicateImplementation().
20095
20096 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
20097
20098         * decl.cs (FindMemberToOverride): New method to find the correct
20099         method or property to override in the base class.
20100         * class.cs
20101             - Make Method/Property use the above method to find the
20102               version in the base class.
20103             - Remove the InheritableMemberSignatureCompare as it is now
20104               dead code.
20105
20106         This patch makes large code bases much faster to compile, as it is
20107         O(n) rather than O(n^2) to do this validation.
20108
20109         Also, it fixes bug 52458 which is that nested classes are not
20110         taken into account when finding the base class member.
20111
20112         Reviewed/Approved by Martin.
20113
20114 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
20115
20116         * interface.cs: In all interface classes removed redundant
20117         member initialization.
20118
20119 2004-03-16  Martin Baulig  <martin@ximian.com>
20120
20121         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
20122
20123 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
20124
20125         * decl.cs (DefineTypeAndParents): New helper method to define a
20126         type's containers before the type itself is defined;  This is a
20127         bug exposed by the recent changes to Windows.Forms when an
20128         implemented interface was defined inside a class that had not been
20129         built yet.   
20130
20131         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
20132
20133         (Check): Loop correctly to report errors modifiers
20134         (UNSAFE was not in the loop, since it was the same as TOP).
20135
20136         * interface.cs: Every interface member now takes a ModFlags,
20137         instead of a "is_new" bool, which we set on the base MemberCore. 
20138
20139         Every place where we called "UnsafeOk" in the interface, now we
20140         call the proper member (InterfaceMethod.UnsafeOK) instead to get
20141         the unsafe settings from the member declaration instead of the
20142         container interface. 
20143
20144         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
20145
20146         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
20147         `set_indexer_name' to the pending bits (one per type).
20148
20149         We fixed a bug today that was picking the wrong method to
20150         override, since for properties the existing InterfaceMethod code
20151         basically ignored the method name.  Now we make sure that the
20152         method name is one of the valid indexer names.
20153
20154 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
20155  
20156         * support.cs (SeekableStreamReader): Keep track of stream byte
20157         positions and don't mix them with character offsets to the buffer.
20158
20159         Patch from Gustavo Giráldez
20160
20161 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
20162
20163         * interface.cs (InterfaceSetGetBase): Removed double member
20164         initialization, base class does it as well.
20165
20166 2004-03-13  Martin Baulig  <martin@ximian.com>
20167
20168         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
20169         when compiling corlib.
20170
20171 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
20172
20173         * convert.cs (ExplicitConversion): We were reporting an error on
20174         certain conversions (object_type source to a value type, when the
20175         expression was `null') before we had a chance to pass it through
20176         the user defined conversions.
20177
20178         * driver.cs: Replace / and \ in resource specifications to dots.
20179         Fixes 50752
20180
20181         * class.cs: Add check for duplicate operators.  Fixes 52477
20182
20183 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
20184
20185         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
20186         that are in the middle of the statements, not only at the end.
20187         Fixes #54987
20188
20189         * class.cs (TypeContainer.AddField): No longer set the
20190         `HaveStaticConstructor' flag, now we call it
20191         `UserDefineStaticConstructor' to diferentiate the slightly
20192         semantic difference.
20193
20194         The situation is that we were not adding BeforeFieldInit (from
20195         Modifiers.TypeAttr) to classes that could have it.
20196         BeforeFieldInit should be set to classes that have no static
20197         constructor. 
20198
20199         See:
20200
20201         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
20202
20203         And most importantly Zoltan's comment:
20204
20205         http://bugzilla.ximian.com/show_bug.cgi?id=44229
20206
20207         "I think beforefieldinit means 'it's ok to initialize the type sometime 
20208          before its static fields are used', i.e. initialization does not need
20209          to be triggered by the first access to the type. Setting this flag
20210          helps the JIT to compile better code, since it can run the static
20211          constructor at JIT time, and does not need to generate code to call it
20212          (possibly lots of times) at runtime. Unfortunately, mcs does not set
20213          this flag for lots of classes like String. 
20214          
20215          csc sets this flag if the type does not have an explicit static 
20216          constructor. The reasoning seems to be that if there are only static
20217          initalizers for a type, and no static constructor, then the programmer
20218          does not care when this initialization happens, so beforefieldinit
20219          can be used.
20220          
20221          This bug prevents the AOT compiler from being usable, since it 
20222          generates so many calls to mono_runtime_class_init that the AOT code
20223          is much slower than the JITted code. The JITted code is faster, 
20224          because it does not generate these calls if the vtable is type is
20225          already initialized, which is true in the majority of cases. But the
20226          AOT compiler can't do this."
20227
20228 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
20229
20230         * class.cs (MethodData.Emit): Refactor the code so symbolic
20231         information is generated for destructors;  For some reasons we
20232         were taking a code path that did not generate symbolic information
20233         before. 
20234
20235 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20236
20237         * class.cs: Create a Constructor.CheckBase method that
20238         takes care of all validation type code. The method
20239         contains some code that was moved from Define.
20240
20241         It also includes new code that checks for duplicate ctors.
20242         This fixes bug #55148.
20243
20244 2004-03-09  Joshua Tauberer <tauberer@for.net>
20245
20246         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
20247         a { ... }-style array creation invokes EmitStaticInitializers
20248         which is not good for reference-type arrays.  String, decimal
20249         and now null constants (NullCast) are not counted toward
20250         static initializers.
20251
20252 2004-03-05  Martin Baulig  <martin@ximian.com>
20253
20254         * location.cs (SourceFile.HasLineDirective): New public field;
20255         specifies whether the file contains or is referenced by a "#line"
20256         directive.
20257         (Location.DefineSymbolDocuments): Ignore source files which
20258         either contain or are referenced by a "#line" directive.        
20259
20260 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
20261
20262         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
20263         direct access to our parent, so check the method inline there.
20264
20265 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20266
20267         * expression.cs (Invocation.EmitCall): Miguel's last commit
20268         caused a regression. If you had:
20269
20270             T t = null;
20271             t.Foo ();
20272
20273         In Foo the implict this would be null.
20274
20275 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
20276
20277         * expression.cs (Invocation.EmitCall): If the method is not
20278         virtual, do not emit a CallVirt to it, use Call.
20279
20280         * typemanager.cs (GetFullNameSignature): Improve the method to
20281         cope with ".ctor" and replace it with the type name.
20282
20283         * class.cs (ConstructorInitializer.Resolve): Now the method takes
20284         as an argument the ConstructorBuilder where it is being defined,
20285         to catch the recursive constructor invocations.
20286
20287 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
20288
20289         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
20290         routines to check if a type is an enumerable/enumerator allow
20291         classes that implement the IEnumerable or IEnumerator interfaces.
20292
20293         * class.cs (Property, Operator): Implement IIteratorContainer, and
20294         implement SetYields.
20295
20296         (Property.Define): Do the block swapping for get_methods in the
20297         context of iterators.   We need to check if Properties also
20298         include indexers or not.
20299
20300         (Operator): Assign the Block before invoking the
20301         OperatorMethod.Define, so we can trigger the Iterator code
20302         replacement. 
20303
20304         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
20305         Property and Operator classes are not created when we parse the
20306         declarator but until we have the block completed, so we use a
20307         singleton SimpleIteratorContainer.Simple to flag whether the
20308         SetYields has been invoked.
20309
20310         We propagate this setting then to the Property or the Operator to
20311         allow the `yield' to function.
20312
20313 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
20314
20315         * codegen.cs: Implemented attribute support for modules.
20316         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
20317         Assembly/Module functionality.
20318
20319         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
20320         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
20321         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
20322
20323 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
20324
20325         * interface.cs (FindMembers): The operation is performed on all base
20326         interfaces and not only on the first. It is required for future CLS Compliance patch.
20327
20328 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20329
20330         * statement.cs, codegen.cs:
20331         This patch deals with patterns such as:
20332
20333         public class List : IEnumerable {
20334
20335                 public MyEnumerator GetEnumerator () {
20336                         return new MyEnumerator(this);
20337                 }
20338
20339                 IEnumerator IEnumerable.GetEnumerator () {
20340                         ...
20341                 }
20342                 
20343                 public struct MyEnumerator : IEnumerator {
20344                         ...
20345                 }
20346         }
20347
20348         Before, there were a few things we did wrong:
20349         1) we would emit callvirt on a struct, which is illegal
20350         2) we emited ldarg when we needed to emit ldarga
20351         3) we would mistakenly call the interface methods on an enumerator
20352         type that derived from IEnumerator and was in another assembly. For example:
20353
20354         public class MyEnumerator : IEnumerator
20355
20356         Would have the interface methods called, even if there were public impls of the
20357         method. In a struct, this lead to invalid IL code.
20358
20359 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
20360
20361         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
20362           renamed to Emit.
20363
20364         * delegate.cs (Define): Fixed crash when delegate type is undefined.
20365
20366 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
20367
20368         * cs-parser.jay: Fix small regression: we were not testing V2
20369         compiler features correctly.
20370
20371         * interface.cs: If the emit context is null, then create one
20372
20373 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
20374
20375         * decl.cs (GetSignatureForError): New virtual method to get full name
20376           for error messages.
20377
20378         * attribute.cs (IAttributeSupport): New interface for attribute setting.
20379           Now it is possible to rewrite ApplyAttributes method to be less if/else.
20380
20381         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
20382           Duplicated members and code in these classes has been removed.
20383           Better encapsulation in these classes.
20384
20385 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
20386
20387         * assign.cs (Assign.DoResolve): When dealing with compound
20388         assignments, there is a new rule in ECMA C# 2.4 (might have been
20389         there before, but it is documented here) that states that in:
20390
20391         a op= b;
20392
20393         If b is of type int, and the `op' is a shift-operator, then the
20394         above is evaluated as:
20395
20396         a = (int) a op b 
20397
20398         * expression.cs (Binary.ResolveOperator): Instead of testing for
20399         int/uint/long/ulong, try to implicitly convert to any of those
20400         types and use that in pointer arithmetic.
20401
20402         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
20403         method to print information for from the type, not from the
20404         null-method we were given.
20405
20406 2004-02-01  Duncan Mak  <duncan@ximian.com>
20407
20408         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20409         parsing for cmd, fixes bug #53694.
20410
20411 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20412
20413         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20414         in the member name duplication tests. Property and operator name duplication
20415         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20416
20417 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20418
20419         * interface.cs (PopulateMethod): Fixed crash when interface method
20420         returns not existing type (error test cs0246-3.cs).
20421
20422 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20423
20424         * cs-parser.jay (interface_accessors): Re-write actions to also
20425         store attributes attached to get and set methods. Fix spelling
20426         while at it.
20427
20428         (inteface_property_declaration): Modify accordingly.
20429
20430         (InterfaceAccessorInfo): New helper class to store information to pass
20431         around between rules that use interface_accessors.
20432
20433         * interface.cs (Emit): Apply attributes on the get and set
20434         accessors of properties and indexers too.
20435
20436         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20437         right MethodBuilder when applying attributes to the get and set accessors.
20438
20439 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20440
20441         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20442
20443 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20444
20445         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20446
20447 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20448
20449         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20450         changes that treat `yield' specially when present before `break'
20451         or `return' tokens.
20452
20453         * cs-tokenizer.cs: yield is no longer a keyword.
20454
20455 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20456
20457         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20458         setting for default constructors.
20459         For default constructors are almost every time set wrong Modifier. The
20460         generated IL code has been alright. But inside mcs this values was
20461         wrong and this was reason why several of my CLS Compliance tests
20462         failed.
20463
20464 2004-01-22  Martin Baulig  <martin@ximian.com>
20465
20466         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20467         not a QualifiedIdentifier.  This is what `type_name_expression'
20468         was previously doing.
20469         (type_name_expression): Removed; the code is now in
20470         `namespace_or_type_name'.
20471         (qualified_identifier): Removed, use `namespace_or_type_name'
20472         instead.
20473         (QualifiedIdentifier): Removed this class.      
20474
20475 2004-01-22  Martin Baulig  <martin@ximian.com>
20476
20477         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20478         not a string as alias name.
20479
20480 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20481
20482         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20483         #52730 bug, and instead compute correctly the need to use a
20484         temporary variable when requesting an address based on the
20485         static/instace modified of the field and the constructor.
20486  
20487 2004-01-21  Martin Baulig  <martin@ximian.com>
20488
20489         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20490         class and namespace before looking up aliases.  Fixes #52517.
20491
20492 2004-01-21  Martin Baulig  <martin@ximian.com>
20493
20494         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20495         assinged in a 'try'; fixes exception4.cs.
20496
20497 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20498         * class.cs : Implemented parameter-less constructor for TypeContainer
20499
20500         * decl.cs: Attributes are now stored here. New property OptAttributes
20501
20502         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20503
20504         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20505
20506 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20507
20508         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20509           (CSharpSignature): New method for indexer and property signature.
20510
20511 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20512
20513         * pending.cs (IsVirtualFilter): Faster implementation.
20514
20515 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20516
20517         * typemanager.cs: Avoid inclusion of same assembly more than once.
20518
20519 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20520
20521         * cs-parser.jay: Fixed problem where the last assembly attribute
20522           has been applied also to following declaration (class, struct, etc.)
20523           
20524 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20525
20526         * class.cs: Added error CS0538, CS0539 reporting.
20527         Fixed crash on Microsoft runtime when field type is void.
20528
20529         * cs-parser.jay: Added error CS0537 reporting.
20530
20531         * pending.cs: Added error CS0535 reporting.
20532         Improved error report for errors CS0536, CS0534.
20533
20534 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20535
20536         Merge a few bits from the Anonymous Method MCS tree.
20537
20538         * statement.cs (ToplevelBlock): New class for toplevel methods,
20539         will hold anonymous methods, lifted variables.
20540
20541         * cs-parser.jay: Create toplevel blocks for delegates and for
20542         regular blocks of code. 
20543
20544 2004-01-20  Martin Baulig  <martin@ximian.com>
20545
20546         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20547         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20548         and `NeedExplicitReturn'; added `IsLastStatement'.
20549         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20550         have a `ReturnLabel' or we're not unreachable.
20551
20552         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20553         child's reachability; don't just override ours with it.  Fixes
20554         #58058 (lluis's example).
20555         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20556         InFinally(), InLoop(), InSwitch() and
20557         BreakCrossesTryCatchBoundary() methods.
20558
20559         * statement.cs (Return): Do all error checking in Resolve().
20560         Unless we are the last statement in a top-level block, always
20561         create a return label and jump to it.
20562         (Break, Continue): Do all error checking in Resolve(); also make
20563         sure we aren't leaving a `finally'.
20564         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20565         statement in a top-level block.
20566         (Block.Flags): Added `IsDestructor'.
20567         (Block.IsDestructor): New public property.
20568
20569 2004-01-20  Martin Baulig  <martin@ximian.com>
20570
20571         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20572
20573 2004-01-20  Martin Baulig  <martin@ximian.com>
20574
20575         * statement.cs (Statement.ResolveUnreachable): New public method.
20576         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20577         (Block.Resolve): Resolve unreachable statements.
20578
20579 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20580
20581         * expression.cs: We need to fix the case where we do
20582         not have a temp variable here.
20583
20584         * assign.cs: Only expression compound assignments need
20585         temporary variables.
20586
20587 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20588
20589         * flowanalysis.cs: Reduce memory allocation in a few ways:
20590           - A block with no variables should not allocate a bit
20591             vector for itself.
20592           - A method with no out parameters does not need any tracking
20593             for assignment of the parameters, so we need not allocate
20594             any data for it.
20595           - The arrays:
20596                 public readonly Type[] VariableTypes;
20597                 public readonly string[] VariableNames;
20598             Are redundant. The data is already stored in the variable
20599             map, so we need not allocate another array for it.
20600           - We need to add alot of checks for if (params | locals) == null
20601             due to the first two changes.
20602
20603 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20604
20605         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20606         implement IMemoryLocation, we store a copy on a local variable and
20607         take the address of it.  Patch from Benjamin Jemlich
20608
20609         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20610         to use a special "type_name_expression" rule which reduces the
20611         number of "QualifiedIdentifier" classes created, and instead
20612         directly creates MemberAccess expressions.
20613
20614 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20615
20616         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20617         that fixes #52853.  Null literal assignment to ValueType
20618
20619         * class.cs (MethodData.Emit): Instead of checking the name of the
20620         method to determine if its a destructor, create a new derived
20621         class from Method called Destructor, and test for that.  
20622
20623         * cs-parser.jay: Create a Destructor object instead of a Method.  
20624
20625         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20626
20627         Fixes: 52933
20628
20629 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20630
20631         * expression.cs (Binary.ResolveOperator): Perform an implicit
20632         conversion from MethodGroups to their delegate types on the
20633         Addition operation.
20634
20635         * delegate.cs: Introduce a new class DelegateCreation that is the
20636         base class for `NewDelegate' and `ImplicitDelegateCreation',
20637         factor some code in here.
20638
20639         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20640         conversion from MethodGroups to compatible delegate types. 
20641
20642         * ecore.cs (Expression.Resolve): Do not flag error 654
20643         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20644         we allow conversions from MethodGroups to delegate types now.
20645
20646         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20647         assignments in v2 either.
20648
20649 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20650
20651         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20652         static read-only fields in ctors.
20653
20654         Applied patch from Benjamin Jemlich 
20655
20656         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20657
20658 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20659
20660         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20661         here to return true, as they can be used like this:
20662
20663                 (XXX) int.MEMBER ()
20664
20665         Fixed 49836 and all the other dups
20666
20667 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20668
20669         * driver.cs: Implement /win32res and /win32icon.
20670
20671 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20672
20673         * cs-parser.jay: Add a rule to improve error handling for the
20674         common mistake of placing modifiers after the type.
20675
20676 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20677
20678         * cs-parser.jay (interface_event_declaration): Catch
20679         initialization of events on interfaces, and report cs0068
20680
20681         * cs-parser.jay (interface_event_declaration): Catch
20682         initialization of events. 
20683
20684         * ecore.cs: Better report missing constructors.
20685
20686         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20687         the error reporting done in the wrong place.  Fix.
20688
20689         * expression.cs (Binary.ResolveOperator): Catch the 
20690         operator + (E x, E y) error earlier, and later allow for implicit
20691         conversions in operator +/- (E e, U x) from U to the underlying
20692         type of E.
20693
20694         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20695         52596, if the container class is abstract, the default constructor
20696         is protected otherwise its public (before, we were always public).
20697
20698         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20699         fixed statement.
20700
20701         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20702         Jemlich that fixes bug #52597, MCS was generating invalid code for
20703         idisposable structs.   Thanks to Ben for following up with this
20704         bug as well.
20705
20706 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20707
20708         * driver.cs: Allow assemblies without code to be generated, fixes
20709         52230.
20710
20711 2004-01-07  Nick Drochak <ndrochak@gol.com>
20712
20713         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20714
20715 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20716
20717         * cs-parser.jay: Add rules to improve error reporting if fields or
20718         methods are declared at the namespace level (error 116)
20719
20720         * Add rules to catch event add/remove
20721
20722 2004-01-04  David Sheldon <dave-mono@earth.li>
20723
20724   * expression.cs: Added matching ")" to error message for 
20725   CS0077
20726
20727 2004-01-03 Todd Berman <tberman@gentoo.org>
20728
20729         * ecore.cs, attribute.cs:
20730         Applying fix from #52429.
20731
20732 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20733
20734         * ecore.cs, expression.cs, statement.cs:
20735         Total rewrite of how we handle branching. We
20736         now handle complex boolean expressions with fewer
20737         jumps. As well if (x == 0) no longer emits a ceq.
20738
20739         if (x is Foo) is much faster now, because we generate
20740         better code.
20741
20742         Overall, we get a pretty big improvement on our benchmark
20743         tests. The code we generate is smaller and more readable.
20744
20745         I did a full two-stage bootstrap. The patch was reviewed
20746         by Martin and Miguel.
20747
20748 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20749
20750         * cs-parser.jay: Make primary_expression not take a QI.
20751         we dont need this because the member_access rule covers
20752         us here. So we replace the rule with just IDENTIFIER.
20753
20754         This has two good effects. First, we remove a s/r conflict.
20755         Second, we allocate many fewer QualifiedIdentifier objects.
20756
20757 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20758
20759         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20760         set the correct information via SRE. This prevents
20761         hanging on the MS runtime. Fixes #29374.
20762
20763 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20764
20765         * convert.cs: correctly handle conversions to value types
20766         from Enum and ValueType as unboxing conversions.
20767
20768         Fixes bug #52569. Patch by Benjamin Jemlich.
20769
20770 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20771
20772         * expression.cs (BetterConversion): Prefer int -> uint
20773         over int -> ulong (csc's behaviour). This fixed bug #52046.
20774
20775 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20776
20777         * decl.cs (MemberCache.FindMembers): now returns a
20778         MemberInfo [].
20779
20780         * typemanager.cs: In general, go with with ^^.
20781         (CopyNewMethods): take an IList.
20782         (RealMemberLookup): Only allocate an arraylist
20783         if we copy from two sets of methods.
20784
20785         This change basically does two things:
20786         1) Fewer array lists allocated due to CopyNewMethods.
20787         2) the explicit cast in MemberList costed ALOT.
20788
20789 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20790
20791         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20792         a hashtable to avoid needless string allocations when an identifier is
20793         used more than once (the common case).
20794
20795 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20796
20797         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20798         is broken, it will not return anything. So, we
20799         have to use the information we have in mcs to
20800         do the task.
20801
20802         * typemanager.cs: Add a cache for GetInterfaces,
20803         since this will now be used more often (due to ^^)
20804
20805         (GetExplicitInterfaces) New method that gets the
20806         declared, not effective, interfaces on a type
20807         builder (eg, if you have interface IFoo, interface
20808         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20809         { IBar }.
20810
20811         This patch makes MCS able to bootstrap itself on
20812         Windows again.
20813
20814 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20815
20816         * expression.cs: Remove the Nop's that Miguel put
20817         in by mistake.
20818
20819 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20820
20821         * report.cs, codegen.cs: Give the real stack trace to
20822         the error when an exception is thrown.
20823
20824 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20825
20826         * decl.cs: only allocate hashtables for ifaces if 
20827         it is an iface!
20828
20829 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20830
20831         * expression.cs: fix the error from cs0121-2.cs
20832         (a parent interface has two child interfaces that
20833         have a function with the same name and 0 params
20834         and the function is called through the parent).
20835
20836 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20837
20838         * class.cs, rootcontext.cs, typmanager.cs: do not
20839         leak pointers.
20840
20841 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20842
20843         * codegen.cs: remove stack for the ec flow branching.
20844         It is already a linked list, so no need.
20845
20846 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20847
20848         * Makefile: Allow custom profiler here.
20849
20850 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20851
20852         * typemanager.cs (LookupType):
20853           - Use a static char [], because split takes
20854             a param array for args, so it was allocating
20855             every time.
20856           - Do not store true in a hashtable, it boxes.
20857
20858 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20859
20860         * flowanalysis.cs: bytify common enums.
20861
20862 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20863
20864         * modifiers.cs: Add a new set of flags for the
20865         flags allowed on explicit interface impls.
20866         * cs-parser.jay: catch the use of modifiers in
20867         interfaces correctly.
20868         * class.cs: catch private void IFoo.Blah ().
20869
20870         All related to bug #50572.
20871
20872 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20873
20874         * decl.cs: Rewrite the consistant accessability checking.
20875         Accessability is not linear, it must be implemented in
20876         a tableish way. Fixes #49704.
20877
20878 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20879
20880         * expression.cs: Handle negation in a checked context.
20881         We must use subtraction from zero. Fixes #38674.
20882
20883 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20884
20885         * class.cs: Ignore static void main in DLLs.
20886         * rootcontext.cs: Handle the target type here,
20887         since we are have to access it from class.cs
20888         * driver.cs: account for the above.
20889
20890 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20891
20892         * report.cs: Give line numbers and files if available.
20893
20894 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20895
20896         * driver.cs: Implement /addmodule.
20897
20898         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20899         ModuleBuilders.
20900
20901 2003-12-20  Martin Baulig  <martin@ximian.com>
20902
20903         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20904         (FieldBase.IsAssigned): Removed this field.
20905         (FieldBase.SetAssigned): New public method.
20906         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20907
20908 2003-12-20  Martin Baulig  <martin@ximian.com>
20909
20910         * expression.cs (LocalVariableReference.DoResolve): Don't set
20911         `vi.Used' if we're called from DoResolveLValue().
20912
20913         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20914         returns the usage vector it just merged into the current one -
20915         pass this one to UsageWarning().
20916         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20917         of the `EmitContext', don't call this recursively on our children.
20918
20919 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20920
20921         * driver.cs: Implement /target:module.
20922
20923 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20924
20925         * support.cs (CharArrayHashtable): New helper class.
20926
20927         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20928         char arrays, not strings, so we can avoid creating a string in
20929         consume_identifier if the identifier is a keyword.
20930
20931 2003-12-16  Martin Baulig  <martin@ximian.com>
20932
20933         * statement.cs (LocalInfo.Assigned): Removed this property.
20934         (LocalInfo.Flags): Removed `Assigned'.
20935         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20936         and uses flow analysis.
20937         (Block.UsageWarning): Made this method private.
20938         (Block.Resolve): Call UsageWarning() if appropriate.
20939
20940         * expression.cs (LocalVariableReference.DoResolve): Always set
20941         LocalInfo.Used here.
20942
20943 2003-12-13  Martin Baulig  <martin@ximian.com>
20944
20945         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20946         any value here; we're now using flow analysis to figure out
20947         whether a statement/block returns a value.
20948
20949 2003-12-13  Martin Baulig  <martin@ximian.com>
20950
20951         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20952         working again.
20953         (FlowBranching.MergeFinally): Don't call
20954         `branching.CheckOutParameters()' here, this is called in
20955         MergeTopBlock().
20956         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20957         when adding the `finally' vector.       
20958
20959 2003-12-13  Martin Baulig  <martin@ximian.com>
20960
20961         * flowanalysis.cs
20962         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20963         actually work and also fix #48962.
20964
20965 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20966
20967         * decl.cs: Do not check System.Object for nested types,
20968         since we know it does not have any. Big bang for buck:
20969
20970         BEFORE:
20971            Run 1:   8.35 seconds
20972            Run 2:   8.32 seconds
20973            corlib:  17.99 seconds
20974         AFTER:
20975            Run 1:   8.17 seconds
20976            Run 2:   8.17 seconds
20977            corlib:  17.39 seconds
20978
20979 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20980
20981         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20982         time we are returning 0 members, so we save alot here.
20983
20984 2003-12-11  Martin Baulig  <martin@ximian.com>
20985
20986         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20987         `MergeChild()', also just take the `FlowBranching' as argument;
20988         call Merge() on it and return the result.
20989         (FlowBranching.Merge): We don't need to do anything if we just
20990         have one sibling.
20991
20992 2003-12-11  Martin Baulig  <martin@ximian.com>
20993
20994         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20995         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20996         Maurer for this idea.
20997
20998 2003-12-11  Martin Baulig  <martin@ximian.com>
20999
21000         * flowanalysis.cs (MergeResult): This class is now gone; we now
21001         use the `UsageVector' for this.  The reason for this is that if a
21002         branching just has one sibling, we don't need to "merge" them at
21003         all - that's the next step to do.
21004         (FlowBranching.Merge): We now return a `UsageVector' instead of a
21005         `MergeResult'.
21006
21007 2003-12-11  Martin Baulig  <martin@ximian.com>
21008
21009         Reworked flow analyis and made it more precise and bug-free.  The
21010         most important change is that we're now using a special `Reachability'
21011         class instead of having "magic" meanings of `FlowReturns'.  I'll
21012         do some more cleanups and optimizations and also add some more
21013         documentation this week.
21014
21015         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
21016         largely reworked this class.
21017         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
21018         the new `Reachability' class instead of having "magic" values here.
21019         (FlowBranching): We're now using an instance of `Reachability'
21020         instead of having separate `Returns', `Breaks' etc. fields.
21021
21022         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
21023         based on flow analysis; ignore the return value of block.Emit ().
21024
21025 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
21026
21027         * driver.cs typemanager.cs: Find the mono extensions to corlib even
21028         if they are private.
21029
21030 2003-12-09  Martin Baulig  <martin@ximian.com>
21031
21032         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
21033         call them directly on the UsageVector.
21034
21035 2003-12-09  Martin Baulig  <martin@ximian.com>
21036
21037         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
21038         Changed return type from `FlowReturns' to `Reachability'.
21039
21040 2003-12-09  Martin Baulig  <martin@ximian.com>
21041
21042         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
21043         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
21044         `Reachable' fields with a single `Reachability' one.
21045
21046 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21047
21048         * class.cs (FindMembers): Remove foreach's.
21049
21050         Bootstrap times:
21051
21052         BEFORE
21053                 Run 1:   8.74 seconds
21054                 Run 2:   8.71 seconds
21055
21056         AFTER
21057                 Run 1:   8.64 seconds
21058                 Run 2:   8.58 seconds
21059
21060
21061 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21062
21063         * cs-parser.jay:
21064         * gen-treedump.cs:
21065         * statement.cs:
21066         This patch does a few things:
21067                 1. EmptyStatement is now a singleton, so it is never reallocated.
21068                 2. All blah is EmptyStatement constructs have been changed to
21069                    blah == EmptyStatement.Value, which is much faster and valid
21070                    now that EmptyStatement is a singleton.
21071                 3. When resolving a block, rather than allocating a new array for
21072                    the non-empty statements, empty statements are replaced with
21073                    EmptyStatement.Value
21074                 4. Some recursive functions have been made non-recursive.
21075         Mainly the performance impact is from (3), however (1) and (2) are needed for
21076         this to work. (4) does not make a big difference in normal situations, however
21077         it makes the profile look saner.
21078
21079         Bootstrap times:
21080
21081         BEFORE
21082         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
21083         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
21084         Total memory allocated: 56397 KB
21085
21086         AFTER
21087         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
21088         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
21089         Total memory allocated: 55666 KB
21090
21091 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21092
21093         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
21094         than the hashtable in a hashtable version
21095
21096         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
21097         we always end up concating a string. This results in a huge perf
21098         loss, because many strings have to be tracked by the GC. In this
21099         patch, we first use a hashtable that works with two keys, so that
21100         the strings do not need to be concat'ed.
21101
21102         Bootstrap times:
21103         BEFORE
21104                 Run 1:   8.74 seconds
21105                 Run 2:   8.71 seconds
21106
21107         AFTER
21108                 Run 1:   8.65 seconds
21109                 Run 2:   8.56 seconds
21110
21111 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
21112
21113         * Makefile: Add a new target `do-time' that does a quick and simple
21114         profile, leaving easy to parse output.
21115
21116 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
21117
21118         * codegen.cs (Init): Create the dynamic assembly with 
21119         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
21120
21121 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
21122
21123         * support.cs: Make the PtrHashtable use only one
21124         instance of its comparer.
21125
21126 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
21127
21128         * typemanager.cs: Fix lookup of GetNamespaces.
21129
21130 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
21131
21132         * expression.cs: Removed redundant line.
21133
21134         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
21135         ArrayLists, use for loops with bounds.  
21136
21137         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
21138         arraylist.
21139
21140         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
21141         arraylists, use for loop with bounds.
21142
21143         The above three changes give us a 0.071 second performance
21144         improvement out of 3.294 seconds down to 3.223.  On my machine
21145         the above changes reduced the memory usage by 1,387 KB during
21146         compiler bootstrap.
21147
21148         * cs-parser.jay (QualifiedIdentifier): New class used to represent
21149         QualifiedIdentifiers.  Before we created a new string through
21150         concatenation, and mostly later on, the result would be
21151         manipulated by DecomposeQI through string manipulation.
21152
21153         This reduced the compiler memory usage for bootstrapping from
21154         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
21155         compile times in 0.05 seconds.
21156
21157 2003-11-28  Dick Porter  <dick@ximian.com>
21158
21159         * support.cs: Do string compares with the Invariant culture.
21160
21161         * rootcontext.cs: 
21162         * gen-treedump.cs: 
21163         * expression.cs: 
21164         * driver.cs: 
21165         * decl.cs: 
21166         * codegen.cs: 
21167         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
21168         the comparison is done with the Invariant culture.
21169
21170 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
21171
21172         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
21173         GetEnumerator method.
21174
21175         (ProbeCollectionType): Iterate starting at the most specific type
21176         upwards looking for a GetEnumerator
21177
21178         * expression.cs: Shift count can be up to 31 for int/uint and 63
21179         for long/ulong.
21180
21181 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
21182
21183         * statement.cs (Block.LookupLabel): Also look for the label on the
21184         children blocks.  Use a hash table to keep track of visited
21185         nodes. 
21186
21187         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
21188         we actually did transform the other operand, otherwise fall back
21189         to the common codepath that casts to long.
21190
21191         * cs-tokenizer.cs: Use the same code pattern as the int case.
21192         Maybe I should do the parsing myself, and avoid depending on the
21193         Parse routines to get this done.
21194
21195 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
21196
21197         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
21198         which fixes bug 51347.  This time test it.
21199
21200         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
21201         attributes for example can not tell the difference between these.
21202         The difference was only a syntax feature of the language. 
21203
21204         * attribute.cs: Apply attributes to delegates.
21205
21206         * delegate.cs: Call the apply attributes method.
21207
21208 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
21209
21210         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
21211         comparing 0 vs Byte.MinValue, not the value
21212
21213         (ImplicitConversionRequired): When reporting a conversion error,
21214         use error 31 to print out the constant error instead of the
21215         simpler 29.
21216
21217         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
21218         which fixes bug 51347.
21219
21220 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
21221
21222         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
21223         which fixes the -warnaserror command line option.
21224
21225 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
21226
21227         * cfold.cs (DoNumericPromotions): During constant folding of
21228         additions on UIntConstant, special case intconstants with
21229         IntConstants like we do on the expression binary operator. 
21230
21231 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
21232
21233         * convert.cs (ImplicitReferenceConversion): We were missing a case
21234         (System.Enum are not value types or class types, so we need to
21235         classify them separatedly).
21236
21237         * driver.cs: We do not support error 2007.
21238
21239 2003-11-12 Jackson Harper <jackson@ximian.com>
21240
21241         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
21242         system directory. Also use the full file name so users can
21243         libraries names mscorlib-o-tron.dll in a non system dir.
21244
21245 2003-11-10  Martin Baulig  <martin@ximian.com>
21246
21247         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
21248         (TypeManager.InitCoreTypes): Initialize them here, but instead of
21249         calling `ResolveType()' on them, directly assign their `Type'.
21250
21251 2003-11-08  Martin Baulig  <martin@ximian.com>
21252
21253         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
21254         return value and the `out parent' parameter.
21255         (TypeContainer.DefineType): Moved the CS0644 check into
21256         GetClassBases().  Don't pass the interface types to the
21257         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
21258         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
21259
21260         * ecore.cs (TypeExpr.IsAttribute): New property.
21261         (TypeExpr.GetInterfaces): New method.
21262
21263         * interface.cs (Interface.GetInterfaceTypeByName): Return a
21264         TypeExpr instead of a Type.
21265         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
21266         (Interface.DefineType): Don't pass the interface types to the
21267         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
21268         them later and then call `TypeBulider.AddInterfaceImplementation()'.
21269
21270         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
21271         instead of a `Type[]'.
21272         (TypeManager.RegisterBuilder): Likewise.
21273         (TypeManager.AddUserInterface): Likewise.
21274         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
21275         `Type[]' and also return a `TypeExpr[]'.
21276         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
21277
21278 2003-11-08  Martin Baulig  <martin@ximian.com>
21279
21280         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
21281         Expression.     
21282
21283 2003-11-08  Martin Baulig  <martin@ximian.com>
21284
21285         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
21286         TypeManager.ResolveExpressionTypes().
21287
21288         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
21289         instead of an Expression.
21290         (TypeExpr): This is now an abstract base class for `TypeExpression'.
21291         (TypeExpression): New public class; formerly known as `TypeExpr'.
21292
21293         * expression.cs (ComposedCast): Derive from TypeExpr.
21294
21295         * typemanager.cs (TypeManager.system_*_expr): These are now
21296         TypExpr's instead of Expression's.
21297         (TypeManager.ResolveExpressionTypes): New public static function;
21298         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
21299         of them.        
21300
21301 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
21302
21303         * expression.cs (New.DoResolve): Do not dereference value that
21304         might be a null return.
21305
21306         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
21307         sure that the constant value has the right type.  Fixes an
21308         unreported bug, similar to 50425.
21309
21310         * const.cs (Const.LookupConstantValue): Call
21311         ImplicitStandardConversionExists before doing a conversion to
21312         avoid havng the TypeManager.ChangeType do conversions.
21313
21314         Reduced the number of casts used
21315
21316         (Const.ChangeType): New routine to enable reuse of the constant
21317         type changing code from statement.
21318
21319         * typemanager.cs (ChangeType): Move common initialization to
21320         static global variables.
21321
21322         Fixes #50425.
21323
21324         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
21325         every value type to go through, even if it was void.  Fix that. 
21326
21327         * cs-tokenizer.cs: Use is_identifier_start_character on the start
21328         character of the define, and the is_identifier_part_character for
21329         the rest of the string.
21330
21331 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
21332
21333         * expression.cs (UnaryMutator.EmitCode): When I updated
21334         LocalVariableReference.DoResolve, I overdid it, and dropped an
21335         optimization done on local variable references.
21336
21337 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
21338
21339         * ecore.cs: Convert the return from Ldlen into an int.
21340
21341 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
21342
21343         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
21344         the accessibility, this is a special case for toplevel non-public
21345         classes (internal for instance).
21346
21347 2003-10-20  Nick Drochak <ndrochak@gol.com>
21348
21349         * ecore.cs: Fix typo and build.  Needed another right paren.
21350
21351 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
21352
21353         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
21354         `internal' case regular and protected, but not allowing protected
21355         to be evaluated later.  Bug 49840
21356
21357 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
21358
21359         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
21360         to kb.Nlast, and not the kb.nFirst to isolate the switch
21361         statement.
21362
21363         Extract the underlying type, so enumerations of long/ulong are
21364         treated like long/ulong.
21365
21366 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
21367
21368         * expression.cs (New): Overload the meaning of RequestedType to
21369         track the possible creation of the NewDelegate type, since
21370         DoResolve is invoked more than once for new constructors on field
21371         initialization.
21372
21373         See bugs: #48800 and #37014
21374
21375         * cs-parser.jay (declare_local_constants): Take an arraylist
21376         instead of a single constant.
21377
21378         (local_constant_declaration): It should take a
21379         constant_declarators, not a constant_declarator.  Fixes 49487
21380
21381         * convert.cs: Fix error report.
21382
21383 2003-10-13 Jackson Harper <jackson@ximian.com>
21384
21385         * typemanager.cs (TypeToCoreType): Add float and double this fixes
21386         bug #49611
21387
21388 2003-10-09  Martin Baulig  <martin@ximian.com>
21389
21390         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
21391         to the .ctor.
21392         (MethodCore.DoDefineParameters): Removed the TypeContainer
21393         argument; use the DeclSpace which was passed to the .ctor instead.
21394         (MethodCore.CheckParameter): Take a DeclSpace instead of a
21395         TypeContainer; we only need a DeclSpace here.
21396
21397 2003-10-09  Martin Baulig  <martin@ximian.com>
21398
21399         * class.cs (MethodData): Added additional `DeclSpace ds' argument
21400         to the .ctor.
21401         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
21402         EmitContext's .ctor.    
21403
21404 2003-10-09  Martin Baulig  <martin@ximian.com>
21405
21406         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21407         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21408         AsAccessible(), moved them as well.
21409
21410         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21411
21412 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21413
21414         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21415
21416 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21417
21418         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21419         generation for >=, as spotted by Paolo, bug 48679.  
21420         Patch from David Waite.
21421
21422         * cs-tokenizer.cs: Add handling for #pragma.
21423
21424         * cs-parser.jay: Allow for both yield and yield return in the
21425         syntax.  The anti-cobolization of C# fight will go on!
21426
21427         * class.cs (TypeBuilder.DefineType): Catch error condition here
21428         (Parent.DefineType erroring out and returning null).
21429
21430         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21431         coping with enumerations variables, we were mistakenly processing
21432         them as a regular value type instead of built-in types.  Fixes the
21433         bug #48063
21434
21435         * typemanager.cs (IsBuiltinOrEnum): New method.
21436
21437 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21438
21439         * cs-parser.jay: Upgrade: yield now needs the return clause.
21440
21441 2003-09-19  Martin Baulig  <martin@ximian.com>
21442
21443         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21444         `MemberCache parent' argument.  Normally, an interface doesn't
21445         have a parent type except System.Object, but we use this in gmcs
21446         for generic type parameters.
21447
21448 2003-09-18  Martin Baulig  <martin@ximian.com>
21449
21450         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21451         on `type.IsInterface'; don't check whether the type has a parent
21452         to determine whether it's an interface.
21453
21454 2003-09-15  Martin Baulig  <martin@ximian.com>
21455
21456         * class.cs (TypeContainer.DefineType): Added an error flag to
21457         avoid reporting duplicate CS0146's ("class definition is
21458         circular.").
21459
21460         * driver.cs (Driver.MainDriver): Abort if
21461         RootContext.ResolveTree() reported any errors.
21462
21463 2003-09-07  Martin Baulig  <martin@ximian.com>
21464
21465         * report.cs (Error, Warning): Added overloaded versions which take
21466         a `params object[] args' and call String.Format().
21467
21468 2003-09-07  Martin Baulig  <martin@ximian.com>
21469
21470         * decl.cs (DeclSpace..ctor): Don't call
21471         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21472         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21473         (DeclSpace.RecordDecl): New method.
21474
21475         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21476
21477 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21478
21479         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21480         value attributes to be applied to ParameterBuilders.
21481
21482         * class.cs (MethodCore.LabelParameters): Make static and more
21483         generic so that it can be used from other places - like interface
21484         methods, for instance.
21485
21486         * interface.cs (Interface.Emit): Call LabelParameters before
21487         emitting attributes on the InterfaceMethod.
21488
21489 2003-08-26  Martin Baulig  <martin@ximian.com>
21490
21491         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21492         resolving aliases; fixes #47927.
21493
21494 2003-08-26  Martin Baulig  <martin@ximian.com>
21495
21496         * statement.cs (Using.DoResolve): This is internally emitting a
21497         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21498         do not always return.  Fixes #47681.
21499
21500 2003-08-26  Martin Baulig  <martin@ximian.com>
21501
21502         * decl.cs (MemberCore): Moved WarningNotHiding(),
21503         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21504         into MemberBase.
21505         (AdditionResult): Make this nested in DeclSpace.
21506         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21507         argument; call NamespaceEntry.Define() unless we're nested in a
21508         class or struct.
21509
21510         * namespace.cs (Namespace.DefineName): New public function.  This
21511         is called from DeclSpace's .ctor to add 
21512         (Namespace.Lookup): Include DeclSpaces in the lookup.
21513
21514         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21515
21516         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21517
21518 2003-08-25  Martin Baulig  <martin@ximian.com>
21519
21520         * convert.cs (Convert.ExplicitReferenceConversion): When
21521         converting from an interface type to a class, unbox if the target
21522         type is a struct type.  Fixes #47822.
21523
21524 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21525
21526         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21527         #47854.
21528
21529 2003-08-22  Martin Baulig  <martin@ximian.com>
21530
21531         * class.cs (TypeManager.DefineType): When defining a nested type,
21532         call DefineType() on our parent; fixes #47801.
21533
21534 2003-08-22  Martin Baulig  <martin@ximian.com>
21535
21536         * class.cs (MethodData.Define): While checking if a method is an
21537         interface implementation, improve the test a bit more to fix #47654.
21538
21539 2003-08-22  Martin Baulig  <martin@ximian.com>
21540
21541         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21542         correctly; fixes #47722.
21543
21544 2003-08-22  Martin Baulig  <martin@ximian.com>
21545
21546         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21547         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21548
21549         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21550
21551 2003-08-22  Martin Baulig  <martin@ximian.com>
21552
21553         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21554         can only be assigned in static constructors.  Fixes #47161.
21555
21556 2003-08-22  Martin Baulig  <martin@ximian.com>
21557
21558         Rewrote and improved the flow analysis code.
21559
21560         * flowbranching.cs (FlowBranching): Make this class abstract.
21561         (FlowBranching.CreateBranching): New static function to create a
21562         new flow branching.
21563         (FlowBranchingBlock, FlowBranchingException): New classes.
21564         (FlowBranching.UsageVector.Type): New public readonly field.
21565         (FlowBranching.UsageVector.Breaks): Removed the setter.
21566         (FlowBranching.UsageVector.Returns): Removed the setter.
21567         (FlowBranching.UsageVector): Added Break(), Return(),
21568         NeverReachable() and Throw() methods to modify the reachability.
21569         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21570         done by FlowBranching.Merge().
21571         (FlowBranching.UsageVector.MergeChild): New method; merges the
21572         merge result into the current vector.
21573         (FlowBranching.Merge): New abstract method to merge a branching.
21574
21575 2003-08-12  Martin Baulig  <martin@ximian.com>
21576
21577         * expression.cs (Indirection.CacheTemporaries): Create the
21578         LocalTemporary with the pointer type, not its element type.
21579
21580 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21581
21582         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21583         token was a keyword or not.
21584
21585         Add `error' options where an IDENTIFIER was expected;  Provide
21586         CheckToken and CheckIdentifierToken convenience error reporting
21587         functions. 
21588
21589         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21590
21591         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21592         NameSpaceEntry NameSpaceEntry.
21593
21594         (LookupInterfaceOrClass): Avoid creating a full qualified name
21595         from namespace and name: avoid doing lookups when we know the
21596         namespace is non-existant.   Use new Tree.LookupByNamespace which
21597         looks up DeclSpaces based on their namespace, name pair.
21598
21599         * driver.cs: Provide a new `parser verbose' to display the
21600         exception thrown during parsing.  This is turned off by default
21601         now, so the output of a failure from mcs is more graceful.
21602
21603         * namespace.cs: Track all the namespaces defined in a hashtable
21604         for quick lookup.
21605
21606         (IsNamespace): New method
21607
21608 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21609
21610         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21611         we know that we need to concatenate (full typename can never be
21612         null). 
21613
21614         * class.cs: ditto.
21615
21616         * statement.cs: Use a bitfield;  Do not initialize to null things
21617         which are done by the constructor by default.
21618
21619         * cs-parser.jay: bug fix, parameter was 4, not 3.
21620
21621         * expression.cs: Just use the property;
21622
21623         * statement.cs: No need for GetVariableInfo method.
21624
21625 2003-08-08  Martin Baulig  <martin@ximian.com>
21626
21627         * flowanalysis.cs (FlowReturns): This is now nested in the
21628         `FlowBranching' class.
21629         (MyBitVector): Moved this here from statement.cs.
21630         (FlowBranching.SiblingType): New enum type.
21631         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21632
21633 2003-08-07  Martin Baulig  <martin@ximian.com>
21634
21635         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21636         `FlowBranching' class and called `BranchingType'.
21637
21638 2003-08-07  Martin Baulig  <martin@ximian.com>
21639
21640         * flowanalysis.cs: Moved all the control flow analysis code into
21641         its own file.
21642
21643 2003-08-07  Martin Baulig  <martin@ximian.com>
21644
21645         * assign.cs (Assign.DoResolve): `target' must either be an
21646         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21647         #37319.
21648
21649 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21650
21651         * expression.cs (BinaryMethod): This kind of expression is created by the
21652         Binary class if it determines that the operator has to be handled
21653         by a method.
21654
21655         (BinaryDelegate): This kind of expression is created if we are
21656         dealing with a + or - operator on delegates.
21657
21658         (Binary): remove method, argumetns, and DelegateOperator: when
21659         dealing with methods, 
21660
21661         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21662
21663         * statement.cs (Block): use bitfields for the three extra booleans
21664         we had in use.   Remove unused topblock parameter.
21665
21666         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21667
21668         * assign.cs: Drop extra unneeded tests.
21669
21670 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21671
21672         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21673
21674         * statement.cs (Foreach): Use VariableStorage instead of
21675         LocalBuilders.   
21676
21677         * codegen.cs (VariableStorage): New class used by clients that
21678         require a variable stored: locals or fields for variables that
21679         need to live across yield.
21680
21681         Maybe provide a convenience api for EmitThis+EmitLoad?
21682
21683         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21684         these bad boys.
21685
21686 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21687
21688         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21689         RemapParameterLValue): New methods that are used to turn a
21690         precomputed FieldInfo into an expression like this:
21691
21692                 instance.FieldInfo
21693
21694         The idea is to use this instead of making LocalVariableReference
21695         have more than one meaning.
21696
21697         * cs-parser.jay: Add error production to BASE.
21698
21699         * ecore.cs: Deal with TypeManager.GetField returning null, which
21700         is now a valid return value.
21701
21702         (FieldExprNoAddress): New expression for Fields whose address can
21703         not be taken.
21704
21705         * expression.cs (LocalVariableReference): During the resolve
21706         phases, create new expressions if we are in a remapping context.
21707         Remove code that dealt with remapping here.
21708
21709         (ParameterReference): same.
21710
21711         (ProxyInstance): New expression, like the `This' expression, but
21712         it is born fully resolved.  We know what we are doing, so remove
21713         the errors that are targeted to user-provided uses of `this'.
21714
21715         * statement.cs (Foreach): our variable is now stored as an
21716         Expression;  During resolution, follow the protocol, dont just
21717         assume it will return this.
21718
21719 2003-08-06  Martin Baulig  <martin@ximian.com>
21720
21721         * support.cs (SeekableStreamReader.cs): New public class.
21722
21723         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21724         SeekableStreamReader instead of the normal StreamReader.
21725
21726 2003-08-04  Martin Baulig  <martin@ximian.com>
21727
21728         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21729         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21730         deambiguate casts and delegate invocations.
21731         (parenthesized_expression): Use the new tokens to ensure this is
21732         not a cast of method invocation.
21733
21734         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21735         when reading a `)' and Deambiguate_CloseParens () was previously
21736         called.
21737
21738         * expression.cs (ParenthesizedExpression): New class.  This is
21739         just used for the CS0075 test.
21740         (Binary.DoResolve): Check for CS0075.   
21741
21742 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21743
21744         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21745         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21746         reference comparison.
21747
21748         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21749         examine the ReturnType for equality - this is necessary in the
21750         cases of implicit and explicit operators whose signature also
21751         includes the return type.
21752
21753 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21754
21755         * namespace.cs: Cache the result of the namespace computation,
21756         instead of computing it every time.
21757
21758 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21759
21760         * decl.cs: Use a global arraylist that we reuse over invocations
21761         to avoid excesive memory consumption.  Reduces memory usage on an
21762         mcs compile by one meg (45 average).
21763
21764         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21765         private, work around that.
21766
21767 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21768
21769         * literal.cs (IntLiteral): Define Zero and One static literals. 
21770
21771         * cs-parser.jay (integer_literal): use static literals to reduce
21772         memory usage for the most used literals (0, 1 and -1).  211kb
21773         reduced in memory usage.
21774
21775         Replace all calls to `new ArrayList' with `new
21776         ArrayList(4)' which is a good average number for most allocations,
21777         and also requires only 16 bytes of memory for its buffer by
21778         default. 
21779
21780         This reduced MCS memory usage in seven megabytes for the RSS after
21781         bootstrapping.
21782
21783 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21784
21785         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21786         handle params methods the correct way by forming only one
21787         applicable set with params and normal methods in them. Earlier we
21788         were looking at params methods only if we found no normal methods
21789         which was not the correct thing to do.
21790
21791         (Invocation.BetterFunction): Take separate arguments indicating
21792         when candidate and the best method are params methods in their
21793         expanded form.
21794
21795         This fixes bugs #43367 and #46199.
21796
21797         * attribute.cs: Documentation updates.
21798
21799         (CheckAttribute): Rename to CheckAttributeTarget.
21800         (GetValidPlaces): Rename to GetValidTargets.
21801
21802         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21803         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21804
21805         Fixes bug #44468.
21806
21807 2003-07-28  Martin Baulig  <martin@ximian.com>
21808
21809         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21810         name when looking up the base class of a nested class.  Fixes #46977.
21811
21812 2003-07-26  Martin Baulig  <martin@ximian.com>
21813
21814         * expression.cs (Indexers.Indexer): New nested struct; contains
21815         getter, setter and the indexer's type.
21816         (Indexers.Properties): This is now an ArrayList of
21817         Indexers.Indexer's.
21818         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21819         indexer doesn't have any getters.
21820
21821         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21822         for embedded property and indexer assignments.
21823
21824 2003-07-26  Martin Baulig  <martin@ximian.com>
21825
21826         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21827         preprocessor directive is not the first non-whitespace character
21828         on a line.
21829
21830 2003-07-26  Martin Baulig  <martin@ximian.com>
21831
21832         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21833         namespace parsing, follow the spec more closely.
21834
21835         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21836         NamespaceEntry.Lookup().
21837
21838 2003-07-25  Martin Baulig  <martin@ximian.com>
21839
21840         * MethodCore.cs (OverridesSomething): New public field; it's set
21841         from TypeContainer.DefineMembers if this method overrides
21842         something (which doesn't need to be a method).  Fix #39462.
21843
21844 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21845
21846         * typemanager.cs (GetMembers): Ensure that the list of members is
21847         reversed. This keeps things in sync.
21848
21849         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21850         find an AttributeUsage attribute.
21851
21852         * expression.cs (Invocation.OverloadResolve): Perform the check
21853         which disallows Invoke to be directly called on a Delegate.
21854
21855         (Error_InvokeOnDelegate): Report error cs1533.
21856
21857 2003-07-25  Martin Baulig  <martin@ximian.com>
21858
21859         * expression.cs (Indexers.GetIndexersForType): Only look in the
21860         interface hierarchy if the requested type is already an
21861         interface.  Fixes #46788 while keeping #46502 fixed.
21862
21863 2003-07-25  Martin Baulig  <martin@ximian.com>
21864
21865         * class.cs (TypeContainer.DefineMembers): Check whether all
21866         readonly fields have been assigned and report warning CS0649 if
21867         not.
21868
21869         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21870         a valuetype.
21871
21872 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21873
21874         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21875         returned from GetMethods to make things consistent with the
21876         assumptions MCS makes about ordering of methods.
21877
21878         This should comprehensively fix bug #45127 and it does :-)
21879
21880         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21881         ordering is actually reverse.
21882
21883         * Clean up some debug messages I left lying around.
21884
21885         * interface.cs (Populate*): Get rid of code which emits attributes
21886         since the stage in which we emit attributes is the 'Emit' stage,
21887         not the define stage.
21888
21889         (Emit): Move attribute emission for interface members here.
21890
21891 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21892
21893         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21894         closely: we eliminate methods in base types when we have an
21895         applicable method in a top-level type.
21896
21897         Please see section 14.5.5.1 for an exact description of what goes
21898         on. 
21899
21900         This fixes bug #45127 and a host of other related to corlib compilation.
21901
21902         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21903         array is the method corresponding to the top-level type (this is
21904         because of the changes made to icall.c) so we change this
21905         accordingly.
21906
21907         (MethodGroupExpr.Name): This too.
21908
21909         * typemanager.cs (GetElementType): New method which does the right
21910         thing when compiling corlib. 
21911
21912         * everywhere: Make use of the above in the relevant places.
21913
21914 2003-07-22  Martin Baulig  <martin@ximian.com>
21915
21916         * cs-parser.jay (invocation_expression): Moved
21917         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21918         `cast_expression', but create a InvocationOrCast which later
21919         resolves to either an Invocation or a Cast.
21920
21921         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21922         method; call this before EmitStatement() to make sure that this
21923         expression can be used as a statement.
21924
21925         * expression.cs (InvocationOrCast): New class; resolves to either
21926         an Invocation or a Cast.
21927
21928         * statement.cs (StatementExpression): Call ResolveStatement() on
21929         the ExpressionStatement before emitting it.
21930
21931 2003-07-21  Martin Baulig  <martin@ximian.com>
21932
21933         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21934         `ref' and `out' attributes match; fixes #46220.
21935         (MemberAccess.ResolveMemberAccess): You can't reference a type
21936         through an expression; fixes #33180.
21937         (Indexers.GetIndexersForType): Don't return the indexers from
21938         interfaces the class implements; fixes #46502.
21939
21940 2003-07-21  Martin Baulig  <martin@ximian.com>
21941
21942         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21943         CS0661 checks; fixes bug #30442.
21944
21945 2003-07-21  Martin Baulig  <martin@ximian.com>
21946
21947         * decl.cs (AdditionResult): Added `Error'.
21948
21949         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21950
21951         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21952         makes cs0031.cs actually work.
21953
21954 2003-07-20  Martin Baulig  <martin@ximian.com>
21955
21956         * namespace.cs: Fixed that bug which caused a crash when compiling
21957         the debugger's GUI.
21958
21959 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21960
21961         * typemanager.cs (LookupTypeReflection): Never expose types which
21962         are NotPublic, NestedPrivate, NestedAssembly, or
21963         NestedFamANDAssem.  We used to return these, and later do a check
21964         that would report a meaningful error, but the problem is that we
21965         would not get the real match, if there was a name override.
21966
21967 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21968
21969         * namespace.cs (Namespace, Name): Do not compute the namespace
21970         name dynamically, compute it in the constructor.  This reduced
21971         memory usage by 1697 KB.
21972
21973         * driver.cs: Use --pause to pause at the end.
21974
21975 2003-07-17  Peter Williams  <peter@newton.cx>
21976
21977         * Makefile: Change the name of the test target so that it doesn't
21978         conflict with the recursive test target.
21979
21980 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21981
21982         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21983         AddressOf): Do not use EmitThis, that was wrong, use the actual
21984         this pointer.
21985
21986 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21987
21988         * class.cs (MethodData.Define): While checking if a method is an
21989         interface implementation, improve the test: If we are not public
21990         (use new test here: use the computed MethodAttributes directly,
21991         instead of the parsed modifier flags) check if the `implementing'
21992         method comes from an interface or not.
21993
21994         * pending.cs (VerifyPendingMethods): Slightly better error
21995         message.
21996
21997         * makefile: add test target that does the mcs bootstrap.
21998
21999 2003-07-16  Ravi Pratap  <ravi@ximian.com>
22000
22001         * interface.cs (Define): Do nothing here since there are no
22002         members to populate etc. Move the attribute emission out of here
22003         since this was just totally the wrong place to put it. Attribute
22004         application happens during the 'Emit' phase, not in the 'Define'
22005         phase.
22006
22007         (Emit): Add this method and move the attribute emission here
22008
22009         * rootcontext.cs (EmitCode): Call the Emit method on interface
22010         types too.
22011
22012 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
22013
22014         * expression.cs (OverloadResolve): Report error only if Location
22015         is not 'Null' which means that there was a probe going on.
22016
22017 2003-07-14  Martin Baulig  <martin@ximian.com>
22018
22019         * expression.cs (ConditionalLogicalOperator): New public class to
22020         implement user defined conditional logical operators.
22021         This is section 14.11.2 in the spec and bug #40505.
22022
22023 2003-07-14  Martin Baulig  <martin@ximian.com>
22024
22025         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
22026
22027 2003-07-14  Martin Baulig  <martin@ximian.com>
22028
22029         * codegen.cs (EmitContext.InFixedInitializer): New public field.
22030
22031         * ecore.cs (IVariable.VerifyFixed): New interface method.
22032
22033         * expression.cs (Unary.ResolveOperator): When resolving the `&'
22034         operator, check whether the variable is actually fixed.  Fixes bug
22035         #36055.  Set a variable definitely assigned when taking its
22036         address as required by the spec.
22037
22038         * statement.cs (LocalInfo.IsFixed): New field.
22039         (LocalInfo.MakePinned): Set `IsFixed' to true.
22040
22041 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
22042
22043         * attribute.cs (Attribute.Resolve): While doing a Member lookup
22044         for .ctors, ensure that we only ask for members declared in the
22045         attribute type (BindingFlags.DeclaredOnly).
22046
22047         Fixes bug #43632.
22048
22049         * expression.cs (Error_WrongNumArguments): Report error 1501
22050         correctly the way CSC does.
22051
22052 2003-07-13  Martin Baulig  <martin@ximian.com>
22053
22054         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
22055         lookup on the fully qualified name, to make things like "X.X" work
22056         where "X.X" is a fully qualified type name, but we also have a
22057         namespace "X" in the using list.  Fixes #41975.
22058
22059 2003-07-13  Martin Baulig  <martin@ximian.com>
22060
22061         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
22062         function. If we're a CompoundAssign, we need to create an embedded
22063         CompoundAssign, not an embedded Assign.
22064         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
22065         Fixes #45854.
22066
22067 2003-07-13  Martin Baulig  <martin@ximian.com>
22068
22069         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
22070         work to fix bug #46088.
22071
22072 2003-07-13  Ravi Pratap <ravi@ximian.com>
22073
22074         * class.cs (Operator.Emit): Do not emit attributes here - it is
22075         taken care of by the Method class that we delegate too. This takes
22076         care of bug #45876.
22077
22078 2003-07-10  Martin Baulig  <martin@ximian.com>
22079
22080         * expression.cs (TypeOfVoid): New class.
22081         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
22082
22083 2003-07-10  Martin Baulig  <martin@ximian.com>
22084
22085         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
22086         bug #35957.
22087
22088 2003-07-10  Martin Baulig  <martin@ximian.com>
22089
22090         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
22091         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
22092
22093         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
22094
22095         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
22096
22097 2003-07-10  Martin Baulig  <martin@ximian.com>
22098
22099         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
22100         of decimal.  Fixes #42850.
22101
22102         NOTE: I also fixed the created byte blob, but this doesn't work on
22103         the MS runtime and csc never produces any byte blobs for decimal
22104         arrays.
22105
22106 2003-07-10  Martin Baulig  <martin@ximian.com>
22107
22108         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
22109         structs; fixes #32068.
22110         (Block.AddChildVariableNames): Fixed #44302.
22111
22112 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22113
22114         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
22115
22116 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
22117
22118         * attribute.cs: And this test is onger needed.
22119
22120 2003-07-08  Martin Baulig  <martin@ximian.com>
22121
22122         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
22123         inaccessible types.  Fixes #36313.
22124
22125         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
22126
22127         * namespace.cs (NamespaceEntry): Create implicit entries for all
22128         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
22129         implicit entries for N1.N2 and N1.
22130
22131 2003-07-08  Martin Baulig  <martin@ximian.com>
22132
22133         Rewrote the handling of namespaces to fix a lot of the issues
22134         wrt. `using' aliases etc.
22135
22136         * namespace.cs (Namespace): Splitted this class into a
22137         per-assembly `Namespace' and a per-file `NamespaceEntry'.
22138
22139         * typemanager.cs (TypeManager.IsNamespace): Removed.
22140         (TypeManager.ComputeNamespaces): Only compute namespaces from
22141         loaded assemblies here, not the namespaces from the assembly we're
22142         currently compiling.
22143
22144 2003-07-08  Martin Baulig  <martin@ximian.com>
22145
22146         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
22147
22148 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
22149
22150         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
22151         already fixed it.  
22152
22153         I thought about the memory savings here, but LookupTypeReflection
22154         is used under already very constrained scenarios.  Compiling
22155         corlib or mcs only exposes one hit, so it would not really reduce
22156         any memory consumption.
22157
22158 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22159
22160         * typemanager.cs: fixes bug #45889 by only adding public types from
22161         other assemblies to the list of known types.
22162
22163 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
22164
22165         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
22166         on the type we resolved.
22167
22168 2003-07-05  Martin Baulig  <martin@ximian.com>
22169
22170         * pending.cs (PendingImplementation.ParentImplements): Don't
22171         create the proxy if the parent is abstract.
22172
22173         * class.cs (TypeContainer.DefineIndexers): Process explicit
22174         interface implementations first.  Fixes #37714.
22175
22176 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
22177
22178         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
22179         defined recursively;  but since we modify the input parameters
22180         (left is set to `this' temporarily), we reset this value if the
22181         left_is_explicit is false, which gives the original semantics to
22182         the code.  
22183
22184         * literal.cs (NullPointer): new class used to represent a null
22185         literal in a pointer context.
22186
22187         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
22188         type is a pointer, use a NullPointer object instead of a
22189         NullLiteral.   Closes 43687
22190
22191         (ExplicitConversion): Convert pointer values using
22192         the conv opcode to the proper type.
22193
22194         * ecore.cs (New): change ValueTypeVariable property into a method,
22195         that returns whether the valuetype is suitable for being used.
22196
22197         * expression.cs (Binary.DoNumericPromotions): Only return if we
22198         the int constant was a valid uint, and we can return both left and
22199         right as uints.  If not, we continue processing, to trigger the
22200         type conversion.  This fixes 39018.
22201
22202         * statement.cs (Block.EmitMeta): During constant resolution, set
22203         the CurrentBlock property on the emitcontext, so that we resolve
22204         constants propertly.
22205
22206 2003-07-02  Martin Baulig  <martin@ximian.com>
22207
22208         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
22209         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
22210
22211         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
22212         than emitting it here.
22213
22214         * statement.cs: Fixed some more flow analysis bugs.
22215
22216 2003-07-02  Martin Baulig  <martin@ximian.com>
22217
22218         * class.cs (MethodData.Define): When implementing interface
22219         methods, set Final unless we're Virtual.
22220
22221         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
22222         check work for interface methods.
22223
22224 2003-07-01  Martin Baulig  <martin@ximian.com>
22225
22226         * ecore.cs (EmitContext.This): Replaced this property with a
22227         GetThis() method which takes a Location argument.  This ensures
22228         that we get the correct error location for a CS0188.
22229
22230 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
22231
22232         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
22233         ImplicitStandardConversion.
22234
22235         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
22236
22237 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
22238
22239         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
22240         optimization.
22241
22242 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
22243
22244         * class.cs (Constructor.Define): Turn off initlocals for unsafe
22245         constructors.
22246
22247         (MethodData.Define): Turn off initlocals for unsafe methods.
22248
22249 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
22250
22251         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
22252         complete;  Fixes #37521.
22253
22254         * delegate.cs: Use Modifiers.TypeAttr to compute the
22255         TypeAttributes, instead of rolling our own.  This makes the flags
22256         correct for the delegates.
22257
22258 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
22259
22260         * class.cs (Constructor.Define): Set the private flag for static
22261         constructors as well.
22262
22263         * cs-parser.jay (statement_expression): Set the return value to
22264         null, to avoid a crash when we catch an error.
22265
22266 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
22267
22268         * cs-parser.jay: Applied patch from Jackson that adds support for
22269         extern and unsafe modifiers to destructor declarations.
22270
22271         * expression.cs: Report error 21 if the user is trying to index a
22272         System.Array.
22273
22274         * driver.cs: Add an error message, suggested by the bug report.
22275
22276         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
22277         if we do not have a ": this ()" constructor initializer.  Fixes 45149
22278
22279 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
22280
22281         * namespace.cs: Add some information to reduce FAQs.
22282
22283 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
22284
22285         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
22286         underlying enumeration types.  Fixes #43915.
22287
22288         * expression.cs: Treat ushort/short as legal values to be used in
22289         bitwise operations.
22290
22291 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22292
22293         * delegate.cs: transfer custom attributes for paramenters from
22294         the delegate declaration to Invoke and BeginInvoke.
22295
22296 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22297
22298         * attribute.cs: handle custom marshalers and emit marshal info
22299         for fields, too.
22300
22301 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
22302
22303         * makefile.gnu: Added anonymous.cs to the compiler sources.
22304
22305 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
22306
22307         * iterators.cs: Change the name of the proxy class to include two
22308         underscores.
22309
22310         * cs-parser.jay: Update grammar to include anonymous methods.
22311
22312         * anonymous.cs: new file.
22313
22314 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
22315
22316         * class.cs (Field.Define): Add missing test for pointers and
22317         safety. 
22318
22319 2003-05-27  Ravi Pratap  <ravi@ximian.com>
22320
22321         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
22322         we use the stobj opcode.
22323
22324         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
22325         since it wasn't the correct fix. 
22326
22327         It still is puzzling that we are required to use stobj for IntPtr
22328         which seems to be a ValueType.
22329
22330 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
22331
22332         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
22333         during regular simple name resolution.   Now, the trick is that
22334         instead of returning for processing the simplename, we do a
22335         TypeManager.LookupType (ie, a rooted lookup as opposed to a
22336         contextual lookup type).   If a match is found, return that, if
22337         not, return for further composition.
22338
22339         This fixes long-standing 30485.
22340
22341         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
22342         using the address to initialize an object, do an Stobj instead of
22343         using the regular Stelem.
22344
22345         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
22346         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
22347         Because if we are a BaseIndexerAccess that value will be true.
22348         Fixes 43643.
22349
22350         * statement.cs (GotoCase.Resolve): Return after reporting an
22351         error, do not attempt to continue. 
22352
22353         * expression.cs (PointerArithmetic.Emit): If our operand is a
22354         long, convert our constants to match the operand before
22355         multiplying.  Convert to I type before adding.   Fixes 43670.
22356
22357 2003-05-14  Ravi Pratap  <ravi@ximian.com>
22358
22359         * enum.cs (ImplicitConversionExists) : Rename to
22360         ImplicitEnumConversionExists to remove ambiguity. 
22361
22362         * ecore.cs (NullCast): New type of cast expression class which
22363         basically is very similar to EmptyCast with the difference being
22364         it still is a constant since it is used only to cast a null to
22365         something else
22366         (eg. (string) null)
22367
22368         * convert.cs (ImplicitReferenceConversion): When casting a null
22369         literal, we return a NullCast.
22370
22371         * literal.cs (NullLiteralTyped): Remove - I don't see why this
22372         should be around anymore.
22373
22374         The renaming (reported was slightly wrong). Corrections:
22375
22376         ConvertImplicitStandard -> ImplicitConversionStandard
22377         ConvertExplicitStandard -> ExplicitConversionStandard
22378
22379         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
22380         before passing them in !
22381
22382         * convert.cs (ImplicitConversionStandard): When comparing for
22383         equal expr and target types, ensure that expr is not a
22384         NullLiteral.
22385
22386         In general, we must not be checking (expr_type ==
22387         target_type) in the top level conversion methods
22388         (ImplicitConversion, ExplicitConversion etc). This checking is
22389         done in the methods that they delegate to.
22390
22391 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
22392
22393         * convert.cs: Move Error_CannotConvertType,
22394         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
22395         ImplicitNumericConversion, ImplicitConversionExists,
22396         ImplicitUserConversionExists, StandardConversionExists,
22397         FindMostEncompassedType, FindMostSpecificSource,
22398         FindMostSpecificTarget, ImplicitUserConversion,
22399         ExplicitUserConversion, GetConversionOperators,
22400         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
22401         TryImplicitIntConversion, Error_CannotConvertImplicit,
22402         ConvertImplicitRequired, ConvertNumericExplicit,
22403         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
22404         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
22405         its own file.
22406
22407         Perform the following renames:
22408
22409         StandardConversionExists -> ImplicitStandardConversionExists
22410         ConvertImplicit -> ImplicitConversion
22411         ConvertImplicitStandard -> ImplicitStandardConversion
22412         TryImplicitIntConversion -> ImplicitIntConversion
22413         ConvertImplicitRequired -> ImplicitConversionRequired
22414         ConvertNumericExplicit -> ExplicitNumericConversion
22415         ConvertReferenceExplicit -> ExplicitReferenceConversion
22416         ConvertExplicit -> ExplicitConversion
22417         ConvertExplicitStandard -> ExplicitStandardConversion
22418
22419 2003-05-19  Martin Baulig  <martin@ximian.com>
22420
22421         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22422         (TypeInfo): Added support for structs having structs as fields.
22423
22424         * ecore.cs (FieldExpr): Implement IVariable.
22425         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22426         VariableInfo for the field.
22427
22428 2003-05-18  Martin Baulig  <martin@ximian.com>
22429
22430         * expression.cs (This.DoResolve): Report a CS0027 if we're
22431         emitting a field initializer.
22432
22433 2003-05-18  Martin Baulig  <martin@ximian.com>
22434
22435         * expression.cs (This.ResolveBase): New public function.
22436         (This.DoResolve): Check for CS0188.
22437
22438         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22439         This.Resolve().
22440
22441         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22442         `instance_expression' to null if we don't have any non-static
22443         methods.
22444
22445 2003-05-18  Martin Baulig  <martin@ximian.com>
22446
22447         Reworked the way how local variables and parameters are handled by
22448         the flow analysis code.
22449
22450         * statement.cs (TypeInfo, VariableMap): New public classes.
22451         (VariableInfo): New public class.  This is now responsible for
22452         checking whether a variable has been assigned.  It is used for
22453         parameters and local variables.
22454         (Block.EmitMeta): Take the InternalParameters as argument; compute
22455         the layout of the flow vectors here.
22456         (Block.LocalMap, Block.ParameterMap): New public properties.
22457         (FlowBranching): The .ctor doesn't get the InternalParameters
22458         anymore since Block.EmitMeta() now computes the layout of the flow
22459         vector.
22460         (MyStructInfo): This class is now known as `StructInfo' and nested
22461         in `TypeInfo'; we don't access this directly anymore.
22462
22463         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22464         property and removed IsAssigned(), IsFieldAssigned(),
22465         SetAssigned() and SetFieldAssigned(); we now call them on the
22466         VariableInfo so we don't need to duplicate this code everywhere.
22467
22468         * expression.cs (ParameterReference): Added `Block block' argument
22469         to the .ctor.
22470         (LocalVariableReference, ParameterReference, This): The new
22471         VariableInfo class is now responsible for all the definite
22472         assignment stuff.
22473
22474         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22475         IsParameterAssigned, SetParameterAssigned): Removed.
22476
22477 2003-05-18  Martin Baulig  <martin@ximian.com>
22478
22479         * typemanager.cs (InitCoreTypes): Try calling
22480         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22481         the 3-args-version.  Corlib now also needs our `void_type'.
22482         (GetMethod): Added overloaded version which takes an optional
22483         `bool report_errors' to allow lookups of optional methods.
22484
22485 2003-05-12  Martin Baulig  <martin@ximian.com>
22486
22487         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22488         only used for locals and not for parameters.
22489
22490 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22491
22492         * support.cs (InternalParameters.ParameterType): Return the
22493         ExternalType of the parameter.
22494
22495         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22496         they were unused.
22497
22498 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22499
22500         * class.cs (MethodData.Define): Do not set the `newslot' on
22501         interface members, if they are also flagged as "override".
22502
22503         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22504         better code for ++i and i++.  This only works for static fields
22505         and local variables.
22506
22507         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22508         want to pull the DeclSpace out of the builder_to_declspace instead
22509         of the TypeBuilder (like in TypeContainer.FindMembers).
22510
22511         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22512         instead of LookupTypeContainer.  Fixes the crash on .NET for
22513         looking up interface members.
22514
22515         * const.cs: Create our own emit context during the Definition
22516         stage, so that constants are evaluated in the proper context, when
22517         a recursive definition happens.
22518
22519 2003-05-11  Martin Baulig  <martin@ximian.com>
22520
22521         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22522         new block for a switch section.
22523         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22524         the adding/lookup in the switch block.  Fixes #39828.
22525
22526 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22527
22528         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22529         functionality: I needed to convert the data after I had performed
22530         the add/sub operation into the operands type size.
22531
22532         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22533         pass the type for the box operation, otherwise the resulting
22534         object would have been of type object.
22535
22536         (BoxedCast): Add constructor to specify the type to box as.
22537
22538 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22539
22540         * iterators.cs: I was reusing the `count' variable inadvertently,
22541         take steps to not allow this to happen.
22542
22543 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22544
22545         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22546         by creating an array at the point where the params starts and
22547         putting all those arguments there, then adjusting the size of the
22548         array.
22549
22550 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22551
22552         * expression.cs (New.AddressOf): Implement interface
22553         IMemoryLocation.  This is used when the `new' operator is used in
22554         the context of an invocation to a method on a value type.
22555
22556         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22557         example. 
22558
22559         * namespace.cs: Also check the using aliases here.
22560
22561         * driver.cs: Move the test for using validity after the types have
22562         been entered, so we do a single pass that also includes the using
22563         aliases. 
22564
22565         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22566         in the regular case.   CreateSiblingForFinally is doing extra
22567         error checking.
22568
22569         * attribute.cs (GetAttributeArgumentExpression): Store the result
22570         on an out value, and use the return value to indicate failure
22571         instead of using null (which is a valid return for Constant.GetValue).
22572
22573         * statement.cs: Perform the analysis flow for the increment
22574         portion after the statement, because this will be the real flow of
22575         execution.  Fixes #42385
22576
22577         * codegen.cs (EmitContext.EmitArgument,
22578         EmitContext.EmitStoreArgument): New helper functions when the
22579         RemapToProxy flag is set.
22580
22581         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22582         function.
22583
22584         Add support for remapping parameters. 
22585
22586         * iterators.cs: Propagate parameter values;  Store parameter
22587         values in the proxy classes.
22588
22589 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22590
22591         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22592         need a proxy reference;  I do not know what I was thinking
22593
22594         * cs-parser.jay (constructor_initializer): catch another error,
22595         and display nice message.
22596
22597         (field_declaration): catch void field declaration
22598         to flag a better error. 
22599
22600         * class.cs (MemberBase.CheckBase): Report an error instead of a
22601         warning if a new protected member is declared in a struct. 
22602         (Field.Define): catch the error of readonly/volatile.
22603
22604         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22605
22606         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22607         volatile variable is taken
22608
22609 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22610
22611         * statement.cs (Fixed.Resolve): Report an error if we are not in
22612         an unsafe context.
22613
22614 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22615
22616         * typemanager.cs: reuse the code that handles type clashes for
22617         delegates and enumerations.
22618
22619         * class.cs (Report28): Always report.
22620
22621         * expression.cs (EncodeAsAttribute): Allow nulls here.
22622
22623 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22624
22625         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22626         the functionality for testing whether an expression is valid for
22627         an attribute here.  Also handle the case of arrays of elements
22628         being stored. 
22629
22630         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22631         encoding a linear array into an array of objects that are suitable
22632         to be passed to an CustomAttributeBuilder.
22633
22634         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22635
22636         * ecore.cs: (FieldExpr): Handle field remapping here.
22637
22638         * iteratators.cs: Pass the instance variable (if the method is an
22639         instance method) to the constructors, so we can access the field
22640         variables on the class.
22641
22642         TODO: Test this with structs.  I think the THIS variable on
22643         structs might have to be a pointer, and not a refenrece
22644
22645 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22646
22647         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22648         local variables to fields in a proxy class.
22649
22650         * iterators.cs (PopulateProxy): Rename our internal fields to
22651         <XXX>.  
22652         Create a <THIS> field if we are an instance method, so we can
22653         reference our parent container variables.
22654         (MapVariable): Called back from the EmitContext code to enter a
22655         new variable to field mapping into the proxy class (we just create
22656         a FieldBuilder).
22657
22658         * expression.cs
22659         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22660         for using the remapped locals to fields.
22661
22662         I placed the code here, because that gives the same semantics to
22663         local variables, and only changes the Emit code.
22664
22665         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22666         statements inside iterators.
22667         (VariableInfo): Add a FieldBuilder for the cases when we are
22668         remapping local variables to fields in a proxy class
22669
22670         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22671         current_block != null.
22672
22673         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22674         not cope with strings, as it has been moved to the
22675         TableSwitchEmit.  Fixed bug in switch generation.
22676
22677         * expression.cs (New.DoResolve): Provide more context for the user
22678         when reporting an error.
22679
22680         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22681         pointers. 
22682
22683         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22684         check the permissions for it.  Note than in a type-resolution
22685         context the check was already present in DeclSpace.ResolveType,
22686         but was missing from the MemberAccess.
22687
22688         (ArrayCreation.CheckIndices): warn if the user has
22689         more nested levels of expressions, but there are no more
22690         dimensions specified.  Avoids crash on bug 41906.
22691
22692 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22693
22694         * statement.cs (Block): replace Implicit bool, for a generic
22695         flags.   
22696         New flag: `Unchecked'.  This is used during the EmitMeta phase
22697         (which is out-of-line with the regular Resolve/Emit process for a
22698         statement, as this is done ahead of time, but still gets a chance
22699         to call constant resolve).
22700
22701         (Block.Flags): new enum for adding a new flag.
22702
22703         (Block.EmitMeta): track the state of unchecked.
22704
22705         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22706         to enable constant resolution to work there as well.
22707
22708 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22709
22710         * typemanager.cs (ienumerable_type): Also look up
22711         System.Collections.IEnumerable. 
22712
22713 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22714
22715         TODO: Test more than one conditional per method.
22716
22717         * class.cs (Indexer.Define): Report the location where the user is
22718         referencing the unsupported feature.
22719
22720         (MethodData): Overload the use of `conditionals' to
22721         minimize the creation of needless ArrayLists.   This saves roughly
22722         212kb on my machine.
22723
22724         (Method): Implement the new IIteratorContainer interface.
22725         (Method.SetYields): Implement the method by setting the ModFlags
22726         to contain METHOD_YIELDS.
22727
22728         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22729         which just got set to null.
22730
22731         * iterators.cs: New file.
22732
22733         (Yield, YieldBreak): New statements.
22734
22735         * statement.cs (Return.Resolve): Flag an error if we are used in
22736         an iterator method.
22737
22738         * codegen.cs (InIterator): New flag set if the code is being
22739         compiled in an iterator method.
22740
22741         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22742         internal modifier, and we just use it to avoid adding extra
22743         fields, as this is seldom used.  
22744
22745         * cs-parser.jay: Add yield_statement (yield and yield break).
22746
22747         * driver.cs: New flag -v2 to turn on version 2 features. 
22748
22749         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22750         hashtable when v2 is enabled.
22751
22752 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22753
22754         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22755         there is already a namespace defined with this name.
22756
22757         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22758         people upgraded their corlibs.
22759
22760         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22761         always use fully qualified types, no need to use the compiler
22762         front end.
22763
22764         (TypeManager.IsNamespace): Use binarysearch.
22765
22766         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22767         AddDelegate): I did not quite use the new IsValid API properly: I
22768         have to pass the short-name and the fullname.  I was passing only
22769         the basename instead of the fullname sometimes. 
22770
22771         (TypeContainer.DefineType): call NamespaceClash.
22772
22773         * interface.cs (Interface.DefineType): use NamespaceClash before
22774         defining the type.
22775
22776         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22777         defining the type.
22778
22779         * enum.cs: (Enum.DefineType): use NamespaceClash before
22780         defining the type.
22781
22782         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22783         speed increase.  First, use the negative_hits cache when we get a
22784         negative.  Second, add the type with its full original name
22785         instead of the new . and + encoded name (reflection uses + to
22786         separate type from a nested type).  Use LookupTypeReflection
22787         directly which bypasses the type->name hashtable (that we already
22788         know does not contain the type.
22789
22790         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22791         location/container type. 
22792
22793         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22794
22795 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22796
22797         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22798
22799         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22800         method is being referenced in the method group from a static
22801         context, and report error 120 if so.
22802
22803         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22804         Error118. 
22805
22806         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22807         is created, we create the A namespace).
22808
22809         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22810         Fixes #41591
22811
22812 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22813
22814         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22815         invocation to ModuleBuilder.GetType with the same values will
22816         return a new type instance, so we need to cache its return
22817         values. 
22818
22819         * expression.cs (Binary.ResolveOperator): Only allow the compare
22820         operators on enums if they are of the same type.
22821
22822         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22823         types of ValueType on their own case.  Before we were giving them
22824         the same treatment as objects.
22825
22826         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22827         fullname.  Short name is used to compare against container name.
22828         Fullname is used to check against defined namespace names.
22829
22830         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22831         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22832
22833         (Method.CheckBase): Call parent.
22834         (MemberBase.CheckBase): Check for protected members on sealed
22835         classes.
22836         (PropertyBase.CheckBase): Call parent.
22837         (Field.Define): Call parent.
22838
22839         * report.cs: Negative error codes are now mapped to 8000 - code,
22840         so that the display is render more nicely.
22841
22842         * typemanager.cs: Do not use try/catch, instead report a regular
22843         error. 
22844
22845         (GetPointerType, GetReferenceType): These methods provide
22846         mechanisms to obtain the T* and T& from a T.  We had the code
22847         previously scattered around the code base, and it also used
22848         TypeManager.LookupType that would go through plenty of caches.
22849         This one goes directly to the type source.
22850
22851         In some places we did the Type.GetType followed by
22852         ModuleBuilder.GetType, but not in others, so this unifies the
22853         processing as well.
22854
22855         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22856         statements now that we have namespace information.
22857
22858         * typemanager.cs (IsNamespace): New method, returns whether the
22859         string presented is a namespace or not.
22860
22861         (ComputeNamespaces): New public entry point, computes the list of
22862         available namespaces, using the GetNamespaces API call in Mono, or
22863         the slower version in MS.NET.   
22864
22865         Now before we start the semantic analysis phase, we have a
22866         complete list of namespaces including everything that the user has
22867         provided.
22868
22869         Deleted old code to cache namespaces in .nsc files.
22870
22871 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22872
22873         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22874         class/struct location definition Location for the implicit
22875         constructor location.
22876
22877         (Operator.Define): Use the location of the operator for the
22878         implicit Method definition.
22879
22880         (Constructor.Emit): use the constructor location for the implicit
22881         base initializer constructor.
22882
22883         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22884         and the Expression class now contains two new methods:
22885
22886         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22887         isolate type lookup from the rest of the resolution process.
22888
22889         Since we use Expressions to hold type definitions due to the way
22890         we parse the input we have historically overloaded Resolve to
22891         perform the Type lookups if a special flag is passed.  Now this is
22892         eliminated and two methods take their place. 
22893
22894         The differences in the two methods between xStep and xTerminal is
22895         that xStep is involved in our current lookup system that uses
22896         SimpleNames to compose a name, while xTerminal is used just to
22897         catch the case where the simplename lookup failed.
22898
22899 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22900
22901         * expression.cs (ResolveMemberAccess): Remove redundant code.
22902         TypeExpr expressions are always born fully resolved.
22903
22904         * interface.cs (PopulateMethod): Do not lookup the types twice.
22905         We were doing it once during SemanticAnalysis and once during
22906         PopulateMethod.
22907
22908         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22909         in local variable type definitions, were being returned as a
22910         SimpleName (we decomposed everything into a string), that is
22911         because primary_expression was being used instead of a type in the
22912         grammar (reduce/reduce conflicts).
22913
22914         The part that was wrong is that we converted the expression into a
22915         string (an oversimplification in one hand, compounded with primary
22916         expressions doing string concatenation).
22917
22918         So things like:
22919
22920         A.B.C [] x;
22921
22922         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22923         using clauses from working on this particular context.  And a type
22924         was being matched directly against "A.B.C[]".
22925
22926         We now use the correct approach, and allow for ComposedCast to be
22927         part of the unary expression.  So the "A.B.C []" become a composed
22928         cast of "A.B.C" (as a nested group of MemberAccess with a
22929         SimpleName at the end) plus the rank composition "[]". 
22930
22931         Also fixes 35567
22932
22933 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22934
22935         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22936         for the access level checking.
22937
22938         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22939         `TypeContainer container', because I kept getting confused when I
22940         was debugging this code.
22941
22942         * expression.cs (Indexers): Instead of tracking getters/setters,
22943         we now track them in parallel.  We create one arraylist less, but
22944         most importantly it is possible now for the LValue code to find a
22945         matching get for a set.
22946
22947         (IndexerAccess.DoResolveLValue): Update the code.
22948         GetIndexersForType has been modified already to extract all the
22949         indexers from a type.  The code assumed it did not.
22950
22951         Also make the code set the correct return type for the indexer.
22952         This was fixed a long time ago for properties, but was missing for
22953         indexers.  It used to be void_type.
22954
22955         (Binary.Emit): Test first for doubles instead of
22956         floats, as they are more common.
22957
22958         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22959         when dealing with floats and the <=, >= operators.  This fixes bug
22960         #39314 
22961
22962         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22963         to load the array value by emitting a load on the foreach variable
22964         type.  This was incorrect.  
22965
22966         We now emit the code to load an element using the the array
22967         variable type, and then we emit the conversion operator.
22968
22969         Fixed #40176
22970
22971 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22972
22973         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22974
22975 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22976
22977         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22978         test for protection before we test for signatures. 
22979
22980         (MethodSignature.ToString): implement.
22981
22982         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22983         to the case where we reduced into a LongConstant.
22984
22985         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22986         depend on whether the information is acurrate, because the
22987         Microsoft runtime will always claim that the array type is public,
22988         regardless of the real state.
22989
22990         If the type is a pointer, another problem happens: the type is
22991         reported as non-public in Microsoft.  
22992
22993         In both cases we have to call CheckAccessLevel recursively with
22994         the underlying type as the argument to be tested.
22995
22996 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22997
22998         * assign.cs (Assign.Emit): If we are dealing with a compound
22999         assignment expression, we should use the code path that stores the
23000         intermediate result in a temporary value.  This fixes #40903.
23001
23002         *expression.cs (Indirection.ToString): Provide ToString method for
23003         debugging. 
23004
23005 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
23006
23007         * class.cs: Null out fields holding references to Block objects so
23008         they can be garbage collected.
23009
23010         * expression.cs (OverloadResolve): Remove unused local.
23011
23012 2003-04-07  Martin Baulig  <martin@ximian.com>
23013
23014         * codegen.cs (EmitContext.CurrentFile): New public field.
23015         (EmitContext.Mark): Use the CurrentFile to check whether the
23016         location is in the correct file.
23017         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
23018
23019 2003-04-07  Martin Baulig  <martin@ximian.com>
23020
23021         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
23022
23023         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
23024         location.  [FIXME: The location argument which gets passed to this
23025         method is sometimes wrong!]
23026
23027 2003-04-07  Nick Drochak <ndrochak@gol.com>
23028
23029         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
23030
23031 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
23032
23033         * expression.cs (Indirection.EmitAssign): We were using the
23034         temporary, but returning immediately instead of continuing the
23035         EmitAssing flow.
23036
23037 2003-04-06  Martin Baulig  <martin@ximian.com>
23038
23039         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
23040         if it's a nested child, but also deriving from the outer class.
23041         See test 190.cs.
23042
23043         * typemanager.cs (IsNestedChildOf): Make this work if it's a
23044         nested child, but also deriving from the outer class.  See
23045         test-190.cs.
23046         (FilterWithClosure): We may access private members of the outer
23047         class if we're a nested child and deriving from the outer class.
23048         (RealMemberLookup): Only set `closure_private_ok' if the
23049         `original_bf' contained BindingFlags.NonPublic.
23050
23051 2003-04-05  Martin Baulig  <martin@ximian.com>
23052
23053         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
23054
23055 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
23056
23057         * class.cs (Event.Define): Do not allow abstract events to have
23058         initializers. 
23059
23060 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
23061
23062         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
23063         block in event declarations.
23064
23065         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
23066         value type, get its address.
23067
23068         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
23069         leaving a class on the stack instead of a boolean value (int
23070         0/1).  Change the code so we compare against null, and then the
23071         result against zero.
23072
23073         * class.cs (TypeContainer.GetClassBases): We were checking for the
23074         parent class being sealed too late.
23075
23076         * expression.cs (Binary.Emit): For <= and >= when dealing with
23077         floating point values, use cgt.un and clt.un instead of cgt and
23078         clt alone.
23079
23080 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
23081
23082         * statement.cs: Apply the same optimization as MS: skip the 
23083         GetEnumerator returning an IEnumerator, and use the one returning a 
23084         CharEnumerator instead. This allows us to avoid the try-finally block 
23085         and the boxing.
23086
23087 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
23088
23089         * cs-parser.jay: Attributes cannot be applied to
23090                          namespaces. Fixes #40473
23091
23092 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23093
23094         * class.cs:
23095         (Add*): check if the name is valid using the full name for constants,
23096         fields, properties and events.
23097
23098 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
23099
23100         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
23101         char constants to be part of the enumeration.
23102
23103         * expression.cs (Conditional.DoResolve): Add support for operator
23104         true. Implements the missing functionality from 14.12
23105
23106         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
23107         operator true/false as required by the spec.
23108
23109         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
23110         implicit conversion to boolean.
23111
23112         * statement.cs (Statement.ResolveBoolean): A boolean expression is
23113         also one where the type implements `operator true'. 
23114
23115         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
23116         get an expression that will invoke operator true based on an
23117         expression.  
23118
23119         (GetConversionOperators): Removed the hack that called op_True
23120         here.  
23121
23122         (Expression.ResolveBoolean): Move this from Statement.
23123
23124 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
23125
23126         * ecore.cs (FieldExpr): do not allow initialization of initonly
23127         fields on derived classes
23128
23129 2003-03-13  Martin Baulig  <martin@ximian.com>
23130
23131         * statement.cs (Block.Emit): Call ig.BeginScope() and
23132         ig.EndScope() when compiling with debugging info; call
23133         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
23134
23135 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
23136
23137         * expression.cs (Indexers): Do not construct immediately, allow
23138         for new members to be appended as we go.  Fixes 38143
23139
23140 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23141
23142         * expression.cs: save/restore context when resolving an unchecked
23143         expression.
23144
23145 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
23146
23147         * cfold.cs: Catch division by zero in modulus operator during
23148         constant folding.
23149
23150 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
23151
23152         * interface.cs (Interface.DefineMembers): Avoid defining members
23153         twice. 
23154
23155 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
23156
23157         * driver.cs: handle the +/- options for -noconfig
23158
23159         * statement.cs (Unckeched.Resolve): Also track the state of
23160         unchecked in the Resolve phase.
23161
23162 2003-02-27  Martin Baulig  <martin@ximian.com>
23163
23164         * ecore.cs (Expression.MemberLookup): Don't create a
23165         MethodGroupExpr for something which is not a method.  Fixes #38291.
23166
23167 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
23168
23169         * class.cs (MemberBase.CheckParameters): Also check that the type
23170         is unmanaged if it is a pointer.
23171
23172         * expression.cs (SizeOf.Resolve): Add location information.
23173
23174         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
23175         a managed type is declared.
23176
23177         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
23178         parameter modifiers as well.  Fixes bug 38606
23179
23180         * class.cs: Very sad.  Am backing out the speed up changes
23181         introduced by the ArrayList -> Array in the TypeContainer, as they
23182         were not actually that much faster, and introduced a bug (no error
23183         reports on duplicated methods).
23184
23185         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
23186         source first, this will guarantee that we have a valid expression
23187         before calling in lower levels functions that will require a
23188         resolved object.  Then use this original_source in the
23189         target.ResolveLValue instead of the original source that was
23190         passed to us.
23191
23192         Another change.  Use target.Resolve instead of LValueResolve.
23193         Although we are resolving for LValues, we will let the Assign code
23194         take care of that (it will be called again from Resolve).  This
23195         basically allows code like this:
23196
23197         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
23198         class Y { void A (X x) { x [0] += o; }
23199
23200         The problem was that the indexer was trying to resolve for
23201         set_Item (idx, object o) and never finding one.  The real set_Item
23202         was set_Item (idx, X).  By delaying the process we get the right
23203         semantics. 
23204
23205         Fixes bug 36505
23206
23207 2003-02-23  Martin Baulig  <martin@ximian.com>
23208
23209         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
23210         while calling DoEmit ().
23211
23212         * codegen.cs (EmitContext.Mark): Don't mark locations in other
23213         source files; if you use the #line directive inside a method, the
23214         compiler stops emitting line numbers for the debugger until it
23215         reaches the end of the method or another #line directive which
23216         restores the original file.
23217
23218 2003-02-23  Martin Baulig  <martin@ximian.com>
23219
23220         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
23221
23222 2003-02-23  Martin Baulig  <martin@ximian.com>
23223
23224         * statement.cs (Block.AddChildVariableNames): We need to call this
23225         recursively, not just for our immediate children.
23226
23227 2003-02-23  Martin Baulig  <martin@ximian.com>
23228
23229         * class.cs (Event.Define): Always make the field private, like csc does.
23230
23231         * typemanager.cs (TypeManager.RealMemberLookup): Make events
23232         actually work, fixes bug #37521.
23233
23234 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
23235
23236         * delegate.cs: When creating the various temporary "Parameters"
23237         classes, make sure that we call the ComputeAndDefineParameterTypes
23238         on those new parameters (just like we do with the formal ones), to
23239         allow them to be resolved in the context of the DeclSpace.
23240
23241         This fixes the bug that Dick observed in Bugzilla #38530.
23242
23243 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
23244
23245         * expression.cs (ResolveMemberAccess): When resolving a constant,
23246         do not attempt to pull a constant if the value was not able to
23247         generate a valid constant.
23248
23249         * const.cs (LookupConstantValue): Do not report more errors than required.
23250
23251 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23252
23253         * expression.cs: fixes bug #38328.
23254
23255 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23256
23257         * class.cs: Changed all the various members that can be part of a
23258         class from being an ArrayList to be an Array of the right type.
23259         During the DefineType type_list, interface_list, delegate_list and
23260         enum_list are turned into types, interfaces, delegates and enums
23261         arrays.  
23262
23263         And during the member population, indexer_list, event_list,
23264         constant_list, field_list, instance_constructor_list, method_list,
23265         operator_list and property_list are turned into their real arrays.
23266
23267         Although we could probably perform this operation earlier, for
23268         good error reporting we need to keep the lists and remove the
23269         lists for longer than required.
23270
23271         This optimization was triggered by Paolo profiling the compiler
23272         speed on the output of `gen-sample-program.pl' perl script. 
23273
23274         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
23275         not crash in methods like MemberLookupFailed that use this field.  
23276
23277         This problem arises when the compiler fails to resolve a type
23278         during interface type definition for example.
23279
23280 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23281
23282         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
23283         inherit from System.Object, so we have to stop at null, not only
23284         when reaching System.Object.
23285
23286 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
23287
23288         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
23289         DeclaredOnly because the parent indexer might have had a different
23290         name, but did not loop until the top of the hierarchy was reached.
23291
23292         The problem this one fixes is 35492: when a class implemented an
23293         indexer from an interface, we were getting the interface method
23294         (which was abstract) and we were flagging an error (can not invoke
23295         abstract method).
23296
23297         This also keeps bug 33089 functioning, and test-148 functioning.
23298
23299         * typemanager.cs (IsSpecialMethod): The correct way of figuring
23300         out if a method is special is to see if it is declared in a
23301         property or event, or whether it is one of the predefined operator
23302         names.   This should fix correctly #36804.
23303
23304 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
23305
23306         The goal here is to remove the dependency on EmptyCast.Peel ().
23307         Killing it completely.
23308
23309         The problem is that currently in a number of places where
23310         constants are expected, we have to "probe" for an EmptyCast, and
23311         Peel, which is not the correct thing to do, as this will be
23312         repetitive and will likely lead to errors. 
23313
23314         The idea is to remove any EmptyCasts that are used in casts that
23315         can be reduced to constants, so we only have to cope with
23316         constants. 
23317
23318         This bug hunt was triggered by Bug 37363 and the desire to remove
23319         the duplicate pattern where we were "peeling" emptycasts to check
23320         whether they were constants.  Now constants will always be
23321         constants.
23322
23323         * ecore.cs: Use an enumconstant here instead of wrapping with
23324         EmptyCast.  
23325
23326         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
23327         throwing me off.  By handling this we can get rid of a few hacks.
23328
23329         * statement.cs (Switch): Removed Peel() code.
23330
23331 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
23332
23333         * class.cs: Location information for error 508
23334
23335         * expression.cs (New.DoResolve): Add a guard against double
23336         resolution of an expression.  
23337
23338         The New DoResolve might be called twice when initializing field
23339         expressions (see EmitFieldInitializers, the call to
23340         GetInitializerExpression will perform a resolve on the expression,
23341         and later the assign will trigger another resolution
23342
23343         This leads to bugs (#37014)
23344
23345         * delegate.cs: The signature for EndInvoke should contain any ref
23346         or out parameters as well.  We were not doing this in the past. 
23347
23348         * class.cs (Field.Define): Do not overwrite the type definition
23349         inside the `volatile' group.  Turns out that volatile enumerations
23350         were changing the type here to perform a validity test, which
23351         broke conversions. 
23352
23353 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
23354
23355         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
23356         and structs, we do not want to load the instance variable
23357
23358         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
23359         enum_type has to be handled like an object reference (implicit
23360         conversions exists from this to object), but the regular IsClass
23361         and IsValueType tests will never return true for this one.
23362
23363         Also we use TypeManager.IsValueType instead of type.IsValueType,
23364         just for consistency with the rest of the code (this is only
23365         needed if we ever use the construct exposed by test-180.cs inside
23366         corlib, which we dont today).
23367
23368 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
23369
23370         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
23371         just InternalCall.
23372
23373 2003-02-09  Martin Baulig  <martin@ximian.com>
23374
23375         * namespace.cs (Namespace..ctor): Added SourceFile argument.
23376         (Namespace.DefineNamespaces): New static public method; this is
23377         called when we're compiling with debugging to add all namespaces
23378         to the symbol file.
23379
23380         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
23381         pass it to the Namespace's .ctor.
23382
23383         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
23384         and MethodBase arguments; pass the namespace ID to the symwriter;
23385         pass the MethodBase instead of the token to the symwriter.
23386         (SymbolWriter.DefineNamespace): New method to add a namespace to
23387         the symbol file.
23388
23389 2003-02-09  Martin Baulig  <martin@ximian.com>
23390
23391         * symbolwriter.cs: New file.  This is a wrapper around
23392         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
23393         methods here in near future.
23394
23395 2003-02-09  Martin Baulig  <martin@ximian.com>
23396
23397         * codegen.cs (EmitContext.Mark): Just pass the arguments to
23398         ILGenerator.MarkSequencePoint() which are actually used by the
23399         symbol writer.
23400
23401 2003-02-09  Martin Baulig  <martin@ximian.com>
23402
23403         * location.cs (SourceFile): New public sealed class.  This
23404         contains the name and an index which is used in the location's token.
23405         (Location): Reserve an appropriate number of bits in the token for
23406         the source file instead of walking over that list, this gives us a
23407         really huge performance improvement when compiling with debugging.
23408
23409         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23410         `SourceFile' argument instead of a string.
23411         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23412         but don't parse/tokenize here, we need to generate the list of all
23413         source files before we do that.
23414         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23415         the files.
23416
23417         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23418         instead of a string.
23419
23420         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23421         of a string.
23422
23423 2003-02-09  Martin Baulig  <martin@ximian.com>
23424
23425         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23426         filename on `#line default'.
23427
23428 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23429
23430         * statement.cs: don't clear the pinned var when the fixed statement
23431         returns from the method (fixes bug#37752).
23432
23433 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23434
23435         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23436         to IsValueType.
23437
23438 2003-02-07  Martin Baulig  <martin@ximian.com>
23439
23440         * driver.cs: Removed the `--debug-args' command line argument.
23441
23442         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23443         automatically by the AsssemblyBuilder.
23444         (CodeGen.InitializeSymbolWriter): We don't need to call any
23445         initialization function on the symbol writer anymore.  This method
23446         doesn't take any arguments.
23447
23448 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23449
23450         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23451         from referenced assemblies as well.
23452
23453 2003-02-02  Martin Baulig  <martin@ximian.com>
23454
23455         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23456
23457 2003-02-02  Martin Baulig  <martin@ximian.com>
23458
23459         * class.cs (Constructor.Emit): Open the symbol writer before
23460         emitting the constructor initializer.
23461         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23462         single-stepping through constructor initializers.
23463
23464 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23465
23466         * class.cs: Handle error 549: do not allow virtual methods in
23467         sealed classes. 
23468
23469 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23470
23471         * decl.cs: Check access levels when resolving types
23472
23473 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23474
23475         * statement.cs: Add parameters and locals set in catch blocks that might 
23476         return to set vector
23477
23478 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23479
23480         * class.cs (Operator): Set the SpecialName flags for operators.
23481
23482         * expression.cs (Invocation.DoResolve): Only block calls to
23483         accessors and operators on SpecialName methods.
23484
23485         (Cast.TryReduce): Handle conversions from char constants.
23486
23487
23488 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23489
23490         * statement.cs: small memory and time optimization in FlowBranching.
23491
23492 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23493
23494         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23495         problem that the last fix but in the other sid (Set).
23496
23497         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23498         access when there is no indexer in the hierarchy.
23499
23500 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23501
23502         * class.cs: Combine some if statements.
23503
23504 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23505
23506         * driver.cs: fixed bug #37187.
23507
23508 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23509
23510         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23511         any indexer, it's needed to build a list with all the indexers in the
23512         hierarchy (AllGetters), else we have problems. Fixes #35653.
23513
23514 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23515
23516         * class.cs (MethodData.Define): It is wrong for an interface
23517         implementation to be static in both cases: explicit and implicit.
23518         We were only handling this in one case.
23519
23520         Improve the if situation there to not have negations.
23521
23522         * class.cs (Field.Define): Turns out that we do not need to check
23523         the unsafe bit on field definition, only on usage.  Remove the test.
23524
23525 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23526
23527         * driver.cs: use assembly.Location instead of Codebase (the latest
23528         patch made mcs fail when using MS assemblies).
23529
23530 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23531
23532         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23533         get the path to *corlib.dll.
23534
23535 2003-01-21  Nick Drochak <ndrochak@gol.com>
23536
23537         * cs-tokenizer.cs:
23538         * pending.cs:
23539         * typemanager.cs: Remove compiler warnings
23540
23541 2003-01-20  Duncan Mak  <duncan@ximian.com>
23542
23543         * AssemblyInfo.cs: Bump the version number to 0.19.
23544
23545 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23546
23547         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23548
23549 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23550
23551         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23552
23553 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23554
23555         * cs-parser.jay: Small fix: we were not comparing the constructor
23556         name correctly.   Thanks to Zoltan for the initial pointer.
23557
23558 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23559
23560         * cs-tokenizer.cs: Set file name when specified with #line
23561
23562 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23563
23564         * cs-parser.jay: Only perform the constructor checks here if we
23565         are named like the class;  This will help provider a better
23566         error.  The constructor path is taken when a type definition is
23567         not found, but most likely the user forgot to add the type, so
23568         report that rather than the constructor error.
23569
23570 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23571
23572         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23573         allocations.
23574
23575 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23576
23577         * cs-parser.jay: Add cleanup call.
23578
23579 2003-01-13  Duncan Mak  <duncan@ximian.com>
23580
23581         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23582         consistent with other methods.
23583
23584 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23585
23586         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23587
23588 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23589
23590         * attribute.cs: only set GuidAttr to true when we have a
23591         GuidAttribute.
23592
23593 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23594
23595         * ecore.cs:
23596         * expression.cs:
23597         * typemanager.cs: fixes to allow mcs compile corlib with the new
23598         Type.IsSubclassOf fix.
23599
23600 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23601
23602         * expression.cs (LocalVariableReference.DoResolve): Classify a
23603         constant as a value, not as a variable.   Also, set the type for
23604         the variable.
23605
23606         * cs-parser.jay (fixed_statement): take a type instead of a
23607         pointer_type, so we can produce a better error message later.
23608
23609         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23610         as an error.  
23611
23612         (For.DoEmit): Make inifinite loops have a
23613         non-conditional branch back.
23614
23615         (Fixed.DoEmit): First populate the pinned variables, then emit the
23616         statement, then clear the variables.  Before I was emitting the
23617         code once for each fixed piece.
23618
23619
23620 2003-01-08  Martin Baulig  <martin@ximian.com>
23621
23622         * statement.cs (FlowBranching.MergeChild): A break in a
23623         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23624
23625 2003-01-08  Martin Baulig  <martin@ximian.com>
23626
23627         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23628         lives in the same number space than `param_map'.  Fixes #36154.
23629
23630 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23631
23632         * cs-parser.jay (constructor_declaration): Set the
23633         Constructor.ModFlags before probing for it.  This makes the
23634         compiler report 514, 515 and 132 (the code was there, but got
23635         broken). 
23636
23637         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23638         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23639         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23640
23641 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23642
23643         * enum.cs: create the enum static fields using the enum type.
23644
23645 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23646
23647         * class.cs: don't try to create the ParamBuilder for the return
23648         type if it's not needed (and handle it breaking for the ms runtime
23649         anyway).
23650
23651 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23652
23653         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23654
23655 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23656
23657         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23658         the command.   This showed up while compiling the JANET source
23659         code, which used \r as its only newline separator.
23660
23661 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23662
23663         * class.cs (Method.Define): If we are an operator (because it
23664         reuses our code), then set the SpecialName and HideBySig.  #36128
23665
23666 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23667
23668         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23669         exception, report error 120 `object reference required'.
23670
23671         * driver.cs: Add --pause option, used during to measure the size
23672         of the process as it goes with --timestamp.
23673
23674         * expression.cs (Invocation.DoResolve): Do not allow methods with
23675         SpecialName to be invoked.
23676
23677 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23678
23679         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23680         number before adding it.
23681
23682 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23683
23684         * ecore.cs (StandardImplicitConversion): When in an unsafe
23685         context, we allow conversion between void * to any other pointer
23686         type. This fixes bug #35973.
23687
23688 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23689
23690         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23691         is not thrown when extensionless outputs are used 
23692
23693 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23694
23695         * rootcontext.cs: fixed compilation of corlib.
23696
23697 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23698
23699         * attribute.cs (Attributes.Contains): Add new method.
23700
23701         * class.cs (MethodCore.LabelParameters): if the parameter is an
23702         `out' parameter, check that no attribute `[In]' has been passed.
23703
23704         * enum.cs: Handle the `value__' name in an enumeration.
23705
23706 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23707
23708         * decl.cs: Added special case to allow overrides on "protected
23709         internal" methods
23710
23711 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23712
23713         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23714         since it makes much more sense.
23715
23716         (Attributes.ctor): Don't require a Location parameter.
23717
23718         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23719
23720         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23721         since we already have that information per attribute.
23722
23723         * everywhere : make appropriate changes.
23724
23725         * class.cs (LabelParameters): Write the code which actually
23726         applies attributes to the return type. We can't do this on the MS
23727         .NET runtime so we flag a warning in the case an exception is
23728         thrown.
23729
23730 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23731
23732         * const.cs: Handle implicit null conversions here too.
23733
23734 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23735
23736         * class.cs (MethodCore.LabelParameters): Remove the extra
23737         Type [] parameter since it is completely unnecessary. Instead
23738         pass in the method's attributes so that we can extract
23739         the "return" attribute.
23740
23741 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23742
23743         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23744         of ignoring it and letting the compile continue.
23745
23746         * typemanager.cs (ChangeType): use an extra argument to return an
23747         error condition instead of throwing an exception.
23748
23749 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23750
23751         * expression.cs (Unary.TryReduce): mimic the code for the regular
23752         code path.  Perform an implicit cast in the cases where we can
23753         implicitly convert to one of the integral types, and then reduce
23754         based on that constant.   This fixes bug #35483.
23755
23756 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23757
23758         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23759
23760 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23761
23762         * namespace.cs: fixed bug #35489.
23763
23764 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23765
23766         * class.cs: Remove some dead code.
23767
23768         * cs-parser.jay: Estimate the number of methods needed
23769         (RootContext.MethodCount);
23770
23771         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23772         numbers instead of StringBuilders.
23773
23774         * support.cs (PtrHashtable): Add constructor with initial size;
23775         We can now reduce reallocations of the method table.
23776
23777 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23778
23779         * attribute.cs (ApplyAttributes): Keep track of the emitted
23780         attributes on a per-target basis. This fixes bug #35413.
23781
23782 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23783
23784         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23785         default to the Windows 1252 encoding.
23786
23787         (UnixParseOption): Support version, thanks to Alp for the missing
23788         pointer. 
23789
23790         * AssemblyInfo.cs: Add nice assembly information.
23791
23792         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23793         (bug 35169).
23794
23795         * cs-parser.jay: Allow a trailing comma before the close bracked
23796         in the attribute_section production.
23797
23798         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23799         address of the instance was being taken, I will take this out,
23800         because we take the address of the object immediately here.
23801
23802 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23803
23804         * typemanager.cs (AreMultipleAllowed): Take care of the most
23805         obvious case where attribute type is not in the current assembly -
23806         stupid me ;-)
23807
23808 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23809
23810         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23811         definitions, instead of doing that afterwards.  
23812
23813         Also we use a nice little hack, depending on the constructor, we
23814         know if we are a "composed" name or a simple name.  Hence, we
23815         avoid the IndexOf test, and we avoid 
23816
23817         * codegen.cs: Add code to assist in a bug reporter to track down
23818         the source of a compiler crash. 
23819
23820 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23821
23822         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23823         types have been emitted for a given element and flag an error
23824         if something which does not have AllowMultiple set is used more
23825         than once.
23826
23827         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23828         attribute types and their corresponding AllowMultiple properties
23829
23830         (AreMultipleAllowed): Check the property for a given type.
23831
23832         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23833         property in the case we have a TypeContainer.
23834
23835         (Attributes.AddAttribute): Detect duplicates and just skip on
23836         adding them. This trivial fix catches a pretty gross error in our
23837         attribute emission - global attributes were being emitted twice!
23838
23839         Bugzilla bug #33187 is now fixed.
23840
23841 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23842
23843         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23844         instead of pp_and).
23845
23846         * expression.cs (Binary.ResolveOperator): I can only use the
23847         Concat (string, string, string) and Concat (string, string,
23848         string, string) if the child is actually a concatenation of
23849         strings. 
23850
23851 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23852
23853         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23854         context where we need a 2-character lookahead.
23855
23856         * pending.cs (PendingImplementation): Rework so we can keep track
23857         of interface types all the time, and flag those which were
23858         implemented by parents as optional.
23859
23860 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23861
23862         * expression.cs (Binary.ResolveOperator): Use
23863         String.Concat(string,string,string) or
23864         String.Concat(string,string,string,string) when possible. 
23865
23866         * typemanager: More helper methods.
23867
23868
23869 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23870
23871         * pending.cs: remove the bogus return from GetMissingInterfaces()
23872         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23873
23874 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23875
23876         * namespace.cs: avoid duplicated 'using xxx' being added to
23877         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23878         when we get more than one 'using' statement for the same namespace.
23879         Report a CS0105 warning for it.
23880
23881 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23882
23883         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23884         of calling getChar/putback, uses internal knowledge of it.    
23885
23886         (xtoken): Reorder tokenizer so most common patterns are checked
23887         first.  This reduces the compilation time in another 5% (from 8.11s
23888         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23889
23890         The parsing time is 22% of the compilation in mcs, and from that
23891         64% is spent on the tokenization process.  
23892
23893         I tried using a binary search for keywords, but this is slower
23894         than the hashtable.  Another option would be to do a couple of
23895         things:
23896
23897                 * Not use a StringBuilder, instead use an array of chars,
23898                   with a set value.  Notice that this way we could catch
23899                   the 645 error without having to do it *afterwards*.
23900
23901                 * We could write a hand-parser to avoid the hashtable
23902                   compares altogether.
23903
23904         The identifier consumption process takes 37% of the tokenization
23905         time.  Another 15% is spent on is_number.  56% of the time spent
23906         on is_number is spent on Int64.Parse:
23907
23908                 * We could probably choose based on the string length to
23909                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23910                   computations. 
23911
23912         Another 3% is spend on wrapping `xtoken' in the `token' function.
23913
23914         Handle 0xa0 as whitespace (#34752)
23915
23916 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23917
23918         * typemanager.cs (IsCLRType): New routine to tell whether a type
23919         is one of the builtin types.  
23920
23921         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23922         typecode in more places instead of doing pointer comparissions.
23923         We could leverage some knowledge about the way the typecodes are
23924         laid out.
23925
23926         New code to cache namespaces in assemblies, it is currently not
23927         invoked, to be used soon.
23928
23929         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23930
23931         * expression.cs (Binary.ResolveOperator): specially handle
23932         strings, and do not perform user-defined operator overloading for
23933         built-in types.
23934
23935 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23936
23937         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23938         internalcall as it is a pretty simple operation;  Avoid whenever
23939         possible to call Char.IsLetter.
23940
23941         (consume_identifier): Cut by half the number of
23942         hashtable calls by merging the is_keyword and GetKeyword behavior.
23943
23944         Do not short-circuit, because if we do, we
23945         report errors (ie, #if false && true would produce an invalid
23946         directive error);
23947
23948
23949 2002-11-24  Martin Baulig  <martin@ximian.com>
23950
23951         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23952         check constant ranges and report a CS0221.  Fixes #33186.
23953
23954 2002-11-24  Martin Baulig  <martin@ximian.com>
23955
23956         * cs-parser.jay: Make this work for uninitialized variable
23957         declarations in the `for' initializer.  Fixes #32416.
23958
23959 2002-11-24  Martin Baulig  <martin@ximian.com>
23960
23961         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23962         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23963
23964 2002-11-24  Martin Baulig  <martin@ximian.com>
23965
23966         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23967         argument; if true, we also check for user-defined conversions.
23968         This is only needed if both arguments are of a user-defined type.
23969         Fixes #30443, added test-175.cs.
23970         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23971
23972         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23973
23974 2002-11-24  Martin Baulig  <martin@ximian.com>
23975
23976         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23977         function to get the store opcode.
23978         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23979         only emit the Ldelema if the store opcode is Stobj.  You must run
23980         both test-34 and test-167 to test this.  Fixes #34529.
23981
23982 2002-11-23  Martin Baulig  <martin@ximian.com>
23983
23984         * ecore.cs (Expression.MemberLookup): Added additional
23985         `qualifier_type' argument which is used when we're being called
23986         from MemberAccess.DoResolve() and null if we're called from a
23987         SimpleName lookup.
23988         (Expression.MemberLookupFailed): New method to report errors; this
23989         does the CS1540 check and reports the correct error message.
23990
23991         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23992         argument for the CS1540 check and redone the way how we're dealing
23993         with private members.  See the comment in the source code for details.
23994         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23995         `closure_start_type' to `closure_qualifier_type' and check whether
23996         it's not null.  It was not this filter being broken, it was just
23997         being called with the wrong arguments.
23998
23999         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
24000         and pass it the correct `qualifier_type'; this also does the error
24001         handling for us.
24002
24003 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
24004
24005         * expression.cs (Invocation.EmitParams): If the we are dealing
24006         with a non-built-in value type, load its address as well.
24007
24008         (ArrayCreation): Use a a pretty constant instead
24009         of the hardcoded value 2.   Use 6 instead of 2 for the number of
24010         static initializers.  
24011
24012         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
24013         because they are not really value types, just glorified integers. 
24014
24015         * driver.cs: Do not append .exe, the CSC compiler does not do it.
24016
24017         * ecore.cs: Remove redundant code for enumerations, make them use
24018         the same code path as everything else, fixes the casting issue
24019         with enumerations in Windows.Forms.
24020
24021         * attribute.cs: Do only cast to string if it is a string, the
24022         validation happens later.
24023
24024         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
24025         people upgrade their corlibs.
24026
24027         * ecore.cs: Oops, enumerations were not following the entire code path
24028
24029 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
24030
24031         * typemanager.cs (FilterWithClosure): Commented out the test for
24032         1540 in typemanager.cs, as it has problems when accessing
24033         protected methods from a parent class (see test-174.cs). 
24034
24035         * attribute.cs (Attribute.ValidateGuid): new method.
24036         (Attribute.Resolve): Use above.
24037
24038 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
24039
24040         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
24041
24042         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
24043         handling for enumerations, as we only needed the TypeContainer
24044         functionality to begin with (this is required for the fix below to
24045         work for enums that reference constants in a container class for
24046         example). 
24047
24048         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
24049
24050         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
24051         a valid TypeBuilder to perform lookups on.o
24052
24053         * class.cs (InheritableMemberSignatureCompare): Use true in the
24054         call to GetGetMethod and GetSetMethod, because we are comparing
24055         the signature, and we need to get the methods *even* if they are
24056         private. 
24057
24058         (PropertyBase.CheckBase): ditto.
24059
24060         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
24061         GotoCase.Resolve): Use Peel on EmpytCasts.
24062
24063         * ecore.cs (EmptyCast): drop child, add Peel method.
24064
24065 2002-11-17  Martin Baulig  <martin@ximian.com>
24066
24067         * ecore.cs (EmptyCast.Child): New public property.
24068
24069         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
24070         label resolved to an EmptyCast.  Fixes #34162.
24071         (GotoCase.Resolve): Likewise.
24072         (Block.EmitMeta): Likewise.
24073
24074 2002-11-17  Martin Baulig  <martin@ximian.com>
24075
24076         * expression.cs (Invocation.BetterConversion): Prefer int over
24077         uint; short over ushort; long over ulong for integer literals.
24078         Use ImplicitConversionExists instead of StandardConversionExists
24079         since we also need to check for user-defined implicit conversions.
24080         Fixes #34165.  Added test-173.cs.
24081
24082 2002-11-16  Martin Baulig  <martin@ximian.com>
24083
24084         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
24085         with the `true' and `false' literals.  Fixes #33151.
24086
24087 2002-11-16  Martin Baulig  <martin@ximian.com>
24088
24089         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
24090         October 22nd; don't do the cs1540 check for static members.
24091
24092         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
24093         now using our own filter here and doing the cs1540 check again.
24094
24095 2002-11-16  Martin Baulig  <martin@ximian.com>
24096
24097         * support.cs (InternalParameters): Don't crash if we don't have
24098         any fixed parameters.  Fixes #33532.
24099
24100 2002-11-16  Martin Baulig  <martin@ximian.com>
24101
24102         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
24103         when looking up static methods to make this work on Windows.
24104         Fixes #33773.
24105
24106 2002-11-16  Martin Baulig  <martin@ximian.com>
24107
24108         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
24109         a setter rather than using PropertyInfo.CanWrite.
24110
24111 2002-11-15  Nick Drochak  <ndrochak@gol.com>
24112
24113         * class.cs: Allow acces to block member by subclasses. Fixes build
24114         breaker.
24115
24116 2002-11-14  Martin Baulig  <martin@ximian.com>
24117
24118         * class.cs (Constructor.Emit): Added the extern/block check.
24119         Fixes bug #33678.
24120
24121 2002-11-14  Martin Baulig  <martin@ximian.com>
24122
24123         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
24124         iteration while looking for indexers, this is needed because the
24125         indexer may have a different name in our base classes.  Fixed the
24126         error reporting (no indexers at all, not get accessor, no
24127         overloaded match).  Fixes bug #33089.
24128         (IndexerAccess.DoResolveLValue): Likewise.
24129
24130 2002-11-14  Martin Baulig  <martin@ximian.com>
24131
24132         * class.cs (PropertyBase.CheckBase): Make this work for multiple
24133         indexers.  Fixes the first part of bug #33089.
24134         (MethodSignature.InheritableMemberSignatureCompare): Added support
24135         for properties.
24136
24137 2002-11-13  Ravi Pratap  <ravi@ximian.com>
24138
24139         * attribute.cs (Attribute.Resolve): Catch the
24140         NullReferenceException and report it since it isn't supposed to
24141         happen. 
24142
24143 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
24144
24145         * expression.cs (Binary.EmitBranchable): Also handle the cases for
24146         LogicalOr and LogicalAnd that can benefit from recursively
24147         handling EmitBranchable.  The code now should be nice for Paolo.
24148
24149 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
24150
24151         * typemanager.cs (LookupType): Added a negative-hit hashtable for
24152         the Type lookups, as we perform quite a number of lookups on
24153         non-Types.  This can be removed once we can deterministically tell
24154         whether we have a type or a namespace in advance.
24155
24156         But this might require special hacks from our corlib.
24157
24158         * TODO: updated.
24159
24160         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
24161         and double which avoids a conversion from an integer to a double.
24162
24163         * expression.cs: tiny optimization, avoid calling IsConstant,
24164         because it effectively performs the lookup twice.
24165
24166 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
24167
24168         But a bogus return here to keep the semantics of the old code
24169         until the Mono runtime is fixed.
24170
24171         * pending.cs (GetMissingInterfaces): New method used to remove all
24172         the interfaces that are already implemented by our parent
24173         classes from the list of pending methods. 
24174
24175         * interface.cs: Add checks for calls after ResolveTypeExpr.
24176
24177 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
24178
24179         * class.cs (Class.Emit): Report warning 67: event not used if the
24180         warning level is beyond 3.
24181
24182         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
24183         being a NullLiteral.
24184
24185         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
24186         specifiers. 
24187
24188         * class.cs (TypeContainer.GetClassBases): Cover a missing code
24189         path that might fail if a type can not be resolved.
24190
24191         * expression.cs (Binary.Emit): Emit unsigned versions of the
24192         operators. 
24193
24194         * driver.cs: use error 5.
24195
24196 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
24197
24198         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
24199
24200 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
24201
24202         * cs-parser.jay (switch_section): A beautiful patch from Martin
24203         Baulig that fixed 33094.
24204
24205 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
24206
24207         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
24208         Check whether the base is abstract and report an error if so.
24209
24210         * expression.cs (IndexerAccess.DoResolveLValue,
24211         IndexerAccess.DoResolve): ditto. 
24212
24213         (Invocation.DoResolve): ditto.
24214
24215         (Invocation.FullMethodDesc): Improve the report string.
24216
24217         * statement.cs (Block): Eliminate IsVariableDefined as it is
24218         basically just a wrapper for GetVariableInfo.
24219
24220         * ecore.cs (SimpleName): Use new 
24221
24222         * support.cs (ReflectionParamter.ParameterType): We unwrap the
24223         type, as we return the actual parameter ref/unref state on a
24224         different call.
24225
24226 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
24227
24228         * support.cs: Return proper flags REF/OUT fixing the previous
24229         commit.  
24230
24231         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
24232         not used to mean `ref' but `ref or out' in ParameterReference
24233
24234         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
24235         full type signature instead of calling TypeManger.CSharpName
24236         ourselves. 
24237
24238         * support.cs (InternalParameters.ParameterDesc): Do not compare
24239         directly to the modflags, because REF/OUT will actually be bitsets
24240         if set. 
24241
24242         * delegate.cs (VerifyMethod): Check also the modifiers.
24243
24244         * cs-tokenizer.cs: Fix bug where floating point values with an
24245         exponent where a sign was missing was ignored.
24246
24247         * driver.cs: Allow multiple assemblies to be specified in a single
24248         /r: argument
24249
24250 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
24251
24252         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
24253         because identifiers after a parenthesis would end up in this kind
24254         of production, and we needed to desamiguate it for having casts
24255         like:
24256
24257                 (UserDefinedType *) xxx
24258
24259 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
24260
24261         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
24262         we should set on the Bindingflags.NonPublic, but not turn on
24263         private_ok.  private_ok controls whether a Private member is
24264         returned (this is chekced on the filter routine), while the
24265         BindingFlags.NonPublic just controls whether private/protected
24266         will be allowed.   This fixes the problem part of the problem of
24267         private properties being allowed to be used in derived classes.
24268
24269         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
24270         so we can call the children DoResolveLValue method (this will
24271         properly signal errors on lvalue assignments to base properties)
24272
24273         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
24274         getter are null, and we have a property info, we know that this
24275         happened because the lookup failed, so we report an error 122 for
24276         protection level violation.
24277
24278         We also silently return if setter and getter are null in the
24279         resolve functions, this condition only happens if we have flagged
24280         the error before.  This is the other half of the problem. 
24281
24282         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
24283         not have accessibility information, that is why we were returning
24284         true in the filter function in typemanager.cs.
24285
24286         To properly report 122 (property is inaccessible because of its
24287         protection level) correctly, we report this error in ResolveAccess
24288         by failing if both the setter and the getter are lacking (ie, the
24289         lookup failed). 
24290
24291         DoResolve and DoLResolve have been modified to check for both
24292         setter/getter being null and returning silently, the reason being
24293         that I did not want to put the knowledge about this error in upper
24294         layers, like:
24295
24296         int old = Report.Errors;
24297         x = new PropertyExpr (...);
24298         if (old != Report.Errors)
24299                 return null;
24300         else
24301                 return x;
24302
24303         So the property expr is returned, but it is invalid, so the error
24304         will be flagged during the resolve process. 
24305
24306         * class.cs: Remove InheritablePropertySignatureCompare from the
24307         class, as we no longer depend on the property signature to compute
24308         whether it is possible to implement a method or not.
24309
24310         The reason is that calling PropertyInfo.GetGetMethod will return
24311         null (in .NET, in Mono it works, and we should change this), in
24312         cases where the Get Method does not exist in that particular
24313         class.
24314
24315         So this code:
24316
24317         class X { public virtual int A { get { return 1; } } }
24318         class Y : X { }
24319         class Z : Y { public override int A { get { return 2; } } }
24320
24321         Would fail in Z because the parent (Y) would not have the property
24322         defined.  So we avoid this completely now (because the alternative
24323         fix was ugly and slow), and we now depend exclusively on the
24324         method names.
24325
24326         (PropertyBase.CheckBase): Use a method-base mechanism to find our
24327         reference method, instead of using the property.
24328
24329         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
24330         routines are gone now.
24331
24332         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
24333         names, they were incorrectly named.
24334
24335         * cs-tokenizer.cs: Return are more gentle token on failure. 
24336
24337         * pending.cs (PendingImplementation.InterfaceMethod): This routine
24338         had an out-of-sync index variable, which caused it to remove from
24339         the list of pending methods the wrong method sometimes.
24340
24341 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
24342
24343         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
24344         CanWrite, because those refer to this particular instance of the
24345         property, and do not take into account the fact that we can
24346         override single members of a property.
24347
24348         Constructor requires an EmitContext.  The resolution process does
24349         not happen here, but we need to compute the accessors before,
24350         because the resolution does not always happen for properties.
24351
24352         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
24353         subclass, before we did not update this flag, but we did update
24354         bindingflags. 
24355
24356         (GetAccessors): Drop this routine, as it did not work in the
24357         presence of partially overwritten set/get methods. 
24358
24359         Notice that this broke the cs1540 detection, but that will require
24360         more thinking. 
24361
24362 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24363
24364         * class.cs:
24365         * codegen.cs:
24366         * driver.cs: issue a warning instead of an error if we don't support
24367         debugging for the platform. Also ignore a couple of errors that may
24368         arise when trying to write the symbols. Undo my previous patch.
24369
24370 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24371
24372         * driver.cs: ignore /debug switch except for Unix platforms.
24373
24374 2002-10-23  Nick Drochak  <ndrochak@gol.com>
24375
24376         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
24377
24378 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
24379
24380         * driver.cs: Do not make mcs-debug conditional, so we do not break
24381         builds that use it.
24382
24383         * statement.cs (UsageVector.MergeChildren): I would like Martin to
24384         review this patch.  But basically after all the children variables
24385         have been merged, the value of "Breaks" was not being set to
24386         new_breaks for Switch blocks.  I think that it should be set after
24387         it has executed.  Currently I set this to the value of new_breaks,
24388         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
24389         conservative, but I do not understand this code very well.
24390
24391         I did not break anything in the build, so that is good ;-)
24392
24393         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
24394
24395 2002-10-20  Mark Crichton  <crichton@gimp.org>
24396
24397         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
24398
24399 2002-10-20  Nick Drochak  <ndrochak@gol.com>
24400
24401         * cfold.cs: Fixed compile blocker.
24402
24403 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
24404
24405         * driver.cs: I was chekcing the key, not the file.
24406
24407 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24408
24409         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24410         message that we were generating - we just need to silently return
24411         a null.
24412
24413 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24414
24415         * class.cs (Event.Define): Change my previous commit, as this
24416         breaks the debugger.  This is a temporary hack, as it seems like
24417         the compiler is generating events incorrectly to begin with.
24418
24419         * expression.cs (Binary.ResolveOperator): Added support for 
24420         "U operator - (E x, E y)"
24421
24422         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24423         y)".
24424
24425         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24426         init-only variables, but this path did not take into account that
24427         there might be also instance readonly variables.  Correct this
24428         problem. 
24429
24430         This fixes bug 32253
24431
24432         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24433         delegates as well.
24434
24435         * driver.cs: Change the extension for modules to `netmodule'
24436
24437         * cs-parser.jay: Improved slightly the location tracking for
24438         the debugger symbols.
24439
24440         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24441         modifiers that were specified instead of the hardcoded value
24442         (FamAndAssem).  This was basically ignoring the static modifier,
24443         and others.  Fixes 32429.
24444
24445         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24446         fixed a bug in the process (32476)
24447
24448         * expression.cs (ArrayAccess.EmitAssign): Patch from
24449         hwang_rob@yahoo.ca that fixes bug 31834.3
24450
24451 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24452
24453         * driver.cs: Make the module extension .netmodule.
24454
24455 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24456
24457         * driver.cs: Report an error if the resource file is not found
24458         instead of crashing.
24459
24460         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24461         false, like Emit does.
24462
24463 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24464
24465         * typemanager.cs: Remove unused private member.  Also reported mcs
24466         bug to report this as a warning like csc.
24467
24468 2002-10-15  Martin Baulig  <martin@gnome.org>
24469
24470         * statement.cs (Statement.Emit): Made this a virtual method; emits
24471         the line number info and calls DoEmit().
24472         (Statement.DoEmit): New protected abstract method, formerly knows
24473         as Statement.Emit().
24474
24475         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24476
24477 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24478
24479         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24480         have fixed a remaining problem: not every AddXXXX was adding a
24481         fully qualified name.  
24482
24483         Now everyone registers a fully qualified name in the DeclSpace as
24484         being defined instead of the partial name.  
24485
24486         Downsides: we are slower than we need to be due to the excess
24487         copies and the names being registered this way.  
24488
24489         The reason for this is that we currently depend (on the corlib
24490         bootstrap for instance) that types are fully qualified, because
24491         we dump all the types in the namespace, and we should really have
24492         types inserted into the proper namespace, so we can only store the
24493         basenames in the defined_names array.
24494
24495 2002-10-10  Martin Baulig  <martin@gnome.org>
24496
24497         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24498         from bug #31834, see the bug report for a testcase which is
24499         miscompiled.
24500
24501 2002-10-10  Martin Baulig  <martin@gnome.org>
24502
24503         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24504         flow analysis code for this.
24505
24506         * statement.cs (Do, While, For): Tell the flow analysis code about
24507         infinite loops.
24508         (FlowBranching.UsageVector): Added support for infinite loops.
24509         (Block.Resolve): Moved the dead code elimination here and use flow
24510         analysis to do it.
24511
24512 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24513
24514         * class.cs (Field.Define): Catch cycles on struct type
24515         definitions. 
24516
24517         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24518         fields if the fields are static.  We only need to check instance
24519         fields. 
24520
24521         * expression.cs (As.DoResolve): Test for reference type.
24522
24523         * statement.cs (Using.ResolveExpression): Use
24524         ConvertImplicitRequired, not ConvertImplicit which reports an
24525         error on failture
24526         (Using.ResolveLocalVariableDecls): ditto.
24527
24528         * expression.cs (Binary.ResolveOperator): Report errors in a few
24529         places where we had to.
24530
24531         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24532
24533 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24534
24535         * expression.cs: Use StoreFromPtr instead of extracting the type
24536         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24537
24538         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24539         an enumeration value to a System.Enum, but System.Enum is not a
24540         value type, but an class type, so we need to box.
24541
24542         (Expression.ConvertExplicit): One codepath could return
24543         errors but not flag them.  Fix this.  Fixes #31853
24544
24545         * parameter.cs (Resolve): Do not allow void as a parameter type.
24546
24547 2002-10-06  Martin Baulig  <martin@gnome.org>
24548
24549         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24550         if it's a class type and not a struct.  Fixes #31815.
24551
24552 2002-10-06  Martin Baulig  <martin@gnome.org>
24553
24554         * statement.cs: Reworked the flow analysis code a bit to make it
24555         usable for dead code elimination.
24556
24557 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24558
24559         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24560
24561 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24562
24563         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24564         to fix the test 165, will investigate deeper.
24565
24566 2002-10-04  Martin Baulig  <martin@gnome.org>
24567
24568         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24569         finally blocks actually work.
24570         (Try.Resolve): We don't need to create a sibling for `finally' if
24571         there is no finally block.
24572
24573 2002-10-04  Martin Baulig  <martin@gnome.org>
24574
24575         * class.cs (Constructor.Define): The default accessibility for a
24576         non-default constructor is private, not public.
24577
24578 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24579
24580         * class.cs (Constructor): Make AllowedModifiers public, add
24581         EXTERN.
24582
24583         * cs-parser.jay: Perform the modifiers test here, as the
24584         constructor for the Constructor class usually receives a zero
24585         because of the way we create it (first we create, later we
24586         customize, and we were never checking the modifiers).
24587
24588         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24589         is a version of LookupTypeReflection that includes the type-name
24590         cache.  This can be used as a fast path for functions that know
24591         the fully qualified name and are only calling into *.GetType() to
24592         obtain a composed type.
24593
24594         This is also used by TypeManager.LookupType during its type
24595         composition.
24596
24597         (LookupType): We now also track the real type name, as sometimes
24598         we can get a quey for the real type name from things like
24599         ComposedCast.  This fixes bug 31422.
24600
24601         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24602         complete type fullname, it does not have to go through the type
24603         resolution system to obtain the composed version of the type (for
24604         obtaining arrays or pointers).
24605
24606         (Conditional.Emit): Use the EmitBoolExpression to
24607         generate nicer code, as requested by Paolo.
24608
24609         (ArrayCreation.CheckIndices): Use the patch from
24610         hwang_rob@yahoo.ca to validate the array initializers. 
24611
24612 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24613
24614         * class.cs (ConstructorInitializer.Emit): simplify code by using
24615         Invocation.EmitCall, and at the same time, fix the bugs in calling
24616         parent constructors that took variable arguments. 
24617
24618         * ecore.cs (Expression.ConvertNumericExplicit,
24619         Expression.ImplicitNumericConversion): Remove the code that
24620         manually wrapped decimal (InternalTypeConstructor call is now gone
24621         as well).
24622
24623         * expression.cs (Cast.TryReduce): Also handle decimal types when
24624         trying to perform a constant fold on the type.
24625
24626         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24627
24628         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24629         that only turned off an error report, and did nothing else. 
24630
24631 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24632
24633         * driver.cs: Handle and ignore /fullpaths
24634
24635 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24636
24637         * expression.cs (Binary.ResolveOperator): Catch the case where
24638         DoNumericPromotions returns true, 
24639
24640         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24641
24642 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24643
24644         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24645         report error 70.
24646
24647 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24648
24649         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24650         conversion exists, but it is also required that the conversion be
24651         performed.  This manifested in "(Type64Enum) 2".  
24652
24653         * class.cs (TypeManager.AddMethod): The fix is not to change
24654         AddEnum, because that one was using a fully qualified name (every
24655         DeclSpace derivative does), but to change the AddMethod routine
24656         that was using an un-namespaced name.  This now correctly reports
24657         the duplicated name.
24658
24659         Revert patch until I can properly fix it.  The issue
24660         is that we have a shared Type space across all namespaces
24661         currently, which is wrong.
24662
24663         Options include making the Namespace a DeclSpace, and merge
24664         current_namespace/current_container in the parser.
24665
24666 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24667
24668         * cs-parser.jay: Improve error reporting when we get a different
24669         kind of expression in local_variable_type and
24670         local_variable_pointer_type. 
24671
24672         Propagate this to avoid missleading errors being reported.
24673
24674         * ecore.cs (ImplicitReferenceConversion): treat
24675         TypeManager.value_type as a target just like object_type.   As
24676         code like this:
24677
24678         ValueType v = 1;
24679
24680         Is valid, and needs to result in the int 1 being boxed before it
24681         is assigned to the value type v.
24682
24683         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24684         to validate the enumeration name.
24685
24686         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24687         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24688         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24689
24690         * ecore.cs (TryImplicitIntConversion): When doing an
24691         implicit-enumeration-conversion, check if the type is 64-bits and
24692         perform a conversion before passing to EnumConstant.
24693
24694 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24695
24696         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24697         report ambiguous type references.  Unlike the MS version, we
24698         report what the ambiguity is.   Innovation at work ;-)
24699
24700         (DeclSpace.FindType): Require a location argument to
24701         display when we display an ambiguous error.
24702
24703         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24704
24705         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24706
24707         * expression.cs (EmitDynamicInitializers): Apply patch from
24708         hwang_rob@yahoo.ca that fixes the order in which we emit our
24709         initializers. 
24710
24711 2002-09-21  Martin Baulig  <martin@gnome.org>
24712
24713         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24714         delegate takes no arguments.
24715
24716 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24717
24718         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24719         from integers.
24720
24721         * expression.cs: Extract the underlying type.
24722
24723         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24724
24725         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24726
24727 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24728
24729         * class.cs (TypeContainer.DefineType): We can not use the nice
24730         PackingSize with the size set to 1 DefineType method, because it
24731         will not allow us to define the interfaces that the struct
24732         implements.
24733
24734         This completes the fixing of bug 27287
24735
24736         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24737         means also structs.  This fixes part of the problem. 
24738         (Expresion.ImplicitReferenceConversionExists): ditto.
24739
24740         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24741         error if there were no errors reported during the type lookup
24742         process, to avoid duplicates or redundant errors.  Without this
24743         you would get an ambiguous errors plus a type not found.  We have
24744         beaten the user enough with the first error.  
24745
24746         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24747         reference. 
24748
24749         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24750         during the resolution process, stop the lookup, this avoids
24751         repeated error reports (same error twice).
24752
24753         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24754
24755         * typemanager.cs (LookupType): Redo the type lookup code to match
24756         the needs of System.Reflection.  
24757
24758         The issue is that System.Reflection requires references to nested
24759         types to begin with a "+" sign instead of a dot.  So toplevel
24760         types look like: "NameSpace.TopLevelClass", and nested ones look
24761         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24762         levels. 
24763
24764 2002-09-19  Martin Baulig  <martin@gnome.org>
24765
24766         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24767         says that a method always returns or always throws an exception,
24768         don't report the CS0161.
24769
24770         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24771         set `Returns = new_returns'.
24772
24773 2002-09-19  Martin Baulig  <martin@gnome.org>
24774
24775         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24776         to an enum constant, check for a CS0176.
24777
24778 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24779
24780         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24781         for operators that must be in pairs and report errors.
24782
24783         * ecore.cs (SimpleName.DoResolveType): During the initial type
24784         resolution process, when we define types recursively, we must
24785         check first for types in our current scope before we perform
24786         lookups in the enclosing scopes.
24787
24788         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24789
24790         (Invocation.VerifyArgumentsCompat): Call
24791         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24792         I thought we were supposed to always call this, but there are a
24793         few places in the code where we dont do it.
24794
24795 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24796
24797         * driver.cs: Add support in -linkres and -resource to specify the
24798         name of the identifier.
24799
24800 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24801
24802         * ecore.cs (StandardConversionExists): Sync with the conversion
24803         code: allow anything-* to void* conversions.
24804
24805         (FindMostSpecificSource): Use an Expression argument
24806         instead of a Type, because we might be handed over a Literal which
24807         gets a few more implicit conversions that plain types do not.  So
24808         this information was being lost.
24809
24810         Also, we drop the temporary type-holder expression when not
24811         required.
24812
24813 2002-09-17  Martin Baulig  <martin@gnome.org>
24814
24815         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24816         this is an explicit interface implementation.
24817
24818 2002-09-17  Martin Baulig  <martin@gnome.org>
24819
24820         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24821         different `IndexerName' attributes.
24822
24823         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24824         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24825         virtual CommonResolve().
24826
24827 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24828
24829         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24830         and convert that to the UnderlyingType.
24831
24832         * statement.cs (Foreach.Resolve): Indexers are just like variables
24833         or PropertyAccesses.
24834
24835         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24836         inside quoted strings, we were not doing this before.
24837
24838 2002-09-16  Martin Baulig  <martin@gnome.org>
24839
24840         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24841         resolve it.  This is needed for the definite assignment check of the
24842         instance expression, fixes bug #29846.
24843         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24844
24845 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24846
24847         * parameter.cs: Fix compile error.  Cannot reference static member
24848         from an instance object.  Is this an mcs bug?
24849
24850 2002-09-14  Martin Baulig  <martin@gnome.org>
24851
24852         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24853         multiple times.  Fixes bug #30295, added test-166.cs.
24854
24855 2002-09-14  Martin Baulig  <martin@gnome.org>
24856
24857         * statement.cs (Block.Emit): Don't emit unreachable code.
24858         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24859         `break' statements.
24860         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24861
24862 2002-09-14  Martin Baulig  <martin@gnome.org>
24863
24864         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24865         is set.
24866
24867 2002-09-14  Martin Baulig  <martin@gnome.org>
24868
24869         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24870         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24871         be false on the ms runtime.
24872
24873 2002-09-13  Martin Baulig  <martin@gnome.org>
24874
24875         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24876         the CS0038 error message.
24877
24878 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24879
24880         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24881         constant inside, return it.
24882
24883 2002-09-12  Martin Baulig  <martin@gnome.org>
24884
24885         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24886         implicit conversion can be done between enum types.
24887
24888         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24889         check whether an implicit conversion to the current enum's UnderlyingType
24890         exists and report an error if not.
24891
24892         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24893         without debugging support.
24894
24895         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24896         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24897
24898 2002-09-12  Martin Baulig  <martin@gnome.org>
24899
24900         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24901
24902         * ecore.cs (IMemberExpr.DeclaringType): New property.
24903         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24904         nonstatic member of an outer type (CS0038).
24905
24906 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24907
24908         * driver.cs: Activate the using-error detector at warning level
24909         4 (at least for MS-compatible APIs).
24910
24911         * namespace.cs (VerifyUsing): Small buglett fix.
24912
24913         * pending.cs (PendingImplementation): pass the container pointer. 
24914
24915         * interface.cs (GetMethods): Allow for recursive definition.  Long
24916         term, I would like to move every type to support recursive
24917         definitions, not the current ordering mechanism that we have right
24918         now.
24919
24920         The situation is this: Attributes are handled before interfaces,
24921         so we can apply attributes to interfaces.  But some attributes
24922         implement interfaces, we will now handle the simple cases
24923         (recursive definitions will just get an error).  
24924
24925         * parameter.cs: Only invalidate types at the end if we fail to
24926         lookup all types.  
24927
24928 2002-09-09  Martin Baulig  <martin@gnome.org>
24929
24930         * ecore.cs (PropertyExpr.Emit): Also check for
24931         TypeManager.system_int_array_get_length so this'll also work when
24932         compiling corlib.  Fixes #30003.
24933
24934 2002-09-09  Martin Baulig  <martin@gnome.org>
24935
24936         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24937         and throw an exception if we can't get the type's size.  Fixed #30040,
24938         added test-165.cs.
24939
24940 2002-09-09  Martin Baulig  <martin@gnome.org>
24941
24942         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24943
24944         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24945         context.  Fixes bug #30027.
24946
24947         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24948         virtual functions.  Fixes bug #30043, added test-164.cs.
24949
24950 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24951
24952         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24953
24954 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24955
24956         * driver.cs: Use an object to get the windows codepage since it's not a
24957         static property.
24958
24959 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24960
24961         * statement.cs (For.Emit): for infinite loops (test == null)
24962         return whether there is a break inside, not always "true".
24963
24964         * namespace.cs (UsingEntry): New struct to hold the name of the
24965         using definition, the location where it is defined, and whether it
24966         has been used in a successful type lookup.
24967
24968         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24969         strings.
24970
24971         * decl.cs: ditto.
24972
24973 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24974
24975         * attribute.cs : Fix incorrect code which relied on catching
24976         a NullReferenceException to detect a null being passed in
24977         where an object was expected.
24978
24979 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24980
24981         * statement.cs (Try): flag the catch variable as assigned
24982
24983         * expression.cs (Cast): Simplified by using ResolveType instead of
24984         manually resolving.
24985
24986         * statement.cs (Catch): Fix bug by using ResolveType.
24987
24988 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24989
24990         * expression.cs (BetterConversion): Special case for when we have
24991         a NullLiteral as the argument and we have to choose between string
24992         and object types - we choose string the way csc does.
24993
24994         * attribute.cs (Attribute.Resolve): Catch the
24995         NullReferenceException and report error #182 since the Mono
24996         runtime no more has the bug and having this exception raised means
24997         we tried to select a constructor which takes an object and is
24998         passed a null.
24999
25000 2002-09-05  Ravi Pratap  <ravi@ximian.com>
25001
25002         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
25003         message (1502, 1503) when we can't locate a method after overload
25004         resolution. This is much more informative and closes the bug
25005         Miguel reported.
25006
25007         * interface.cs (PopulateMethod): Return if there are no argument
25008         types. Fixes a NullReferenceException bug.
25009
25010         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
25011         expressions too. Previously we were checking only in one place for
25012         positional arguments leaving out named arguments.
25013
25014         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
25015         type to the enum type is not allowed. Remove code corresponding to
25016         that.
25017
25018         (ConvertNumericExplicit): Allow explicit conversions from
25019         the underlying type to enum type. This precisely follows the spec
25020         and closes a bug filed by Gonzalo.
25021
25022 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25023
25024         * compiler.csproj:
25025         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
25026
25027 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
25028
25029         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
25030         it was important that we stored the right value after the
25031         reduction in `converted'.
25032
25033 2002-09-04  Martin Baulig  <martin@gnome.org>
25034
25035         * location.cs (Location.SymbolDocument): Use full pathnames for the
25036         source files.
25037
25038 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
25039
25040         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
25041         of the expression resolve mechanism, because that will catch the
25042         SimpleName error failures.
25043
25044         (Conditional): If we can not resolve the
25045         expression, return, do not crash.
25046
25047 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25048
25049         * cs-tokenizer.cs:
25050         (location): display token name instead of its number.
25051
25052 2002-08-28  Martin Baulig  <martin@gnome.org>
25053
25054         * expression.cs (Binary.ResolveOperator): Don't silently return
25055         but return an error if an operator cannot be applied between two
25056         enum types.
25057
25058 2002-08-28  Martin Baulig  <martin@gnome.org>
25059
25060         * class.cs (Constructor.Define): Set the permission attributes
25061         correctly instead of making all constructors public.
25062
25063 2002-08-28  Martin Baulig  <martin@gnome.org>
25064
25065         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
25066         for private members before reporting a CS0103; if we find anything,
25067         it's a CS0122.
25068
25069 2002-08-28  Martin Baulig  <martin@gnome.org>
25070
25071         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
25072         to check whether `closure_start_type == closure_invocation_type',
25073         we also need to check whether `m.DeclaringType == closure_invocation_type'
25074         before bypassing the permission checks.  We might be accessing
25075         protected/private members from the base class.
25076         (TypeManager.RealMemberLookup): Only set private_ok if private
25077         members were requested via BindingFlags.NonPublic.
25078
25079         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
25080
25081         * expression.cs (MemberAccess.ResolveMemberAccess): Set
25082         MethodGroupExpr.IsExplicitImpl if appropriate.
25083         (Invocation.DoResolve): Don't report the CS0120 for explicit
25084         interface implementations.
25085
25086 2002-08-27  Martin Baulig  <martin@gnome.org>
25087
25088         * expression.cs (Invocation.DoResolve): If this is a static
25089         method and we don't have an InstanceExpression, we must report
25090         a CS0120.
25091
25092 2002-08-25  Martin Baulig  <martin@gnome.org>
25093
25094         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
25095         `==' between a valuetype and an object.
25096
25097 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
25098
25099         * ecore.cs (TypeExpr): Provide a ToString method.
25100
25101 2002-08-24  Martin Baulig  <martin@gnome.org>
25102
25103         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
25104         now called proggie.dbg and it's a binary file.
25105
25106 2002-08-23  Martin Baulig  <martin@gnome.org>
25107
25108         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
25109
25110 2002-08-23  Martin Baulig  <martin@gnome.org>
25111
25112         * struct.cs (MyStructInfo.ctor): Make this work with empty
25113         structs; it's not allowed to use foreach() on null.
25114
25115 2002-08-23  Martin Baulig  <martin@gnome.org>
25116
25117         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
25118         writer the full pathname of the generated assembly.
25119
25120 2002-08-23  Martin Baulig  <martin@gnome.org>
25121
25122         * statements.cs (FlowBranching.UsageVector.MergeChildren):
25123         A `finally' block never returns or breaks; improved handling of
25124         unreachable code.
25125
25126 2002-08-23  Martin Baulig  <martin@gnome.org>
25127
25128         * statement.cs (Throw.Resolve): Allow `throw null'.
25129
25130 2002-08-23  Martin Baulig  <martin@gnome.org>
25131
25132         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
25133         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
25134         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
25135         MemberLookup would return a wrong event if this is an explicit
25136         interface implementation and the class has an event with the same
25137         name.
25138
25139 2002-08-23  Martin Baulig  <martin@gnome.org>
25140
25141         * statement.cs (Block.AddChildVariableNames): New public method.
25142         (Block.AddChildVariableName): Likewise.
25143         (Block.IsVariableNameUsedInChildBlock): Likewise.
25144         (Block.AddVariable): Check whether a variable name has already
25145         been used in a child block.
25146
25147         * cs-parser.jay (declare_local_variables): Mark all variable names
25148         from the current block as being used in a child block in the
25149         implicit block.
25150
25151 2002-08-23  Martin Baulig  <martin@gnome.org>
25152
25153         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
25154         find the symbol writer.
25155
25156         * driver.cs: csc also allows the arguments to /define being
25157         separated by commas, not only by semicolons.
25158
25159 2002-08-23  Martin Baulig  <martin@gnome.org>
25160
25161         * interface.cs (Interface.GetMembers): Added static check for events.
25162
25163 2002-08-15  Martin Baulig  <martin@gnome.org>
25164
25165         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
25166         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
25167
25168         * ecore.cs (Expression.MemberLookup): Added documentation and explained
25169         why the MethodData.EmitDestructor() change was necessary.
25170
25171 2002-08-20  Martin Baulig  <martin@gnome.org>
25172
25173         * class.cs (TypeContainer.FindMembers): Added static check for events.
25174
25175         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
25176
25177         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
25178         use Type.GetEvents(), not Type.FindMembers().
25179
25180 2002-08-20  Martin Baulig  <martin@gnome.org>
25181
25182         * decl.cs (MemberCache): Added a special method cache which will
25183         be used for method-only searched.  This ensures that a method
25184         search will return a MethodInfo with the correct ReflectedType for
25185         inherited methods.      
25186
25187 2002-08-20  Martin Baulig  <martin@gnome.org>
25188
25189         * decl.cs (DeclSpace.FindMembers): Made this public.
25190
25191 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25192
25193         * delegate.cs: fixed build on windows.
25194         [FIXME:  Filed as bug #29150: MCS must report these errors.]
25195
25196 2002-08-19  Ravi Pratap  <ravi@ximian.com>
25197
25198         * ecore.cs (StandardConversionExists): Return a false
25199         if we are trying to convert the void type to anything else
25200         since that is not allowed.
25201
25202         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
25203         we flag error 70 in the event an event is trying to be accessed
25204         directly from outside the declaring type.
25205
25206 2002-08-20  Martin Baulig  <martin@gnome.org>
25207
25208         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
25209         MemberCache from typemanager.cs to decl.cs.
25210
25211 2002-08-19  Martin Baulig  <martin@gnome.org>
25212
25213         * class.cs (TypeContainer): Implement IMemberContainer.
25214         (TypeContainer.DefineMembers): Create the MemberCache.
25215         (TypeContainer.FindMembers): Do better BindingFlags checking; only
25216         return public members if BindingFlags.Public was given, check
25217         whether members are static.
25218
25219 2002-08-16  Martin Baulig  <martin@gnome.org>
25220
25221         * decl.cs (DeclSpace.Define): Splitted this in Define and
25222         DefineMembers.  DefineMembers is called first and initializes the
25223         MemberCache.
25224
25225         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
25226         DefineMembers() on all our DeclSpaces.
25227
25228         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
25229         but call DefineMembers() on all nested interfaces.  We call their
25230         Define() in our new Define() function.
25231
25232         * interface.cs (Interface): Implement IMemberContainer.
25233         (Interface.Define): Moved all code except the attribute stuf to
25234         DefineMembers().
25235         (Interface.DefineMembers): Initialize the member cache.
25236
25237         * typemanager.cs (IMemberFinder): Removed this interface, we don't
25238         need this anymore since we can use MemberCache.FindMembers directly.
25239
25240 2002-08-19  Martin Baulig  <martin@gnome.org>
25241
25242         * typemanager.cs (MemberCache): When creating the cache for an
25243         interface type, add all inherited members.
25244         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
25245         to `out bool used_cache' and documented it.
25246         (TypeManager.MemberLookup): If we already used the cache in the first
25247         iteration, we don't need to do the interfaces check.
25248
25249 2002-08-19  Martin Baulig  <martin@gnome.org>
25250
25251         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
25252         here from IMemberFinder and don't implement this interface anymore.
25253         (DeclSpace.MemberCache): Moved here from IMemberFinder.
25254
25255         * typemanager.cs (IMemberFinder): This interface is now only used by
25256         classes which actually support the member cache.
25257         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
25258         since we only put DeclSpaces into this Hashtable.
25259         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
25260         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
25261
25262 2002-08-16  Martin Baulig  <martin@gnome.org>
25263
25264         * typemanager.cs (ICachingMemberFinder): Removed.
25265         (IMemberFinder.MemberCache): New property.
25266         (TypeManager.FindMembers): Merged this with RealFindMembers().
25267         This function will never be called from TypeManager.MemberLookup()
25268         so we can't use the cache here, just the IMemberFinder.
25269         (TypeManager.MemberLookup_FindMembers): Check whether the
25270         IMemberFinder has a MemberCache and call the cache's FindMembers
25271         function.
25272         (MemberCache): Rewrote larger parts of this yet another time and
25273         cleaned it up a bit.
25274
25275 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
25276
25277         * driver.cs (LoadArgs): Support quoting.
25278
25279         (Usage): Show the CSC-like command line arguments.
25280
25281         Improved a few error messages.
25282
25283 2002-08-15  Martin Baulig  <martin@gnome.org>
25284
25285         * typemanager.cs (IMemberContainer.Type): New property.
25286         (IMemberContainer.IsInterface): New property.
25287
25288         The following changes are conditional to BROKEN_RUNTIME, which is
25289         defined at the top of the file.
25290
25291         * typemanager.cs (MemberCache.MemberCache): Don't add the base
25292         class'es members, but add all members from TypeHandle.ObjectType
25293         if we're an interface.
25294         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
25295         is the current type.
25296         (MemberCache.CacheEntry.Container): Removed this field.
25297         (TypeHandle.GetMembers): Include inherited members.
25298
25299 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25300
25301         * typemanager.cs: fixed compilation and added a comment on a field that
25302         is never used.
25303
25304 2002-08-15  Martin Baulig  <martin@gnome.org>
25305
25306         * class.cs (ConstructorInitializer.Resolve): In the
25307         Expression.MemberLookup call, use the queried_type as
25308         invocation_type.
25309
25310         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
25311         declared' attribute, it's always true.
25312         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
25313         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
25314         temporary wrapper for FindMembers which tells MemberLookup whether
25315         members from the base classes are included in the return value.
25316         This will go away soon.
25317         (TypeManager.MemberLookup): Use this temporary hack here; once the
25318         new MemberCache is completed, we don't need to do the DeclaredOnly
25319         looping here anymore since the MemberCache will take care of this.
25320         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
25321         (MemberCache): When creating the MemberCache for a class, get
25322         members from the current class and all its base classes.
25323         (MemberCache.CacheEntry.Container): New field.  This is a
25324         temporary hack until the Mono runtime is fixed to distinguish
25325         between ReflectedType and DeclaringType.  It allows us to use MCS
25326         with both the MS runtime and the unfixed Mono runtime without
25327         problems and without accecting performance.
25328         (MemberCache.SearchMembers): The DeclaredOnly looping from
25329         TypeManager.MemberLookup is now done here.      
25330
25331 2002-08-14  Martin Baulig  <martin@gnome.org>
25332
25333         * statement.cs (MyStructInfo.MyStructInfo): Don't call
25334         Type.GetFields on dynamic types but get the fields from the
25335         corresponding TypeContainer.
25336         (MyStructInfo.GetStructInfo): Added check for enum types.
25337
25338         * typemanager.cs (MemberList.IsSynchronized): Implemented.
25339         (MemberList.SyncRoot): Implemented.
25340         (TypeManager.FilterWithClosure): No need to check permissions if
25341         closure_start_type == closure_invocation_type, don't crash if
25342         closure_invocation_type is null.
25343
25344 2002-08-13  Martin Baulig  <martin@gnome.org>
25345
25346         Rewrote TypeContainer.FindMembers to use a member cache.  This
25347         gives us a speed increase of about 35% for the self-hosting MCS
25348         build and of about 15-20% for the class libs (both on GNU/Linux).
25349
25350         * report.cs (Timer): New class to get enhanced profiling.  This
25351         whole class is "TIMER" conditional since it remarkably slows down
25352         compilation speed.
25353
25354         * class.cs (MemberList): New class.  This is an IList wrapper
25355         which we're now using instead of passing MemberInfo[]'s around to
25356         avoid copying this array unnecessarily.
25357         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
25358         (ICachingMemberFinder, IMemberContainer): New interface.
25359         (TypeManager.FilterWithClosure): If `criteria' is null, the name
25360         has already been checked, otherwise use it for the name comparision.
25361         (TypeManager.FindMembers): Renamed to RealMemberFinder and
25362         provided wrapper which tries to use ICachingMemberFinder.FindMembers
25363         if possible.  Returns a MemberList, not a MemberInfo [].
25364         (TypeHandle): New class, implements IMemberContainer.  We create
25365         one instance of this class per type, it contains a MemberCache
25366         which is used to do the member lookups.
25367         (MemberCache): New class.  Each instance of this class contains
25368         all members of a type and a name-based hash table.
25369         (MemberCache.FindMembers): This is our new member lookup
25370         function.  First, it looks up all members of the requested name in
25371         the hash table.  Then, it walks this list and sorts out all
25372         applicable members and returns them.
25373
25374 2002-08-13  Martin Baulig  <martin@gnome.org>
25375
25376         In addition to a nice code cleanup, this gives us a performance
25377         increase of about 1.4% on GNU/Linux - not much, but it's already
25378         half a second for the self-hosting MCS compilation.
25379
25380         * typemanager.cs (IMemberFinder): New interface.  It is used by
25381         TypeManager.FindMembers to call FindMembers on a TypeContainer,
25382         Enum, Delegate or Interface.
25383         (TypeManager.finder_to_member_finder): New PtrHashtable.
25384         (TypeManager.finder_to_container): Removed.
25385         (TypeManager.finder_to_delegate): Removed.
25386         (TypeManager.finder_to_interface): Removed.
25387         (TypeManager.finder_to_enum): Removed.
25388
25389         * interface.cs (Interface): Implement IMemberFinder.
25390
25391         * delegate.cs (Delegate): Implement IMemberFinder.
25392
25393         * enum.cs (Enum): Implement IMemberFinder.
25394
25395         * class.cs (TypeContainer): Implement IMemberFinder.
25396
25397 2002-08-12  Martin Baulig  <martin@gnome.org>
25398
25399         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
25400
25401 2002-08-12  Martin Baulig  <martin@gnome.org>
25402
25403         * ecore.cs (ITypeExpression): New interface for expressions which
25404         resolve to a type.
25405         (TypeExpression): Renamed to TypeLookupExpression.
25406         (Expression.DoResolve): If we're doing a types-only lookup, the
25407         expression must implement the ITypeExpression interface and we
25408         call DoResolveType() on it.
25409         (SimpleName): Implement the new ITypeExpression interface.
25410         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25411         hack, the situation that we're only looking up types can't happen
25412         anymore when this method is called.  Moved the type lookup code to
25413         DoResolveType() and call it.
25414         (SimpleName.DoResolveType): This ITypeExpression interface method
25415         is now doing the types-only lookup.
25416         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25417         (ResolveFlags): Added MaskExprClass.
25418
25419         * expression.cs (MemberAccess): Implement the ITypeExpression
25420         interface.
25421         (MemberAccess.DoResolve): Added support for a types-only lookup
25422         when we're called via ITypeExpression.DoResolveType().
25423         (ComposedCast): Implement the ITypeExpression interface.
25424
25425         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25426         Expression.Resolve() with ResolveFlags.Type instead.
25427
25428 2002-08-12  Martin Baulig  <martin@gnome.org>
25429
25430         * interface.cs (Interface.Define): Apply attributes.
25431
25432         * attribute.cs (Attribute.ApplyAttributes): Added support for
25433         interface attributes.
25434
25435 2002-08-11  Martin Baulig  <martin@gnome.org>
25436
25437         * statement.cs (Block.Emit): Only check the "this" variable if we
25438         do not always throw an exception.
25439
25440         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25441         whether the property has a set accessor.
25442
25443 2002-08-11  Martin Baulig  <martin@gnome.org>
25444
25445         Added control flow analysis support for structs.
25446
25447         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25448         with control flow analysis turned off.
25449         (IVariable): New interface.
25450         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25451         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25452         (FieldExpr.DoResolve): Resolve the instance expression with flow
25453         analysis turned off and do the definite assignment check after the
25454         resolving when we know what the expression will resolve to.
25455
25456         * expression.cs (LocalVariableReference, ParameterReference):
25457         Implement the new IVariable interface, only call the flow analysis
25458         code if ec.DoFlowAnalysis is true.
25459         (This): Added constructor which takes a Block argument.  Implement
25460         the new IVariable interface.
25461         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25462         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25463         This does the definite assignment checks for struct members.
25464
25465         * class.cs (Constructor.Emit): If this is a non-static `struct'
25466         constructor which doesn't have any initializer, call
25467         Block.AddThisVariable() to tell the flow analysis code that all
25468         struct elements must be initialized before control returns from
25469         the constructor.
25470
25471         * statement.cs (MyStructInfo): New public class.
25472         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25473         argument to this indexer.  If non-zero, check an individual struct
25474         member, not the whole struct.
25475         (FlowBranching.CheckOutParameters): Check struct members.
25476         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25477         overloaded versions of these methods which take an additional
25478         `int field_idx' argument to check struct members.
25479         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25480         overloaded versions of these methods which take an additional
25481         `string field_name' argument to check struct member.s
25482         (VariableInfo): Implement the IVariable interface.
25483         (VariableInfo.StructInfo): New public property.  Returns the
25484         MyStructInfo instance of the variable if it's a struct or null.
25485         (Block.AddThisVariable): New public method.  This is called from
25486         Constructor.Emit() for non-static `struct' constructor which do
25487         not have any initializer.  It creates a special variable for the
25488         "this" instance variable which will be checked by the flow
25489         analysis code to ensure that all of the struct's fields are
25490         initialized before control returns from the constructor.
25491         (UsageVector): Added support for struct members.  If a
25492         variable/parameter is a struct with N members, we reserve a slot
25493         in the usage vector for each member.  A struct is considered fully
25494         initialized if either the struct itself (slot 0) or all its
25495         members are initialized.
25496
25497 2002-08-08  Martin Baulig  <martin@gnome.org>
25498
25499         * driver.cs (Driver.MainDriver): Only report an error CS5001
25500         if there were no compilation errors.
25501
25502         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25503         `UnsafeContext' property to determine whether the parent is in
25504         unsafe context rather than checking the parent's ModFlags:
25505         classes nested in an unsafe class are unsafe as well.
25506
25507 2002-08-08  Martin Baulig  <martin@gnome.org>
25508
25509         * statement.cs (UsageVector.MergeChildren): Distinguish between
25510         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25511         we return.  Added test17() and test18() to test-154.cs.
25512
25513 2002-08-08  Martin Baulig  <martin@gnome.org>
25514
25515         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25516         Family access, make sure the invoking type isn't a subclass of the
25517         queried type (that'd be a CS1540).
25518
25519         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25520         this method which takes an additional `Type invocation_type'.
25521
25522         * expression.cs (BaseAccess.DoResolve): Use the base type as
25523         invocation and query type.
25524         (MemberAccess.DoResolve): If the lookup failed and we're about to
25525         report a CS0122, try a lookup with the ec.ContainerType - if this
25526         succeeds, we must report a CS1540.
25527
25528 2002-08-08  Martin Baulig  <martin@gnome.org>
25529
25530         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25531         (MethodGroupExpr): Implement the IMemberExpr interface.
25532
25533         * expression (MemberAccess.ResolveMemberAccess): No need to have
25534         any special code for MethodGroupExprs anymore, they're now
25535         IMemberExprs.   
25536
25537 2002-08-08  Martin Baulig  <martin@gnome.org>
25538
25539         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25540         Family, FamANDAssem and FamORAssem permissions.
25541         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25542
25543 2002-08-08  Martin Baulig  <martin@gnome.org>
25544
25545         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25546         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25547         or loop block.
25548
25549 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25550
25551         * driver.cs: implemented /resource option to embed managed resources.
25552
25553 2002-08-07  Martin Baulig  <martin@gnome.org>
25554
25555         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25556         (FieldBase.HasFieldInitializer): New public property.
25557         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25558         returns the field initializer and makes sure it is only resolved once.
25559         (TypeContainer.EmitFieldInitializers): Call
25560         FieldBase.GetInitializerExpression to get the initializer, this ensures
25561         that it isn't resolved multiple times.
25562
25563         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25564         the resolving process (SimpleName/MemberLookup) that we're currently
25565         emitting a field initializer (which must not access any instance members,
25566         this is an error CS0236).
25567
25568         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25569         argument, if the `IsFieldInitializer' flag is set, we must report and
25570         error CS0236 and not an error CS0120.   
25571
25572 2002-08-07  Martin Baulig  <martin@gnome.org>
25573
25574         * ecore.cs (IMemberExpr): New public interface.
25575         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25576         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25577         if the expression is an IMemberExpr.
25578
25579         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25580         to be null, implicitly default to `this' if we're non-static in
25581         this case.  Simplified the code a lot by using the new IMemberExpr
25582         interface.  Also fixed bug #28176 here.
25583
25584 2002-08-06  Martin Baulig  <martin@gnome.org>
25585
25586         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25587         ParameterReferences during semantic analysis so that we can do a
25588         type-only search when resolving Cast, TypeOf and SizeOf.
25589         (block): Pass the `current_local_parameters' to the Block's
25590         constructor.
25591
25592         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25593         argument to the constructor.
25594         (ConstructorInitializer.Resolve): Create a temporary implicit
25595         block with the parameters.
25596
25597         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25598         references here if we aren't doing a type-only search.
25599
25600         * statement.cs (Block): Added constructor which takes a
25601         `Parameters parameters' argument.
25602         (Block.Parameters): New public property.
25603
25604         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25605         to `Parameters' and made it public readonly.
25606
25607 2002-08-06  Martin Baulig  <martin@gnome.org>
25608
25609         * ecore.cs (Expression.Warning): Made this public as well.
25610
25611         * report.cs (Report.Debug): Print the contents of collections.
25612
25613 2002-08-06  Martin Baulig  <martin@gnome.org>
25614
25615         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25616         used to tell Resolve() which kinds of expressions it may return.
25617         (Expression.Resolve): Added overloaded version of this method which
25618         takes a `ResolveFlags flags' argument.  This can be used to tell
25619         Resolve() which kinds of expressions it may return.  Reports a
25620         CS0118 on error.
25621         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25622         ResolveFlags.SimpleName.
25623         (Expression.Error118): Added overloaded version of this method which
25624         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25625         which kinds of expressions are allowed.
25626
25627         * expression.cs (Argument.ResolveMethodGroup): New public method.
25628         Resolves an argument, but allows a MethodGroup to be returned.
25629         This is used when invoking a delegate.
25630
25631         * TODO: Updated a bit.
25632
25633 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25634
25635         Fixed compilation with csc.
25636
25637         * ecore.cs: Expression.Error made public. Is this correct? Should
25638         Warning be made public too?
25639
25640         * expression.cs: use ea.Location instead of ea.loc.
25641         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25642
25643 2002-08-06  Martin Baulig  <martin@gnome.org>
25644
25645         * ecore.cs (Expression.loc): Moved the location here instead of
25646         duplicating it in all derived classes.
25647         (Expression.Location): New public property.
25648         (Expression.Error, Expression.Warning): Made them non-static and
25649         removed the location argument.
25650         (Expression.Warning): Added overloaded version which takes an
25651         `int level' argument.
25652         (Expression.Error118): Make this non-static and removed the
25653         expression and location arguments.
25654         (TypeExpr): Added location argument to the constructor.
25655
25656         * expression.cs (StaticCallExpr): Added location argument to
25657         the constructor.
25658         (Indirection, PointerArithmetic): Likewise.
25659         (CheckedExpr, UnCheckedExpr): Likewise.
25660         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25661         (StringPtr): Likewise.
25662
25663
25664 2002-08-05  Martin Baulig  <martin@gnome.org>
25665
25666         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25667
25668         * assign.cs (Assign.DoResolve): Check whether the source
25669         expression is a value or variable.
25670
25671         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25672         while resolving the corresponding blocks.
25673
25674         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25675         an error, don't silently return null.
25676
25677         * statement.cs (Block.AddVariable): Do the error reporting here
25678         and distinguish between CS0128 and CS0136.
25679         (Block.DoResolve): Report all unused labels (warning CS0164).
25680         (LabeledStatement): Pass the location to the constructor.
25681         (LabeledStatement.HasBeenReferenced): New property.
25682         (LabeledStatement.Resolve): Set it to true here.
25683
25684         * statement.cs (Return.Emit): Return success even after reporting
25685         a type mismatch error (CS0126 or CS0127), this is what csc does and
25686         it avoids confusing the users with any consecutive errors.
25687
25688 2002-08-05  Martin Baulig  <martin@gnome.org>
25689
25690         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25691
25692         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25693
25694         * expression.cs (MemberAccess.DoResolve): Silently return if an
25695         error has already been reported.
25696
25697         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25698         error has already been reported.
25699
25700 2002-08-05  Martin Baulig  <martin@gnome.org>
25701
25702         * statement.cs (UsageVector): Only initialize the `parameters'
25703         vector if we actually have any "out" parameters.
25704
25705 2002-08-05  Martin Baulig  <martin@gnome.org>
25706
25707         * expression.cs (Binary.ResolveOperator): When combining delegates,
25708         they must have the same type.
25709
25710 2002-08-05  Martin Baulig  <martin@gnome.org>
25711
25712         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25713         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25714         work with the ms runtime and we also don't need it: if we're a
25715         PropertyBuilder and not in the `indexer_arguments' hash, then we
25716         are a property and not an indexer.
25717
25718         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25719         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25720         since the latter one doesn't work with the ms runtime.
25721
25722 2002-08-03  Martin Baulig  <martin@gnome.org>
25723
25724         Fixed bugs #27998 and #22735.
25725
25726         * class.cs (Method.IsOperator): New public field.
25727         (Method.CheckBase): Report CS0111 if there's already a method
25728         with the same parameters in the current class.  Report CS0508 when
25729         attempting to change the return type of an inherited method.
25730         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25731         and it's not marked abstract or extern.
25732         (PropertyBase): New abstract base class for Property and Indexer.
25733         (PropertyBase.CheckBase): Moved here from Property and made it work
25734         for indexers.
25735         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25736         the same so we can reuse it there.
25737         (Property, Indexer): Derive from PropertyBase.
25738         (MethodSignature.inheritable_property_signature_filter): New delegate
25739         to find properties and indexers.
25740
25741         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25742         argument and improved error reporting.
25743
25744         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25745         EmptyReadOnlyParameters and made it a property.
25746
25747         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25748         version of this method which takes a `PropertyInfo indexer'.
25749         (TypeManager.RegisterIndexer): New method.
25750
25751         * class.cs: Added myself as author of this file :-)
25752
25753 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25754
25755         * class.cs: fixed compilation on windoze.
25756
25757 2002-08-03  Martin Baulig  <martin@gnome.org>
25758
25759         * interface.cs (Interface.GetInterfaceBases): Check whether all
25760         base interfaces are at least as accessible than the current one.
25761
25762         * class.cs (TypeContainer.GetClassBases): Check whether base types
25763         are at least as accessible than the current type.
25764         (TypeContainer.AsAccessible): Implemented and made non-static.
25765         (MemberBase.CheckParameters): Report errors if the accessibility
25766         checks fail.
25767
25768         * delegate.cs (Delegate.Delegate): The default visibility is
25769         internal for top-level types and private for nested types.
25770         (Delegate.Define): Report errors if the accessibility checks fail.
25771
25772         * enum.cs (Enum.Enum): The default visibility is internal for
25773         top-level types and private for nested types.
25774         (Enum.DefineType): Compute the correct visibility.
25775
25776         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25777         function which takes a `bool is_toplevel' instead of a TypeContainer.
25778
25779         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25780         builtin type.
25781
25782 2002-08-02  Martin Baulig  <martin@gnome.org>
25783
25784         * expression.cs (LocalVariableReferenc): Added constructor which
25785         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25786         (LocalVariableReference.IsReadOnly): New property.
25787         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25788         variable is readonly, use our own readonly flag to do this; you can
25789         use the new constructor to get a writable reference to a read-only
25790         variable.
25791
25792         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25793         reference to the local variable.
25794
25795 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25796
25797         * rootcontext.cs (ResolveCore): Also include System.Exception
25798
25799         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25800         we reach an EmptyStatement.
25801
25802         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25803         is also fine.
25804
25805         * expression.cs (Binary.ResolveOperator): Check error result in
25806         two places.
25807
25808         use brtrue/brfalse directly and avoid compares to null.
25809
25810 2002-08-02  Martin Baulig  <martin@gnome.org>
25811
25812         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25813         Fixes bug #28407, added test-155.cs.
25814
25815 2002-08-01  Martin Baulig  <martin@gnome.org>
25816
25817         * class.cs (Event.EmitDefaultMethod): Make this work with static
25818         events.  Fixes #28311, added verify-3.cs.
25819
25820 2002-08-01  Martin Baulig  <martin@gnome.org>
25821
25822         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25823         `is_disposable' fields.
25824         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25825         `hm.is_disposable' if we're using the collection pattern.
25826         (Foreach.EmitCollectionForeach): Use the correct type for the
25827         enumerator's local variable, only emit the try/finally block if
25828         necessary (fixes #27713).
25829
25830 2002-08-01  Martin Baulig  <martin@gnome.org>
25831
25832         * ecore.cs (Expression.report118): Renamed to Error118 and made
25833         it public static.
25834
25835         * statement.cs (Throw.Resolve): Check whether the expression is of
25836         the correct type (CS0118) and whether the type derives from
25837         System.Exception (CS0155).
25838         (Catch.Resolve): New method.  Do the type lookup here and check
25839         whether it derives from System.Exception (CS0155).
25840         (Catch.CatchType, Catch.IsGeneral): New public properties.
25841
25842         * typemanager.cs (TypeManager.exception_type): Added.
25843
25844 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25845
25846         * driver.cs: Updated About function.
25847
25848 2002-07-31  Martin Baulig  <martin@gnome.org>
25849
25850         Implemented Control Flow Analysis.
25851
25852         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25853         (EmitContext.CurrentBranching): Added.
25854         (EmitContext.StartFlowBranching): Added.
25855         (EmitContext.EndFlowBranching): Added.
25856         (EmitContext.KillFlowBranching): Added.
25857         (EmitContext.IsVariableAssigned): Added.
25858         (EmitContext.SetVariableAssigned): Added.
25859         (EmitContext.IsParameterAssigned): Added.
25860         (EmitContext.SetParameterAssigned): Added.
25861         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25862         Added control flow analysis stuff here.
25863
25864         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25865         resolve the expression as lvalue.
25866         (LocalVariableReference.DoResolve): Check whether the variable has
25867         already been assigned.
25868         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25869         the parameter as assigned here.
25870         (ParameterReference.DoResolve): Check whether the parameter has already
25871         been assigned.
25872         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25873         expression as lvalue.
25874
25875         * statement.cs (FlowBranching): New class for the flow analysis code.
25876         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25877         (LabeledStatement.IsDefined): New public property.
25878         (LabeledStatement.AddUsageVector): New public method to tell flow
25879         analyis that the label may be reached via a forward jump.
25880         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25881         flow analysis.
25882         (VariableInfo.Number): New public field.  This is used by flow analysis
25883         to number all locals of a block.
25884         (Block.CountVariables): New public property.  This is the number of
25885         local variables in this block (including the locals from all parent
25886         blocks).
25887         (Block.EmitMeta): Number all the variables.
25888
25889         * statement.cs: Added flow analysis support to all classes.
25890
25891 2002-07-31  Martin Baulig  <martin@gnome.org>
25892
25893         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25894         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25895         then use this argument.
25896
25897         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25898
25899         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25900         use this to specify /define options.
25901
25902 2002-07-29  Martin Baulig  <martin@gnome.org>
25903
25904         * statement.cs (Fixed): Moved all code that does variable lookups
25905         and resolvings from Emit to Resolve.
25906
25907         * statement.cs (For): Moved all code that does variable lookups
25908         and resolvings from Emit to Resolve.
25909
25910         * statement.cs (Using): Moved all code that does variable lookups
25911         and resolvings from Emit to Resolve.
25912
25913 2002-07-29  Martin Baulig  <martin@gnome.org>
25914
25915         * attribute.cs (Attribute.Resolve): Explicitly catch a
25916         System.NullReferenceException when creating the
25917         CustromAttributeBuilder and report a different warning message.
25918
25919 2002-07-29  Martin Baulig  <martin@gnome.org>
25920
25921         * support.cs (ParameterData.ParameterName): Added method to
25922         get the name of a parameter.
25923
25924         * typemanager.cs (TypeManager.IsValueType): New public method.
25925
25926 2002-07-29  Martin Baulig  <martin@gnome.org>
25927
25928         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25929         is a flag which specifies that it's either ref or out.
25930         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25931         the out parameter to `out Parameter.Modifier mod', also set the
25932         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25933
25934         * support.cs (InternalParameters.ParameterModifier): Distinguish
25935         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25936         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25937
25938         * expression.cs (Argument.GetParameterModifier): Distinguish
25939         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25940         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25941
25942 2002-07-29  Martin Baulig  <martin@gnome.org>
25943
25944         * expression.cs (ParameterReference.ParameterReference): Added
25945         `Location loc' argument to the constructor.
25946
25947         * cs-parser.jay: Pass location to ParameterReference.
25948
25949 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25950
25951         * statement.cs (Try): Initialize the location.
25952
25953         * cs-parser.jay: pass location to Try.
25954
25955         * expression.cs (Unary.Reduce): Change the prototype to return
25956         whether a constant fold could be performed or not.  The result is
25957         returned in an out parameters.  In the case of Indirection and
25958         AddressOf, we want to perform the full tests.
25959
25960 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25961
25962         * statement.cs (Statement.Emit): Flag dead code.
25963
25964 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25965
25966         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25967
25968 2002-07-27  Martin Baulig  <martin@gnome.org>
25969
25970         * class.cs (MethodData.Define): Put back call to
25971         TypeManager.AddMethod(), accidentally commented this out.
25972
25973         * report.cs (Debug): New public method to print debugging information,
25974         this is `[Conditional ("DEBUG")]'.
25975
25976 2002-07-26  Martin Baulig  <martin@gnome.org>
25977
25978         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25979         (switch_statement): Push the current_block to the switch_stack and
25980         pop it again when we're done with the switch.
25981         (switch_section): The new block is a child of the current_block.
25982         Fixes bug #24007, added test-152.cs.
25983
25984 2002-07-27  Martin Baulig  <martin@gnome.org>
25985
25986         * expression.cs (Invocation.EmitArguments): When calling a varargs
25987         function with only its fixed arguments, we need to pass an empty
25988         array.
25989
25990 2002-07-27  Martin Baulig  <martin@gnome.org>
25991
25992         Mono 0.13 has been released.
25993
25994 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25995
25996         * driver.cs: Rename --resource to --linkres, because that is what
25997         we do currently, we dont support --resource yet.
25998
25999         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
26000
26001 2002-07-25  Martin Baulig  <martin@gnome.org>
26002
26003         * class.cs (MethodData): New public class.  This is a `method builder'
26004         class for a method or one accessor of a Property/Indexer/Event.
26005         (MethodData.GetMethodFlags): Moved here from MemberBase.
26006         (MethodData.ApplyAttributes): Likewise.
26007         (MethodData.ApplyObsoleteAttribute): Likewise.
26008         (MethodData.ApplyConditionalAttribute): Likewise.
26009         (MethodData.ApplyDllImportAttribute): Likewise.
26010         (MethodData.CheckAbstractAndExternal): Likewise.
26011         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
26012         (MethodData.Emit): Formerly known as Method.Emit().
26013         (MemberBase): Moved everything which was specific to a single
26014         accessor/method to MethodData.
26015         (Method): Create a new MethodData and call Define() and Emit() on it.
26016         (Property, Indexer, Event): Create a new MethodData objects for each
26017         accessor and call Define() and Emit() on them.
26018
26019 2002-07-25  Martin Baulig  <martin@gnome.org>
26020
26021         Made MethodCore derive from MemberBase to reuse the code from there.
26022         MemberBase now also checks for attributes.
26023
26024         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
26025         (MemberBase.GetMethodFlags): Moved here from class Method and marked
26026         as virtual.
26027         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
26028         `CallingConventions cc' and `Attributes opt_attrs' arguments.
26029         (MemberBase.ApplyAttributes): New virtual method; applies the
26030         attributes to a method or accessor.
26031         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
26032         (MemberBase.ApplyConditionalAttribute): Likewise.
26033         (MemberBase.ApplyDllImportAttribute): Likewise.
26034         (MemberBase.CheckAbstractAndExternal): Likewise.
26035         (MethodCore.ParameterTypes): This is now a property instead of a
26036         method, it's initialized from DoDefineParameters().
26037         (MethodCore.ParameterInfo): Removed the set accessor.
26038         (MethodCore.DoDefineParameters): New protected virtual method to
26039         initialize ParameterTypes and ParameterInfo.
26040         (Method.GetReturnType): We can now simply return the MemberType.
26041         (Method.GetMethodFlags): Override the MemberBase version and add
26042         the conditional flags.
26043         (Method.CheckBase): Moved some code from Define() here, call
26044         DoDefineParameters() here.
26045         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
26046         here to avoid some larger code duplication.
26047         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
26048         ensure that abstract and external accessors don't declare a body.
26049
26050         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
26051         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
26052         lookup in the attribute's parent classes, so we need to abort as soon
26053         as we found the first match.
26054         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
26055         the attribute has no arguments.
26056
26057         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
26058         of a Method.
26059
26060 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26061
26062         * cs-parser.jay: reverted previous patch.
26063
26064 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26065
26066         * cs-parser.jay: fixed bug #22119.
26067
26068 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26069
26070         * attribute.cs: fixed compilation. The error was:
26071         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
26072         be assigned to before control leaves the current method."
26073         [FIXME:  Filed as bug #28186: MCS must report this error.]
26074
26075 2002-07-25  Martin Baulig  <martin@gnome.org>
26076
26077         * attribute.cs (Attribute.Conditional_GetConditionName): New static
26078         method to pull the condition name ouf of a Conditional attribute.
26079         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
26080         the obsolete message and error flag out of an Obsolete attribute.
26081
26082         * class.cs (Method.GetMethodFlags): New public method to get the
26083         TypeManager.MethodFlags for this method.
26084         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
26085         private methods.
26086         (Method.Define): Get and apply the Obsolete and Conditional attributes;
26087         if we're overriding a virtual function, set the new private variable
26088         `parent_method'; call the new TypeManager.AddMethod().
26089
26090         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
26091         the MethodBuilder and the Method in a PtrHashtable.
26092         (TypeManager.builder_to_method): Added for this purpose.
26093         (TypeManager.MethodFlags): Added IsObsoleteError.
26094         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
26095         Obsolete and Conditional arguments in MethodBuilders.  If we discover
26096         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
26097         the message from the attribute.
26098
26099 2002-07-24  Martin Baulig  <martin@gnome.org>
26100
26101         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
26102         preprocessor directives, ensure that the argument to #define/#undef is
26103         exactly one identifier and that it's actually an identifier.
26104
26105         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
26106         did not work ....
26107
26108 2002-07-24  Martin Baulig  <martin@gnome.org>
26109
26110         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
26111         initialize it to TypeManager.object_type in the constructor.
26112         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
26113         of the `hm.get_current' method if we're using the collection pattern.
26114         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
26115         for the explicit conversion to make it work when we're using the collection
26116         pattern and the `Current' property has a different return type than `object'.
26117         Fixes #27713.
26118
26119 2002-07-24  Martin Baulig  <martin@gnome.org>
26120
26121         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
26122         does not match, but don't report any errors.  This method is called in
26123         order for all methods in a MethodGroupExpr until a matching method is
26124         found, so we don't want to bail out if the first method doesn't match.
26125         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
26126         matches, report the 123.  Fixes #28070.
26127
26128 2002-07-24  Martin Baulig  <martin@gnome.org>
26129
26130         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
26131         TypeManager.TypeToCoreType() to the top of the method so the
26132         following equality checks will work.  Fixes #28107.
26133
26134 2002-07-24  Martin Baulig  <martin@gnome.org>
26135
26136         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
26137         operand is of type uint, and the other operand is of type sbyte,
26138         short or int, the operands are converted to type long." -
26139         Actually do what this comment already told us.  Fixes bug #28106,
26140         added test-150.cs.
26141
26142 2002-07-24  Martin Baulig  <martin@gnome.org>
26143
26144         * class.cs (MethodBase): New abstract class.  This is now a base
26145         class for Property, Indexer and Event to avoid some code duplication
26146         in their Define() and DefineMethods() methods.
26147         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
26148         generic methods for Define() and DefineMethods().
26149         (FieldBase): Derive from MemberBase, not MemberCore.
26150         (Property): Derive from MemberBase, not MemberCore.
26151         (Property.DefineMethod): Moved all the code from this method to the
26152         new MethodBase.DefineAccessor(), just call it with appropriate
26153         argumetnts.
26154         (Property.Define): Call the new Property.DoDefine(), this does some
26155         sanity checks and we don't need to duplicate the code everywhere.
26156         (Event): Derive from MemberBase, not MemberCore.
26157         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
26158         accessors, this will also make them work with interface events.
26159         (Indexer): Derive from MemberBase, not MemberCore.
26160         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
26161         (Indexer.Define): Use the new MethodBase functions.
26162
26163         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
26164         argument to the constructor.
26165         (Interface.FindMembers): Added support for interface events.
26166         (Interface.PopluateEvent): Implemented.
26167
26168         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
26169
26170 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
26171
26172         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
26173         but this is required to check for a method name being the same as
26174         the containing class.  
26175
26176         Handle this now.
26177
26178 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26179
26180         * interface.cs: initialize variable.
26181
26182 2002-07-23  Martin Baulig  <martin@gnome.org>
26183
26184         Implemented the IndexerName attribute in interfaces.
26185
26186         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
26187         name if this is an explicit interface implementation.
26188         (Indexer.InterfaceIndexerName): New public variable.  If we're
26189         implementing an interface indexer, this is the IndexerName in that
26190         interface.  Otherwise, it's the IndexerName.
26191         (Indexer.DefineMethod): If we're implementing interface indexer,
26192         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
26193         and Pending.ImplementIndexer methods.
26194         (Indexer.Define): Also define the PropertyBuilder if we're
26195         implementing an interface indexer and this is neither an explicit
26196         interface implementation nor do the IndexerName match the one in
26197         the interface.
26198
26199         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
26200         If a method is defined here, then we always need to create a proxy
26201         for it.  This is used when implementing interface indexers.
26202         (Pending.IsInterfaceIndexer): New public method.
26203         (Pending.ImplementIndexer): New public method.
26204         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
26205         This is used when implementing interface indexers to define a proxy
26206         if necessary.
26207         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
26208         define a proxy if necessary.
26209
26210         * interface.cs (Interface.IndexerName): New public variable.
26211         (Interface.PopulateIndexer): Set the IndexerName.
26212         (Interface.DefineIndexers): New private method.  Populate all the
26213         indexers and make sure their IndexerNames match.
26214
26215         * typemanager.cs (IndexerPropertyName): Added support for interface
26216         indexers.
26217
26218 2002-07-22  Martin Baulig  <martin@gnome.org>
26219
26220         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
26221         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
26222         ret if HasReturnLabel.
26223         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
26224         variables.
26225
26226         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
26227         and set the ec.LoopBeginTryCatchLevel.
26228         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
26229         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
26230         the current ec.TryCatchLevel, the branch goes out of an exception
26231         block.  In this case, we need to use Leave and not Br.
26232
26233 2002-07-22  Martin Baulig  <martin@gnome.org>
26234
26235         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
26236         block unless the block does not always return or it is contained in
26237         another try { ... } catch { ... } block.  Fixes bug #26506.
26238         Added verify-1.cs to the test suite.
26239
26240 2002-07-22  Martin Baulig  <martin@gnome.org>
26241
26242         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
26243         then we do not always return.  Fixes bug #24985.
26244
26245 2002-07-22  Martin Baulig  <martin@gnome.org>
26246
26247         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
26248         lookup on a per-class level; ie. walk up the class hierarchy until we
26249         found at least one applicable method, then choose the best among them.
26250         Fixes bug #24463 and test-29.cs.
26251
26252 2002-07-22  Martin Baulig  <martin@gnome.org>
26253
26254         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
26255         return types of the methods.  The return type is not part of the
26256         signature and we must not check it to make the `new' modifier work.
26257         Fixes bug #27999, also added test-147.cs.
26258         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
26259
26260         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
26261         on the method's return type.
26262
26263 2002-07-21  Martin Baulig  <martin@gnome.org>
26264
26265         * assign.cs: Make this work if the rightmost source is a constant and
26266         we need to do an implicit type conversion.  Also adding a few more tests
26267         to test-38.cs which should have caught this.
26268
26269         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
26270         target in the makefile for this.  The makefile.gnu is primarily intended
26271         for end-users who don't want to debug the compiler.
26272
26273 2002-07-21  Martin Baulig  <martin@gnome.org>
26274
26275         * assign.cs: Improved the Assign class so it can now handle embedded
26276         assignments (X = Y = Z = something).  As a side-effect this'll now also
26277         consume less local variables.  test-38.cs now passes with MCS, added
26278         a few new test cases to that test.
26279
26280 2002-07-20  Martin Baulig  <martin@gnome.org>
26281
26282         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
26283         instructions.  Fixes bug #27977, also added test-146.cs.
26284
26285 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26286
26287         * cs-tokenizer.cs: fixed getHex ().
26288
26289 2002-07-19  Martin Baulig  <martin@gnome.org>
26290
26291         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
26292         not Type.GetType() to lookup the array type.  This is needed when
26293         we're constructing an array of a user-defined type.
26294         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
26295         single-dimensional arrays, but also for single-dimensial arrays of
26296         type decimal.
26297
26298 2002-07-19  Martin Baulig  <martin@gnome.org>
26299
26300         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
26301         this function is called, it's not allowed to share LocalBuilders
26302         among ILGenerators.
26303
26304 2002-07-19  Martin Baulig  <martin@gnome.org>
26305
26306         * expression.cs (Argument.Resolve): Report an error 118 when trying
26307         to pass a type as argument.
26308
26309 2002-07-18  Martin Baulig  <martin@gnome.org>
26310
26311         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
26312         Conv_R_Un for the signed `long' type.
26313
26314 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
26315
26316         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
26317         `expr' for the temporary result, as that will fail if we do
26318         multiple resolves on the same expression.
26319
26320 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
26321
26322         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
26323         ec.TypeContainer for looking up aliases. 
26324
26325         * class.cs (TypeContainer): Remove LookupAlias from here.
26326
26327         * decl.cs (DeclSpace); Move here.
26328
26329 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
26330
26331         * class.cs (FindMembers): Only call filter if the constructor
26332         bulider is not null.
26333
26334         Also handle delegates in `NestedTypes' now.  Now we will perform
26335         type lookups using the standard resolution process.  This also
26336         fixes a bug.
26337
26338         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
26339         This uses Expressions (the limited kind that can be parsed by the
26340         tree) instead of strings.
26341
26342         * expression.cs (ComposedCast.ToString): Implement, used to flag
26343         errors since now we have to render expressions.
26344
26345         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
26346         FormArrayType. 
26347
26348         * ecore.cs (SimpleName.ToString): ditto.
26349
26350         * cs-parser.jay: Instead of using strings to assemble types, use
26351         Expressions to assemble the type (using SimpleName, ComposedCast,
26352         MemberAccess).  This should fix the type lookups in declarations,
26353         because we were using a different code path for this.
26354
26355         * statement.cs (Block.Resolve): Continue processing statements
26356         even when there is an error.
26357
26358 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
26359
26360         * class.cs (Event.Define): Also remove the `remove' method from
26361         the list of pending items.
26362
26363         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
26364         generate more compact code. 
26365
26366 2002-07-17  Martin Baulig  <martin@gnome.org>
26367
26368         * const.cs (Const.LookupConstantValue): Add support for constant
26369         `unchecked' and `checked' expressions.
26370         Also adding test case test-140.cs for this.
26371
26372 2002-07-17  Martin Baulig  <martin@gnome.org>
26373
26374         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
26375         check whether mi.ReturnType implements the IEnumerator interface; the
26376         `==' and the IsAssignableFrom() will fail in this situation.
26377
26378 2002-07-16  Ravi Pratap  <ravi@ximian.com>
26379
26380         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
26381         here too.
26382
26383 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26384
26385         * expression.cs: fixed bug #27811.
26386
26387 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
26388
26389         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
26390         Molaro: when we are a ref, the value already contains a pointer
26391         value, do not take the address of it.
26392
26393 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
26394         * removed mb-parser.jay and mb-tokenizer.cs
26395
26396 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26397
26398         * expression.cs: check against the building corlib void type.
26399
26400 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26401
26402         * ecore.cs: fix for valuetype static readonly fields: when 
26403         initializing them, we need their address, not the address of a copy.
26404
26405 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26406
26407         * typemanager.cs: register also enum_type in corlib.
26408
26409 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26410
26411         * class.cs: allow calling this (but not base) initializers in structs.
26412
26413 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26414
26415         * ecore.cs: make sure we compare against the building base types
26416         in GetTypeSize ().
26417
26418 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26419
26420         * typemanager.cs: fix TypeToCoreType() to handle void and object
26421         (corlib gets no more typerefs after this change).
26422
26423 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26424
26425         * expression.cs (ArrayCreation.EmitArrayArguments): use
26426         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26427
26428         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26429         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26430         array indexes, the runtime actually forbids them.
26431
26432         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26433         for array arguments here.
26434
26435         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26436         instead of the default for ValueTypes.
26437
26438         (New.DoEmit): Use IsValueType instead of
26439         IsSubclassOf (value_type)
26440         (New.DoResolve): ditto.
26441         (Invocation.EmitCall): ditto.
26442
26443         * assign.cs (Assign): ditto.
26444
26445         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26446         Statements *are* currently doing part of their resolution during
26447         Emit.  
26448
26449         Expressions do always resolve during resolve, but statements are
26450         only required to propagate resolution to their children.
26451
26452 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26453
26454         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26455
26456         (LoadAssembly): Do not add the dll if it is already specified
26457
26458         (MainDriver): Add the System directory to the link path at the end,
26459         after all the other -L arguments. 
26460
26461         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26462         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26463         ldelem.u1) and using the opposite for sbytes.
26464
26465         This fixes Digger, and we can finally run it.
26466
26467         * driver.cs (UnixParseOption): Move the option parsing here.  
26468         (CSCParseOption): Implement CSC-like parsing of options.
26469
26470         We now support both modes of operation, the old Unix way, and the
26471         new CSC-like way.  This should help those who wanted to make cross
26472         platform makefiles.
26473
26474         The only thing broken is that /r:, /reference: and /lib: are not
26475         implemented, because I want to make those have the same semantics
26476         as the CSC compiler has, and kill once and for all the confussion
26477         around this.   Will be doing this tomorrow.
26478
26479         * statement.cs (Unsafe.Resolve): The state is checked during
26480         resolve, not emit, so we have to set the flags for IsUnsfe here.
26481
26482 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26483
26484         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26485         not catch the Error_ObjectRefRequired in SimpleName (as it is
26486         possible to have a class/instance variable name that later gets
26487         deambiguated), we have to check this here.      
26488
26489 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26490
26491         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26492         make static and put into Expression.
26493
26494         (Event.Define): Register the private field of the event with the 
26495         TypeManager so that GetFieldFromEvent can get at it.
26496
26497         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26498         keep track of the private field associated with an event which
26499         has no accessors.
26500
26501         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26502         private field.
26503
26504         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26505
26506 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26507
26508         * expression.cs (Binary.EmitBranchable): this routine emits the
26509         Binary expression in a branchable context.  This basically means:
26510         we need to branch somewhere, not just get the value on the stack.
26511
26512         This works together with Statement.EmitBoolExpression.
26513
26514         * statement.cs (Statement.EmitBoolExpression): Use
26515         EmitBranchable. 
26516
26517 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26518
26519         * statement.cs (For): Reduce the number of jumps in loops.
26520
26521         (For): Implement loop inversion for the For statement.
26522
26523         (Break): We can be breaking out of a Try/Catch controlled section
26524         (foreach might have an implicit try/catch clause), so we need to
26525         use Leave instead of Br.
26526
26527         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26528         now).  If the instace expression supports IMemoryLocation, we use
26529         the AddressOf method from the IMemoryLocation to extract the
26530         address instead of emitting the instance.
26531
26532         This showed up with `This', as we were emitting the instance
26533         always (Emit) instead of the Address of This.  Particularly
26534         interesting when This is a value type, as we dont want the Emit
26535         effect (which was to load the object).
26536
26537 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26538
26539         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26540
26541         * statement.cs (Checked): Set the CheckedState during the resolve
26542         process too, as the ConvCast operations track the checked state on
26543         the resolve process, and not emit.
26544
26545         * cs-parser.jay (namespace_member_declaration): Flag that we have
26546         found a declaration when we do.  This is used to flag error 1529
26547
26548         * driver.cs: Report ok when we display the help only.
26549
26550 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26551
26552         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26553
26554 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26555
26556         * cs-tokenizer.cs (define): We also have to track locally the
26557         defines.  AllDefines is just used for the Conditional Attribute,
26558         but we also need the local defines for the current source code. 
26559
26560 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26561
26562         * statement.cs (While, For, Do): These loops can exit through a
26563         Break statement, use this information to tell whether the
26564         statement is the last piece of code.
26565
26566         (Break): Flag that we break.
26567
26568         * codegen.cs (EmitContexts): New `Breaks' state variable.
26569
26570 2002-07-03  Martin Baulig  <martin@gnome.org>
26571
26572         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26573         modifiers in method declarations in structs.  Otherwise, you won't
26574         be able to override things like Object.Equals().
26575
26576 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26577
26578         * class.cs (Method, Property, Indexer): Do not allow the public
26579         modifier to be used in explicit interface implementations.
26580
26581         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26582         override modifiers in method declarations in structs
26583
26584 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26585
26586         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26587         integer or real overflow, report an error
26588
26589 2002-07-02  Martin Baulig  <martin@gnome.org>
26590
26591         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26592         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26593         to tell the runtime about our newly created System.Object and
26594         System.ValueType types.
26595
26596 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26597
26598         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26599         struct instead of Ldarg/Starg.
26600
26601 2002-07-02  Martin Baulig  <martin@gnome.org>
26602
26603         * expression.cs (Indirection.Indirection): Call
26604         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26605
26606 2002-07-02  Martin Baulig  <martin@gnome.org>
26607
26608         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26609         ValueType, call TypeManager.TypeToCoreType() on it.
26610         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26611         the OpCodes.Newarr argument.
26612
26613 2002-07-02  Martin Baulig  <martin@gnome.org>
26614
26615         * expression.cs (Invocation.EmitCall): When compiling corlib,
26616         replace all calls to the system's System.Array type to calls to
26617         the newly created one.
26618
26619         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26620         System.Array methods.
26621         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26622         from the system's System.Array type which must be replaced.
26623
26624 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26625
26626         * typemanager.cs: load unverifiable_code_ctor so we can build
26627         corlib using the correct type. Avoid using GetTypeCode() with
26628         TypeBuilders.
26629         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26630         TypeManager.object_type to allow building corlib.
26631
26632 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26633
26634         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26635
26636 2002-07-01  Martin Baulig  <martin@gnome.org>
26637
26638         * class.cs: Make the last change actually work, we need to check
26639         whether `ifaces != null' to avoid a crash.
26640
26641 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26642
26643         * class.cs: when we build structs without fields that implement
26644         interfaces, we need to add the interfaces separately, since there is
26645         no API to both set the size and add the interfaces at type creation
26646         time.
26647
26648 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26649
26650         * expression.cs: the dimension arguments to the array constructors
26651         need to be converted if they are a long.
26652
26653 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26654
26655         * class.cs: don't emit ldarg.0 if there is no parent constructor
26656         (fixes showstopper for corlib).
26657
26658 2002-06-29  Martin Baulig  <martin@gnome.org>
26659
26660         MCS now compiles corlib on GNU/Linux :-)
26661
26662         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26663         ie. check for MethodImplOptions.InternalCall.
26664
26665         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26666         and TypeManager.attribute_type are null, so we must explicitly check
26667         whether parent is not null to find out whether it's an attribute type.
26668         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26669         and SetBuilder, not only if the property is neither abstract nor external.
26670         This is necessary to set the MethodImplOptions on the accessor methods.
26671         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26672         SetBuilder, see Property.Emit().
26673
26674         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26675         populate "System.Object", "System.ValueType" and "System.Attribute" since
26676         they've already been populated from BootCorlib_PopulateCoreTypes().
26677
26678 2002-06-29  Martin Baulig  <martin@gnome.org>
26679
26680         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26681         is the NullLiteral, we also need to make sure that target_type is not
26682         an enum type.   
26683
26684 2002-06-29  Martin Baulig  <martin@gnome.org>
26685
26686         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26687         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26688         before calling BootstrapCorlib_ResolveDelegate ().
26689
26690 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26691
26692         * statement.cs: fixed build-breaker. All tests passed ok.
26693
26694 2002-06-27  Martin Baulig  <martin@gnome.org>
26695
26696         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26697         for System.Decimal when compiling corlib.
26698
26699 2002-06-27  Martin Baulig  <martin@gnome.org>
26700
26701         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26702         switch blocks which contain nothing but a default clause.
26703
26704 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26705
26706        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26707
26708 2002-06-27  Martin Baulig  <martin@gnome.org>
26709
26710         * ecore.cs (PropertyExpr.PropertyExpr): Call
26711         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26712
26713         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26714         is already a TypeBuilder.
26715
26716 2002-06-27  Martin Baulig  <martin@gnome.org>
26717
26718         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26719         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26720         the "from an array-type to System.Array" case.  This makes it work
26721         when compiling corlib.
26722
26723 2002-06-27  Martin Baulig  <martin@gnome.org>
26724
26725         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26726         non-static PropertyExpr, set its InstanceExpression.  This makes
26727         the `ICollection.Count' property work in System/Array.cs.
26728
26729 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26730
26731         * driver.cs: Made error handling more consistent.  Errors now
26732         tracked by Report class, so many methods which used to return int
26733         now return void.  Main() now prints success/failure and 
26734         errors/warnings message.
26735
26736         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26737         the magic number return values (123 and 124).  Now, if the
26738         expected error occurs, the compiler exits with success (exit value
26739         0).  If the compilation completes without seeing that particular
26740         error, the compiler exits with failure (exit value 1).  The
26741         makefile in mcs/errors has been changed to handle the new behaviour.
26742
26743         * report.cs: Made 'expected error' number a property and renamed
26744         it from 'Probe' to 'ExpectedError'.
26745
26746         * genericparser.cs: Removed error handling support, since it is
26747         now all done by Report class.
26748
26749         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26750         class, so parse() no longer returns an int.
26751
26752         * namespace.cs: Use Report.Error instead of GenericParser.error
26753
26754 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26755
26756         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26757         TypeContainer.AddOperator): At the front of the list put the
26758         explicit implementations, so they get resolved/defined first. 
26759
26760 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26761
26762         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26763         interface type is implemented by this TypeContainer.  Used during
26764         explicit interface implementation.
26765
26766         (Property.Define, Indexer.Define, Method.Define): Validate that
26767         the given interface in the explicit implementation is one of the
26768         base classes for the containing type.
26769
26770         Also if we are explicitly implementing an interface, but there is
26771         no match in the pending implementation table, report an error.
26772
26773         (Property.Define): Only define the property if we are
26774         not explicitly implementing a property from an interface.  Use the
26775         correct name also for those properties (the same CSC uses,
26776         although that is really not needed).
26777
26778         (Property.Emit): Do not emit attributes for explicitly implemented
26779         properties, as there is no TypeBuilder.
26780
26781         (Indexer.Emit): ditto.
26782
26783         Hiding then means that we do not really *implement* a pending
26784         implementation, which makes code fail.
26785
26786 2002-06-22  Martin Baulig  <martin@gnome.org>
26787
26788         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26789         the return value of Object.GetType().  [FIXME: we need to do this whenever
26790         we get a type back from the reflection library].
26791
26792 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26793
26794         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26795
26796 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26797
26798         * attribute.cs: Return null if we can not look up the type.
26799
26800         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26801         the interface types found.
26802
26803         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26804         interface types found.
26805
26806         * typemanager.cs (GetInterfaces): Make this routine returns alll
26807         the interfaces and work around the lame differences between
26808         System.Type and System.Reflection.Emit.TypeBuilder in the results
26809         result for GetInterfaces.
26810
26811         (ExpandInterfaces): Given an array of interface types, expand and
26812         eliminate repeated ocurrences of an interface.  This expands in
26813         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26814         be IA, IB, IC.
26815
26816 2002-06-21  Martin Baulig  <martin@gnome.org>
26817
26818         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26819         on System.Enum.
26820
26821 2002-06-21  Martin Baulig  <martin@gnome.org>
26822
26823         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26824         and called with one of the core types, return the corresponding typebuilder for
26825         that type.
26826
26827         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26828         element type.
26829
26830 2002-06-21  Martin Baulig  <martin@gnome.org>
26831
26832         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26833         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26834         (Expression.ConvertReferenceExplicit): Likewise.
26835
26836         * expression.cs (ElementAccess.DoResolve): Likewise.
26837         (ElementAccess.DoResolveLValue): Likewise.
26838
26839 2002-06-10  Martin Baulig  <martin@gnome.org>
26840
26841         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26842         add the "value" parameter to the parameter list.
26843
26844         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26845         to our caller.
26846
26847 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26848
26849         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26850         the argument to an int, uint, long or ulong, per the spec.  Also
26851         catch negative constants in array creation.
26852
26853 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26854
26855         * class.cs: do not allow the same interface to appear twice in
26856         the definition list.
26857
26858 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26859
26860         * ecore.cs: don't use ldlen with System.Array.
26861
26862 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26863
26864         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26865
26866 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26867
26868         * modifiers.cs: produce correct field attributes for protected
26869         internal. Easy fix so miguel can work on ther harder stuff:-)
26870
26871 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26872
26873         * pending.cs: New file.  Move the code from class.cs here.
26874         Support clearning the pending flag for all methods (when not doing
26875         explicit interface implementation).
26876
26877 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26878
26879         * rootcontext.cs: added a couple more types needed to bootstrap.
26880
26881 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26882
26883         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26884         constructor in the type, instead of any constructor in the type
26885         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26886         a bug in the Mono runtime when applying the params attribute). 
26887
26888 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26889         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26890
26891 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26892
26893         * expression.cs (Unary.ResolveOperator): Use TypeManager
26894         to resolve the type.
26895
26896 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26897
26898         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26899         attached.
26900
26901         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26902         with each member too.
26903
26904         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26905         field builders too - this takes care of the enum member case.
26906
26907 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26908
26909         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26910         address-of operator on both value types and pointers.
26911
26912 2002-06-10  Martin Baulig  <martin@gnome.org>
26913
26914         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26915         PropertyBuilder to the `property_builders' list.
26916
26917         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26918         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26919         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26920         find any indexers which are inherited from an interface.
26921
26922 2002-06-09  Martin Baulig  <martin@gnome.org>
26923
26924         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26925         the same type as the constant if necessary.  There's also a test-130.cs
26926         for this.
26927
26928         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26929
26930         * typemanager.cs (TypeManager.ChangeType): Previously known as
26931         Enum.ChangeEnumType().
26932
26933 2002-06-09  Martin Baulig  <martin@gnome.org>
26934
26935         * expression.cs (Cast.TryReduce): Added support for consts.
26936
26937 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26938
26939         * class.cs (Accessor): Hold attributes information so we can pass
26940         it along.
26941
26942         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26943         Modify to pass in attributes attached to the methods.
26944
26945         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26946
26947         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26948         to handle the Accessor kind :-)
26949
26950         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26951
26952 2002-06-08  Martin Baulig  <martin@gnome.org>
26953
26954         * expression.cs (Unary.TryReduceNegative): Added support for
26955         ULongConstants.
26956
26957 2002-06-08  Martin Baulig  <martin@gnome.org>
26958
26959         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26960         name can't be found in the `defined_names' - the caller will do a
26961         MemberLookup in this case and thus find methods in System.Enum
26962         such as Enum.IsDefined().
26963
26964 2002-06-08  Martin Baulig  <martin@gnome.org>
26965
26966         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26967         Convert.ChangeType() which works with TypeBuilder created types.
26968         (Enum.LookupEnumValue, Enum.Define): Use it here.
26969
26970         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26971         `TypeBuilder.BaseType != null' check.
26972         (TypeContainer.FindMembers): Only lookup parent members if we
26973         actually have a parent.
26974         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26975         (ConstructorInitializer.Resolve): Likewise.
26976
26977         * interface.cs (Interface.FindMembers): Added
26978         `TypeBuilder.BaseType != null' check.
26979
26980         * rootcontext.cs (RootContext.ResolveCore): Added
26981         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26982         classes_second_stage.
26983
26984         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26985         debug_type and trace_type when compiling with --nostdlib.       
26986
26987 2002-06-07  Martin Baulig  <martin@gnome.org>
26988
26989         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26990         (AddField): Set it to true when adding a non-static field.
26991         (DefineType): Use `have_nonstatic_fields' to find out whether we
26992         have non-static fields, not `Fields != null'.
26993
26994 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26995
26996         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26997         dereferencing a null on the static-field code path)
26998
26999 2002-05-30  Martin Baulig  <martin@gnome.org>
27000
27001         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
27002         to take command line arguments.  Use reflection to call the new
27003         custom `Initialize' function on the symbol writer and pass it the
27004         command line arguments.
27005
27006         * driver.cs (--debug-args): New command line argument to pass command
27007         line arguments to the symbol writer.
27008
27009 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
27010
27011         * assign.cs (DoResolve): Forgot to do the implicit conversion to
27012         the target type for indexers and properties.  Thanks to Joe for
27013         catching this.
27014
27015 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
27016
27017         * typemanager.cs (MethodFlags): returns the method flags
27018         (Obsolete/ShouldIgnore) that control warning emission and whether
27019         the invocation should be made, or ignored. 
27020
27021         * expression.cs (Invocation.Emit): Remove previous hack, we should
27022         not do this on matching a base type, we should do this based on an attribute
27023
27024         Only emit calls to System.Diagnostics.Debug and
27025         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
27026         on the command line.
27027
27028         * rootcontext.cs: Global settings for tracing and debugging.
27029
27030         * cs-tokenizer.cs (define): New utility function to track
27031         defines.   Set the global settings for TRACE and DEBUG if found.
27032
27033 2002-05-25  Ravi Pratap  <ravi@ximian.com>
27034
27035         * interface.cs (Populate*): Pass in the TypeContainer as well as
27036         the DeclSpace as parameters so that we can create EmitContexts and
27037         then use that to apply attributes etc.
27038
27039         (PopulateMethod, PopulateEvent, PopulateProperty)
27040         (PopulateIndexer): Apply attributes everywhere.
27041
27042         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
27043         etc.
27044
27045         (ApplyAttributes): Update accordingly.
27046
27047         We now apply interface attributes for all members too.
27048
27049 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
27050
27051         * class.cs (Indexer.Define); Correctly check if we are explicit
27052         implementation (instead of checking the Name for a ".", we
27053         directly look up if the InterfaceType was specified).
27054
27055         Delay the creation of the PropertyBuilder.
27056
27057         Only create the PropertyBuilder if we are not an explicit
27058         interface implementation.   This means that explicit interface
27059         implementation members do not participate in regular function
27060         lookups, and hence fixes another major ambiguity problem in
27061         overload resolution (that was the visible effect).
27062
27063         (DefineMethod): Return whether we are doing an interface
27064         implementation. 
27065
27066         * typemanager.cs: Temporary hack until we get attributes in
27067         interfaces (Ravi is working on that) and we get IndexerName
27068         support in interfaces.
27069
27070         * interface.cs: Register the indexers as properties.
27071
27072         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
27073         warning, I have verified that this is a bug in the .NET runtime
27074         (JavaScript suffers of the same problem).
27075
27076         * typemanager.cs (MemberLookup): When looking up members for
27077         interfaces, the parent of an interface is the implicit
27078         System.Object (so we succeed in searches of Object methods in an
27079         interface method invocation.  Example:  IEnumerable x;  x.ToString
27080         ()) 
27081
27082 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
27083
27084         * class.cs (Event): Events should also register if they do
27085         implement the methods that an interface requires.
27086
27087         * typemanager.cs (MemberLookup); use the new GetInterfaces
27088         method. 
27089
27090         (GetInterfaces): The code used to lookup interfaces for a type is
27091         used in more than one place, factor it here. 
27092
27093         * driver.cs: Track the errors at the bottom of the file, we kept
27094         on going.
27095
27096         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
27097         instance if the method we are calling is static!
27098
27099 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
27100
27101         * attribute.cs (ApplyAttributes): Make this function filter out
27102         the IndexerName attribute (as that attribute in reality is never
27103         applied) and return the string constant for the IndexerName
27104         attribute. 
27105
27106         * class.cs (TypeContainer.Emit): Validate that all the indexers
27107         have the same IndexerName attribute, and if so, set the
27108         DefaultName attribute on the class. 
27109
27110         * typemanager.cs: The return value might contain other stuff (not
27111         only methods).  For instance, consider a method with an "Item"
27112         property and an Item method.
27113
27114         * class.cs: If there is a problem with the parameter types,
27115         return. 
27116
27117 2002-05-24  Ravi Pratap  <ravi@ximian.com>
27118
27119         * ecore.cs (ImplicitConversionExists): Wrapper function which also
27120         looks at user defined conversion after making a call to 
27121         StandardConversionExists - we need this for overload resolution.
27122
27123         * expression.cs : Update accordingly the various method calls.
27124
27125         This fixes 2 bugs filed against implicit user defined conversions 
27126
27127 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
27128
27129         * statement.cs: Track the result of the assignment.
27130
27131 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
27132
27133         * expression.cs (MemberAccess): Improved error reporting for
27134         inaccessible members.
27135
27136 2002-05-22  Martin Baulig  <martin@gnome.org>
27137
27138         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
27139         itself with debugging support.
27140
27141 2002-05-22  Martin Baulig  <martin@gnome.org>
27142
27143         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
27144         Removed, this isn't needed anymore.
27145
27146 2002-05-20  Martin Baulig  <martin@gnome.org>
27147
27148         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
27149         be underlying type for an enum.
27150
27151 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
27152
27153         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
27154         that splits out the loading of just the core types.
27155
27156         * rootcontext.cs (ResolveCore): Split the struct resolution in
27157         two, so we can load the enumeration underlying types before any
27158         enums are used.
27159
27160         * expression.cs (Is): Bandaid until we fix properly Switch (see
27161         bug #24985 for details).
27162
27163         * typemanager.cs (ImplementsInterface): The hashtable will contain
27164         a null if there are no interfaces implemented.
27165
27166 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
27167
27168         * cs-parser.jay (indexer_declarator): It is fine to have array
27169         parameters
27170
27171 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
27172
27173         * typemanager.cs: (RegisterBuilder): New function used to register
27174         TypeBuilders that implement interfaces.  Since
27175         TypeBuilder.GetInterfaces (as usual) does not work with lame
27176         Reflection.Emit. 
27177         (AddUserType): register interfaces.
27178
27179         (ImplementsInterface): Use the builder_to_ifaces hash if we are
27180         dealing with TypeBuilder.  Also, arrays are showing up as
27181         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
27182         methods can not be invoked on them!
27183
27184         * ecore.cs (ExplicitReferenceConversionExists): Made public.
27185         (ImplicitReferenceConversionExists): Split out from
27186         StandardConversionExists. 
27187
27188         * expression.cs (As): We were only implementing one of the three
27189         cases for the as operator.  We now implement them all.
27190         (Is): Implement the various other cases for Is as well.
27191
27192         * typemanager.cs (CACHE): New define used to control if we want or
27193         not the FindMembers cache.  Seems to have a negative impact on
27194         performance currently
27195
27196         (MemberLookup): Nested types have full acess to
27197         enclosing type members
27198
27199         Remove code that coped with instance/static returns for events, we
27200         now catch this in RealFindMembers.
27201
27202         (RealFindMembers): only perform static lookup if the instance
27203         lookup did not return a type or an event.  
27204
27205 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
27206
27207         * assign.cs (CompoundAssign): We pass more semantic information
27208         now to Compound Assignments than we did before: now we have all
27209         the information at hand, and now we resolve the target *before* we
27210         do the expression expansion, which allows the "CacheValue" method
27211         to have the effect we intended (before, a [x] += 1 would generate
27212         two differen ArrayAccess expressions from the ElementAccess,
27213         during the resolution process).
27214
27215         (CompoundAssign.DoResolve): Resolve target and original_source here.
27216
27217 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
27218
27219         * expression.cs (ArrayAccess): dropped debugging information. 
27220
27221         * typemanager.cs: Small bug fix: I was always returning i_members,
27222         instead of one of i_members or s_members (depending on which had
27223         the content).
27224
27225         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
27226         method is invoked before any code generation takes place, and it
27227         is a mechanism to inform that the expression will be invoked more
27228         than once, and that the method should use temporary values to
27229         avoid having side effects
27230
27231         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
27232
27233         * ecore.cs (Expression.CacheTemporaries): Provide empty default
27234         implementation.
27235
27236         * expression.cs (Indirection, ArrayAccess): Add support for
27237         CacheTemporaries in these two bad boys. 
27238
27239         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
27240         ldobj or ldind_ref.  
27241         (StoreFromPtr): Handle stobj as well.
27242
27243         * expression.cs (UnaryMutator): Share more code.
27244
27245         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
27246         down: I was not tracking the Filter function as well, which
27247         was affecting the results of the cache.
27248
27249 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
27250
27251         * attribute.cs: Remove the hack to handle the CharSet property on
27252         StructLayouts. 
27253
27254 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
27255
27256         * attribute.cs (DoResolve): More uglyness, we now only try to
27257         resolve the attribute partially, to extract the CharSet
27258         information (only if we are a StructLayout attribute).  Otherwise 
27259
27260         (GetExtraTypeInfo): Add some code to conditionally kill in the
27261         future this.   I am more and more convinced that the .NET
27262         framework has special code to handle the attribute setting on
27263         certain elements.
27264
27265         * expression.cs (IsParamsMethodApplicable): Revert my previous
27266         foreach change here, it was wrong.
27267
27268 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
27269
27270         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
27271         (pp_expr): do not abort on unknown input, just return.
27272         (eval): abort if there are pending chars.
27273
27274         * attribute.cs (Attribute.Resolve): Positional parameters are
27275         optional.  Deal with that case.
27276
27277         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
27278         the Ansi/Unicode/Auto information for the type.
27279
27280         (TypeContainer.DefineType): instantiate the EmitContext here, as
27281         we will be using it during the type definition (to resolve
27282         attributes) and during the emit phase.
27283
27284         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
27285         to pull type information out of the attributes
27286
27287         (Attribute.Resolve): track the constructor builder, and allow for
27288         multiple invocations (structs and classes will use this).
27289
27290         * ecore.cs (MemberLookupFinal): new version with all the
27291         parameters customizable.
27292
27293         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
27294         constructors.  Return if the result value is null (as the error
27295         would have been flagged already by MemberLookupFinal)
27296
27297         Do not allow instances of abstract classes or interfaces to be
27298         created.
27299
27300         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
27301         We have to compare the assembly property here when dealing with
27302         FamANDAssem and Assembly access modifiers, because we might be
27303         creating an assembly from *modules* (that means that we are not
27304         getting TypeBuilders for types defined in other modules that are
27305         part of this assembly).
27306
27307         (Method.Emit): If the method is marked abstract and has a body,
27308         emit an error. 
27309
27310         (TypeContainer.DefineMembers): If both the defined member and the
27311         parent name match are methods, then do not emit any warnings: let
27312         the Method.Define routine take care of flagging warnings.  But if
27313         there is a mismatch (method overrides something else, or method is
27314         overriwritten by something, then emit warning).
27315
27316         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
27317         set to null, this means `do not check for the return type on the
27318         signature'. 
27319
27320         (Method.Define): set the return type for the method signature to
27321         null, so that we get methods with the same name and parameters and
27322         different return types.  This is used to flag warning 114 (you are
27323         hiding a method, and you probably want to use the new/override
27324         keywords instead).
27325
27326         * typemanager.cs (MemberLookup): Implemented proper access
27327         control, closing a long standing set of bug reports.  The problem
27328         was that the Framework only has two bits: Public and NonPublic,
27329         and NonPublic includes private and protected methods, but we need
27330         to enforce the FamANDAssem, FamOrAssem and Family. 
27331
27332 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
27333
27334         * statement.cs (GotoCase): Return true: Ammounts to giving up
27335         knowledge on whether we return or not, and letting the other case
27336         be responsible for it.
27337
27338 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
27339
27340         * driver.cs: Do not load directories for each file processed, only
27341         do it if there is a pattern.
27342
27343         * ecore.cs: Report readonly assigns here as well, as we might have
27344         been resolved only by MemberAccess.
27345
27346         (SimpleName.SimpleNameResolve): Also be useful for LValue
27347         resolution.   We need this to propagate assign to local readonly variables
27348
27349         * typemanager.cs: Use a ptrhashtable for the criteria, because we
27350         do not want to reuse potential criteria memory.
27351
27352         * class.cs (MyEventBuilder): Set reflected_type;
27353
27354         * ecore.cs (Constantify): Added support for constifying bools.
27355
27356         (RootContext.LookupType): Added a cache for values looked up in
27357         the declaration space.
27358
27359         * typemanager.cs (FindMembers): Now is a front-end to
27360         RealFindMembers, and provides a two-level hashtable-based cache to
27361         the request.  
27362
27363         15% performance improvement: from 22.5 to 19.2 seconds.
27364
27365         * expression.cs (IsParamsMethodApplicable): use foreach.
27366         (Invocation.DoResolve): ditto.
27367         (New.DoResolve): ditto.
27368         (ArrayCreation.DoResolve): ditto.
27369
27370         * ecore.cs (FindMostEncompassingType): use foreach.
27371
27372         * delegate.cs (NewDelegate.DoResolve): Use foreach
27373
27374         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
27375         (RemoveMethods): use foreach.
27376
27377         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
27378         nested foreach statements instead of for, and also break out of
27379         the inner loop once a match is found.
27380
27381         (Invocation.OverloadResolve): Use foreach, simplify the code. 
27382
27383 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
27384
27385         * cfold.cs (BinaryFold): During an enumeration evaluation context,
27386         we actually unwrap the expression to allow for extra information
27387         to be extracted. 
27388
27389         * expression.cs: Use Shr_Un on unsigned operations. 
27390
27391 2002-05-08  Ravi Pratap  <ravi@ximian.com>
27392
27393         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
27394         applicable operators was not being considered correctly. This closes
27395         the bug Miguel reported.
27396
27397 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27398
27399         * attribute.cs: check that the type derives from System.Attribute
27400         and report the correct error in that case (moved the duplicate code to
27401         its own method, too).
27402
27403 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27404
27405         * attribute.cs: lookup attribute type name as the spec says: first the
27406         bare attribute name and then name + "Attribute" (nant compiles with
27407         mcs after this fix).
27408
27409 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27410
27411         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27412         Because of the way we parse things, we should try to see if a
27413         UIntConstant can fit in an integer.
27414
27415 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27416
27417         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27418         when we are in an explicit context.
27419
27420         (ConvertReferenceExplicit): When converting from Iface type S to Class
27421         T make sure the rules are implemented as an OR.
27422
27423         * parameter.cs (ParameterType): Make it a property for now although the
27424         purpose really isn't anything immediate.
27425
27426         * expression.cs (Is*Applicable): Do better checking on the parameter type
27427         of a ref/out parameter. The ones from the system assemblies are already 
27428         marked with the correct type so we don't need to do any correction.
27429
27430         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27431         the object type is standard too so include that.
27432
27433 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27434
27435         * ecore.cs (StandardConversionExists): Augment with missing code:
27436         deal with IntConstant, LongConstants and Enumerations.
27437
27438         * assign.cs: Report the error, instead of failing silently
27439
27440         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27441         typecontainer that they are declared, because the
27442         typecontainer/namespace will have the list of using clauses that
27443         need to be applied.
27444
27445         Assembly Attributes were escaping the normal registration
27446         mechanism. 
27447
27448         (EmitCode): Apply attributes within an EmitContext that represents
27449         the container they were declared on.
27450
27451         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27452
27453 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27454
27455         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27456         Revamp completely - make much cleaner as we now operate only
27457         on a set of Types.
27458
27459         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27460         to implement the logic detailed in the spec more correctly.
27461
27462         (UserDefinedConversion): Update accordingly.
27463
27464 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27465
27466         * statement.cs: Return flow analysis information up.
27467
27468         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27469         and the default.
27470
27471         (token): Do not consume an extra character before calling
27472         decimal_digits.
27473
27474 2002-05-06  Piers Haken <piersh@friskit.com>
27475
27476         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27477
27478 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27479
27480         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27481         EmitContext during the instance constructor initializer
27482         resolution, to stop access to instance variables.
27483
27484         This is mandated by the spec, last paragraph of the `constructor
27485         initializers' section. 
27486
27487 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27488
27489         * cs-parser.jay, class.cs (Accessor): new class used to represent
27490         an accessor (get or set).  In the past we used `null' to represent
27491         a missing accessor.  But this is ambiguous because there was no
27492         way to tell in abstract indexers/properties if one of them was
27493         specified.
27494
27495         Now there is a way of addressing that.
27496
27497         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27498         instead of FindMembers.
27499
27500         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27501         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27502
27503         * attribute.cs: Treat indexers and properties as the same in terms
27504         of applying attributes
27505
27506         * ecore.cs (FindMostEncompassedType): Use statically initialized
27507         EmptyExpressions()s like we do elsewhere to avoid creating useless
27508         objects (and we take this out of the tight loop).
27509
27510         (GetConversionOperators): Move the code to extract the actual
27511         operators to a separate routine to clean things up.
27512
27513 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27514
27515         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27516         events are always registered FieldBuilders.
27517
27518         * class.cs (FieldBase): New class shared by Fields 
27519
27520         * delegate.cs: If we are a toplevel delegate, use our full name.
27521         If we are a nested delegate, then only use our tail name.
27522
27523 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27524
27525         * expression.cs (IsApplicable): Ensure that we add the "&" to
27526         ref/out types before comparing it with the type of the argument.
27527
27528         (IsParamsMethodApplicable): Ditto.
27529
27530         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27531         silly me ;-)
27532
27533         * delegate.cs : Handle the case when we have more than one applicable
27534         method. Flag an error only when we finish checking all.
27535
27536 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27537
27538         * expression.cs: Add support for boolean static initializers.
27539
27540 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27541
27542         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27543
27544         * parameter.cs (ComputeParameterTypes,
27545         ComputeAndDefineParameterTypes): Better error handling: now we
27546         clear the `types' cache if we fail during any of the type lookups.
27547         We also return the status code correctly to our caller
27548
27549         * delegate.cs: If we fail to define a delegate, abort the extra
27550         steps. 
27551
27552         * expression.cs (Binary.ResolveOperator): for
27553         operator==(object,object) and operator !=(object, object) we also
27554         have to verify that there is an implicit conversion from one to
27555         the other.
27556
27557         (ArrayAccess.DoResolve): Array Access can operate on
27558         non-variables. 
27559
27560 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27561
27562         * assign.cs (CompoundAssign): A new class used as a "flag" that
27563         the assignment actually is happening as part of a compound
27564         assignment operator.
27565
27566         During compound assignment, a few new rules exist to enable things
27567         like:
27568
27569         byte b |= 1 + 2
27570
27571         From the spec:
27572
27573         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27574         to the type of x) if y is implicitly convertible to the type of x,
27575         and the operator is a builtin operator and the return type of the
27576         operator is explicitly convertible to the type of x. 
27577
27578         * rootcontext.cs: Reset warning level to 2.  4 catches various
27579         "interesting" features in mcs, we must clean this up at some
27580         point, but currently am trying to kill other bugs ;-)
27581
27582         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27583         in container classes as well.  
27584
27585         * expression.cs (Binary.ResolveOperator): Handle string case
27586         before anything else (as operator overloading does emit an error
27587         before doing anything else).
27588
27589         This code could go away when we move to a table driven model, but
27590         i could not come up with a good plan last night.
27591
27592 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27593
27594         * typemanager.cs (CSharpName): reimplementation using regex.
27595         * class.cs: added null check for fields in Emit
27596         * rootcontext.cs: set warninglevel to 4
27597
27598 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27599
27600         * typemanager.cs (CSharpName): reimplemented with Lupus
27601         suggestion.
27602
27603 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27604
27605         * statement.cs (If): correclty implement Resolve, because we were
27606         not catching sem errors in there.  The same process is needed
27607         everywhere else. 
27608         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27609
27610
27611         (Statement.Warning_DeadCodeFound): Factorize code.
27612         (While): Report dead code here too.
27613
27614         (Statement): Added Resolve virtual method to allow
27615         for resolution split from the emit code.
27616
27617 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27618
27619         * statement.cs (EmitBoolExpression): No longer try to resolve the
27620         expression here.    
27621         (MakeBoolean): New utility function that resolve, implicitly
27622         converts to boolean and tags the expression. 
27623
27624
27625         (If, Do): Implement dead code elimination.
27626         (While): Implement loop inversion
27627
27628         (Do, While, For, If): Resolve the expression prior to calling our
27629         code generation.
27630
27631 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27632
27633         * class.cs:
27634           - added method Report28 (warning: program has more than one entry point)
27635           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27636           - modified method Method.Define, the part at the end of the method
27637
27638         * rootcontext.cs: added static public Location EntryPointLocation;
27639           
27640         * ../errors/cs0028.cs : Add test case for the above warning.              
27641
27642         * typemanager.cs:
27643           - modified method CSharpName to allow arrays of primitive type to
27644             be printed nicely (e.g. instead of System.Int32[][] it now prints
27645             int[][])
27646           - added method CSharpSignature: returns the signature of a method
27647             in string format to be used in reporting errors, warnings, etc.
27648
27649         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27650         with String.Empty.
27651
27652 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27653
27654         * delegate.cs (Define): Fix extremely silly bug where I was
27655         setting the type of the 'object' parameter of the BeginInvoke
27656         method to System.IAsyncResult instead of System.Object ;-)
27657
27658 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27659
27660         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27661         here. 
27662
27663         (Constructor.Emit): return if we fail to initialize the
27664         constructor.  Another door closed!  
27665
27666         * expression.cs (New.DoResolve): Improve error message (from -6 to
27667         1501).  Use DeclaredOnly lookup to find the exact constructor.
27668
27669         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27670         loop.  This is useful.
27671
27672         * cs-parser.jay: Adjust the default parameters so that destructors
27673         have the proper signature.
27674
27675 2002-04-26  Martin Baulig  <martin@gnome.org>
27676
27677         * driver.cs (LoadAssembly): If `assembly' contains any characters
27678         which are only valid in path names and not in assembly names
27679         (currently slash, backslash and point), use Assembly.LoadFrom ()
27680         instead of Assembly.Load () on the `assembly' (before iteration
27681         over the link_paths).
27682
27683 2002-04-26  Martin Baulig  <martin@gnome.org>
27684
27685         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27686
27687 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27688
27689         * class.cs (Property): use the new typemanager.MemberLookup
27690
27691         (TypeContainer.MemberLookup): Implement using the
27692         TypeManager.MemberLookup now. 
27693
27694         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27695         and return MemberInfos, so that these can be used without an
27696         EmitContext (what we had before).
27697
27698 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27699
27700         * expression.cs: Fix the case where the argument to params if the
27701         type of the params.  I omitted handling this before.   Fixed
27702
27703 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27704
27705         * driver.cs: Call BootCorlib_PopulateCoreType
27706
27707         * class.cs (Property.CheckBase): Check for properties only, not
27708         for all members. 
27709
27710         * interface.cs: Temporary hack: try/catch around the
27711         CustomAttributeBuilder, because I am getting an exception that I
27712         do not understand.
27713
27714         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27715         types whose definitions are required to be there (attributes are
27716         defined before standard types).
27717
27718         Compute definitions as we boot the various types, as they are used
27719         immediately (value_type class will need object_type, but if we do
27720         not initialize object_type, we will pass a null, which will let
27721         the runtime pick the System.Object from the existing corlib, which
27722         is not what we want).
27723
27724 2002-04-22  Patrik Torstensson <totte@labs2.com>
27725
27726         * cs-tokenizer.cs: fixed a number of trim() issues.
27727
27728 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27729
27730         * expression.cs (Argument.Type): Ensure that we return the correct
27731         type when we have out or ref parameters [in which case we 
27732         append a "&"].
27733
27734 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27735
27736         * class.cs (Property, Indexer): Allow extern modifier in there. 
27737
27738         * typemanager.cs (InitBaseTypes): Initializes object_type and
27739         value_type, since those will be used early on during the bootstrap
27740         process to compile corlib.
27741
27742         (InitCoreTypes): Move code from here to InitBaseTypes.
27743
27744 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27745
27746         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27747         single-dimension arrays as using the ldlen opcode.  
27748
27749         Daniel Lewis discovered this optimization.  
27750
27751         * typemanager.cs: Add signature for System.Array::get_Length
27752
27753 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27754
27755         * statement.cs: report the error when the foreach does not apply to an
27756         array nor a collection.
27757
27758 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27759
27760         * expression.cs: Add implicit conversions to the operator ~.
27761
27762         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27763
27764         * typemanager.cs: Locate the decimal constructor.
27765
27766 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27767
27768         * attribute.cs: use the new property of TypeOf.
27769         * expression.cs: added 'get' property around typearg.
27770
27771         These changes fix a build breaker reported by NickD. Is this the
27772         correct way to fix?  If not, please, revert my changes and make it
27773         work :-).
27774
27775 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27776
27777         * attribute.cs: Add support for typeof in attribute invocations.
27778         I am not sure that this is right though.
27779
27780 2002-04-14  Duncan Mak  <duncan@ximian.com>
27781
27782         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27783         Binary.Operator.Division case.
27784
27785 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27786
27787         * class.cs (DefineType): Ensure that we do a proper check on
27788         attribute types and also register it with the TypeManager.
27789
27790         (TypeContainer.Targets): The default for attribute types is
27791         AttributeTargets.All.
27792
27793         * attribute.cs (ApplyAttributes): Registering the attribute type
27794         is done elsewhere, not when we discover we have a Usage attribute.
27795
27796 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27797
27798         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27799         and get rid of is_delegate parameter.
27800
27801         * everywhere : update.
27802
27803 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27804
27805         * cs-parser.jay (compilation_unit): Revamp completely to use
27806         some new ideas that I got from Rhys' grammar to solve the problems
27807         with assembly level attributes.
27808
27809         (outer_declaration): New grammar production.
27810
27811         (attribute_sections): Add.
27812
27813         (opt_attributes): Base on attribute_sections
27814
27815         (namespace_declaration): Allow opt_attributes to tackle the case
27816         when we have assembly level attributes - we are clever in this
27817         regard now ;-)
27818
27819         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27820         attributes in the non-global context.
27821
27822         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27823         instead of SetGlobalAttributes.
27824
27825         * class.cs, rootcontext.cs : Ensure we define and generate 
27826         attribute types before anything else.
27827
27828         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27829         and flag the new error -20 for the case when the attribute type
27830         does not have valid targets specified. csc does not catch this.
27831
27832         * ../errors/errors.txt : update for error # -20
27833
27834 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27835
27836         * support.cs (InternalParameters.ParameterModifier): Do some null
27837         checking and return sane values.
27838
27839         * class.cs (Method.Define): If we are a PInvoke method, ensure
27840         that we are static and extern. Report error # 601
27841
27842         * ../errors/cs0601.cs : Add test case for the above error.
27843
27844 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27845
27846         * rootcontext.cs (attribute_types): We need to keep type of
27847         all attribute types separately and emit code for them first.
27848
27849         (RegisterAttribute) : Implement.
27850
27851         * class.cs (DefineType): Check if the current Type is a custom
27852         attribute type and register it accordingly.
27853
27854         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27855         adding the first attribute twice and rename to
27856
27857         (SetGlobalAttributes): this.
27858
27859         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27860         lookups.
27861
27862         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27863         if we are processing global arguments. Hmm, I am unsure of this.
27864
27865 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27866
27867         * expression.cs: added static array of strings to avoid calling
27868         Enum.ToString () for Operator in Binary. Significant recover of
27869         performance.
27870
27871 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27872
27873         * class.cs (FindMembers): Allow the Builders of the various
27874         members to be null.  If they are skip them.  This only happens
27875         during the PInvoke declaration.
27876
27877 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27878
27879         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27880         failure, so we do not keep going afterwards.
27881
27882         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27883         wanted to pass `false' as the `is_delegate' argument.  If this is
27884         the case, why not use delegate_type == null to mean `is_delegate =
27885         false' and anything else as is_delegate = true.
27886
27887 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27888
27889         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27890         code for the section, not the beginning of the tests.
27891
27892 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27893
27894         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27895
27896         * expression.cs (Binary): same.  Warn about errors where we have
27897         Enum/Enum in operator + as well.
27898
27899 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27900
27901         * statement.cs:
27902                 - added support for switch(bool)
27903                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27904                 - add TableSwitchEmit() to handle table-based switch statements
27905
27906 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27907
27908         * expression.cs (Invocation.OverloadResolve): Factor out code which
27909         does parameter compatibility checking with arguments so that we can 
27910         re-use the code even from Delegate.VerifyApplicability
27911
27912         (VerifyArgumentsCompat): Move above code here.
27913
27914         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27915         and instead make a call to the above method.
27916
27917 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27918
27919         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27920         We use it to keep track of classes which are attribute types.
27921
27922 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27923
27924         * delegate.cs (Delegate.Define): Correctly define the types in the
27925         presence of fixed and array parameters.
27926
27927         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27928         doing FindMembers.
27929
27930         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27931         include NonPublic after the first iteration.
27932
27933         * class.cs (Indexer.CheckBase): Only check if both parents are
27934         non-null. 
27935
27936         * cs-parser.jay (accessor_body): If empty, set to null.
27937
27938         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27939         same code path here to resolve constants names that we did have in
27940         MemberAccess.DoResolve.  There is too much code duplicated here.
27941
27942 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27943
27944         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27945
27946         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27947         to MakeUnionSet.
27948
27949         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27950         tokens, numbers and strings.
27951
27952         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27953         parenthesis.
27954
27955         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27956         asyncronous parameters and the regular parameters.  
27957
27958         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27959         specify the target directory.
27960
27961         * expression.cs: (This.DoResolve): Simplify
27962         (As.Emit): Optimize, do not generate IsInst if the expression is
27963         always of the given type.
27964
27965         (Is.DoResolve): Bug fix, we were reporting both always/never for
27966         the is expression.
27967
27968         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27969         creating too many unnecessary arrays.
27970
27971 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27972
27973         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27974         fields instead of rolling our own initializer.   Takes care of all
27975         implicit conversions, and drops unnecessary static checks/argument.
27976
27977 2002-03-31  Dick Porter  <dick@ximian.com>
27978
27979         * driver.cs: use the GetDirectories() return values properly, and
27980         use "/" as path separator.
27981
27982 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27983
27984         * expression.cs (Unary): Optimize - - expr into expr.
27985         (Binary): Optimize a + (-b) into a -b.
27986
27987         * codegen.cs (CodeGen): Made all methods static.
27988
27989 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27990
27991         * rootcontext.cs: 
27992
27993         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27994         TypeBuilder property.
27995
27996         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27997         instead. 
27998
27999         * tree.cs: Removed the various RecordXXXX, and replaced with a
28000         single RecordDecl.  Removed all the accessor methods, and just
28001         left a single access point Type 
28002
28003         * enum.cs: Rename DefineEnum to DefineType.
28004
28005         * decl.cs: New abstract method `DefineType' used to unify the
28006         Defines for Enumerations, Interfaces, TypeContainers and
28007         Delegates.
28008
28009         (FindType): Moved LookupInterfaceOrClass here.  Moved the
28010         LookupBaseClasses method that used to live in class.cs and
28011         interface.cs here, and renamed to FindType.
28012
28013         * delegate.cs: Implement DefineType.  Take advantage of the
28014         refactored pattern for locating the parent builder without taking
28015         the parent_builder argument (which we know does not work if we are
28016         nested, and triggering a toplevel definition).
28017
28018 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
28019
28020         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
28021         accessibility of a member has changed during override and report
28022         an error if so.
28023
28024         * class.cs (Method.Define, Property.Define): Only complain on
28025         overrides if the method is private, any other accessibility is
28026         fine (and since we just checked the permission is the same, we are
28027         good to go).
28028
28029         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
28030         and elif are processed always.  The other pre-processing
28031         directives are only processed if we are "taking" the path
28032
28033 2002-03-29  Martin Baulig  <martin@gnome.org>
28034
28035         * class.cs (Method.Emit): Only emit symbolic debugging info if the
28036         current location is not Null.
28037
28038         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
28039         a separate method so we can profile it.
28040
28041         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
28042         `span.Seconds' are just seconds, but no minutes or hours.
28043         (MainDriver): Profile the CodeGen.SaveSymbols calls.
28044
28045 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
28046
28047         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
28048         Remove the gratuitous set of Final:
28049
28050                                 // If an interface implementation, then we can set Final.
28051                                 if (((flags & MethodAttributes.Abstract) == 0) &&
28052                                     implementing.DeclaringType.IsInterface)
28053                                         flags |= MethodAttributes.Final;
28054
28055         I do not know what I was smoking when I used that.
28056
28057
28058         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
28059         step into fixing the name resolution issues for delegates and
28060         unifying the toplevel name resolution.
28061
28062 2002-03-28  Martin Baulig  <martin@gnome.org>
28063
28064         * class.cs (Method.Emit): If we have a symbol writer, call its
28065         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
28066         tell it about the current method.
28067
28068         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
28069         writer that we're going to emit the first byte of IL code for a new
28070         statement (a new source line).
28071         (EmitContext.EmitTopBlock): If we have a symbol writer, call
28072         EmitContext.Mark() before emitting any code.
28073
28074         * location.cs (SymbolDocument): Return null when we're Null.
28075
28076         * statement.cs (Statement): Moved the `Location loc' variable here.
28077         (Statement.EmitBoolExpression): If we have a symbol writer, call
28078         ec.Mark() before emitting any code to tell it that we're at the
28079         beginning of a new statement.
28080         (StatementExpression): Added `Location' argument to the constructor.
28081         (Block): Added public readonly variable `StartLocation' and public
28082         variable `EndLocation'.  The latter is to be set using SetEndLocation().
28083         (Block): Added constructor which takes a start and end location.
28084         (Block.SetEndLocation): New method. This sets the end location.
28085         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
28086         local variables we create.
28087         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
28088         each statement and do also mark the begin and end of the block.
28089
28090         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
28091         tell it the current lexer.Location, use Location.Null for the end of the
28092         block.
28093         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
28094         current block, set its end location using SetEndLocation().
28095         (statement_expression): StatementExpression constructor now takes the
28096         lexer.Location as additional argument.
28097         (for_statement, declare_local_variables): Likewise.
28098         (declare_local_variables): When creating a new implicit block, use the
28099         new Block constructor and pass it the lexer.Location.
28100
28101 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
28102
28103         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
28104         members also on the parent interfaces recursively.
28105
28106 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
28107
28108         * report.cs: Use new formats, since Gonzalo finished the missing
28109         bits. 
28110
28111         * expression.cs (Binary.ResolveOperator): added missing operator|
28112         operator& and operator^ for bool/bool.
28113
28114         * cs-parser.jay: CheckDef now takes a Location argument that is
28115         used to report errors more precisly (instead of reporting the end
28116         of a definition, we try to track something which is a lot closer
28117         to the source of the problem).
28118
28119         * cs-tokenizer.cs: Track global token use, so we can properly flag
28120         the use of #define/#undef after the first token has been seen.
28121
28122         Also, rename the reportXXXX to Error_DescriptiveName
28123
28124         * decl.cs (DeclSpace.IsTopLevel): Move property here from
28125         TypeContainer, so that Enum and Interface can use this too.
28126
28127         * class.cs (TypeContainer.LookupInterfaceOrClass,
28128         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
28129         `builder' argument.  Typically this was used to pass the parent
28130         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
28131         the definition).  
28132
28133         The problem is that a nested class could trigger the definition of
28134         a toplevel class, and the builder would be obviously wrong in that
28135         case. 
28136
28137         So we drop this argument, and we compute dynamically the
28138         TypeBuilder/ModuleBuilder (the correct information was available
28139         to us anyways from DeclSpace.Parent)
28140
28141         * interface.cs (Interface.DefineInterface): Drop builder
28142         parameter cleanup like class.cs
28143
28144         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
28145         like class.cs
28146
28147         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
28148         values. 
28149
28150         (Try.Emit): Propagate the returns value from the statement.
28151
28152         (Return.Emit): Even if we are leavning 
28153
28154         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
28155
28156         * modifiers.cs: Fix the computation of MethodAttributes flags.
28157
28158 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
28159
28160         * driver.cs: allow compilation of files that start with '/'.
28161         Add a default case when checking the argument of --target.
28162
28163 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
28164
28165         * interface.cs: Implement the same search algorithm for types in
28166         the interface code.
28167
28168         * delegate.cs: Do not allow multiple definition.
28169
28170         * Recovered ChangeLog that got accidentally amputated
28171
28172         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
28173
28174         * rootcontext.cs: Load manually enum to allow core classes to
28175         contain enumerations.
28176
28177         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
28178         Update to new static methods in TypeManager.
28179
28180         * typemanager.cs (GetMethod, GetConstructor): Use our
28181         implementation of FindMembers to find the members, since during
28182         corlib compilation, the types are TypeBuilders and GetMethod and
28183         GetConstructor do not work.
28184
28185         Make all methods in TypeManager static.
28186
28187         (InitCodeHelpers): Split the functionality from
28188         the InitCodeTypes function.
28189
28190         * driver.cs: Call InitCodeHelpers after we have populated the
28191         types. 
28192
28193         * cs-parser.jay (delegate_declaration): we did not used to compute
28194         the delegate name correctly for void delegates.
28195
28196 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
28197
28198         * rootcontext.cs (RootContext): Init the interface_resolve_order
28199         and type_container_resolve_order always.
28200
28201         (ResolveCore, BootstrapCorlib_ResolveClass,
28202         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
28203         compiler when compiling with --nostdlib
28204
28205         * class.cs (TypeContainer.DefineType): Check that our parent is
28206         not null.  This test is most important when we are bootstraping
28207         the core types.
28208
28209         * codegen.cs: Split out the symbol writing code.
28210
28211 2002-03-25  Martin Baulig  <martin@gnome.org>
28212
28213         * driver.cs (-g): Made -g an alias for --debug.
28214
28215 2002-03-24  Martin Baulig  <martin@gnome.org>
28216
28217         * codegen.cs (SymbolWriter): New public variable. Returns the
28218         current symbol writer.
28219         (CodeGen): Added `bool want_debugging_support' argument to the
28220          constructor. If true, tell the ModuleBuild that we want debugging
28221         support and ask it for the ISymbolWriter.
28222         (Save): If we have a symbol writer, call it's Close() method after
28223         saving the assembly.
28224
28225         * driver.c (--debug): New command line argument to create a
28226         debugger information file.
28227
28228         * location.cs (SymbolDocument): New public property. Returns an
28229         ISymbolDocumentWriter object for the current source file or null
28230         if we don't have a symbol writer.
28231
28232 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
28233
28234         * driver.cs (LoadAssembly): Correctly return when all the paths
28235         have been tried and not before.
28236
28237         * statement.cs (Switch.Emit): return the actual coverage for this
28238         statement (returns/not-returns)
28239
28240         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
28241         switch of the statement if we are the last switch section.  That
28242         kills two problems: try/catch problems (we used to emit an empty
28243         nop at the end) and switch statements where all branches would
28244         return. 
28245
28246 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
28247
28248         * driver.cs: Add default assemblies (the equivalent to the
28249         Microsoft CSC.RSP file)
28250
28251         * cs-tokenizer.cs: When updating `cols and setting it to zero,
28252         also update tokens_seen and set it to false.
28253
28254         * driver.cs: Implement --recurse for Mike.
28255
28256         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
28257         correctly splitting out the paths.
28258
28259 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
28260
28261         * interface.cs (Interface.PopulateProperty): Instead of using
28262         `parent' as the declaration space for the set parameters, use
28263         `this' 
28264
28265         * support.cs (InternalParameters): InternalParameters constructor
28266         takes a DeclSpace instead of a TypeContainer.
28267
28268         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
28269         types are being initialized, load the address of it before calling
28270         the function.  
28271
28272         (New): Provide a mechanism to disable the generation of local
28273         value type temporaries when the caller will be providing us with
28274         an address to store it.
28275
28276         (ArrayCreation.EmitDynamicInitializers): Use it.
28277
28278 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
28279
28280         * expression.cs (Invocation.EmitArguments): Only probe for array
28281         property if there is more than one argument.  Sorry about that.
28282
28283         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
28284         empty param arrays.
28285
28286         * class.cs (Method.LabelParameters): Fix incorrect code path that
28287         prevented the `ParamArrayAttribute' from being applied to the
28288         params attribute.
28289
28290 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
28291
28292         * support.cs (ReflectionParameters): Correctly compute whether the
28293         last argument is a params array.  Fixes the problem with
28294         string.Split ('a')
28295
28296         * typemanager.cs: Make the assemblies array always be non-null
28297         (empty, but non-null)
28298
28299         * tree.cs (RecordDecl): New function that abstracts the recording
28300         of names.  This reports error 101, and provides a pointer to the
28301         previous declaration.  Fixes a crash in the compiler.
28302
28303         * cs-parser.jay (constructor_declaration): Update to new grammar,
28304         and provide a constructor_body that can be empty.
28305
28306 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
28307
28308         * driver.cs: Add support for --resources.
28309
28310         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
28311         Make all types for the various array helper methods be integer.
28312
28313         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
28314         CheckState to ConvCast.
28315
28316         (ConvCast): Now it takes a `checked' state argument, to avoid
28317         depending on the emit context for the conversion, and just using
28318         the resolve time setting.
28319
28320         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
28321         instead of Invocation.EmitArguments.  We do not emit the original
28322         arguments, instead we emit those which have been converted to
28323         unsigned int expressions.
28324
28325         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
28326
28327         * codegen.cs: ditto.
28328
28329         * expression.cs (LocalVariableReference): Drop the use of the
28330         Store function that depended on the variable index.
28331
28332         * statement.cs (VariableInfo): Drop the `Idx' property from this
28333         class, as this is not taking into account the indexes for
28334         temporaries tat we generate during the execution, getting the
28335         indexes wrong.
28336
28337         * class.cs: First emit class initializers, then call the parent
28338         constructor. 
28339
28340         * expression.cs (Binary): Fix opcode emision.
28341         (UnaryMutator.EmitCode): Support checked code generation
28342
28343         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
28344         matches for events for both the Static and Instance scans,
28345         pointing to the same element.   Fix that.
28346
28347 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
28348
28349         * rootcontext.cs (ResolveTree): Always set the
28350         interface_resolve_order, because nested interfaces will be calling
28351         into us.
28352
28353         * class.cs (GetInterfaceOrClass): Track the same resolution
28354         process used by TypeManager.LookupType.  This fixes the nested
28355         type lookups in class declarations (separate path from
28356         LookupType). 
28357
28358         (TypeContainer.DefineType): Also define nested interfaces.
28359         (TypeContainer.RegisterOrder): New public function used to
28360         register the order in which child interfaces need to be closed.
28361
28362         Nested interfaces need to be closed after their parents have been
28363         created. 
28364
28365         * interface.cs (InterfaceAttr): Put all the logic for computing
28366         the interface attribute here. 
28367
28368         (DefineInterface): Register our interface order with the
28369         RootContext or with the TypeContainer depending on the case.
28370
28371 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28372
28373         * cs-parser.jay: rework foreach statement to work with the new
28374         changes to the policy on SimpleNames.
28375
28376         * report.cs: support Stacktrace on warnings as well.
28377
28378         * makefile: drop --unsafe and /unsafe from the compile.
28379
28380 2002-03-13  Ravi Pratap  <ravi@ximian.com>
28381
28382         * ecore.cs (StandardConversionExists): Modify to take an Expression
28383         as the first parameter. Ensure we do null -> reference type conversion
28384         checking.
28385
28386         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
28387         temporary Expression objects.
28388
28389 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
28390
28391         * interface.cs: workaround bug in method overloading resolution
28392         (there is already a bugzilla bug for it).
28393
28394 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28395
28396         We could also solve this problem by having a separate path for
28397         performing type lookups, instead of DoResolve, we could have a
28398         ResolveType entry point, and only participating pieces of the
28399         production (simplename, deref, array) would implement this. 
28400
28401         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
28402         signal SimpleName to only resolve type names and not attempt to
28403         resolve anything else.
28404
28405         * expression.cs (Cast): Set the flag.
28406
28407         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28408
28409         * class.cs: Only report 108 if there is no `new' modifier.
28410
28411         * cs-parser.jay: rework foreach statement to work with the new
28412         changes to the policy on SimpleNames.
28413
28414         * report.cs: support Stacktrace on warnings as well.
28415
28416         * makefile: drop --unsafe and /unsafe from the compile.
28417
28418 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28419
28420         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28421         lookups here, instead of doing that at parse time.  This means
28422         that our grammar will not introduce `LocalVariableReferences' as
28423         expressions at this point.  That solves the problem of code like
28424         this:
28425
28426         class X {
28427            static void Main ()
28428            { int X = 1;
28429             { X x = null }}}
28430
28431         This is only half the fix.  The full fix requires parameters to
28432         also be handled in this way.
28433
28434         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28435         makes the use more obvious of the DeclSpace.  The
28436         ec.TypeContainer.TypeBuilder is now only used to pull the
28437         TypeBuilder for it.
28438
28439         My theory is that I can get rid of the TypeBuilder completely from
28440         the EmitContext, and have typecasts where it is used (from
28441         DeclSpace to where it matters).  
28442
28443         The only pending problem is that the code that implements Aliases
28444         is on TypeContainer, and probably should go in DeclSpace.
28445
28446         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28447         lookups here, instead of doing that at parse time.  This means
28448         that our grammar will not introduce `LocalVariableReferences' as
28449         expressions at this point.  That solves the problem of code like
28450         this:
28451
28452         class X {
28453            static void Main ()
28454            { int X = 1;
28455             { X x = null }}}
28456
28457         This is only half the fix.  The full fix requires parameters to
28458         also be handled in this way.
28459
28460         * class.cs (Property.DefineMethod): When implementing an interface
28461         method, set newslot, when implementing an abstract method, do not
28462         set the flag (before we tried never setting it, or always setting
28463         it, which is the difference).
28464         (Indexer.DefineMethod): same.
28465         (Method.DefineMethod): same.
28466
28467         * ecore.cs: Only set the status used flag if we get back a Field.
28468
28469         * attribute.cs: Temporary hack, so Paolo can keep working.
28470
28471 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28472
28473         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28474         the unmanaged type in the case we have a MarshalAs attribute.
28475
28476         (Resolve): Handle the case when we are parsing the special MarshalAs
28477         attribute [we need to store the unmanaged type to use later]
28478
28479         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28480         MarshalAs Attribute.
28481
28482         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28483         on parameters and accordingly set the marshalling info.
28484
28485 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28486
28487         * class.cs: Optimizing slightly by removing redundant code after
28488         we switched to the `NoTypes' return value.
28489         (Property.DefineMethod): use NoTypes here too.
28490
28491         This fixes the bug I introduced in my last batch of changes.
28492
28493 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28494
28495         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28496
28497         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28498         Enums since those are types too. 
28499
28500         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28501
28502         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28503         thanks to a call during the lookup process.
28504
28505 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28506
28507         * statement.cs (Foreach): Lots of work to accomodate a particular
28508         kind of foreach statement that I had not kept in mind.  It is
28509         possible to have foreachs on classes that provide a GetEnumerator
28510         method that return objects that implement the "pattern" for using
28511         a foreach, there is no need to support GetEnumerator
28512         specifically. 
28513
28514         This is needed to compile nant.
28515
28516         * decl.cs: Only report 114 if the member is not `Finalize' and if
28517         the warning level is at least 2.
28518
28519         * class.cs: Moved the compare function from Method to
28520         MethodSignature. 
28521
28522         (MethodSignature.InheritableMemberSignatureCompare): Add new
28523         filter function that is used to extract inheritable methods from a
28524         class. 
28525
28526         (Method.Define): Use the new `inheritable_method_signature_filter'
28527         delegate
28528
28529         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28530         command. 
28531
28532 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28533
28534         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28535
28536         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28537
28538         * expression.cs: Pass location information to
28539         ConvertImplicitStandard. 
28540
28541         * class.cs: Added debugging code to track return values from
28542         interfaces. 
28543
28544 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28545
28546         * expression.cs (Is.DoResolve): If either side of the `is' is an
28547         interface, do not flag the warning.
28548
28549         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28550         for interfaces
28551
28552         * report.cs: Allow for --fatal to be used with --probe.
28553
28554         * typemanager.cs (NoTypes): Move the definition for the empty Type
28555         array here. 
28556
28557         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28558         properties. 
28559         (TypeContainer.DefineProxy): New function used to proxy to parent
28560         implementations when implementing interfaces.
28561         (TypeContainer.ParentImplements): used to lookup if our parent
28562         implements a public function that is required by an interface.
28563         (TypeContainer.VerifyPendingMethods): Hook this up.
28564
28565         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28566         `modules' and `assemblies' arraylists into arrays.  We only grow
28567         these are the very early start up of the program, so this improves
28568         the speedof LookupType (nicely measured).
28569
28570         * expression.cs (MakeByteBlob): Replaced unsafe code with
28571         BitConverter, as suggested by Paolo.
28572
28573         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28574         folding of string concatenation, but if either side is a string,
28575         and the other is not, then return null, and let the runtime use
28576         the concatenation on the string plus the object (using
28577         `Object.ToString'). 
28578
28579 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28580
28581         Constant Folding has been implemented now.
28582
28583         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28584         the error instead on types that are not supported in one's
28585         complement. 
28586
28587         * constant.cs (Constant and all children): New set of functions to
28588         perform implict and explicit conversions.
28589
28590         * ecore.cs (EnumConstant): Implement the new functions to perform
28591         conversion by proxying to the child expression.
28592
28593         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28594         own separate setting that can not be turned off from the command
28595         line using --unchecked or --checked and is only controlled using
28596         the checked/unchecked statements and expressions.  This setting is
28597         used by the constant folder to flag errors.
28598
28599         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28600         ConstantCheckState as well.   
28601
28602         During Resolve, they also have to flag the state, because the
28603         constant folder runs completely in the Resolve phase.
28604
28605         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28606         well.
28607
28608 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28609
28610         * cfold.cs: New file, this file contains the constant folder.
28611
28612         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28613         argument to track whether we are using the resulting address to
28614         load or store a value and provide better error messages. 
28615
28616         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28617         new AddressOf arguments.
28618
28619         * statement.cs (Foreach.EmitCollectionForeach): Update
28620
28621         * expression.cs (Argument.Emit): Call AddressOf with proper
28622         arguments to track usage.
28623
28624         (New.DoEmit): Call AddressOf with new arguments.
28625
28626         (Unary.Emit): Adjust AddressOf call.
28627
28628 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28629
28630         * cs-parser.jay (member_access): Change the case for pre-defined types
28631         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28632         this suggestion.
28633
28634         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28635         a method body.
28636
28637         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28638         essentially like methods and apply attributes like MethodImplOptions to them too.
28639
28640         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28641         not being null.
28642
28643         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28644         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28645         is the DeclSpace.
28646
28647         * Update code everywhere accordingly.
28648
28649         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28650
28651         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28652
28653 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28654
28655         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28656         try performing lookups against those instead of jumping straight into using
28657         the 'using' clauses.
28658
28659         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28660
28661         (LookupType): Perform lookups in implicit parents too.
28662
28663         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28664         sequence as RootContext.LookupType. 
28665
28666         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28667         the various cases of namespace lookups into this method.
28668
28669 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28670
28671         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28672         in positional arguments)
28673
28674         * class.cs (Operator): Update the AllowedModifiers to contain
28675         extern. 
28676
28677         * cs-parser.jay: Update operator declaration to allow for the
28678         operator body to be empty.
28679
28680         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28681         values. 
28682
28683 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28684
28685         * class.cs (Method.Emit): Label parameters.
28686
28687         * driver.cs: Return 1 or 0 as the program exit code.
28688
28689 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28690
28691         * expression.cs: Special case the `null' object when trying to
28692         auto-compute the type, as anything can be explicitly converted to
28693         that. 
28694
28695         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28696         spotting this Paolo.
28697
28698         (Expression.ImplicitNumericConversion): Perform comparissions of
28699         the type using the underlying type in the case of an enumeration
28700         rather than using the enumeration type for the compare.
28701
28702         Cope with the underlying == type case, which is not possible to
28703         catch before. 
28704
28705         (Expression.ConvertNumericExplicit): Perform comparissions of
28706         the type using the underlying type in the case of an enumeration
28707         rather than using the enumeration type for the compare.
28708
28709         * driver.cs: If the user does not supply an extension, assume .exe
28710
28711         * cs-parser.jay (if_statement): Rewrote so that we can track the
28712         location for the if statement.
28713
28714         * expression.cs (Binary.ConstantFold): Only concat strings when
28715         the operation is "+", not everything ;-)
28716
28717         * statement.cs (Statement.EmitBoolExpression): Take a location
28718         argument. 
28719         (If, While, Do): Track location.
28720
28721         * expression.cs (Binary.ResolveOperator): In the object + string
28722         case, I was missing a call to ConvertImplicit
28723
28724 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28725
28726         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28727         Location arguments. Ensure we use RootContext.LookupType to do our work
28728         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28729
28730         * interface.cs (PopulateMethod): Handle the type of the parameter being
28731         null gracefully.
28732
28733         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28734         have a params method with no fixed arguments and a call is made with no
28735         arguments.
28736
28737 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28738
28739         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28740         the verbatim-string-literal
28741
28742         * support.cs (InternalParameters.ParameterModifier): handle null
28743         fixed parameters.
28744         (InternalParameters.ParameterType): ditto.
28745
28746         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28747         duplicating the name of the variable parameter.
28748         (GetParameterByName): Fix bug where we were not looking up array
28749         paramters if they were the only present (thanks Paolo!).
28750         (GetParameterInfo): We only have an empty set of types if both
28751         fixed and array are set to null.
28752         (GetParameterInfo-idx): Handle FixedParameter == null
28753
28754         * cs-parser.jay: Handle the case where there is no catch
28755         statements (missing null test).
28756
28757 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28758
28759         * driver.cs (MainDriver): Be conservative on our command line
28760         handling.
28761
28762         Catch DirectoryNotFoundException when calling GetFiles.
28763
28764         (SplitPathAndPattern): Used to split the input specification into
28765         a path and a pattern that we can feed to Directory.GetFiles.
28766
28767 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28768
28769         * statement.cs (Fixed): Implement the last case of the Fixed
28770         statement (string handling).
28771
28772         * expression.cs (StringPtr): New class used to return a char * to
28773         a string;  Used by the Fixed statement.
28774
28775         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28776
28777         * expression.cs (Binary.ResolveOperator): Remove redundant
28778         MemberLookup pn parent type.
28779         Optimize union call, we do not need a union if the types are the same.
28780         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28781         type.
28782
28783         Specialize the use of MemberLookup everywhere, instead of using
28784         the default settings. 
28785
28786         (StackAlloc): Implement stackalloc keyword.
28787
28788         * cs-parser.jay: Add rule to parse stackalloc.
28789
28790         * driver.cs: Handle /h, /help, /?
28791
28792         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28793         before we supported unsafe code.
28794
28795         * makefile: add --unsafe to the self compilation of mcs.
28796
28797 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28798
28799         * expression.cs (PointerArithmetic): New class that is used to
28800         perform pointer arithmetic.
28801         (Binary.Resolve): Handle pointer arithmetic
28802         Handle pointer comparission.
28803         (ArrayPtr): Utility expression class that is used to take the
28804         address of an array.
28805
28806         (ElementAccess): Implement array access for pointers
28807
28808         * statement.cs (Fixed): Implement fixed statement for arrays, we
28809         are missing one more case before we are done.
28810
28811         * expression.cs (Indirection): Implement EmitAssign and set the
28812         ExprClass to Variable.  This allows pointer dereferences to be
28813         treated as variables, and to have values assigned to them.
28814
28815         * ecore.cs (Expression.StoreFromPtr): New utility function to
28816         store values dereferencing.
28817
28818 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28819
28820         * expression.cs (Binary.ResolveOperator): Ensure that we are
28821         not trying to operate on a void type - this fixes the reported
28822         bug.
28823
28824         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28825         the parent implementation is sealed.
28826
28827         * ../errors/cs0239.cs : Add.
28828
28829         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28830
28831         * typemanager.cs (unverifiable_code_type): Corresponds to 
28832         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28833         which have unsafe code in them.
28834
28835         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28836         unsafe context.
28837
28838 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28839
28840         * cs-tokenizer.cs: Add support for @"litreal strings"
28841
28842         Make tokenizer accept pre-processor directives
28843         on any column (remove the old C-like limitation). 
28844
28845         * rootcontext.cs (EmitCode): Emit any global attributes.
28846         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28847
28848         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28849
28850         * cs-parser.jay: Add support for global attributes.  
28851
28852 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28853
28854         * expression.cs (Indirection): New helper class.  Unary will
28855         create Indirection classes to be able to implement the
28856         IMemoryLocation interface on it.
28857
28858 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28859
28860         * cs-parser.jay (fixed_statement): reference the right statement.
28861
28862         * statement.cs (Fixed.Emit): Finish implementing the fixed
28863         statement for the &x case.
28864
28865 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28866
28867         * class.cs (Property.Define, Method.Define): Remove newslot when
28868         `implementing'.  
28869
28870         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28871         wrong.  NewSlot should only be used if the `new' keyword is present.
28872
28873         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28874         locating our system dir.  Sorry about this.
28875
28876 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28877
28878         * driver.cs (GetSystemDir): Compute correctly the location of our
28879         system assemblies.  I was using the compiler directory instead of
28880         the library directory.
28881
28882 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28883
28884         * expression.cs (BetterFunction): Put back in what Miguel commented out
28885         since it is the correct fix. The problem is elsewhere ;-)
28886
28887         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28888         parameters of the parms method are themselves compatible or not !
28889
28890         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28891         to check that a class implements an interface before saying that an implicit
28892         conversion was allowed. Use ImplementsInterface to do the checking.
28893
28894 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28895
28896         * class.cs (Method.Define): Track whether we are an explicit
28897         implementation or not.  And only call DefineMethodOverride if we
28898         are an explicit implementation.
28899
28900         (Property.DefineMethod): Ditto.
28901
28902 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28903
28904         * expression.cs (BetterFunction): Catch hideous bug which was
28905          preventing us from detecting ambiguous calls due to implicit casts i.e
28906         cs0121.
28907
28908 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28909
28910         * support.cs (Pair): Remove un-needed method.  I figured why I was
28911         getting the error in cs-parser.jay, the variable in a foreach loop
28912         is readonly, and the compiler does not really treat this as a variable.
28913
28914         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28915         instead of EQUALS in grammar.  
28916
28917         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28918
28919         * expression.cs (Unary.DoResolve): Check whether the argument is
28920         managed or not.
28921
28922 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28923
28924         * support.cs: Api for Pair to set a value.  Despite the fact that
28925         the variables are public the MS C# compiler refuses to compile
28926         code that accesses the field if the variable is part of a foreach
28927         statement. 
28928
28929         * statement.cs (Fixed): Begin implementation of the fixed
28930         statement.
28931
28932         (Block.AddVariable): Return the VariableInfo on success and null
28933         on failure instead of true/false. 
28934
28935         * cs-parser.jay (foreach): Catch errors on variables already
28936         defined (we were ignoring this value before) and properly unwind
28937         the block hierarchy
28938
28939         (fixed_statement): grammar for the fixed statement.
28940
28941 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28942
28943         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28944         pointer types to be incretemented.
28945
28946         (SizeOf): Implement.
28947
28948         * cs-parser.jay (pointer_member_access): Implement
28949         expr->IDENTIFIER production.
28950
28951         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28952         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28953         on safe contexts.
28954
28955         (Unary): Implement indirection.
28956
28957         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28958         use in non-unsafe context).
28959
28960         (SimpleName.DoResolve): Check for pointers in field access on safe
28961         contexts. 
28962
28963         (Expression.LoadFromPtr): Factor the load-indirect code in this
28964         function.  This was duplicated in UnboxCast and ParameterReference
28965
28966 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28967
28968         * expression.cs (ComposedCast): report an error if a pointer cast
28969         is used in a safe region.
28970
28971         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28972         pointer type casts in unsafe context.
28973
28974         * codegen.cs (EmitContext): Set up IsUnsafe.
28975
28976         * cs-parser.jay (non_expression_type): Add productions for pointer
28977         casts. 
28978
28979         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28980         code.  We should not use force into static mode if the method is
28981         not virtual.  Fixes bug in MIS
28982
28983         * statement.cs (Do.Emit, While.Emit, For.Emit,
28984         Statement.EmitBoolExpression): Add support to Do and While to
28985         propagate infinite loop as `I do return' semantics.
28986
28987         Improve the For case to also test for boolean constants.
28988
28989         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28990         to the list of attributes we can add.
28991
28992         Remove `EmitContext' argument.
28993
28994         * class.cs (Method.Define): Apply parameter attributes.
28995         (Constructor.Define): Apply parameter attributes.
28996         (MethodCore.LabelParameters): Move here the core of labeling
28997         parameters. 
28998
28999         * support.cs (ReflectionParameters.ParameterModifier,
29000         InternalParameters.ParameterModifier): Use IsByRef on the type and
29001         only return the OUT bit for these parameters instead of in/out/ref
29002         flags.
29003
29004         This is because I miss-understood things.  The ParameterInfo.IsIn
29005         and IsOut represent whether the parameter has the [In] and [Out]
29006         attributes set.  
29007
29008 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
29009
29010         * ecore.cs (FieldExpr.Emit): Release temporaries.
29011
29012         * assign.cs (LocalTemporary.Release): new function.
29013
29014         * codegen.cs (EmitContext.GetTemporaryStorage,
29015         EmitContext.FreeTemporaryStorage): Rework the way we deal with
29016         temporary storage.  Now we can "put back" localbuilders when we
29017         are done with them
29018
29019 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
29020
29021         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
29022         need to make a copy of the variable to generate verifiable code.
29023
29024 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
29025
29026         * driver.cs: Compute dynamically the system directory.
29027
29028         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
29029         Slower, but more generally useful.  Used by the abstract
29030         registering implementation. 
29031
29032         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
29033         the rules for the special rule on Type/instances.  First check if
29034         we have the same name, and if so, try that special static path
29035         rather than the instance path.
29036
29037 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
29038
29039         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
29040         for, while and if.
29041
29042         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
29043         Enum, ValueType, Delegate or Array for non-corlib compiles.
29044
29045         * cs-tokenizer.cs: Catch long identifiers (645)
29046
29047         * typemanager.cs (IndexerPropetyName): Ravi never tested this
29048         piece of code.
29049
29050         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
29051         fix, we were returning too early, so we were not registering
29052         pending methods from abstract classes.
29053
29054         Do not register pending methods if the class is abstract.
29055
29056         * expression.cs (Conditional.DoResolve): Report circular implicit
29057         conversions when we neecd to compute it for conditional
29058         expressions. 
29059
29060         (Is.DoResolve): If the expression is always of the provided type,
29061         flag warning 183.  If the expression can not ever be of the
29062         provided type flag warning 184.
29063
29064         * class.cs: Catch 169 as well.
29065
29066         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
29067         read. 
29068
29069 2002-01-18  Nick Drochak  <ndrochak@gol.com>
29070
29071         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
29072
29073 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
29074
29075         * interface.cs: (PopulateMethod): Check for pointers being defined
29076         only if the unsafe context is active.
29077         (PopulateProperty): ditto.
29078         (PopulateIndexer): ditto.
29079
29080         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
29081         specified.  If pointers are present, make sure that they are
29082         present in an unsafe context.
29083         (Constructor, Constructor.Define): ditto.
29084         (Field, Field.Define): ditto.
29085         (Property, Property.Define): ditto.
29086         (Event, Event.Define): ditto.
29087
29088         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
29089         hashtable if there are classes or structs defined.
29090
29091         * expression.cs (LocalVariableReference.DoResolve): Simplify this
29092         code, as the constant resolution moved.
29093
29094         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
29095         the metadata, so we can flag error 133. 
29096
29097         * decl.cs (MemberCore.UnsafeOK): New function to test that a
29098         pointer is being declared in an unsafe context.
29099
29100 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
29101
29102         * modifiers.cs (Modifiers.Check): Require a Location argument.
29103         Report error 227 for Unsafe use.
29104
29105         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
29106
29107         * statement.cs (For.Emit): If the test is null, then report that
29108         we do `return', as we wont reach anything afterwards.
29109
29110         (Switch.SwitchGoverningType): Track the expression that matched
29111         the conversion.
29112
29113         * driver.cs: Allow negative numbers as an error code to flag.
29114
29115         * cs-parser.jay: Handle 1551.
29116
29117         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
29118
29119 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
29120
29121         * cs-parser.jay: Report 1518 (type declaration can only contain
29122         class, struct, interface, enum or delegate)
29123
29124         (switch_label): Report 1523 (keywords `case' or `default' must
29125         preced code)
29126
29127         (opt_switch_sections): Report 1522 (empty switch)
29128
29129         * driver.cs: Report 1515 (response file specified multiple times)
29130         Report 1516 (Source file specified multiple times).
29131
29132         * expression.cs (Argument.Resolve): Signal 1510
29133
29134         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
29135         access not allowed in static code)
29136
29137 2002-01-11  Ravi Pratap  <ravi@ximian.com>
29138
29139         * typemanager.cs (IsPointerType): Utility method which we are going
29140         to need a lot.
29141
29142         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
29143         the object type, so we take care of that.
29144
29145         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
29146
29147         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
29148         added to non-params parameters :-)
29149
29150         * typemanager.cs (CSharpName): Include 'void' type too. 
29151
29152         (void_ptr_type): Include in the set of core types.
29153
29154         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
29155         duplicating code.
29156
29157         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
29158         an unsafe context.
29159
29160         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
29161         completely forgotten about it.
29162
29163 2002-01-10  Ravi Pratap  <ravi@ximian.com>
29164
29165         * cs-parser.jay (pointer_type): Add. This begins our implementation
29166         of parsing rules for unsafe code.
29167
29168         (unsafe_statement): Implement.
29169
29170         (embedded_statement): Modify to include the above.
29171
29172         * statement.cs (Unsafe): Implement new class for unsafe blocks.
29173
29174         * codegen.cs (EmitContext.InUnsafe): Add. This determines
29175         if the current context is an unsafe one.
29176
29177         * cs-parser.jay (local_variable_pointer_type): Since local variable types
29178         are handled differently, we need separate rules for them.
29179
29180         (local_variable_declaration): Update to use local_variable_pointer_type
29181         to allow variable declarations of unmanaged pointer types.
29182
29183         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
29184         in unsafe contexts.
29185
29186         * ../errors/cs0214.cs : Add.
29187
29188 2002-01-16  Nick Drochak  <ndrochak@gol.com>
29189
29190         * makefile: remove 'response' file when cleaning.
29191
29192 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
29193
29194         * cs-parser.jay: Report 1524.
29195
29196 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
29197
29198         * typemanager.cs (RegisterMethod): drop checking if we have
29199         registered this from here
29200
29201 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
29202
29203         * class.cs (Method.EmitDestructor): Implement calling our base
29204         destructor. 
29205
29206         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
29207         value of InFinally.
29208
29209         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
29210         this routine and will wrap the call in a try/catch block.  Deal
29211         with the case.
29212
29213 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
29214
29215         * ecore.cs (Expression.MemberLookup): instead of taking a
29216         parameter `same_type' that was used to tell whether we could
29217         access private members we compute our containing type from the
29218         EmitContext.
29219
29220         (FieldExpr): Added partial support for volatile fields.  This does
29221         not work for volatile fields exposed from assemblies, as I can not
29222         figure out how to extract the modreq from it.
29223
29224         Updated all the source files to use this.
29225
29226         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
29227         because it is referenced by MemberLookup very often. 
29228
29229 2002-01-09  Ravi Pratap  <ravi@ximian.com>
29230
29231         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
29232         TypeBuilder.GetCustomAttributes to retrieve what we need.
29233
29234         Get rid of redundant default_member_attr_type as this is the same as
29235         default_member_type which already exists.
29236
29237         * interface.cs, attribute.cs : Update accordingly.
29238
29239 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
29240
29241         * typemanager.cs: Enable IndexerPropertyName again.  It does not
29242         work for TYpeBuilders though.  Ravi, can you please fix this?
29243
29244         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
29245
29246         * expression.cs (Argument.Emit): Handle the case of ref objects
29247         being passed to ref functions;  
29248
29249         (ParameterReference.EmitLoad): Loads the content of the pointer
29250         without dereferencing.
29251
29252 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29253
29254         * cs-tokenizer.cs: Implemented the pre-processing expressions.
29255
29256 2002-01-08  Ravi Pratap  <ravi@ximian.com>
29257
29258         * class.cs (Indexer.DefineMethod): Incorporate the interface
29259         type in the name of the method if we are doing explicit interface
29260         implementation.
29261
29262         * expression.cs (ConversionExists): Remove as it is completely obsolete.
29263
29264         (BetterConversion): Fix extremely trivial bug where we were referring to
29265         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
29266         again !
29267
29268         * ../errors/bug16.cs : Add although we have fixed it.
29269
29270 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29271
29272         * expression.cs (BaseIndexer): Begin implementation.
29273
29274         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
29275
29276         * cs-parser.jay (indexer_declarator): Use qualified_identifier
29277         production directly to remove a shift/reduce, and implement
29278         explicit interface implementation.
29279
29280         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
29281         after a floating point suffix.
29282
29283         * expression.cs (DoNumericPromotions): Improved the conversion for
29284         uint/uint.  If we have a constant, we avoid doing a typecast to a
29285         larger type.
29286
29287         * class.cs (Indexer): Implement explicit interface implementation
29288         for indexers.
29289
29290 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29291
29292         * class.cs: make the default instance constructor public and hidebysig.
29293
29294 2001-01-03  Ravi Pratap  <ravi@ximian.com>
29295
29296         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
29297         so we can call it from elsewhere.
29298
29299         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
29300         we emit it internally if the class has a defined indexer; otherwise the user
29301         emits it by decorating the class definition with the DefaultMemberAttribute.
29302
29303         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
29304         attribute is not used on a type which defines an indexer.
29305
29306         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
29307         character when we skip whitespace.
29308
29309         * ../errors/cs0646.cs : Add.
29310
29311 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
29312
29313         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
29314         again. 
29315
29316         * makefile: Add practical target `mcs3.exe' which builds the third
29317         generation compiler. 
29318
29319         * expression.cs (New): Fix structures constructor calling.
29320
29321         * class.cs (Property, Method, Indexer): Emit Final flag on the
29322         method if we are an interface implementation and we are not
29323         abstract. 
29324
29325         * ecore.cs (PropertyExpr): New public field `IsBase', tells
29326         whether this property is referencing a `base' method.
29327
29328         * expression.cs (Invocation.EmitCall): take an extra argument:
29329         is_base, this is used to determine whether the `call' or
29330         `callvirt' opcode should be used.
29331
29332
29333         * delegate.cs: update EmitCall.
29334
29335         * class.cs (Method.Define): Set NewSlot for the cases where we are
29336         not implementing an interface method.
29337
29338         (Property.Define): ditto.
29339
29340 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
29341
29342         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
29343         'r'.  Allows mcs to parse itself fully.
29344
29345 2002-01-02  Ravi Pratap  <ravi@ximian.com>
29346
29347         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
29348         of the number of initializers that require the InitializeArray method.
29349
29350         (CheckIndices): Store the Expression in all cases - not the plain value. Also
29351         update the above field where necessary.
29352
29353         (MakeByteBlob): Update accordingly.
29354
29355         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
29356         greater than 2.
29357
29358         (EmitDynamicInitializers): Update in accordance with the new optimization.
29359
29360         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
29361         same OpCode applies.
29362
29363         * cs-parser.jay : Fix some glaring errors I introduced.
29364
29365 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
29366
29367         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
29368         so that we can check for name clashes there too.
29369
29370         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
29371         for interface indexers.
29372
29373         * interfaces.cs (Define): Emit the default member attribute.
29374
29375         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
29376         variable was being referred to while setting the value ;-)
29377
29378 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
29379
29380         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
29381         byte-by-byte information when we know the data is zero.
29382
29383         Make the block always a multiple of 4, because
29384         DefineInitializedData has a bug.
29385
29386         * assign.cs: Fix, we should assign from the temporary, not from
29387         the source. 
29388
29389         * expression.cs (MakeByteBlob): Fix my incorrect code.
29390
29391 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
29392
29393         * typemanager.cs (EnumToUnderlying): This function is used to get
29394         the underlying type from an enumeration, because it does not
29395         always work. 
29396
29397         * constant.cs: Use the I4_S form for values between -128 and 127.
29398
29399         * statement.cs (Block.LookupLabel): Looks up a label.
29400         (Block): Drop support for labeled blocks.
29401
29402         (LabeledStatement): New kind of statement that represents a label
29403         only.
29404
29405         (Goto): Finally implement this bad boy.
29406
29407         * cs-parser.jay: Update to reflect new mechanism to implement
29408         labels.
29409
29410 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29411
29412         * codegen.cs (EmitContext.This): a codegen property that keeps the
29413         a single instance of this instead of creating many different this
29414         instances. 
29415
29416         * delegate.cs (Delegate.DoResolve): Update to use the property;
29417
29418         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29419
29420         * expression.cs (BaseAccess.DoResolve): Ditto.
29421
29422 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29423
29424         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29425         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29426
29427         (InitCoreTypes): Update accordingly.
29428
29429         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29430         so we can quickly store the state.
29431
29432         (ApplyAttributes): Set the correct implementation flags
29433         for InternalCall methods.
29434
29435 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29436
29437         * expression.cs (EmitCall): if a method is not virtual, then do
29438         not use callvirt on it.
29439
29440         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29441         user defined stuff) requires the use of stobj, which takes an
29442         address on the stack instead of an array and an index.  So emit
29443         the Ldelema operation for it.
29444
29445         (EmitStoreOpcode): Use stobj for valuetypes.
29446
29447         (UnaryMutator.EmitCode): Use the right 1 value depending on
29448         whether we are dealing with int64/uint64, float or doubles.
29449
29450         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29451         constructors that I implemented last night.
29452
29453         (Constructor.IsDefault): Fix to work properly for static
29454         constructors.
29455
29456         * cs-parser.jay (CheckDef): report method signature errors.
29457         Update error number 103 to be 132.
29458
29459         * decl.cs: New AdditionResult enumeration value: MethodExists.
29460         Although we do this check for methods later on in the semantic
29461         analysis, catching repeated default constructors is so easy that
29462         we catch these here. 
29463
29464         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29465         promotions code.
29466
29467         (ParameterReference.EmitAssign, Emit): handle
29468         bools as bytes.
29469
29470         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29471         (ArrayAccess.EmitStoreOpcode): ditto.
29472
29473         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29474
29475         * expression.cs (MakeByteBlob): Complete all the missing types
29476         (uint, short, ushort, byte, sbyte)
29477
29478         * class.cs: Only init instance field initializers on instance
29479         constructors. 
29480
29481         Rename `constructors' to instance_constructors. 
29482
29483         (TypeContainer.AddConstructor): Only add constructors to the list
29484         if it is not static.
29485
29486         Make sure that we handle default_static_constructor independently
29487         everywhere where we handle instance_constructors
29488
29489 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29490
29491         * class.cs: Do not lookup or create a base initializer for a
29492         static constructor.
29493
29494         (ConstructorInitializer.Resolve): use the proper type to lookup
29495         for constructors.
29496
29497         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29498
29499         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29500         in DeclSpace. 
29501
29502         * decl.cs: CloseType is now an virtual method, the default
29503         implementation just closes this type.
29504
29505 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29506
29507         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29508         to PreserveSig by default. Also emit HideBySig on such methods.
29509
29510         Basically, set the defaults to standard values.
29511
29512         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29513         argument, if candidate is better, it can't be worse than the best !
29514
29515         (Invocation): Re-write bits to differentiate between methods being
29516         applicable in their expanded form and their normal form - for params
29517         methods of course.
29518
29519         Get rid of use_standard everywhere as only standard conversions are allowed
29520         in overload resolution. 
29521
29522         More spec conformance.
29523
29524 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29525
29526         * driver.cs: Add --timestamp, to see where the compiler spends
29527         most of its time.
29528
29529         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29530         `this' in static code.
29531
29532         (SimpleName.DoResolve): Implement in terms of a helper function
29533         that allows static-references to be passed upstream to
29534         MemberAccess.
29535
29536         (Expression.ResolveWithSimpleName): Resolve specially simple
29537         names when called by MemberAccess to implement the special
29538         semantics. 
29539
29540         (Expression.ImplicitReferenceConversion): Handle conversions from
29541         Null to reference types before others, as Null's type is
29542         System.Object. 
29543
29544         * expression.cs (Invocation.EmitCall): Handle the special case of
29545         calling methods declared on a reference type from a ValueType
29546         (Base classes System.Object and System.Enum)
29547
29548         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29549         the left hand side is a TypeExpr, not on every enumeration. 
29550
29551         (Binary.Resolve): If types are reference types, then do a cast to
29552         object on operators != and == of both arguments.
29553
29554         * typemanager.cs (FindMembers): Extract instance and static
29555         members if requested.
29556
29557         * interface.cs (PopulateProperty): Use void_type instead of null
29558         as the return type for the setter method.
29559
29560         (PopulateIndexer): ditto.
29561
29562 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29563
29564         * support.cs (ReflectionParameters): Fix minor bug where we
29565         were examining the wrong parameter for the ParamArray attribute.
29566
29567         Cope with requests for the type of the parameter at position
29568         greater than the params parameter's. We now return the element
29569         type of the params array as that makes more sense.
29570
29571         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29572         accordingly as we no longer have to extract the element type
29573         ourselves.
29574
29575         (Invocation.OverloadResolve): Update.
29576
29577 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29578
29579         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29580         against IEnumerator, test whether the return value is a descendant
29581         of the IEnumerator interface.
29582
29583         * class.cs (Indexer.Define): Use an auxiliary method to implement
29584         the other bits of the method definition.  Begin support for
29585         explicit interface implementation.
29586
29587         (Property.DefineMethod): Use TypeManager.void_type instead of null
29588         for an empty return value.
29589
29590 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29591
29592         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29593         dealing with a FieldExpr which is composed of a FieldBuilder, in
29594         the code path we did extract the constant, but we should have
29595         obtained the underlying value to be able to cast it (otherwise we
29596         end up in an infinite loop, this is what Ravi was running into).
29597
29598         (ArrayCreation.UpdateIndices): Arrays might be empty.
29599
29600         (MemberAccess.ResolveMemberAccess): Add support for section
29601         14.5.4.1 that deals with the special case of E.I when E is a type
29602         and something else, that I can be a reference to a static member.
29603
29604         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29605         handle a particular array type to create byte blobs, it is just
29606         something we dont generate byteblobs for.
29607
29608         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29609         arguments. 
29610
29611         * location.cs (Push): remove the key from the hashtable that we
29612         are about to add.   This happens for empty files.
29613
29614         * driver.cs: Dispose files after we have parsed them.
29615
29616         (tokenize): new function that only runs the tokenizer on its
29617         input, for speed testing.
29618
29619 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29620
29621         * class.cs (Event.Define): Define the private field only if there
29622         are no accessors defined.
29623
29624         * expression.cs (ResolveMemberAccess): If there is no associated
29625         field with the event, that means we have an event defined with its
29626         own accessors and we should flag error cs0070 since transforming
29627         ourselves into a field is not valid in that case.
29628
29629         * ecore.cs (SimpleName.DoResolve): Same as above.
29630
29631         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29632         and charset to sane values.
29633
29634 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29635
29636         * assign.cs (DoResolve): Perform check on events only if they 
29637         are being accessed outside the declaring type.
29638
29639         * cs-parser.jay (event_declarations): Update rules to correctly
29640         set the type of the implicit parameter etc.
29641
29642         (add_accessor, remove_accessor): Set current local parameters.
29643
29644         * expression.cs (Binary): For delegate addition and subtraction,
29645         cast the return value from the method into the appropriate delegate
29646         type.
29647
29648 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29649
29650         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29651         of these as the workaround is unnecessary.
29652
29653         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29654         delegate data - none of that is needed at all.
29655
29656         Re-write bits to extract the instance expression and the delegate method
29657         correctly.
29658
29659         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29660         on delegates too.
29661
29662         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29663         of attaching attributes instead of duplicating code everywhere.
29664
29665         * everywhere : Update code to do attribute emission using the above method.
29666
29667 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29668
29669         * expression.cs (IsParamsMethodApplicable): if there are not
29670         parameters, return immediately.
29671
29672         * ecore.cs: The 0 literal can be implicity converted to an enum
29673         type. 
29674
29675         (SimpleName.DoResolve): First lookup the type, then lookup the
29676         members. 
29677
29678         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29679         want to get its address.  If the InstanceExpression is not
29680         addressable, store the result in a temporary variable, then get
29681         the address of it.
29682
29683         * codegen.cs: Only display 219 errors on warning level or above. 
29684
29685         * expression.cs (ArrayAccess): Make it implement the
29686         IMemoryLocation interface.
29687
29688         (Binary.DoResolve): handle the operator == (object a, object b)
29689         and operator != (object a, object b) without incurring into a
29690         BoxedCast (because 5 != o should never be performed).
29691
29692         Handle binary enumerator operators.
29693
29694         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29695         value type, otherwise use Ldelem_ref.
29696
29697         Use precomputed names;
29698
29699         (AddressOf): Implement address of
29700
29701         * cs-parser.jay (labeled_statement): Fix recursive block
29702         addition by reworking the production.
29703
29704         * expression.cs (New.DoEmit): New has a special case:
29705                 
29706                  If we are dealing with a ValueType, we have a few
29707                  situations to deal with:
29708                 
29709                     * The target of New is a ValueType variable, that is
29710                       easy, we just pass this as the variable reference
29711                 
29712                     * The target of New is being passed as an argument,
29713                       to a boxing operation or a function that takes a
29714                       ValueType.
29715                 
29716                       In this case, we need to create a temporary variable
29717                       that is the argument of New.
29718
29719
29720 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29721
29722         * rootcontext.cs (LookupType): Check that current_type is not null before
29723         going about looking at nested types.
29724
29725         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29726         not implement the IAssignMethod interface any more.
29727
29728         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29729         where we tranform them into FieldExprs if they are being resolved from within
29730         the declaring type.
29731
29732         * ecore.cs (SimpleName.DoResolve): Do the same here.
29733
29734         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29735
29736         * ../errors/bug10.cs : Add.
29737
29738         * ../errors/cs0070.cs : Add.
29739
29740         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29741
29742         * assign.cs : Get rid of EventIsLocal everywhere.
29743
29744 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29745
29746         * ecore.cs (ConvertIntLiteral): finished the implementation.
29747
29748         * statement.cs (SwitchLabel): Convert the value we are using as a
29749         key before looking up the table.
29750
29751 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29752
29753         * codegen.cs (EmitTopBlock): Require a Location argument now.
29754
29755         * cs-parser.jay (constructor_declarator): We need to setup
29756         current_local_parameters before we parse the
29757         opt_constructor_initializer, to allow the variables to be bound
29758         to the constructor arguments.
29759
29760         * rootcontext.cs (LookupType): First lookup nested classes in our
29761         class and our parents before we go looking outside our class.
29762
29763         * expression.cs (ConstantFold): Extract/debox the values at the
29764         beginnning. 
29765
29766         * rootcontext.cs (EmitCode): Resolve the constants first before we
29767         resolve the types.  This is not really needed, but it helps debugging.
29768
29769         * statement.cs: report location.
29770
29771         * cs-parser.jay: pass location to throw statement.
29772
29773         * driver.cs: Small bug fix.
29774
29775         * report.cs: Updated format to be 4-zero filled digits.
29776
29777 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29778
29779         * expression.cs (CheckIndices): Fix minor bug where the wrong
29780         variable was being referred to ;-)
29781
29782         (DoEmit): Do not call EmitStaticInitializers when the 
29783         underlying type is System.Object.
29784
29785 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29786
29787         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29788         and do the usual workaround for SRE.
29789
29790         * class.cs (MyEventBuilder.EventType): New member to get at the type
29791         of the event, quickly.
29792
29793         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29794
29795         * assign.cs (Assign.DoResolve): Handle the case when the target
29796         is an EventExpr and perform the necessary checks.
29797
29798         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29799         interface.
29800
29801         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29802
29803         (EventExpr): Set the type in the constructor itself since we 
29804         are meant to be born fully resolved.
29805
29806         (EventExpr.Define): Revert code I wrote earlier.
29807                 
29808         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29809         instance expression is null. The instance expression is a This in that case
29810         or a null, depending on whether it is a static method or not.
29811
29812         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29813         refers to more than one method.
29814
29815         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29816         and accordingly flag errors.
29817
29818 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29819
29820         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29821
29822 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29823
29824         * location.cs (ToString): Provide useful rutine.
29825
29826 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29827
29828         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29829         objects, return the actual integral boxed.
29830
29831         * statement.cs (SwitchLabel): define an ILLabel for each
29832         SwitchLabel. 
29833
29834         (Switch.CheckSwitch): If the value is a Literal, extract
29835         the underlying literal.
29836
29837         Also in the unused hashtable we had, add the SwitchLabel so we can
29838         quickly look this value up.
29839
29840         * constant.cs: Implement a bunch of new constants.  Rewrite
29841         Literal based on this.  Made changes everywhere to adapt to this.
29842
29843         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29844         dereferencing array only once, and also copes with enumrations.
29845
29846         bytes are two bytes wide, not one.
29847
29848         (Cast): Perform constant conversions.
29849
29850         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29851         wrappers to the literals here.
29852
29853         * expression.cs (DoNumericPromotions): long literals can converted
29854         to ulong implicity (this is taken care of elsewhere, but I was
29855         missing this spot).
29856
29857         * ecore.cs (Expression.Literalize): Make the return type Literal,
29858         to improve type checking.
29859
29860         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29861
29862 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29863
29864         * literal.cs: Revert code from ravi that checked the bounds.  The
29865         bounds are sane by the definition of the type itself. 
29866
29867         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29868         need to actually look up in our parent hierarchy for interfaces
29869         implemented. 
29870
29871         * const.cs: Use the underlying type for enumerations
29872
29873         * delegate.cs: Compute the basename for the delegate creation,
29874         that should fix the delegate test case, and restore the correct
29875         Type Lookup semantics in rootcontext
29876
29877         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29878         referencing a nested type with the Reflection API is using the "+"
29879         sign. 
29880
29881         * cs-parser.jay: Do not require EOF token at the end.
29882
29883 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29884
29885         * rootcontext.cs (LookupType): Concatenate type names with
29886         a '.' instead of a '+' The test suite passes again.
29887
29888         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29889         field of the enumeration.
29890
29891         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29892         the case when the member is an EventExpr.
29893
29894         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29895         static has an associated instance expression.
29896
29897         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29898
29899         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29900
29901         * class.cs (Event.Define): Register event and perform appropriate checks
29902         for error #111.
29903
29904         We define the Add and Remove methods even if the use provides none because
29905         in that case, we provide default implementations ourselves.
29906
29907         Define a private field of the type of the event. This is done by the CSC compiler
29908         and we should be doing it too ;-)
29909
29910         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29911         More methods we use in code we generate.
29912
29913         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29914         is important.
29915
29916         (InitCoreTypes): Update accordingly for the above.
29917
29918         * class.cs (Event.Emit): Generate code for default accessors that we provide
29919
29920         (EmitDefaultMethod): Do the job in the above.
29921
29922         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29923         appropriate place.
29924
29925 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29926
29927         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29928         builders even if we were missing one.
29929
29930         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29931         pass the Basename as our class name instead of the Name.  The
29932         basename will be correctly composed for us.
29933
29934         * parameter.cs (Paramters): Now takes a Location argument.
29935
29936         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29937         make all the code call directly LookupType in RootContext and take
29938         this chance to pass the Location information everywhere.
29939
29940         * Everywhere: pass Location information.
29941
29942 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29943
29944         * class.cs (Constructor.Define): Updated way of detecting the
29945         length of the parameters.
29946
29947         (TypeContainer.DefineType): Use basename as the type name for
29948         nested types.
29949
29950         (TypeContainer.Define): Do not recursively define types here, as
29951         definition is taken care in order by the RootContext.
29952
29953         * tree.cs: Keep track of namespaces in a per-file basis.
29954
29955         * parameter.cs (Parameter.ComputeSignature): Update to use
29956         DeclSpace. 
29957
29958         (Parameters.GetSignature): ditto.
29959
29960         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29961         instead of a TypeContainer.
29962
29963         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29964         resolve names.  Because we need to be resolve in our context, not
29965         our parents.
29966
29967         * driver.cs: Implement response files.
29968
29969         * class.cs (TypeContainer.DefineType): If we are defined, do not
29970         redefine ourselves.
29971
29972         (Event.Emit): Emit the code for add/remove handlers.
29973         (Event.Define): Save the MethodBuilders for add/remove.
29974
29975         * typemanager.cs: Use pair here too.
29976
29977         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29978         DictionaryEntry requires the first argument to be non-null.  
29979
29980         (enum_declaration): Compute full name for registering the
29981         enumeration.
29982
29983         (delegate_declaration): Instead of using
29984         formal_parameter_list, use opt_formal_parameter_list as the list
29985         can be empty.
29986
29987         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29988         (EventParsing): New property that controls whether `add' and
29989         `remove' are returned as tokens or identifiers (for events);
29990
29991 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29992
29993         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29994         use MyEventBuilder only and let it wrap the real builder for us.
29995
29996         (MyEventBuilder): Revamp constructor etc.
29997
29998         Implement all operations that we perform on EventBuilder in precisely the same
29999         way here too.
30000
30001         (FindMembers): Update to use the EventBuilder member.
30002
30003         (Event.Emit): Update accordingly.
30004
30005 2001-12-18  Ravi Pratap  <ravi@ximian.com>
30006
30007         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
30008         by calling the appropriate methods.
30009
30010         (GetCustomAttributes): Make stubs as they cannot possibly do anything
30011         useful.
30012
30013         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
30014
30015 2001-12-17  Ravi Pratap  <ravi@ximian.com>
30016
30017         * delegate.cs (Delegate.Populate): Check that the return type
30018         and various parameters types are indeed accessible.
30019
30020         * class.cs (Constructor.Define): Same here.
30021
30022         (Field.Define): Ditto.
30023
30024         (Event.Define): Ditto.
30025
30026         (Operator.Define): Check that the underlying Method defined itself
30027         correctly - so it's MethodBuilder should not be null.
30028
30029         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
30030         expression happens to be null.
30031
30032         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
30033         members but as of now we don't seem to be able to do anything really useful with it.
30034
30035         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
30036         not the EventBuilder.
30037
30038 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
30039
30040         * cs-tokenizer.cs: Add support for defines.
30041         Add support for #if, #elif, #else, #endif
30042
30043         (eval_var): evaluates a variable.
30044         (eval): stubbed for evaluating functions.
30045
30046         * cs-parser.jay: Pass the defines information
30047
30048         * driver.cs: Add --define command line option.
30049
30050         * decl.cs: Move MemberCore here.
30051
30052         Make it the base class for DeclSpace.  This allows us to catch and
30053         report 108 and 109 for everything now.
30054
30055         * class.cs (TypeContainer.Define): Extract all the members
30056         before populating and emit the warning 108 (new keyword required
30057         to override) instead of having each member implement this.
30058
30059         (MemberCore.Define): New abstract method, we will be using this in
30060         the warning reporting engine in Populate.
30061
30062         (Operator.Define): Adjust to new MemberCore protocol. 
30063
30064         * const.cs (Const): This does not derive from Expression, it is a
30065         temporary object we use to create fields, it is a MemberCore. 
30066
30067         * class.cs (Method.Define): Allow the entry point to be in a
30068         specific class.
30069
30070         * driver.cs: Rewrite the argument handler to clean it up a bit.
30071
30072         * rootcontext.cs: Made it just an auxiliary namespace feature by
30073         making everything static.
30074
30075         * driver.cs: Adapt code to use RootContext type name instead of
30076         instance variable.
30077
30078         * delegate.cs: Remove RootContext argument.
30079
30080         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
30081         argument. 
30082
30083         * class.cs (Event.Define): The lookup can fail.
30084
30085         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
30086
30087         * expression.cs: Resolve the this instance before invoking the code.
30088
30089 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
30090
30091         * cs-parser.jay: Add a production in element_access that allows
30092         the thing to become a "type" reference.  This way we can parse
30093         things like "(string [])" as a type.
30094
30095         Note that this still does not handle the more complex rules of
30096         casts. 
30097
30098
30099         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
30100
30101         * ecore.cs: (CopyNewMethods): new utility function used to
30102         assemble the list of methods from running FindMembers.
30103
30104         (MemberLookup): Rework FindMembers so that 
30105
30106 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
30107
30108         * class.cs (TypeContainer): Remove Delegates who fail to be
30109         defined.
30110
30111         * delegate.cs (Populate): Verify that we dont get null return
30112         values.   TODO: Check for AsAccessible.
30113
30114         * cs-parser.jay: Use basename to emit error 574 (destructor should
30115         have the same name as container class), not the full name.
30116
30117         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
30118         possible representation.  
30119
30120         Also implements integer type suffixes U and L.
30121
30122 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
30123
30124         * expression.cs (ArrayCreation.DoResolve): We need to do the
30125         argument resolution *always*.
30126
30127         * decl.cs: Make this hold the namespace.  Hold the root context as
30128         well.
30129         (LookupType): Move here.
30130
30131         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
30132
30133         * location.cs (Row, Name): Fixed the code, it was always returning
30134         references to the first file.
30135
30136         * interface.cs: Register properties defined through interfaces.
30137
30138         * driver.cs: Add support for globbing on the command line
30139
30140         * class.cs (Field): Make it derive from MemberCore as well.
30141         (Event): ditto.
30142
30143 2001-12-15  Ravi Pratap  <ravi@ximian.com>
30144
30145         * class.cs (Event::Define): Check that the type of the event is a delegate
30146         type else flag error #66.
30147
30148         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
30149         same.
30150
30151         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
30152         values of EntryPoint, CharSet etc etc.
30153
30154         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
30155
30156         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
30157         be null and we should ignore this. I am not sure if this is really clean. Apparently,
30158         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
30159         which needs this to do its work.
30160
30161         * ../errors/cs0066.cs : Add.
30162
30163 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
30164
30165         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
30166         helper functions.
30167
30168         * class.cs: (MethodSignature.MethodSignature): Removed hack that
30169         clears out the parameters field.
30170         (MemberSignatureCompare): Cleanup
30171
30172         (MemberCore): New base class used to share code between MethodCore
30173         and Property.
30174
30175         (RegisterRequiredImplementations) BindingFlags.Public requires
30176         either BindingFlags.Instace or Static.  Use instance here.
30177
30178         (Property): Refactored code to cope better with the full spec.
30179
30180         * parameter.cs (GetParameterInfo): Return an empty array instead
30181         of null on error.
30182
30183         * class.cs (Property): Abstract or extern properties have no bodies.
30184
30185         * parameter.cs (GetParameterInfo): return a zero-sized array.
30186
30187         * class.cs (TypeContainer.MethodModifiersValid): Move all the
30188         method modifier validation to the typecontainer so we can reuse
30189         this on properties.
30190
30191         (MethodCore.ParameterTypes): return an empty sized array of types.
30192
30193         (Property.Define): Test property modifier validity.
30194
30195         Add tests for sealed/override too.
30196
30197         (Method.Emit): abstract or extern methods have no bodies.
30198
30199 2001-12-14  Ravi Pratap  <ravi@ximian.com>
30200
30201         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
30202         thing.
30203
30204         (Method::Define, ::Emit): Modify accordingly.
30205
30206         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
30207
30208         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
30209
30210         * makefile: Pass in /unsafe.
30211
30212 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
30213
30214         * class.cs (MakeKey): Kill routine.
30215
30216         * class.cs (TypeContainer.Define): Correctly define explicit
30217         method implementations (they require the full interface name plus
30218         the method name).
30219
30220         * typemanager.cs: Deply the PtrHashtable here and stop using the
30221         lame keys.  Things work so much better.
30222
30223         This of course broke everyone who depended on `RegisterMethod' to
30224         do the `test for existance' test.  This has to be done elsewhere.
30225
30226         * support.cs (PtrHashtable): A hashtable that avoid comparing with
30227         the object stupid Equals method (because, that like fails all over
30228         the place).  We still do not use it.
30229
30230         * class.cs (TypeContainer.SetRequiredInterface,
30231         TypeContainer.RequireMethods): Killed these two routines and moved
30232         all the functionality to RegisterRequiredImplementations.
30233
30234         (TypeContainer.RegisterRequiredImplementations): This routine now
30235         registers all the implementations required in an array for the
30236         interfaces and abstract methods.  We use an array of structures
30237         which can be computed ahead of time to reduce memory usage and we
30238         also assume that lookups are cheap as most classes will not
30239         implement too many interfaces.
30240
30241         We also avoid creating too many MethodSignatures.
30242
30243         (TypeContainer.IsInterfaceMethod): Update and optionally does not
30244         clear the "pending" bit if we find that there are problems with
30245         the declaration.
30246
30247         (TypeContainer.VerifyPendingMethods): Update to report errors of
30248         methods that look like implementations but are not.
30249
30250         (TypeContainer.Define): Add support for explicit interface method
30251         implementation. 
30252
30253 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
30254
30255         * typemanager.cs: Keep track of the parameters here instead of
30256         being a feature of the TypeContainer.
30257
30258         * class.cs: Drop the registration of parameters here, as
30259         InterfaceMethods are also interface declarations.
30260
30261         * delegate.cs: Register methods with the TypeManager not only with
30262         the TypeContainer.  This code was buggy.
30263
30264         * interface.cs: Full registation here.
30265
30266 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
30267
30268         * expression.cs: Remove reducer for binary expressions, it can not
30269         be done this way.
30270
30271         * const.cs: Put here the code that used to go into constant.cs
30272
30273         * constant.cs: Put here the code for constants, this is a new base
30274         class for Literals.
30275
30276         * literal.cs: Make Literal derive from Constant.
30277
30278 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
30279
30280         * statement.cs (Return.Emit): Report error 157 if the user
30281         attempts to return from a finally block.
30282
30283         (Return.Emit): Instead of emitting a return, jump to the end of
30284         the function.
30285
30286         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
30287         LocalBuilder to store the result of the function.  ReturnLabel is
30288         the target where we jump.
30289
30290
30291 2001-12-09  Radek Doulik  <rodo@ximian.com>
30292
30293         * cs-parser.jay: remember alias in current namespace
30294
30295         * ecore.cs (SimpleName::DoResolve): use aliases for types or
30296         namespaces
30297
30298         * class.cs (LookupAlias): lookup alias in my_namespace
30299
30300         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
30301         aliases hashtable
30302         (LookupAlias): lookup alias in this and if needed in parent
30303         namespaces
30304
30305 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
30306
30307         * support.cs: 
30308
30309         * rootcontext.cs: (ModuleBuilder) Made static, first step into
30310         making things static.  I need this to avoid passing the
30311         TypeContainer when calling ParameterType.
30312
30313         * support.cs (InternalParameters.ParameterType): Remove ugly hack
30314         that did string manipulation to compute the type and then call
30315         GetType.  Use Parameter.ParameterType instead.
30316
30317         * cs-tokenizer.cs: Consume the suffix for floating values.
30318
30319         * expression.cs (ParameterReference): figure out whether this is a
30320         reference parameter or not.  Kill an extra variable by computing
30321         the arg_idx during emission.
30322
30323         * parameter.cs (Parameters.GetParameterInfo): New overloaded
30324         function that returns whether a parameter is an out/ref value or not.
30325
30326         (Parameter.ParameterType): The type of the parameter (base,
30327         without ref/out applied).
30328
30329         (Parameter.Resolve): Perform resolution here.
30330         (Parameter.ExternalType): The full type (with ref/out applied).
30331
30332         * statement.cs (Using.Emit, Using.EmitExpression): Implement
30333         support for expressions on the using statement.
30334
30335 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
30336
30337         * statement.cs (Using.EmitLocalVariableDecls): Split the
30338         localvariable handling of the using statement.
30339
30340         (Block.EmitMeta): Keep track of variable count across blocks.  We
30341         were reusing slots on separate branches of blocks.
30342
30343         (Try.Emit): Emit the general code block, we were not emitting it. 
30344
30345         Check the type of the declaration to be an IDisposable or
30346         something that can be implicity converted to it. 
30347
30348         Emit conversions if required.
30349
30350         * ecore.cs (EmptyExpression): New utility class.
30351         (Expression.ImplicitConversionExists): New utility function.
30352
30353 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
30354
30355         * statement.cs (Using): Implement.
30356
30357         * expression.cs (LocalVariableReference): Support read only variables.
30358
30359         * statement.cs: Remove the explicit emit for the Leave opcode.
30360         (VariableInfo): Add a readonly field.
30361
30362 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
30363
30364         * ecore.cs (ConvCast): new class used to encapsulate the various
30365         explicit integer conversions that works in both checked and
30366         unchecked contexts.
30367
30368         (Expression.ConvertNumericExplicit): Use new ConvCast class to
30369         properly generate the overflow opcodes.
30370
30371 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30372
30373         * statement.cs: The correct type for the EmptyExpression is the
30374         element_type, not the variable type.  Ravi pointed this out.
30375
30376 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30377
30378         * class.cs (Method::Define): Handle PInvoke methods specially
30379         by using DefinePInvokeMethod instead of the usual one.
30380
30381         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
30382         above to do the task of extracting information and defining the method.
30383
30384 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30385
30386         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
30387         of the condition for string type.
30388
30389         (Emit): Move that here. 
30390
30391         (ArrayCreation::CheckIndices): Keep string literals in their expression
30392         form.
30393
30394         (EmitDynamicInitializers): Handle strings appropriately.
30395
30396 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30397
30398         * codegen.cs (EmitContext): Replace multiple variables with a
30399         single pointer to the current Switch statement.
30400
30401         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
30402         EmitContext.
30403
30404 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30405
30406         * statement.cs 
30407
30408         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30409         default'.
30410
30411         (Foreach.Emit): Foreach on arrays was not setting
30412         up the loop variables (for break/continue).
30413
30414         (GotoCase): Semi-implented.
30415
30416 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30417
30418         * attribute.cs (CheckAttribute): Handle system attributes by using
30419         Attribute.GetAttributes to examine information we need.
30420
30421         (GetValidPlaces): Same here.
30422
30423         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30424
30425         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30426
30427         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30428
30429         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30430
30431         (Method::Emit): Handle the case when we are a PInvoke method.
30432
30433 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30434
30435         * expression.cs: Use ResolveWithSimpleName on compound names.
30436
30437 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30438
30439         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30440         before trying to reduce it.
30441
30442         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30443
30444         * constant.cs (LookupConstantValue): Implement.
30445
30446         (EmitConstant): Use the above in emitting the constant.
30447
30448         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30449         that are user-defined by doing a LookupConstantValue on them.
30450
30451         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30452         too, like above.
30453
30454 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30455
30456         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30457
30458         (BaseAccess.DoResolve): Implement.
30459
30460         (MemberAccess.DoResolve): Split this routine into a
30461         ResolveMemberAccess routine that can be used independently
30462
30463 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30464
30465         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30466         As that share bits of the implementation.  Is returns a boolean,
30467         while As returns the Type that is being probed.
30468
30469 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30470
30471         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30472         instead of a Literal - much easier.
30473
30474         (EnumInTransit): Remove - utterly useless :-)
30475
30476         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30477
30478         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30479
30480         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30481         chain when we have no associated expression.
30482
30483 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30484
30485         * constant.cs (Define): Use Location while reporting the errror.
30486
30487         Also emit a warning when 'new' is used and there is no inherited
30488         member to hide.
30489
30490         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30491         populated.
30492
30493         (LookupEnumValue): Implement to lookup an enum member's value and define it
30494         if necessary.
30495
30496         (Populate): Re-write accordingly to use the above routine.
30497
30498 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30499
30500         * expression.cs (This): Fix prototype for DoResolveLValue to
30501         override the base class DoResolveLValue.
30502
30503         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30504         declarations) 
30505
30506         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30507         (we need to load the address of the field here).  This fixes
30508         test-22. 
30509
30510         (FieldExpr.DoResolveLValue): Call the DoResolve
30511         function to initialize the Instance expression.
30512
30513         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30514         correctly the GetEnumerator operation on a value type.
30515
30516         * cs-parser.jay: Add more simple parsing error catches.
30517
30518         * statement.cs (Switch): Add support for string switches.
30519         Handle null specially.
30520
30521         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30522
30523 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30524
30525         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30526
30527         (declare_local_constant): New helper function.
30528
30529         * statement.cs (AddConstant): Keep a separate record of constants
30530
30531         (IsConstant): Implement to determine if a variable is a constant.
30532
30533         (GetConstantExpression): Implement.
30534
30535         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30536
30537         * statement.cs (IsVariableDefined): Re-write.
30538
30539 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30540
30541         * class.cs (TypeContainer::FindMembers): Look for constants
30542         in the case when we are looking for MemberTypes.Field
30543
30544         * expression.cs (MemberAccess::DoResolve): Check that in the
30545         case we are a FieldExpr and a Literal, we are not being accessed
30546         by an instance reference.
30547
30548         * cs-parser.jay (local_constant_declaration): Implement.
30549
30550         (declaration_statement): Implement for constant declarations.
30551
30552 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30553
30554         * statement.cs (Switch): Catch double defaults.
30555
30556         (Switch): More work on the switch() statement
30557         implementation.  It works for integral values now, need to finish
30558         string support.
30559
30560
30561 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30562
30563         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30564         integer literals into other integer literals.  To be used by
30565         switch. 
30566
30567 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30568
30569         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30570         some memory.
30571
30572         (EmitDynamicInitializers): Cope with the above since we extract data
30573         directly from ArrayData now.
30574
30575         (ExpectInitializers): Keep track of whether initializers are mandatory
30576         or not.
30577
30578         (Bounds): Make it a hashtable to prevent the same dimension being 
30579         recorded for every element in that dimension.
30580
30581         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30582         from being found.
30583
30584         Also fix bug which was causing the indices to be emitted in the reverse
30585         order.
30586
30587 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30588
30589         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30590         unfinished.  They do not work, because the underlying code is
30591         sloppy.
30592
30593 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30594
30595         * cs-parser.jay: Remove bogus fixme.
30596
30597         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30598         on Switch statement.
30599
30600 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30601
30602         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30603         the same. 
30604
30605         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30606         parameter. Apparently, any expression is allowed. 
30607
30608         (ValidateInitializers): Update accordingly.
30609
30610         (CheckIndices): Fix some tricky bugs thanks to recursion.
30611
30612         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30613         I was being completely brain-dead.
30614
30615         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30616         and re-write acordingly.
30617
30618         (DelegateInvocation): Re-write accordingly.
30619
30620         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30621
30622         (MakeByteBlob): Handle types more correctly.
30623
30624         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30625         initialization from expressions but it is incomplete because I am a complete
30626         Dodo :-|
30627
30628 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30629
30630         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30631         on If.  Basically, we have to return `true' (ie, we do return to
30632         our caller) only if both branches of the if return.
30633
30634         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30635         short-circuit operators, handle them as short circuit operators. 
30636
30637         (Cast.DoResolve): Resolve type.
30638         (Cast.Cast): Take an expression as the target type.
30639
30640         * cs-parser.jay (cast_expression): Remove old hack that only
30641         allowed a limited set of types to be handled.  Now we take a
30642         unary_expression and we resolve to a type during semantic
30643         analysis.
30644
30645         Use the grammar productions from Rhys to handle casts (this is
30646         not complete like Rhys syntax yet, we fail to handle that corner
30647         case that C# has regarding (-x), but we will get there.
30648
30649 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30650
30651         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30652         field which is an array type.
30653
30654         * cs-parser.jay (declare_local_variables): Support array initialization too.
30655
30656         * typemanager.cs (MakeKey): Implement.
30657
30658         (everywhere): Use the above appropriately.
30659
30660         * cs-parser.jay (for_statement): Update for array initialization while
30661         declaring variables.
30662
30663         * ecore.cs : The error message was correct, it's the variable's names that
30664         were misleading ;-) Make the code more readable.
30665
30666         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30667         the correct type etc.
30668
30669         (ConvertExplicit): Handle Enum types by examining the underlying type.
30670
30671 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30672
30673         * parameter.cs (GetCallingConvention): Always return
30674         CallingConventions.Standard for now.
30675
30676 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30677
30678         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30679         and `r' after calling DoNumericPromotions.
30680
30681         * ecore.cs: Fix error message (the types were in the wrong order).
30682
30683         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30684         BindingFlags.Instance as well 
30685
30686         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30687         implicit int literal conversion in an empty cast so that we
30688         propagate the right type upstream.
30689
30690         (UnboxCast): new class used to unbox value types.
30691         (Expression.ConvertExplicit): Add explicit type conversions done
30692         by unboxing.
30693
30694         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30695         the target type before applying the implicit LongLiterals to ULong
30696         literal cast.
30697
30698 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30699
30700         * cs-parser.jay (for_statement): Reworked the way For works: now
30701         we declare manually any variables that are introduced in
30702         for_initializer to solve the problem of having out-of-band code
30703         emition (that is what got for broken).
30704
30705         (declaration_statement): Perform the actual variable declaration
30706         that used to be done in local_variable_declaration here.
30707
30708         (local_variable_declaration): Do not declare anything, just pass
30709         the information on a DictionaryEntry
30710
30711 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30712
30713         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30714         re-write of the logic to now make it recursive.
30715
30716         (UpdateIndices): Re-write accordingly.
30717
30718         Store element data in a separate ArrayData list in the above methods.
30719
30720         (MakeByteBlob): Implement to dump the array data into a byte array.
30721
30722 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30723
30724         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30725         into CheckIndices.
30726
30727         * constant.cs (Define): Implement.
30728
30729         (EmitConstant): Re-write fully.
30730
30731         Pass in location info.
30732
30733         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30734         respectively.
30735
30736         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30737         DictionaryEntry since we need location info too.
30738
30739         (constant_declaration): Update accordingly.
30740
30741         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30742         code into another method : UpdateIndices.
30743
30744 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30745
30746         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30747         some type checking etc.
30748
30749 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30750
30751         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30752         bits to provide dimension info if the user skips doing that.
30753
30754         Update second constructor to store the rank correctly.
30755
30756 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30757
30758         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30759         and try to implement.
30760
30761         * ../errors/cs0150.cs : Add.
30762
30763         * ../errors/cs0178.cs : Add.
30764
30765 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30766
30767         * statement.cs: Implement foreach on multi-dimensional arrays. 
30768
30769         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30770         name of the params argument.
30771
30772         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30773         initializing the array.
30774
30775         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30776         we can use this elsewhere.
30777
30778         * statement.cs: Finish implementation of foreach for single
30779         dimension arrays.
30780
30781         * cs-parser.jay: Use an out-of-band stack to pass information
30782         around, I wonder why I need this.
30783
30784         foreach_block: Make the new foreach_block the current_block.
30785
30786         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30787         function used to return a static Parameters structure.  Used for
30788         empty parameters, as those are created very frequently.
30789
30790         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30791
30792 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30793
30794         * interface.cs : Default modifier is private, not public. The
30795         make verify test passes again.
30796
30797 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30798
30799         * support.cs (ReflectionParameters): Fix logic to determine
30800         whether the last parameter is a params one. Test 9 passes again.
30801
30802         * delegate.cs (Populate): Register the builders we define with
30803         RegisterParameterForBuilder. Test 19 passes again.
30804
30805         * cs-parser.jay (property_declaration): Reference $6 instead
30806         of $$ to get at the location.
30807
30808         (indexer_declaration): Similar stuff.
30809
30810         (attribute): Ditto.
30811
30812         * class.cs (Property): Register parameters for the Get and Set methods
30813         if they exist. Test 23 passes again.
30814
30815         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30816         call to EmitArguments as we are sure there aren't any params arguments. 
30817         Test 32 passes again.
30818
30819         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30820         IndexOutOfRangeException. 
30821
30822         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30823         Test 33 now passes again.
30824
30825 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30826
30827         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30828         broke a bunch of things.  Will have to come up with a better way
30829         of tracking locations.
30830
30831         * statement.cs: Implemented foreach for single dimension arrays.
30832
30833 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30834
30835         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30836         an error.  This removes the lookup from the critical path.
30837
30838         * cs-parser.jay: Removed use of temporary_loc, which is completely
30839         broken. 
30840
30841 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30842
30843         * support.cs (ReflectionParameters.ParameterModifier): Report
30844         whether the argument is a PARAMS argument or not.
30845
30846         * class.cs: Set the attribute `ParamArrayAttribute' on the
30847         parameter argument.
30848
30849         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30850         and cons_param_array_attribute (ConstructorInfo for
30851         ParamArrayAttribute)., 
30852
30853         * codegen.cs: Emit the return using the `Return' statement, that
30854         way we can report the error correctly for missing return values. 
30855
30856         * class.cs (Method.Emit): Clean up.
30857
30858         * expression.cs (Argument.Resolve): Take another argument: the
30859         location where this argument is used.  Notice that this is not
30860         part of the "Argument" class as to reduce the size of the
30861         structure (we know the approximate location anyways).
30862
30863         Test if the argument is a variable-reference, if not, then
30864         complain with a 206.
30865
30866         (Argument.Emit): Emit addresses of variables.
30867
30868         (Argument.FullDesc): Simplify.
30869
30870         (Invocation.DoResolve): Update for Argument.Resolve.
30871
30872         (ElementAccess.DoResolve): ditto.
30873
30874         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30875         method should be virtual, as this method is always virtual.
30876
30877         (NewDelegate.DoResolve): Update for Argument.Resolve.
30878
30879         * class.cs (ConstructorInitializer.DoResolve): ditto.
30880
30881         * attribute.cs (Attribute.Resolve): ditto.
30882
30883 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30884
30885         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30886
30887         * expression.cs (ParameterReference): Drop IStackStorage and implement
30888         IAssignMethod instead. 
30889
30890         (LocalVariableReference): ditto.
30891
30892         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30893         IAssignMethod instead. 
30894
30895 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30896
30897         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30898         enumerations that are used in heavily used structures derive from
30899         byte in a laughable and pathetic attempt to reduce memory usage.
30900         This is the kind of pre-optimzations that you should not do at
30901         home without adult supervision.
30902
30903         * expression.cs (UnaryMutator): New class, used to handle ++ and
30904         -- separatedly from the other unary operators.  Cleans up the
30905         code, and kills the ExpressionStatement dependency in Unary.
30906
30907         (Unary): Removed `method' and `Arguments' from this class, making
30908         it smaller, and moving it all to SimpleCall, so I can reuse this
30909         code in other locations and avoid creating a lot of transient data
30910         strucutres when not required.
30911
30912         * cs-parser.jay: Adjust for new changes.
30913
30914 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30915
30916         * enum.cs (Enum.Populate): If there is a failure during
30917         definition, return
30918
30919         * cs-parser.jay (opt_enum_base): we used to catch type errors
30920         here, but this is really incorrect.  The type error should be
30921         catched during semantic analysis.
30922
30923 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30924
30925         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30926         current_local_parameters as expected since I, in my stupidity, had forgotten
30927         to do this :-)
30928
30929         * attribute.cs (GetValidPlaces): Fix stupid bug.
30930
30931         * class.cs (Method::Emit): Perform check on applicability of attributes.
30932
30933         (Constructor::Emit): Ditto.
30934
30935         (Field::Emit): Ditto.
30936
30937         (Field.Location): Store location information.
30938
30939         (Property, Event, Indexer, Operator): Ditto.
30940
30941         * cs-parser.jay (field_declaration): Pass in location for each field.
30942
30943         * ../errors/cs0592.cs : Add.
30944
30945 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30946
30947         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30948
30949         (InitCoreTypes): Update accordingly.
30950
30951         (RegisterAttrType, LookupAttr): Implement.
30952
30953         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30954         info about the same.
30955
30956         (Resolve): Update to populate the above as necessary.
30957
30958         (Error592): Helper.
30959
30960         (GetValidPlaces): Helper to the above.
30961
30962         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30963
30964         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30965
30966 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30967
30968         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30969
30970         * ../errors/cs0617.cs : Add.
30971
30972 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30973
30974         * enum.cs (Emit): Rename to Populate to be more consistent with what
30975         we expect it to do and when exactly it is called.
30976
30977         * class.cs, rootcontext.cs : Update accordingly.
30978
30979         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30980         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30981
30982         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30983
30984         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30985         of a fieldinfo using the above, when dealing with a FieldBuilder.
30986
30987 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30988
30989         * ../errors/cs0031.cs : Add.
30990
30991         * ../errors/cs1008.cs : Add.
30992
30993         * ../errrors/cs0543.cs : Add.
30994
30995         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30996         enum type.
30997
30998         (FindMembers): Implement.
30999
31000         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
31001         enums and delegates too.
31002
31003         (enum_types): Rename to builder_to_enum.
31004
31005         (delegate_types): Rename to builder_to_delegate.
31006
31007         * delegate.cs (FindMembers): Implement.
31008
31009 2001-11-09  Ravi Pratap  <ravi@ximian.com>
31010
31011         * typemanager.cs (IsEnumType): Implement.
31012
31013         * enum.cs (Emit): Re-write parts to account for the underlying type
31014         better and perform checking etc.
31015
31016         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
31017         of the underlying type.
31018
31019         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
31020         value
31021
31022         * enum.cs (error31): Helper to report error #31.
31023
31024         * cs-parser.jay (enum_declaration): Store location of each member too.
31025
31026         * enum.cs (member_to_location): New hashtable. 
31027
31028         (AddEnumMember): Update location hashtable.
31029
31030         (Emit): Use the location of each member while reporting errors.
31031
31032 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
31033
31034         * cs-parser.jay: A for_initializer if is a
31035         local_variable_declaration really ammount to have an implicit
31036         block with the variable declaration and no initializer for for.
31037
31038         * statement.cs (For.Emit): Cope with null initializers.
31039
31040         This fixes the infinite loop on for initializers.
31041
31042 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
31043
31044         * enum.cs: More cleanup.
31045
31046         * ecore.cs: Remove dead code.
31047
31048         * class.cs (Property.Emit): More simplification.
31049         (Event.Emit): ditto.
31050
31051         Reworked to have less levels of indentation.
31052
31053 2001-11-08  Ravi Pratap  <ravi@ximian.com>
31054
31055         * class.cs (Property): Emit attributes.
31056
31057         (Field): Ditto.
31058
31059         (Event): Ditto.
31060
31061         (Indexer): Ditto.
31062
31063         (Operator): Ditto.
31064
31065         * enum.cs (Emit): Ditto.
31066
31067         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
31068         Enums too.
31069
31070         * class.cs (Field, Event, etc.): Move attribute generation into the
31071         Emit method everywhere.
31072
31073         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
31074         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
31075         as we had no way of defining nested enums !
31076
31077         * rootcontext.cs : Adjust code accordingly.
31078
31079         * typemanager.cs (AddEnumType): To keep track of enum types separately.
31080
31081 2001-11-07  Ravi Pratap  <ravi@ximian.com>
31082
31083         * expression.cs (EvalConstantExpression): Move into ecore.cs
31084
31085         * enum.cs (Enum): Rename some members and make them public and readonly
31086         according to our convention.
31087
31088         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
31089         nothing else.
31090
31091         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
31092
31093         (Enum::Emit): Write a simple version for now which doesn't try to compute
31094         expressions. I shall modify this to be more robust in just a while.
31095
31096         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
31097
31098         (TypeContainer::CloseType): Create the Enum types too.
31099
31100         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
31101
31102         * expression.cs (EvalConstantExpression): Get rid of completely.
31103
31104         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
31105         user-defined values and other cases.
31106
31107         (IsValidEnumLiteral): Helper function.
31108
31109         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
31110         out there in the case we had a literal FieldExpr.
31111
31112         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
31113
31114         (Literalize): Revamp a bit to take two arguments.
31115
31116         (EnumLiteral): New class which derives from Literal to wrap enum literals.
31117
31118 2001-11-06  Ravi Pratap  <ravi@ximian.com>
31119
31120         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
31121
31122         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
31123
31124         (Resolve): Use the above to ensure we have proper initializers.
31125
31126 2001-11-05  Ravi Pratap  <ravi@ximian.com>
31127
31128         * expression.cs (Expression::EvalConstantExpression): New method to 
31129         evaluate constant expressions.
31130
31131         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
31132
31133 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
31134
31135         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
31136         in an array.
31137
31138         (Binary.ResolveOperator): Handle operator != (object a, object b)
31139         and operator == (object a, object b);
31140
31141         (Binary.DoNumericPromotions): Indicate whether the numeric
31142         promotion was possible.
31143
31144         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
31145         Implement.  
31146
31147         Made the ArrayAccess implement interface IAssignMethod instead of
31148         IStackStore as the order in which arguments are passed reflects
31149         this.
31150
31151         * assign.cs: Instead of using expr.ExprClass to select the way of
31152         assinging, probe for the IStackStore/IAssignMethod interfaces.
31153
31154         * typemanager.cs: Load InitializeArray definition.
31155
31156         * rootcontext.cs (RootContext.MakeStaticData): Used to define
31157         static data that can be used to initialize arrays. 
31158
31159 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
31160
31161         * expression.cs: Handle operator== and operator!= for booleans.
31162
31163         (Conditioal.Reduce): Implement reducer for the ?: operator.
31164
31165         (Conditional.Resolve): Implement dead code elimination.
31166
31167         (Binary.Resolve): Catch string literals and return a new
31168         concatenated string.
31169
31170         (Unary.Reduce): Implement reduction of unary expressions.
31171
31172         * ecore.cs: Split out the expression core handling here.
31173
31174         (Expression.Reduce): New method used to perform constant folding
31175         and CSE.  This is needed to support constant-expressions. 
31176
31177         * statement.cs (Statement.EmitBoolExpression): Pass true and false
31178         targets, and optimize for !x.
31179
31180 2001-11-04  Ravi Pratap  <ravi@ximian.com>
31181
31182         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
31183         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
31184         set custom atttributes.
31185
31186         * literal.cs (Literal::GetValue): New abstract method to return the actual
31187         value of the literal, cast as an object.
31188
31189         (*Literal): Implement GetValue method.
31190
31191         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
31192         expressions to the arraylist but objects of type Argument.
31193
31194         * class.cs (TypeContainer::Emit): Emit our attributes too.
31195
31196         (Method::Emit, Constructor::Emit): Ditto.
31197
31198         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
31199         to be ignoring earlier.
31200
31201 2001-11-03  Ravi Pratap  <ravi@ximian.com>
31202
31203         * attribute.cs (AttributeSection::Define): Implement to do the business
31204         of constructing a CustomAttributeBuilder.
31205
31206         (Attribute): New trivial class. Increases readability of code.  
31207
31208         * cs-parser.jay : Update accordingly.
31209
31210         (positional_argument_list, named_argument_list, named_argument): New rules
31211
31212         (attribute_arguments): Use the above so that we are more correct.
31213
31214 2001-11-02  Ravi Pratap  <ravi@ximian.com>
31215
31216         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
31217         to perform all checks for a method with a params parameter.
31218
31219         (Invocation::OverloadResolve): Update to use the above method and therefore
31220         cope correctly with params method invocations.
31221
31222         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
31223         params too.
31224
31225         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
31226         constructors in our parent too because we can't afford to miss out on 
31227         protected ones ;-)
31228
31229         * attribute.cs (AttributeSection): New name for the class Attribute
31230
31231         Other trivial changes to improve readability.
31232
31233         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
31234         use the new class names.
31235
31236 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31237
31238         * class.cs (Method::Define): Complete definition for params types too
31239
31240         (Indexer::Define): Ditto.
31241
31242         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
31243         Cope everywhere with a request for info about the array parameter.
31244
31245 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31246
31247         * tree.cs (RecordNamespace): Fix up to check for the correct key.
31248
31249         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
31250         local_variable_type to extract the string corresponding to the type.
31251
31252         (local_variable_type): Fixup the action to use the new helper method.
31253
31254         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
31255         go.
31256
31257         * expression.cs : Clean out code which uses the above.
31258
31259 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31260
31261         * typemanager.cs (RegisterMethod): Check if we already have an existing key
31262         and bale out if necessary by returning a false.
31263
31264         (RegisterProperty): Ditto.
31265
31266         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
31267         and print out appropriate error messages.
31268
31269         * interface.cs (everywhere): Ditto.
31270
31271         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
31272         location to constructor.
31273
31274         * class.cs (Property, Event, Indexer): Update accordingly.
31275
31276         * ../errors/cs111.cs : Added.
31277
31278         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
31279         of a method, as laid down by the spec.
31280
31281         (Invocation::OverloadResolve): Use the above method.
31282
31283 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31284
31285         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
31286         now take a TypeContainer and a Parameters object.
31287
31288         (ParameterData): Modify return type of ParameterModifier method to be 
31289         Parameter.Modifier and not a string.
31290
31291         (ReflectionParameters, InternalParameters): Update accordingly.
31292
31293         * expression.cs (Argument::GetParameterModifier): Same here.
31294
31295         * support.cs (InternalParameters::ParameterType): Find a better way of determining
31296         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
31297         symbol in it at all so maybe this is only for now.
31298
31299 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31300
31301         * support.cs (InternalParameters): Constructor now takes an extra argument 
31302         which is the actual Parameters class.
31303
31304         (ParameterDesc): Update to provide info on ref/out modifiers.
31305
31306         * class.cs (everywhere): Update call to InternalParameters to pass in
31307         the second argument too.
31308
31309         * support.cs (ParameterData): Add ParameterModifier, which is a method 
31310         to return the modifier info [ref/out etc]
31311
31312         (InternalParameters, ReflectionParameters): Implement the above.
31313
31314         * expression.cs (Argument::ParameterModifier): Similar function to return
31315         info about the argument's modifiers.
31316
31317         (Invocation::OverloadResolve): Update to take into account matching modifiers 
31318         too.
31319
31320         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
31321         a new SetFormalParameters object which we pass to InternalParameters.
31322
31323 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31324
31325         * expression.cs (NewArray): Merge into the ArrayCreation class.
31326
31327 2001-10-29  Ravi Pratap  <ravi@ximian.com>
31328
31329         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
31330         NewUserdefinedArray into one as there wasn't much of a use in having
31331         two separate ones.
31332
31333         * expression.cs (Argument): Change field's name to ArgType from Type.
31334
31335         (Type): New readonly property which returns the proper type, taking into 
31336         account ref/out modifiers.
31337
31338         (everywhere): Adjust code accordingly for the above.
31339
31340         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
31341         whether we are emitting for a ref or out parameter.
31342
31343         * expression.cs (Argument::Emit): Use the above field to set the state.
31344
31345         (LocalVariableReference::Emit): Update to honour the flag and emit the
31346         right stuff.
31347
31348         * parameter.cs (Attributes): Set the correct flags for ref parameters.
31349
31350         * expression.cs (Argument::FullDesc): New function to provide a full desc.
31351
31352         * support.cs (ParameterData): Add method ParameterDesc to the interface.
31353
31354         (ReflectionParameters, InternalParameters): Implement the above method.
31355
31356         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
31357         reporting errors.
31358
31359         (Invocation::FullMethodDesc): Ditto. 
31360
31361 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
31362
31363         * cs-parser.jay: Add extra production for the second form of array
31364         creation. 
31365
31366         * expression.cs (ArrayCreation): Update to reflect the above
31367         change. 
31368
31369         * Small changes to prepare for Array initialization.
31370
31371 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
31372
31373         * typemanager.cs (ImplementsInterface): interface might be null;
31374         Deal with this problem;
31375
31376         Also, we do store negative hits on the cache (null values), so use
31377         this instead of calling t.GetInterfaces on the type everytime.
31378
31379 2001-10-28  Ravi Pratap  <ravi@ximian.com>
31380
31381         * typemanager.cs (IsBuiltinType): New method to help determine the same.
31382
31383         * expression.cs (New::DoResolve): Get rid of array creation code and instead
31384         split functionality out into different classes.
31385
31386         (New::FormArrayType): Move into NewBuiltinArray.
31387
31388         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
31389         quite useless.
31390
31391         (NewBuiltinArray): New class to handle creation of built-in arrays.
31392
31393         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
31394         account creation of one-dimensional arrays.
31395
31396         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
31397
31398         (NewUserdefinedArray::DoResolve): Implement.
31399
31400         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
31401
31402         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
31403         we maintain inside the TypeManager. This is necessary to perform lookups on the
31404         module builder.
31405
31406         (LookupType): Update to perform GetType on the module builders too.     
31407
31408         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31409
31410         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31411
31412 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31413
31414         * expression.cs (New::DoResolve): Implement guts of array creation.
31415
31416         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31417
31418 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31419
31420         * expression.cs: Fix bug I introduced lsat night that broke
31421         Delegates. 
31422
31423         (Expression.Resolve): Report a 246 error (can not resolve name)
31424         if we find a SimpleName in the stream.
31425
31426         (Expression.ResolveLValue): Ditto.
31427
31428         (Expression.ResolveWithSimpleName): This function is a variant of
31429         ResolveName, this one allows SimpleNames to be returned without a
31430         warning.  The only consumer of SimpleNames is MemberAccess
31431
31432 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31433
31434         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31435         might arrive here.  I have my doubts that this is correct.
31436
31437         * statement.cs (Lock): Implement lock statement.
31438
31439         * cs-parser.jay: Small fixes to support `lock' and `using'
31440
31441         * cs-tokenizer.cs: Remove extra space
31442
31443         * driver.cs: New flag --checked, allows to turn on integer math
31444         checking. 
31445
31446         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31447         Threading.Monitor.Exit 
31448
31449 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31450
31451         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31452         Expression Class to be IndexerAccess.
31453
31454         Notice that Indexer::DoResolve sets the eclass to Value.
31455
31456 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31457
31458         * class.cs (TypeContainer::Emit): Emit code for indexers.
31459
31460         * assign.cs (IAssignMethod): New interface implemented by Indexers
31461         and Properties for handling assignment.
31462
31463         (Assign::Emit): Simplify and reuse code. 
31464
31465         * expression.cs (IndexerAccess, PropertyExpr): Implement
31466         IAssignMethod, clean up old code. 
31467
31468 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31469
31470         * typemanager.cs (ImplementsInterface): New method to determine if a type
31471         implements a given interface. Provides a nice cache too.
31472
31473         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31474         method.
31475
31476         (ConvertReferenceExplicit): Ditto.
31477
31478         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31479         various methods, with correct names etc.
31480
31481         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31482         Operator.UnaryNegation.
31483
31484         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31485         we have a unary plus or minus operator.
31486
31487         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31488         UnaryMinus.
31489
31490         * everywhere : update accordingly.
31491
31492         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31493         respectively.
31494
31495         * class.cs (Method::Define): For the case where we are implementing a method
31496         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31497         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31498
31499 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31500
31501         * interface.cs (FindMembers): Implement to work around S.R.E
31502         lameness.
31503
31504         * typemanager.cs (IsInterfaceType): Implement.
31505
31506         (FindMembers): Update to handle interface types too.
31507
31508         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31509         use IsAssignableFrom as that is not correct - it doesn't work.
31510
31511         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31512         and accordingly override EmitStatement.
31513
31514         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31515         using the correct logic :-)
31516
31517 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31518
31519         * ../errors/cs-11.cs : Add to demonstrate error -11 
31520
31521 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31522
31523         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31524         then pass this as a hint to ResolveLValue.
31525
31526         * expression.cs (FieldExpr): Add Location information
31527
31528         (FieldExpr::LValueResolve): Report assignment to readonly
31529         variable. 
31530
31531         (Expression::ExprClassFromMemberInfo): Pass location information.
31532
31533         (Expression::ResolveLValue): Add new method that resolves an
31534         LValue. 
31535
31536         (Expression::DoResolveLValue): Default invocation calls
31537         DoResolve. 
31538
31539         (Indexers): New class used to keep track of indexers in a given
31540         Type. 
31541
31542         (IStackStore): Renamed from LValue, as it did not really describe
31543         what this did.  Also ResolveLValue is gone from this interface and
31544         now is part of Expression.
31545
31546         (ElementAccess): Depending on the element access type
31547
31548         * typemanager.cs: Add `indexer_name_type' as a Core type
31549         (System.Runtime.CompilerServices.IndexerNameAttribute)
31550
31551         * statement.cs (Goto): Take a location.
31552
31553 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31554
31555         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31556         if two delegates are compatible.
31557
31558         (NewDelegate::DoResolve): Update to take care of the case when
31559         we instantiate a delegate from another delegate.
31560
31561         * typemanager.cs (FindMembers): Don't even try to look up members
31562         of Delegate types for now.
31563
31564 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31565
31566         * delegate.cs (NewDelegate): New class to take care of delegate
31567         instantiation.
31568
31569         * expression.cs (New): Split the delegate related code out into 
31570         the NewDelegate class.
31571
31572         * delegate.cs (DelegateInvocation): New class to handle delegate 
31573         invocation.
31574
31575         * expression.cs (Invocation): Split out delegate related code into
31576         the DelegateInvocation class.
31577
31578 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31579
31580         * expression.cs (New::DoResolve): Implement delegate creation fully
31581         and according to the spec.
31582
31583         (New::DoEmit): Update to handle delegates differently.
31584
31585         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31586         because of which we were printing out arguments in reverse order !
31587
31588         * delegate.cs (VerifyMethod): Implement to check if the given method
31589         matches the delegate.
31590
31591         (FullDelegateDesc): Implement.
31592
31593         (VerifyApplicability): Implement.
31594
31595         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31596         delegate invocations too.
31597
31598         (Invocation::Emit): Ditto.
31599
31600         * ../errors/cs1593.cs : Added.
31601
31602         * ../errors/cs1594.cs : Added.
31603
31604         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31605
31606 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31607
31608         * typemanager.cs (intptr_type): Core type for System.IntPtr
31609
31610         (InitCoreTypes): Update for the same.
31611
31612         (iasyncresult_type, asynccallback_type): Ditto.
31613
31614         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31615         correct.
31616
31617         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31618         too.
31619
31620         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31621         the builders for the 4 members of a delegate type :-)
31622
31623         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31624         type.
31625
31626         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31627
31628         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31629
31630 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31631
31632         * statement.cs (Break::Emit): Implement.   
31633         (Continue::Emit): Implement.
31634
31635         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31636         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31637         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31638         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31639         end loop
31640
31641         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31642         properties that track the label for the current loop (begin of the
31643         loop and end of the loop).
31644
31645 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31646
31647         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31648         use of emitting anything at all.
31649
31650         * class.cs, rootcontext.cs : Get rid of calls to the same.
31651
31652         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31653
31654         (Populate): Define the constructor correctly and set the implementation
31655         attributes.
31656
31657         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31658         have been defined.
31659
31660         (AddDelegateType): Implement.
31661
31662         (IsDelegateType): Implement helper method.
31663
31664         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31665
31666         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31667         and accordingly handle it.
31668
31669         * delegate.cs (Populate): Take TypeContainer argument.
31670         Implement bits to define the Invoke method. However, I still haven't figured out
31671         how to take care of the native int bit :-(
31672
31673         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31674         Qualify the name of the delegate, not its return type !
31675
31676         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31677         conversion.
31678
31679         (StandardConversionExists): Checking for array types turns out to be recursive.
31680
31681         (ConvertReferenceExplicit): Implement array conversion.
31682
31683         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31684
31685 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31686
31687         * cs-parser.jay (delegate_declaration): Store the fully qualified
31688         name as it is a type declaration.
31689
31690         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31691         readonly.
31692
31693         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31694         as TypeContainer::DefineType.
31695
31696         (Populate): Method in which all the definition of the various methods (Invoke)
31697         etc is done.
31698
31699         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31700         see.
31701
31702         (CloseDelegate): Finally creates the delegate.
31703
31704         * class.cs (TypeContainer::DefineType): Update to define delegates.
31705         (Populate, Emit and CloseType): Do the same thing here too.
31706
31707         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31708         delegates in all these operations.
31709
31710 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31711
31712         * expression.cs: LocalTemporary: a new expression used to
31713         reference a temporary that has been created.
31714
31715         * assign.cs: Handle PropertyAccess back here, so that we can
31716         provide the proper semantic access to properties.
31717
31718         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31719         a few more explicit conversions. 
31720
31721         * modifiers.cs: `NEW' modifier maps to HideBySig.
31722
31723         * expression.cs (PropertyExpr): Make this into an
31724         ExpressionStatement, and support the EmitStatement code path. 
31725
31726         Perform get/set error checking, clean up the interface.
31727
31728         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31729         them into toplevel access objects.
31730
31731 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31732
31733         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31734         SRE.
31735
31736         * typemanager.cs: Keep track here of our PropertyBuilders again to
31737         work around lameness in SRE.
31738
31739 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31740
31741         * expression.cs (LValue::LValueResolve): New method in the
31742         interface, used to perform a second resolution pass for LValues. 
31743
31744         (This::DoResolve): Catch the use of this in static methods.
31745
31746         (This::LValueResolve): Implement.
31747
31748         (This::Store): Remove warning, assigning to `this' in structures
31749         is 
31750
31751         (Invocation::Emit): Deal with invocation of
31752         methods on value types.  We need to pass the address to structure
31753         methods rather than the object itself.  (The equivalent code to
31754         emit "this" for structures leaves the entire structure on the
31755         stack instead of a pointer to it). 
31756
31757         (ParameterReference::DoResolve): Compute the real index for the
31758         argument based on whether the method takes or not a `this' pointer
31759         (ie, the method is static).
31760
31761         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31762         value types returned from functions when we need to invoke a
31763         method on the sturcture.
31764
31765
31766 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31767
31768         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31769         defining the type in the Modulebuilder or Typebuilder. This is to take
31770         care of nested types which need to be defined on the TypeBuilder using
31771         DefineNestedMethod.
31772
31773         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31774         methods in RootContext, only ported to be part of TypeContainer.
31775
31776         (TypeContainer::GetInterfaceOrClass): Ditto.
31777
31778         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31779
31780         * interface.cs (Interface::DefineInterface): New method. Does exactly
31781         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31782         too.
31783
31784         (Interface::GetInterfaces): Move from RootContext here and port.
31785
31786         (Interface::GetInterfaceByName): Same here.
31787
31788         * rootcontext.cs (ResolveTree): Re-write.
31789
31790         (PopulateTypes): Re-write.
31791
31792         * class.cs (TypeContainer::Populate): Populate nested types too.
31793         (TypeContainer::Emit): Emit nested members too.
31794
31795         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31796         instead just use the name argument passed in as it is already fully
31797         qualified.
31798
31799         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31800         to TypeContainer mapping to see if a type is user-defined.
31801
31802         * class.cs (TypeContainer::CloseType): Implement. 
31803
31804         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31805         the default constructor.
31806
31807         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31808         twice.
31809
31810         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31811
31812         * interface.cs (CloseType): Create the type here.
31813
31814         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31815         the hierarchy.
31816
31817         Remove all the methods which are now in TypeContainer.
31818
31819 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31820
31821         * delegate.cs (Define): Re-write bits to define the delegate
31822         correctly.
31823
31824 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31825
31826         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31827
31828         * expression.cs (ImplicitReferenceConversion): handle null as well
31829         as a source to convert to any reference type.
31830
31831         * statement.cs (Return): Perform any implicit conversions to
31832         expected return type.  
31833
31834         Validate use of return statement.  
31835
31836         * codegen.cs (EmitContext): Pass the expected return type here.
31837
31838         * class.cs (Method, Constructor, Property): Pass expected return
31839         type to EmitContext.
31840
31841 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31842
31843         * expression.cs: Make DoResolve take an EmitContext instead of a
31844         TypeContainer.
31845
31846         Replaced `l' and `location' for `loc', for consistency.
31847
31848         (Error, Warning): Remove unneeded Tc argument.
31849
31850         * assign.cs, literal.cs, constant.cs: Update to new calling
31851         convention. 
31852
31853         * codegen.cs: EmitContext now contains a flag indicating whether
31854         code is being generated in a static method or not.
31855
31856         * cs-parser.jay: DecomposeQI, new function that replaces the old
31857         QualifiedIdentifier.  Now we always decompose the assembled
31858         strings from qualified_identifier productions into a group of
31859         memberaccesses.
31860
31861 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31862
31863         * rootcontext.cs: Deal with field-less struct types correctly now
31864         by passing the size option to Define Type.
31865
31866         * class.cs: Removed hack that created one static field. 
31867
31868 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31869
31870         * statement.cs: Moved most of the code generation here. 
31871
31872 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31873
31874         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31875         seem very right.
31876
31877         (ElementAccess): Remove useless bits for now - keep checks as the spec
31878         says.
31879
31880 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31881
31882         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31883         and start performing checks according to the spec.
31884
31885 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31886
31887         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31888         rank_specifiers instead.
31889
31890         (rank_specifiers): Change the order in which the rank specifiers are stored
31891
31892         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31893
31894         * expression.cs (ElementAccess): Implement the LValue interface too.
31895
31896 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31897
31898         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31899         except that user defined conversions are not included.
31900
31901         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31902         perform the conversion of the return type, if necessary.
31903
31904         (New::DoResolve): Check whether we are creating an array or an object
31905         and accordingly do the needful.
31906
31907         (New::Emit): Same here.
31908
31909         (New::DoResolve): Implement guts of array creation.
31910
31911         (New::FormLookupType): Helper function.
31912
31913 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31914
31915         * codegen.cs: Removed most of the code generation here, and move the
31916         corresponding code generation bits to the statement classes. 
31917
31918         Added support for try/catch/finalize and throw.
31919
31920         * cs-parser.jay: Added support for try/catch/finalize.
31921
31922         * class.cs: Catch static methods having the flags override,
31923         virtual or abstract.
31924
31925         * expression.cs (UserCast): This user cast was not really doing
31926         what it was supposed to do.  Which is to be born in fully resolved
31927         state.  Parts of the resolution were being performed at Emit time! 
31928
31929         Fixed this code.
31930
31931 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31932
31933         * expression.cs: Implicity convert the result from UserCast.
31934
31935 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31936
31937         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31938         prevented it from working correctly. 
31939
31940         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31941         merely ConvertImplicit.
31942
31943 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31944
31945         * typemanager.cs: Make the LookupTypeContainer function static,
31946         and not per-instance.  
31947
31948         * class.cs: Make static FindMembers (the one that takes a Type
31949         argument). 
31950
31951         * codegen.cs: Add EmitForeach here.
31952
31953         * cs-parser.jay: Make foreach a toplevel object instead of the
31954         inline expansion, as we need to perform semantic analysis on it. 
31955
31956 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31957
31958         * expression.cs (Expression::ImplicitUserConversion): Rename to
31959         UserDefinedConversion.
31960
31961         (Expression::UserDefinedConversion): Take an extra argument specifying 
31962         whether we look for explicit user conversions too.
31963
31964         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31965
31966         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31967
31968         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31969         with the appropriate arguments.
31970
31971         * cs-parser.jay (cast_expression): Record location too.
31972
31973         * expression.cs (Cast): Record location info.
31974
31975         (Expression::ConvertExplicit): Take location argument.
31976
31977         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31978         to determine if we are doing explicit conversions.
31979
31980         (UserCast::Emit): Update accordingly.
31981
31982         (Expression::ConvertExplicit): Report an error if everything fails.
31983
31984         * ../errors/cs0030.cs : Add.
31985
31986 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31987
31988         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31989         virtual and newslot bits. 
31990
31991         * class.cs (TypeContainer::RegisterRequiredImplementations):
31992         Record methods we need.
31993
31994         (TypeContainer::MakeKey): Helper function to make keys for
31995         MethodBases, since the Methodbase key is useless.
31996
31997         (TypeContainer::Populate): Call RegisterRequiredImplementations
31998         before defining the methods.   
31999
32000         Create a mapping for method_builders_to_methods ahead of time
32001         instead of inside a tight loop.
32002
32003         (::RequireMethods):  Accept an object as the data to set into the
32004         hashtable so we can report interface vs abstract method mismatch.
32005
32006 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
32007
32008         * report.cs: Make all of it static.
32009
32010         * rootcontext.cs: Drop object_type and value_type computations, as
32011         we have those in the TypeManager anyways.
32012
32013         Drop report instance variable too, now it is a global.
32014
32015         * driver.cs: Use try/catch on command line handling.
32016
32017         Add --probe option to debug the error reporting system with a test
32018         suite. 
32019
32020         * report.cs: Add support for exiting program when a probe
32021         condition is reached.
32022
32023 2001-10-03  Ravi Pratap  <ravi@ximian.com>
32024
32025         * expression.cs (Binary::DoNumericPromotions): Fix the case when
32026         we do a forcible conversion regardless of type, to check if 
32027         ForceConversion returns a null.
32028
32029         (Binary::error19): Use location to report error.
32030
32031         (Unary::error23): Use location here too.
32032
32033         * ../errors/cs0019.cs : Check in.
32034
32035         * ../errors/cs0023.cs : Check in.
32036
32037         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
32038         case of a non-null MethodInfo object with a length of 0 !
32039
32040         (Binary::ResolveOperator): Flag error if overload resolution fails to find
32041         an applicable member - according to the spec :-)
32042         Also fix logic to find members in base types.
32043
32044         (Unary::ResolveOperator): Same here.
32045
32046         (Unary::report23): Change name to error23 and make first argument a TypeContainer
32047         as I was getting thoroughly confused between this and error19 :-)
32048
32049         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
32050         (::FindMostEncompassedType): Implement.
32051         (::FindMostEncompassingType): Implement.
32052         (::StandardConversionExists): Implement.
32053
32054         (UserImplicitCast): Re-vamp. We now need info about most specific
32055         source and target types so that we can do the necessary conversions.
32056
32057         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
32058         mathematical union with no duplicates.
32059
32060 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
32061
32062         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
32063         in order from base classes to child classes, so that we can in
32064         child classes look up in our parent for method names and
32065         attributes (required for handling abstract, virtual, new, override
32066         constructs: we need to instrospect our base class, and if we dont
32067         populate the classes in order, the introspection might be
32068         incorrect.  For example, a method could query its parent before
32069         the parent has any methods and would determine that the parent has
32070         no abstract methods (while it could have had them)).
32071
32072         (RootContext::CreateType): Record the order in which we define the
32073         classes.
32074
32075 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
32076
32077         * class.cs (TypeContainer::Populate): Also method definitions can
32078         fail now, keep track of this.
32079
32080         (TypeContainer::FindMembers): Implement support for
32081         DeclaredOnly/noDeclaredOnly flag.
32082
32083         (Constructor::Emit) Return the ConstructorBuilder.
32084
32085         (Method::Emit) Return the MethodBuilder. 
32086         Check for abstract or virtual methods to be public.
32087
32088         * rootcontext.cs (RootContext::CreateType): Register all the
32089         abstract methods required for the class to be complete and the
32090         interface methods that must be implemented. 
32091
32092         * cs-parser.jay: Report error 501 (method requires body if it is
32093         not marked abstract or extern).
32094
32095         * expression.cs (TypeOf::Emit): Implement.
32096
32097         * typemanager.cs: runtime_handle_type, new global type.
32098
32099         * class.cs (Property::Emit): Generate code for properties.
32100
32101 2001-10-02  Ravi Pratap  <ravi@ximian.com>
32102
32103         * expression.cs (Unary::ResolveOperator): Find operators on base type
32104         too - we now conform exactly to the spec.
32105
32106         (Binary::ResolveOperator): Same here.
32107
32108         * class.cs (Operator::Define): Fix minor quirk in the tests.
32109
32110         * ../errors/cs0215.cs : Added.
32111
32112         * ../errors/cs0556.cs : Added.
32113
32114         * ../errors/cs0555.cs : Added.
32115
32116 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
32117
32118         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
32119         single integer which is really efficient
32120
32121 2001-10-01  Ravi Pratap  <ravi@ximian.com>
32122
32123         *  expression.cs (Expression::ImplicitUserConversion): Use location
32124         even in the case when we are examining True operators.
32125  
32126         * class.cs (Operator::Define): Perform extensive checks to conform
32127         with the rules for operator overloading in the spec.
32128
32129         * expression.cs (Expression::ImplicitReferenceConversion): Implement
32130         some of the other conversions mentioned in the spec.
32131
32132         * typemanager.cs (array_type): New static member for the System.Array built-in
32133         type.
32134
32135         (cloneable_interface): For System.ICloneable interface.
32136
32137         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
32138         we start resolving the tree and populating types.
32139
32140         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
32141  
32142 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
32143
32144         * expression.cs (Expression::ExprClassFromMemberInfo,
32145         Expression::Literalize): Create literal expressions from
32146         FieldInfos which are literals.
32147
32148         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
32149         type casts, because they were wrong.  The test suite in tests
32150         caught these ones.
32151
32152         (ImplicitNumericConversion): ushort to ulong requires a widening
32153         cast. 
32154
32155         Int32 constant to long requires widening cast as well.
32156
32157         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
32158         for integers because the type on the stack is not i4.
32159
32160 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
32161
32162         * expression.cs (report118): require location argument. 
32163
32164         * parameter.cs: Do not dereference potential null value.
32165
32166         * class.cs: Catch methods that lack the `new' keyword when
32167         overriding a name.  Report warnings when `new' is used without
32168         anything being there to override.
32169
32170         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
32171
32172         * class.cs: Only add constructor to hashtable if it is non-null
32173         (as now constructors can fail on define).
32174
32175         (TypeManager, Class, Struct): Take location arguments.
32176
32177         Catch field instance initialization in structs as errors.
32178
32179         accepting_filter: a new filter for FindMembers that is static so
32180         that we dont create an instance per invocation.
32181
32182         (Constructor::Define): Catch errors where a struct constructor is
32183         parameterless 
32184
32185         * cs-parser.jay: Pass location information for various new
32186         constructs. 
32187
32188         * delegate.cs (Delegate): take a location argument.
32189
32190         * driver.cs: Do not call EmitCode if there were problesm in the
32191         Definition of the types, as many Builders wont be there. 
32192
32193         * decl.cs (Decl::Decl): Require a location argument.
32194
32195         * cs-tokenizer.cs: Handle properly hex constants that can not fit
32196         into integers, and find the most appropiate integer for it.
32197
32198         * literal.cs: Implement ULongLiteral.
32199
32200         * rootcontext.cs: Provide better information about the location of
32201         failure when CreateType fails.
32202
32203 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
32204
32205         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
32206         as well.
32207
32208         * expression.cs (Binary::CheckShiftArguments): Add missing type
32209         computation.
32210         (Binary::ResolveOperator): Add type to the logical and and logical
32211         or, Bitwise And/Or and Exclusive Or code paths, it was missing
32212         before.
32213
32214         (Binary::DoNumericPromotions): In the case where either argument
32215         is ulong (and most signed types combined with ulong cause an
32216         error) perform implicit integer constant conversions as well.
32217
32218 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32219
32220         * expression.cs (UserImplicitCast): Method should always be
32221         non-null. 
32222         (Invocation::BetterConversion): Simplified test for IntLiteral.
32223
32224         (Expression::ImplicitNumericConversion): Split this routine out.
32225         Put the code that performs implicit constant integer conversions
32226         here. 
32227
32228         (Expression::Resolve): Become a wrapper around DoResolve so we can
32229         check eclass and type being set after resolve.
32230
32231         (Invocation::Badness): Remove this dead function
32232
32233         (Binary::ResolveOperator): Do not compute the expensive argumnets
32234         unless we have a union for it.
32235
32236         (Probe::Emit): Is needs to do an isinst and then
32237         compare against null.
32238
32239         (::CanConvert): Added Location argument.  If the Location argument
32240         is null (Location.Null), then we do not report errors.  This is
32241         used by the `probe' mechanism of the Explicit conversion.  We do
32242         not want to generate an error for something that the user
32243         explicitly requested to be casted.  But the pipeline for an
32244         explicit cast first tests for potential implicit casts.
32245
32246         So for now, if the Location is null, it means `Probe only' to
32247         avoid adding another argument.   Might have to revise this
32248         strategy later.
32249
32250         (ClassCast): New class used to type cast objects into arbitrary
32251         classes (used in Explicit Reference Conversions).
32252
32253         Implement `as' as well.
32254
32255         Reverted all the patches from Ravi below: they were broken:
32256
32257                 * The use of `level' as a mechanism to stop recursive
32258                   invocations is wrong.  That was there just to catch the
32259                   bug with a strack trace but not as a way of addressing
32260                   the problem.
32261
32262                   To fix the problem we have to *understand* what is going
32263                   on and the interactions and come up with a plan, not
32264                   just get things going.
32265
32266                 * The use of the type conversion cache that I proposed
32267                   last night had an open topic: How does this work across
32268                   protection domains.  A user defined conversion might not
32269                   be public in the location where we are applying the
32270                   conversion, a different conversion might be selected
32271                   (ie, private A->B (better) but public B->A (worse),
32272                   inside A, A->B applies, but outside it, B->A will
32273                   apply).
32274
32275                 * On top of that (ie, even if the above is solved),
32276                   conversions in a cache need to be abstract.  Ie, `To
32277                   convert from an Int to a Short use an OpcodeCast', not
32278                   `To convert from an Int to a Short use the OpcodeCast on
32279                   the variable 5' (which is what this patch was doing).
32280
32281 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32282
32283         * expression.cs (Invocation::ConversionExists): Re-write to use
32284         the conversion cache
32285
32286         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
32287         cache all conversions done, not just user-defined ones.
32288
32289         (Invocation::BetterConversion): The real culprit. Use ConversionExists
32290         to determine if a conversion exists instead of acutually trying to 
32291         perform the conversion. It's faster too.
32292
32293         (Expression::ConvertExplicit): Modify to use ConversionExists to check
32294         and only then attempt the implicit conversion.
32295
32296 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32297
32298         * expression.cs (ConvertImplicit): Use a cache for conversions
32299         already found. Check level of recursion and bail out if necessary.
32300
32301 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32302
32303         * typemanager.cs (string_concat_string_string, string_concat_object_object):
32304         Export standard methods that we expect for string operations.
32305
32306         * statement.cs (Block::UsageWarning): Track usage of variables and
32307         report the errors for not used variables.
32308
32309         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
32310         operator. 
32311
32312 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32313
32314         * codegen.cs: remove unnneded code 
32315
32316         * expression.cs: Removed BuiltinTypeAccess class
32317
32318         Fix the order in which implicit conversions are
32319         done.  
32320
32321         The previous fixed dropped support for boxed conversions (adding a
32322         test to the test suite now)
32323
32324         (UserImplicitCast::CanConvert): Remove test for source being null,
32325         that code is broken.  We should not feed a null to begin with, if
32326         we do, then we should track the bug where the problem originates
32327         and not try to cover it up here.
32328
32329         Return a resolved expression of type UserImplicitCast on success
32330         rather than true/false.  Ravi: this is what I was talking about,
32331         the pattern is to use a static method as a "constructor" for
32332         objects. 
32333
32334         Also, do not create arguments until the very last minute,
32335         otherwise we always create the arguments even for lookups that
32336         will never be performed. 
32337
32338         (UserImplicitCast::Resolve): Eliminate, objects of type
32339         UserImplicitCast are born in a fully resolved state. 
32340
32341         * typemanager.cs (InitCoreTypes): Init also value_type
32342         (System.ValueType). 
32343
32344         * expression.cs (Cast::Resolve): First resolve the child expression.
32345
32346         (LValue): Add new method AddressOf to be used by
32347         the `&' operator.  
32348
32349         Change the argument of Store to take an EmitContext instead of an
32350         ILGenerator, because things like FieldExpr need to be able to call
32351         their children expression to generate the instance code. 
32352
32353         (Expression::Error, Expression::Warning): Sugar functions for
32354         reporting errors.
32355
32356         (Expression::MemberLookup): Accept a TypeContainer instead of a
32357         Report as the first argument.
32358
32359         (Expression::ResolvePrimary): Killed.  I still want to improve
32360         this as currently the code is just not right.
32361
32362         (Expression::ResolveMemberAccess): Simplify, but it is still
32363         wrong. 
32364
32365         (Unary::Resolve): Catch errors in AddressOf operators.
32366
32367         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
32368         index to a byte for the short-version, or the compiler will choose
32369         the wrong Emit call, which generates the wrong data.
32370
32371         (ParameterReference::Emit, ::Store): same.
32372
32373         (FieldExpr::AddressOf): Implement.
32374
32375         * typemanager.cs: TypeManager: made public variable instead of
32376         property.
32377
32378         * driver.cs: document --fatal.
32379
32380         * report.cs (ErrorMessage, WarningMessage): new names for the old
32381         Error and Warning classes.
32382
32383         * cs-parser.jay (member_access): Turn built-in access to types
32384         into a normal simplename
32385
32386 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32387
32388         * expression.cs (Invocation::BetterConversion): Fix to cope
32389         with q being null, since this was introducing a bug.
32390
32391         * expression.cs (ConvertImplicit): Do built-in conversions first.
32392
32393 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32394
32395         * expression.cs (UserImplicitCast::Resolve): Fix bug.
32396
32397 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32398
32399         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
32400         I had introduced long ago (what's new ?).
32401
32402         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
32403         the work of all the checking. 
32404         (ConvertImplicit): Call CanConvert and only then create object if necessary.
32405         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
32406
32407         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32408         that is the right way. 
32409
32410         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32411         overloading resolution. Use everywhere instead of cutting and pasting code.
32412
32413         (Binary::ResolveOperator): Use MakeUnionSet.
32414
32415         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32416         we have to convert to bool types. Not complete yet.
32417
32418 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32419
32420         * typemanager.cs (TypeManager::CSharpName): support ushort.
32421
32422         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32423         to provide an expression that performsn an implicit constant int
32424         conversion (section 6.1.6).
32425         (Expression::ConvertImplicitRequired): Reworked to include
32426         implicit constant expression conversions.
32427
32428         (Expression::ConvertNumericExplicit): Finished.
32429
32430         (Invocation::Emit): If InstanceExpression is null, then it means
32431         that we perform a call on this.
32432
32433 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32434
32435         * expression.cs (Unary::Emit): Remove some dead code.
32436         (Probe): Implement Resolve and Emit for `is'.
32437         (Expression::ConvertImplicitRequired): Attempt to do constant
32438         expression conversions here.  Maybe should be moved to
32439         ConvertImplicit, but I am not sure.
32440         (Expression::ImplicitLongConstantConversionPossible,
32441         Expression::ImplicitIntConstantConversionPossible): New functions
32442         that tell whether is it possible to apply an implicit constant
32443         expression conversion.
32444
32445         (ConvertNumericExplicit): Started work on explicit numeric
32446         conversions.
32447
32448         * cs-parser.jay: Update operator constants.
32449
32450         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32451         (Parameters::GetSignature): Hook up VerifyArgs here.
32452         (Parameters::VerifyArgs): Verifies that no two arguments have the
32453         same name. 
32454
32455         * class.cs (Operator): Update the operator names to reflect the
32456         ones that the spec expects (as we are just stringizing the
32457         operator names).
32458
32459         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32460         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32461         previous usage did only work for our methods.
32462         (Expression::ConvertImplicit): Handle decimal implicit numeric
32463         conversions as well.
32464         (Expression::InternalTypeConstructor): Used to invoke constructors
32465         on internal types for default promotions.
32466
32467         (Unary::Emit): Implement special handling for the pre/post
32468         increment/decrement for overloaded operators, as they need to have
32469         the same semantics as the other operators.
32470
32471         (Binary::ResolveOperator): ditto.
32472         (Invocation::ConversionExists): ditto.
32473         (UserImplicitCast::Resolve): ditto.
32474
32475 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32476
32477         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32478         operator, return after emitting body. Regression tests pass again !
32479
32480         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32481         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32482         (Invocation::OverloadResolve): Ditto.
32483         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32484
32485         * everywhere : update calls to the above methods accordingly.
32486
32487 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32488
32489         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32490
32491         * expression.cs (ExpressionStatement): New base class used for
32492         expressions that can appear in statements, so that we can provide
32493         an alternate path to generate expression that do not leave a value
32494         on the stack.
32495
32496         (Expression::Emit, and all the derivatives): We no longer return
32497         whether a value is left on the stack or not.  Every expression
32498         after being emitted leaves a single value on the stack.
32499
32500         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32501         facilties of ExpressionStatement if possible.
32502
32503         * cs-parser.jay: Update statement_expression.
32504
32505 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32506
32507         * driver.cs: Change the wording of message
32508
32509 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32510
32511         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32512         the type of the expression to the return type of the method if
32513         we have an overloaded operator match ! The regression tests pass again !
32514         (Unary::ResolveOperator): Ditto.
32515
32516         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32517         to find "op_Implicit", not "implicit" ;-)
32518         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32519         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32520
32521         * everywhere : Correct calls to the above accordingly.
32522
32523         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32524         (ConvertImplicit): Do user-defined conversion if it exists.
32525
32526 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32527
32528         * assign.cs: track location.
32529         (Resolve): Use implicit conversions on assignment.
32530
32531         * literal.cs: Oops.  Not good, Emit of short access values should
32532         pass (Bytes) or the wrong argument will be selected.
32533
32534         * expression.cs (Unary::Emit): Emit code for -expr.
32535
32536         (Unary::ResolveOperator): Handle `Substract' for non-constants
32537         (substract from zero from the non-constants).
32538         Deal with Doubles as well. 
32539
32540         (Expression::ConvertImplicitRequired): New routine that reports an
32541         error if no implicit conversion exists. 
32542
32543         (Invocation::OverloadResolve): Store the converted implicit
32544         expressions if we make them
32545
32546 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32547
32548         * class.cs (ConstructorInitializer): Take a Location argument.
32549         (ConstructorBaseInitializer): Same here.
32550         (ConstructorThisInitializer): Same here.
32551
32552         * cs-parser.jay : Update all calls accordingly.
32553
32554         * expression.cs (Unary, Binary, New): Take location argument.
32555         Update accordingly everywhere.
32556
32557         * cs-parser.jay : Update all calls to the above to take a location
32558         argument.
32559
32560         * class.cs : Ditto.
32561
32562 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32563
32564         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32565         (Invocation::BetterConversion): Same here
32566         (Invocation::ConversionExists): Ditto.
32567
32568         (Invocation::ConversionExists): Implement.
32569
32570 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32571
32572         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32573         Also take an additional TypeContainer argument.
32574
32575         * All over : Pass in TypeContainer as argument to OverloadResolve.
32576
32577         * typemanager.cs (CSharpName): Update to check for the string type and return
32578         that too.
32579
32580         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32581         a given method.
32582
32583 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32584
32585         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32586         (Invocation::BetterFunction): Implement.
32587         (Invocation::BetterConversion): Implement.
32588         (Invocation::ConversionExists): Skeleton, no implementation yet.
32589
32590         Okay, things work fine !
32591
32592 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32593
32594         * typemanager.cs: declare and load enum_type, delegate_type and
32595         void_type. 
32596
32597         * expression.cs (Expression::Emit): Now emit returns a value that
32598         tells whether a value is left on the stack or not.  This strategy
32599         might be reveted tomorrow with a mechanism that would address
32600         multiple assignments.
32601         (Expression::report118): Utility routine to report mismatches on
32602         the ExprClass.
32603
32604         (Unary::Report23): Report impossible type/operator combination
32605         utility function.
32606
32607         (Unary::IsIncrementableNumber): Whether the type can be
32608         incremented or decremented with add.
32609         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32610         complemented. 
32611         (Unary::ResolveOperator): Implement ++, !, ~,
32612
32613         (Invocation::Emit): Deal with new Emit convetion.
32614
32615         * All Expression derivatives: Updated their Emit method to return
32616         whether they leave values on the stack or not.
32617
32618         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32619         stack for expressions that are statements. 
32620
32621 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32622
32623         * expression.cs (LValue): New interface.  Must be implemented by
32624         LValue objects.
32625         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32626         LValue interface.
32627
32628         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32629         interface for generating code, simplifies the code.
32630
32631 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32632
32633         * expression.cs (everywhere): Comment out return statements in ::Resolve
32634         methods to avoid the warnings.
32635
32636 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32637
32638         * driver.cs (parse): Report error 2001 if we can not open the
32639         source file.
32640
32641         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32642         not resolve it.
32643
32644         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32645         object. 
32646
32647         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32648         otherwise nested blocks end up with the same index.
32649
32650         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32651
32652         * expression.cs:  Instead of having FIXMEs in the Resolve
32653         functions, throw exceptions so it is obvious that we are facing a
32654         bug. 
32655
32656         * cs-parser.jay (invocation_expression): Pass Location information.
32657
32658         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32659         Use a basename for those routines because .NET does not like paths
32660         on them. 
32661
32662         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32663         already defined.
32664
32665 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32666
32667         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32668         are loading the correct data types (throws an exception if not).
32669         (TypeManager::InitCoreTypes): Use CoreLookupType
32670
32671         * expression.cs (Unary::ResolveOperator): return the child
32672         expression for expressions which are just +expr.
32673         (Unary::ResolveOperator): Return negative literals for -LITERAL
32674         expressions (otherwise they are Unary {Literal}).
32675         (Invocation::Badness): Take into account `Implicit constant
32676         expression conversions'.
32677
32678         * literal.cs (LongLiteral): Implement long literal class.
32679         (IntLiteral): export the `Value' of the intliteral. 
32680
32681 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32682
32683         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32684
32685         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32686         instead of 'Operator'
32687
32688         * expression.cs (Binary::ResolveOperator): Update accordingly.
32689         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32690         and 'Minus'
32691
32692         * cs-parser.jay (unary_expression): Update to use the new names.
32693
32694         * gen-treedump.cs (GetUnary): Same here.
32695
32696         * expression.cs (Unary::Resolve): Implement.
32697         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32698         operators are found instead of making noise ;-)
32699         (Unary::ResolveOperator): New method to do precisely the same thing which
32700         Binary::ResolveOperator does for Binary expressions.
32701         (Unary.method, .Arguments): Add.
32702         (Unary::OperName): Implement.   
32703         (Unary::ForceConversion): Copy and Paste !
32704
32705         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32706         a unary operator.
32707
32708         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32709         for the inbuilt operators. Only overloading works for now ;-)
32710
32711 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32712
32713         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32714         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32715
32716         * expression.cs (This::Emit): Implement. 
32717         (This::Resolve): Implement.
32718         (TypeOf:Resolve): Implement.
32719         (Expression::ResolveSimpleName): Add an implicit this to instance
32720         field references. 
32721         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32722         Bind instance variable to Field expressions.
32723         (FieldExpr::Instance): New field used to track the expression that
32724         represents the object instance.
32725         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32726         binding 
32727         (FieldExpr::Emit): Implement.
32728
32729         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32730         the last instruction contains a return opcode to avoid generating
32731         the last `ret' instruction (this generates correct code, and it is
32732         nice to pass the peverify output).
32733
32734         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32735         initializer for static and instance variables.
32736         (Constructor::Emit): Allow initializer to be null in the case of
32737         static constructors.  Only emit initializer for instance
32738         constructors. 
32739
32740         (TypeContainer::FindMembers): Return a null array if there are no
32741         matches.
32742
32743         Also fix the code for the MemberTypes.Method branch, as it was not
32744         scanning that for operators (or tried to access null variables before).
32745
32746         * assign.cs (Assign::Emit): Handle instance and static fields. 
32747
32748         * TODO: Updated.
32749
32750         * driver.cs: Stop compilation if there are parse errors.
32751
32752         * cs-parser.jay (constructor_declaration): Provide default base
32753         initializer for non-static constructors.
32754         (constructor_declarator): Do not provide a default base
32755         initializers if none was specified.
32756         Catch the fact that constructors should not have parameters.
32757
32758         * class.cs: Do not emit parent class initializers for static
32759         constructors, that should be flagged as an error.
32760
32761 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32762
32763         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32764         Move back code into TypeContainer::Populate.
32765
32766 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32767
32768         * class.cs (TypeContainer::AddConstructor): Fix the check to
32769         compare against Name, not Basename. 
32770         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32771
32772         * cs-parser.jay : Update accordingly.
32773
32774         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32775         for methods, don't forget to look into the operators too.
32776         (RegisterMethodBuilder): Helper method to take care of this for
32777         methods, constructors and operators.
32778         (Operator::Define): Completely revamp.
32779         (Operator.OperatorMethod, MethodName): New fields.
32780         (TypeContainer::Populate): Move the registering of builders into
32781         RegisterMethodBuilder.
32782         (Operator::Emit): Re-write.
32783
32784         * expression.cs (Binary::Emit): Comment out code path to emit method
32785         invocation stuff for the case when we have a user defined operator. I am
32786         just not able to get it right !
32787
32788 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32789
32790         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32791         argument. 
32792
32793         (Expression::MemberLookup): Provide a version that allows to
32794         specify the MemberTypes and BindingFlags. 
32795
32796         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32797         so it was not fetching variable information from outer blocks.
32798
32799         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32800         Beforefieldinit as it was buggy.
32801
32802         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32803         that Ravi put here.  
32804
32805         * class.cs (Constructor::Emit): Only emit if block is not null.
32806         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32807         deal with this by semantically definining it as if the user had
32808         done it.
32809
32810         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32811         constructors as we now "emit" them at a higher level.
32812
32813         (TypeContainer::DefineDefaultConstructor): Used to define the
32814         default constructors if none was provided.
32815
32816         (ConstructorInitializer): Add methods Resolve and Emit. 
32817
32818         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32819
32820 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32821
32822         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32823         the default constructor builder with our hashtable for methodbuilders
32824         to methodcores.
32825
32826         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32827         and argument_count is 0 in which case we have a match.
32828         (Binary::ResolveOperator): More null checking and miscellaneous coding
32829         style cleanup.
32830
32831 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32832
32833         * rootcontext.cs (IsNameSpace): Compare against null.
32834
32835         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32836
32837         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32838         and Unary::Operator.
32839
32840         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32841         accordingly.
32842
32843         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32844         we have overloaded operators.
32845         (Binary::ResolveOperator): Implement the part which does the operator overload
32846         resolution.
32847
32848         * class.cs (Operator::Emit): Implement.
32849         (TypeContainer::Emit): Emit the operators we have too.
32850
32851         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32852         the case when we have a user-defined operator.
32853
32854 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32855
32856         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32857
32858 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32859
32860         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32861         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32862         (Constructor::Emit): Implement.
32863         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32864         if we have no work to do. 
32865         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32866         Emit method.
32867
32868         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32869         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32870
32871         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32872         of parent.parent.
32873
32874 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32875
32876         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32877         in the source.
32878         (Tree::RecordNamespace): Method to do what the name says ;-)
32879         (Tree::Namespaces): Property to get at the namespaces hashtable.
32880
32881         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32882         keep track.
32883
32884         * rootcontext.cs (IsNamespace): Fixed it :-)
32885
32886 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32887
32888         * class.cs (TypeContainer::FindMembers): Add support for
32889         constructors. 
32890         (MethodCore): New class that encapsulates both the shared aspects
32891         of a Constructor and a Method.  
32892         (Method, Constructor): Factored pieces into MethodCore.
32893
32894         * driver.cs: Added --fatal which makes errors throw exceptions.
32895         Load System assembly as well as part of the standard library.
32896
32897         * report.cs: Allow throwing exceptions on errors for debugging.
32898
32899         * modifiers.cs: Do not use `parent', instead use the real type
32900         container to evaluate permission settings.
32901
32902         * class.cs: Put Ravi's patch back in.  He is right, and we will
32903         have to cope with the
32904
32905 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32906
32907         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32908         FamORAssem, not FamANDAssem.
32909
32910 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32911
32912         * driver.cs: Added --parse option that only parses its input files
32913         and terminates.
32914
32915         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32916         incorrect.  IsTopLevel is not used to tell whether an object is
32917         root_types or not (that can be achieved by testing this ==
32918         root_types).  But to see if this is a top-level *class* (not
32919         necessarly our "toplevel" container). 
32920
32921 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32922
32923         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32924         parent instead of a direct call to GetType.
32925
32926 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32927
32928         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32929         Modifiers.TypeAttr. This should just be a call to that method.
32930
32931         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32932         object so that we can determine if we are top-level or not.
32933
32934         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32935         TypeContainer too.
32936
32937         * enum.cs (Enum::Define): Ditto.
32938
32939         * modifiers.cs (FieldAttr): Re-write.
32940
32941         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32942         (TypeContainer::HaveStaticConstructor): New property to provide access
32943         to precisely that info.
32944
32945         * modifiers.cs (MethodAttr): Re-write.
32946         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32947
32948         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32949         of top-level types as claimed.
32950
32951 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32952
32953         * expression.cs (MemberLookup): Fruitless attempt to lookup
32954         constructors.  Maybe I need to emit default constructors?  That
32955         might be it (currently .NET emits this for me automatically).
32956         (Invocation::OverloadResolve): Cope with Arguments == null.
32957         (Invocation::EmitArguments): new function, shared by the new
32958         constructor and us.
32959         (Invocation::Emit): Handle static and instance methods.  Emit
32960         proper call instruction for virtual or non-virtual invocations.
32961         (New::Emit): Implement.
32962         (New::Resolve): Implement.
32963         (MemberAccess:Resolve): Implement.
32964         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32965         to track instances.
32966         (FieldExpr::Resolve): Set type.
32967
32968         * support.cs: Handle empty arguments.
32969                 
32970         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32971         SimpleLookup): Auxiliary routines to help parse a qualifier
32972         identifier.  
32973
32974         Update qualifier_identifier rule.
32975
32976         * codegen.cs: Removed debugging messages.
32977
32978         * class.cs: Make this a global thing, this acts just as a "key" to
32979         objects that we might have around.
32980
32981         (Populate): Only initialize method_builders_to_methods once.
32982
32983         * expression.cs (PropertyExpr): Initialize type from the
32984         PropertyType. 
32985
32986         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32987         Resolve pattern.  Attempt to implicitly convert value to boolean.
32988         Emit code.
32989
32990         * expression.cs: Set the type for the int32/int32 argument case.
32991         (Binary::ResolveOperator): Set the return type to boolean for
32992         comparission operators
32993
32994         * typemanager.cs: Remove debugging print code.
32995
32996         (Invocation::Resolve): resolve type.
32997
32998         * class.cs: Allocate a MemberInfo of the correct size, as the code
32999         elsewhere depends on the test to reflect the correct contents.
33000
33001         (Method::) Keep track of parameters, due to System.Reflection holes
33002
33003         (TypeContainer::Populate): Keep track of MethodBuilders to Method
33004         mapping here.
33005
33006         (TypeContainer::FindMembers): Use ArrayList and then copy an array
33007         of the exact size and return that.
33008
33009         (Class::LookupMethodByBuilder): New function that maps
33010         MethodBuilders to its methods.  Required to locate the information
33011         on methods because System.Reflection bit us again.
33012
33013         * support.cs: New file, contains an interface ParameterData and
33014         two implementations: ReflectionParameters and InternalParameters
33015         used to access Parameter information.  We will need to grow this
33016         as required.
33017
33018         * expression.cs (Invocation::GetParameterData): implement a cache
33019         and a wrapper around the ParameterData creation for methods. 
33020         (Invocation::OverloadResolve): Use new code.
33021
33022 2001-09-13  Ravi Pratap  <ravi@ximian.com>
33023
33024         * class.cs (TypeContainer::EmitField): Remove and move into 
33025         (Field::Define): here and modify accordingly.
33026         (Field.FieldBuilder): New member.
33027         (TypeContainer::Populate): Update accordingly.
33028         (TypeContainer::FindMembers): Implement.
33029
33030 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
33031
33032         * statement.cs: (VariableInfo::VariableType): New field to be
33033         initialized with the full type once it is resolved. 
33034
33035 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
33036
33037         * parameter.cs (GetParameterInfo): Use a type cache to compute
33038         things only once, and to reuse this information
33039
33040         * expression.cs (LocalVariableReference::Emit): Implement.
33041         (OpcodeCast::Emit): fix.
33042
33043         (ParameterReference::Resolve): Implement.
33044         (ParameterReference::Emit): Implement.
33045
33046         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
33047         that are expressions need to stay as Expressions.
33048
33049         * typemanager.cs (CSharpName): Returns the C# name of a type if
33050         possible. 
33051
33052         * expression.cs (Expression::ConvertImplicit): New function that
33053         implements implicit type conversions.
33054
33055         (Expression::ImplicitReferenceConversion): Implements implicit
33056         reference conversions.
33057
33058         (EmptyCast): New type for transparent casts.
33059
33060         (OpcodeCast): New type for casts of types that are performed with
33061         a sequence of bytecodes.
33062
33063         (BoxedCast): New type used for casting value types into reference
33064         types.  Emits a box opcode.
33065
33066         (Binary::DoNumericPromotions): Implements numeric promotions of
33067         and computation of the Binary::Type.
33068
33069         (Binary::EmitBranchable): Optimization.
33070
33071         (Binary::Emit): Implement code emission for expressions.
33072
33073         * typemanager.cs (TypeManager): Added two new core types: sbyte
33074         and byte.
33075
33076 2001-09-12  Ravi Pratap  <ravi@ximian.com>
33077
33078         * class.cs (TypeContainer::FindMembers): Method which does exactly
33079         what Type.FindMembers does, only we don't have to use reflection. No
33080         implementation yet.
33081
33082         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
33083         typecontainer objects as we need to get at them.
33084         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
33085
33086         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
33087         typecontainer object.
33088
33089         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
33090         of just a Report object.
33091
33092 2001-09-11  Ravi Pratap  <ravi@ximian.com>
33093
33094         * class.cs (Event::Define): Go back to using the prefixes "add_" and
33095         "remove_"
33096         (TypeContainer::Populate): Now define the delegates of the type too.
33097         (TypeContainer.Delegates): Property to access the list of delegates defined
33098         in the type.
33099
33100         * delegates.cs (Delegate::Define): Implement partially.
33101
33102         * modifiers.cs (TypeAttr): Handle more flags.
33103
33104 2001-09-11  Ravi Pratap  <ravi@ximian.com>
33105
33106         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
33107         and not <=
33108         (Operator::Define): Re-write logic to get types by using the LookupType method
33109         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
33110         (Indexer::Define): Ditto.
33111         (Event::Define): Ditto.
33112         (Property::Define): Ditto.
33113
33114 2001-09-10  Ravi Pratap  <ravi@ximian.com>
33115
33116         * class.cs (TypeContainer::Populate): Now define operators too. 
33117         (TypeContainer.Operators): New property to access the list of operators
33118         in a type.
33119         (Operator.OperatorMethodBuilder): New member to hold the method builder
33120         for the operator we are defining.
33121         (Operator::Define): Implement.
33122
33123 2001-09-10  Ravi Pratap  <ravi@ximian.com>
33124
33125         * class.cs (Event::Define): Make the prefixes of the accessor methods
33126         addOn_ and removeOn_ 
33127
33128         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
33129         of the location being passed in too. Ideally, this should go later since all
33130         error reporting should be done through the Report object.
33131
33132         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
33133         (Populate): Iterate thru the indexers we have and define them too.
33134         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
33135         for the get and set accessors.
33136         (Indexer::Define): Implement.
33137
33138 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
33139
33140         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
33141         my previous implementation, did not work.
33142
33143         * typemanager.cs: Add a couple of missing types (the longs).
33144
33145         * literal.cs: Use TypeManager.bool_type instead of getting it.
33146
33147         * expression.cs (EventExpr): New kind of expressions.
33148         (Expressio::ExprClassFromMemberInfo): finish
33149
33150 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
33151
33152         * assign.cs: Emit stores to static fields differently.
33153
33154 2001-09-08  Ravi Pratap  <ravi@ximian.com>
33155
33156         * Merge in changes and adjust code to tackle conflicts. Backed out my
33157         code in Assign::Resolve ;-) 
33158
33159 2001-09-08  Ravi Pratap  <ravi@ximian.com>
33160
33161         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
33162         instead Report.Error and also pass in the location.
33163         (CSharpParser::Lexer): New readonly property to return the reference
33164         to the Tokenizer object.
33165         (declare_local_variables): Use Report.Error with location instead of plain 
33166         old error.
33167         (CheckDef): Ditto.
33168
33169         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
33170         (Operator.CheckBinaryOperator): Ditto.
33171
33172         * cs-parser.jay (operator_declarator): Update accordingly.
33173
33174         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
33175         (CheckBinaryOperator): Same here.
33176
33177         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
33178         on the name without any prefixes of namespace names etc. This is because we
33179         already might have something already fully qualified like 
33180         'System.Console.WriteLine'
33181
33182         * assign.cs (Resolve): Begin implementation. Stuck ;-)
33183
33184 2001-09-07  Ravi Pratap  <ravi@ximian.com>
33185
33186         * cs-tokenizer.cs (location): Return a string which also contains
33187         the file name.
33188
33189         * expression.cs (ElementAccess): New class for expressions of the
33190         type 'element access.'
33191         (BaseAccess): New class for expressions of the type 'base access.'
33192         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
33193         respectively.
33194
33195         * cs-parser.jay (element_access): Implement action.
33196         (base_access): Implement actions.
33197         (checked_expression, unchecked_expression): Implement.
33198
33199         * cs-parser.jay (local_variable_type): Correct and implement.
33200         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
33201
33202         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
33203
33204         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
33205         name and the specifiers.
33206
33207         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
33208
33209         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
33210         making them all public ;-)
33211
33212         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
33213         class anyways.
33214
33215 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
33216
33217         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
33218         PropertyExprs.
33219         (FieldExpr, PropertyExprs): New resolved expressions.
33220         (SimpleName::MemberStaticCheck): Perform static checks for access
33221         to non-static fields on static methods. Maybe this should be
33222         generalized for MemberAccesses. 
33223         (SimpleName::ResolveSimpleName): More work on simple name
33224         resolution. 
33225
33226         * cs-parser.jay (primary_expression/qualified_identifier): track
33227         the parameter index.
33228
33229         * codegen.cs (CodeGen::Save): Catch save exception, report error.
33230         (EmitContext::EmitBoolExpression): Chain to expression generation
33231         instead of temporary hack.
33232         (::EmitStatementExpression): Put generic expression code generation.
33233
33234         * assign.cs (Assign::Emit): Implement variable assignments to
33235         local variables, parameters and fields.
33236
33237 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
33238
33239         * statement.cs (Block::GetVariableInfo): New method, returns the
33240         VariableInfo for a variable name in a block.
33241         (Block::GetVariableType): Implement in terms of GetVariableInfo
33242
33243         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
33244         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
33245
33246 2001-09-06  Ravi Pratap  <ravi@ximian.com>
33247
33248         * cs-parser.jay (operator_declaration): Continue on my quest : update
33249         to take attributes argument.
33250         (event_declaration): Ditto.
33251         (enum_declaration): Ditto.
33252         (indexer_declaration): Ditto.
33253
33254         * class.cs (Operator::Operator): Update constructor accordingly.
33255         (Event::Event): Ditto.
33256
33257         * delegate.cs (Delegate::Delegate): Same here.
33258
33259         * enum.cs (Enum::Enum): Same here.
33260
33261 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33262
33263         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
33264
33265         * ../tests/cs0658.cs : New file to demonstrate error 0658.
33266
33267         * attribute.cs (Attributes): New class to encapsulate all attributes which were
33268         being passed around as an arraylist.
33269         (Attributes::AddAttribute): Method to add attribute sections.
33270
33271         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
33272         (struct_declaration): Update accordingly.
33273         (constant_declaration): Update.
33274         (field_declaration): Update.
33275         (method_header): Update.
33276         (fixed_parameter): Update.
33277         (parameter_array): Ditto.
33278         (property_declaration): Ditto.
33279         (destructor_declaration): Ditto.
33280
33281         * class.cs (Struct::Struct): Update constructors accordingly.
33282         (Class::Class): Ditto.
33283         (Field::Field): Ditto.
33284         (Method::Method): Ditto.
33285         (Property::Property): Ditto.
33286         (TypeContainer::OptAttribute): update property's return type.
33287
33288         * interface.cs (Interface.opt_attributes): New member.
33289         (Interface::Interface): Update to take the extra Attributes argument.
33290
33291         * parameter.cs (Parameter::Parameter): Ditto.
33292
33293         * constant.cs (Constant::Constant): Ditto.
33294
33295         * interface.cs (InterfaceMemberBase): New OptAttributes field.
33296         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
33297         the attributes as a parameter.
33298         (InterfaceProperty): Update constructor call.
33299         (InterfaceEvent): Ditto.
33300         (InterfaceMethod): Ditto.
33301         (InterfaceIndexer): Ditto.
33302
33303         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
33304         pass the attributes too.
33305         (interface_event_declaration): Ditto.
33306         (interface_property_declaration): Ditto.
33307         (interface_method_declaration): Ditto.
33308         (interface_declaration): Ditto.
33309
33310 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
33311
33312         * class.cs (Method::Define): Track the "static Main" definition to
33313         create an entry point. 
33314
33315         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
33316         EntryPoint if we find it. 
33317
33318         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
33319         (EmitContext::ig): Make this variable public.
33320
33321         * driver.cs: Make the default output file be the first file name
33322         with the .exe extension.  
33323
33324         Detect empty compilations
33325
33326         Handle various kinds of output targets.  Handle --target and
33327         rename -t to --dumper.
33328
33329         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
33330         methods inherited from Expression return now an Expression.  This
33331         will is used during the tree rewriting as we resolve them during
33332         semantic analysis.
33333
33334         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
33335         the spec.  Missing entirely is the information about
33336         accessability of elements of it.
33337
33338         (Expression::ExprClassFromMemberInfo): New constructor for
33339         Expressions that creates a fully initialized Expression based on
33340         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
33341         a Type.
33342
33343         (Invocation::Resolve): Begin implementing resolution of invocations.
33344
33345         * literal.cs (StringLiteral):  Implement Emit.
33346
33347 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33348
33349         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
33350         member.
33351
33352 2001-09-04  Ravi Pratap  <ravi@ximian.com>
33353
33354         * cs-parser.jay (attribute_arguments): Implement actions.
33355         (attribute): Fix bug in production. Implement action.
33356         (attribute_list): Implement.
33357         (attribute_target): Implement.
33358         (attribute_target_specifier, opt_target_specifier): Implement
33359         (CheckAttributeTarget): New method to check if the attribute target
33360         is valid.
33361         (attribute_section): Implement.
33362         (opt_attributes): Implement.
33363
33364         * attribute.cs : New file to handle attributes.
33365         (Attribute): Class to hold attribute info.
33366
33367         * cs-parser.jay (opt_attribute_target_specifier): Remove production
33368         (attribute_section): Modify production to use 2 different rules to 
33369         achieve the same thing. 1 s/r conflict down !
33370         Clean out commented, useless, non-reducing dimension_separator rules.
33371
33372         * class.cs (TypeContainer.attributes): New member to hold list
33373         of attributes for a type.
33374         (Struct::Struct): Modify to take one more argument, the attribute list.
33375         (Class::Class): Ditto.
33376         (Field::Field): Ditto.
33377         (Method::Method): Ditto.
33378         (Property::Property): Ditto.
33379
33380         * cs-parser.jay (struct_declaration): Update constructor call to
33381         pass in the attributes too.
33382         (class_declaration): Ditto.
33383         (constant_declaration): Ditto.
33384         (field_declaration): Ditto.
33385         (method_header): Ditto.
33386         (fixed_parameter): Ditto.
33387         (parameter_array): Ditto.
33388         (property_declaration): Ditto.
33389
33390         * constant.cs (Constant::Constant): Update constructor similarly.
33391         Use System.Collections.
33392
33393         * parameter.cs (Parameter::Parameter): Update as above.
33394
33395 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33396
33397         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
33398         (TypeContainer.delegates): New member to hold list of delegates.
33399
33400         * cs-parser.jay (delegate_declaration): Implement the action correctly 
33401         this time as I seem to be on crack ;-)
33402
33403 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
33404
33405         * rootcontext.cs (RootContext::IsNamespace): new function, used to
33406         tell whether an identifier represents a namespace.
33407
33408         * expression.cs (NamespaceExpr): A namespace expression, used only
33409         temporarly during expression resolution.
33410         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33411         utility functions to resolve names on expressions.
33412
33413 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33414
33415         * codegen.cs: Add hook for StatementExpressions. 
33416
33417         * class.cs: Fix inverted test for static flag in methods.
33418
33419 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33420
33421         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33422         to make it coincide with MS' number.
33423         (Operator::CheckBinaryOperator): Ditto.
33424
33425         * ../errors/errors.txt : Remove error numbers added earlier.
33426
33427         * ../errors/cs1019.cs : Test case for error # 1019
33428
33429         * ../errros/cs1020.cs : Test case for error # 1020
33430
33431         * cs-parser.jay : Clean out commented cruft.
33432         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33433         used anywhere - non-reducing rule.
33434         (namespace_declarations): Non-reducing rule - comment out.
33435
33436         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33437         with TypeContainer::AddEnum.
33438
33439         * delegate.cs : New file for delegate handling classes.
33440         (Delegate): Class for declaring delegates.
33441
33442         * makefile : Update.
33443
33444         * cs-parser.jay (delegate_declaration): Implement.
33445
33446 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33447
33448         * class.cs (Event::Define): Implement.
33449         (Event.EventBuilder): New member.
33450
33451         * class.cs (TypeContainer::Populate): Update to define all enums and events
33452         we have.
33453         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33454         readonly fields for all these cases ?
33455
33456 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33457
33458         * class.cs (Property): Revamp to use the convention of making fields readonly.
33459         Accordingly modify code elsewhere.
33460
33461         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33462         the Define method of the Property class.
33463
33464         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33465         trivial bug.
33466         (TypeContainer::Populate): Update to define all the properties we have. Also
33467         define all enumerations.
33468
33469         * enum.cs (Define): Implement.
33470
33471 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33472
33473         * cs-parser.jay (overloadable_operator): The semantic value is an
33474         enum of the Operator class.
33475         (operator_declarator): Implement actions.
33476         (operator_declaration): Implement.
33477
33478         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33479         validity of definitions.
33480         (Operator::CheckBinaryOperator): Static method to check for binary operators
33481         (TypeContainer::AddOperator): New method to add an operator to a type.
33482
33483         * cs-parser.jay (indexer_declaration): Added line to actually call the
33484         AddIndexer method so it gets added ;-)
33485
33486         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33487         already taken care of by the MS compiler ?  
33488
33489 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33490
33491         * class.cs (Operator): New class for operator declarations.
33492         (Operator::OpType): Enum for the various operators.
33493
33494 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33495
33496         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33497         ostensibly handle this in semantic analysis.
33498
33499         * cs-parser.jay (general_catch_clause): Comment out
33500         (specific_catch_clauses, specific_catch_clause): Ditto.
33501         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33502         (catch_args, opt_catch_args): New productions.
33503         (catch_clause): Rewrite to use the new productions above
33504         (catch_clauses): Modify accordingly.
33505         (opt_catch_clauses): New production to use in try_statement
33506         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33507         and re-write the code in the actions to extract the specific and
33508         general catch clauses by being a little smart ;-)
33509
33510         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33511         Hooray, try and catch statements parse fine !
33512
33513 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33514
33515         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33516         string from the hashtable of variables.
33517
33518         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33519         I end up making that mistake ;-)
33520         (catch_clauses): Fixed gross error which made Key and Value of the 
33521         DictionaryEntry the same : $1 !!
33522
33523 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33524
33525         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33526
33527         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33528         when the add and remove accessors are specified. 
33529
33530 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33531
33532         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33533         information about indexer_declarator.
33534         (indexer_declarator): Implement actions.
33535         (parsing_indexer): New local boolean used to keep track of whether
33536         we are parsing indexers or properties. This is necessary because 
33537         implicit_parameters come into picture even for the get accessor in the 
33538         case of an indexer.
33539         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33540
33541         * class.cs (Indexer): New class for indexer declarations.
33542         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33543         (TypeContainer::indexers): New member to hold list of indexers for the
33544         type.
33545
33546 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33547
33548         * cs-parser.jay (add_accessor_declaration): Implement action.
33549         (remove_accessor_declaration): Implement action.
33550         (event_accessors_declaration): Implement
33551         (variable_declarators): swap statements for first rule - trivial.
33552
33553         * class.cs (Event): New class to hold information about event
33554         declarations.
33555         (TypeContainer::AddEvent): New method to add an event to a type
33556         (TypeContainer::events): New member to hold list of events.
33557
33558         * cs-parser.jay (event_declaration): Implement actions.
33559
33560 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33561
33562         * cs-parser.jay (dim_separators): Implement. Make it a string
33563         concatenating all the commas together, just as they appear.
33564         (opt_dim_separators): Modify accordingly
33565         (rank_specifiers): Update accordingly. Basically do the same
33566         thing - instead, collect the brackets here.
33567         (opt_rank_sepcifiers): Modify accordingly.
33568         (array_type): Modify to actually return the complete type string
33569         instead of ignoring the rank_specifiers.
33570         (expression_list): Implement to collect the expressions
33571         (variable_initializer): Implement. We make it a list of expressions
33572         essentially so that we can handle the array_initializer case neatly too.
33573         (variable_initializer_list): Implement.
33574         (array_initializer): Make it a list of variable_initializers
33575         (opt_array_initializer): Modify accordingly.
33576
33577         * expression.cs (New::NType): Add enumeration to help us
33578         keep track of whether we have an object/delegate creation
33579         or an array creation.
33580         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33581         members to hold data about array creation.
33582         (New:New): Modify to update NewType
33583         (New:New): New Overloaded contructor for the array creation
33584         case.
33585
33586         * cs-parser.jay (array_creation_expression): Implement to call
33587         the overloaded New constructor.
33588
33589 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33590
33591         * class.cs (TypeContainer::Constructors): Return member
33592         constructors instead of returning null.
33593
33594 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33595
33596         * typemanager.cs (InitCoreTypes): Initialize the various core
33597         types after we have populated the type manager with the user
33598         defined types (this distinction will be important later while
33599         compiling corlib.dll)
33600
33601         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33602         on Expression Classification.  Now all expressions have a method
33603         `Resolve' and a method `Emit'.
33604
33605         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33606         generation from working.     Also add some temporary debugging
33607         code. 
33608
33609 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33610
33611         * codegen.cs: Lots of code generation pieces.  This is only the
33612         beginning, will continue tomorrow with more touches of polish.  We
33613         handle the fundamentals of if, while, do, for, return.  Others are
33614         trickier and I need to start working on invocations soon.
33615
33616         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33617         s.InitStatement. 
33618
33619         * codegen.cs (EmitContext): New struct, used during code
33620         emission to keep a context.   Most of the code generation will be
33621         here. 
33622
33623         * cs-parser.jay: Add embedded blocks to the list of statements of
33624         this block.  So code generation proceeds in a top down fashion.
33625
33626 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33627
33628         * statement.cs: Add support for multiple child blocks.
33629
33630 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33631
33632         * codegen.cs (EmitCode): New function, will emit the code for a
33633         Block of code given a TypeContainer and its ILGenerator. 
33634
33635         * statement.cs (Block): Standard public readonly optimization.
33636         (Block::Block constructors): Link children. 
33637         (Block::Child): Child Linker.
33638         (Block::EmitVariables): Emits IL variable declarations.
33639
33640         * class.cs: Drop support for MethodGroups here, delay until
33641         Semantic Analysis.
33642         (Method::): Applied the same simplification that I did before, and
33643         move from Properties to public readonly fields.
33644         (Method::ParameterTypes): Returns the parameter types for the
33645         function, and implements a cache that will be useful later when I
33646         do error checking and the semantic analysis on the methods is
33647         performed.
33648         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33649         and made a method, optional argument tells whether this is a class
33650         or a structure to apply the `has-this' bit.
33651         (Method::GetCallingConvention): Implement, returns the calling
33652         convention. 
33653         (Method::Define): Defines the type, a second pass is performed
33654         later to populate the methods.
33655
33656         (Constructor::ParameterTypes): implement a cache similar to the
33657         one on Method::ParameterTypes, useful later when we do semantic
33658         analysis. 
33659
33660         (TypeContainer::EmitMethod):  New method.  Emits methods.
33661
33662         * expression.cs: Removed MethodGroup class from here.
33663
33664         * parameter.cs (Parameters::GetCallingConvention): new method.
33665
33666 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33667
33668         * class.cs (TypeContainer::Populate): Drop RootContext from the
33669         argument. 
33670
33671         (Constructor::CallingConvention): Returns the calling convention.
33672         (Constructor::ParameterTypes): Returns the constructor parameter
33673         types. 
33674
33675         (TypeContainer::AddConstructor): Keep track of default constructor
33676         and the default static constructor.
33677
33678         (Constructor::) Another class that starts using `public readonly'
33679         instead of properties. 
33680
33681         (Constructor::IsDefault): Whether this is a default constructor. 
33682
33683         (Field::) use readonly public fields instead of properties also.
33684
33685         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33686         track of static constructors;  If none is used, turn on
33687         BeforeFieldInit in the TypeAttributes. 
33688
33689         * cs-parser.jay (opt_argument_list): now the return can be null
33690         for the cases where there are no arguments. 
33691
33692         (constructor_declarator): If there is no implicit `base' or
33693         `this', then invoke the default parent constructor. 
33694
33695         * modifiers.cs (MethodAttr): New static function maps a set of
33696         modifiers flags into a MethodAttributes enum
33697         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33698         MethodAttr, TypeAttr to represent the various mappings where the
33699         modifiers are used.
33700         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33701
33702 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33703
33704         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33705         method arguments.
33706
33707         * interface.cs (PopulateIndexer): Implemented the code generator
33708         for interface indexers.
33709
33710 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33711
33712         * interface.cs (InterfaceMemberBase): Now we track the new status
33713         here.  
33714
33715         (PopulateProperty): Implement property population.  Woohoo!  Got
33716         Methods and Properties going today. 
33717
33718         Removed all the properties for interfaces, and replaced them with
33719         `public readonly' fields. 
33720
33721 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33722
33723         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33724         initialize their hashtables/arraylists only when they are needed
33725         instead of doing this always.
33726
33727         * parameter.cs: Handle refs and out parameters.
33728
33729         * cs-parser.jay: Use an ArrayList to construct the arguments
33730         instead of the ParameterCollection, and then cast that to a
33731         Parameter[] array.
33732
33733         * parameter.cs: Drop the use of ParameterCollection and use
33734         instead arrays of Parameters.
33735
33736         (GetParameterInfo): Use the Type, not the Name when resolving
33737         types. 
33738
33739 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33740
33741         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33742         and instead use public readonly fields.
33743
33744         * class.cs: Put back walking code for type containers.
33745
33746 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33747
33748         * class.cs (MakeConstant): Code to define constants.
33749
33750         * rootcontext.cs (LookupType): New function.  Used to locate types 
33751
33752
33753 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33754
33755         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33756         this System.Reflection code is.  Kudos to Microsoft
33757
33758         * typemanager.cs: Implement a type cache and avoid loading all
33759         types at boot time.  Wrap in LookupType the internals.  This made
33760         the compiler so much faster.  Wow.  I rule!
33761
33762         * driver.cs: Make sure we always load mscorlib first (for
33763         debugging purposes, nothing really important).
33764
33765         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33766         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33767
33768         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33769         on namespaces that have been imported using the `using' keyword.
33770
33771         * class.cs (TypeContainer::TypeAttr): Virtualize.
33772         (Class::TypeAttr): Return attributes suitable for this bad boy.
33773         (Struct::TypeAttr): ditto.
33774         Handle nested classes.
33775         (TypeContainer::) Remove all the type visiting code, it is now
33776         replaced with the rootcontext.cs code
33777
33778         * rootcontext.cs (GetClassBases): Added support for structs. 
33779
33780 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33781
33782         * interface.cs, statement.cs, class.cs, parameter.cs,
33783         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33784         Drop use of TypeRefs, and use strings instead.
33785
33786 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33787
33788         * rootcontext.cs: 
33789
33790         * class.cs (Struct::Struct): set the SEALED flags after
33791         checking the modifiers.
33792         (TypeContainer::TypeAttr): new property, returns the
33793         TypeAttributes for a class.  
33794
33795         * cs-parser.jay (type_list): Oops, list production was creating a
33796         new list of base types.
33797
33798         * rootcontext.cs (StdLib): New property.
33799         (GetInterfaceTypeByName): returns an interface by type name, and
33800         encapsulates error handling here.
33801         (GetInterfaces): simplified.
33802         (ResolveTree): Encapsulated all the tree resolution here.
33803         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33804         types. 
33805
33806         * driver.cs: Add support for --nostdlib, to avoid loading the
33807         default assemblies.
33808         (Main): Do not put tree resolution here. 
33809
33810         * rootcontext.cs: Beginning of the class resolution.
33811
33812 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33813
33814         * rootcontext.cs: Provide better error reporting. 
33815
33816         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33817
33818         * rootcontext.cs (CreateInterface): Handle the case where there
33819         are no parent interfaces.
33820
33821         (CloseTypes): Routine to flush types at the end.
33822         (CreateInterface): Track types.
33823         (GetInterfaces): Returns an array of Types from the list of
33824         defined interfaces.
33825
33826         * typemanager.c (AddUserType): Mechanism to track user types (puts
33827         the type on the global type hash, and allows us to close it at the
33828         end). 
33829
33830 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33831
33832         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33833         RecordInterface instead.
33834
33835         * cs-parser.jay: Updated to reflect changes above.
33836
33837         * decl.cs (Definition): Keep track of the TypeBuilder type that
33838         represents this type here.  Not sure we will use it in the long
33839         run, but wont hurt for now.
33840
33841         * driver.cs: Smaller changes to accomodate the new code.
33842
33843         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33844         when done. 
33845
33846         * rootcontext.cs (CreateInterface):  New method, used to create
33847         the System.TypeBuilder type for interfaces.
33848         (ResolveInterfaces): new entry point to resolve the interface
33849         hierarchy. 
33850         (CodeGen): Property, used to keep track of the code generator.
33851
33852 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33853
33854         * cs-parser.jay: Add a second production for delegate_declaration
33855         with `VOID'.
33856
33857         (enum_body): Put an opt_comma here instead of putting it on
33858         enum_body or enum_member_declarations so we can handle trailing
33859         commas on enumeration members.  Gets rid of a shift/reduce.
33860
33861         (type_list): Need a COMMA in the middle.
33862
33863         (indexer_declaration): Tell tokenizer to recognize get/set
33864
33865         * Remove old targets.
33866
33867         * Re-add the parser target.
33868
33869 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33870
33871         * cs-parser.jay: Add precendence rules for a number of operators
33872         ot reduce the number of shift/reduce conflicts in the grammar.
33873
33874 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33875
33876         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33877         and put it here.
33878
33879         Get rid of old crufty code.
33880
33881         * rootcontext.cs: Use this to keep track of the parsed
33882         representation and the defined types available to the program. 
33883
33884         * gen-treedump.cs: adjust for new convention.
33885
33886         * type.cs: Split out the type manager, and the assembly builder
33887         from here. 
33888
33889         * typemanager.cs: the type manager will live here now.
33890
33891         * cil-codegen.cs: And the code generator here. 
33892
33893 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33894
33895         * makefile: Fixed up for easy making.
33896
33897 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33898
33899         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33900         the 
33901
33902         (unary_expression): Expand pre_increment_expression and
33903         post_decrement_expression to reduce a shift/reduce.
33904
33905 2001-07-11  Simon Cozens
33906
33907         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33908
33909         Improve allow_keyword_as_indent name.
33910
33911 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33912
33913         * Adjustments for Beta2. 
33914
33915 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33916
33917         * decl.cs: Added `Define' abstract method.
33918         (InTransit): new property, used to catch recursive definitions. 
33919
33920         * interface.cs: Implement `Define'. 
33921
33922         * modifiers.cs: Map Modifiers.constants to
33923         System.Reflection.TypeAttribute flags.
33924
33925         * class.cs: Keep track of types and user-defined types.
33926         (BuilderInit): New method for creating an assembly
33927         (ResolveType): New function to launch the resolution process, only
33928         used by interfaces for now.
33929
33930         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33931         that are inserted into the name space. 
33932
33933 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33934
33935         * ARGH.  I have screwed up my tree so many times due to the use of
33936         rsync rather than using CVS.  Going to fix this at once. 
33937
33938         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33939         load types.
33940
33941 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33942
33943         * Experiment successful: Use System.Type rather that our own
33944         version of Type.  
33945
33946 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33947
33948         * cs-parser.jay: Removed nsAliases from here.
33949
33950         Use new namespaces, handle `using XXX;' 
33951
33952         * namespace.cs: Reimplemented namespace handling, use a recursive
33953         definition of the class.  Now we can keep track of using clauses
33954         and catch invalid using clauses.
33955
33956 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33957
33958         * gen-treedump.cs: Adapted for all the renaming.
33959
33960         * expression.cs (Expression): this class now has a Type property
33961         which returns an expression Type.
33962
33963         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33964         `Type', as this has a different meaning now in the base
33965
33966 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33967
33968         * interface.cs, class.cs: Removed from all the sources the
33969         references to signature computation, as we can not do method
33970         signature computation during the parsing time, as we are not
33971         trying to solve at that point distinguishing:
33972
33973         class X {
33974                 void a (Blah x) {}
33975                 void a (NS.Blah x) {}
33976         }
33977
33978         Which depending on the context might be valid or not, as we do not
33979         know if Blah is the same thing as NS.Blah at that point.
33980
33981         * Redid everything so the code uses TypeRefs now instead of
33982         Types.  TypeRefs are just temporary type placeholders, that need
33983         to be resolved.  They initially have a pointer to a string and the
33984         current scope in which they are used.  This is used later by the
33985         compiler to resolve the reference to an actual Type. 
33986
33987         * DeclSpace is no longer a CIR.Type, and neither are
33988         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33989         are all DeclSpaces, but no Types. 
33990
33991         * type.cs (TypeRefManager): This implements the TypeRef manager,
33992         which keeps track of all the types that need to be resolved after
33993         the parsing has finished. 
33994
33995 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33996
33997         * ARGH.  We are going to have to store `foreach' as a class rather
33998         than resolving it, as we need to verify error 1579 after name
33999         resolution.   *OR* we could keep a flag that says `This request to
34000         IEnumerator comes from a foreach statement' which we can then use
34001         to generate the error.
34002
34003 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
34004
34005         * class.cs (TypeContainer.AddMethod): we now add methods to the
34006         MethodGroup instead of the method hashtable.  
34007
34008         * expression.cs: Add MethodGroup abstraction, which gets us one
34009         step closer to the specification in the way we handle method
34010         declarations.  
34011
34012         * cs-parser.jay (primary_expression): qualified_identifier now
34013         tried to match up an identifier to a local variable reference or
34014         to a parameter reference.
34015
34016         current_local_parameters is now a parser global variable that
34017         points to the current parameters for the block, used during name
34018         lookup.
34019
34020         (property_declaration): Now creates an implicit `value' argument to
34021         the set accessor.
34022
34023 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
34024
34025         * parameter.cs: Do not use `param' arguments as part of the
34026         signature, per the spec.
34027
34028 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
34029
34030         * decl.cs: Base class for classes, structs and interfaces.  This
34031         is the "Declaration Space" 
34032
34033         * cs-parser.jay: Use CheckDef for checking declaration errors
34034         instead of having one on each function.
34035
34036         * class.cs: Factor out some code for handling error handling in
34037         accordance to the "Declarations" section in the "Basic Concepts"
34038         chapter in the ECMA C# spec.
34039
34040         * interface.cs: Make all interface member classes derive from
34041         InterfaceMemberBase.
34042
34043 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
34044
34045         * Many things: all interfaces are parsed and generated in
34046         gen-treedump.  Support for member variables, constructors,
34047         destructors, properties, constants is there.
34048
34049         Beginning of the IL backend, but very little done, just there for
34050         testing purposes. 
34051
34052 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
34053
34054         * cs-parser.jay: Fix labeled statement.
34055
34056         * cs-tokenizer.cs (escape): Escape " and ' always.
34057         ref_line, ref_name: keep track of the line/filename as instructed
34058         by #line by the compiler.
34059         Parse #line.
34060
34061 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
34062
34063         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
34064         to match the values in System.CodeDOM.
34065
34066         Divid renamed to Divide.
34067
34068         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
34069         statements. 
34070         (Statements.set): remove.
34071
34072         * System.CodeDOM/CodeCatchClause.cs: always have a valid
34073         statements. 
34074
34075         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
34076         falseStatements always have valid values. 
34077
34078         * cs-parser.jay: Use System.CodeDOM now.
34079