2010-06-17 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / ChangeLog
1 2010-06-17  Marek Safar  <marek.safar@gmail.com>
2
3         * generic.cs, method.cs: Inflate copied type parameters from base
4         class or explicit interfaces.
5         
6         * convert.cs: Fixed conversion between two type parameters.
7         Fixes #614471
8
9 2010-06-16  Marek Safar  <marek.safar@gmail.com>
10
11         * membercache.cs, convert.cs: Correctly resize an array used by
12         GetUserOperator.
13
14 2010-06-15  Marek Safar  <marek.safar@gmail.com>
15
16         A fix for bug #599601
17         * dynamic.cs, ecore.cs: A new flag for dynamic resolver to ignore
18         generated member access left expression.
19         
20 2010-06-16  Marek Safar  <marek.safar@gmail.com>
21
22         * expression.cs: Dispatch dynamic invocation solely on left
23         expression type.
24
25 2010-06-16  Marek Safar  <marek.safar@gmail.com>
26
27         * expression.cs, statement.cs: Always persist explicit cast
28         semantic at expression level.
29         
30 2010-06-15  Marek Safar  <marek.safar@gmail.com>
31
32         * expression.cs, attribute.cs: Enable generic type parameters
33         attribute check.
34         
35 2010-06-15  Marek Safar  <marek.safar@gmail.com>
36
37         A fix for bug #612146
38         * generic.cs: Don't use fixed array for inflated type parameter
39         interface constraints.
40         
41 2010-06-15  Marek Safar  <marek.safar@gmail.com>
42
43         * typespec.cs: ElementTypeSpec has to use its own ITypeDefinition.
44         
45         * report.cs: Unwrap elements for related symbols reporting.
46
47 2010-06-15  Marek Safar  <marek.safar@gmail.com>
48
49         A fix for bug #612796
50         * cs-tokenizer.cs: Offset correctly keywords the first character
51         comparison.
52         
53 2010-06-15  Marek Safar  <marek.safar@gmail.com>
54
55         A fix for bug #613397
56         * expression.cs: Removed too aggressive object initializers
57         optimization.
58         
59 2010-06-15  Marek Safar  <marek.safar@gmail.com>
60         
61         * parameter.cs, property.cs, membercache.cs, decl.cs, iterators.cs,
62         anonymous.cs, expression.cs, support.cs, method.cs, pending.cs,
63         class.cs, cs-parser.jay: Simplify parsing of accessors by removing
64         any intermediate steps and fake nodes, also saves few MBs of memory.
65
66 2010-06-11  Marek Safar  <marek.safar@gmail.com>
67         
68         * modifiers.cs, rootcontext.cs, location.cs, cs-parser.jay: More
69         precise modifiers parsing.
70
71 2010-06-09  Marek Safar  <marek.safar@gmail.com>
72
73         * cs-tokenizer.cs, anonymous.cs, expression.cs, cs-parser.jay:
74         Fixed few shift/reduce conflicts.
75
76 2010-06-09  Marek Safar  <marek.safar@gmail.com>
77
78         * typemanager.cs, parameter.cs, dynamic.cs, typespec.cs,
79         expression.cs, ecore.cs, cs-parser.jay: Fully parse composed type
80         specifiers and stop using string in AST.
81
82 2010-06-07  Marek Safar  <marek.safar@gmail.com>
83
84         * typemanager.cs, eval.cs, iterators.cs, anonymous.cs, expression.cs
85         method.cs, class.cs, delegate.cs, cs-parser.jay, driver.cs, visit.cs
86         enum.cs: Hold location of predefined types.
87
88 2010-06-07  Marek Safar  <marek.safar@gmail.com>
89
90         A fix for bug #610878
91         * pending.cs: Clone cached list before modifying.
92
93 2010-06-04  Marek Safar  <marek.safar@gmail.com>
94
95         * convert.cs, typespec.cs, expression.cs: Start using array member
96         kind for better conversion checks.
97         
98         * import.cs, report.cs: Report better error message for runtime
99         reflection bugs.
100
101 2010-06-04  Marek Safar  <marek.safar@gmail.com>
102
103         * membercache.cs, convert.cs, nullable.cs, expression.cs: Optimize
104         user defined conversion probing and simplify user conversion for
105         nullabe types. Fixes #610940.
106
107 2010-06-03  Marek Safar  <marek.safar@gmail.com>
108
109         A fix for bug #610919
110         * parameter.cs, property.cs, cs-parser.jay: Use independent implicit
111         parameters for explicit event accessors. Anonymous method capturing
112         won't otherwise work for event implicit parameter.
113
114 2010-06-02  Marek Safar  <marek.safar@gmail.com>
115
116         A fix for bug #610088
117         * nullable.cs, expression.cs, statement.cs, method.cs, ecore.cs:
118         Ignore overrides for base overload resolution as for non-base
119         expressions and convert the best candidate to closest override
120         afterwards.
121
122 2010-06-01  Marek Safar  <marek.safar@gmail.com>
123
124         A fix for bug #610139
125         * generic.cs, convert.cs: Recursively check effective base interface
126
127 2010-06-01  Marek Safar  <marek.safar@gmail.com>
128
129         * statement.cs: Handle nullable types and type parameters in using
130         statement, avoid boxing value types. Also fixes #571010
131
132 2010-06-01  Marek Safar  <marek.safar@gmail.com>
133
134         * convert.cs, expression.cs: Emit unbox for underlying nullable
135         type boxing cast.
136
137 2010-05-29  Marek Safar  <marek.safar@gmail.com>
138
139         A fix for bug #610126
140         * expression.cs: Don't use branch optimization for types bigger than
141         int.
142
143 2010-05-28  Marek Safar  <marek.safar@gmail.com>
144
145         A fix for bug #609088
146         * import.cs: Check private modifier correctly.
147
148 2010-05-28  Marek Safar  <marek.safar@gmail.com>
149
150         A fix for bug #609049
151         * ecore.cs: Don't ignore override methods when looking for base
152         member.
153
154 2010-05-27  Marek Safar  <marek.safar@gmail.com>
155
156         A fix for bugs #608007, #572540, #566130, #476358
157
158         * generic.cs, linq.cs, expression.cs, statement.cs, cs-parser.jay:
159         More tricky refactoring of implicit linq blocks.
160         
161 2010-05-25  Marek Safar  <marek.safar@gmail.com>
162
163         * linq.cs, cs-parser.jay: Keep location for all linq clauses.
164
165 2010-05-25  Marek Safar  <marek.safar@gmail.com>
166
167         * context.cs, expression.cs, cs-parser.jay: Don't store current
168         block in This expression (it's too early for linq blocks).
169
170 2010-05-21  Marek Safar  <marek.safar@gmail.com>
171
172         * expression.cs: Use constrained prefix more broadly to avoid boxing.
173
174 2010-05-20  Marek Safar  <marek.safar@gmail.com>
175
176         A fix for bug #591149
177         * nullable.cs: Don't double wrap same expression.
178         
179 2010-05-20  Marek Safar  <marek.safar@gmail.com>
180
181         A fix for bug #569827
182         * anonymous.cs: Any issued error in probing mode means no match.
183
184 2010-05-20  Marek Safar  <marek.safar@gmail.com>
185
186         * expression.cs: Search for base indexer using the closest match
187         rule.
188
189 2010-05-20  Marek Safar  <marek.safar@gmail.com>
190
191         A fix for bug #572071
192         * method.cs: Set override constraints using unexpanded interface
193         list.
194
195 2010-05-20  Marek Safar  <marek.safar@gmail.com>
196
197         A fix for bug #572071
198         * ecore.cs: Include secondary extension method lookup in probing
199         mode.
200
201 2010-05-19  Marek Safar  <marek.safar@gmail.com>
202
203         A fix for bug #515801
204         * typespec.cs (MayBecomeEqualGenericTypes): Recursively check
205         type arguments.
206
207 2010-05-19  Marek Safar  <marek.safar@gmail.com>
208
209         A fix for bug #515801
210         * pending.cs: Advance counter correctly.
211
212 2010-05-19  Marek Safar  <marek.safar@gmail.com>
213
214         A fix for bug #480139
215         * method.cs, pending.cs: Indexer override uses base name.
216         
217 2010-05-19  Marek Safar  <marek.safar@gmail.com>
218
219         A fix for bug #424064
220         * generic.cs: Replace original with inflated type parameter on
221         failure.
222
223 2010-05-19  Marek Safar  <marek.safar@gmail.com>
224
225         A fix for bug #359733
226         * parameter.cs: Extension attribute can be defined in each assembly.
227
228 2010-05-18  Marek Safar  <marek.safar@gmail.com>
229
230         A fix for bug #446507
231         * method.cs: Only one method can implement an interface.
232
233 2010-05-18  Marek Safar  <marek.safar@gmail.com>
234
235         A fix for bug #594905
236         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
237         Typed null can be used as a source for expression methods.
238
239 2010-05-18  Marek Safar  <marek.safar@gmail.com>
240
241         A fix for bug #606551
242         * namespace.cs: Using directive imports only types and not nested
243         namespaces.
244
245 2010-05-17  Marek Safar  <marek.safar@gmail.com>
246
247         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
248         delegate.cs: Member instance is resolved after member overload
249         definitely resolves static/instance property of member expression.
250         Fixes #545047, #358848, #456605, #460016, #603299
251
252 2010-05-12  Marek Safar  <marek.safar@gmail.com>
253
254         A fix for bug #604981
255         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
256         details for nested anonymous methods stories.
257
258 2010-05-11  Marek Safar  <marek.safar@gmail.com>
259
260         A fix for bug #604735
261         * namespace.cs: Don't report namespace collision.
262
263 2010-05-11  Marek Safar  <marek.safar@gmail.com>
264
265         A fix for bug #604748
266         * class.cs, typespec.cs: Search full imported attribute hierarchy
267         for AttributeUsage.
268
269 2010-05-11  Marek Safar  <marek.safar@gmail.com>
270
271         * namespace.cs: Ignore missing dependencies failure at
272         initialization.
273
274 2010-05-11  Marek Safar  <marek.safar@gmail.com>
275
276         A fix for bug #604640
277         * namespace.cs: Don't resolve using constraints too early.
278
279 2010-05-11  Marek Safar  <marek.safar@gmail.com>
280
281         A fix for bug #604239
282         * generic.cs: Copy partial type constraints to partial container.
283
284 2010-05-10  Marek Safar  <marek.safar@gmail.com>
285
286         A fix for bug #557210
287         * import.cs: Relax underlying enum field rules.
288
289 2010-05-10  Marek Safar  <marek.safar@gmail.com>
290
291         A fix for bug #603476
292         * property.cs: Implement IParametersMember for indexer accessors.
293
294 2010-05-07  Marek Safar  <marek.safar@gmail.com>
295
296         A fix for bug #601141
297         * class.cs: Update all partial modifiers.
298
299 2010-05-06  Marek Safar  <marek.safar@gmail.com>
300
301         A fix for bug #601708
302         * method.cs, membercache.cs: Destructors cannot be hidden.
303
304 2010-05-06  Marek Safar  <marek.safar@gmail.com>
305
306         A fix for bug #602551
307         * class.cs: Resursive reference of type definition is allowed.
308
309 2010-05-06  Marek Safar  <marek.safar@gmail.com>
310
311         * anonymous.cs: Mutate cached storey instance types too.
312
313 2010-05-06  Marek Safar  <marek.safar@gmail.com>
314
315         A fix for bug #602443
316         * convert.cs: Explicit enum conversion cannot involve user operators
317
318 2010-05-05  Miguel de Icaza  <miguel@novell.com>
319
320         * class.cs (TypeContainer.DefineBaseTypes)
321         (TypeContainer.CheckRecursiveDefinition): check for the iface not
322         being null, as we could have failed resolution and crashed;
323         Fixes #442144
324
325         * cs-parser.jay: Productions to catch common mistakes when other
326         punctuation operators are used instead of comma.   Fixes 571702 
327
328 2010-05-05  Marek Safar  <marek.safar@gmail.com>
329
330         * anonymous.cs: Mutate correct set of constraints.
331
332 2010-05-05  Marek Safar  <marek.safar@gmail.com>
333
334         A fix for bug #602842
335         * expression.cs: Resolve all array bound arguments.
336
337 2010-05-05  Marek Safar  <marek.safar@gmail.com>
338
339         * import.cs: Don't import private fields.
340
341 2010-04-30  Marek Safar  <marek.safar@gmail.com>
342
343         Partially based on patch by <sami.lamti@gmail.com>
344
345         * eval.cs, ecore.cs: Fixed eval show methods.
346
347 2010-04-30  Marek Safar  <marek.safar@gmail.com>
348
349         * generic.cs, delegate.cs: Implement output type inference of
350         methodgroup now when the specification was cleared at least little
351         bit.
352
353 2010-04-29  Marek Safar  <marek.safar@gmail.com>
354
355         A fix for bug #575611
356         * class.cs: Fix recursive unmanaged recursice sruct check.
357         
358 2010-04-29  Marek Safar  <marek.safar@gmail.com>
359
360         A fix for bug #479776
361         * expression.cs: Implement typeof unbounded nested generic types.
362
363 2010-04-29  Marek Safar  <marek.safar@gmail.com>
364
365         A fix for bug #474953
366         * class.cs: Fix valid recursive base type definition.
367
368 2010-04-29  Marek Safar  <marek.safar@gmail.com>
369
370         A fix for bug #421737
371         * convert.cs, expression.cs: A boxing conversion exists from a
372         nullable-type to a reference type, if a boxing conversion exists
373         from the underlying non-nullable-value-type to the reference type.
374
375 2010-04-29  Marek Safar  <marek.safar@gmail.com>
376
377         A fix for bug #376875
378         * import.cs: Import volatile modifier.
379
380 2010-04-29  Marek Safar  <marek.safar@gmail.com>
381
382         A fix for bug #372412
383         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
384         generic arrays.
385
386 2010-04-29  Marek Safar  <marek.safar@gmail.com>
387
388         A fix for bug #568955
389         * statements.cs: Handle recursive scope initializers.
390
391 2010-04-28  Marek Safar  <marek.safar@gmail.com>
392
393         A fix for bug #566511
394         * anonymous.cs: Always get inflated version of hoisted variable
395         on generic type definition.
396
397 2010-04-28  Marek Safar  <marek.safar@gmail.com>
398
399         * import.cs, membercache.cs: Relax rules for valid properties.
400
401 2010-04-28  Marek Safar  <marek.safar@gmail.com>
402
403         * import.cs: Intern arrays used in generic arguments.
404
405 2010-04-28  Marek Safar  <marek.safar@gmail.com>
406
407         A fix for bug #600398
408         * convert.cs: Actually use effective base type for the comparison.
409
410 2010-04-28  Marek Safar  <marek.safar@gmail.com>
411
412         A fix for bug #600326
413         * ecore.cs: Pass arity to base member lookup.
414
415 2010-04-28  Marek Safar  <marek.safar@gmail.com>
416
417         A fix for bug #573385
418         * expression.cs: MemberAccess is of generic type based on right
419         arity length only.
420
421 2010-05-28  Marek Safar  <marek.safar@gmail.com>
422
423         * cs-tokenizer.cs: Made tab size configurable.
424
425 2010-05-27  Marek Safar  <marek.safar@gmail.com>
426
427         * attribute.cs: Ensure Obsolete members are defined before doing
428         ctor look-up.
429
430 2010-05-27  Marek Safar  <marek.safar@gmail.com>
431
432         * visit.cs: Add DOM visitor skeleton.
433         
434         * *.cs: Updated.
435
436 2010-05-27  Marek Safar  <marek.safar@gmail.com>
437
438         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
439         
440 2010-05-27  Marek Safar  <marek.safar@gmail.com>
441
442         * *.cs: Major rewrite of compiler internals to better work with
443         unmodified System.Reflection.Emit. Some of the key changes are
444         - TypeSpec replaces reflection specific System.Type.
445         - All Type(TypeSpec) operations are now done in compiler therefore
446         no dependency on SRE to inflate generic members and types or to
447         query unclosed types.
448         - MemberCache is now the only and full hierarchical topology.
449         - Generic constraints are implemented properly.
450         - And as a bonus compilation is on average 30% faster.
451
452 2010-04-15  Jb Evain  <jbevain@novell.com>
453
454         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
455
456 2010-04-12  Marek Safar  <marek.safar@gmail.com>
457
458         * expression.cs, attribute.cs, parameter.cs: More attribute type
459         checks.
460
461 2010-04-12  Marek Safar  <marek.safar@gmail.com>
462
463         A fix for bug #593342
464
465         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
466         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
467         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
468         codegen.cs: Add custom attribute encoder to deal with unfinished
469         types and easier corlib bootstrap from its own types.
470
471 2010-03-26  Marek Safar  <marek.safar@gmail.com>
472
473         * cs-parser.jay: Report invalid constraint types.
474
475 2010-03-16  Jb Evain  <jbevain@novell.com>
476
477         * Makefile: rename the net_2_1 profile to moonlight.
478
479 2010-03-11  Marek Safar  <marek.safar@gmail.com>
480
481         * statement.cs, cs-parser.jay: Use correct location for empty
482         statements.
483
484 2010-03-11  Marek Safar  <marek.safar@gmail.com>
485
486         * cs-parser.jay: Disable Location from expression.
487         
488         * generic.cs: Check constraints for overrides in the parser.
489
490 2010-03-09  Marek Safar  <marek.safar@gmail.com>
491
492         * cs-parser.jay (GetLocation): Use an expression when available.
493
494 2010-03-04  Marek Safar  <marek.safar@gmail.com>
495
496         A fix for bug #582579
497         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
498
499 2010-03-04  Marek Safar  <marek.safar@gmail.com>
500
501         A patch by kornelpal@gmail.com
502         
503         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
504         compiler generated classes sealed by default. Emit and close top
505         level compiler generated classes as well. 
506         
507         * support.cs: Use RuntimeHelpers.GetHashCode.
508
509 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
510
511         * Makefile: We need to use the internal bootstrapping gmcs for
512         net_2_1_bootstrap too now.
513
514 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
515
516         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
517
518 2010-03-02  Marek Safar  <marek.safar@gmail.com>
519
520         * cs-tokenizer.cs: Missed few locations in previous fix.
521
522 2010-03-02  Marek Safar  <marek.safar@gmail.com>
523
524         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
525         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
526         Report correct location for operator errors.
527
528 2010-03-02  Marek Safar  <marek.safar@gmail.com>
529
530         * typemanager.cs (IsDynamicType): Don't check external types when
531         the attribute is not external.
532
533 2010-02-24  Marek Safar  <marek.safar@gmail.com>
534
535         A fix for bug #582579
536         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
537         modifiers.
538
539 2010-02-24  Marek Safar  <marek.safar@gmail.com>
540
541         A fix for bug #581804
542         * ecore.cs: Fixed type comparison.
543
544 2010-02-08  Miguel de Icaza  <miguel@novell.com>
545
546         * namespace.cs (CompletionGetTypesStartingWith): Do not include
547         private types in the completion results.
548
549         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
550         ... let ?"
551
552 2010-02-17  Marek Safar  <marek.safar@gmail.com>
553
554         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
555         constraint parsing.
556
557 2010-02-14  Miguel de Icaza  <miguel@novell.com>
558
559         * eval.cs: Do not do the report printer dance unless the user has
560         set the DescribeTypes feature.
561
562 2010-02-10  Marek Safar  <marek.safar@gmail.com>
563
564         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
565
566 2010-02-08  Marek Safar  <marek.safar@gmail.com>
567
568         A fix for bug #577029
569         * anonymous.cs: Fixed TypeBuilder* check.
570
571 2010-02-06  Miguel de Icaza  <miguel@novell.com>
572
573         * eval.cs (CompileBlock): Also undo if there are problems during
574         semantic analysis, fixes various cases where invalid C# code would
575         be reported, but the internal changes would not be undone.
576
577 2010-02-03  Miguel de Icaza  <miguel@novell.com>
578
579         * driver.cs: Change the --fatal flag to allow a number to be
580         passed, this ignores the first N fatal errors.   Useful to debug
581         errors that do not happen on the first hit.
582
583         * cs-parser.jay (invocation_expression): accept both the
584         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
585         inside an invocation.
586
587         * driver.cs: Expose FatalErrors.
588
589         * eval.cs: Initialize the printer's Fatal property from the
590         Driver's FatalError flag, this allows csharp --fatal to work
591         again. 
592
593         Add support for calling Describe (typeof (TYPE)) if the expression
594         entered is a TYPE.
595         
596 2010-02-02  Marek Safar  <marek.safar@gmail.com>
597
598         A fix for bug #574991
599         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
600         --lint.
601
602 2010-02-02  Marek Safar  <marek.safar@gmail.com>
603
604         A fix for bug #575986
605         * expression.cs: Don't mutate typeof type definitions.
606
607 2010-01-28  Marek Safar  <marek.safar@gmail.com>
608
609         * decl.cs: Use only one set of modifiers.
610
611 2010-01-26  Marek Safar  <marek.safar@gmail.com>
612
613         A fix for bug #573329
614         * eval.cs: Don't disable error reporting completely on silent mode.
615         
616 2010-01-25  Marek Safar  <marek.safar@gmail.com>
617
618         A fix for bug #573312
619         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
620         pointer index of unknown size types greater than 2.
621
622 2010-01-15  Marek Safar  <marek.safar@gmail.com>
623
624         * *.cs: Use only 1 member kind enum.
625
626 2010-01-15  Marek Safar  <marek.safar@gmail.com>
627
628         * *.cs: Add event specification.
629
630 2010-01-14  Marek Safar  <marek.safar@gmail.com>
631
632         * membercache.cs: Extracted from decl.cs.
633         
634         * *.cs: Put more infrastructure in place.
635
636 2010-01-13  Marek Safar  <marek.safar@gmail.com>
637
638         * *.cs: Add property specification, unused yet.
639
640 2010-01-13  Marek Safar  <marek.safar@gmail.com>
641
642         * property.cs: Move all property based declarations into a new file.
643
644 2010-01-13  Marek Safar  <marek.safar at gmail.com>
645
646         * expression.cs (Conditional): Resolve reduced expression.
647
648 2010-01-13  Marek Safar  <marek.safar at gmail.com>
649
650         * *.cs: Introduced non-generic method specification.
651
652 2010-01-07  Marek Safar  <marek.safar@gmail.com>
653
654         * method.cs: Move all method based declarations into a new file.
655
656 2010-01-07  Marek Safar  <marek.safar@gmail.com>
657
658         * *.cs: Extract field specification.
659
660 2009-12-17  Marek Safar  <marek.safar@gmail.com>
661
662         * field.cs: Extracted from class.cs
663
664 2009-12-15  Marek Safar  <marek.safar@gmail.com>
665
666         * attribute.cs (GetFixedBuffer): Work on field definition only.
667
668 2009-12-15  Marek Safar  <marek.safar@gmail.com>
669
670         * *.cs: Clean up NET_4_0 conditional where possible.
671
672 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
673
674         support.cs (DynamicType): Assembly property returns the assembly builder.
675         This is required due to how compiler context works in corlib.
676
677 2009-12-14  Marek Safar  <marek.safar@gmail.com>
678
679         A fix for bug #564376
680         * assign.cs (LocalTemporary): Removed no longer needed special
681         by-ref handling.
682
683 2009-12-11  Marek Safar  <marek.safar@gmail.com>
684
685         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
686         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
687         enum for easier debugging.
688
689 2009-12-10  Marek Safar  <marek.safar@gmail.com>
690
691         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
692         point.
693         
694         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
695         directly.
696
697 2009-12-10  Marek Safar  <marek.safar@gmail.com>
698
699         * cs-parser.jay, statement.cs: Handle parser error in code
700         completition.
701
702 2009-12-10  Marek Safar  <marek.safar@gmail.com>
703
704         * ecore.cs: Ignore base imported methods when they are already
705         in method bag.
706         
707         * eval.cs: Handle non-existent keys.
708         
709         * report.cs, driver.cs: Make fatal work with console printer only.
710
711 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
712
713         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
714
715 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
716
717         * typemanager.cs: Add MakeGenericMethod that checks if the method
718         is really the generic method definition.
719
720         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
721         to inflate generic methods.
722
723 2009-12-08  Marek Safar  <marek.safar@gmail.com>
724
725         A fix for bug #561149
726         * anonymous.cs: Use actual type parameters when checking for generic
727         method host.
728
729 2009-12-08  Marek Safar  <marek.safar@gmail.com>
730
731         A fix for bug #561369
732         * expression.cs (DoNumericPromotion): Fixed typo.
733
734 2009-12-08  Marek Safar  <marek.safar@gmail.com>
735
736         *.cs: Moving to generics world.
737
738         cs-parser.jay: Removed current_array_type.
739
740 2009-12-07  Marek Safar  <marek.safar@gmail.com>
741
742         *.cs: Moving to generics world.
743
744 2009-12-04  Marek Safar  <marek.safar@gmail.com>
745
746         *.cs: Moving to generics world (day 2).
747
748 2009-12-03  Marek Safar  <marek.safar@gmail.com>
749
750         *.cs: Moving to generics world.
751
752 2009-12-02  Marek Safar  <marek.safar@gmail.com>
753
754         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
755         Encode dynamic type attribute for elements where attributes cannot
756         be used.
757
758 2009-12-01  Marek Safar  <marek.safar@gmail.com>
759
760          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
761          arguments by ref.
762
763 2009-12-01  Marek Safar  <marek.safar@gmail.com>
764
765         A fix for bug #360455
766         * class.cs: Never report a unused warning for generic events to
767         workaround wrong expression type.
768
769 2009-11-30  Marek Safar  <marek.safar@gmail.com>
770
771         A fix for bug #558305
772         * decl.cs, class.cs: Check partial method definitions using correct
773         flag.
774
775 2009-11-30  Marek Safar  <marek.safar@gmail.com>
776
777         * argument.cs: Don't cache rarely used dynamic flag.
778
779 2009-11-27  Marek Safar  <marek.safar@gmail.com>
780
781         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
782
783 2009-11-27  Marek Safar  <marek.safar@gmail.com>
784
785         * ecore.cs (SimpleName): Removed no longer needed in_transit as
786         Resolve is now non-reentrant (saves ~0.6MB for corlib).
787
788 2009-11-26  Marek Safar  <marek.safar@gmail.com>
789
790         A fix for bug #545081
791         * decl.cs: Check private nested types of nested types recursively.
792
793 2009-11-26  Marek Safar  <marek.safar@gmail.com>
794
795         A fix for bug #558305
796         * location.cs: Ignore self referencing #line directive
797
798 2009-11-26  Marek Safar  <marek.safar@gmail.com>
799
800         A fix for bug #558292
801         * class.cs: Allow single unsafe fixed buffer fields.
802
803 2009-11-26  Marek Safar  <marek.safar@gmail.com>
804
805         * expression: Optimize few more zero-based operations.
806
807 2009-11-26  Marek Safar  <marek.safar@gmail.com>
808
809         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
810         avoids boxing of literal values.
811
812 2009-11-26  Marek Safar  <marek.safar@gmail.com>
813
814         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
815         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
816         codegen.cs: LocatedToken redesing to avoid excessive allocation and
817         boxing (saves ~7MB for corlib). Also fixes presise token location.
818
819 2009-11-25  Marek Safar  <marek.safar@gmail.com>
820
821         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
822         common data buckers.
823
824 2009-11-24  Marek Safar  <marek.safar@gmail.com>
825
826         * expression.cs: Lower static array initializer barrier.
827         
828         * support.cs, driver.cs: Share reader buffer.
829
830 2009-11-23  Marek Safar  <marek.safar@gmail.com>
831
832         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
833
834 2009-11-23  Marek Safar  <marek.safar@gmail.com>
835
836         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
837         cleanup some obsolete code.
838
839 2009-11-20  Marek Safar  <marek.safar@gmail.com>
840
841         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
842         Expression.Resolve.
843
844 2009-11-20  Marek Safar  <marek.safar@gmail.com>
845
846         * *.cs: Resolved expressions are never resolved again, this helps to
847         uncover some not easy to find bugs and improve the performance.
848
849 2009-11-19  Marek Safar  <marek.safar@gmail.com>
850
851         * *.cs: Made constant expressions fully compatible with any other
852         expression.
853
854 2009-11-19  Marek Safar  <marek.safar@gmail.com>
855
856         * *.cs: DoResolve is a worker method and has to be protected.
857
858 2009-11-18  Marek Safar  <marek.safar@gmail.com>
859
860         * *.cs: More context specific handling.
861
862 2009-11-17  Marek Safar  <marek.safar@gmail.com>
863
864         * *.cs: More context specific handling.
865
866 2009-11-16  Marek Safar  <marek.safar@gmail.com>
867
868         * dynamic.cs, class.cs: Removed few fixed user types conversions.
869         
870         * symbolwriter.cs: Uses public ILOffset.
871
872 2009-11-13  Marek Safar  <marek.safar@gmail.com>
873
874         A fix for bug #553650
875         * generic.cs: Another missing TypeToCoreType, still too many to fix.
876
877 2009-11-13  Marek Safar  <marek.safar@gmail.com>
878
879         A fix for bug #555170
880
881         * class.cs, delegate.cs, enum.cs: Constants have to be available
882         for parameters resolve.
883
884 2009-11-12  Marek Safar  <marek.safar@gmail.com>
885
886         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
887         arrays.
888
889 2009-11-12  Marek Safar  <marek.safar@gmail.com>
890
891         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
892         with a statically known candidate set.
893
894 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
895
896         * generic.cs: Made type inflation for generic constraint checks
897         recursive. This fixes BGO #553655.
898
899 2009-11-11  Marek Safar  <marek.safar@gmail.com>
900
901         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
902         checks.
903
904 2009-11-10  Marek Safar  <marek.safar@gmail.com>
905
906         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
907         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
908         attribute.cs: Add some dynamic error checking.
909
910 2009-11-07  Marek Safar  <marek.safar@gmail.com>
911
912         A fix for bug #553465
913
914         * expression.cs: Fixed mixed version of expression tree anonymous
915         type.
916
917 2009-11-06  Marek Safar  <marek.safar@gmail.com>
918
919         A fix for bug #553031
920
921         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
922         expression tree version of anonymous type with members declaration.
923
924 2009-11-05  Marek Safar  <marek.safar@gmail.com>
925
926         * parameter.cs: Handle nullable parameter default expression.
927         
928         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
929         class.cs, attribute.cs: Check for wrong dynamic arguments.
930
931 2009-11-05  Marek Safar  <marek.safar@gmail.com>
932
933         * statement.cs: Dynamic statements.
934
935 2009-11-04  Marek Safar  <marek.safar@gmail.com>
936
937         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
938         Compound assignments over dynamic type.
939
940 2009-11-03  Marek Safar  <marek.safar@gmail.com>
941
942         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
943         constructor arguments.
944
945 2009-10-30  Marek Safar  <marek.safar@gmail.com>
946
947         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
948         codegen.cs: Unary mutator on dynamic member access expression.
949
950 2009-10-29  Marek Safar  <marek.safar@gmail.com>
951
952         A fix for bug #550580   
953         * convert.cs: Don't eliminate explicit precission casts.
954
955 2009-10-28  Marek Safar  <marek.safar@gmail.com>
956
957         A fix for bug #550404
958         
959         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
960         expression.cs, statement.cs, ecore.cs: Quote any nested expression
961         tree.
962
963 2009-10-27  Marek Safar  <marek.safar@gmail.com>
964
965         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
966         constant.
967         
968         * class.cs: Allow nullable binary user operators.
969
970 2009-10-26  Marek Safar  <marek.safar@gmail.com>
971
972         * expression.cs: Move binary expression optimization at the end of
973         resolve.
974
975 2009-10-23  Marek Safar  <marek.safar@gmail.com>
976
977         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
978         Separate NullConstant from NullLiteral.
979
980 2009-10-23  Marek Safar  <marek.safar@gmail.com>
981
982         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
983         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
984         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
985         ModuleContainer. Add common unclosed member check routine.
986
987 2009-10-22  Marek Safar  <marek.safar@gmail.com>
988
989         * argument.cs: Use literal flag for real literals only.
990
991         * dynamic.cs: Use correct return type for custom delegates.
992
993 2009-10-22  Marek Safar  <marek.safar@gmail.com>
994
995         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
996         resolver.
997
998 2009-10-22  Marek Safar  <marek.safar@gmail.com>
999
1000         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
1001
1002 2009-10-21  Marek Safar  <marek.safar@gmail.com>
1003
1004         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
1005         conversion.
1006
1007 2009-10-21  Marek Safar  <marek.safar@gmail.com>
1008
1009         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
1010         binder flags.
1011
1012 2009-10-20  Marek Safar  <marek.safar@gmail.com>
1013
1014         * argument.cs, dynamic.cs, expression.cs: Latest API update.
1015
1016 2009-10-19  Marek Safar  <marek.safar@gmail.com>
1017
1018         * typemanager.cs, expression.cs: Dynamic array initializer.
1019
1020 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1021
1022         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
1023         is imported.
1024
1025 2009-10-16  Marek Safar  <marek.safar@gmail.com>
1026
1027         A fix for bug #493523, #507067
1028         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
1029         standard nullable conversion using underlying standard conversion
1030         and not full conversion.
1031
1032 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1033
1034         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
1035         type in VerifyArgumentsCompat.
1036
1037 2009-10-15  Marek Safar  <marek.safar@gmail.com>
1038
1039         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1040         Reject variable used with type arguments.
1041
1042 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1043
1044         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
1045         Implement dynamic expressions assignment.
1046
1047 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1048
1049         * expression.cs: Build underlying expression when resolving unary
1050         mutators.
1051
1052 2009-10-14  Marek Safar  <marek.safar@gmail.com>
1053
1054         * expression.cs: Emit enum array initializer using binary blob.
1055
1056 2009-10-08  Marek Safar  <marek.safar@gmail.com>
1057
1058         * typemanager.cs, constant.cs: Optimize decimal constants which fit
1059         to long range.
1060
1061 2009-10-07  Marek Safar  <marek.safar@gmail.com>
1062
1063         * typemanager.cs: Reset object_type.
1064         
1065         * assign: Made SimpleAssign public.
1066
1067 2009-10-06  Marek Safar  <marek.safar@gmail.com>
1068
1069         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
1070         invocation assembly to IsThisOrFriendAssembly.
1071
1072 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1073
1074         * expression.cs: Equality comparison of generic parameter with
1075         class constraint.
1076
1077 2009-10-05  Marek Safar  <marek.safar@gmail.com>
1078
1079         A fix for bug #543570
1080         * generic.cs: Import predefined constraints correctly.
1081
1082 2009-10-02  Marek Safar  <marek.safar@gmail.com>
1083
1084         * ecore.cs: Don't crash on overloads with optional paremeters where
1085         arguments count overflows.
1086         
1087         * parameter.cs: Import optional parameter constants using optional
1088         value type.
1089
1090 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1091
1092         * Makefile: Default is gmcs compiler.
1093
1094 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1095
1096         * cs-parser.jay: Fixed few NRE.
1097
1098 2009-10-01  Marek Safar  <marek.safar@gmail.com>
1099
1100         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
1101
1102 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1103
1104         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
1105         ShimExpression, ImplicitCast.
1106
1107 2009-09-30  Marek Safar  <marek.safar@gmail.com>
1108
1109         A fix for bug #542959
1110         * delegate.cs: Emit correct delegate instance variable when there
1111         are static and non-static overloads.
1112
1113 2009-09-29  Marek Safar  <marek.safar@gmail.com>
1114
1115         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
1116         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
1117
1118 2009-09-28  Marek Safar  <marek.safar@gmail.com>
1119
1120         A fix for bug #542487
1121         * ecore.cs: Resolve extension methods hidden by properties.
1122
1123 2009-09-25  Marek Safar  <marek.safar@gmail.com>
1124
1125         * expression.cs, ecore.cs: More dynamic binary expressions.
1126
1127 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1128
1129         * nullable.cs, expression.cs: Fixed null lifted conversion for
1130         bitwise enum operations.
1131
1132 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1133
1134         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
1135         values in checked context.
1136
1137 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1138
1139         * expression.cs, ecore.cs: Fixed array index constant conversion.
1140
1141 2009-09-20  Miguel de Icaza  <miguel@novell.com>
1142
1143         * expression.cs: Do not crash when MemberLookup returns something
1144         that is not a MemberExpr here.   Report error 582 instead. 
1145
1146         Fixes #499988.
1147
1148 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1149
1150         * decl.cs, class.cs: Check protected property accessors.
1151
1152 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1153
1154         * dynamic.cs, assign.cs: Dynamic compound assignment.
1155
1156 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1157
1158         * expression.cs: Fixed compound assignment explicit conversion.
1159
1160 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1161
1162         * expression.cs, ecore.cs: Cannot infer variables from method group.
1163
1164 2009-09-16  Marek Safar  <marek.safar@gmail.com>
1165
1166         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
1167         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
1168         codegen.cs: Dynamic binary operations scaffolding.
1169
1170 2009-09-15  Marek Safar  <marek.safar@gmail.com>
1171
1172         * expression.cs: Fixes nullable promotion for enum type variables.
1173
1174 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1175
1176         * driver.cs, dynamic.cs: Reset more static variables.
1177
1178 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1179
1180         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
1181         driver.cs: Introduced Expression::MakeExpression.
1182
1183 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1184
1185         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
1186
1187 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1188
1189         * eval.cs, report.cs: Use Console.Out for all eval error or warning
1190         output.
1191
1192 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1193
1194         A fix for bug #518707
1195         * expression.cs (Is): Optimize only generic parameter type
1196         expression probing value type generic parameter.
1197
1198 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1199
1200         A fix for bug #532571
1201         * ecore.cs: Check for simple name type arguments used with
1202         non-generic type.
1203
1204 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1205
1206         A fix for bug #497421
1207         * generic.cs (CheckConstraint): Don't use buildin types to check for
1208         parameterless constructor.
1209
1210 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1211
1212         A fix for bug #537402
1213         * generic.cs (CheckConstraint): Correctly inflate generic type
1214         arguments when checking generic method. 
1215
1216 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1217
1218         A fix for bug #536463
1219         * decl.cs (AddToContainer): Don't report collision between explicit
1220         and parameterless non-explicit members.
1221
1222 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1223
1224         * eval.cs: Reset more static stuff.
1225
1226 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1227
1228         A fix for bug #324625
1229         * expression.cs, ecore.cs: Create nested generic type expression
1230         using declaring and not current type.
1231
1232 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1233
1234         * *.cs: Changed Report class to accept various output printers and
1235         be an instance class. An expression resolver can now use different
1236         message reporter for each call and Report.Error can safely throw
1237         an exception. Part of ongoing work to turn mcs into proper library.
1238
1239 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1240
1241         * statement.cs, ecore.cs: Removed error reporting from emit code.
1242
1243 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1244
1245         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1246
1247 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1248
1249         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1250         parser checks out of constructors.
1251
1252 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1253
1254         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1255
1256 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1257
1258         A fix for bug #535448
1259         * anonymous.cs, class.cs: Copy return label between all contexts.
1260
1261 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1262
1263         A fix for bug #535395
1264         * namespace.cs: Resolve context can be null.
1265
1266 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1267
1268         A fix for bug #533912
1269         * generic.cs: Use correct context for constraints resolving.
1270
1271 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1272
1273         A fix for bug #532630
1274         * driver.cs: Trim conditional symbols.
1275
1276 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1277
1278         * context.cs: New file.
1279         
1280         * *.exe.sources, *.csproj: Updated.
1281
1282 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1283
1284         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1285         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1286         IMembercontext, some small cleanups.
1287
1288 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1289
1290         * *.cs: Split ResolveContext and EmitContext.
1291
1292 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1293
1294         * *.cs: Only ResolveContext implements IMemberContext.
1295
1296 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1297
1298         * *.cs: Renamed IResolveContext to IMemberContext.
1299
1300 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1301
1302         * *.cs: Detached ResolveContext from EmitContext.
1303
1304 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1305
1306         * codegen.cs: Moved flow-analysis to BlockContext.
1307
1308 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1309
1310         * *.cs: Detached BlockContext from EmitContext.
1311
1312 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1313
1314         * statement.cs: avoid nullref when the return value of GetEnumerator()
1315         does not contain any MoveNext() method.
1316
1317 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1318
1319         * *.cs: Removed IResolveContext::GenericDeclContainer.
1320
1321 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1322
1323         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1324
1325 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1326
1327         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1328         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1329
1330 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1331
1332         * *.cs: Removed boolean fields from EmitContext.
1333
1334 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1335
1336         * *.cs: Add IResolveContext::IsStatic.
1337
1338 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1339
1340         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1341
1342 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1343
1344         * *.cs: Removed DeclContainer from EmitContext.
1345
1346 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1347
1348         * *.cs: Add IResolveContext::CurrentTypeParameters.
1349
1350 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1351
1352         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1353
1354 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1355
1356         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1357         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1358
1359 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1360
1361         * decl.cs: Look in PartialContainer for parent type parameters.
1362
1363 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1364
1365         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1366         codegen.cs: Add IResolveContext::LookupTypeParameter.
1367
1368 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1369
1370         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1371         Moved resolved logic from Emit to Resolve.
1372
1373 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1374
1375         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1376         codegen.cs: Reworked atttributes handling of ResolveContext.
1377
1378 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1379
1380         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1381         LookupNamespaceOrType to ResolveContext.
1382
1383 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1384
1385         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1386         class.cs: Removed unused parameters and methods.
1387
1388 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1389
1390         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1391         codegen.cs: Finding the best common type of a set of expressions for
1392         lambda statements.
1393
1394 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1395
1396         * dynamic.cs, expression.cs: More dynamic conversions.
1397
1398 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1399
1400         * generic.cs: This loop was incorrect, it was increment ii, but
1401         checking for `i'.  This was a change introduced to fix #327497,
1402         now we fix #424012.
1403  
1404         * class.cs: Catch another case for cs0533 error, fixes #324782.
1405
1406 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1407
1408         * typemanager.cs (GetGenericArguments): SRE returns null for
1409         generic methods on type builder instances if they are not generic
1410         themselves. For example, for Foo<int>::Bar() it returns null, but
1411         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1412
1413 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1414
1415         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1416         delegate.cs: Work on dynamic binding.
1417
1418 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1419
1420         A second fix for bug #525342
1421         * class.cs: Attach partial method attributes to method
1422         implementation.
1423
1424 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1425
1426         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1427         restrictions.
1428         
1429         * rootcontext.cs: Default to langversion v4.
1430
1431 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1432
1433         * pending.cs: Check return type before member info is set.
1434
1435 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1436
1437         * anonymous.cs: Fully initialize generic hoisted field expression.
1438
1439 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1440
1441         * cs-parser.jay: Flag variables declared on the interactive shell
1442         as used to prevent the 168 warning about local variable not being
1443         used. 
1444
1445 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1446
1447         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1448         attribute.cs: Emit dynamic export attribute.
1449
1450 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1451
1452         * expression.cs: More verifier work.
1453
1454 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1455
1456         * nullable.cs: Fixed SRE crash during corlib compilation.
1457
1458 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1459
1460         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1461         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1462         More TypeManager.TypeToCoreType needed.
1463
1464 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1465
1466         * anonymous.cs: Update after recent SRE fixes.
1467
1468 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1469
1470         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1471         version of GetFieldHandle for fields of generic types.
1472
1473 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1474
1475         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1476         ecore.cs: Add TypeManager.IsDynamicType,
1477         PredefinedAttributes.Dynamic.
1478
1479 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1480
1481         A fix for bug #415375
1482         * expression.cs: Fixed object and reference type parameter
1483         comparison.
1484
1485 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1486
1487         A fix for bug #525342
1488         * class.cs: Attach partial method attributes to method
1489         implementation.
1490
1491 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1492
1493         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1494         Dynamic arguments.
1495
1496 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1497
1498         * anonymous.cs (MutateField): Add imported types handling.
1499
1500 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1501
1502         * expression.cs, delegate.cs: Moved arguments resolve into their
1503         counterparts expressions. Removed argument resolve from
1504         CollectionElementInitializer.
1505
1506 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1507
1508         A fix for bug #523683
1509         * convert.cs, delegate.cs: Use common overload mechanism for method
1510         group conversion check.
1511
1512 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1513
1514         A fix for bug #523899
1515         * generics.cs: Exact type inference with other bound types.
1516
1517 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1518
1519         Don't complain when the same type is implemented by the output
1520         assembly as well as multiple referenced assemblies
1521         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1522         'must_be_unique' flag.
1523         (GlobalRootNamespace): Update to changes.
1524         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1525         already have a type in hand.
1526
1527 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1528
1529         * expression.cs: More verifier instrumentation.
1530         
1531         * statement.cs: Do proper throw expression conversion.
1532
1533 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1534
1535         A fix for bug #522789
1536         * expression.cs: Mutate invocation return type.
1537
1538 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1539
1540         * anonymous.cs: Split assignable and readonly generated variable
1541         references.
1542
1543 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1544
1545         A fix for bug #521671
1546         * statement.cs: Fixed crash when checking missing type.
1547
1548 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1549
1550         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1551         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1552         class.cs, driver.cs: Work on dynamic binding.
1553
1554         * dynamic.cs: New file.
1555
1556         * *.sources, *.proj: Updated.
1557
1558 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1559
1560         * expression.cs (Conditional): Avoid double Resolve.
1561
1562 2009-07-13  Marcus Griep  <marcus@griep.us>
1563
1564         * ecore.cs: Fix obscure bug with resolving members of interfaces
1565         that hide parent interface members. Fixes bug #444388 and corrects
1566         bug #323096
1567
1568 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1569
1570         * expression.cs (LocalVariableReference): Bounce resolve.
1571
1572 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1573
1574         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1575         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1576         types to new class.
1577         
1578         * support.cs: New dynamic type wrapper.
1579
1580 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1581
1582         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1583         typed local variable.
1584
1585 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1586
1587         A fix for bug #519005
1588         * anonymous.cs: Use null_type as no return type placeholder.
1589
1590 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1591
1592         * generic.cs: Handle type inference of identical type parameters
1593         with different bounds.
1594
1595 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1596
1597         * expression.cs, class.cs: Events variance.
1598         
1599         * cs-parser.jay: Interface events error messages.
1600
1601 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1602
1603         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1604
1605 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1606
1607         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1608         parameter expression can be value-type New.
1609
1610         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1611
1612 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1613
1614         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1615         Implemented C# 4.0 named arguments.
1616
1617 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1618
1619         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1620         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1621         parameter modifier. Also fixes bug #515497.
1622
1623 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1624
1625         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1626         arguments expression to be implemented.
1627         
1628         *.sources: Add argument.cs
1629
1630 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1631
1632         * parameter.cs: Moved GetParameterIndexByName to base class.
1633         
1634         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1635         unused AType. Use argument's version of GetExpressionTree.
1636
1637 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1638
1639         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1640         arguments grammar.
1641
1642 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1643
1644         A fix for bug #514096
1645         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1646
1647 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1648
1649         * expression.cs: The first multi-dimensional array nested array
1650         initializers was not checked.
1651         
1652         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1653
1654 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1655
1656         A fix for bug #513400
1657         * nullable.cs (EmitEquality): Operands emit could be simplified for
1658         built-in types when we now emit user operators differently.
1659
1660 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1661
1662         * ecore.cs: Report inaccessible delegate methods correctly.
1663
1664 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1665
1666         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1667         cs-parser.jay: Implemented C# 4.0 optional parameters.
1668
1669 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1670
1671         * driver.cs: Removed broken DefineManifestResource.
1672
1673 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1674
1675         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1676         Use $(BOOTSTRAP_PROFILE) instead.
1677
1678 2009-06-12  Jb Evain  <jbevain@novell.com>
1679
1680         * rootcontext.cs: add a Platform field.
1681         * driver.cs: handle /platform.
1682         * codegen.cs: pass the proper flags according to
1683         the platform when saving the assembly.
1684
1685 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1686
1687         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1688         Add optional parameters grammar.
1689
1690 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1691
1692         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1693         driver.cs: Split lang version and metadata version.
1694
1695 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1696
1697         * decl.cs: Better overload ctor collision error message.
1698
1699 2009-06-05  Jb Evain  <jbevain@novell.com>
1700
1701         * driver.cs (EmbededResource): avoid using an internal method
1702         in gmcs to embed manifest resources.
1703
1704 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1705
1706         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1707         the compiler from older mono versions (like moon's bots)
1708
1709 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1710
1711         * namespace.cs (LookupTypeReflection): Ignore collisions between
1712         forwarded types.
1713
1714 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1715
1716         * codegen.cs: Enabled generic type forwarders.
1717
1718 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1719
1720         * dmcs.*: Add another version of SRE compiler.
1721
1722 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1723
1724         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1725         generic-mcs.cs: Fixed variant type conversions.
1726
1727 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1728
1729         A fix for bug #507863
1730         * codegen.cs: Fixes a crash on invalid string value attribute.
1731
1732 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1733
1734         A fix for bug #508334
1735         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1736         cs-parser.jay: Fully import __arglist modifier.
1737
1738 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1739
1740         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1741         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1742         actually work with closed generic types.
1743
1744 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1745
1746         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1747         Fix the build by replacing the use of 'var' with the actual type.
1748
1749 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1750
1751         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1752     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1753         declarations.
1754           
1755         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1756         filter.
1757
1758 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1759                         Marek Safar  <marek.safar@gmail.com>
1760
1761         A fix for bug #377509
1762         * parameter.cs: Use predefined and not empty name for implicit
1763         setters.
1764
1765 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1766
1767         * class.cs: Don't report wrong warnings for event fields.
1768
1769 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1770
1771         A fix for bug #504667
1772         * class.cs: Check for static class using parent container instead of
1773         parent type.
1774
1775 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1776
1777         A fix for bug #496922
1778         * expression.cs: Always use temporary variable when using object
1779         initializer.
1780
1781 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1782
1783         A fix for bug #495112
1784         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1785         local cache.
1786
1787 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1788
1789         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1790
1791 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1792
1793         * complete.cs: No idea how gonzalo got a null in the list, but
1794         avoid crashing.
1795
1796 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1797
1798         * complete.cs (CompletionElementInitializer): New completion class
1799         to support completing inside a C# 3 element initializer, so this
1800         allows completion for Silverlight situations where it is very
1801         common to do:
1802
1803         new TextBlock () { Fo<TAB>
1804
1805         (CompletionSimpleName): Expose the prefix that was
1806         passed to the simple name.
1807
1808         * cs-parser.jay (object_or_collection_initializer): Add support
1809         for element_initializers.
1810
1811         * expression.cs (CollectionOrObjectInitializers.DoResolve):
1812         special case completion expressions as this method aggressively
1813         collects data before it operates, and errors were being thrown
1814         earlier than we were able to complete.
1815
1816 2009-04-23  Miguel de Icaza  <miguel@novell.com>
1817
1818         * eval.cs: Make getcompletions silent and enable debugging output
1819         if the -v option is passed.
1820
1821         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
1822         Consider looking up the namespace that matches the prefix being
1823         used. 
1824
1825         This is part of the support for allowing completions like:
1826         `System.Co<TAB>' to complete to System.Console.
1827
1828         * complete.cs (CompletionSimpleName.AppendResults): Make this
1829         routine reusable.
1830
1831 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
1832
1833         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
1834         COMPLETE_COMPLETION as internal.
1835
1836 2009-04-17  Miguel de Icaza  <miguel@novell.com>
1837
1838         * complete.cs: Include namespace resolution in simple names as
1839         well as global types and types in the using scope in the
1840         resolution. 
1841
1842         * namespace.cs: Supporting infrastrcture to provide completions
1843         based on the current using scope. 
1844
1845         * eval.cs: Introduce an entry point that allows for initialization
1846         to return a list of the files passed on the command line.
1847
1848 2009-04-14  Marek Safar  <marek.safar@gmail.com>
1849
1850         A fix for bug #494243
1851         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
1852
1853 2009-04-13  Marek Safar  <marek.safar@gmail.com>
1854
1855         A fix for bug #493887
1856         * statement.cs: Don't skip string multi-section with default or
1857         null label when populating string hashtable.
1858
1859 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1860
1861         A fix for bug #492329
1862         * expression.cs (New): Load variable when assigning type parameter
1863         to ref variable.
1864
1865 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1866
1867         A fix for bug #488960
1868         * decl.cs: Compare MVAR types using non-null values.
1869
1870 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1871
1872         * typemanager.cs, expression.cs: Removed unused nullable checks.
1873
1874 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1875
1876         * *.cs: Removed some gmcs conditionals.
1877
1878 2009-03-26  Marek Safar  <marek.safar@gmail.com>
1879
1880         * generic.cs, support.cs: Moved generics stuff out of support.cs
1881
1882 2009-03-24  Marek Safar  <marek.safar@gmail.com>
1883
1884         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
1885         DeclaringType.
1886
1887 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1888
1889         * attribute.cs: Consider all members for error reporting when
1890         checking named arguments.
1891
1892 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1893
1894         A fix for bug #487625
1895         * namespace.cs: Use a warning for all predefined type conflicts.
1896
1897 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1898
1899         A fix for bug #485706
1900         * statement.cs: Explicitly type catch type argument to pass verifier
1901         check.
1902
1903 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1904
1905         Initial support to provide code completion facilities to consumers
1906         of the evaluator API.
1907         
1908         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
1909         support the completion engine.   When we reach the end of the
1910         input stream instead of returning EOF, when this flag is true the
1911         tokenizer instead produces:
1912
1913                 One GENERATE_COMPLETION token: this token then must be
1914                 handled in the grammar at every point where the user
1915                 would likely request a completion.
1916
1917                 As many COMPLETE_COMPLETION tokens as necessary.   These
1918                 tokens are generated to assist the parser in unwinding and
1919                 producing a valid parse tree.    
1920
1921         The parser rules do not have to be perfect, the parser needs to be
1922         augmented with judicious use of GENERATE_COMPLETION tokens to
1923         improve the areas where we can provide completion and the parser
1924         needs to add support for COMPLETE_COMPLETION tokens in productions
1925         to make them work.
1926
1927         It is common to not have enough support for COMPLETE_COMPLETION
1928         under certain rules and that even if we generated the
1929         GENERATE_COMPLETION token that the resulting tree will be invalid
1930         due to the missing rules that support COMPLETE_COMPLETION.
1931
1932         The final EOF token is produced by having the parser notify the
1933         tokenizer when it reaches the root production that the next token
1934         should be EOF.
1935
1936         * support.cs (CompletionResult): New Exception.   This exception
1937         is thrown to return the completion results when one of the special
1938         completion expressions is reached.
1939
1940         This exception is thrown by the completing ExpressionStatements
1941         classes that live in complete.cs
1942
1943         * complete.cs (CompletingExpression): a new base class for
1944         completing expressions.   This derives from the
1945         ExpressionStatement class and not from Expression as it allows
1946         completion to happen not only where expressions are expected in
1947         the grammar, but also where statements are expected.
1948
1949         (CompletionSimpleName): A new class used to provide completions
1950         for SimpleNames.     This currently only resolves to local
1951         variables from the evaluator context (GetVars call).
1952
1953         (CompletionMemberAccess): Implements support for completing member
1954         access patterns. 
1955
1956         * cs-parser.jay: Add support for completion in a few places. 
1957
1958         * eval.cs (GetCompletions): New public API for the evaluator that
1959         returns a list of possible completions given the input.   The
1960         return value is an array of completions 
1961
1962         * anonymous.cs (Compatible): If the exception thrown from the
1963         resolved expression is a CompletionResult exception let that one
1964         through instead of printing a diagnostic error in the try/catch. 
1965 <       
1966 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1967
1968         * 
1969
1970         * driver.cs (Main): Use Environment.Exit to quit quickly and
1971         prevent the compiler from doing the usual wait for helper thread
1972         to terminate.  
1973
1974         This is to prevent a slowdown that was reported by Gonzalo on
1975         ASP.NET 
1976
1977 2009-03-19  Marek Safar  <marek.safar@gmail.com>
1978
1979         * ecore.cs: Load build-in types directly instead of accessing
1980         an internal field.
1981
1982 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1983
1984         * ecore.cs: Always use unbox.any when available.
1985
1986 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1987
1988         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
1989
1990 2009-03-17  Marek Safar  <marek.safar@gmail.com>
1991
1992         * generic.cs: Removed obsolete version of type inference.
1993
1994 2009-03-16  Marek Safar  <marek.safar@gmail.com>
1995
1996         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
1997         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
1998         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
1999         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
2000
2001 2009-03-11  Marek Safar  <marek.safar@gmail.com>
2002
2003         A fix for bug #482996
2004         * anonymous.cs: Make sure we are not infering return type when
2005         checking type compatibility.
2006
2007 2009-03-11  Marek Safar  <marek.safar@gmail.com>
2008
2009         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
2010         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
2011         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
2012         attributes in their own structure. Needed when accessing their
2013         properties before they are resolved.
2014
2015 2009-03-09  Marek Safar  <marek.safar@gmail.com>
2016
2017         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
2018         hashtable (~10x faster).
2019         
2020         * driver.cs: Removed wrong Reset.
2021
2022 2009-03-08  Marek Safar  <marek.safar@gmail.com>
2023
2024         * class.cs: Use correct common base type for unmanaged delayed
2025         check.
2026
2027         * rootcontext.cs: Wrap unhandled exception.
2028
2029 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
2030
2031         Make SeekableStreamReader self-tuning and arbitrarily seekable
2032         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
2033         the buffer.
2034         (SeekableStreamReader.Position.set): Use it.  Simplify logic
2035         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
2036         buffer size when the stream needs to be re-read from the beginning.
2037
2038 2009-03-05  Marek Safar  <marek.safar@gmail.com>
2039
2040         A fix for bug #480100
2041         * parameter.cs: A parameter is not hoisted when used directly as ET.
2042
2043 2009-03-04  Marek Safar  <marek.safar@gmail.com>
2044
2045         * statement.cs: Fixed an issue when using variable is of interface
2046         type.
2047
2048 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2049
2050         A fix for bug #480319
2051         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
2052
2053 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2054
2055         A fix for bug #480867
2056         * typemanager.cs, expression.cs, ecore.cs: Changed method group
2057         expression to have no valid type.
2058
2059 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2060
2061         A fix for bug #481258
2062         * class.cs: Set extension method flag in partial container.
2063
2064 2009-03-03  Marek Safar  <marek.safar@gmail.com>
2065
2066         * statement.cs, typemanager.cs: Use expression for StringEmitter.
2067         
2068         * attribute.cs: Add sanity check.
2069
2070 2009-02-27  Marek Safar  <marek.safar@gmail.com>
2071
2072         * class.cs: Add external constructor error.
2073
2074 2009-02-26  Marek Safar  <marek.safar@gmail.com>
2075
2076         A fix for bug #475354
2077         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
2078         correctly user defined nullable equality operators.
2079
2080 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2081
2082         A fix for bug #479532
2083         * expression.cs: Implement NewInitialize::AddressOf.
2084
2085 2009-02-25  Marek Safar  <marek.safar@gmail.com>
2086
2087         A fix for bug #413633
2088         * expression.cs: Iterate all base class-constraint types.
2089
2090 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2091
2092         A fix for bug #479209
2093         * literal.cs: Mutate null underlying type.
2094
2095 2009-02-24  Marek Safar  <marek.safar@gmail.com>
2096
2097         A fix for bug #476295
2098         * convert.cs: Avoid wrapping implicitly convertible reference type.
2099
2100 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2101
2102         * iterators.cs: Create MemberName correctly.
2103
2104 2009-02-23  Marek Safar  <marek.safar@gmail.com>
2105
2106         A fix for bug #478655
2107         * literal.cs: Check also underlying null type conversion.
2108
2109 2009-02-21  Marek Safar  <marek.safar@gmail.com>
2110
2111         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
2112
2113 2009-02-20  Marek Safar  <marek.safar@gmail.com>
2114
2115         A fix for bug #477447
2116         * statement.cs: Add reference to correct parent storey when this
2117         is accessible from deep children storey (more than 1 level).
2118
2119 2009-02-19  Marek Safar  <marek.safar@gmail.com>
2120
2121         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
2122         * class.cs: Define base type members before setting up member cache.
2123
2124 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2125
2126         A fix for bug #477378
2127         * nullable.cs, expression.cs, statement.cs: More precise null type
2128         sanity checks.
2129
2130 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2131
2132         A fix for bug #472805
2133         * typemanager.cs, namespace.cs: Import only visible extension method
2134         types.
2135
2136 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2137
2138         A fix for bug #476895
2139         * attribute.cs: Use correct resolve context for attribute type.
2140
2141 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2142
2143         A fix for bug #476266
2144         * anonymous.cs: Mutate multi-dimensional arrays.
2145
2146 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2147
2148         A fix for bug #476400
2149         * statement.cs, expression.cs: Removed wrong Dispose optimization.
2150
2151 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2152
2153         A fix for bug #476811
2154         * generics.cs: Fixed null-literal check.
2155
2156 2009-02-17  Marek Safar  <marek.safar@gmail.com>
2157
2158         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
2159         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
2160         messing with static variables.
2161
2162 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2163
2164         A fix for bug #475965
2165         * generics.cs: Check generic parameter type after extracting from
2166         Expression<T>.
2167
2168 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2169
2170         A fix for bug #475823
2171         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
2172         typed-null support.
2173
2174 2009-02-14  Marek Safar  <marek.safar@gmail.com>
2175
2176         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
2177         Simplified event field definition using backing field and not
2178         field builder directly.
2179
2180         * expression.cs (EmitLdArg): Optimize fast paths.
2181
2182 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2183
2184         A fix for bug #475327
2185         * expression.cs (ArrayCreation): Don't mutate values optimized away.
2186
2187 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2188
2189         A fix for bug #475342
2190         * cs-parser.jay: Using 'super' instead of 'base' to call base
2191         constructor crashes compiler.
2192
2193 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2194
2195         A fix for bug #475354
2196         * expression.cs (Constantify): Add nullable types.
2197         
2198         * const.cs (EmitDecimalConstant): Avoid explicit cast.
2199
2200 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2201
2202         A fix for bug #475246
2203         * expression.cs: More broken flowanalysis hacking needed.
2204
2205 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2206
2207         * attribute.cs: Compare only ref/out array modifiers. 
2208
2209 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2210
2211         * statement.cs: Use member cache when looking for foreach members.
2212
2213 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2214
2215         * expression.cs: Don't expose internal initializer types.
2216         
2217         * statement.cs: Check also explicit conversions for goto case.
2218
2219 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2220
2221         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2222
2223 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2224
2225         * *.cs: Replace null-type with NullLiteral where appropriate.
2226
2227 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2228
2229         * expression.cs: Initializer of reference argument use temporary
2230         variable to be verifiable.
2231         
2232         * parameter.cs: Share EmitLdArg.
2233
2234 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2235
2236         A fix for bug #473559
2237         * class.cs: Fixed: Not reporting error about nested class with the
2238         same name.
2239
2240 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2241
2242         Contributed under the MIT/X11 license.
2243
2244         * generic.cs: Added VerifyVariantTypeParameters which performs new
2245         variance verification logic. The old logic, based on the spec, was
2246         wrong because the spec is full of LIES!
2247
2248         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2249
2250         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2251
2252         * class.cs:
2253         * ecore.cs: Added calls to the new variance verification logic.
2254
2255         * parameter.cs:
2256         * delegate.cs: Removed calls to the old variance verification logic.
2257
2258 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2259
2260         * delegate.cs: Use cached Invoke method directly.
2261
2262 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2263
2264         * expression.cs: Emit expression tree for hoisted variable access.
2265
2266 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2267
2268         * namespace.cs: Add better extension class check.
2269
2270 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2271
2272         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2273
2274 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2275
2276         This patch adds initial generic variance support to the compiler.
2277         It is contributed under the MIT/X11 license.
2278
2279         * typemanager.cs: Modified ImplementsInterface to check variance.
2280         Added VerifyVariantTypeParameters which checks the specified type to see
2281         if it uses a variant type parameter as a type argument (which is not
2282         allowed). Added IsVariantOf which determins if the first type is a
2283         variant of the second. NOTE: This only supports reference types at
2284         the moment to conform with the current level of VM support. When the
2285         VM supports value types, this will follow step.
2286
2287         * generic.cs: Added the Variance enum. Added a Variance property to
2288         TypeParameter and added variance support to definition phase. Added a
2289         Variance property to TypeParameterName. Also check to make sure that
2290         no variant types appear in generic method parameters.
2291
2292         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2293         keywords if the langversion supports it.
2294
2295         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2296         that variant types are only used in legal positions. Also added
2297         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2298         parameters.
2299
2300         * decl.cs: Construct TypeParameter with the variance information.
2301
2302         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2303         and ImplicitConversionStandard.
2304
2305         * rootcontext.cs: Added new "Future" language version.
2306
2307         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2308         type parameters are not used as type arguments in interface inheritance.
2309         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2310         parameters are not used as method return types. In MemberBase.
2311         ResolveMemberType, ensure that variant type parameters are not used
2312         as type arguments. Also call VerifyNoVariantTypeParameters on every
2313         set of parameters which are resolved.
2314
2315         * delegate.cs: Modified Delegate.Define to ensure that variant
2316         parameters are not used as type arguments and that a contravariant
2317         parameter is not used as the return type. Also call
2318         VerifyNoVariantTypeParameters on the delegate parameters.
2319
2320         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2321         to specify generic variance.
2322
2323         * driver.cs: Added support for LanguageVersion.Future in the form of
2324         "-langversion:future".
2325
2326         * generic-mcs.cs: Stubbed out new members in generic.cs.
2327
2328 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2329
2330         * class.cs, generic.cs: Emit type parameter constraints for nested
2331         types.
2332
2333 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2334
2335         A fix for bug #471213
2336         * class.cs: Avoid emitting backing field for abstract event fields.
2337
2338 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2339
2340         A fix for bug #359731
2341         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2342         expressions.
2343
2344 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2345
2346         A fix for bug #470767
2347         * statement.cs: Introduced BlockScopeExpression, needed when 
2348         expression tree conversion has to emit scope variables.
2349
2350 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2351
2352         * class.cs: Remove duplicate CallingConvention.
2353
2354 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2355
2356         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2357         when I finally found the right naming convention.
2358
2359 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2360
2361         * cs-tokenizer.cs: Put back different open parens optimization.
2362
2363 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2364
2365         A fix for bug #470227
2366         * cs-tokenizer.cs: Remove too agressive parser optimization.
2367
2368 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2369
2370         A fix for bug #324319
2371         * class.cs: Remove too early base type resolve.
2372
2373 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2374
2375         A fix for bug #324319
2376         * ecore.cs: Explicitly type null when assigning to type argument to
2377         make pass verifier check.
2378
2379 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2380
2381         * anonymous.cs: Fixed recent regression when initializing captured 
2382         this.
2383
2384 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2385
2386         A fix for bug #469019
2387         * anonymous.cs: Use all parent type parameters when instantiating
2388         nested generic storey.
2389
2390 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2391
2392         * expression.cs: Check for null instance methodgroup expression.
2393
2394 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2395
2396         A fix for bug #469244
2397         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2398         instance inside a conditional expression.
2399
2400 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2401
2402         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2403         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2404         GetElementType and HasElementType. IsValueType clean up.
2405
2406 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2407
2408         * nullable.cs: Use common EmitCall.
2409         
2410         * expression.cs: Emit constraint. for virtual calls only.
2411
2412 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2413
2414         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2415         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2416         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2417         checks.
2418
2419 2009-01-22  Jb Evain  <jbevain@novell.com>
2420
2421         * anonymous.cs: make anonymous types' ToString implementation
2422         match what csc outputs.
2423
2424 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2425
2426         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2427         up.
2428
2429 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2430
2431         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2432         verifier checks.
2433
2434 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2435
2436         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2437         expressions.
2438
2439 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2440
2441         A fix for bug #466634
2442         * statement.cs: Add reference for nested storey when only this
2443         is captured.
2444
2445 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2446
2447         A fix for bug #466474
2448         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2449         was specified.
2450
2451 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2452
2453         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2454         Fixed nested stories parent referencing process. Also fixes #463985.
2455
2456 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2457
2458         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2459         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2460         implementation. Also fixes #463108.
2461
2462 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2463
2464         A fix for bug #416109
2465         * decl.cs: Issue correct CLSAttribute warning location.
2466
2467 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2468
2469         A fix for bug #456775
2470         * attribute.cs: Use attribute owner scope when resolving attribute
2471         arguments.
2472
2473 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2474
2475         A fix for bug #457257
2476         * decl.cs: Fixed incorrect member declaring type comparison.
2477
2478 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2479
2480         A fix for bug #460896
2481         * driver.cs: Handle /RES resources as embeddable.
2482
2483 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2484
2485         A fix for bug #462515
2486         * ecore.cs: Report inacessible members upwards.
2487
2488 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2489
2490         A fix for bug #463190, #463192
2491         * decl.cs, namespace.cs: Also import internal extension classes.
2492
2493 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2494
2495         A fix for bug #463415
2496         * generic.cs: Use right index for RemoveDependentTypes.
2497
2498 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2499
2500         A fix for bug #463196
2501         * expression.cs: Fixed enum to null comparison.
2502
2503 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2504
2505         A fix for bug #463121
2506         * nullable.cs: Fixed nullable user equality operator comparison.
2507
2508 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2509
2510         A fix for bug #462950
2511         * class.cs, decl.cs: Use full explicit name when defining automatic
2512         property backing field.
2513
2514 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2515
2516         A fix for bug #462592
2517         * pending.cs: Emit type arguments for generic proxy method.
2518
2519 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2520
2521         * expression.cs (As): Mutate all type arguments.
2522
2523 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2524
2525         A fix for bug #462622
2526         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2527         context.
2528
2529 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2530
2531         A fix for bug #450782
2532         * ecore.cs: Consider more variables of form V.I to be fixed.
2533
2534 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2535
2536         A fix for bug #460712
2537         * typemanager.cs: Core types could be imported.
2538
2539 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2540
2541         A fix for bugs #460847, #460772, #458049, #457339, #447807
2542         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2543         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2544         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2545         user lambdas used inside query clauses.
2546
2547 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2548
2549         A fix for bug #460229
2550         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2551
2552 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2553
2554         A fix for bug #459952
2555         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2556
2557 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2558
2559         A fix for bug #459630
2560         * convert.cs: Enum to valuetype conversion is not allowed.
2561
2562 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2563
2564         A fix for bug #457087
2565         * generic.cs: Don't crash when constraint comes from type
2566         declaration.
2567
2568 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2569
2570         A fix for bug #459221
2571         * anonymous.cs, statement.cs: Delay only captured this
2572         initialization.
2573
2574 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2575
2576         A fix for bug #457489
2577         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2578         and initialization to capture scope initializers correctly.
2579
2580 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2581
2582         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2583         ParameterReference refactoring.
2584
2585 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2586
2587         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2588         to be imported from any assembly.
2589
2590 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2591
2592         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2593         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2594         from anonymous method and lambda expression.
2595
2596 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2597
2598         A fix for bug #448560
2599         * expression.cs (As): Box any generic type arguments to be
2600         verifiable.
2601
2602 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2603
2604         Add tripwire for implicit conversion bugs
2605         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2606         for CS1501 error.
2607         (MethodGroupExpr.OverloadResolve): Add sanity check between
2608         IsApplicable and VerifyArgumentsCompat.
2609         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2610
2611 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2612
2613         Fix build break in System.Data_test
2614         * convert.cs (ImplicitConversionExists): Move NullLiteral
2615         conversions ...
2616         (ImplicitStandardConversionExists): ... here.
2617
2618 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2619
2620         * literal.cs: Emit correctly explicit null to nullable cast.
2621
2622 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2623
2624         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2625         resolve.
2626
2627 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2628
2629         A fix for bug #449005
2630         * convert.cs, nullable.cs: Use only one implicit nullable
2631         conversion.
2632
2633 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2634
2635         * convert.cs, literal.cs: More Convert cleanup is needed.
2636
2637 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2638
2639         * decl.cs, class.cs: Fixed misleading error message.
2640
2641 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2642
2643         A fix for bug #449005
2644         * nullable.cs (EmitEquality): Disable optimization for user operator
2645         operands.
2646
2647 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2648
2649         A fix for bug #447027
2650         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2651         with context variables stored as expression instances.
2652
2653 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2654
2655         A fix for bug #447027
2656         * delegate.cs: Fixed delegate VerifyMethod logic.
2657
2658 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2659
2660         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2661         but not verifiable.
2662
2663 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2664
2665         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2666         member type resolve to follow normal flow, instead of random
2667         property access.
2668
2669 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2670
2671         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2672         type.
2673
2674 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2675
2676         * const.cs: Emit decimal array constant as literal.
2677
2678 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2679
2680         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2681
2682 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2683
2684         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2685         into real property (saves 8 MB for corlib compilation).
2686
2687 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2688
2689         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2690         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2691         generic-mcs.cs: Small cleanup of TypeArguments.
2692
2693 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2694
2695         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2696         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2697         of ConstructedType expression, renamed to GenericTypeExpr.
2698
2699 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2700
2701         A fix for bug #445303
2702         * location.cs (IsConditionalDefined): Handle undefined global
2703         defines.
2704
2705 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2706
2707         A fix for bug #444678
2708         * expression.cs (TryReduceConstant): Always create new constant
2709         instance.
2710
2711 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2712
2713         A fix for bug #444673
2714         * ecore.cs: Ignore open generic types when used as generic type
2715         instance fields.
2716
2717 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2718
2719         A fix for bug #445458
2720         * expression.cs, cs-parser.jay: Don't crash when an expression
2721         statement is null.
2722
2723 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2724
2725         A fix for bug #445464
2726         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2727         inside unbound type.
2728
2729 2008-11-14  Jb Evain  <jbevain@novell.com>
2730
2731         * driver.cs: ignore empty -nowarn argument such as
2732         the one in -nowarn:12,13,,.
2733
2734 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2735
2736         A fix for bug #444271
2737         * anonymous.cs: Rescan parent storeys when best candidate was
2738         undone.
2739
2740 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2741
2742         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2743         useless UnboundTypeExpression.
2744         
2745         * attribute.cs: Do check obsolete attribute on generic types.
2746
2747 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2748
2749         A fix for bugs #425680, #400139
2750         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2751         refactoring.
2752
2753 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2754
2755         A fix for bug #435747
2756         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2757         compound value types assignment. Few micro optimizations added.
2758
2759 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2760
2761         A fix for bug #442610
2762         * anonymous.cs (MutateConstructor): More SRE hacking.
2763
2764 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2765
2766         A fix for bug #442579
2767         * ecore.cs: Also initialize expanded form of a method with 1 params
2768         parameter.
2769
2770 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2771
2772         * expression.cs (UnaryMutator): Do early l-side check.
2773
2774 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2775
2776         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2777         Init, otherwise we would crash later on when checking for friend
2778         assemblies. 
2779
2780         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2781         Otherwise we never get any meaningful information as to what
2782         failed. 
2783
2784 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2785
2786         A fix for bug #436318
2787         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2788
2789 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2790
2791         * namespace.cs: Turns out that it was a really bad idea to hide
2792         the errors for namespaces not found here in eval mode.    
2793
2794         * eval.cs: When we process using clauses, only enter those into
2795         the list of valid using clauses after they have been validated.   
2796
2797         The above change gives the proper semantics: it does not
2798         senselessly report the same errors with broken using statements by
2799         never storing them in the first place when they are invalid.
2800
2801 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2802
2803         A fix for bug #421839
2804         * cs-parser.jay: Remove expression from coalesce rule to force lower
2805         priority than the assignment operator.
2806
2807 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2808
2809         A fix for bug #437875
2810         * nullable.cs: Compile correctly method group operand used with null
2811         coalescing operator.
2812
2813 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2814
2815         A fix for bug #434589
2816         * expression.cs (Binary): Ignore lifted conversions when at least
2817         one operand is of reference type.
2818
2819 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2820
2821         * cs-parser.jay: Better syntax error report.
2822
2823 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2824
2825         A fix for bug #436792
2826         * cs-parser.jay: Use GetLocation to access location.
2827
2828 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2829
2830         A fix for bug #440774
2831         * cs-parser.jay: Also set current_array_type when parsing local
2832         variables types.
2833
2834 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2835
2836         A fix for bug #440785
2837         * expression.cs (As): Don't resolve self modifing expression
2838         multiple times.
2839
2840 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2841
2842         A fix for bug #439447
2843         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
2844
2845 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2846
2847         A fix for bug #437571
2848         * cs-parser.jay: Fixes internal error for invalid expression
2849         statements.
2850
2851 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2852
2853         * ecore.cs: Resolve correctly ambiguous params delegate methods.
2854
2855 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2856
2857         * generic.cs, anonymous.cs: Simplified GetDeclarations.
2858
2859 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2860
2861         * cs-tokenizer.cs: More precise cast parsing.
2862
2863 2008-10-16  Martin Baulig  <martin@ximian.com>
2864
2865         * anonymous.cs (AnonymousMethodStorey): Put back the
2866         `hoisted_locals' hashtable and use it in EmitType().
2867
2868 2008-10-15  Marek Safar  <marek.safar@gmail.com>
2869
2870         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
2871         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
2872         ~5MB for corlib.
2873
2874 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2875
2876         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
2877
2878 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2879
2880         * statement.cs: Mutate scope initializers.
2881
2882 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2883
2884         * expression.cs: Use typeless value for This constant.
2885         
2886         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
2887
2888 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2889
2890         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
2891         tokenizer.
2892
2893 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2894
2895         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
2896         type to type cast.
2897
2898 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2899
2900         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
2901         parser and tokenizer. Fixes many ambiguities including #433258.
2902
2903 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2904
2905         * cs-parser.jay: Fixed missing accessor recovery.
2906
2907 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2908
2909         A fix for bug #433701
2910         * expression.cs: Better error message.
2911
2912 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2913
2914         * cs-parser.jay, expression.cs: Start reporting real parser errors.
2915         
2916         * Makefile: Disabled unused debug symbols.
2917
2918         Also fixes: #320556, #321097, #321656, #321876, #351316
2919
2920 2008-10-09  Miguel de Icaza  <miguel@novell.com>
2921
2922         * eval.cs: rename "<interactive>" to "{interactive}", to work
2923         around a requirement in the compiler that this be a valid
2924         filename, and in Windows it is not (433886).
2925
2926 2008-10-09  Marek Safar  <marek.safar@gmail.com>
2927
2928         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
2929
2930 2008-10-08  Marek Safar  <marek.safar@gmail.com>
2931
2932         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
2933         cs-parser.jay: Generic type declaration and type arguments cleanup.
2934
2935 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2936
2937         * cs-parser.jay: Allow parsing weird array creation construct.
2938
2939 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2940
2941         * cs-parser.jay: Conflicts reduction.
2942
2943 2008-10-04  Marek Safar  <marek.safar@gmail.com>
2944
2945         * cs-parser.jay: Conflicts reduction.
2946
2947 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
2948
2949         Fix #398325
2950         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
2951         property.  Add a 'count' hint about the use of the shared vector.
2952         Ensure that we don't leak out dirty bits.
2953         (UsageVector.MergeChild): Throw away information about variables
2954         in child vectors.
2955         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
2956
2957 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2958
2959         A fix for bug #431746
2960         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
2961         parameters when iterator is created.
2962
2963 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2964
2965         A fix for bug #431827
2966         * expression.cs: Fixed right based pointer arithmetic operations
2967         emit.
2968
2969 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2970
2971         A fix for bug #353779
2972         * assign.cs, expression.cs: Fixed compound assignment conversions.
2973
2974 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2975
2976         A fix for bug #375262
2977         * statement.cs: Refactor ArrayForeach to be usable with string
2978         indexer. Optimized single dimentional arrays foreach.
2979
2980 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2981
2982         A fix for bug #431255
2983         * anonymous.cs, expression.cs: Removed broken optimization.
2984
2985 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2986
2987         * anonymous.cs: Use full type parameters of parent generic
2988         containers. Removed unnecessary AddParentStoreyReference call.
2989
2990 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2991
2992         A fix for bug #324702
2993         * class.cs: Use better shorter names for explicit interface member
2994         implementations.
2995
2996         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
2997
2998 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2999         
3000         * expression.cs: Use new interface to check fixed expression.
3001
3002 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3003
3004         A fix for bug #421101
3005         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
3006         interface to check for fixed fixed-buffers.
3007
3008 2008-10-01  Marek Safar  <marek.safar@gmail.com>
3009
3010         A fix for bug #429264
3011         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
3012         
3013         * delegate.cs: Removed unnecessary casts.
3014
3015 2008-09-30  Marek Safar  <marek.safar@gmail.com>
3016
3017         A fix for bug #352151
3018         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
3019         class.cs: Fixed already defined explicit interface members check.
3020
3021 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3022
3023         cs-tokenizer.cs: Fix typo.
3024
3025 2008-09-28  Miguel de Icaza  <miguel@novell.com>
3026
3027         * eval.cs (InteractiveBase): The quit command now just sets a
3028         flag, instead of calling Environment.Exit(), it is milder on
3029         embedded hosts. 
3030
3031         CompiledMethod is now in Mono.CSharp, not nested inside
3032         the Evaluator, it was inconvenient to use.
3033
3034 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3035
3036         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
3037         code to be invoked without having to reparse.
3038
3039 2008-09-27  Miguel de Icaza  <miguel@novell.com>
3040
3041         * ecore.cs: The recent changes to FieldExpr broke this as well.
3042         Fixes LINQ queries in the interactive shell.
3043
3044         * Multiple files: indentation fixing for the Mono coding
3045         guidelines for the switch statement.
3046
3047         * eval.cs: Make the Evaluator API thread safe.
3048
3049 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3050
3051         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
3052         constructor parsing.
3053
3054 2008-09-26  Marek Safar  <marek.safar@gmail.com>
3055
3056         A fix for bug #325326
3057         * statement.cs: Check possible mistaken empty statement using
3058         explicit blocks only.
3059
3060 2008-09-25  Miguel de Icaza  <miguel@novell.com>
3061
3062         * eval.cs (LoadAssembly, ReferenceAssembly): Call
3063         RootNamespace.ComputeNamespaces to update the internal list of
3064         namespaces, this is no longer done for us.
3065
3066         (InteractiveBase): Use the Evaluator APIs instead of calling into
3067         Driver directly
3068
3069 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3070
3071         A fix for bug #429264
3072         * expression.cs: Missing mutator for access to multidimensional
3073         arrays.
3074
3075 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3076
3077         * class.cs, statement: Emit DebuggerHidden attribute for iterator
3078         entry wrapper.
3079         
3080         * driver.cs: Missing input argument check.
3081
3082 2008-09-25  Marek Safar  <marek.safar@gmail.com>
3083
3084         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
3085         expression.cs, statement.cs, rootcontext.cs, class.cs, 
3086         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
3087         DefineMembers.
3088
3089 2008-09-24  Miguel de Icaza  <miguel@novell.com>
3090
3091         * ecore.cs (FieldExpr): Only initialize eclass when we return a
3092         fully constructed FieldExpr, fixes the regression introduced in
3093         the last commit.
3094         
3095         * ecore.cs, expression.cs: Plug back the eclass initialization as
3096         otherwise it regresses `csharp'. 
3097
3098 2008-09-24  Marek Safar  <marek.safar@gmail.com>
3099
3100         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
3101         ecore.cs, attribute.cs: Moved obsolete method checks from emit
3102         phase to resolve phase. It resolves problems with expression trees
3103         and fixes bugs #323796, #325156.
3104
3105 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3106
3107         * codegen.cs: Report better error when symbol writer is missing.
3108
3109 2008-09-23  Marek Safar  <marek.safar@gmail.com>
3110
3111         * codegen.cs: Set .NET symbol writer.
3112         
3113         * decl.cs: Guard against null generic arguments.
3114         
3115         * report.cs: Don't report exactly same additional details.
3116
3117 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3118
3119         A fix for bug #324917
3120         * cs-parser.jay: Add missing multidimensional non-expression type
3121         ranks.
3122         
3123 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3124
3125         A fix for bug #428191
3126         * anonymous.cs: Create an outer generic fields also for non-storey
3127         anonymous methods.
3128
3129 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3130
3131         A fix for bug #378294
3132         * class.cs: Make fixed size buffers gmcs feature only.
3133
3134 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3135
3136         A fix for bug #355622, #324993
3137         * assign.cs, const.cs, class.cs: Create new EmitContext for each
3138         field initializer.
3139
3140 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3141
3142         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
3143         error reporting.
3144
3145 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3146
3147         A fix for bug #416110
3148         * generic.cs: Struct constraint results in default ctor and
3149         ValueType base type constraint to be set.
3150
3151 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3152
3153         A fix for bug #423791
3154         * generic.cs: Fixed params output type type-inference.
3155
3156 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3157
3158         * cs-parser.jay, expression.cs: Fixed few expression crashes.
3159         
3160 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3161
3162         * cs-tokenizer.cs: Don't break on extra partial modifier.
3163
3164 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3165
3166         A fix for bug #427592
3167         * generic.cs: Use common parameter resolve method.
3168
3169 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3170
3171         A fix for bug #414758
3172         * expression.cs, ecore.cs: Fixed crash when accessing non-static
3173         property.
3174
3175 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3176
3177         * driver.cs, namespace.cs: Read types and namespaces after all
3178         requested assemblies are loaded, fixes issues with System.Core
3179         auto-reference, and #419888.
3180
3181 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3182
3183         A fix for bug #417705
3184         * cs-parser.jay: Fixed as/is operator expression split.
3185
3186 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3187
3188         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
3189         Fixed expression tree representation of empty new expression and
3190         new initializer expression.
3191
3192 2008-09-18  Miguel de Icaza  <miguel@novell.com>
3193
3194         * eval.cs: Remove warning, keep reference to driver around.
3195
3196         * Hide fields that do not need to be public.
3197
3198 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3199
3200         A fix for bug #426385
3201         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
3202         conversion for array elements.
3203
3204 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3205
3206         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
3207         void parsing conflicts.
3208
3209 2008-09-15  Marek Safar  <marek.safar@gmail.com>
3210
3211         A fix for bug #425601
3212         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
3213         System.Core only when there is no custom ExtensionAttribute
3214         implementation.
3215
3216 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3217
3218         * namespace.cs: Do not report CS0246 (name
3219
3220 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3221
3222         A fix for bug #425669
3223         * generic.cs: Don't cache generic static anonymous method 
3224         containers.
3225
3226 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3227
3228         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3229         conflicting constraints.
3230
3231 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3232
3233         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3234         mcs too.
3235
3236 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3237
3238         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3239         to null pointer conversion fixes.
3240
3241 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3242
3243         * cs-parser.jay, expression.cs: An implicitly typed local variable
3244         declarator cannot use an array initializer.
3245
3246 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3247
3248         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3249
3250 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3251
3252         * generic.cs (InflatedConstraints): Don't crash when constraints
3253         are different.
3254         
3255         * cs-parser.jay: const_declarator is a block.
3256
3257         * constant.cs: Check for not allowed NaN conversions.
3258
3259 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3260
3261         * driver.cs: Drop --shell argument, the compiler is no longer a
3262         REPL. 
3263
3264         * eval.cs: Move most of the code that deals with evaluation into
3265         this file and document the public API from repl.cs
3266
3267         * repl.cs: Remove from here.
3268         
3269 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3270
3271         A fix for bug #424684
3272         * generic.cs: Generic class constraints must come first.
3273
3274 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3275
3276         * cs-parser.jay: Improve error reporting for syntax errors in
3277         statements and expressions, we now report the expected tokens
3278         instead of reporting the useless "; expected".
3279
3280         Drop the strings from the token declaration, it turns out that
3281         they did not do what I thought they did.  Instead they were adding
3282         two sets of tokens to the tables.
3283
3284 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3285
3286         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3287         delegate.cs: Share special type check.
3288
3289 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3290
3291         A fix for bug #423981
3292         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3293
3294 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3295
3296         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3297         ConvertImplicitly.
3298
3299 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3300
3301         A fix for bugs: #324750, #335946
3302         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3303         lookup rule to determine ?-based tokens.
3304
3305 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3306
3307         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3308         expressions (like event adding or removing) end up here, so we
3309         need to treat those as statements.
3310
3311         Add LoadAssembly method.
3312
3313 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3314
3315         * repl.cs: Add Time method.
3316
3317 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3318
3319         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3320
3321 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3322
3323         * repl.cs: Add workaround for old compilers.
3324
3325 2008-09-04  Jb Evain  <jbevain@novell.com>
3326
3327         * repl.cs (PrettyPrint): pretty print everything that
3328         implements IDictionary, as well as IEnumerables. Also,
3329         add a quit helper property.
3330
3331 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3332
3333         * constant.cs: Better error reporting for decimal literals.
3334         
3335         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3336         field attributes.
3337         
3338 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3339                         Miguel de Icaza  <miguel@novell.com>
3340
3341         A fix for bug #422951
3342         * assign.cs (Assign.DoResolve): Perform the type conversions
3343         checks before we attempt to initialize `New' initializers. 
3344
3345 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3346
3347         A fix for bug #422853
3348         * delegate.cs (DelegateCreation): Add special handling for
3349         EmptyExpression.Null instance expression which is just another
3350         hack for undecided member instance exression.
3351
3352 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3353
3354         * expression.cs, ecore.cs: Emit full expression tree for reduced
3355         binary expressions.
3356
3357 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3358
3359         * expression.cs (This): Guard against multi-resolving.
3360         
3361         * ecore.cs, statement.cs (Throw): Simplified.
3362         
3363         * flowanalysis.cs: Also verify event fields.
3364
3365 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3366
3367         * assign.cs (Assign.DoResolve): Perform the type conversions
3368         checks before we attempt to initialize `New' initializers. 
3369
3370         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3371
3372         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3373         public. 
3374
3375         * repl.cs: Update help.
3376
3377 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3378
3379         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3380         handling of the default config handling, including the special
3381         treatment of System.Core assembly. 
3382
3383         Fixes the REPL processing for LINQ.
3384
3385 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3386
3387         A fix for bug #422507
3388         * expression.cs (UnboxCast): Add missing child expression mutator.
3389
3390 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3391
3392         * driver.cs: Don't self reference System.Core assembly.
3393
3394 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3395
3396         A fix for bug #422507
3397         * expression.cs (StringConcat): Add missing type mutator.
3398
3399 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3400
3401         * generic.cs (TypeInferenceContext): Follow equality rule for
3402         constructed type lower bound type inference.
3403
3404 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3405
3406         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3407         <dblank@cs.brynmawr.edu> which updates the cursor position on
3408         refresh.
3409         
3410 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3411
3412         A fix for bug #367145
3413         * driver.cs: Fixed import of extension methods when using -noconfig
3414         option.
3415
3416 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3417
3418         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3419         version from non-generic implementation instead.
3420
3421 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3422
3423         A fix for bug #418908
3424         * class.cs: Use AddScopeStatement for field initializers.
3425
3426 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3427
3428         A fix for bug #415385
3429         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3430
3431 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3432
3433         A fix for bug #421736
3434         * iterators.cs: Don't crash on unreachable iterators.
3435
3436 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3437
3438         A fix for bug #421628
3439         * parameter.cs, attribute.cs: Clone also parameter attributes.
3440
3441 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3442
3443         * namespace.cs (LookupType): In EvalMode, try to replace
3444         the TypeBuilder from our cache with a Type as Reflection.Emit does
3445         not  like to mix code from older assemblies emitted and new
3446         assemblies emitted. 
3447
3448         This sounds like a serious Mono bug that prevents multiple
3449         assemblies to be generated and consumed at the same time.
3450
3451         * cs-parser.jay (push_current_class): Do not make interactive
3452         classes internal or private, make them public as we currently
3453         generate each new class in a new assembly.   
3454
3455 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3456
3457         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3458         remove types that are entered into the global namespace during
3459         parsing so that we can remove them on failure.
3460  
3461         * cs-parser.jay: Parsing: we now keep track of types that are
3462         entered into global variables and queue those in case the parsing
3463         or resolution fail.
3464  
3465         This happens in a few situations: during partial-input, we invoke
3466         the parser repeatedly for example with the string "class X", this
3467         would cause X to be registed, and we need to remove this
3468         registration so that another parse attempt later with say "class X {"
3469         would actually work.
3470  
3471         Additionally, if there is an error in the resolution phase, for
3472         example: "class X : NonExistant {}" th
3473         
3474         * cs-parser.jay: Be more precise with the errors being raised,
3475         instead of flagging all exceptions during parsing to be attributed
3476         to the parsing process, distinguish those from errors happening in
3477         the actions and hint that using -v would produce the actual
3478         exception. 
3479
3480         * repl.cs: Do not load all compiler references on each reset,
3481         doing the partial reset takes care of this.
3482         
3483 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3484
3485         * repl.cs: Add support for loading all the files from
3486         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3487         as shell libraries.
3488
3489         Introduce a micro-parser that is able to deambiguate on its input
3490         whether we are dealing with a compilation unit (namespace, class,
3491         interface, struct, delegate) declaration or a statement.   This
3492         allows both declarations and statements to be entered. 
3493
3494         Set history size by default to 300 lines.
3495
3496         Instead of distinguishing based on the parser.InteractiveResult,
3497         have only two cases: statements were parsed, or a compilation unit
3498         was.   Always pull the Using statement additions from the
3499         compilation unit parse.
3500         
3501         * cs-tokenizer.cs: Rename tokens to better describe their intent
3502         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3503         
3504         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3505         EvalMode is used to trigger the lookup of global variables while
3506         StatementMode is used turn variable declarations into static
3507         fields.
3508
3509         * getline.cs: Allow history size to be set.
3510         
3511 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3512
3513         A fix for bug #360755
3514         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3515
3516 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3517
3518         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3519         
3520         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3521         member name, it is too confusing
3522         
3523         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3524         
3525         * rootcontext.cs: Finally default to warning level 4.
3526
3527 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3528
3529         * class.cs (CheckBase): Ignore overloaded operators.
3530
3531 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3532
3533         A fix for bug #420830
3534         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3535
3536 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3537
3538         A fix for bug #420832
3539         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3540
3541 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3542
3543         A fix for bug #420386
3544         * nullables.cs: Fixed logic of nullable user comparison operators involving
3545         null values.
3546
3547 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3548         
3549         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3550
3551 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3552
3553         * repl.cs: Add support for aborting the running code with C-c. 
3554
3555 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3556
3557         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3558
3559 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3560
3561         * cs-parser.jay (interactive_statement_list): A new set of rules
3562         for hosting statements that uses the "interactive_" prefix.   
3563
3564         * repl.cs: Add support for parsing `using' as a statement or as a
3565         directive.  Deambiguating before passing this to the parser.
3566
3567         We need to distinguish statement_expressions that occur at the
3568         toplevel vs those that occur embedded into expressions.
3569
3570         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3571         that fixes the cursor key handling, and a history bug.
3572         
3573 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3574
3575         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3576         limitations in Console, instead the 2.0 bootstrap libraries now
3577         include the Console bits.
3578
3579         Also, remove the use of Nullables from getline.cs
3580
3581         ------------
3582         
3583         Interactive support for the C# compiler.   Use gmcs --shell to
3584         enter a read-eval-print loop shell.
3585
3586         Docs: http://www.mono-project.com/CsharpRepl
3587         
3588         * sources: include repl.cs here and getline.cs for gmcs.exe,
3589         everything else is getline.cs impaired.
3590
3591         * Makefile: when bootstrapping pass a special flag
3592         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3593         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3594         This distinguishes those two cases.
3595
3596         * repl.cs: Support for a read-eval-print loop.   Will be soon
3597         refactored into eval support and then REPL on top of it.
3598
3599         * ecore.cs: If a simplename lookup fails, before erroring out,
3600         if we are in EvalMode to resolve the name to a declaration in the
3601         Eval-land.    
3602
3603         This means that variable declarations that happened in previous
3604         classes (as repl puts every statement in a separate class) are
3605         made visible in this way.
3606
3607         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3608         triggered an error due to the end of file being reached.   This is
3609         used to do multi-line input, and notify the caller that the user
3610         needs to provide more text before a successful parse.
3611
3612         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3613         to drive the evaluation with a custom wrapper. 
3614
3615         * driver.cs: Add support for --shell, and refactor some code to be
3616         reused from repl.cs
3617         
3618         * namespace.cs: Add support for serializing the contents of the
3619         namespaces and reloading them.  
3620
3621         * getline.cs: A managed implementation of ReadLine under
3622         X11/Apache2 license terms.  Easy to embed in other applications as
3623         well.
3624
3625         * namespace.cs: Add some functions to save and restore the
3626         namespace state.
3627
3628         * rootcontext.cs: New public field.
3629
3630         * cs-tokenizer.cs: Add support for one of the possible characters
3631         we introduce into the token stream.  
3632
3633         This patch does not affect the regular tokenization process, the
3634         only performance hit would happen if there is an invalid character
3635         on the input string.
3636
3637         * support.cs: Move isatty helper routine here.
3638
3639         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3640         code generator for in-memory assemblies.
3641
3642 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3643
3644         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3645         parameter cannot be always used as a type.
3646
3647 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3648
3649         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3650
3651 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3652
3653         * convert.cs: Implement explicit array to IList<T> conversion.
3654
3655 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3656
3657         A fix for bug #362740
3658         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3659
3660 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3661         
3662         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3663         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3664         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3665         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3666         handling to use just one type of infrastructure and deal with generics
3667         more effectivelly.
3668
3669 2008-07-23  Martin Baulig  <martin@ximian.com>
3670
3671         *** Merged this from trunk revision 108527 ***
3672
3673         * statement.cs
3674         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3675         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3676         scope variable.
3677
3678 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3679         
3680         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3681         error checks.
3682
3683 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3684         
3685         * delegate.cs: Fixed compiler crash when creating delegate using partial
3686         method.
3687         
3688         * typemanager.cs: MulticastDelegate is not a delegate.
3689
3690 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3691         
3692         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3693         checks.
3694
3695 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3696
3697         * cs-parser.jay (type): Allow 'var' in mcs too.
3698         (local_variable_type): Likewise.
3699
3700 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3701         
3702         * driver.cs: Removed broken -noconfig variants.
3703
3704 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3705         
3706         A fix for bug #417078
3707         * expression.cs: Emit correctly left side pointer operators.
3708
3709 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3710
3711         * generic.cs, lambda.cs: Inflate method generic arguments only.
3712
3713 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3714
3715         * class.cs: Fixed struct layout check regression.
3716
3717 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3718
3719         * cs-parser.jay, enum.cs: Simplified enum parsing.
3720         
3721         * decl.cs: Check all type parameters conflicts.
3722         
3723         * expression.cs, statement.cs, attribute.cs: More expression checks.
3724
3725 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3726
3727         * generic.cs: Add type inference types restriction.
3728         
3729         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3730         anonymous.cs, expression.cs: Allocate less accessor parameters.
3731
3732 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3733
3734         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3735         classes.
3736
3737 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3738
3739         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3740
3741 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3742
3743         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3744         Also fixes #362146 and #381592.
3745
3746 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3747
3748         * ecore.cs: Reduced constant cannot be used as an attribute value.
3749         
3750         * cs-parser.jay: Base expression has to be a type.
3751         
3752         * expression.cs (Conditional): Uses ReducedExpression.
3753
3754 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3755
3756         A fix for bug #376826
3757         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3758         address of hoisted local variable or parameter cannot be taken.
3759
3760 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3761
3762         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3763         anonymous method inside checked/unchecked expression.
3764
3765 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3766
3767         * typemanager.cs (IsEqual): Guard against null.
3768         
3769         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3770         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3771         routine. Fixed few misleading conversion errors.
3772
3773 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3774
3775         * class.cs: Consider generics when checking cycles in struct layout.
3776
3777 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3778
3779         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3780
3781 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3782
3783         A fix for bug #414165
3784         * anonymous.cs: Use same anonymous implementation method for all anonymous
3785         method emits.
3786
3787 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3788
3789         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3790         constraints.
3791
3792 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3793
3794         * cs-parser.jay: Typeof argument has to be a type expression.
3795         
3796         * namespace.cs: Check alias and namespace definitions collisions.
3797         
3798         * class.cs, pending.cs: Moved explicit interface accessor implementation
3799         check.
3800         
3801         * delegate.cs, expression.cs: Verify special name invocations.
3802         
3803 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3804
3805         * cs-parser.jay: Don't choke on empty generic type arguments.
3806         
3807         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3808         
3809         * expression.cs, ecore.cs: Minor expressions bugs.
3810
3811 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3812
3813         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
3814         and added more error handling.
3815         
3816         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
3817         
3818         *  modifiers.cs, enum.cs: Fixed.
3819
3820 2008-07-31  Jb Evain  <jbevain@novell.com>
3821
3822         * driver.cs: remove -pkg ability of smcs.
3823
3824 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3825
3826         * statement.cs (Switch): Correctly set empty default target for single
3827         blocks.
3828
3829 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3830
3831         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
3832         string switch statement implementation to use string dictionary which
3833         significantly (2-8x) improves performance of generated code.
3834
3835 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3836
3837         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
3838         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
3839         
3840 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3841
3842         A fix for bug #412595
3843         * typemanager.cs, convert.cs, expression.cs: Some types are never
3844         convertible to each other.
3845
3846 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3847
3848         * nullable.cs (CreateNullConstant): An error messages update.
3849
3850 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3851
3852         A fix for bug #412595
3853         * cfold.cs: Don't cast undefined bool constant.
3854
3855 2008-07-29  Martin Baulig  <martin@ximian.com>
3856
3857         * symbolwriter.cs
3858         (SymbolWriter.Reset): New public static method.
3859
3860         * driver.cs
3861         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
3862
3863 2008-07-28  Marek Safar  <marek.safar@gmail.com>
3864
3865         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
3866         
3867         * expression.cs (ElementAccess): Exact size allocation.
3868
3869 2008-07-26  Marek Safar  <marek.safar@gmail.com>
3870
3871         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
3872
3873 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3874
3875         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
3876         
3877         * class.cs: Removed $PRIVATE$ field hack which caused problems during
3878         flow analysis.
3879
3880 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3881
3882         A fix for bug #412217
3883         * assign.cs: Mutate also assignment type.
3884
3885 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3886
3887         A fix for bug #323644
3888         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
3889         indexers.
3890
3891 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3892
3893         A fix for bug #412134
3894         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
3895         non-enumerable operands when overloading equality or bitwise operators.
3896
3897 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3898
3899         * anonymous.cs: Cache closed generic anonymous method delegates.
3900
3901 2008-07-24  Marek Safar  <marek.safar@gmail.com>
3902
3903         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
3904         anonymous.cs, statement.cs: Always emit anonymous method as static method
3905         when is instance free. Use nesting for nested anynomous methods blocks.
3906         
3907 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3908
3909         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
3910         types.
3911
3912 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3913
3914         * expression.cs: Removed MakeSimpleCall.
3915
3916 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3917
3918         A fix for bug #323012
3919         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
3920         Base method implementing interface has to be public.
3921
3922 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3923
3924         * cs-parser.jay: Don't break on missing argument.
3925
3926 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3927
3928         A fix for bug #320993
3929         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
3930           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
3931
3932 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3933
3934         A fix for bug #320748
3935         * convert.cs: Implicit user operators cannot convert to interfaces
3936
3937 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3938
3939         A fix for bug #312686
3940         * driver.cs: Ignore empty assembly references.
3941
3942 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3943
3944         A fix for bug #387040
3945         * ecore.cs: Skip constrains check for an explicit implementation.
3946
3947 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3948
3949         A fix for bug #409045
3950         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
3951           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
3952           identifiers are file specific unless passed as input arguments.
3953
3954 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3955
3956          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
3957          to emit UnmanagedMarshal data under 2.0 profile.
3958
3959 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3960
3961         A fix for bug #410369
3962         * parameter.cs: Clone correctly ParamsParameter.
3963
3964 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3965
3966         * expression.cs (Argument): Always report type for type based expressions
3967         errors.
3968
3969 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3970
3971         A fix for bug #410666
3972         * anonymous.cs: Correctly initialize generic storey reference.
3973
3974 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3975
3976         * convert.cs: Don't box same type arguments.
3977
3978 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3979
3980         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
3981         Finished missing generic type mutators.
3982
3983 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3984
3985         * iterators.cs, statement.cs: Finished statements CloneTo.
3986
3987 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3988
3989         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
3990         
3991         * expression.cs: Emit optimized default value expressions in expression tree
3992         array initializer.
3993
3994 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3995
3996         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
3997
3998 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3999
4000         A fix for bug #367536
4001         * cs-parser.jay: Check static constructor of generic types for an access
4002         modifier.
4003
4004 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4005
4006         A fix for bug #353800
4007         * lambda.cs: Emit ret for contextual statements.
4008         
4009         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
4010         up emitting redundant ret for all anonymous methods with return.
4011
4012 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4013
4014         A fix for bug #365188
4015         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
4016         create anonymous method storey in unreachable block.
4017
4018 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4019
4020         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
4021         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
4022         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
4023         statement.cs: Fixed relevant defects found by Gendarme.
4024
4025 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4026
4027         A fix for bug #325291
4028         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
4029         statement.cs: Replaced IAnonymousHost with top level block flag.
4030
4031 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4032
4033         * cs-parser.jay: Clean up unused open_parens.
4034
4035 2008-07-17  Marek Safar  <marek.safar@gmail.com>
4036
4037         * ecore.cs: Custom error message for a range variable assignment.
4038
4039 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4040
4041         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
4042         load.
4043
4044 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4045
4046         * literal.cs: Null literal is of object type.
4047
4048 2008-07-16  Marek Safar  <marek.safar@gmail.com>
4049
4050         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
4051         expression of nullable equality comparison.
4052
4053 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4054
4055         * expression.cs(PointerArithmetic): Removed redundant assignment.
4056
4057 2008-07-15  Marek Safar  <marek.safar@gmail.com>
4058
4059         * decl.cs (GetSignatureForError): Report full namespace name for containers.
4060
4061 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4062
4063         A fix for bug #408361
4064         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
4065         they are replaced by GetMethod.
4066
4067 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4068
4069         A fix for bug #408721 by jeremie.laval@gmail.com
4070         * expression.cs (Indirection): Implemented CloneTo.
4071
4072 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4073
4074         * statement.cs (AssignableSlots): Temporary disabled variable initialization
4075         assert check.
4076
4077 2008-07-14  Marek Safar  <marek.safar@gmail.com>
4078
4079         * report.cs (EnableReporting): Don't reinitialize 0-based values.
4080
4081 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4082
4083         * linq.cs: Reset tranparent parameter counter in probing mode.
4084
4085 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4086
4087         * anonymous.cs: Mutate anonymous method type.
4088
4089 2008-07-11  Marek Safar  <marek.safar@gmail.com>
4090
4091         * ecore.cs, anonymous.cs: Mutate field expressions.
4092
4093 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4094
4095         A fix for bug #369670
4096         * linq.cs, statement.cs: Use explicit block for query expressions variables.
4097
4098 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4099
4100         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
4101
4102 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
4103
4104         Fix bug #314902
4105         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
4106         only one '>', and finds a '>>', abort the generic lookahead.
4107
4108 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4109
4110         A fix for bug #319902
4111         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
4112
4113 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4114
4115         A fix for bug #406371
4116         * statement.cs: Moved EmitSymbolInfo to Block.
4117
4118 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4119
4120         * ecore.cs: Report better error for extension method overload failures.
4121
4122 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4123
4124         * expression.cs (Is): No need to box reference values.
4125
4126 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4127
4128         * class.cs: Use event resolve context when initializing CreateEmitContext.
4129
4130 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4131
4132         A fix for bug #394436
4133         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
4134         method used inside expression trees. Added more LINQ to expression tree
4135         conversions.
4136
4137 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4138
4139         A fix for bug #378189, #370577
4140         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
4141         from expression.
4142
4143 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4144
4145         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
4146         hierarchically.
4147
4148 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4149
4150         A fix for bug #406702
4151         * anonymous.cs: Always park anonymous method in the nearest parent storey.
4152
4153 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4154
4155         A fix for bug #406648
4156         * cs-parser.jay: Report nullable use in mcs for some cases.
4157
4158 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4159
4160         * ecore.cs: Improved argument mismatch error messages.
4161
4162 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4163
4164         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
4165
4166 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4167
4168         * expression.cs (TypeOf): Mutate type argument.
4169
4170 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4171
4172         * class.cs: Report missing partial modifier for correct type.
4173
4174 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4175
4176         * ecore.cs, expression.cs (VariableReference): Variable property is 
4177         protected.
4178
4179 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4180
4181         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
4182         
4183 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4184
4185         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
4186         method delegates.
4187
4188 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4189
4190         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
4191         anonymous method storey to an instance method when only "this" is hoisted.
4192
4193 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4194
4195         A fix for bug #321615
4196         * expression.cs: Pointer comparisons use unsigned operator.
4197
4198 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4199
4200         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
4201
4202 2008-07-02  Marek Safar  <marek.safar@gmail.com>
4203
4204         A fix for bug #404905
4205         * class.cs: Always initialize local unsafe variables.
4206
4207 2008-06-30  Marek Safar  <marek.safar@gmail.com>
4208
4209         A fix for bug #396987
4210         * expression.cs (NewInitialize): Clear local temporary variable for next run
4211
4212 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4213
4214         A fix for bug #401020
4215         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4216
4217 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4218
4219         A fix for bug #398319
4220         * cs-parser.jay: Implemented undocumented base access expression inside
4221         anonymous types.
4222
4223 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4224
4225         A fix for bug #404227
4226         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4227
4228 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4229
4230         A fix for bug #404227
4231         * convert.cs: Fixed explicit array to interface cast.
4232
4233 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4234
4235         A fix for bug #403894
4236         * delegate.cs: Mutate DelegateInvocation type.
4237
4238 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4239
4240         A fix for bug #379348
4241         * delegate.cs: Box a load of generic parameters.
4242
4243 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4244
4245         * expression.cs: Add an array creation arguments mutate.
4246
4247 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4248
4249         A fix for bug #386068
4250         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4251         parameter.
4252
4253 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4254
4255         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4256         CloneTo.
4257
4258 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4259
4260         A fix for bug #403518
4261         * delegate.cs: Type correctly anonymous method new invocation.
4262
4263 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4264
4265         A fix for bug #394826
4266         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4267         calls.
4268
4269 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4270
4271         A fix for bug #394826
4272         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4273         needed.
4274
4275 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4276
4277         * class.cs: Clone indexer parameters for localized capturing.
4278
4279 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4280
4281         A fix for bug #402379
4282         * expression.cs: Don't crash when an object initializer resolve fails.
4283
4284 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4285
4286         A fix for bug #402888
4287         * expression.cs: Mutate conditional expression.
4288
4289 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4290
4291         A fix for bug #401012
4292         * class.cs: Keep StructLayout in shared container.
4293
4294 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4295
4296         A fix for bug #400438
4297         * decl.cs, class.cs: Only properties can be automatically implemented.
4298
4299 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4300
4301         * statement.cs (ChangeToIterator): Copy also labels.
4302
4303 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4304
4305         * ecore.cs: Pass type argument details to parent extension method.
4306
4307 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4308
4309         A fix for bug #375966
4310         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4311
4312 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4313
4314         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4315
4316 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4317
4318         A fix for bug #394347
4319         * anonymous.cs: Cache compatible delegates as compatibility check produces
4320         a new method every time.
4321
4322 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4323
4324         * anonymous.cs: Propagate storey reference for single references.
4325
4326 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4327
4328         A fix for bug #387615
4329         * assign.cs, expression.cs: Correctly clone compound assignment.
4330
4331 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4332
4333         A fix for bug #359611, #359604
4334         * anonymous.cs: Mutate all types of hoisted parameters.
4335
4336 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4337
4338         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4339         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4340         expression.cs, codegen.cs, statement.cs
4341         
4342         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4343         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4344         
4345         ** Anonymous methods, lambda expressions rewrite **
4346         
4347         Anonymous expressions are now resolved when an explicit block is resolved 
4348         and they don't require any registration procedure anymore. Further,
4349         anonymous methods are defined when explicit block is emitted which allows
4350         better control of whole process and opens possibilities for more
4351         optimizations as well as alternative to reverse whole process.
4352         
4353         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4354         process consistent and to correctly emit hoisted generic methods when they
4355         have at least 1 hoisted variable.
4356         
4357 2008-06-17  Martin Baulig  <martin@ximian.com>
4358
4359         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4360         iterator method.
4361         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4362         virtual property; check it in Emit().
4363         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4364         an iterator.
4365         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4366         an iterator.
4367         (Indexer.Define): Likewise.
4368
4369 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4370
4371         * convert.cs: Don't use IsInterface on type arguments.
4372         
4373         * delegate.cs: DelegateInvocation uses MethodInfo.
4374         
4375         * parameter.cs: Removed IsTypeParameter.
4376         
4377         * generic-mcs.cs: More missing stuff.
4378
4379 2008-06-16  Martin Baulig  <martin@ximian.com>
4380
4381         * modifiers.cs
4382         (Modifiers.DEBUGGER_HIDDEN): New public const.
4383
4384         * typemanager.cs
4385         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4386
4387         * class.cs
4388         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4389         (AbstractPropertyEventMethod): Likewise.
4390         (Constructor.Emit): Likewise.
4391         (SourceMethod.SetCompilerGenerated): Removed.
4392
4393         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4394         on MoveNext().
4395
4396         * anonymous.cs
4397         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4398         if we're an `IteratorHost'.
4399         (AnonymousMethodMethod..ctor): Don't set
4400         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4401         not on the method.
4402
4403 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4404
4405         * statement.cs: Clean-up foreach statements.
4406
4407 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4408
4409         * class.cs: Stop using public method which should not exist
4410         (MethodBuilder.SetGenericMethodSignature).
4411
4412 2008-06-11  Martin Baulig  <martin@ximian.com>
4413
4414         * location.cs
4415         (Location.LookupFile): Add `CompilationUnit' argument; when given
4416         a relative file name, make it relative to the directory the .cs
4417         file is located in instead of using the current directory.
4418
4419 2008-06-11  Martin Baulig  <martin@ximian.com>
4420
4421         * class.cs
4422         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4423         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4424         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4425         (SourceMethod.SetCompilerGenerated): Likewise.
4426
4427 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4428
4429         * codegen.cs, driver: Only write symbol file when it's asked for.
4430
4431 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4432
4433         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4434
4435 2008-06-10  Martin Baulig  <martin@ximian.com>
4436
4437         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4438
4439 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4440
4441         A fix for bug #316290
4442         * expression.cs: Include decimal operators in predefined table.
4443         
4444         * parameters.cs: More readonlyness.
4445
4446 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4447
4448         A fix for bug #397213
4449         * cs-parser.jay: One more missing current_local_parameters reset.
4450
4451 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4452
4453         A fix for bug #396633
4454         * class.cs: Host backing field in partial container.
4455
4456 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4457
4458         A fix for bug #397068
4459         * expression.cs: Check both operand types when predefined operator is used.
4460
4461 2008-06-05  Martin Baulig  <martin@ximian.com>
4462
4463         Merged the `debugger-kahalo' branch.
4464
4465         * class.cs
4466         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4467         we're an iterator method.
4468         (SourceMethod): Reflect latest symbol writer changes;
4469         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4470         now `start_row' and `end_row'.
4471         (Constructor.Emit): Fix the logic whether to emit symbol information.
4472
4473         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4474         generated methods.
4475
4476         * location.cs
4477         (CompilationUnit): New public class; derives from `SourceFile'.
4478         (SourceFileEntry.DefineSymbolInfo): New public method.
4479         (SourceFileEntry.SetChecksum): New public method.
4480         (Location): Encode hidden line numbers by using `column == 255';
4481         the .ctor now accepts `column == -1' to mark a hidden line number.
4482         (Location.Hidden): New public property.
4483         (Location.CheckPoint): Add `CompilationUnit'.
4484         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4485         (Location.Push): Add `CompilationUnit compile_unit' argument.
4486         (Location.CompilationUnit): New public property.
4487
4488         * statement.cs
4489         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4490
4491         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4492
4493         * driver.cs: `SourceFile' -> `CompilationUnit'.
4494
4495         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4496
4497         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4498
4499         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4500         `#line hidden'.
4501
4502         * symbolwriter.cs
4503         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4504         new symbol writer API to also pass the file.
4505
4506 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4507
4508         * statement.cs: Emit catch variable assignment using variable expression.
4509         
4510 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4511
4512         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4513         with other variable types.
4514
4515 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4516
4517         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4518         GetLength method emit, it breaks resolve rules.
4519         
4520 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4521             Marek Safar  <marek.safar@gmail.com>
4522                         
4523         A fix for bug #395542
4524         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4525         declaration.
4526         
4527 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4528
4529         A fix for bug #395287
4530         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4531
4532 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4533
4534         A fix for bug #395845
4535         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4536         non-nullable parameter type.
4537         
4538 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4539
4540         * class.cs: Handle contructor initializer as a statement in top-level block.
4541
4542 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4543
4544         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4545         security attributes.
4546
4547 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4548
4549         * ecore.cs, expression.cs: Small IVariable refactoring.
4550
4551 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4552
4553         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4554
4555 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4556
4557         * cs-parser.jay: Removed redundant catch type check.
4558
4559 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4560
4561         A fix for bug #390372
4562         * nullable.cs: Set correct return type.
4563
4564 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4565
4566         A fix for bug #391062
4567         * typemanager.cs: Fixed crash when comparing null types.
4568
4569 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4570
4571         A fix for bug #391871
4572         * cs-parser.jay: Better error handling for invalid catch type.
4573
4574 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4575
4576         A fix for bug #392155
4577         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4578
4579 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4580
4581         A fix for bug #390666
4582         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4583         expressions.
4584
4585 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4586
4587         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4588         in getter.
4589
4590 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4591
4592         A fix for bug #389625
4593         * delegate.cs, generic.cs: Some progress on method group return type
4594         inference.
4595
4596 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4597
4598         A fix for bug #378419
4599         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4600
4601 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4602
4603         * class.cs (Constructor): Added IsCompilerGenerated.
4604
4605 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4606
4607         * expression.cs: Enum binary operators can accept non-enum operand only when
4608         is implicitly convertible to underlying type.
4609
4610 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4611
4612         A fix for bug #389272
4613         * support.cs: Workaround System.InvalidOperationException for enums.
4614
4615 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4616
4617         A fix for bug #389073
4618         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4619
4620 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4621
4622         * driver.cs: Split Parse.
4623         
4624         * location.cs (LookupFile): Uses string.Empty.
4625
4626 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4627
4628         * expression.cs, parameter.cs: Small ParameterReference clean up.
4629
4630 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4631
4632         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4633         hack. Fixes #387502.
4634
4635 2008-05-06  Martin Baulig  <martin@ximian.com>
4636
4637         * class.cs (Constructor.Emit): Fix the logic whether to emit
4638         symbol information.
4639
4640 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4641
4642         Fix #385503
4643         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4644         InvalidOperationException when the iterator is before the start or
4645         after the end.
4646
4647 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4648
4649         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4650         when left is nullable type.
4651
4652 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4653
4654         A fix for bug #386628
4655         * expression.cs (LocalVariableReference): Continue in resolving when
4656         variable is not assigned.
4657
4658 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4659
4660         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4661         nullable operations.
4662
4663 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4664
4665         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4666         it saves many redundant temporary variables for nullable operations.
4667
4668 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4669
4670         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4671         
4672         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4673         method.
4674         
4675         * nullable.cs: Constant coalescing operator optimizations.
4676
4677 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4678
4679         * constant.cs: Use unsigned conversion for values which are unsigned only.
4680
4681 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4682
4683         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4684         coalescing operator as it should be.
4685
4686 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4687
4688         A fix for bug #371016
4689         * expression.cs: All predefined delegate operators require implicit method
4690         group conversion.
4691         
4692 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4693
4694         * constant.cs: Emit long constant as uint when fits the range.
4695         
4696         * convert.cs, expression.cs: Fixed few unsafe conversions.
4697
4698 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4699
4700         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4701
4702 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4703
4704         Fix #385758
4705         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4706         'expr'.
4707         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4708
4709 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4710
4711         * constant.cs, literal.cs: IsLiteral property for error reporting.
4712         
4713         * ecore.cs, expression.cs: Implemented Property expression.
4714
4715 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4716
4717         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4718         
4719         * nullable.cs: Implemented nullable coalescing null operator.
4720
4721         * ecore.cs, expression.cs: Expression trees work.
4722
4723 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4724
4725         * ecore.cs: CreateExpressionTree is finally abstract.
4726
4727         * expression.cs, linq.cs: Updated.
4728
4729 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4730
4731         * expression.cs, ecore.cs: Block base access expression inside expression
4732         tree.
4733
4734 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4735
4736         A fix for bug #385058
4737         * expression.cs: User-defined operator implementations always take
4738         precedence over predefined operator implementations.
4739
4740 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4741
4742         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4743         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4744         expression tree conversions.
4745         
4746 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4747
4748         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4749         operators method details to Operator class.
4750
4751 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4752
4753         * anonymous.cs: Pass unsafe flags to anonymous container.
4754         
4755         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4756         inside expression tree.
4757
4758 2008-04-29  Martin Baulig  <martin@ximian.com>
4759
4760         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4761         (Tokenizer.PopPosition): Also restore the `line'.
4762
4763 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4764
4765         * delegate.cs: Implemented Invoke expression.
4766
4767 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4768
4769         * expression.cs: Fixed equality reference comparison regression.
4770
4771 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4772
4773         * ecore.cs: Clean up EmptyCast hack.
4774         
4775         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4776         using correct conversion rules. Also fixes #383993.
4777
4778 2008-04-28  Martin Baulig  <martin@ximian.com>
4779
4780         * class.cs (Constructor.Emit): Don't emit debugging information
4781         for generated default .ctor's.
4782
4783 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4784
4785         * convert.cs: Empty-cast ushort to int conversion.
4786
4787 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4788
4789         A fix for bug #384191
4790         * ecore.cs, expression.cs: Fixed expression cloning.
4791
4792 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4793
4794         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4795
4796 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4797
4798         Fix #381559, test-638.cs, test-639.cs
4799         * assign.cs (CompoundAssign.Helper): New wrapper.
4800         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4801         access.
4802         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4803         Pass unconverted expressions to the params array creation expression.
4804         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4805         (PropertyExpr.EmitAssign): Likewise.
4806         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4807         element if it is of kind CompoundAssign.Helper.
4808         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
4809         first before anything else.
4810         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
4811         (ArrayAccess.LoadArrayAndArguments): Simplify.
4812
4813 2008-04-27  Marek Safar  <marek.safar@gmail.com>
4814
4815         * expression.cs: Fixed cloning of typeof(void).
4816
4817 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
4818
4819         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
4820         (Assign.Emit): Likewise.  Move it to ...
4821         (CompoundAssign.DoResolve): ... here and ...
4822         (CompoundAssign.Emit): ... here.
4823         (EventAddOrRemove): New helper to handle += and -= on events, and
4824         avoid the use of BinaryDelegates.
4825         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
4826         (EventExpr.EmitAddOrRemove): Improve.
4827         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
4828
4829         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
4830         create VarExprs for 'foo.bar.var'.
4831         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
4832         is a highly inappropriate name for its functionality.
4833
4834 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4835
4836         Simplify handling of multiple assignments
4837         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
4838         inheritable-only.
4839         (SimpleAssign): New.  Class to be used for normal assignments.
4840         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
4841         * expression.cs, parameter.cs, statement.cs: Likewise.
4842
4843 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4844
4845         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
4846         for incompatible underlying types, more to come, uff.
4847
4848 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4849
4850         Fix gtest-388.cs
4851         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
4852         Handle 'leave_copy'.
4853
4854 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4855
4856         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
4857
4858 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
4859
4860         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
4861         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
4862         * statement.cs (While, Do, For): Allow test to have side effects.
4863         (For.DoEmit): Always emit InitStatement.
4864
4865         Fix test-635.cs
4866         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
4867         Always create SideEffectConstant.
4868         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
4869         of type EnumConstant.
4870
4871         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4872         Handle 'right' being SideEffectConstant of type 'bool'.
4873
4874         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4875         Use left.EmitBranchable instead of open coding it, so as to
4876         improve optimization opportunities.
4877
4878         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
4879
4880         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
4881         assumptions.
4882         (Expression.EmitSideEffect): Document.
4883
4884 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4885
4886         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
4887
4888 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4889
4890         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
4891
4892 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4893
4894         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
4895         conversion to expression tree.
4896
4897 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4898
4899         * ecore.cs: Removed unused expression.
4900
4901 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4902
4903         * expression.cs: Implemented NegateChecked and New expressions.
4904
4905 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4906
4907         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
4908
4909 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
4910
4911         Fix #351102
4912         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
4913         needing final 'ret' instruction.
4914
4915 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4916
4917         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
4918
4919 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4920
4921         * expression.cs: Emit ldnull and not null expression as an instance argument
4922          of static method expression calls.
4923
4924 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4925
4926         A fix for bug #378200
4927         * expression.cs: Fixed crash when creating parameterless expression tree
4928         method call.
4929
4930 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4931
4932         A fix for bug #375297
4933         * anonymous.cs: Fixed crash when inferring from null argument anonymous
4934         method.
4935
4936 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4937
4938         A fix for bug #377596
4939         * decl.cs, class.cs: Emit delegate type argument attributes.
4940
4941 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4942
4943         A fix for bug #365314
4944         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
4945         
4946 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4947
4948         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
4949         only.
4950
4951 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4952
4953         * generic.cs (TypeParameter): Removed redundant location.
4954
4955 2008-04-19  Marek Safar  <marek.safar@gmail.com>
4956
4957         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
4958         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
4959         FullNamedExpression in all declaration type expression, statements will come
4960         later.
4961
4962 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4963
4964         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
4965         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
4966
4967 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4968
4969         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
4970         code.
4971
4972 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4973
4974         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
4975         constraints.
4976
4977 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4978
4979         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
4980         name expressions.
4981         Also fixes #340463.
4982
4983 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
4984
4985         Hook up 'EmitSideEffect'
4986         * constant.cs (Constant.EmitSideEffect): New.
4987         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
4988         (SideEffectConstant.EmitSideEffect): New.
4989         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
4990         unconditional branch in EmitBranchable.
4991         (FieldExpr.EmitBranchable): New.
4992         * expression.cs (Unary.EmitSideEffect): New.
4993         (Binary.EmitSideEffect): New.
4994         (VariableReference.EmitSideEffect): New.  Do nothing.
4995
4996 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4997
4998         Introduce 'EmitSideEffect'
4999         * ecore.cs (Expression.EmitSideEffect): New.
5000         (TypeCast): Rename from EmptyCast.
5001         (EmptyCast): New.
5002         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
5003         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
5004         * convert.cs, nullable.cs: Update to changes.
5005
5006 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5007
5008         * class.cs, cs-parser.jay: Early check for base types expression.
5009
5010 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5011
5012         * decl.cs (MemberName): Declare PrettyName as obsolete.
5013
5014 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5015
5016         * namespace.cs: Use MemberName comparison.
5017
5018 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
5019
5020         Fix build break
5021         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
5022         FullName.
5023         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
5024         (MemberName.FullyQualifiedName): New.  Provides the functionality
5025         that users assume FullName would have.
5026         * ecore.cs, namespace.cs: Update to changes.
5027
5028         * statement.cs (Using.assign): Make into ExpressionStatement.
5029         (Using.EmitPreTryBody): Simplify.
5030
5031 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5032
5033         * report.cs: ColorFormat is protected.
5034         
5035         * rootcontext.cs: Unused fields clean-up.
5036         
5037         * namespace.cs: Made UsingEntry name private.
5038
5039 2008-04-16  Marek Safar  <marek.safar@gmail.com>
5040
5041         * cs-tokenizer.cs, location.cs: Removed unused field.
5042
5043 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
5044             Raja R Harinath  <harinath@hurrynot.org>
5045
5046         Fix #379822
5047         * constant.cs (SideEffectConstant.value): Rename from 'left'.
5048         (SideEffectConstant.side_effect): Rename from 'right'.
5049         (SideEffectConstant..ctor): Normalize 'side_effect'.
5050         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
5051         value of this constant.
5052         * cfold.cs: Update to changes.
5053
5054 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5055
5056         * cs-paser.jay: Removed unused variable.
5057         
5058         * driver.cs: Made Compile instance method.
5059
5060 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
5061
5062         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
5063
5064 2008-04-15  Marek Safar  <marek.safar@gmail.com>
5065
5066         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
5067
5068 2008-04-13  Jb Evain  <jbevain@novell.com>
5069
5070         * namespace.cs: update the System.Core fullname for 2.1
5071         * driver.cs: update the list of required assemblies for 2.1.
5072         Merged from the Moonlight 2 branch.
5073
5074 2008-04-11  Marek Safar  <marek.safar@gmail.com>
5075
5076         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
5077         types and user defined operators. User operators arguments has to be checked
5078         for null value before invocation, which also means no operator is called
5079         when any argument is not convertible to unwrapped nullable type.
5080         
5081 2008-04-09  Marek Safar  <marek.safar@gmail.com>
5082
5083         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
5084         of Unary expressions to follow operator overloading rules precisely.
5085         Also fixes #321794, #323794
5086         
5087 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5088
5089         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
5090         expression.
5091         
5092 2008-04-08  Marek Safar  <marek.safar@gmail.com>
5093
5094         * expression.cs, ecore.cs: Implemented MemberInit expression.
5095         
5096 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
5097
5098         Fix mono/tests/exception4.cs
5099         * statement.cs (ExceptionStatement, TryCatch): Revert to using
5100         ec.NeedReturnLabel () rather emitting a 'nop'.
5101
5102         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
5103         simple heuristic.
5104         (TryCatch.SomeCodeFollows): Likewise.
5105         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
5106         for 'break', 'continue' and 'return' statements inside a try.
5107         We're fairly sure that the generated IL stream will have more
5108         instructions textually following the try.
5109         (FlowBranchingTryCatch): Likewise.
5110
5111         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
5112         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
5113         overrides.
5114
5115         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
5116         wrapper -- forward everything to CollectionForeach.
5117         (CollectionForeach.NonDisposableWrapper): New.
5118         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
5119         instead of a pop + branch to end.
5120
5121 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5122
5123         A fix for bug #377485
5124         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
5125         Propagate location for extension method groups. Report conversion failure at
5126         right place.
5127
5128 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5129
5130         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
5131         ListInit and Field expressions.
5132
5133 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
5134
5135         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
5136         Since $PC is always -1 inside the body of MoveNext, the fault
5137         handler is a no-op.
5138         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
5139         * statement.cs (ExceptionStatement.emit_finally): Likewise.
5140         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
5141
5142         The denouement!  Fix #324708
5143         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
5144         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
5145         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
5146         'finally' inside the finally clause.
5147
5148         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
5149         inside an iterator.  Don't emit the body of the 'finally' inside
5150         the finally clause yet.
5151
5152         Use the ResumableStatement infrastructure for MoveNext ()
5153         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
5154         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
5155         'old_resume_points'.  Move dispatcher upfront.
5156         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
5157         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
5158         in an enumerator.  This encodes the main fix in this patch series
5159         -- we can only jump into the first instruction of a try from the
5160         outside, but we want to emit try/finally regions in iterators and
5161         resume in the middle of them.
5162
5163 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
5164
5165         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
5166         of NeedReturnLabel here.
5167
5168         Introduce a common point for emitting try/finally to IL
5169         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
5170         features of the various subclasses, which are now driven by ...
5171         (ExceptionStatement.EmitPreTryBody): ... this and ...
5172         (ExceptionStatement.EmitTryBody): ... this and the original
5173         EmitFinallyBody.
5174         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
5175         Remove DoEmit and update to follow above protocol.
5176
5177         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
5178         of the dispatcher are the same, skip emitting the 'switch'.
5179         * iterator.cs (Iterator.EmitDispose): Update to changes.
5180
5181         Clean up handling of 'using' statement
5182         * statement.cs (UsingTemporary): New.  Carved out of ...
5183         (Using): ... this.  Simplify drastically.  Handle exactly
5184         one variable.
5185         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
5186         or Using as appropriate.  If there are multiple variable declared,
5187         create nested Using statements.
5188         (resource_acquisition): Kill.
5189
5190         * statement.cs (ExceptionStatement.EmitForDispose): Use
5191         EmitFinallyBody, not EmitFinally.
5192
5193         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
5194         * iterator.cs: Update to changes.
5195
5196         Start using the ResumableStatement infrastructure
5197         * statement.cs (ResumeableStatement.PrepareForDispose): New.
5198         (ResumableStatement.EmitForDispose): New.
5199         (ExceptionStatement): Override them.
5200         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
5201         EmitForDispose to create the body of the Dispose method.  Don't
5202         use OldResumePoint.
5203
5204         * iterator.cs (Iterator.AddResumePoint): Move here from ...
5205         * statement.cs (Toplevel.AddResumePoint): ... here.
5206         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
5207         * flowanalysis.cs (FlowBranchingIterator): New.
5208         * codegen.cs (EmitContext): Update to changes.
5209
5210         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
5211         (Iterator.old_resume_points): Rename from 'resume_points'.
5212         (Iterator.MoveNextStatement): Remove unused class.
5213
5214         New infrastructure for try/finally in iterators (still unused)
5215         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5216         (FlowBranchingToplevel.AddResumePoint): Hook into
5217         ToplevelBlock.AddResumePoint.
5218         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5219         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5220         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5221         resume points and assign program-counter values.
5222         (ExceptionBlock.AddResumePoint): Collect resume points for
5223         de-muxer at the top of try block.
5224         * iterators.cs (Yield.CheckContext): Simplify.
5225         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5226
5227 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5228
5229         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5230         argument to an ExitStatement.
5231         (FlowBranchingException): Refactor saved origins code.
5232         * statement.cs (ExitStatement): Update to cahges.
5233         * iterator.cs (YieldBreak): Likewise.
5234
5235         * statement.cs (ResumableStatement): New.  Common base class for
5236         YieldReturn and ExceptionStatement.
5237         (ExitStatement): New.  Common base class for Return and YieldBreak.
5238         (Return): Update to changes.
5239         * iterator.cs (YieldBreak): Likewise.
5240         * lambda.cs (ContextualReturn): Likewise.
5241
5242         Fix #377028
5243         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5244         emit a meaningful error message.
5245
5246         Fix #324765, #319508
5247         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5248         (VariableInfo.SetAssigned): Set it.
5249         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5250         determine if CS0219 or CS0168 is appropriate.  Don't use
5251         flow-analysis information.
5252         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5253         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5254         (EmitContext.EndFlowBranching): ... this.
5255
5256 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5257
5258         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5259
5260 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5261
5262         A fix for bug #376508
5263         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5264         ImplicitConversionExists.
5265
5266 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5267
5268         * expression.cs (Binary): Added remaining binary operators to expression
5269         tree builder.
5270
5271         * nullable.cs: Optimize shift with null argument.
5272
5273 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5274
5275         Fix minor IL regression
5276         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5277         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5278         * cs-parser.jay (try_statement): Update to changes.
5279
5280         * statement.cs (TryFinally.need_exc_block): Delete.
5281         (TryFinally): Update to changes.
5282
5283         Now all ExceptionStatements are unconditional
5284         * statement.cs (CollectionForeach.DisposableWrapper): New.
5285         Extract out the try/finally code into a new wrapper.
5286         (CollectionForeach.Resolve): Use it to simplify the code.
5287
5288 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5289
5290         Start at simplifying ExceptionStatement semantics a bit
5291         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5292         * cs-parser.jay (try_statement): Update to changes.
5293         (opt_catch_clauses): Remove.
5294         * flowanalysis.cs: Update to changes.
5295         (FlowBranching.BranchingType.TryCatch): New.
5296         (FlowBranchingTryCatch): New.
5297
5298         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5299         (FlowBranching.CreateBranching): Update to changes.
5300         (FlowBranchingBlock.AddSibling): Add sanity check.
5301         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5302         Update to changes.
5303
5304         * iterators.cs (Iterator.MarkFinally): Remove.
5305         * statement.cs (ExceptionStatement): Update to changes.
5306
5307         Add support for skipping over finally blocks at runtime.  First
5308         in a series to fix #324708
5309         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5310         (Iterator.EmitMoveNext): Initialize it.
5311         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5312         branch over the body of the 'finally' clause.
5313
5314 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5315
5316         Avoid lopsided use of Foo/DoFoo names
5317         * statement.cs (ExpressionStatement.EmitFinallyBody):
5318         Rename from EmitFinally.
5319         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5320         * iterator.cs: Update to changes.
5321
5322 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5323
5324         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5325         based on UserOperatorCall. More binary nullable operators clean up.
5326
5327 2008-04-02  Martin Baulig  <martin@ximian.com>
5328
5329         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5330
5331 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5332
5333         * nullable.cs: Merge user and empty conversions when lifting expression
5334         trees.
5335         
5336         * expression.cs (StringConcat): Implemented expression tree representation.
5337
5338 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5339
5340         * nullable.cs: When lifting null literal and a user operator exists, no call 
5341         is made.
5342         
5343 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5344
5345         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5346         null.
5347
5348 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5349
5350         * nullable.cs, expression.cs: Use namespace instead heavily nested
5351         monster abstract class.
5352
5353 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5354
5355         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5356         lifting of null literal and user operators. Clean up of some temporary
5357         nullable hacks.
5358
5359 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5360
5361         Fix #368224, test-629.cs
5362         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5363         if it crossed an unwind-protect boundary.
5364         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5365         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5366         inside an unwind-protected region.
5367         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5368         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5369         'leave' instead of a 'br' if unwind-protected.
5370         (Iterator.EmitYieldBreak): Likewise.
5371
5372 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5373
5374         * driver.cs: Only define versioninfo resources if no win32 resource
5375         file was specified.
5376
5377 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5378
5379         A fix for bug #372375
5380         * convert.cs: Fixed boxing of nullable types.
5381
5382 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5383
5384         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5385         type.
5386
5387 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5388
5389         A fix for bug #374619
5390         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5391         
5392 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5393
5394         * lambda.cs: Check return type only for invocation.
5395         
5396 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5397
5398         A fix for bug #374214
5399         * ecore.cs: Correctly report argument type mismatch.
5400
5401 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5402
5403         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5404         and not rely on broken IsEnum.
5405
5406 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5407
5408         * nullable.cs: New file, extracted from generic.cs.
5409         
5410         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5411
5412 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5413
5414         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5415         predefined comparison operators and null literals.
5416         
5417         * report.cs: New warning ID.
5418         
5419 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5420
5421         A fix for bug #370577
5422         * lambda.cs: Check return type too.
5423
5424 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5425
5426         A fix for bug #372846
5427         * class.cs: Automatic properties can be declared as unsafe.
5428
5429 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5430
5431         * location.cs: Use string based concatenation.
5432         
5433         * expression.cs: LiftedBinaryOperator is gmcs only.
5434         
5435 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5436
5437         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5438         conversions rules and expression trees.
5439
5440 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5441
5442         * delegate.cs: Use extension method source as delegate target.
5443
5444 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5445
5446         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5447         binary operations to be purely based on binary operations and optimized
5448         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5449         and other ET refactoring.
5450         
5451         * typemanager.cs: Fixed warning.
5452         
5453 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5454
5455         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5456         
5457         * symbolwriter.cs: Fixed.
5458
5459 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5460
5461         * anonymous.cs, driver.cs: Reset anonymous types counters.
5462
5463 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5464
5465         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5466         
5467         * class.cs: Use fullname for all type member definitions.
5468         
5469 2008-02-19  Martin Baulig  <martin@ximian.com>
5470
5471         * class.cs
5472         (IMethodData.EmitExtraSymbolInfo): New interface method.
5473         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5474         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5475         interface method here as an empty public virtual method.
5476
5477         * anonymous.cs
5478         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5479         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5480         CodeGen.SymbolWriter.SetRealMethodName().       
5481
5482 2008-02-18  Martin Baulig  <martin@ximian.com>
5483
5484         * anonymous.cs
5485         (ScopeInfo.EmitType): Override this and emit debugging
5486         information for captured variables.
5487         (RootScopeInfo.EmitType): Override this and emit symbol
5488         information for a captured `this'.
5489
5490 2008-02-15  Martin Baulig  <martin@ximian.com>
5491
5492         * iterators.cs: Emit debugging info.
5493
5494         * codegen.cs
5495         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5496         (EmitContext.OmitDebuggingInfo): New public property.
5497
5498         * statement.cs
5499         (While): Override Emit() and don't emit symbol info there; do it
5500         inside DoEmit() instead.
5501         (Block.Emit): Omit symbol information while emitting the scope
5502         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5503         block logic.
5504         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5505         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5506         .ctor to make `IsIterator' work.
5507
5508 2008-03-14  Martin Baulig  <martin@ximian.com>
5509
5510         * symbolwriter.cs: Added the new symbol writer function from the
5511         debugger's `terrania' branch; temporarily enclose them inside
5512         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5513         my vacations.
5514
5515 2008-03-14  Martin Baulig  <martin@ximian.com>
5516
5517         * symbolwriter.cs
5518         (SymbolWriter): Make this a public static class.
5519
5520         * codegen.cs
5521         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5522         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5523
5524 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5525
5526         A fix for bug #370577
5527         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5528         return type.
5529         
5530 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5531
5532         * typemanager.cs (CSharpName): Made 250 times faster.
5533
5534 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5535
5536         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5537         
5538 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5539
5540         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5541         crash when predefined field does not exist.
5542         
5543 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5544
5545         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5546         
5547 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5548
5549         * class.cs (FixedField): Don't crash when contructors are missing.
5550
5551 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5552
5553         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5554         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5555         check internal types accessibility for internal and external types.
5556         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5557
5558 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5559
5560         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5561         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5562         attribute.cs, statement: Use corect instance of predefined types (work
5563         related to #364674).
5564
5565 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5566
5567         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5568         
5569 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5570
5571         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5572         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5573         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5574         predefined types clean up, delayed predefined types members initialization
5575         (work related to #364674).
5576
5577 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5578
5579         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5580         
5581 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5582
5583         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5584         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5585         predefined types clean up (work related to #364674).
5586
5587 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5588
5589         * ecore.cs: Print an error message instead of throwing exception.
5590         
5591 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5592
5593         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5594         expression.cs, statement.cs: Unififed null literal representation.
5595
5596 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5597
5598         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5599         expression.cs: Refactored binary operators resolve phase and improved speed.
5600         The nullable code is still missing and won't work correctly, more fixes
5601         required.
5602
5603         It also fixes #323726, #324312, #324248, and many other unreported issues.
5604
5605 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5606
5607         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5608         instead of 'gmcs'.
5609
5610 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5611
5612         * ecore.cs: Clean-up and split BetterConversion.
5613         
5614 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5615
5616         Fix #363791
5617         * enum.cs (EnumMember.Value): Only access 'value' if
5618         ResolveValue says it's ok.
5619         (EnumMember.DoResolveValue): Don't set prev_member.value.
5620         (Enum.GetDefinition): Reverse arguments of Equals --
5621         EnumMember.Value can return 'null'.
5622
5623         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5624
5625 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5626
5627         * generic.cs, expression.cs: More ongoing work on expression trees.
5628         
5629 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5630
5631         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5632         handle missing matches when mutiple operators exist.
5633         
5634 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5635
5636         A fix for bug #363218
5637         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5638         initializers.
5639         
5640 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5641
5642         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5643         update. This time to deal correctly with SideEffectConstant expression used
5644         as an argument for another constant folding.
5645
5646 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5647
5648         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5649         MethodBuilder.
5650
5651 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5652
5653         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5654
5655 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5656
5657         A fix for bug #328136
5658         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5659         side is a false constant, because we still need to evaluate the right-hand
5660         side.
5661
5662         * statement.cs (If): Emit two types of boolean constants (simple constant,
5663         side-effect constant).
5664
5665 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5666
5667         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5668
5669         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5670         constants.
5671
5672 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5673
5674         A fix for bug #361457
5675         * ecore.cs (IsApplicable): Params methods have lower priority.
5676
5677         * support.cs: Return correct parameter modifier for params types.
5678
5679 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5680
5681         * generic.cs (TypeParameter): Cache attribute target name.
5682
5683         * support.cs: Removed unused variable.
5684
5685         * typemanager.cs: Removed debugging leftover.
5686
5687         * ecore.cs: Use local type instead of a property;
5688
5689         * class.cs (VerifyMembers): Consider also parent to test whether type member
5690         is local or public.
5691
5692         * expression.cs (FullMethodDesc): Removed.
5693
5694         * attribute.cs (IsValidArgumentType): Made static.
5695
5696 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5697
5698         Cleanup to be more readable.
5699         * Makefile (GMCS_PROFILE): Remove.
5700         (COMPILER_NAME): New helper.
5701
5702 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5703
5704         * cs-tokenizer.cs: if a conditional expression happens inside a
5705         (...) this also means that we do not need to de-ambiguate between
5706         an parenthesized expression and a cast.
5707
5708         Fixes 346484.
5709
5710         * constant.cs (SideEffectConstant): a constant value that happens
5711         to have a side effect.
5712
5713         Fixes the build regressions introduced by the fix for #359789
5714
5715 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5716
5717         * expression.cs (Conditional.Emit): when emitting the ternary
5718         operator, use local variables to generate code verifiable code.
5719
5720         The verifier cannot infer that the type on stack before the
5721         stloc.0 is executed is of type ParentB. This happens because the
5722         stack merge algorithm uses only parent types when deciding which
5723         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5724         335.
5725
5726         This code compiled with mcs is not verifiable under MS. The MS
5727         verifier picks the first common interface of Foo and Bar, which is
5728         wrong, but doesn't use a full join type of the 2 interfaces.
5729
5730         CSC uses a clever hack to compile such code in a verifiable
5731         way. It stores the intermediate values in a local variable with
5732         the expected type.
5733
5734         Fixes: #358102
5735
5736 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5737
5738         * expression.cs: Do not fold BitwiseAnd operators when the left
5739         side is a false constant, because we still need to evaluate the
5740         right-hand side.
5741
5742         Fixes #359789
5743
5744         * support.cs: Instead of throwing an InternalErrorException when
5745         the position of the stream is outside the boundary of our buffer,
5746         reset the state of the reader, and restart the reading from the
5747         beginning of the file.
5748
5749 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5750
5751         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5752
5753 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5754
5755         A fix for bug #361686
5756         * decl.cs: A protected types used inside a private class which parents
5757         derives from the protected class are accessible.
5758
5759 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5760
5761         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5762         the parameterless constructor.
5763
5764 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5765
5766         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5767         lookup methods to use standard member cache when doing member lookup.
5768
5769 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5770
5771         * driver.cs: Don't report full path for referenced module as assembly error.
5772
5773 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5774
5775         * Makefile: Fixed `qh' target to work on all machines.
5776
5777         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5778         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5779         and HasElementType with TypeManager implementation.
5780
5781 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5782
5783         A fix for bugs #325134, #359749
5784         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5785         first binds point to non-method member expression.
5786
5787 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5788
5789         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5790
5791 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5792
5793         A fix for bugs #321394, #323028
5794         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5795         Reworked naive IsAccessibleAs implementation to handle nested types.
5796
5797 2008-02-05  Jb Evain  <jbevain@novell.com>
5798
5799         * class.cs: use generic type comparison for parameters
5800         as well.
5801
5802 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5803
5804         A fix for bug #325372
5805         * class.cs: Use generic type comparison when testing method signatures.
5806
5807 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5808
5809         A fix for bug #357047
5810         * ecore.cs: Applied C# 3.0 changes to better conversion.
5811
5812 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5813
5814         A fix for bug #358374
5815         * cs-parser.jay: Correctly set modifiers for all constructor types.
5816
5817 2008-02-04  Marek Safar  <marek.safar@gmail.com>
5818
5819         A fix for bug #355251
5820         * generic.cs: Added base class constraint based type inference.
5821
5822 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5823
5824         A fix for bug #357255
5825         * decl.cs: One more missing visibility check.
5826
5827 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5828
5829         * support.cs: Fixed broken return.
5830
5831 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5832
5833         * report.cs: Correctly reset warnings count after probing.
5834
5835 2008-01-25  Martin Baulig  <martin@ximian.com>
5836
5837         * namespace.cs
5838         (NamespaceEntry.SymbolFileID): Make this work again after
5839         MemberName.ToString() is gone.
5840
5841 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5842
5843         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
5844         expressions.
5845
5846 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5847
5848         * generic.cs: Use full implicit conversion for type inference fixing.
5849
5850 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5851
5852         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
5853         Fixed user operator conversions.
5854
5855 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5856
5857         * generic.cs: Do nullable type to null comparison optimization during
5858         resolve phase.
5859
5860 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5861
5862         A fix for bug #355163
5863         * generic.cs: Enabled l-value resolve on nullable expressions.
5864
5865 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5866
5867         A fix for bug #353986
5868         * class.cs: Ingore static ctors with parameters for any further checks.
5869
5870 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5871
5872         A fix for bug #354310
5873         * namespace.cs: Removed redundant check.
5874
5875 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5876
5877         A fix for bug #354928
5878         * expression.cs: ElementInitializers can be resolved only once.
5879
5880 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5881
5882         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
5883         Condition expressions.
5884
5885 2008-01-23  Marek Safar  <marek.safar@gmail.com>
5886
5887         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
5888
5889 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5890
5891         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
5892         not allowed.
5893
5894         * generic.cs: Implemented coalesce expression.
5895
5896 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5897
5898         A fix for bug #355145
5899         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
5900         expression tree type inference.
5901
5902 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
5903
5904         Fix #354663
5905         * expression.cs (Binary.IsUnsignedType): Fix typo.
5906
5907 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5908
5909         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
5910
5911 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5912
5913         A fix for bug #355161
5914         * ecore.cs, expression.cs: Wider range of extension method supported
5915         expressions.
5916
5917 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
5918
5919         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
5920         AssemblyBuilder to operate in compiler context. Fixes mcs part of
5921         bug #354970.
5922
5923 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5924
5925         A fix for bug #355148
5926         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
5927
5928 2008-01-22  Miguel de Icaza  <miguel@novell.com>
5929
5930         * expression.cs (CreateExpressionTree): Add support for or and
5931         logical or, and indent following the coding conventions.
5932
5933         * typemanager.cs (LinqExpression): renamed from
5934         ExpressionTreeManager, for a shorter name.
5935
5936         Use TypeManager.CoreLookupType to lookup types from our core
5937         assemblies and turn those into "Type" variables.
5938
5939         Consumers that previously used "Namespace" and "Type" from this
5940         class should instead use the TypeExpression which is a type that
5941         is fully resolved (without involving the regular C# resolution
5942         rules). 
5943
5944         This typically looks like this:
5945
5946         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
5947         new MemberAccess (texpr, name, type_arguments, loc)
5948
5949         This avoids the problem in: #355178
5950
5951 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5952
5953         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
5954         feature in parser only as we do in other cases.
5955         
5956 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5957
5958         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
5959         typemanager.cs: A refactoring of params arguments to reuse existing
5960         expressions (params -> array initializer) to emit params argument instead
5961         of specialized handling.
5962         It was required by expression tree implementation and it has other benefits
5963         as well, we now apply same optimization for params arguments as we do for
5964         array initializers.
5965         
5966 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5967
5968         A fix for bug #353526
5969         * generic.cs: A type inference of params arguments may not required any
5970         temporary array creation.
5971         
5972 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5973
5974         A fix for bug #353534
5975         * generic.cs, ecore.cs, expression.cs: A method group type inference is
5976         supported for delegates only.
5977         
5978 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5979
5980         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
5981         type for more than 1 candidates.
5982         
5983 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5984
5985         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
5986         expressions.
5987         
5988 2008-01-16  Marek Safar  <marek.safar@gmail.com>
5989
5990         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
5991         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
5992         operator) expressions. 
5993                 
5994 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5995
5996         * statement.cs: Avoid declaring an IL variable for this_variable since it is
5997         not accessed from the generated IL.
5998
5999 2008-01-14  Marek Safar  <marek.safar@gmail.com>
6000
6001         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
6002         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
6003         statement.cs: The first expression tree implementation drop, mostly
6004         infrastructure work.
6005
6006 2008-01-14  Marek Safar  <marek.safar@gmail.com>
6007
6008         * ecore.cs (IsNestedChild): Refactored.
6009
6010 2008-01-11  Marek Safar  <marek.safar@gmail.com>
6011
6012         * lambda.cs: Don't use a cast on unknown expression statement.
6013
6014 2008-01-10  Geoff Norton  <gnorton@novell.com>
6015
6016         * cs-tokenizer.cs: One more token to distinguish between method and lambda
6017         arguments
6018
6019 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6020
6021         * doc.cs: Report better /doc crash details.
6022         
6023 2008-01-09  Marek Safar  <marek.safar@gmail.com>
6024
6025         A fix for bug #352536
6026         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
6027
6028 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6029
6030         A fix for bug #352287
6031         * ecore.cs, expression.cs: Do `this' access checking in all member access
6032         expressions.
6033         
6034 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6035
6036         * rootcontext.cs, driver.cs: Switch to linq mode by default.
6037         
6038         * report.cs: Reset message stacks.
6039         
6040 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6041
6042         * generic.cs (InferInPhases): Correctly calculate params position.
6043         
6044 2008-01-08  Marek Safar  <marek.safar@gmail.com>
6045
6046         * cs-tokenizer.cs: No need to parse full string when parsing lambda
6047         arguments.
6048
6049 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6050
6051         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
6052         
6053         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
6054         
6055         * driver.cs: Updated --help option.
6056         
6057 2008-01-07  Marek Safar  <marek.safar@gmail.com>
6058
6059         * generic.cs (InferParamsTypeArguments): Removed.
6060         (InferInPhases): Add params type inference.
6061         (LowerBoundInference): Fixed scoring mechanism.
6062         
6063         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
6064         
6065 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
6066
6067         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
6068         byte array for unsigned "baked" assemblies.
6069
6070 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
6071
6072         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
6073         array for assemblies that are not strongnamed.
6074
6075 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6076
6077         A fix for bug #351481
6078         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
6079         declaring type for nested generic types.
6080         
6081 2008-01-04  Marek Safar  <marek.safar@gmail.com>
6082
6083         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
6084         instead of ToString.
6085         
6086 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6087
6088         A fix for bug #351047
6089         * expression.cs (Binary.ResolveOperator): Allow equality operators between
6090         null and structs only when equality and inequality operators are defined
6091         either as an user-operators or predefined operators.
6092         
6093 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6094
6095         A fix for bug #351047
6096         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
6097         
6098 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6099
6100         A fix for bug #351257
6101         * cs-tokenizer.cs: Advance line number for '\r' correctly.
6102         
6103 2008-01-03  Marek Safar  <marek.safar@gmail.com>
6104
6105         A fix for bug #351157
6106         * class.cs (Using): Fixed yet another broken cloning.
6107         
6108         (Block): Put back more sensible default value for statements.
6109         
6110 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
6111
6112         * codegen.cs: Allow AssemblyVersion with only major version component.
6113         Fixes bug #351055.
6114
6115 2007-12-29  Marek Safar  <marek.safar@gmail.com>
6116
6117         A fix for bug #324654
6118         * class.cs: Use FullName property as member name.
6119
6120 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6121
6122         A fix for bug #342117
6123         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
6124         constructor constraint.
6125
6126 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6127
6128         A fix for bug #338273
6129         * class.cs (ProbertyBase): Access modifier checks are required for overrides
6130         only.
6131
6132 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6133
6134         A fix for bug #350839
6135         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
6136
6137 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6138
6139         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6140         GHOP:
6141         
6142         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6143
6144         * statement.cs: Changed some Hashtables to use HybridDictionaries
6145         instead. It was observed that some HashTables only contained a few
6146         items in the vast majority of cases. Since HybridDictionary is
6147         more efficient on small sets (<10 elements), "known_variables"
6148         from class ExplicitBlock as well as "labels" and "constants " from
6149         class Block were changed to HybridDictionaries. 
6150
6151         Atsai results: (56216kb->54987kb)
6152
6153         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
6154
6155
6156 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6157
6158         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6159         GHOP:
6160         
6161         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6162         
6163         * expression.cs: foreach loop to for loop, saved on allocation of
6164         enumerator (59333kb->59141kb)
6165
6166         * statement.cs. Changed foreach loops to for loops, saved on
6167         allocation of enumerator (59141kb->59006kb)
6168
6169         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
6170         when constructed with no specified capacity. This was causing a
6171         few ArrayLists to allocate more memory than they would potentially
6172         need in the Block class and MemberCache class. Setting the
6173         ArrayLists to construct with a capacity of 1 saves some
6174         memory. (56216kb->55585kb)
6175
6176 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6177
6178         A fix for bug #347189 (2nd issue)
6179         * expression.cs (MemberAccess): Nested type can be found in base non-generic
6180         type.
6181
6182 2007-12-27  Miguel de Icaza  <miguel@novell.com>
6183         
6184         * report.cs: Do not use colors if stdout and stderr are not a
6185         terminal.
6186
6187 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6188
6189         A fix for bug #346998
6190         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
6191         overloads.
6192
6193 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6194
6195         A fix for bug #343465
6196         * class.cs: Explicit method name for nested types uses dots only.
6197
6198 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6199
6200         A fix for bug #343707
6201         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
6202
6203 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6204
6205         * ecore.cs: Report type inference errors only when arguments count matches
6206         parameter count.
6207         
6208         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
6209         
6210         * expression.cs, report.cs: New warning.
6211         
6212         * typemanager.cs: Catch anonymous method type too.
6213
6214 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6215
6216         A fix for bug #346379
6217         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6218
6219 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6220
6221         A fix for bug #347359
6222         * expression.cs (Invocation): Don't resolve already resolved expression.
6223
6224 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6225
6226         A fix for bug #347189
6227         * class.cs (FixedField): Use non-dependent code only in the define phase.
6228
6229 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6230
6231         A fix for bug #348076
6232         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6233
6234 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6235
6236         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6237         discovered extension methods.
6238
6239 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6240
6241         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6242         method.
6243
6244 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6245
6246         * report.cs (ErrorMessage): Add support for using colors on
6247         terminals that support it. 
6248
6249 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6250
6251         * ecore.cs: Use information about expanded params for error reporting.
6252
6253 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6254
6255         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6256         and logic for params overloads.
6257         
6258 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6259
6260         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6261         as this is also created from the parser.  Fixes #349034
6262
6263 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6264
6265         * statement.cs (Throw.CloneTo): it is valid to have empty
6266         expressions for throw. 
6267
6268 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6269
6270         * cs-parser.jay: Set delegate constraint parsing region correctly.
6271
6272 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6273
6274         A fix for bug #345467
6275         * typemanager.cs (IsEqual): Compare generic parameters position only.
6276         
6277 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6278
6279         * expression.cs (BaseAccess): Type arguments can be null.
6280
6281 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6282
6283         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6284         consistent even when an error has occured.
6285         (Switch.Resolve): Likewise.
6286
6287 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6288
6289         A fix for bug #334505
6290         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6291         overrides.
6292         
6293 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6294
6295         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6296         refactorings required to resolve extension methods correctly when mixing
6297         generics and non-generics members.
6298         
6299 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6300
6301         A fix for bug #342584
6302         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6303         conversion.
6304         
6305 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6306
6307         A fix for bug #342512
6308         * delegate.cs: Use delegate argument expression when is available. Don't
6309         emit virtual call when class is sealed.
6310         
6311 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6312
6313         A fix for bug #325423
6314         * assign.cs (FieldInitializer): Use resolved expression for emit.
6315         
6316         * class.cs: Print less confusing error message.
6317         
6318 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6319
6320         * cs-tokenizer.cs: Removed GMCS ifdefs.
6321         
6322         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6323         mcs.
6324         
6325         * cs-parser.jay: Disabled nullable check.
6326         
6327         * generic-mcs: Copied more generic stuff.
6328                 
6329 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6330
6331         * gcs-parser.jay: Merged to cs-parser.jay.
6332         
6333         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6334         * *.csproj, *.sources: Updated to use only jay parser file.
6335
6336 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6337
6338         * gcs-parser.jay: Added nullable and default expression feature checks.
6339         
6340 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6341
6342         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6343         it fixes many TODOs and hidden bugs.
6344         
6345         * expression: Removed duplicate error check.
6346
6347 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6348
6349         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6350         implicitly type local variable only when it is used in a declaration.
6351
6352 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6353
6354         * attribute.cs: Use CS0612 for empty strings.
6355
6356 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6357
6358         * lambda.cs, statement.cs: Contextual return may act as a statement.
6359
6360 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6361
6362         A fix for a regression cause by #324222
6363         * class.cs: Don't report unused even when it implements an interface.
6364         
6365 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6366
6367         A fix for bug #341205
6368         * ecore.cs, expression.cs: Method group expression cannot do static
6369         method access with an instance reference check before overloading takes
6370         a place.
6371         
6372 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6373
6374         A fix for bug #325359
6375         * class.cs: Use predictable name for automatically generated property.
6376         
6377 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6378
6379         A fix for bug #324996
6380         * expression.cs (Is): Handle case where D is nullable and T is not
6381         correctly.
6382         
6383         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6384         
6385 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6386
6387         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6388         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6389         Flush small error reporting changes.
6390         
6391 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6392
6393         A fix for bug #324996
6394         * expression.cs: Rewrote Is expression implementation to work with
6395         generics, nullable types, anonymous method. A const result expression 
6396         uses existing infrastructure instead of custom not fully-featured one.
6397         
6398 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6399
6400         A fix for bug #340202
6401         * class.cs: Consider generics for volatile field.
6402
6403 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6404
6405         A fix for bug #335594
6406         * expression.cs: Use conversion rules when handling string addition.
6407         
6408 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6409
6410         A fix for bug #336651
6411         * expression.cs: Fixed a crash when probing is on.
6412         
6413 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6414
6415         A fix for bug #324242
6416         * covert.cs: Added a conversion from any nullable-type with an 
6417         underlying enum-type to the type System.Enum.
6418         
6419 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6420
6421         A fix for bug #324222
6422         * class.cs: Report all non-used event fields.
6423         
6424 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6425
6426         A fix for bug #325161
6427         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6428         qualifier for generic types.
6429         
6430 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6431
6432         A fix for bug #322971
6433         * expression.cs, ecore.cs: Added intermediate result value check for
6434         indexers. 
6435         
6436 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6437
6438         A fix for bug #324754
6439         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6440         when it was requested.
6441
6442 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6443
6444         A fix for bug #325101
6445         * expression.cs: Do type not value comparison for `is' expression.
6446
6447 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6448
6449         A fix for bug #320236
6450         * convert.cs: Don't apply user conversion on underlying target type.
6451
6452 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6453
6454         * expression.cs: Don't use unresolved expression for error reporting.
6455  
6456 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6457
6458         A fix for bugs #337712, #324490
6459         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6460         overloading resolution too.
6461         
6462         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6463         the process consistent and more robust.
6464         
6465         * expression.cs, linq.cs, report.cs: Update.
6466
6467 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6468
6469         A fix for bug #332909
6470         * attribute.cs: Resolve attributes in correct context using error
6471         handling procedure.
6472         
6473         * rootcontext.cs: Define Obsolete attribute members as core members.
6474         
6475 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6476
6477         * statement.cs: Removed unused methods.
6478         
6479 2007-10-31  Wade Berrier  <wberrier@novell.com>
6480
6481         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6482         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6483         during 'make dist')
6484
6485 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6486
6487         A fix for bug #338102
6488         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6489         methods registered as non-generics.
6490         
6491 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6492
6493         A fix for bugs #337712, #324490
6494         * delegate.cs: Delegate covariance and contravariance is not allowed for
6495         value types.
6496         
6497 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6498
6499         A fix for bug #337719 
6500         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6501         `from' keyword.
6502         
6503 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6504  
6505         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6506
6507 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6508  
6509         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6510         query expressions.
6511
6512 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6513
6514         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6515
6516 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6517  
6518         A fix for bug #334652
6519         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6520         extension methods when we have not found the best candidate in normal
6521         container.
6522
6523 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6524
6525         * AssemblyInfo.cs: Keep up-to-date.
6526
6527 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6528
6529         * Makefile: Fixed generics compiler name.
6530         
6531 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6532
6533         * lambda.test: removed, lambda parsing is done differently.
6534         
6535         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6536
6537 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6538
6539         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6540
6541 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6542
6543         * Makefile, *.sources : All C# compilers are in mcs folder.
6544         
6545         * *.cs: Use existing 2_1 define for smcs.
6546
6547 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6548
6549         A fix for bug #335847
6550         * assign.cs, expression.cs: Couple of changes to avoid creating a
6551         temporary variable for each object initializer assignment statement. It
6552         simplifies struct initialization too, otherwise two temporary variables
6553         would be required.
6554         Implemented optimization of redundant default element initializers.
6555         
6556 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6557
6558         A fix for bug #336766
6559         * expression.cs (Class.CheckBase): Use generic name when method is
6560         generic.
6561         
6562 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6563
6564         A fix for bug #334737
6565         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6566         variable and not variable argument for prepared copies.
6567
6568 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6569
6570         A fix for bug #325110
6571         * class.cs, expression.cs, attribute.cs: Use open generic method when
6572         checking conditional attribute.
6573         
6574 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6575
6576         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6577         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6578         FeatureIsNotAvailable.
6579
6580 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6581
6582         ** C# 3.0 Partial methods
6583         
6584         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6585         methods support. Because of member cache issue with generics only
6586         non-generics partial methods are fully supported.
6587         
6588 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6589         
6590         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6591         generics and to use member cache for member checking. It also improves
6592         performance and fixes remaining overloads issues.
6593         
6594 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6595         
6596         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6597         roottypes.cs, typemanager.cs:
6598                 
6599         A member cache creation logic changed to add members immediately and
6600         not rely on fallback. The member cache is now only prefered way
6601         how to access and find type declaration members. It saves 5 MB of memory
6602         during MWF compilation and makes code ready for more optimizations and
6603         clean-ups, it's also a pre-requirement for partial methods.
6604         
6605 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6606
6607         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6608         handling for generic parameters.
6609
6610 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6611         
6612         * class.cs (FixedField): Removed redundant volatile check.
6613         
6614 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6615         
6616         * class.cs, decl.cs: Fixed overload members verification to do only one
6617         check per possible collision.
6618         
6619 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6620         
6621         A fix for bug #325478
6622         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6623         and create only one disposable flags container.
6624         
6625 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6626         
6627         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6628         * statement.cs (Fixed): Fixed variables cloning.
6629         
6630 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6631         
6632         A fix for bug #333342
6633         * class.cs (EventField): Don't mark value type event as synchronized. 
6634         
6635 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6636         
6637         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6638         inference to identify best candidate method correctly.
6639         (ProperyExpr): A range variable is read only and cannot be modified.
6640         
6641 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6642         
6643         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6644         logic to identify best candidate method correctly.
6645         
6646 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6647         
6648         * location.cs (Equals, GetHashCode): Removed.
6649         
6650 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6651         
6652         * report.cs: Implemented message recorder. It is used mainly for lambda
6653         expressions to capture otherwise swallowed error messages.
6654         
6655         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6656
6657         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6658         and not at the top.
6659         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6660                 
6661         * expression.cs (MemberAccess): Always report lookup failure.
6662         
6663         * location.cs: Implemented Equals, GetHashCode.
6664         
6665         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6666         
6667 2007-10-10  Jb Evain  <jbevain@novell.com>
6668
6669         * codegen.cs: re-enable assembly version check.
6670
6671 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6672         
6673         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6674         checks.
6675         
6676         * namespace.cs (UsingAlias): Do correct version check.
6677         
6678 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6679         
6680         * expresison.cs, ecore.cs: Issue extension method error message when
6681         appropriate.
6682         
6683         * rootcontext.cs: Added ISO_2 compiler mode option.
6684
6685 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6686         
6687         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6688          message.
6689         
6690 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6691         
6692         * attribute.cs (GetString, GetBoolean): Work with both literal and
6693         constant.
6694         
6695         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6696         Moved method overload specific methods to MethodGroupExpr.
6697         
6698         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6699         it should be less memory consuming.
6700         
6701 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6702
6703         * codegen.cs: remove the assembly version check until the buildbot is
6704         fixed.
6705
6706 2007-10-07  Jb Evain  <jbevain@novell.com>
6707
6708         * attribute.cs (Attribute.GetString): if the value
6709         expression is a StringConstant, return its string value.
6710
6711 2007-10-07  Jb Evain  <jbevain@novell.com>
6712
6713         * typemanager.cs: add `assembly_version_attribute_type`.
6714         * codegen.cs: on attribute emission, check that the
6715         AssemblyVersionAttribute doesn't overflow.
6716
6717 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6718         
6719         A fix for bug #324677
6720         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6721         parent container of a scope container with currently resolved one. 
6722         
6723 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6724         
6725         A fix for bug #325534
6726         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6727         only.
6728         
6729 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6730         
6731         A fix for bug #327504
6732         * class.cs (Operator.Define): Refactored implicit and explicit user
6733         operator conversion rules.
6734         
6735 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6736         
6737         A fix for bug #327520
6738         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6739         
6740 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6741         
6742         A fix for bug #328022
6743         * class.cs (MethodData.Define): Use correct method to check whether
6744         a method implementents an accessor.
6745         
6746 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6747         
6748         A fix for bug #330069
6749         * statement.cs (Fixed.Resolve): Read the first array element only when
6750         an array is instantiated. 
6751         
6752 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6753         
6754         * expression.cs, assign.cs, generics.cs: Print correct operator when
6755         compound assignment is used.
6756         
6757 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6758         
6759         A fix for bug #325841
6760         * expression.cs (ArrayAccess): Use full argument cloning only for
6761         string compound concatenation.
6762         
6763 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6764         
6765         A fix for bug #328774
6766         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6767         assignment.
6768         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6769         assignment.
6770
6771 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6772
6773         Fix #328490
6774         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6775         Event accessibility checks here.  Remove some bogus code that
6776         accidently made GenericMethods work.
6777         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6778
6779 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6780         
6781         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6782         
6783         * statement.cs (Block): Refactored AddVariable to allow error handling
6784         customization.
6785         
6786         * generic.cs: New stub.
6787         
6788 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6789         
6790         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6791         flag.
6792         
6793 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6794
6795         * class.cs: Use partial container to record whether any partial part
6796         contains static field initializer and therefore default contructor has
6797         to be defined.
6798         
6799 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6800
6801         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6802         mono-list when only one of two partial parts has defined accessibility
6803         modifier.
6804         
6805 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6806
6807         A fix for bug #82845
6808         
6809         * class.cs (TypeContainer): Set correct resolve context for all field
6810         initializers.
6811         
6812 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6813
6814         * assign.cs: Fixed a crash when field is resolved twice with an error.
6815         
6816         * codegen.cs: Changed InFieldInitializer to be flag.
6817         
6818         * anonymous.cs, ecore.cs, expression.cs: Update after
6819         IsInFieldInitializer rename.
6820         
6821         * const.cs: Removed unused parameter.
6822         
6823         * class.cs: Changed the way how we resolve and emit field initializers.
6824         The field initilizers have to have access to contructor block to emit
6825         compiler generated code.
6826
6827 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6828
6829         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
6830         generics use TypeContainer instead.
6831         
6832 2007-09-12  Marek Safar  <marek.safar@gmail.com>
6833         
6834         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
6835
6836         * lambda.cs (ResolveParameters): Use more powerful
6837         InflateGenericArgument.
6838         
6839         * parameters.cs: Better exception message.
6840                 
6841 2007-09-10  Marek Safar  <marek.safar@gmail.com>
6842
6843         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
6844         correct expression block type. 
6845         
6846         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
6847         
6848         * expression.cs (Invocation): Extracted method group resolve to
6849         DoResolveOverload.
6850         
6851 2007-09-07  Marek Safar  <marek.safar@gmail.com>
6852
6853         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
6854         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
6855         
6856         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
6857         generic extension methods.
6858
6859 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6860
6861         A fix for bug #82676 (Do I get it right now?)
6862         * convert.cs (Binary.ResolveOperator): An interface is converted to the
6863         object before a standard conversion is applied.
6864         
6865 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6866
6867         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
6868         #82676.
6869         
6870 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6871
6872         A fix for bug #82676
6873         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
6874         non-generic interface types.
6875         
6876 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6877
6878         A fix for bug #82690
6879         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
6880         
6881 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6882
6883         A fix for bug #82571
6884         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
6885         modifier for container based methods.
6886         
6887 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6888
6889         A fix for bug #82676
6890         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
6891         any interface-type T means to any of interface type T.
6892
6893 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6894
6895         * namespace.cs: We have 2 versions of System.Core assembly.
6896
6897 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6898
6899         A fix for bug #82652
6900         * class.cs (Class.GetClassBases): Compare types and not expressions.
6901
6902 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6903
6904         A fix for bug #82620
6905         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
6906         actually never worked before.
6907         (IndexerAccess): Emit prepared arguments before they are modified.
6908         
6909 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6910
6911         A fix for bug #82563
6912         * assign.cs: Revert wrong fix.
6913         
6914         * expression.cs (VariableReference.EmitAssign): Handle ref reference
6915         correctly.
6916         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
6917         Instead of ldelema/stdind we have to use temporary variables to handle
6918         cases like String.Concat (params string[]).
6919         
6920 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6921
6922         * class.cs: EmitAttributes to Emit rename.
6923         
6924         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
6925         null.
6926         (MemberCore.HasClsCompliantAttribute): Don't depend on 
6927         GetClsCompliantAttributeValue execution.
6928         
6929 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6930
6931         * anonymous.cs: Use shorter type prefix.
6932         
6933         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
6934         when exist.
6935         
6936         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
6937         variables when probing is on.
6938         
6939         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
6940         unresolved variables.
6941         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
6942         handle transparent identifiers.
6943         
6944 2007-08-26  Marek Safar  <marek.safar@gmail.com>
6945
6946         * attribute.cs (IsClsCompliant): Add nullable types test.
6947         
6948 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
6949
6950         * doc.cs : catch other types of exception than XmlException to
6951           report CS1570. Fixed bug #82565.
6952
6953 2007-08-23  Marek Safar  <marek.safar@gmail.com>
6954
6955         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
6956         The number of delegate parameters has to match.
6957         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
6958         arrays.
6959
6960 2007-08-21  Marek Safar  <marek.safar@gmail.com>
6961
6962         * anonymous.cs (AnonymousMethod): Generate private anonymous method
6963         to fix problem with private arguments.
6964
6965 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6966
6967         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
6968         
6969         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
6970         
6971         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
6972         empty. Add cloning suport.
6973         
6974         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
6975
6976 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6977
6978         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
6979         to create EmptyCast. It handles EmptyConstantCast specialization for
6980         constants.
6981         
6982 2007-08-18  Marek Safar  <marek.safar@gmail.com>
6983
6984         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
6985         (EmitArrayArgument): One routine for array arguments.
6986         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
6987         
6988 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6989
6990         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
6991
6992 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6993
6994         * anonymous.cs: MemberLookupFinal update.
6995
6996         * class.cs (ConstructorInitializer): Is expression based.
6997         
6998         * delegate.cs: MethodGroupExpr update.
6999         
7000         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
7001         messages.
7002         (Error_MemberLookupFailed): Customizable error override.
7003         (MethodGroupExpr): Keep queried type for later usage.
7004         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
7005         resolve.
7006         
7007         * expression.cs: Error_MemberLookupFailed refactoring.
7008         (New.DoResolve): Resolve as much as possible.
7009         (ElementInitializer.Error_MemberLookupFailed): Object initializer
7010         customization for invalid member types.
7011
7012         * statement.cs: MethodGroupExpr update.
7013         
7014 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7015
7016         * modifier.cs (Check): Check all modifiers and not only accessibility
7017         ones.
7018
7019 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7020
7021         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
7022         type and not an expression.
7023
7024 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7025
7026         * statement.cs (Catch.Clone): Type and variable can be null.
7027
7028 2007-08-16  Marek Safar  <marek.safar@gmail.com>
7029
7030         A fix for bug #81979
7031         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
7032         I am really not sure whether this is the best fix.
7033         
7034         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
7035         only once.
7036         
7037 2007-08-14  Marek Safar  <marek.safar@gmail.com>
7038
7039         ** C# 3.0 Object and collection initializers (major re-write)
7040         
7041         * assign.cs (DoResolve): Initializers are not assign related.
7042         
7043         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
7044         used during collection or object initialization.
7045         
7046         * expression.cs (Error_InvalidArguments): Add initializers specific
7047         messages. More will come later because it requires some general
7048         refactoring.
7049         (New.DoResolve): Better error handling for unsafe types.
7050         (EmptyExpressionStatement): New class.
7051         (ElementInitializer): An object initializer expression.
7052         (CollectionElementInitializer): A collection initializer expression.
7053         (CollectionOrObjectInitializers): A block of object or collection
7054         initializers.
7055         (NewInitialize): New expression with element/object initializers.
7056         
7057         * statement.cs: Reverted object/collection initializer hacks.
7058         
7059         * typemanager.cs (CSharpName): Filter __arglist type.
7060         
7061 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7062
7063         ** C# 3.0 Anonymous Types (update to the latest standard)
7064         
7065         * expression.cs (Binary.ResolveOperator): Threat all null based types
7066         same.
7067         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
7068         (AnonymousTypeParameter): Updated.
7069         
7070         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
7071         (AnonymousTypeClass): New anonymous type container.
7072         
7073         * class.cs (AddField): Return operation result.
7074         
7075         * generic.cs: Another empty TypeArguments overload.
7076         
7077         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
7078         are stored at top of normal hierarchy.
7079         
7080         * typemanager.cs (CSharpName): Filter anonymous types.
7081         
7082 2007-08-09  Marek Safar  <marek.safar@gmail.com>
7083
7084         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
7085         as single Concat call. How could we miss that :-(
7086         
7087 2007-08-08  Marek Safar  <marek.safar@gmail.com>
7088
7089         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
7090         
7091 2007-08-07  Miguel de Icaza  <miguel@novell.com>
7092
7093         * expression.cs: Fix the previous commit, the creation of the
7094         arguments array list needs also to be conditional on the arguments
7095         not being null.
7096
7097         * class.cs: Add a little bit of help to help narrow down problems.
7098
7099         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
7100         not try to copy in that case. 
7101
7102         * driver.cs: When building SMCS, include a new different set of
7103         default assemblies here.   Do this here so we can control whether
7104         to include the default assemblies with /noconfig.
7105
7106 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7107
7108         A fix for bug #81979
7109         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
7110         only.
7111
7112 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7113
7114         A fix for bug #82300
7115
7116         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
7117         we are in probing scope.
7118
7119 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7120
7121         A fix for bug #82301
7122
7123         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
7124         (Statement.CloneTo): Clone and not map children blocks.
7125
7126 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7127
7128         A fix for bug #82299
7129
7130         * expression.cs (LocalVariableReference.CloneTo): Remap local info
7131         variable too.
7132         
7133         * statement.cs (Statement.CloneTo): Clone variables before statements
7134         to allow remaping of local variables.
7135
7136 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7137
7138         A fix for bug #82296
7139
7140         * anonymous.cs,
7141         * report.cs: Log crash details for future clone problems.
7142         
7143         * statement.cs (Return.Clone): Don't clone non-existent expression.
7144
7145 2007-08-03  Raja R Harinath  <harinath@gmail.com>
7146
7147         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
7148         (Class.AddBasesForPart): Move CS0537 check here from ...
7149         * cs-parser.jay (class_declaration): ... here.  Move calling of
7150         'AddBasesForPart' to ...
7151         (class_bases): ... here.
7152         (struct_declaration, interface_declaration): Update to changes.
7153
7154 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7155
7156         A fix for bug #81923
7157
7158         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
7159         conversion is allowed.
7160
7161 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7162
7163         A fix for bug #81564
7164
7165         * ecore.cs (EventExpr): Add IsBase handling.
7166
7167         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
7168         too.    
7169         
7170 2007-08-02  Raja R Harinath  <harinath@gmail.com>
7171
7172         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
7173         * cs-parser.jay: Some whitespace cleanups.
7174         (current_delegate): New.
7175         (type_name): New.
7176         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
7177         a dummy code block, and use 'type_name' instead of 'member_name'.
7178         (interface_declaration, class_declaration): Likewise.
7179         (delegate_declaration): Likewise.  Rearrange slightly and use
7180         'current_delegate'.
7181         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
7182         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
7183
7184 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7185
7186         A fix for bug #82039
7187
7188         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
7189         available.
7190
7191         * typemanager.cs (CSharpName): Split to string overload.
7192
7193 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7194
7195         * expression.cs,
7196         * report.cs: Updated warning CS0472.
7197
7198 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7199
7200         A fix for bug #82181
7201         * cs-parser.jay,
7202         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
7203
7204 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7205
7206         A fix for bug #82277
7207         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
7208
7209 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7210
7211         ** C# 3.0 Type Inference (major bits are working)
7212         
7213         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
7214         (.ImplicitStandardConversionExists): Uses compatible.
7215         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7216         (.InferReturnType): New method.
7217         (.Compatible): Refactored.
7218         (.ResolveParameters): Uses factory to create resolved parameters.
7219         (.CompatibleMethod): Add probing mode support.
7220         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7221         clearly distinguish between 2 different operations.
7222         (LambdaMethod): Moved to lambda.cs.
7223         (AnonymousMethod): Removed unused fields and methods.
7224         (AnonymousDelegate): Simplified.
7225         
7226         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7227         
7228         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7229         
7230         * delegate.cs (Delegate): New mehods to reduce code duplication.
7231         (.GetConstructor): New method.
7232         (.GetInvokeMethod): New method.
7233         (DelegateCreation): Updated.
7234         
7235         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7236         does not exist.
7237         (OverloadResolve): Made probing little bit faster.
7238         
7239         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7240         when probing is on.
7241         
7242         * generic.cs (TypeInferenceContext): Dummy implementation.
7243         
7244         * iterators.cs: Updated after Resolve/Define rename.
7245         
7246         * lambda.cs (LambdaExpression)
7247         (.ResolveParameters): Handles both type of arguments and type inference too.
7248         
7249         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7250         (InflateTypes): Updated.
7251         
7252         * support.cs (InflateTypes): Changed signature and updated.
7253         
7254         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7255         (MemberLookup_FindMembers): More MS tricks.
7256         (GetParameterData): Ditto.
7257         (GetDelegateParameters): Uses quick path for dynamic types.
7258         
7259 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7260
7261         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7262         only.
7263
7264 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7265
7266         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7267         syntax.
7268         
7269 2007-07-26  Jb Evain  <jbevain@novell.com>
7270
7271         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7272         which takes a boolean 'report_errors', similar to the GetMethod.
7273         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7274         in .net 2.1, do not report errors here.
7275
7276         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7277         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7278         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7279         in .net 2.1.
7280
7281         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7282         of the type InternalsVisibleToAttribute before the first call
7283         to CoreLookupType which is allowed to fail (third boolean parameter
7284         to true). Because, during the resolution for a type that is not
7285         immediately found, we try to check if the type is not defined in
7286         a friend assembly, and to do so, we need the
7287         InternalVisibleToAttribute.
7288
7289 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7290
7291         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7292         feature that allows structs to be compared against null and inline
7293         the result as true or false.
7294
7295         Notice that the same code is not permitted inside a generic block
7296         of code that would do:
7297
7298         class Foo<T> where T : struct {
7299             bool Eval (T x)
7300             {
7301                  return x == null;
7302             }
7303         }
7304
7305         It is only allowed if the type of T is not bound (no where
7306         clause).   In my opinion, this CSC 2 behavior is broken but people
7307         seem to be using it (IronRuby does, a few bug reports on bugzilla
7308         have it and some people have complained about it).
7309
7310         All of the users that depend on this behavior have code that is
7311         very likely broken. 
7312         
7313         * report.cs (Warning, Error): make these take object arguments,
7314         not strings, as that allows us to take advantage of Format.
7315
7316 2007-07-20  William Holmes  <billholmes54@gmail.com>
7317
7318         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7319           Left member variable for the Count.
7320         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7321           MemberName.CountTypeArguments to avoid a NRE. 
7322
7323         This code is contributed under the MIT X11 license
7324
7325 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7326
7327         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7328
7329 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7330
7331         * doc.cs : generic method arguments are written as ``x while generic
7332           type arguments are `x. Combined with the previous change, fixed bug
7333           #79706.
7334
7335 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7336
7337         Fix #82120
7338         * expression.cs (Binary.ResolveOperator): When converting
7339         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7340
7341 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7342
7343         * doc.cs : when T: or whatever x: is specified, it does not really
7344           check the doc comment's syntax correctness. Fixed bug #82006.
7345
7346 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7347
7348         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7349         LambdaExpression better.
7350         
7351         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7352         
7353         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7354         
7355         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7356         as it can be generated.
7357         
7358         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7359         modifiers.
7360         
7361         * lambda.cs (LambdaExpression): Refactored to share same code with
7362         AnonymousMethodExpression.
7363         
7364 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7365
7366         * anonymous.cs (MakeName): Include host name for easier debugging.
7367         (LambdaMethod): New class for lambda spcecific stuff.
7368         
7369         * attribute.cs: Set EmitContext return type.
7370
7371         * class.cs: Set EmitContext return type.
7372         
7373         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7374         with null/void meaning.
7375         
7376         * iterators.cs (ContainerType): Implemented.
7377         
7378         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7379         
7380         * statement.cs (Return): Updated to lambda expressions.
7381         (Block.CloneTo): Parent can be null.
7382                 
7383 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7384
7385         A fix for bug #81917
7386         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7387         
7388         * class.cs (FixedField): Check whether field is in unsafe scope.
7389
7390         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7391         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7392
7393         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7394         FieldExpr.
7395         
7396         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7397                 
7398 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7399
7400         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7401         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7402         from Report class.
7403
7404 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7405
7406         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7407         
7408 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7409
7410         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7411         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7412         
7413         * codegen.cs(EmitContext): Add ProbingMode flag.
7414         
7415         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7416         
7417         * driver.cs: For now set both warning values.
7418         
7419         * ecore.cs (SimpleName): Name is readonly.
7420         (MethodGroup.OverloadResolve): One quick path for probing.
7421         
7422         * expression.cs (Unary): Set Oper r/o.
7423         (Binary): Set Oper r/o.
7424         (ParameterReference): Set few instance variables as r/o.
7425         (ParameterReference.DoResolveBase): Don't capture aruments when 
7426         the probing is on.
7427         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7428         (Arglist): arguments are private.
7429         (SizeOf): type is private and r/o.
7430         (MemberAccess): arguments are private.
7431
7432         * report.cs: Enhanced reporting on/off capabilities.
7433         
7434         * lambda.cs: Uses ec.IsInProbingMode.
7435         (ContextualReturn): Derives from return.
7436         
7437         * rootcontext.cs: For now set both warning values.
7438         
7439         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7440         copy if one exists.
7441         (Return.Resolve): Don't die immediately.
7442         (Block.Resolve): Speed-up probing.
7443         (Block.CloneTo): Clone only child blocks.
7444
7445 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7446
7447         * iterators.cs: reverted Miguel's latest change (r81925) as it
7448         breaks the build in System.
7449
7450 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7451
7452         * iterators.cs (Yield.CheckContext): Check for the iterator type
7453         also here as we can call into Yield even in codepaths that are not
7454         directly checked by
7455         (MethodOrOperator is the only path that was checked).
7456
7457         In addition to the standard check, use a more specific check for
7458         constructors to report a more verbose error. 
7459
7460 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7461
7462         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7463         report the warning and continue 
7464
7465         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7466         values on the stack on the call to Emit.   Use EmitStatement if
7467         possible, or using Emit + Pop if not possible.   Fixes #82064
7468
7469 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7470
7471         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7472         avoid try...finally in some cases.
7473
7474 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7475
7476         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7477         
7478         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7479         instead of method. Re-use standard error handling.
7480         (ConstructorInitializer.Emit): Simplified.
7481         
7482         * delegate.cs: Updated after Invocation.EmitCall change.
7483         
7484         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7485         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7486         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7487         method and don't permanently changing input arguments.
7488         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7489         is resolved it has one of the candidates is the best one which is later
7490         used to emit. Removed a few unused method.
7491         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7492
7493         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7494         (Binary.ResolveOperator): Ditto.
7495         (ConditionalLogicalOperator.DoResolve): Ditto.
7496         (Invocation): Uses method group.
7497         (Invocation.DoResolve): Simplified.
7498         (Invocation.EmitCall): Removed useless is_static.
7499         (Invocation.Emit): Delegate to method group.
7500         (Invocation.EmitStatement): Simplified.
7501         (New): Uses method group.
7502         (MemberAccess.DoResolve): Don't destroy original expression.
7503         
7504         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7505         
7506 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7507
7508         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7509         
7510         * anonymous.cs,
7511         * lambda.cs: Add custom error message type.
7512
7513 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7514
7515         * lambda.cs: Simplified little bit.
7516         
7517         * parameter.cs: Introduced ImplicitLambdaParameter.
7518         (Parameters.CreateFullyResolved): New factory instead of ctor.
7519         
7520         * anonymous.cs,
7521         * class.cs,
7522         * delegate.cs: Updated parameter creation.
7523         
7524 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7525
7526         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7527         arguments.
7528         
7529         * generic.cs: Synchronized with gmcs.
7530         
7531 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7532
7533         * class.cs (Indexer): Check return type as soon as possible.
7534         
7535         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7536         members too.
7537         
7538         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7539         
7540         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7541         
7542         * parameter.cs (Parameter): Use expression type when it is available.
7543         
7544         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7545         method modifier for the first parameter only.
7546
7547 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7548
7549         A fix for bug #81938
7550         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7551         
7552         * constant.cs: Tide up an exception message.
7553
7554 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7555
7556         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7557         an uninitialized variable is used.
7558         
7559         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7560
7561 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7562
7563         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7564         not found error handling.
7565
7566         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7567         simplified.
7568         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7569         (ArrayCreation.DoResolve): Simplified.
7570         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7571         its own resolve process.
7572         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7573
7574 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7575
7576         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7577         more error details.
7578         
7579 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7580
7581         * cs-tokenizer.cs: Removed var related stuff.
7582         
7583         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7584         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7585         a type and a keyword at same time.
7586         
7587         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7588         matches to "var".
7589         
7590         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7591         implicitly typed arrays, more changes will follow.
7592         
7593         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7594         
7595 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7596
7597         * ecore.cs (VarExpr): Removed Handled field.
7598         
7599         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7600         build-in assign functionality.
7601         (ForEach.Resolve): Removed all implicitly typed local variable code and
7602         simplified.
7603         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7604         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7605
7606 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7607
7608         * assign.cs: Removed implicitly typed local variable check.
7609         
7610         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7611         referencing implicitly typed local variable.
7612         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7613         variable here.
7614         
7615         * statement.cs (Fixed): Removed unsupported implicitly typed local
7616         variable code.
7617
7618 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7619
7620         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7621
7622 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7623
7624         A fix for bugs #81855 and #76274
7625         * attribute.cs (AttachTo): Always set owner for global attributes to
7626         prefined owner.
7627         
7628         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7629         usefull too.
7630         
7631         * cs-parser.jay: Assembly and module attributes must precede all other
7632         elements except using clauses and extern alias declarations.
7633
7634 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7635
7636         A fix for bug #81748
7637         * cs-tokenizer.cs,
7638         * expression.cs: More checks for non ISO-1 features.
7639
7640 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7641
7642         A fix for bug #81807
7643         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7644         present inside switch statement and it is required by nullable check.
7645
7646 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7647
7648         A fix for bug #81840
7649         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7650         when type matching fails.
7651         
7652         * namespace.cs: Tiny error message change.
7653
7654 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7655
7656         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7657         reporting. Added automatic property check.
7658         
7659         * class.cs: Updated after CheckAbstractAndExtern relocation.
7660         (AEventPropertyAccessor.GetSignatureForError): Customized.
7661         
7662 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7663
7664         * class.cs (DefineBaseTypes): Base type can be undefined.
7665         
7666         * ecore.cs (TypeLookup): Minor refactoring.
7667         (DoResolveAsTypeStep): Removed redundant check.
7668
7669         * namespace.cs (Lookup): Removed redundant check.
7670                 
7671         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7672         ResolveAsTypeTerminal step.
7673         (BootstrapCorlib_*): Simplified.
7674         (PopulateCoreType): Core types can be now external.
7675
7676 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7677
7678         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7679          verification only.
7680          (InferTypeArguments): Infers anonymous expression type arguments.
7681          (Compatible): Split to Compatible and InferTypeArguments. 
7682         
7683         * lambda.cs: Updated.
7684
7685 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7686
7687         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7688
7689 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7690
7691         Fix #80477, cs0135-2.cs, cs0135-3.cs
7692         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7693         names to the "known" variables list.
7694         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7695         parameter names are also "known".
7696         (Block.CheckError136): Remove.
7697         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7698         null.
7699
7700 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7701
7702         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7703
7704 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7705
7706         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7707         internal error not an user error.
7708          
7709         * expression.cs (IsApplicable): Refactored to make debugging easier.
7710
7711         * support.cs: More tricks for non-mono runtimes.
7712         
7713         * typemanager.cs (CoreLookupType): Made public.
7714         (InitSystemCore): All linq specific stuff moved to linq.cs
7715
7716 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7717
7718         * typemanager.cs (CSharpSignature): One more missing build-in types
7719         replacement.
7720         More tricks for non-mono runtime.
7721
7722 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7723
7724         * statement.cs (Block.CheckError136_InParents): Remove.
7725         (Block.AddVariable): Use GetParameterInfo instead.
7726         (ToplevelBlock.ProcessArguments): Likewise.
7727
7728 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7729
7730         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7731         information too.
7732         (ToplevelBlock.GetParameterInfo): Split out of ...
7733         (ToplevelBlock.GetParameterRefernce): ... this.
7734         (ToplevelBlock.ParameterMap): Remove.
7735         * expression.cs (ParameterReference): Update to use
7736         ToplevelParameterInfo.
7737
7738         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7739         regression.
7740
7741         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7742         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7743
7744         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7745         (ToplevelBlock.ProcessParameters) ... here.
7746         (ToplevelBlock..ctor): Invoke it.
7747
7748         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7749         new parameters.
7750
7751         * statement.cs (IKnownVariable): New interface.
7752         (LocalInfo): Implement it.
7753         (ToplevelParameterInfo): New class.
7754         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7755         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7756         GetKnownVariableInfo.
7757
7758 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7759
7760         Partly speed up CS0136 error checks.
7761         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7762         'recurse' parameter.
7763         (Block.DoCheckError136): Only check errors in parameters.  Move
7764         local variable checks ...
7765         (Block.AddVariable): ... here, and ...
7766         (ToplevelBlock.ResolveMeta): ... here.
7767
7768 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7769
7770         * statement.cs (Block.IsChildOf): Remove.
7771
7772         * statement.cs (Statement.Clone): Move special case code ...
7773         (Block.CloneTo): ... here.
7774
7775 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7776
7777         * statement.cs (ToplevelBlock.container): Remove field.  It's
7778         redundant with 'Parent'.
7779         (ToplevelBlock.ContainerBlock): Remove accessor.
7780         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7781         child with parent here, ...
7782         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7783         current_block.
7784         (start_anonymous): Don't save current_block.
7785         (top_current_block): Remove.
7786
7787         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7788         (Block.Resolve): Update to changes.
7789         (Block..ctor): Move setting of "correct" 'Toplevel'
7790         and 'Explicit' fields to ...
7791         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7792
7793 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7794
7795         Kill Block.Implicit
7796         * statement.cs (Block.Implicit): Remove.
7797         (Block): Update to changes.
7798         * flowanalysis.cs: Likewise.
7799
7800         Mildly speed up CheckInvariantMeaningInBlock
7801         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7802         Recursively call AddKnownVariable to all enclosing blocks.
7803         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7804         Remove recursive calls.
7805         (Block): Update to changes.
7806
7807         New ExplicitBlock invariants
7808         * statement.cs (Block.Explicit): New field.  It points to the
7809         immediately enclosing non-implicit block.
7810         (Block..ctor): Maintain the invariant.
7811         * cs-parser.jay: Take advantage of invariant.
7812
7813         Introduce ExplicitBlock
7814         * statement.cs (ExplicitBlock): New.
7815         (ToplevelBlock): Derive from it.
7816         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
7817         sense of flag.
7818         (Block.Implicit): Update to changes.
7819         * cs-parser.jay: Update to changes.
7820
7821         Remove unused field
7822         * codegen.cs (EmitContext.IsLastStatement): Remove.
7823         * statement.cs (Block.DoEmit): Update to changes.
7824
7825 2007-05-25  Raja R Harinath  <rharinath@novell.com>
7826
7827         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
7828         modifying current_block directly.
7829
7830 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
7831         
7832         * class.cs: Implemented automatic properties (C# 3.0)
7833           Thanks to Marek for the help.
7834
7835 2007-05-23  Raja R Harinath  <rharinath@novell.com>
7836
7837         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
7838         variable as assigned, note also that all its components are
7839         assigned too.
7840         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
7841
7842 2007-05-19  Marek Safar  <marek.safar@gmail.com>
7843
7844         * anonymous.cs, class.cs: Emit Compiler generated attribute when
7845         member is marked as compiler generated.
7846         
7847         * decl.cs (MemberCore): Refactored ModFlags into property.
7848
7849         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
7850         (Check): Check only accessibility modifiers.
7851
7852 2007-05-18  Raja R Harinath  <rharinath@novell.com>
7853
7854         Track all assignable slots in one bit array
7855         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
7856         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
7857         logic from VariableMap constructor here.  Use the same 'offset'
7858         variable that's later used for computing offsets of local
7859         variables.
7860         * flowanalysis.cs (UsageVector.parameters): Remove.
7861         (UsageVector): Update to changes.
7862         (VariableMap): Remove.
7863
7864         Avoid creating ParameterMap in every block
7865         * statement.cs (Block.ParameterMap): Move ...
7866         (ToplevelBlock.ParameterMap): ... here.
7867         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
7868         only once.
7869         * flowanalysis.cs (FlowBranching.param_map): Remove.
7870         (FlowBranching.UsageVector): Update to changes.
7871         (FlowBranchingToplevel.CheckOutParameters): Likewise.
7872
7873         * statement.cs (Block.CloneTo): Clone Toplevel field too.
7874
7875         * expression.cs (ParameterReference): Distinguish between block
7876         where parameter was referenced and declared.
7877
7878 2007-05-18  Marek Safar  <marek.safar@gmail.com>
7879
7880         * flowanalysis.cs, statement.cs: Put back improved error handling.
7881
7882 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
7883         
7884         * assign.cs:
7885         * expression.cs:
7886           Imporved object and collection initialization (C# 3.0).
7887
7888 2007-05-15  Marek Safar  <marek.safar@gmail.com>
7889
7890         A fix for bug #81380
7891         * expression.cs (Is.DoResolve): Only value types have constant `is'
7892         behaviour.
7893
7894 2007-05-15  Raja R Harinath  <rharinath@novell.com>
7895
7896         * statement.cs (ToplevelBlock.child): Remove.
7897
7898 2007-05-15  Raja R Harinath  <harinath@gmail.com>
7899
7900         Rationalize ResolveMeta: refactoring
7901         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
7902         out constant handling code into ...
7903         (Block.DoResolveConstants): ... this.
7904
7905         Rationalize ResolveMeta: kill local_map
7906         * statement.cs (Block.local_map, Block.LocalMap): Remove.
7907         (Block.AssignableSlots): New.
7908         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
7909         for locals -- move code from VariableMap here.  Avoid unnecessary
7910         allocations.
7911         * flowanalysis.cs (FlowBranching.local_map): Remove.
7912         (FlowBranching..ctor): Use Block.AssignableSlots.
7913         (VariableMap): Remove unused constructors.
7914
7915 2007-05-11  Raja R Harinath  <rharinath@novell.com>
7916
7917         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
7918
7919 2007-05-11  Marek Safar  <marek.safar@gmail.com>
7920
7921         * typemanager.cs (IsFriendAssembly): Should not be called for building
7922         assembly.
7923
7924 2007-05-09  Marek Safar  <marek.safar@gmail.com>
7925
7926         * literal.cs (NullConstant): Print null in all cases.
7927         
7928         * expression.cs (Binary.ResolveOperator): Implemented delegate
7929          comparison based on C# 2.0 changes.
7930
7931 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
7932
7933         This code is contributed under the MIT X11 license
7934         
7935         The following enables support for several C# 3.0 language features:
7936         
7937         * cs-tokenizer.cs: Added support for the "var" keyword.
7938         
7939         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
7940           Added VarExpr class to facilitate type inferencing.
7941         
7942         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
7943           to support anonymous types.
7944         
7945         * assign.cs: Added support for type inferencing and initialization.
7946         
7947         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
7948         
7949         * expression.cs: Added implicit array support to ArrayCreation.
7950           Added 5 types and 1 interface:
7951           
7952           IInitializable                Implementing classes can inject initializing
7953                                         statements after object instantiation.
7954           
7955           Initializer                   Stores data for object initialization.
7956           
7957           AnonymousType                 An expression for anonymous types.
7958           
7959           AnonymousTypeParameter        Stores data about an anonymous type's field.
7960           
7961           NewInitialize                 An expression for object initialization.
7962           
7963           CollectionInitialize          An expression for collection initialization.
7964         
7965         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
7966           statements.
7967
7968 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7969
7970         A fix for bug #81500
7971         * cs-tokenizer.cs: Add special handling for coalescing operator.
7972
7973 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7974
7975         A fix for bug #81529
7976         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
7977         its value from base class until it is redefined.
7978
7979 2007-05-02  Raja R Harinath  <rharinath@novell.com>
7980
7981         Fix regression in cs0631-3.cs
7982         * cs-parser.jay (operator_declarator): Add opt_attributes to error
7983         fallback.  Make error fallback catch more cases.
7984
7985 2007-05-01  Miguel de Icaza  <miguel@novell.com>
7986
7987         * cs-parser.jay: Allow parameters in operator declarations to have
7988         attributes. 
7989
7990 2007-04-27  Miguel de Icaza  <miguel@novell.com>
7991
7992         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
7993         exists. 
7994
7995         * lambda.cs (ContextualReturn.Resolve): An expression is valid
7996         inside the ContextualReturn, it does not have to be an
7997         ExpressionStatement. 
7998
7999 2007-04-24  Miguel de Icaza  <miguel@novell.com>
8000
8001         * lambda.cs (ContextualReturn.Resolve): if the return type is not
8002         set, set it.
8003
8004 2007-04-23  Miguel de Icaza  <miguel@novell.com>
8005
8006         * anonymous.cs (AnonymousContainer): split the virtual Resolve
8007         method in two methods: ResolveNoDefine and Resolve.
8008
8009         ResolveNoDefine will stop just after ResolveTopBlock has been
8010         called.   
8011
8012         Resolve will then continue by creating a method and issuing the
8013         call to method.Define ().
8014
8015         (AnonymousMethod): Split and implement the new Resolve and
8016         ResolveNoDefine as well.
8017
8018         * lambda.cs (LambdaExpression): Split the anonymous method
8019         resolution code into a separate routine (CoreCompatibilityTest)
8020         from DoCompatibleTest.
8021
8022         (LambdaExpression.TryBuild): New method, this method tries to
8023         build the LambdaExpression with the given set of types to be used
8024         as the types for the various parameters of the lambda expression. 
8025
8026         If the compilation succeed with the given types, the infered type
8027         of the Anonymous method is returned, otherwise null is returned.
8028
8029 2007-04-23  Marek Safar  <marek.safar@gmail.com>
8030
8031         A fix for bug #81414
8032         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
8033
8034 2007-04-22  Miguel de Icaza  <miguel@novell.com>
8035
8036         * cs-tokenizer.cs: Change various identifiers here from the
8037         camelCasing to the recommended Linux-like style for instance
8038         variables from the Coding Guidelines. 
8039
8040 2007-04-19  Martin Baulig  <martin@ximian.com>
8041
8042         * convert.cs
8043         (Convert.ImplicitReferenceConversionCore): Allow conversions from
8044         System.Enum to System.ValueType.
8045
8046 2007-04-13  Martin Baulig  <martin@ximian.com>
8047
8048         Rewrote implicit reference conversions.  We need to distinguish
8049         between implicit reference conversions (13.1.4) and implicit
8050         boxing conversions (13.1.5).
8051
8052         According to the spec, there's an an implicit conversion
8053         "From a one-dimensional array-type S[] to IList<T> and base
8054         interfaces of this interface, provided there is an implicit
8055         reference conversion from S to T."  Note that this does not
8056         include boxing conversions.
8057
8058         * convert.cs
8059         (Convert.ImplicitTypeParameterBoxingConversion): New method.
8060         (Convert.ImplicitReferenceConversion): Split into
8061         ImplicitReferenceConversionCore() and
8062         ImplicitBoxingConversionExist().
8063         (Convert.ImplicitReferenceConversionExists): Use the new
8064         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
8065
8066 2007-04-12  Martin Baulig  <martin@ximian.com>
8067
8068         * convert.cs (Convert.ImplicitReferenceConversion): Move the
8069         `TypeManager.null_type' checks up to the top of the method.
8070
8071 2007-04-11  Marek Safar  <marek.safar@gmail.com>
8072
8073         A fix for bug #81350
8074         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
8075         extension methods.
8076
8077 2007-04-11  Martin Baulig  <martin@ximian.com>
8078
8079         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
8080         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
8081         to make this work for generic classes; fixes #79561.
8082
8083 2007-04-11  Martin Baulig  <martin@ximian.com>
8084
8085         * expression.cs (As): Add support for nullable types; fixes #79371.
8086
8087 2007-04-11  Martin Baulig  <martin@ximian.com>
8088
8089         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
8090         `type.FullName' is null; fixes #80243.
8091
8092 2007-04-11  Martin Baulig  <martin@ximian.com>
8093
8094         * expression.cs (Invocation.IsApplicable): Don't modify the method
8095         if type inference succeeded, but the method was not applicable.
8096         Fixes #81250.
8097
8098 2007-04-10  Marek Safar  <marek.safar@gmail.com>
8099
8100         A fix for bug #81324
8101         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
8102         internal and external namespaces containers.
8103
8104 2007-04-10  Martin Baulig  <martin@ximian.com>
8105
8106         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
8107         TypeManager.DropGenericMethodArguments() so we also call
8108         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
8109
8110 2007-04-10  Martin Baulig  <martin@ximian.com>
8111
8112         * iterators.cs (Iterator.CreateIterator): Don't crash if
8113         `method.ReturnType' is null.  This happens if something went wrong
8114         while resolving that typ (we already reported an error in this case).
8115
8116 2007-04-10  Martin Baulig  <martin@ximian.com>
8117
8118         * expression.cs (New.DoResolve): Don't call CheckComImport() on
8119         generic interfaces; report the CS0144 directly.
8120
8121 2007-04-10  Martin Baulig  <martin@ximian.com>
8122
8123         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
8124         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
8125
8126 2007-04-10  Martin Baulig  <martin@ximian.com>
8127
8128         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
8129
8130 2007-04-09  Raja R Harinath  <rharinath@novell.com>
8131
8132         A better fix
8133         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
8134         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
8135
8136         Fix #81338
8137         * statement.cs (For.Resolve): If resolution fails, use
8138         KillFlowBranching.
8139
8140 2007-04-08  Marek Safar  <marek.safar@gmail.com>
8141
8142         * anonymous.cs (MakeName): Make faster and zero-based.
8143         (VerifyExplicitParameterCompatibility): Back to mode where generic
8144         parameter is ignored.
8145         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
8146
8147         * class.cs (EmitType): Method can emit another new method.
8148
8149         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
8150
8151         * driver.cs: Updated.
8152
8153         * lambda.cs: Reuse predefined empty parameters.
8154
8155         * parameter.cs: Updated
8156
8157         * support.cs: Implemented InflateTypes.
8158
8159         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
8160         (InitSystemCore): Introduced to isolate 3.0 dependencies.
8161
8162 2007-04-03  Martin Baulig  <martin@ximian.com>
8163
8164         Fix #80632.
8165
8166         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
8167         version of TypeManager.IsOverride() which also works with generic
8168         types.  
8169
8170 2007-04-03  Martin Baulig  <martin@ximian.com>
8171
8172         Fix #81044.
8173
8174         * convert.cs
8175         (Convert.ExplicitReferenceConversion): We need to cast when
8176         converting from IList<T> to S[].
8177
8178 2007-04-01  Marek Safar  <marek.safar@gmail.com>
8179
8180         * decl.cs (FindExtensionMethods): Consider all candidates with same name
8181         at this level.
8182         
8183         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
8184
8185 2007-03-31  Marek Safar  <marek.safar@gmail.com>
8186
8187         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
8188         argument and return type inferring.
8189
8190         * codegen.cs (InferReturnType): Flag whether return can be inferred.
8191         (ReturnType): Turned to property.
8192
8193         * statement.cs (Return): Implemented return type inferring.
8194
8195         * support.cs (ReflectionParameters): Use local types if possible.
8196
8197 2007-03-30  Raja R Harinath  <rharinath@novell.com>
8198
8199         * flowanalysis.cs (FlowBranching.Reachability): Remove.
8200         (FlowBranching.UsageVector): Update to changes.
8201
8202         Prepare to kill 'Reachability'
8203         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
8204         argument of constructor.
8205
8206 2007-03-29  Raja R Harinath  <rharinath@novell.com>
8207
8208         Prepare to kill 'Reachability'
8209         * flowanalysis.cs (UsageVector.is_unreachable): New.
8210         (UsageVector): Update to maintain 'is_unreachable' in parallel to
8211         'reachability', and verify they're consistent.
8212
8213         Fix #81121
8214         * expression.cs (New.EmitStatement): Handle type parameters here too.
8215
8216 2007-03-29  Martin Baulig  <martin@ximian.com>
8217
8218         Fix #79148.
8219
8220         * anonymous.cs
8221         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8222         CompilerGeneratedClass.
8223         (ScopeInfo.EmitScopeInstance): Make this protected.
8224         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8225         `ec.CurrentAnonymousMethod.Scope == Scope'.
8226
8227         * statement.cs (Block.ScopeInfo): Make this a property.
8228
8229 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8230
8231         Prepare to kill 'Reachability'
8232         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8233         (FlowBranching.UsageVector.Reachability): Remove property.
8234         (FlowBranching.UsageVector.IsUnreachable): New property.
8235         (FlowBranching.UsageVector.ResetBarrier): New.
8236         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8237         * codegen.cs, statement.cs: Update to changes.
8238
8239 2007-03-27  Martin Baulig  <martin@ximian.com>
8240
8241         Fix #81209.
8242
8243         * decl.cs
8244         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8245         generic types.
8246
8247 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8248
8249         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8250         instead of TriState.  Remove all mention of TriState.
8251
8252         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8253         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8254         and maintain invariants.
8255
8256 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8257
8258         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8259
8260 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8261
8262         * expression.cs: Stop using obsolete 2.0 opcodes.
8263
8264 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8265
8266         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8267         one of the latests Martin's fixes.
8268
8269 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8270
8271         * expression.cs: On BigEndian systems, swap the bytes, temporary
8272         solution until we get a new bitconverter class.
8273
8274 2007-03-23  Martin Baulig  <martin@ximian.com>
8275
8276         Fix #81158.
8277
8278         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8279         "Method" and "Method`1".  Normally, a cache lookup is done on the
8280         "Method" form (ie. without the generic arity), but this one makes
8281         lookups on the full form work as well.
8282
8283 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8284
8285         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8286         unused properties.
8287
8288 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8289         * class.cs: 
8290         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8291         ordered_member_list, to TypeBuilder to store members to be defined
8292         in the order they were parsed in.
8293         - ordered_explicit_member_list contains all properties indexers
8294           and methods that are defined as explicit implementation of an
8295           interface or base class.
8296         - ordered_member_list contains all properties indexers and methods
8297           that are not defined as explicit implementation of an interface
8298           or base class.
8299
8300         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8301         functionality in these removed classes has been replaced with 
8302         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8303         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8304
8305         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8306         to CheckForDuplications inside GetMethod and SetMethod Define Method
8307         to handle method property and indexer name conflicts.
8308
8309         Fixes #79434
8310
8311         All code is contributed under the MIT/X11 license.
8312
8313 2007-03-20  Martin Baulig  <martin@ximian.com>
8314
8315         * class.cs (TypeContainer.Interfaces): Removed; they're now
8316         included in `TypeContainer.Types'.
8317
8318 2007-03-20  Martin Baulig  <martin@ximian.com>
8319
8320         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8321
8322         * class.cs (TypeContainer.CreateType): New public method.  This is
8323         now called before DefineType() to create the TypeBuilders.
8324         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8325         has already been created by CreateType().
8326         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8327         don't resolve our base classes here; this has been moved into
8328         DefineBaseTypes().  We're now called from CreateType().
8329         (TypeContainer.DefineBaseTypes): New private method; resolve our
8330         base classes here.  We're now called from DefineType().
8331
8332         * rootcontext.cs
8333         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8334         our types first to create all the TypeBuilders.  After that, call
8335         TypeContainer.DefineType() on all the types which'll resolve their
8336         base classes and setup the resolve order.
8337
8338 2007-03-20  Martin Baulig  <martin@ximian.com>
8339
8340         * class.cs (TypeContainer.Enums): Removed; they're now included in
8341         `TypeContainer.Types'.  
8342
8343 2007-03-20  Martin Baulig  <martin@ximian.com>
8344
8345         * class.cs
8346         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8347         (TypeContainer.DoResolveMembers): Call DefineType() on our
8348         `compiler_generated' classes; moved here from DefineNestedTypes().
8349
8350         * rootcontext.cs
8351         (RootContext.ResolveTree): Call ResolveMembers() on all
8352         TypeContainer's in the `type_container_resolve_order'.
8353
8354 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8355
8356         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8357
8358 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8359
8360         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8361         implementation flags.
8362
8363 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8364
8365         * class.cs: More optimizations for type parameters.
8366
8367 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8368
8369         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8370
8371         * ecore.cs, parameter.cs: More common code for both corlibs.
8372
8373         * typemanager.cs (IsGenericMethod): Simplified.
8374
8375 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8376
8377         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8378         'returns'.
8379         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8380
8381         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8382         unconditionally.  Simplify explanation.
8383         (Try.Resolve, Using.Resolve): Likewise.
8384
8385 2007-03-15  Martin Baulig  <martin@ximian.com>
8386
8387         Fix #80731.
8388
8389         * decl.cs (DeclSpace): If we're a partial class, use our
8390         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8391
8392 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8393
8394         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8395         'throws'.
8396         (FlowBranching.UsageVector): Update to changes.
8397         (FlowBranching.MergeSiblings): Likewise.
8398         * statement.cs: Likewise.
8399
8400 2007-03-15  Martin Baulig  <martin@ximian.com>
8401
8402         Fix #79302.
8403
8404         * decl.cs
8405         (MemberCache): Added a special .ctor for type parameters.
8406
8407         * typemanager.cs
8408         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8409         `MemberCache'.  
8410
8411 2007-03-09  Martin Baulig  <martin@ximian.com>
8412
8413         * enum.cs (Enum): Make this a TypeContainer.
8414         (EnumMember): Derive from `Const'.
8415
8416         * const.cs
8417         (Const.DoResolveValue): New protected virtual method; move most of
8418         the functionality of ResolveValue() here so we can override it in
8419         `EnumMember'.
8420         (Const.CreateConstantReference): Make this virtual.
8421
8422         * class.cs (Kind): Add `Kind.Enum'.
8423         (TypeContainer.Emit): Don't emit the enums here; they're already
8424         in the `RootContext.typecontainer_resolve_order'.
8425
8426         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8427         here; they're already in the `typecontainer_resolve_order'.
8428
8429         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8430         TypeManager.DropGenericTypeArguments().
8431
8432         * typemanager.cs
8433         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8434         (TypeManager.IsEnumType): Likewise.
8435         (TypeManager.EnumToUnderlying): Likewise.
8436         (TypeManager.IsEqual): Add support for enums.
8437
8438 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8439
8440         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8441         DefaultParameterValueAttribute to be undefined, say if System.dll
8442         is not referenced.
8443
8444 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8445
8446         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8447         any mscorlib.
8448
8449 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8450
8451         * class.cs, parameter.cs: Unified parameters verification.
8452
8453 2007-03-08  Martin Baulig  <martin@ximian.com>
8454
8455         * cs-parser.jay (constructor_header): Pass the location to the
8456         newly created TopLevelBlock.
8457
8458 2007-03-07  Martin Baulig  <martin@ximian.com>
8459
8460         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8461
8462 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8463
8464         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8465         with the changes from David, fixes the build.
8466
8467 2007-03-05  David Mitchell  <dmitchell@logos.com>
8468
8469         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8470         and its base interfaces to a one-dimensional array type S[],
8471         provided there is an implicit or explicit reference conversion
8472         from S to T.
8473
8474 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8475
8476         * cs-tokenizer.cs: Implemented basic linq grammar.
8477
8478         * driver.cs: Set linq lang version on demand.
8479
8480 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8481
8482         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8483
8484 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8485
8486         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8487         (Fixes #80455)
8488
8489         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8490         here.
8491         Check property and event extern attributes.
8492
8493         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8494         charset.
8495
8496 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8497
8498         A fix for bug #80407
8499         * ecore.cs: Don't report ambiguity error when methods have same parent.
8500
8501 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8502
8503         A fix for bug #80878
8504         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8505
8506 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8507
8508         * attribute.cs: Enable ExtensionAttribute presence test.
8509
8510 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8511
8512         * class.cs: Warn about missing GetHashCode only when Equals is override.
8513
8514         * decl.cs: Check accessibility of type arguments.
8515
8516         * typemanager.cs: Correctly report nullable array.
8517
8518 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8519
8520         * class.cs, report.cs: Capture more details when things go wrong.
8521
8522 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8523
8524         A fix for bug #80650
8525         * cs-parser.jay: Anonymous container starts at constructor declaration
8526         and not at block beginning because it has to be usable in constructor
8527         initializer.
8528
8529         * statement.cs: Use context location and not block one for error reporting.
8530
8531 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8532
8533         A fix for bug #78712
8534         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8535         too.
8536
8537 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8538
8539         A fix for bug #80493 by Atsushi Enomoto
8540         * cs-parser.jay: Ignore invalid attribute target.
8541
8542 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8543  
8544         * cs-tokenizer.cs: Ignore '\0' as white space character.
8545
8546 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8547
8548         * cs-parser.jay: Add support for lambda expressions to the mcs
8549         compiler as well.
8550
8551         * lambda.cs: Only clone when we are probing, not on the final call
8552         (Compatible is the final call). 
8553
8554         * statement.cs (CloneContext): Introduce class to provide block
8555         remapping during clone.
8556
8557         All statements Clone themselves now.
8558
8559         (Clone): special handling for blocks, when we clone a block, we
8560         register the block inside this routine, as children of the block
8561         might trigger a lookup. 
8562         
8563         * expression.cs: Add support for CloneContext in all expressions. 
8564         
8565 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8566  
8567         A fix for bug #80493
8568         * statement.cs: Report ambiguous warning when interfaces are not related.
8569
8570 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8571
8572         C# 3.0 extension methods.
8573
8574         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8575         cannot be used directly.
8576
8577         * class.cs (Class.Emit): Emit extension attribute if any class method
8578         is extension method.
8579         (Method.Define): Add basic extension method validation conditions.
8580         (Method.Emit): Emit extension attribute for method.
8581
8582         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8583         extension method exists. Currently we follow same approach as Microsoft
8584         does, emit even if a method or a class are private but this can change
8585         later.
8586
8587         * cs-parser.jay: Add handling of `this' keyword in method parameters
8588         context.
8589
8590         * decl.cs (DeclSpace.IsStaticClass): New property.
8591         (MemberCache.FindExtensionMethods): Looks for extension methods with
8592         defined name and extension type.
8593
8594         * doc.cs: Updated after OverloadResolve changes.
8595
8596         * driver.cs: Add new soft reference to System.Core.dll.
8597
8598         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8599         (ExtensionMethodGroupExpr): Represents group of extension methods.
8600
8601         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8602         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8603         to MethodGroupExpr and made non-static for easier customization.
8604         (Invocation.DoResolve): Add extension method lookup when no standard
8605         method was found.
8606         (MemberAccess.DoResolve): Try extension methods if no member exists.
8607
8608         * modifiers.cs: Add METHOD_EXTENSION modifier.
8609
8610         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8611         as well as candidate extension type.
8612         (ComputeNamespaces): When assembly constains extension methods registers
8613         them.
8614         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8615         extension method lookup.
8616         (Namespace.LookupExtensionMethod): Looks for extension method in this
8617         namespace.
8618         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8619         find a method which matches name and extensionType.
8620
8621         * parameter.cs (Parameter): Add This modifer.
8622         (HasExtensionMethodModifier): New property.
8623         (Resolve): Add extension parameter check.
8624         (ModFlags): turned to property to exclude this modifier as it is not real
8625         parameter modifier.
8626         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8627
8628         * support.cs (ParameterData): Add ExtensionMethodType.
8629         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8630
8631         * typemanager.cs: Add type and ctor extension attribute type.
8632
8633 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8634
8635         * report.cs (DisableErrors, EnableErrors): used to prevent error
8636         output when we are "trying" to compile various methods with
8637         different types. 
8638
8639         * ecore.cs (Expression): Add Clone method that calls the virtual
8640         CloneTo method.  The current CloneTo method in Expression throws
8641         an exception so we can track down all the places where this must
8642         be implemented (not using abstract, because that would be a lot of
8643         up-front-work before we can start testing the implementation
8644         idea). 
8645
8646         Important: we only need Clone capabilities for expressions created
8647         by the parser, as the expressions we will be cloning are
8648         expressions in the pre-resolved state.   This vastly simplifies
8649         the work required. 
8650         
8651         (SimpleName): Add CloneTo that does nothing.
8652         (EmptyCast): Add CloneTo.
8653         
8654         * expression.cs (Binary): Implement CloneTo.
8655         (Invocation.IsApplicable): Store the current ec in
8656         EmitContext.TempEc and restore it on return.  This is used so we
8657         do not have to sprinkle hundres of methods with an extra
8658         EmitContext, we know that the only user is the lambda expression
8659         ImplicitConversionExists code. 
8660         
8661         (Argument): Add Cloning capabilities.
8662         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8663         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8664         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8665         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8666         IndexerAccess): Add Clone capability.
8667
8668         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8669
8670         (Argument): Add cloning capability.
8671
8672         * assign.cs (Assign): Implement CloneTo.
8673
8674         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8675         
8676         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8677         version by calling Convert with the EmitContext (that we are
8678         currently storing in ec, this is not great, but will do for now,
8679         to avoid passing EmitContext parameters to hundreds of functions
8680         that do not need them now).
8681
8682         (SetExpression): Remove, it is not needed.
8683         
8684         (ContextualReturn): Implement CloneTo.
8685
8686         * statement.cs (Statement): Implement cloning infrastructure,
8687         similar to expressions.
8688
8689         (Block): Partial implementation of Clone for statements.
8690
8691         (Return): Implement clone.
8692         
8693         * constant.cs (Constant.CloneTo): New method, does nothing.
8694
8695         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8696         solution, until we decide how to exactly do this.  
8697         
8698 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8699  
8700         A fix for bug #80493
8701         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8702         a property is override we need to use second accessor.
8703
8704 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8705  
8706         A fix for bug #80418
8707         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8708         methods.
8709
8710 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8711
8712         Another fix for bug #80749
8713         * pending.cs: Abstract class has priority over interfaces.
8714
8715 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8716
8717         Another fix for bug #80749
8718         * pending.cs: Abstract class has priority over interfaces.
8719
8720 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8721
8722         Another fix for bug #80749
8723         * pending.cs: Abstract class has priority over interfaces.
8724
8725 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8726
8727         Another fix for bug #80749
8728         * pending.cs: Abstract class has priority over interfaces.
8729
8730 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8731
8732         * class.cs Better error message.
8733
8734         * driver.cs: Add shorter versions of -optimize option.
8735
8736 2007-02-13  Martin Baulig  <martin@ximian.com>
8737
8738         * class.cs (Constructor.Emit): Check the return value of
8739         ec.ResolveTopBlock() and return on error.
8740
8741 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8742
8743         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8744         message to fix error message regression.
8745
8746 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8747
8748         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8749
8750 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8751
8752         A fix for bug #80749
8753         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8754         its parent container.
8755
8756         * class.cs (DefineFieldInitializers): Each initializer can has different
8757         resolve context.
8758
8759         * const.cs: Updated.
8760
8761 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8762
8763         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8764         now all the heavy lifting to check that embedded statements or
8765         expressions have the right form is done in the ContextualReturn.
8766
8767         (ContextualReturn): New class.  
8768
8769         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8770         method that can be invoked to report 201, so we do not replicate
8771         this everywhere.
8772
8773         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8774         
8775         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8776         treating tabs as spaces. 
8777
8778 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8779
8780         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8781         * assign.cs: Use full implicit conversion for right side check.
8782
8783 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8784
8785         * statement.cs (Switch): Switch over boolean type is not standardized.
8786
8787 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8788
8789         A fix for bug #80755
8790         * decl.cs (FindBaseEvent): Don't use method cache for events.
8791
8792 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8793
8794         * cs-parser.jay: Better syntax error handling.
8795
8796         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8797         instead of underlying type value.
8798
8799 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8800
8801         * driver.cs: Check define identifier before is registered.
8802
8803         * namespace.cs: Use existing error message.
8804
8805         * report.cs: New warning.
8806
8807 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8808
8809         A fix for bug #80742
8810         * expression.cs: Delegate Invoke method can be called directly.
8811
8812 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8813
8814         A fix for bug #80676
8815         * class.cs (IsEntryPoint): The Main method can have params modifier.
8816
8817 2007-02-04  Miguel de Icaza  <miguel@novell.com>
8818
8819         * parameter.cs (Parameter, Parameters): Add Clone method.
8820
8821         * anonymous.cs (Compatible): Turn method into virtual method, so
8822         LambdaExpression can implement a different behavior.
8823
8824         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
8825         out the basic checking here, so it can be used by
8826         LambdaExpressions.
8827         
8828         * lambda.cs: Introduce "Compatible" function that will do the
8829         heavy lifting.
8830
8831 2007-02-02  Marek Safar  <marek.safar@gmail.com>
8832
8833         * attribute.cs: Unified one error message.
8834
8835         * class.cs (Class): Use type attributes and not properties to test static
8836         class.
8837         (IsEntryPoint): Don's pass local variable.
8838
8839         * convert.cs: Removed duplicate check.
8840
8841         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
8842
8843         * driver.cs: Don't crash when soft reference does not exist.
8844
8845         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
8846         (UsingEntry): Removed redundant allocation.
8847
8848         * parameter.cs: Add fast path for type parameters.
8849
8850         * support.cs: Don't allocate attribute when it's not used.
8851
8852 2007-01-30  Miguel de Icaza  <miguel@novell.com>
8853
8854         * anonymous.cs
8855         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
8856         this into a virtual method, so we can override it in LambdaExpression.
8857
8858         * driver.cs: Improve diagnostics in case of failure. 
8859
8860         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
8861         write a function that is slightly more complex and that parses:
8862
8863         type identifier [, type identifier]* )
8864
8865         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
8866         this expression:
8867
8868                 (canEmpty ? i >= 0 : i > 0)
8869
8870 2007-01-30  Raja R Harinath  <rharinath@novell.com>
8871
8872         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
8873         exception on possibly valid code.
8874
8875 2007-01-29  Raja R Harinath  <rharinath@novell.com>
8876
8877         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
8878         Push/PopPosition.
8879         (parse_opt_type_arguments): Remove.  It's almost the same as
8880         parse_less_than.
8881         (parse_namespace_or_typename): Use parse_less_than.
8882
8883 2007-01-28  Miguel de Icaza  <miguel@novell.com>
8884
8885         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
8886         this bug took a few hours to find, because the state saved and
8887         restored by PushPosition and PopPosition was ignoring the state of
8888         parse_generic_less_than.
8889
8890         I can also now remove the handling of OP_LT and OP_GT, this solves
8891         the big mistery.
8892         
8893         * cs-tokenizer.cs: store the location for the ARROW token, we use
8894         that in the parser.
8895
8896         (PushPosition, PopPosition): save/restore also `current_token',
8897         restore `parse_generic_less_than' (was missing).
8898
8899         (parse_opt_type_arguments): use parse_type, not
8900         parse_namespace_or_typename to parse types.
8901
8902         * lambda.cs: Empty new file, will eventually have the lambda
8903         expression implementation.
8904
8905         * lambda.test: used to test the internal tokenizer. 
8906
8907         * report.cs (FeatureIsNotISO1): Rename from
8908         FeatureIsNotStandardized, because it was about the language level
8909         (1 vs 2) it was not about standarization.
8910
8911         (FeatureRequiresLINQ): New.
8912
8913         * support.cs (SeekableStreamReader): Only require that the reader
8914         is a TextReader, not a StreamReader, so we can plug StringReader. 
8915
8916         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
8917         given position in the input stream the following tokens can be
8918         parsed as a type followed by an identifier.
8919
8920         (is_punct): after a '(' if parse_type_and_parameter returns true,
8921         then return a special token OPEN_PARENS_LAMBDA which is used to
8922         avoid reduce/reduce errors in the grammar for the
8923         lambda_expression rules.
8924
8925         (parse_type): implement a type parser inside the
8926         tokenizer, the parser only returns true or false depending on
8927         whether the input at a given position can be parsed as a type.
8928
8929         (peek_token): new method used during type parsing.
8930
8931 2007-01-28  Raja R Harinath  <rharinath@novell.com>
8932
8933         Fix #80531
8934         * anonymous.cs (ScopeInfo.InflateParameters): New.
8935         (AnonymousContainer.Resolve): Use it to redirect types of
8936         delegate parameters.
8937
8938 2007-01-27  Raja R Harinath  <rharinath@novell.com>
8939
8940         Fix #80530
8941         * expression.cs (Error_InvalidArguments): Don't use two different
8942         messages for CS1503.  Use ExtraInformation and
8943         SymbolRelatedToPreviousError instead.
8944
8945         Fix #80358
8946         * decl.cs (DeclSpace.initialize_type_params): Don't access
8947         'type_params' of a partial class directly.
8948
8949 2007-01-26  Miguel de Icaza  <miguel@novell.com>
8950
8951         * constant.cs: Removed a handful of out-of-range checks that were
8952         not necessary. 
8953
8954 2007-01-25  Marek Safar  <marek.safar@gmail.com>
8955
8956         * expression.cs (CheckUselessComparison): Add additional check for char
8957         constants.
8958
8959         * namespace.cs: Fixed typo.
8960
8961 2007-01-23  Miguel de Icaza  <miguel@novell.com>
8962
8963         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
8964         gone, instead we inline the test, preventing the needless casts to
8965         longs, ulongs and doubles for the parameters, avoiding calls to
8966         methods that overchecked stuff, and instead inlined things
8967         nicely. 
8968
8969 2007-01-20  Marek Safar  <marek.safar@gmail.com>
8970
8971         * cs-parser.jay: Better parameter error handling.
8972
8973 2007-01-17  Marek Safar  <marek.safar@gmail.com>
8974
8975         A fix for bug #80368, #80522
8976         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
8977         whether array initializer contains constants only.
8978         (ArrayCreation.Emit): Use better formula to decide when
8979         are array initializers for static initialization.
8980         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
8981         have to emit even constants otherwise they are pre-initialized.
8982
8983 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
8984             Raja R Harinath  <rharinath@novell.com>
8985
8986         Fix emit order of 'get' vs. 'set'.
8987         * support.cs (Accessors): New.
8988         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
8989         Note the order in which accessors are declared in the source.
8990         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
8991         Refactored from Property.Define and Indexer.Define.
8992         (PropertyBase.DefineAccessors): New helper that calls the above in
8993         appropriate order as noted by the parser.
8994         (Property.Define, Indexer.Define): Update to changes.
8995         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
8996
8997 2007-01-17  Raja R Harinath  <rharinath@novell.com>
8998
8999         Fix cs0029-6.cs and gcs0029-2.cs (regression)
9000         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
9001         there's an implicit conversion from the current type to the target
9002         type before converting the underlying constant.
9003
9004 2007-01-16  Marek Safar  <marek.safar@gmail.com>
9005
9006         * const.cs (ResolveValue): Updated after constant conversion was made more
9007         generic.
9008
9009         * constant.cs (GetAttributableValue): constant to object conversion is
9010         used for attributes only.
9011         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
9012         constant conversions.
9013         (LongConstant.ConvertImplicitly): Ditto.
9014
9015         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
9016         (ImplicitConversionStandard): Handle constant conversion as extra step.
9017         It solves the issue when constant conversion was called indirectly like
9018         inside array initializer and constant folding was skipped.
9019
9020         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
9021         this change.
9022
9023         * statement.cs(ImplicitConversionStandard): Updated after constant
9024         conversion was made more generic.
9025
9026 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
9027
9028         * expression.cs (As.DoResolve): Use GenericConstraints instead of
9029         Constraints, solves the problem where the compiler incorrectly
9030         reported that a type parameter was not constrained to a class (Bug
9031         80518)
9032
9033 2007-01-14  Marek Habersack  <grendello@gmail.com>
9034
9035         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
9036
9037 2007-01-14  Marek Safar  <marek.safar@gmail.com>
9038
9039         A fix for bug #80368
9040         * assign.cs (FieldInitializer): New class implements field
9041         initializer statement.
9042
9043         * attribute.cs: Update after FieldMember rename.
9044
9045         * class.cs (PropertyBasedMember): New common class for property based
9046         types.
9047         (InterfaceMemberBase): New base class for all members which can be used as
9048         an interface members.
9049         (MethodCore): Moved really common code to InterfaceMemberBase.
9050         (Method.Define): Equal and GetHasCode detection is relevant for methods
9051         only.
9052         (MethodData.Define): Don't assume that public event implements an
9053         interface automatically.
9054         (MethodData.DefineMethodBuilder): Issue an error even if only extern
9055         modifier is used.
9056         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
9057         (FieldMember): Merged with FieldBase.
9058         (EventProperty.AEventPropertyAccessor): New specialization to check whether
9059         event extern modifier can be used.
9060         (EventField.EventFieldAccessor): Moved event field specific code here.
9061         (Event.AllowedModifiers): Even event can be extern.
9062         (Event.FindOutBaseMethod): New override specific to events.
9063         (Indexer.parameters): Reintroduce parameters because base class holds
9064         only properties common data.
9065         (Indexer.CheckForDuplications): Indexers are threated as methods so we
9066         need do extra parameters check.
9067
9068         * const.cs: Update after FieldMember rename.
9069
9070         * decl.cs (MemberCache.FindBaseEvent): New method.
9071
9072         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
9073         to reflect that indexer is now derived from PropertyBased.
9074
9075         * ecore.cs (GetMemberType): Made public.
9076         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
9077         obsolete event.
9078
9079         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
9080         
9081         * typemanager.cs (CSharpSignature): Correctly print event accessors.
9082         (RegisterEvent): Removed.
9083         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
9084         (GetPrivateFieldOfEvent): Renamed to GetEventField.
9085
9086 2007-01-11  Raja R Harinath  <rharinath@novell.com>
9087
9088         Fix #80249
9089         * statement.cs (CollectionForeach.TryType): Prefer generic
9090         GetEnumerator over non-generic variant.  Fix code to follow comments.
9091
9092 2007-01-09  Raja R Harinath  <rharinath@novell.com>
9093
9094         Fix #80446
9095         * support.cs (ReflectionParameter): Don't use an invalid index on
9096         the generic parameter data.
9097
9098 2007-01-08  Miguel de Icaza  <miguel@novell.com>
9099
9100         * driver.cs: Just add a tiny bit of infrastructure.
9101
9102 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9103
9104         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
9105         where field type is struct from current assembly.
9106         
9107         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
9108         it is possible.
9109
9110 2007-01-02  Marek Safar  <marek.safar@gmail.com>
9111
9112         A fix for bug #80381
9113         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
9114         the core types.
9115
9116         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
9117         messages.
9118         (Namespace.LookupType): Always use core types from corlib when speficied.
9119
9120         * report.cs: A new warning.
9121
9122         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
9123         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
9124         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
9125
9126         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
9127         (InitCoreTypes): Set expression type of object_type and value_type
9128         immediately after lookup.
9129
9130 2007-01-01  Miguel de Icaza  <miguel@novell.com>
9131
9132         * cs-tokenizer.cs: Accept Pc class characters (Connector
9133         Punctuation) as valid identifiers.  Fixes #78259
9134
9135         * expression.cs (Invocation.DoResolve): Moved the check for the
9136         use of `this' for doing method calls to the Invocation resolution
9137         step, after overload resolution has taken place instead of doing
9138         the check at the low-level `This.DoResolve' level.
9139
9140         The `This.DoResolve'(appens before overload resolution, so it has
9141         no way of knowing if the method that will be called will be
9142         instace or static, triggering an erroneous report for cs0188 (Bug
9143         78113).
9144
9145         We now do the check for instance method invocations after we know
9146         what method will be called.
9147
9148         (This.CheckThisUsage): Move the actual use of this structure
9149         checking into its own method and expose it. 
9150
9151         * Everywhere that called Error_ValueCannotBeConverted: pass a new
9152         EmitContext.
9153
9154         Exceptions: Null.ConvertImplicitly,
9155         Constant.ImplicitConversionRequired as there are too many call
9156         sites for passing the ec. 
9157
9158         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
9159         EmitContext, if the value is null, then we do not try to provide
9160         the extra information from the error (If a userdefined conversion
9161         exists, as UserDefinedConversion requires a non null-EmitContext).
9162
9163         Fixes: #80347
9164
9165 2006-12-30  Raja R Harinath  <rharinath@novell.com>
9166
9167         * flowanalysis.cs (MyBitVector): Document some invariants.
9168         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
9169         introduced below, and add a couple of others, 
9170
9171 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9172
9173         * attribute.cs (GetMethodObsoleteAttribute): Uses new
9174         GetPropertyFromAccessor and GetEventFromAccessor.
9175         
9176         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
9177         overrides non-obsolete one.
9178         (Indexer.Define): Error message has been moved to the parser.
9179
9180         * cs-parser.jay: Better syntax errors handling.
9181
9182         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
9183         when an invocation has no arguments.
9184
9185         * ecore.cs: Removed not used caching.
9186
9187         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
9188         implementation.
9189
9190         * report.cs: Add a new warning.
9191
9192         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
9193
9194         * typemanager.cs (enumeration_type): Removed.
9195         (CSharpSignature): Reuses IsSpecialMethod.
9196         (IsEqual): Hack for MS BCL.
9197         (GetPropertyFromAccessor): New method.
9198         (GetEventFromAccessor): New method.
9199         (IsSpecialMethod): Fixed to handle more cases.
9200
9201 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9202
9203         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
9204         Made white spaces array static.
9205
9206         * ecore.cs (RemoveGenericArity): Optimized.
9207
9208         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
9209         10 times faster).
9210         (MyBitVector.initialize_vector): Simplified.
9211
9212 2006-12-22  Miguel de Icaza  <miguel@novell.com>
9213
9214         * ecore.cs: Am not entirely happy with this hack, but it seems to
9215         address the issue in 80257 (a small test case for
9216         CreativeDocs.NET). 
9217
9218         I set the MethodGroupExpr.Type to an internal compiler type
9219         (itself in this case) to force the resolution to take place.   Why
9220         it does not take place with a null is beyond me.
9221
9222 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9223
9224         A fix for bug #80288
9225         * expression.cs (ResolveOperator): Consider user defined conversion for
9226         logical and operator too.
9227         (EmitBranchable): Optimization for logical and when full constant folding
9228         could not be applied but one operand is constant.
9229
9230 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9231
9232         * class.cs (GetClassBases): Write 5 times every day, will never use
9233         FullName for error reporting.
9234
9235         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9236
9237 2006-12-19  Martin Baulig  <martin@ximian.com>
9238
9239         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9240         the symbol file info here.
9241
9242 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9243
9244         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9245         of `elseif' is taking then following sections are not taking.
9246         Fixes an issue reported on mono mailing list.
9247
9248 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9249
9250         A fix for bug #80300
9251         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9252         a caller is not taking.
9253
9254 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9255
9256         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9257         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9258         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9259         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9260         * class.cs: Update to changes.
9261
9262 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9263
9264         A fix for bug #79934
9265         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9266         partial container.
9267
9268         * class.cs (ResolveMembers): Register an iterator in current container and
9269         not in shared one.
9270
9271 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9272
9273         Fix test-543.cs
9274         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9275         satisfy a params annotated parameter.
9276
9277 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9278
9279         A fix for bug #77014
9280         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9281         paramters correctly and not rely on hacks in Parameters class.
9282         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9283         at any possition.
9284         (Invocation.VerifyArgumentsCompat): Ditto.
9285         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9286         any possition.
9287
9288         * parameter.cs (HasParams): Don't assume that params is the last one.
9289
9290         * support.cs (ReflectionParameters.ctor): Look for params attribute
9291         correctly.
9292         (ReflectionParameters.ParameterType): Removed hack when we returned last
9293         parameter for out of range parameters.
9294         (ParameterName, ParameterModifier): Ditto.
9295
9296 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9297
9298         A fix for bug #79987
9299         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9300         when assembly is not CLS compliant but type is. I have no idea why is this
9301         allowed.
9302
9303         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9304
9305 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9306
9307         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9308         in struct constructors, they are basically no-ops.
9309
9310 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9311
9312         * cs-tokenizer.cs (Position): Save preprocessor status too.
9313
9314 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9315
9316         A fix for bug #77794
9317         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9318
9319 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9320
9321         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9322         Fixes #69299.
9323         (pp_expr): Report error for an invalid expression.
9324         (handle_preprocessing_directive): Simplified; add more error checking.
9325
9326 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9327
9328         A fix for bug #74939
9329         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9330         directives handling.
9331
9332 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9333
9334         A fix for bugs #80093, and #75984
9335         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9336         logic, it seems to me as it worked before "by coincidence".
9337         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9338         (cleanup): Enabled endif check.
9339
9340 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9341
9342         A fix for bug #80162
9343         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9344         enumerators are never ambiguous.
9345
9346 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9347
9348         Fix #80060
9349         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9350
9351 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9352
9353         A fix for bug #80144
9354         * class.cs (EventProperty.Define): Explicit implementation means
9355         that an even is used.
9356
9357 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9358
9359         Fixes the operators implementation (part II)
9360
9361         * cfold.cs (DoConstantNumericPromotions): Renamed to
9362         DoBinaryNumericPromotions and simplified.
9363         (BinaryFold): Couple of conversion fixes; simplified.
9364
9365         * constant.cs, ecore.cs, literal.cs
9366         (ToType): Renamed to ConvertImplicitly.
9367         (Reduce): Renamed to ConvertExplicitly.
9368
9369         * class.cs, convert.cs: Updated.
9370
9371         * expression.cs: TryReduce doesn't throw an exception.
9372
9373 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9374
9375         A fix for bug #80108
9376         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9377         compatible.
9378
9379 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9380
9381         Fixes unary operators implementation (part I)
9382         Also fixes #80026
9383
9384         * cfold.cs (Error_CompileTimeOverflow): Made internal
9385
9386         * const.cs (IConstant): Changed to use reference to constant and
9387         not constant itself.
9388         Updated IConstant implementations.
9389
9390         * constant.cs (CreateConstant): New factory method.
9391         Updated IConstant implementation.
9392
9393         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9394
9395         * ecore.cs: Updated to use CreateConstantReference.
9396
9397         * enum.cs: Reflects IConstant changes.
9398
9399         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9400
9401         * literal.cs (NullConstant): Change to be independently usable.
9402
9403 2006-11-29  Martin Baulig  <martin@ximian.com>
9404
9405         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9406         we need to emit the scope initializer before calling the base .ctor.
9407
9408         * anonymous.cs: Merged back from the new anonymous methods branch.
9409         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9410
9411         * expression.cs (ParameterReference.DoResolveBase): Create a
9412         "normal" ScopeInfo when capturing parameters rather than using the
9413         root scope; this makes things work with anonymous methods having
9414         parameters.
9415
9416         * statement.cs
9417         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9418
9419 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9420
9421         A fix for bug #79987
9422         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9423         check to a base class.
9424         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9425         only when assembly has missing attribute.
9426         * report.cs: Update.
9427
9428 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9429
9430         * cs-tokenizer.cs: Merged with gmcs version.
9431
9432 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9433
9434         * cs-tokenizer.cs,
9435         * cs-parser.jay: Better error message when partial keyword is misplaced.
9436
9437 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9438
9439         A fix for bug #79810
9440         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9441         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9442         a RuntimeWrappedException by default.
9443
9444 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9445
9446         A fix for bug #79843
9447         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9448         implementation.
9449         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9450
9451 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9452
9453         * driver.cs, namespace.cs: Uses faster IndexOf version.
9454
9455 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9456
9457         A fix for bug #79941
9458         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9459         operators.
9460         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9461         even if internal name is different.
9462         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9463         (UserDefinedConversion): Simplified as the operators cannot be internal.
9464         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9465         conversions.
9466         (MethodLookup): Replaced EmitContext with parentType.
9467         * expression.cs: Updated.
9468
9469 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9470
9471         * driver.cs (BadAssembly): Handle all the ugliness of
9472         DefineDynamicAssembly.
9473
9474 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9475
9476         Address parts of #58244 -- most of what's left is in the runtime
9477         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9478         CS1509 error checks, and handle them for all assembly loads, not
9479         just the first invocation.
9480         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9481         * codegen.cs (AssemblyClass.AddModule): ... here.
9482
9483 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9484
9485         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9486         IEnumerable<T> is ambiguous.
9487
9488 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9489
9490         A fix for bug #67689
9491         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9492         GetEnumerator is ambiguous.
9493
9494         * report.cs: Add new warning.
9495
9496 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9497
9498         A fix for bug #78602
9499         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9500         to protected member can be nested type.
9501
9502 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9503
9504         A fix for bug #78965
9505         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9506         to protected member must derive from current type.
9507
9508 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9509
9510         assign.cs: Reuses error method.
9511
9512         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9513         instead of type for constants.
9514         (Expression.Error_ValueAssignment): Common error method.
9515
9516         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9517         for any assignment.
9518
9519 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9520
9521         A fix for bug #79081
9522         * expression.cs (MemberAccess.DoResolve): Check nested type
9523         accessibility.
9524
9525 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9526
9527         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9528
9529 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9530
9531         A fix for bug #76591
9532         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9533
9534 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9535
9536         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9537         type forwarder of the same type multiple times.
9538
9539 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9540
9541         Fix #78820
9542         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9543         instance as an rvalue, even when we later resolve as an lvalue.
9544
9545 2006-10-25  Martin Baulig  <martin@ximian.com>
9546
9547         * anonymous.cs: Fix #79673.
9548
9549 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9550
9551         A fix for bug #79666
9552         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9553         ignored when is optimized (= default value) as its value is already set.
9554
9555 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9556
9557         A fix for bug #79724
9558         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9559         TypeContainer for type lookup.
9560
9561 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9562
9563         A fix for bug #79231
9564         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9565         * expression.cs (OverloadResolve): Always convert type name for
9566         an error message.
9567         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9568         other member.
9569
9570 2006-10-18  Martin Baulig <martin@ximian.com>
9571
9572         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9573
9574 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9575
9576         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9577         an int32, but requesting an int64 from the conversion
9578
9579 2006-10-12  Martin Baulig  <martin@ximian.com>
9580
9581         * anonymous.cs
9582         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9583         
9584 2006-10-12  Martin Baulig  <martin@ximian.com>
9585
9586         * statement.cs
9587         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9588
9589 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9590
9591         * convert.cs: Remove broken code: I was doing the "Existance"
9592         tests for Implicit conversions.
9593
9594 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9595
9596         * convert.cs: Added one missing case in
9597         ImplicitStandardConversionExists uint64 to intptr.
9598
9599         Fixes #59800
9600         
9601         * typemanager.cs (uintptr_type): another core known type.   
9602
9603         * ecore.cs (OperatorCast): routine used to do cast operations that
9604         depend on op_Explicit.  We could change some of the Decimal
9605         conversions to use this.
9606
9607         This one has a probe mechanism that checks both types for an op_
9608         which it coudl be used to eliminate two classes: CastToDecimal
9609         and CastFromDecimal.
9610
9611         * convert.cs: Implement the conversions documented in #59800
9612         
9613 2006-10-10  Martin Baulig  <martin@ximian.com>
9614
9615         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9616         before RootScope.ResolveMembers().
9617
9618         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9619         `CurrentType' if appropriate.
9620
9621 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9622
9623         A fix for bug #78568
9624         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9625         when contains binary operators.
9626         * cs-parser.jay: Updated.
9627
9628 2006-10-09  Martin Baulig  <martin@ximian.com>
9629
9630         * delegate.cs
9631         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9632         moved that into Define() and also do the other type parameter
9633         checks there.  Fixes #79094.  Added gtest-292.cs.
9634
9635         * expression.cs
9636         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9637         since that doesn't include type parameters; don't use `Ldelema'
9638         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9639
9640 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9641
9642         A fix for #77796
9643         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9644         conversion is allowed.
9645
9646 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9647
9648         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9649         error reporting when no error occurs.
9650
9651 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9652
9653         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9654         does not exist.
9655
9656 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9657
9658         Fix #79584
9659         * class.cs (DefineTypeBuilder): Check circular dependencies before
9660         setting the parent of the TypeBuilder.
9661         (CheckRecursiveDefinition): Don't use 'BaseType', since
9662         it may not be valid until after DefineTypeBuilder.  Use
9663         'base_type' instead.
9664
9665 2006-10-04  Martin Baulig  <martin@ximian.com>
9666
9667         Merged the Anonymous Methods patch.
9668
9669         * anonymous.cs, iterators.cs: The new anonymous methods code.
9670
9671         * statement.cs (Variable): New public abstract class.
9672         (LocalInfo.Variable): New public property.
9673         (LocalInfo.ResolveVariable): New public method.
9674         (Block.Flags): Add `IsIterator'.
9675         (Block.AddVariable): Improved the CS0136 check.
9676         (Block.AnonymousChildren): New public property.
9677         (Block.AddAnonymousChild): New public method.
9678         (ToplevelBlock): Update to use the new anonymous method framework.
9679         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9680         `ToplevelBlock'; this is required to correctly implement the
9681         CS0136 check.
9682         (Fixed, Using): Use `TemporaryVariable' instead of directly
9683         creating the `LocalBuilder'.
9684
9685         * parameter.cs (Parameter.ResolveVariable): New public method.
9686         (Parameters.ResolveVariable): Likewise.
9687
9688         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9689
9690         * class.cs (TypeContainer): Replaced the `iterators' list and
9691         corresponding methods with a list of `CompilerGeneratedClass'es.
9692         (TypeContainer.ResolveMembers): New public method.
9693         (Method): `IIteratorContainer' has been replaced by
9694         `IAnonymousHost'.
9695
9696         * expression.cs (VariableReference): New public abstract base
9697         class for `LocalVariableReference', `ParameterReference' and
9698         `This'.
9699
9700         * codegen.cs (EmitContext): Removed `capture_context',
9701         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9702         (EmitContext.EmitThis): Removed.
9703
9704         * cs-parser.jay: Replace `iterator_container' with
9705         `anonymous_host'.       
9706
9707 2006-10-04  Martin Baulig  <martin@ximian.com>
9708
9709         * generic.cs (GenericMethod): Don't make this abstract.
9710         (Constraints.Clone): Added dummy implementation.
9711
9712 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9713
9714         Fix #79577
9715         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9716         'declspaces'.  Avoid allocating arrays willy-nilly.
9717
9718         Fix #79553
9719         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9720         cases out of the switch.
9721
9722 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9723
9724         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9725         message when non-generic type is used with the type arguments.
9726         * expression.cs: Updated.
9727
9728 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9729
9730         Fix #79013
9731         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9732         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9733         Change semantics slightly.  Don't insist on having only one
9734         temporary EmptyExpression -- just throttle the creation of new ones.
9735
9736         Fix #79451
9737         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9738         non-interfaces too.  If no methods are found, don't try to create
9739         a MethodGroupExpr.
9740
9741 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9742
9743         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9744         generic type.
9745
9746         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9747         us produce better error message.
9748
9749 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9750
9751         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9752         of the `|' operator.
9753
9754         * report.cs: A new warning added.
9755
9756 2006-09-27  Martin Baulig  <martin@ximian.com>
9757
9758         * generic.cs (GenericMethod): Don't make this abstract.
9759
9760 2006-09-27  Martin Baulig  <martin@ximian.com>
9761
9762         * report.cs
9763         (InternalErrorException): Added overloaded ctor taking a params array.
9764
9765 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9766
9767         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9768         Fixed the cases when same error was reported twice.
9769
9770         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9771         now report symbol information.
9772
9773 2006-09-25  Martin Baulig  <martin@ximian.com>
9774
9775         * class.cs: Completely unified with the gmcs version.
9776
9777 2006-09-25  Martin Baulig  <martin@ximian.com>
9778
9779         * typemanager.cs (TypeManager.IsNullableType): New public function.
9780         (TypeManager.IsNullableTypeOf): Likewise.
9781         (TypeManager.IsNullableValueType): Likewise.
9782
9783         * class.cs (MethodCore): Added the `GenericMethod' argument from
9784         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9785
9786 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9787
9788         * convert.cs: Unify with gmcs version.
9789
9790 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9791
9792         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9793         verify them as well.
9794
9795         * report.cs: New warning.
9796
9797 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9798
9799         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9800         for anonymous block with out argument.
9801
9802 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9803
9804         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9805         not used private events only.
9806
9807 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9808
9809         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
9810
9811         * const.cs (Const.Define): Check for constant type.
9812         (Const.IsConstantTypeValid): Looks for valid constant types.
9813
9814         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
9815
9816         * ecore.cs (EmptyConstantCast): New common class for all constant based
9817         EmptyCast(s).
9818
9819         * expression.cs (Is.DoResolve): Handle null constant especially.
9820         (New.DoResolve): Check for new void().
9821         (MemberAccess.DoResolve): Cope with all kind of nulls.
9822
9823         * literal.cs (NullConstant): Uses EmptyConstantCast.
9824         (NullDefault): Based on EmptyConstantCast.
9825         (NullLiteral): Uses EmptyConstantCast.
9826
9827         * statement.cs (Block.ResolveMeta): Check for constant type.
9828
9829 2006-09-22  Martin Baulig  <martin@ximian.com>
9830
9831         * delegate.cs, attribute.cs: Merged with the gmcs versions.
9832
9833 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9834
9835         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
9836         not the null type.
9837
9838         Fix part of #79451
9839         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
9840         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
9841         code slightly.
9842
9843 2006-09-22  Martin Baulig  <martin@ximian.com>
9844
9845         * ecore.cs: Merged with the gmcs version.
9846
9847         * generic.cs (ConstructedType): New dummy class.
9848         (TypeArguments): Don't make this abstract.
9849
9850         * typemanager.cs
9851         (TypeManager.IsGenericTypeDefinition): New method.
9852         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
9853
9854 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9855
9856         * expression.cs (ComposedCast): Check for arrays of TypedReference
9857         before creating the type, not after.
9858
9859 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
9860
9861         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
9862         after ToType change.
9863
9864         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
9865         when constant must be implicitly convertible.
9866
9867         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
9868
9869         * ecore.cs (NullCast): Derives from NullConstant.
9870
9871         * expression.cs (Is.DoResolve): Removed useless variables.
9872         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
9873         (New.Constantify): Add enum support.
9874         (MemberAccess.DoResolve): Add warning when accessing null constant or
9875         variable.
9876
9877         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
9878         property.
9879
9880         * literal.cs (NullConstant): New abstract class with common
9881         functionality for all null specializations.
9882         (NullDefault): Represents default(X) when result can be
9883         reduced to null.
9884         (NullLiteral): Updated.
9885
9886         * report.cs: Add new warning.
9887
9888 2006-09-21  Martin Baulig  <martin@ximian.com>
9889
9890         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
9891
9892 2006-09-21  Martin Baulig  <martin@ximian.com>
9893
9894         * generic.cs (GenericConstraints): New dummy class.
9895         (Constraints): Likewise.
9896         (TypeParameter): Likewise.
9897         (TypeParameterName): Likewise.
9898         (GenericMethod): Likewise.
9899
9900         * typemanager.cs (TypeManager.GetGenericArguments): New method.
9901
9902         * decl.cs: Merged with the gmcs version.
9903
9904 2006-09-21  Raja R Harinath  <rharinath@novell.com>
9905
9906         * generic.cs (TypeParameter): Implement IMemberContainer.
9907         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
9908
9909         * rootcontext.cs: Unify with gmcs version.
9910
9911         * report.cs: Unify with gmcs version.
9912         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
9913         from gmcs/generics.cs.
9914         * generics.cs (TypeParameter): New dummy class.
9915
9916         * support.cs: Unify with gmcs version.
9917
9918 2006-09-20  Raja R Harinath  <rharinath@novell.com>
9919
9920         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
9921         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
9922
9923         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
9924         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
9925         * mcs.exe.sources: Add generic.cs.
9926
9927         * codegen.cs: Unify with gmcs version.
9928
9929         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
9930         (EmitContext): Add GenericDeclContainer implementation.
9931         * decl.cs (MemberCore, DeclSpace): Likewise.
9932         * namespace.cs: Remove #ifdef GMCS_SOURCE.
9933
9934         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
9935         MCS TypeManager has a corresponding dummy method.
9936
9937 2006-09-19  Martin Baulig  <martin@ximian.com>
9938
9939         * expression.cs: Completely merged with the gmcs version.
9940
9941 2006-09-19  Martin Baulig  <martin@ximian.com>
9942
9943         * expression.cs (Invocation): Merged with the gmcs version.
9944         (ArrayAccess.GetStoreOpcode): Likewise.
9945
9946 2006-09-19  Martin Baulig  <martin@ximian.com>
9947
9948         * typemanager.cs
9949         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
9950         (TypeManager.IsGenericMethodDefinition): Likewise.
9951
9952 2006-09-19  Martin Baulig  <martin@ximian.com>
9953
9954         * typemanager.cs
9955         (TypeManager.IsEqual): Moved the gmcs implementation here.
9956         (TypeManager.DropGenericTypeArguments): Likewise.
9957         (TypeManager.DropGenericMethodArguments): Likewise.
9958         (TypeManager.GetTypeArguments): Moved here from gmcs.
9959         (TypeManager.HasGenericArguments): Likewise.
9960
9961 2006-09-19  Martin Baulig  <martin@ximian.com>
9962
9963         * expression.cs (Binary): Merged with the gmcs version.
9964
9965 2006-09-19  Martin Baulig  <martin@ximian.com>
9966
9967         * expression.cs (Probe, As, Is): Merged with the gmcs version.
9968
9969 2006-09-19  Martin Baulig  <martin@ximian.com>
9970
9971         * typemanager.cs: Merged with the gmcs version.
9972
9973 2006-09-16  Raja R Harinath  <rharinath@novell.com>
9974
9975         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
9976         * driver.cs: Likewise.
9977
9978 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
9979
9980         A fix for #79401
9981         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
9982         only if parent type is class.
9983         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
9984         update.
9985
9986 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
9987
9988         * cs-parser.jay,
9989         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
9990         keywords are used.
9991         * typemanager.cs(CSharpName): Converts NullType to null.
9992
9993 2006-09-15  Martin Baulig  <martin@ximian.com>
9994
9995         * typemanager.cs
9996         (TypeManager.GetMethodName): Added mcs implementation.
9997         (TypeManager.IsEqual): Likewise.
9998
9999         * ecore.cs
10000         (SimpleName.RemoveGenericArity): Added dummy implementation.
10001
10002         * pending.cs: Merged with the gmcs version.     
10003
10004 2006-09-15  Martin Baulig  <martin@ximian.com>
10005
10006         * statement.cs: Merge with the gmcs version.
10007
10008 2006-09-15  Martin Baulig  <martin@ximian.com>
10009
10010         * statement.cs (Switch): Merge with the gmcs implementation
10011         (without nullables), which is newer.
10012
10013 2006-09-15  Martin Baulig  <martin@ximian.com>
10014
10015         * statement.cs (Block.Variables): Make this public.
10016         (ToplevelBlock.Parameters): Make this a property.
10017         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
10018
10019 2006-09-15  Martin Baulig  <martin@ximian.com>
10020
10021         * namespace.cs: Merge with the gmcs version.
10022
10023 2006-09-15  Martin Baulig  <martin@ximian.com>
10024
10025         * decl.cs (MemberName): Minor code cleanups.
10026
10027 2006-09-15  Martin Baulig  <martin@ximian.com>
10028
10029         * parameter.cs: Merge with the gmcs version.
10030
10031 2006-09-15  Martin Baulig  <martin@ximian.com>
10032
10033         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
10034         and an error in mcs.
10035
10036 2006-09-15  Martin Baulig  <martin@ximian.com>
10037
10038         * flowanalysis.cs: Merged from GMCS; added the generics code into
10039         a `GMCS_SOURCE' conditional so we can share this file.
10040
10041 2006-09-08  Martin Baulig  <martin@ximian.com>
10042
10043         * typemanager.cs (TypeManager.interlocked_type): New public field.
10044         (TypeManager.int_interlocked_compare-exchange): New public field.
10045         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
10046         enumerator types here and call InitGenericCoreTypes().
10047         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
10048         after calling InitEnumUnderlyingTypes().
10049
10050         * rootcontext.cs
10051         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
10052         `classes_second_stage'. 
10053
10054 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
10055
10056         * assign.cs, ecore.cs, expression.cs: Share error message text.
10057         * class.cs (FieldMember.Define): Check for varible of static type.
10058         * driver.cs (LoadAssembly): Uses error output for errors.
10059         * statement.cs: Updated.
10060
10061 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
10062
10063         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
10064         type instance.
10065
10066 2006-09-07  Martin Baulig  <martin@ximian.com>
10067
10068         * driver.cs
10069         (MainDriver): Revert r62663 from Marek; see #70506 for details.
10070
10071 2006-08-29  Miguel de Icaza  <miguel@novell.com>
10072
10073         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
10074         
10075 2006-08-17  Miguel de Icaza  <miguel@novell.com>
10076
10077         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
10078         #52019 and #79064, the use of the \uXXXX sequence in source code
10079         to represent unicode characters.
10080
10081 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
10082
10083         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
10084         support.
10085         * class.cs, ecore.cs, statement.cs: Merged to one error message.
10086
10087 2006-08-13  Miguel de Icaza  <miguel@novell.com>
10088
10089         * assign.cs: Catch attempts to assign to a method groups in += and
10090         report as 1656
10091
10092 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
10093
10094         A fix for #79056
10095         * cs-parser.jay: Don't destroy current array type by typeof of array's.
10096
10097 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
10098
10099         * class.cs (Method.Define): Issue a warning when generic method looks like
10100         an entry point.
10101         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
10102         as well.
10103
10104 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
10105  
10106         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
10107         looking for ctor.
10108         * decl.cs (MemberCache.FindMembers): When container is interface we need to
10109         search all base interfaces as a member can be ambiguous.
10110         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
10111         Constructor member type filter. 
10112         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
10113         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
10114         reporting for returned memberinfos.
10115         * report.cs: Updated.
10116         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
10117         version to work on all runtimes.
10118         (TypeManager.RealMemberLookup): Removed members filtering.
10119
10120 2006-08-08  Raja R Harinath  <rharinath@novell.com>
10121
10122         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
10123         (PropertyExpr.EmitAssign): Likewise.
10124         * expression.cs (Indirection.EmitAssign): Likewise.
10125         (LocalVariableReference.EmitAssign): Likewise.
10126         (ParameterReference.EmitAssign): Likewise.
10127         (Invocation.EmitArguments): Likewise.
10128         (ArrayAccess.EmitAssign): Likewise.
10129         (IndexerAccess.EmitAssign): Likewise.
10130         (This.EmitAssign): Likewise.
10131         (ConditionalLogicalOperator.Emit): Likewise.
10132
10133         Fix #79026
10134         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
10135         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
10136         leave it in after returning it.
10137         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
10138
10139 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
10140
10141         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
10142         message.
10143
10144 2006-08-03  Raja R Harinath  <rharinath@novell.com>
10145
10146         Fix cs0146-3.cs and cs0146-4.cs.
10147         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
10148         enclosing types don't depend on the current type.
10149
10150 2006-08-02  Raja R Harinath  <rharinath@novell.com>
10151
10152         Fix #77963
10153         * class.cs (TypeContainer.DoDefineMembers): Use
10154         FindBaseMemberWithSameName on Parent, since we're interested in
10155         whether we hide inherited members or not.
10156         (FindBaseMemberWithSameName): Make slightly more robust.
10157
10158         Fix the non-generic testcase from #77396
10159         * decl.cs (DeclSpace.DeclContainer): Remove override.
10160
10161         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
10162         declspaces for doppelgangers too.
10163         (UsingEntry): Implement IResolveContext.
10164         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
10165         'this' as the resolve context.
10166         (LocalAliasEntry): Likewise.
10167
10168         Implement parts of #77403
10169         * roottypes.cs (RootDeclSpace): New.  Used to represent the
10170         toplevel declaration space.  Each namespace declaration introduces
10171         a "partial" root declaretion space.
10172         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
10173         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
10174         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
10175         from 'current_namespace.SlaveDeclSpace'.
10176         (namespace_declaration): Likewise.
10177         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
10178         check.  It can't happen now.
10179         * decl.cs (DeclSpace.LookupType): Likewise.
10180         * driver.cs (MainDriver): Sanity check.
10181
10182 2006-08-01  Raja R Harinath  <rharinath@novell.com>
10183
10184         * decl.cs (DeclSpace.FindNestedType): Remove.
10185         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
10186         LookupTypeContainer to get the container of the nested type.
10187         * class.cs (TypeContainer.FindNestedType): Make non-override.
10188
10189 2006-07-31  Raja R Harinath  <rharinath@novell.com>
10190
10191         * decl.cs (DeclSpace.PartialContainer): Move field from ...
10192         * class.cs (TypeContainer.PartialContainer): ... here.
10193         (TypeContainer.AddBasesForPart): New helper.
10194         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
10195         instead.
10196         * cs-parser.jay (current_class): Convert to DeclSpace.
10197         (struct_declaration, interface_declaration, class_declaration):
10198         Use AddBasesForPart instead of .Bases directly.
10199         * const.cs, iterators.cs: Update to changes.
10200
10201 2006-07-28  Raja R Harinath  <rharinath@novell.com>
10202
10203         * class.cs (TypeContainer.AddMemberType): Rename from
10204         AddToTypeContainer.
10205         (TypeContainer.AddMember): Rename from AddToMemberContainer.
10206         (AddTypeContainer): New.  Combine AddClassOrStruct and
10207         AddInterface.
10208         (AddPartial): Update.  Add 'is_partial' argument.
10209         * roottypes.cs: Update to changes.
10210         * cs-parser.jay (push_current_class): New helper for handling
10211         current_container and current_class.
10212         (struct_declaration, interface_declaration, class_declaration):
10213         Use it.
10214
10215 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10216
10217         * roottypes.cs: Rename from tree.cs.
10218
10219         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10220         * tree.cs (Tree, ITreeDump): Remove types.
10221         * rootcontext.cs (tree, Tree): Remove fields.
10222         (root, ToplevelTypes): New.
10223         * *.cs: Update to rename.
10224
10225         * tree.cs (Tree.RecordDecl): Remove.
10226         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10227         namespace here.
10228         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10229
10230 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10231
10232         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10233         DoFlowAnalysis and OmitStructFlowAnalysis here.
10234         (ec.With): Rename from WithUnsafe and generalize.
10235         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10236         (ec.WithFlowAnalyis): New.
10237         * ecore.cs, expression.cs, statement.cs: Update.
10238
10239 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10240
10241         * statement.cs (Block.ResolveMeta): Simplify slightly.
10242
10243         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10244         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10245         check_state to flags.
10246         (CheckState, ConstantCheckState): Update.
10247         (InUnsafe): New read-only property.
10248         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10249         arbitrary flags.
10250         (WithUnsafe): New helper similar to WithCheckState.
10251         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10252         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10253
10254 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10255
10256         Make comparisons use the same IL irrespective of whether they're
10257         in a 'checked' or 'unchecked' context: one of the issues in #78899
10258         * codegen.cs (EmitContext.CheckState): Make read-only property.
10259         (EmitContext.ConstantCheckState): Likewise.
10260         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10261         helper that implement a save/restore stack for CheckState
10262         values.  This is the only way to change check-state.
10263         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10264         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10265         (CheckedExpr.EmitBranchable): New forwarding method.
10266         (UnCheckedExpr): Likewise.
10267         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10268         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10269         (Checked.Resolve, checked.DoEmit): Likewise.
10270
10271 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10272
10273         * anonymous.cs: Cache the resolved anonymous delegate, and return
10274         this so that the ResolveTopBlock is only triggered once, not
10275         twice.
10276
10277         Currently we trigger ResolvetopBlock twice due to a first pass of
10278         argument check compatibility, and a second pass that does the
10279         actual resolution.   
10280         
10281 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10282
10283         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10284         modifiers.
10285         * rootcontext.cs (Reset): Add helper_classes.
10286
10287 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10288
10289         A fix for #78860
10290         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10291         correctly.
10292
10293 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10294
10295         * statement.cs (Lock): Handle expressions of type
10296         TypeManager.null_type specially.  Fixes #78770
10297
10298 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10299
10300         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10301         to an event.
10302
10303 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10304
10305         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10306         for accessors as well.
10307         * ecore.cs (EventExpr): Add AccessorTable.
10308
10309 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10310
10311         A fix for #78738
10312         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10313         for CS0122 where appropriate.
10314         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10315         level attributes.
10316         (Filter): Assembly can be null in the case of top level attributes.
10317
10318 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10319
10320         A fix for #78690
10321
10322         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10323         is done at global level.
10324
10325 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10326
10327         A fix for #77002, Implemented TypeForwarder support.
10328
10329         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10330         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10331         * typemanager.cs (): Add type_forwarder_attr_type.
10332
10333 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10334
10335         * report.cs: Add CS0469 warning.
10336
10337 2006-06-21  Martin Baulig  <martin@ximian.com>
10338
10339         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10340         the `try'-block, so we also report CS0016 etc. there.
10341
10342 2006-06-21  Martin Baulig  <martin@ximian.com>
10343
10344         * delegate.cs
10345         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10346
10347 2006-06-21  Martin Baulig  <martin@ximian.com>
10348
10349         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10350         also report CS1686 for parameters.
10351
10352 2006-06-21  Martin Baulig  <martin@ximian.com>
10353
10354         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10355         instead of an error if the value is not implicitly convertible to
10356         the switch types; fixes #77964.
10357
10358 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10359
10360         Fix #78673
10361         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10362         FieldBuilder is null.
10363
10364         Fix #78662
10365         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10366         'left' and 'right' before error-checking.
10367
10368 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10369
10370         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10371         Fixed bug #78601.
10372         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10373         (FieldExpr.DoResolve): likewise.
10374         (PropertyExpr.InstanceResolve): likewise.
10375         (EventExpr.InstanceResolve): likewise. 
10376
10377 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10378
10379         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10380         attribute applicable tests for attribute argument.
10381
10382 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10383
10384         Fix #78079
10385         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10386         (Binary.OverloadResolve_PredefinedIntegral): New.
10387         (Binary.OverloadResolve_PredefinedFloating): New.
10388         (Binary.OverloadResolve_PredefinedString): New.
10389         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10390         Follow the standard more closely, and treat numeric promotions in
10391         terms of overload resolution.
10392         (Binary.CheckShiftArguments): Simplify.
10393
10394 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10395
10396         * flowanalysis.cs (MyBitVector): Simplify representation.
10397         (MyBitVector.Clone): Avoid allocating BitArray.
10398         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10399         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10400         (*): Update.  Change all references to MyBitVector.And and
10401         MyBitVector.Or to &= and |=.
10402
10403 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10404
10405         Fix cs0231-[34].cs.
10406         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10407         to param arguments too.
10408
10409 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10410
10411         * cs-parser.jay: Catch another parsing form for arglist being
10412         followed by other arguments.  Fixes #78313.
10413
10414 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10415
10416         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10417         checking of out parameters to ...
10418         (FlowBranchingToplevel.Merge): ... here.
10419         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10420         set, propagate the origin upward, and only complain if there was
10421         no other error.
10422         (FlowBranchingException.AddContinueOrigin): Likewise.
10423         (FlowBranchingException.AddReturnOrigin): Likewise.
10424         (FlowBranchingException.AddGotoOrigin): Likewise.       
10425
10426 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10427
10428         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10429         unreachable, skip it.
10430         (FlowBranchingException.Merge): Always propagate jumps, even if
10431         the finally block renders subsequent code unreachable.
10432
10433 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10434
10435         Fix #77601
10436         * statement.cs (Goto.Resolve): Move responsibility for resolving
10437         'goto' to FlowBranching.AddGotoOrigin.
10438         (Goto.SetResolvedTarget): New.  Callback to set the
10439         LabeledStatement that's the target of the goto.
10440         (Goto.DoEmit): Use Leave instead of Br when crossing an
10441         unwind-protect boundary.
10442         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10443         LookupLabel and adjust to new semantics.
10444         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10445         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10446         Goto.SetResolvedTarget to update target.
10447         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10448         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10449         AddBreakOrigin & co.  Delay propagation until ...
10450         (FlowBranchingException.Merge): ... this.
10451
10452         * statement.cs (Block.Resolve): Always depend on flow-branching to
10453         determine unreachability.  Kill workaround that originally emitted
10454         only one statement after an "unreachable" label (see infloop in
10455         test-515.cs).
10456
10457         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10458         This is still "wrong", but anything better would probably need a
10459         multi-pass algorithm.
10460         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10461         usage vector.  Force current usage vector to be reachable, to
10462         optimistically signify backward jumps.
10463         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10464         detected.
10465         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10466         detected, return the original salted-away usage vector instead,
10467         updated with appropriate changes.  Print unreachable warning if
10468         necessary.
10469         * statement.cs (Block.Resolve): Don't print unreachable warning on
10470         a labeled statement.
10471
10472 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10473
10474         * driver.cs: Pass filename without path to AssemblyBuilder's 
10475         AddResourceFile. Fixes bug #78407.
10476
10477 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10478
10479         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10480         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10481         (FlowBranching.MergeChild): Overwrite
10482         reachability information from Labeled branchings too.
10483
10484 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10485
10486         * statement.cs (Goto.Resolve): Merge jump origins here ...
10487         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10488
10489         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10490         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10491         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10492         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10493         here, ...
10494         * statement.cs (Goto.Resolve): ... not here.
10495         (Goto.Emit): Remove CS1632 check.
10496
10497 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10498
10499         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10500         error message.
10501
10502 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10503
10504         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10505         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10506         (FlowBranchingException.Label): Likewise.
10507
10508         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10509         given value.
10510         (MyBitVector.Or): Use it to avoid losing information (Count).
10511         (FlowBranching.MergeOrigins): Likewise.
10512
10513         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10514         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10515         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10516         (UsageVector.ToString): Simplify.
10517         (UsageVector.MergeSiblings): Move here from ...
10518         (FlowBranching.Merge): ... here.
10519         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10520         not a MyBitVector.
10521
10522 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10523
10524         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10525         null bitvector is treated as all-true.
10526
10527         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10528         (MyBitVector): Rationalize invariants.  'vector != null' implies
10529         that we have our own copy of the bitvector.  Otherwise,
10530         'InheritsFrom == null' implies all inherited bits are true.
10531
10532 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10533
10534         * statement.cs (LocalInfo): Add IsConstant.
10535         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10536         local variable for constants.
10537
10538 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10539
10540         * flowanalysis.cs (MyBitVector.Empty): New.
10541         (MyBitVector): Don't allow InheritedFrom to be null.
10542         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10543         (UsageVector, FlowBranching): Update to changes.
10544
10545         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10546         recursion.  The 'Parent == null' condition isn't sufficient for
10547         anonymous methods.
10548         (FlowBranching.AddBreakOrigin): Likewise.
10549         (FlowBranching.AddContinueOrigin): Likewise.
10550         (FlowBranching.AddReturnOrigin): Likewise.
10551         (FlowBranching.StealFinallyClauses): Likewise.
10552         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10553         (FlowBranching.CheckOutParameters): Likewise.
10554         (FlowBranchingToplevel): Terminate all the above recursions here.
10555         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10556         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10557
10558         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10559         toplevel block.
10560         (FlowBranchingToplevel): New.  Empty for now.
10561         (FlowBranching.MergeTopBlock): Update.
10562         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10563         branching for the anonymous delegate.
10564         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10565
10566         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10567         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10568         information at the start of the merge.  Reorganize.
10569
10570 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10571
10572         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10573
10574 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10575
10576         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10577         to newly introduced ctor.
10578
10579         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10580         message to one place.
10581         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10582         global namespace.
10583
10584 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10585
10586         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10587
10588         * ecore.cs (Expression.ResolveAsConstant): Updated.
10589
10590         * statement.cs (ResolveMeta): Updated.
10591
10592 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10593
10594         * cs-parser.jay: __arglist cannot be used in initializer.
10595
10596 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10597
10598         A fix for #77879
10599         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10600         private types.
10601
10602 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10603
10604         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10605         (LabeledStatement): Add 'name' parameter.
10606         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10607         (Block.AddLabel): Update to changes.
10608         * cs-parser.jay (labeled_statement): Likewise.
10609
10610         * flowanalysis.cs (BranchingType.Labeled): New.
10611         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10612         (FlowBranchingLabeled): New.  Does nothing for now, but will
10613         eventually handle 'goto' flows.
10614         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10615         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10616         that's terminated ...
10617         (Block.Resolve): ... here.
10618
10619         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10620         (UsageVector.MergeFinallyOrigins): Likewise.
10621         (FlowBranching.InTryOrCatch): Likewise.
10622         (FlowBranching.AddFinallyVector): Likewise.
10623         (FlowBranchingException): Update to changes.
10624
10625         Fix #78290
10626         * statement.cs (Return.Resolve): Move error checking to ...
10627         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10628         (FlowBranchingException): Handle return origins like break and
10629         continue origins.
10630         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10631
10632 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10633
10634         A fix for #76122
10635         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10636         filter.
10637
10638 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10639
10640         A fix for #77543
10641         * class.cs (MethodData.Define): Do public accessor check only when method
10642         implements an interface.
10643
10644 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10645
10646         Remove special handling of 'break'
10647         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10648         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10649         (UsageVector.Break): Remove.
10650         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10651         reachability.
10652         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10653
10654         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10655         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10656
10657 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10658
10659         A fix for #75726
10660         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10661         be the interface member.
10662
10663 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10664
10665         A fix for #60069
10666         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10667         for emitting small (int) values.
10668
10669 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10670
10671         Fix #59427
10672         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10673         control-flow passes through the 'finally' after merging-in all the
10674         control-flows from 'try' and the 'catch' clauses.
10675
10676         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10677         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10678         always true at the only non-recursive entry point.
10679         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10680         FlowBranchingBreakable.
10681         (FlowBranchingLoop): Remove.
10682         * statement.cs (Return.DoResolve): Update to changes.
10683
10684         Fix #76471, #76665
10685         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10686         (FlowBranching.CreateBranching): Handle it: create a
10687         FlowBranchingContinuable.
10688         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10689         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10690         except that it handles the 'continue' command.
10691         (FlowBranching.UsageVector.MergeOrigins): Rename from
10692         MergeBreakOrigins.
10693         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10694         except that it overrides AddContinueOrigin.
10695         (FlowBranchingException): Override AddContinueOrigin, similar to
10696         AddBreakOrigin.
10697         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10698         Create a new branching around the embedded statement.
10699         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10700         control flow after the embedded statement.
10701         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10702
10703         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10704         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10705         FlowBranchingBreakable.
10706         (FlowBranchingSwitch): Remove.
10707
10708         Fix test-503.cs
10709         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10710         error reporting to ...
10711         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10712         Rename from 'AddBreakVector'.  Add new location argument.  Return
10713         a bool indicating whether the 'break' crosses an unwind-protect.
10714         (FlowBranchingException.AddBreakOrigin): Add.
10715         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10716         flowbranching after updating with the effects of the 'finally'
10717         clause.
10718         (FlowBranchingBreakable): New common base class for
10719         FlowBranchingLoop and FlowBranchingSwitch.
10720
10721         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10722         embedded statement.
10723         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10724
10725 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10726
10727         * statement.cs (Do.Resolve): If the loop is infinite, set the
10728         barrier.
10729         (While.Resolve, For.Resolve): Set a barrier after the embedded
10730         statement.  There's no direct control flow that goes from the end
10731         of the embedded statement to the end of the loop.
10732         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10733         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10734         above ensure that the reachability is correctly computed.
10735
10736         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10737         (UsageVector.MergeBreakOrigins): If the current path is
10738         unreachable, treat it as if all parameters/locals are initialized.
10739         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10740         infinite loops before merging-in break origins.
10741
10742         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10743         (Reachability.Reachable): Split part into ...
10744         (Reachability.Unreachable): ... this.  Simplify.
10745         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10746
10747         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10748         (Reachability.SetThrowsSometimes): Likewise.
10749         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10750         TriState.Always, use corresponding property.
10751         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10752         (Block.Resolve): Likewise.  Remove some redundant checks.
10753
10754 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10755
10756         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10757         (Reachability.Meet): Don't bother checking AlwaysThrows --
10758         barrier is always set.
10759         (FlowBranchingBlock.Merge): Likewise.
10760
10761 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10762
10763         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10764         checks for unreachable.
10765
10766 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10767
10768         A fix for #77980
10769         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10770
10771         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10772         whether field is really assigned.
10773
10774 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10775
10776         * flowanalysis.cs (Reachability): Make 4-argument constructor
10777         private.
10778         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10779         (Reachability.Always): Rename from the highly misleading
10780         'Reachability.Never'.
10781         (FlowBranching.Merge): Update to changes.  Mark an impossible
10782         situation with a 'throw'.
10783         (*): Update to changes.
10784
10785 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10786
10787         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10788         Remove 'Undefined'.
10789         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10790         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10791         (*): Update to changes.
10792         * statement.cs: Update to changes.
10793
10794 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10795
10796         A fix for #78049
10797         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10798
10799 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10800
10801         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10802         dummy UsageVector.
10803
10804         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10805         argument to two arguments: an usage-vector and a bool.  Move call
10806         to FlowBranching.Merge () ...
10807         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10808
10809         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
10810         handling of loop and switch reachability to ...
10811         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
10812
10813 2006-04-27  Raja R Harinath  <harinath@gmail.com>
10814
10815         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
10816         handling to FlowBranchingLoop.InLoop.
10817         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
10818
10819 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
10820
10821         A fix for #78115
10822         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
10823         anonymous method is allowed from AnonymousContainer here.
10824
10825         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
10826
10827 2006-04-24  Raja R Harinath  <rharinath@novell.com>
10828
10829         Fix #78156
10830         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
10831
10832 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
10833
10834         A fix for #49011.
10835         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
10836         (DoubleConstant.Reduce): Ditto.
10837
10838 2006-04-23  Raja R Harinath  <rharinath@novell.com>
10839
10840         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
10841         Remove 'lvalue_right_side' argument.  Move parts to ...
10842         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
10843         (LocalVariable.DoResolveLValue): ... these.
10844
10845 2006-04-21  Raja R Harinath  <rharinath@novell.com>
10846
10847         Fix cs1655.cs
10848         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
10849         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
10850         (LocalVariableReference.DoResolveBase): Use it to implement new
10851         CS1655 check.
10852         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
10853         (Argument.Resolve): Simplify.  Move CS1510 check ...
10854         * ecore.cs (Expression.ResolveLValue): ... here.
10855         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
10856         (PropertyExpr.DoResolveLValue): Likewise.
10857         (FieldExpr.Report_AssignToReadonly): Likewise.
10858         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
10859         LValueMemberAccess or LValueMemberOutAccess on instance depending
10860         on it.
10861         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
10862         DoResolve as appropriate.
10863
10864 2006-04-20  Raja R Harinath  <rharinath@novell.com>
10865
10866         Fix #75800
10867         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
10868         implicit conversions on 'out' and 'ref' arguments.
10869
10870         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
10871         improve clarity.  Remove dead code.
10872
10873         Fix #66031
10874         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
10875         (Catch.Resolve): Resolve VarBlock if it exists.
10876
10877 2006-04-19  Miguel de Icaza  <miguel@novell.com>
10878
10879         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
10880         twice, this was some residual code, the enumerator was emitted
10881         properly in the two branche of if later.
10882
10883 2006-04-19  Raja R Harinath  <rharinath@novell.com>
10884
10885         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
10886         cast is never an lvalue.
10887         (Cast.DoResolve, Cast.ResolveRest): Combine.
10888         (Argument.Emit): Simplify slightly.  Move 'Expr is
10889         IMemoryLocation' check ...
10890         (Argument.Resolve): ... here.
10891         (Argument.Error_LValueRequired): Remove.  Inline into only user.
10892
10893         Simplifications.  Fix cs0191-2.cs
10894         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
10895         CS1649 and CS1651 to ...
10896         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
10897         the actual selection of the error code and message to a lookup
10898         table.  Add a dummy return value to simplify callsites.
10899         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
10900         readonly fields of other instances of the same type.  Move CS0197
10901         warning from ...
10902         * expression.cs (Argument.Resolve): ... here.  Simplify code.
10903         Ensure that ec.InRefOutArgumentResolving is only set during LValue
10904         resolution of an out or ref argument.  The code simplification
10905         above uses this invariant.
10906
10907 2006-04-18  Raja R Harinath  <rharinath@novell.com>
10908
10909         Possibly fix #77752.  Fix cs1690-[4-7].cs.
10910         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
10911         CheckMarshallByRefAccess.  Drop parameter.
10912         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
10913         warning.
10914         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
10915         InstanceExpression.
10916         * report.cs (AllWarnings): Add CS1690.
10917         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
10918         for ref access too.
10919         (LocalVariableReference.DoResolveBase): Update.
10920
10921 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10922
10923         * class.cs (MethodOrOperator): Moved common parts from method class.
10924         detect obsolete attributes.
10925         (Method.Define): Simplified as it reuses code from base.
10926         (Constructor.ValidAttributeTargets): Fixed issue found during
10927         refactoring.
10928         (Destructor.ValidAttributeTargets): Fixed issue found during
10929         refactoring.
10930         (Operator): Finished refactoring set off by #78020. Operator class is now
10931         ordinary method class.
10932
10933         * anonymous.cs: Updated.
10934
10935         * decl.cs (DeclSpace): Add IsGeneric
10936
10937 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10938
10939         * class.cs (Constructor.Emit): Don't emit the attributes twice.
10940
10941 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10942
10943         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
10944         detect obsolete attributes.
10945         (Method.CreateEmitContext): Moved to MethodOrOperator.
10946
10947 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10948
10949         A fix for #78048.
10950         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
10951         customized exception to make crash detection easier.
10952         (MethodOrOperator): Started to work on new base class for methods and
10953         operators.
10954         (Method): Derives from MethodOrOperator.
10955         (Constructor.Emit): Emits its own attributes.
10956         (AbstractPropertyEventMethod.Emit): Ditto.
10957         (Operator): Derives from MethodOrOperator, will refactor fully in extra
10958         patch.
10959         (Operator.Emit): It's temporary more tricky than should be.
10960         
10961         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
10962
10963         * report.cs (InternalErrorException): Add ctor with inner exception.
10964
10965 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
10966
10967         A fix for #76744.
10968         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
10969         only not visible.
10970
10971 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
10972
10973         A fix for #77916.
10974         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
10975         array.
10976
10977 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10978
10979         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
10980         attribute is present and Guid not.
10981         (Interface.ApplyAttributeBuilder): Ditto.
10982
10983         * attribute.cs: Add error message.
10984
10985 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10986
10987         A fix for #78020.
10988
10989         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
10990         sources (it's composite) so hold them in extra array as they are used in
10991         Emit phase only. It worked in the previous versions by mistake.
10992         (Attribute.Emit): Emit attribute for more owners when exist.
10993
10994         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
10995         it has now different behaviour.
10996
10997 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
10998
10999         * constant.cs (Constant.IsDefaultInitializer): New method.
11000
11001         * class.cs: Updated.
11002
11003         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
11004         re-initialize default values. It saves KBs almost for every assembly.
11005         Thanks Zoltan for the idea.
11006         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
11007         (ArrayCreation.DoResolve): Resolve only once.
11008         (ArrayCreation.Emit): Emit static initializer only when it is faster.
11009         (ArrayCreation.GetAttributableValue): Cope with optimized values.
11010
11011 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
11012
11013         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
11014         From #77961.
11015
11016 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11017
11018         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
11019         in an embedded statement too.
11020
11021 2006-04-01  Raja R Harinath  <rharinath@novell.com>
11022
11023         Fix #77958
11024         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
11025
11026 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
11027
11028         A fix for #77966.
11029
11030         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
11031         was not specified.
11032
11033         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
11034
11035 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
11036
11037         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
11038         phase.
11039
11040         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
11041         LocalTemporary change.
11042
11043         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
11044         TypeContainer.
11045         (ClassOrStruct.DefineFieldInitializers): Implemented static field
11046         initializers optimization.
11047         (ClassOrStruct.TypeAttr): Moved from modifiers.
11048         (Constructor.CheckBase): Don't crash when static ctor has parameters.
11049         (FieldBase.ResolveInitializer): Resolves initializer.
11050         (FieldBase.HasDefaultInitializer): New property.
11051
11052         * cs-parser.jay: Removed message.
11053
11054         * expression.cs (CompilerGeneratedThis): New specialization.
11055
11056         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
11057
11058 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
11059
11060         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
11061
11062 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11063
11064         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
11065         be now EnumConstants only.
11066
11067 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
11068
11069         * attribute.cs, driver.cs: Reset more caches.
11070
11071 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11072
11073         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
11074
11075 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11076
11077         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
11078         for easier reuse. Updated all overrides.
11079         (IntegralConstant): New base class for all integral constants.
11080         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
11081         of the constant range, report custom error.
11082         (UIntConstant.Reduce): Fixed uint conversion.
11083
11084         * ecore.cs, literal.cs: Reduce updates.
11085
11086 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11087
11088         A fix for #75813.
11089
11090         * class.cs (Constructor.Define): Removed extra if for default ctors.
11091         A patch from Atsushi Enomoto.
11092
11093 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
11094
11095         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
11096         GetAttributableValue.
11097
11098         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
11099         when required.
11100
11101         * convert.cs (ImplicitConversionRequired): Error message moved to
11102         DoubleLiteral.
11103
11104         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
11105         automatic implicit conversion of an output value.
11106         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
11107
11108         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
11109         conversion.
11110         (TypeOf.GetAttributableValue): Add extra handling for object type.
11111
11112         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
11113         special error message.
11114
11115 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
11116
11117         * class.cs (Constructor.Emit): Don't crash when struct ctor is
11118         InternalCall.
11119         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
11120         compatible with MS runtime.
11121
11122 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
11123
11124         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
11125         attribute arguments here.
11126
11127         * class.cs (Indexer.Define): The check was moved to attribute class.
11128
11129 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
11130
11131         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
11132         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
11133         easier.
11134
11135 2006-03-22  Raja R Harinath  <rharinath@novell.com>
11136
11137         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
11138         mcs to keep code differences small.
11139         * attribute.cs (Attribute.GetParameterDefaultValue): New.
11140         * typemanager.cs (parameter_default_value_attribute_type): New.
11141         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
11142         CS1908 check.
11143
11144 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11145
11146         * expression.cs (StringConcat.Append): Reverted back to no warning state.
11147
11148 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11149
11150         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
11151
11152         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
11153         the blocks too.
11154
11155 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
11156
11157         * doc-bootstrap.cs : fix build.
11158
11159 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11160
11161         * expression.cs (StringConcat.Append): Issue a warning when empty string
11162         is going to append.
11163
11164 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11165
11166         * assign.cs (CompoundAssign.ResolveSource): Removed.
11167
11168         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
11169         clean up.
11170
11171         * class.cs (TypeContainer.FindMethods): Removed.
11172         (TypeContainer.CheckMemberUsage): Made static.
11173
11174         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
11175
11176         * constant.cs (CheckRange): Removed unused type argument.
11177         (CheckUnsigned): Removed unused type argument.
11178
11179         * cs-parser.jay: Updated after MemberAccess clean up.
11180         Uses Length for empty string test.
11181
11182         * cs-tokenizer.cs: Uses Length for empty string test.
11183         (IsCastToken): Made static.
11184         (is_hex): Made static.
11185         (real_type_suffix): Made static.
11186
11187         * decl.cs (SetupCache): Made static.
11188         (OnGenerateDocComment): Removed unused ds argument.
11189
11190         * delegate.cs (VerifyDelegate): Removed unused argument.
11191
11192         * doc.cs: Uses Length for empty string test.
11193
11194         * driver.cs: Uses Length for empty string test.
11195
11196         * enum.cs (IsValidEnumType): Made static
11197
11198         * expression.cs (EnumLiftUp): Removed unused argument.
11199         (ResolveMethodGroup): Ditto.
11200         (BetterConversion): Ditto.
11201         (GetVarargsTypes): Ditto.
11202         (UpdateIndices): Ditto.
11203         (ValidateInitializers): Ditto.
11204         (MemberAccess.ctor): Ditto.
11205         (GetIndexersForType): Ditto.
11206
11207         * flowanalysis.cs: (MergeFinally): Removed unused argument.
11208
11209         * iterators.cs: Updated after MemberAccess clean up.
11210
11211         * location.cs: Uses Length for empty string test.
11212
11213         * namespace.cs: Uses Length for empty string test.
11214
11215          * report.cs (CheckWarningCode): Made static.
11216
11217         * statement.cs (LabeledStatement): Removed unused argument.
11218
11219         * typemanager.cs (FilterNone): Removed.
11220
11221 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11222
11223         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11224         obsolete.
11225
11226         * class.cs: Updated.
11227
11228 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11229
11230         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11231
11232 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11233
11234         A fix for #77822.
11235
11236         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11237         reporting, it's more tricky than I thought.
11238
11239 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11240
11241         A fix for #77816.
11242
11243         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11244         host container.
11245         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11246         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11247         Add more error reporting; Fixed issue with params.
11248
11249         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11250
11251         * cs-parser.jay: AnonymousMethod requires host container.
11252
11253         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11254
11255 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11256
11257         * class.cs: Change 'TypeContainer ds' constructor argument to
11258         'DeclSpace parent'.  Some classes were missed below due to
11259         different naming convention.
11260
11261         * class.cs (MemberCore.Parent): Delete.  This makes the
11262         ParentContainer changes below enforceable by the compiler.
11263
11264         Treat pointers to enclosing declaration space as 'DeclSpace', not
11265         'TypeContainer'.
11266         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11267         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11268
11269         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11270         of TypeContainer.
11271         (Block.AddThisVariable): Likewise.
11272         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11273         (AbstractPropertyEventMethod.Emit): Likewise.
11274         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11275         (GetMethod.Define, SetMethod.Define): Likewise.
11276         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11277         (DelegateMethod.EmitMethod): Likewise.
11278
11279         Fix regression test-partial-13.cs.
11280         Rationalize use of PartialContainer.  Ensure that the partial
11281         class semantics can be tied to type-correctness, i.e., any
11282         violation will cause a compile error.
11283         * class.cs, const.cs: Access all fields that belong to class
11284         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11285         Resolve()-like functions still use 'Parent'.
11286
11287         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11288         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11289         (PropertyMethod.CheckModifiers): Remove unused argument.
11290         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11291         DeclSpace.
11292
11293 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11294
11295         Make semantics of PartialContainer simpler.
11296         * decl.cs (DeclSpace.IsPartial): Remove.
11297         * class.cs (TypeContainer.IsPartial): Likewise.
11298         (TypeContainer..ctor): Set PartialContainer to point to self.
11299         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11300         (TypeContainer.FindNestedType): Likewise.
11301         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11302
11303 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11304
11305         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11306
11307 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11308
11309         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11310         classes.
11311
11312 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11313
11314         * class.cs (Operator.Define): An error for base conversion was not
11315         reported correctly.
11316
11317 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11318
11319         * iterator.cs : yield break is allowed in try statement which has
11320           catch clauses. Fixed bug #77767.
11321
11322 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11323
11324         A fix for #77593, #77574.
11325
11326         * class.cs (MethodCore.CheckBase): Another if for operator.
11327
11328 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11329
11330         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11331         were not resolved
11332
11333         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11334         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11335         conversion test.
11336         
11337         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11338         not needed.
11339
11340         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11341         Updated after another emitcontext usage was clean up. It should help us to
11342         synchronize with gmcs easier.
11343
11344 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11345
11346         A fix for #77353.
11347
11348         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11349         (Event.Define): ditto
11350         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11351
11352         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11353         Removed redundant code and set NewSlot for Invoke method too.
11354
11355         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11356         (Parameters.MergeGenerated): New method. Use this method when you merge
11357         compiler generated argument with user arguments.
11358
11359 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11360
11361         * attribute.cs (ResolveAsTypeTerminal): Removed.
11362
11363         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11364         specialization for predefined types; 30% speed up.
11365         Finally placed obsolete check to right place.
11366         (Expression.ResolveType): Removed.
11367
11368         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11369         Updated after ResolveType was removed.
11370
11371         * expression.cs (Cast.ctor): Check void cast.
11372         (Binary.ResolveAsTypeTerminal): Is never type.
11373         (Conditional.ResolveAsTypeTerminal): Is never type.
11374
11375         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11376
11377 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11378
11379         Fix #77679.
11380         * expression.cs (ParameterReference.DoResolveBase): Change return
11381         type to bool.
11382         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11383         Update.
11384
11385         Fix #77628.
11386         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11387
11388         Fix #77642.
11389         * typemanager.cs (GetFullNameSignature): Don't nullref on
11390         protected accessors.
11391
11392 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11393
11394         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11395         these two separated members to simplify the code.
11396         (Attribute.Resolve): Refactored to use new fields and methods.
11397         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11398         implemented obsolete attribute checking.
11399         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11400         implemented obsolete checking again. It look line never ending quest ;-)
11401         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11402
11403         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11404
11405         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11406
11407         *class.cs (Property.Define): Add RegisterProperty call.
11408
11409         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11410         argument groups (only 2).
11411
11412         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11413         encoding expression to arguments.
11414         (Expression.ExprClassToResolveFlags): Just turned to property.
11415
11416         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11417         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11418         optimized as well as implemented support for zero-length attributes.
11419
11420         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11421         Add caching of PropertyInfo's.
11422
11423 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11424
11425         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11426         error multiple times.
11427
11428 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11429
11430         New partial class implementation.
11431         A fix for #77027, #77029, #77403
11432
11433         * attribute.cs (Attributable): Made attributes protected.
11434
11435         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11436         the replacements of ClassPart and PartialContainer.
11437         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11438         (TypeContainer.AddInterface): Ditto.
11439         (TypeContainer.AddPartial): The main method for partial classes. It checks
11440         for errors and merges ModFlags and attributes. At the end class is added to
11441         partial_parts list.
11442         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11443         required here.
11444         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11445         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11446         from the rest of partial classes.
11447         (TypeContainer.GetClassBases): Simplified.
11448         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11449         DefineType.
11450         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11451         (TypeContainer.HasExplicitLayout): Uses Flags now.
11452         (PartialContainer): Removed.
11453         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11454         (StaticClass): Was merged with Class.
11455         (Class.GetClassBases): class and static class bases are verified here.
11456         (Class.TypeAttr): Added static attributes when class is static.
11457         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11458         (MemberBase): In some cases we need to call parent container for partial
11459         class. It should be eliminated but it's not easy now.
11460
11461         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11462
11463         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11464         partial classed to accumulate class comments.
11465         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11466
11467         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11468
11469         * driver.cs (MainDriver): Tree.GetDecl was removed.
11470
11471         * modifiers.cs (Modifiers): Add partial modifier.
11472
11473         * tree.cs (Tree.decl): Removed.
11474         (RootTypes): Started to use this class more often for root types
11475         specializations.
11476
11477 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11478
11479         A fix for #77615
11480
11481         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11482         external interface does not have an attribute.
11483
11484 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11485
11486         Another prerequisites for new partial classs implementation.
11487         
11488         * attribute.cs (Attribute.Equal): Implemented.
11489         (Attribute.Emit): Changed as attributes can be applied more than twice.
11490         (Attributes.Emit): Check for duplicate attributes here.
11491
11492         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11493         as a parameter, clean-up.
11494
11495 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11496
11497         A fix for #77485
11498
11499         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11500         contains obsolete attribute check which can in some cases look for base
11501         type of current class which is not initialized yet.
11502         (TypeContainer.BaseType): Replacement of ptype.
11503
11504         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11505
11506 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11507
11508         First of prerequisites for new partial classs implemention.
11509         
11510         * attribute.cs (Attributable): Extended by ResolveContext;
11511         Attributes finally have correct context for resolving in all cases.
11512         (AttachTo): Attribute owner is assigned here.
11513
11514         * codegen.cs (IResolveContext): Introduce new interface to hold
11515         all information needed in resolving phase.
11516         (EmitContext): Implements IResolveContext; more clean-up needed here.
11517         
11518         * decl.cs (MemberCore): Implemented IResolveContext.
11519
11520         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11521         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11522         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11523         Refactored to use new IResolveContext instead of EmitContext; cleanup
11524
11525 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11526
11527         * codegen.cs (EmitScopeInitFromBlock): check here the
11528         capture_context, there is no need to make two calls to the
11529         EmitContext. 
11530
11531         * anonymous.cs: Add some debugging messages that might help me
11532         track other instances of this problem in the future (the
11533         regression of test 467).
11534
11535         * cs-parser.jay: track the variable block, as we need to initalize
11536         any captured variables declared in this block for the "catch"
11537         portion of the "Try" statement.
11538
11539         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11540         scope initialization for captured variables. 
11541
11542         Also, move the emit for the variables after the block location has
11543         been marked.
11544
11545 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11546
11547         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11548
11549 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11550
11551         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11552         commit yesterday, the initialization for the roots is necessary.
11553         What is not necessary is the scope activation.
11554
11555 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11556
11557         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11558         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11559         CS0206 checks.
11560         (Argument.Resolve): Remove CS0206 checks.
11561
11562 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11563
11564         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11565         scopes for all the roots, the scopes will now be emitted when the
11566         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11567
11568         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11569         code.  This reduces a lot of existing cruft.
11570         
11571         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11572         that the ScopeInfo is generated as we enter the scope, not at the
11573         time of use, which is what we used to do before.
11574
11575         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11576         every time a Block is about to be emitted if we have a
11577         CaptureContext. 
11578
11579 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11580
11581         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11582         (Reset): Update.
11583         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11584
11585         * typemanager.cs (cons_param_array_attribute): Make private.
11586         (Reset): Set it to null.
11587         (InitCoreHelpers): Don't initialize it.
11588         (ConsParamArrayAttribute): New.  Initialize it as needed.
11589         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11590
11591 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11592
11593         * expression.cs: There might be errors reported during the
11594         selection of applicable methods.  If there are errors, do not
11595         continue execution as it will lead the compiler to crash.
11596
11597 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11598
11599         * expression.cs: Member access is not allowed on anonymous
11600         methods.  Fixes #77402.
11601
11602 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11603
11604         Fix #77401
11605         * cs-parser.jay (VariableDeclaration): Don't set
11606         current_array_type to null.
11607         (field_declaration, event_declaration, declaration_statement):
11608         Set it to null here.
11609
11610 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11611
11612         * typemanager.cs (GenericParameterPosition): New.
11613         * doc.cs: Use it.
11614
11615 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11616
11617         * doc.cs : To process "include" elements, first we should create
11618           another list than XmlNodeList, because it could result in node
11619           removal, which could result in that the XmlNodeList gives up
11620           yielding next node.
11621
11622           (Also made code identical to gmcs again.)
11623
11624 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11625
11626         * ecore.cs: Introduce an error report that we were not catching
11627         before, if not silent, we must report the error.  Gonzalo ran into
11628         it.
11629
11630 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11631
11632         A fix for bug: #76957
11633         
11634         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11635         ComputeMethodHost before creating the method, this is a new
11636         requirement. 
11637
11638         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11639         that this method references (RegisterScope).  The actual scope
11640         where the method is hosted is computed with the ComputeMethodHost
11641         before we create the method.
11642
11643         Moved the Deepest routine here.
11644
11645         (AnonymousContainer.ComputeMethodHost): New routine used to
11646         compute the proper ScopeInfo that will host the anonymous method.
11647
11648         (ScopeInfo): Deal with multiple roots.  The problem was that we
11649         did not have a unique root where all ScopeInfos could be hanged
11650         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11651         of roots.  
11652
11653         Remove AdjustMethodScope which is now computed at the end.  Remove
11654         LinkScope which did a partial link, instead link all ScopeInfos
11655         before code generation from the new "LinkScopes" routine. 
11656
11657         Simplify all the Add* routines as they no longer need to maintain
11658         the tree, they just need to record that they are using variables
11659         from a ScopeInfo.
11660
11661         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11662         routines to produce the forest of ScopeInfo trees.
11663
11664         * class.cs (TypeContainer.AppendMethod): This is just like
11665         AddMethod, but ensures that an interface implementation method
11666         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11667         methods, but at the end.
11668
11669         We use this functionality to ensure that the generated MoveNext
11670         method in the iterator class is resolved/emitted before the
11671         enumerator methods created.   
11672
11673         This is required because the MoveNext method computes the right
11674         ScopeInfo for the method.  And the other methods will eventually
11675         need to resolve and fetch information computed from the anonymous
11676         method. 
11677
11678 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11679             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11680
11681         Fix rest of #76995.
11682         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11683         the 'aliases' hash.
11684         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11685         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11686
11687 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11688
11689         Fix #76656, cs0231-2.cs.
11690         * cs-parser.jay (formal_parameter_list): Make error case catch
11691         more issues.
11692         (parenthesized_expression_0): Add CS1026 check.
11693         (invocation_expression): Remove unused { $$ = lexer.Location }.
11694
11695 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11696
11697         Fix #76824.
11698         * cs-parser.jay (statement_expression): Don't list out the
11699         individual statement-expressions.  Convert syntax error into
11700         CS0201 check.
11701
11702 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11703
11704         Fix #76874.
11705         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11706         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11707         CheckIntermediateModification.
11708         (FieldExpr.DoResolve): Add new two-argument version that
11709         allows us to resolve the InstanceExpression as an lvalue.
11710         The one-argument variant is now just a wrapper.
11711         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11712         Resolve the lhs as an lvalue if the it has a value type.
11713         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11714         from Assign.DoResolve.
11715         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11716         resolved as an lvalue.
11717         (PropertyExpr.DoResolve): Update.
11718         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11719         has a value type.  Move CS1612 check here from
11720         CheckIntermediateModification.
11721         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11722         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11723         'right_side' of a ResolveLValue on an 'out' argument.
11724         (EmptyExpression.LValueMemberAccess): New.  Used as the
11725         'right_side' of a propagated ResolveLValue on a value type.
11726         (LocalVariableReference.DoResolveBase): Recognize
11727         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11728         Add CS1654 check.
11729         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11730         EmptyExpression.Null.
11731
11732 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11733
11734         * typemanager.cs : added IsGenericParameter(). In mcs it always
11735           return false.
11736         * doc.cs : for generic parameters, use GenericParameterPosition,
11737           not FullName.
11738
11739 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11740
11741         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11742
11743 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11744
11745         This fixes the problem where we used ldfld instead of ldflda to
11746         load the "THIS" pointer on captured parameters, when THIS is a
11747         value type.  See bug #77205.
11748         
11749         * iterators.cs (CapturedThisReference.Emit): Pass false to
11750         EmitThis (we do not need the address).
11751
11752         * codegen.cs (EmitThis): it needs to know whether we need the
11753         address of `this' or not.  This is used by value types.  
11754
11755         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11756         every other call passes false.
11757
11758 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11759
11760         Fix #77221.
11761         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11762         GetOverride.
11763         * expression.cs (Invocation.OverloadResolve): Update.
11764         (Invocation.DoResolve): Avoid double resolution of invocation.
11765
11766 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11767
11768         Fix #77180.
11769         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11770         unary negation of floating point types as 0-expr; negation cannot
11771         overflow in floating point types.
11772
11773         Fix #77204.
11774         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11775         on operands of 'void' type.
11776
11777         Fix #77200.
11778         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11779         and ExclusiveOr for boolean constants too.
11780
11781 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11782
11783         Fix #75636.
11784         * expression.cs (Invocation.OverloadResolve): Replace reflected
11785         override methods with their base virtual methods, rather than
11786         skipping over them.
11787         * typemanager.cs (TypeManager.GetOverride): New.
11788
11789 2006-01-05  Jb Evain  <jbevain@gmail.com>
11790
11791         * class.cs (Property.Define, Indexer.Define): do not tag the
11792         properties as SpecialName | RTSpecialName.
11793
11794 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11795
11796         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11797         doing a low-level comparission of parameter types.  It was lacking
11798         a check for __argslist. 
11799
11800 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11801
11802         * expression.cs (ParameterReference.DoResolveBase): Allow
11803         reference parameters if they are local to this block. 
11804
11805         This allows the ref and out parameters of a delegate to be used in
11806         an anonymous method, for example:
11807
11808         delegate void set (out int x);
11809
11810         set s = delegate (out int x){
11811                 x = 0;
11812         };
11813
11814         This is used by functionality introduced late in the C# language.
11815         
11816         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
11817         method that take ref and out parameters. 
11818
11819         Fixes #77119 which was a late change in the spec.
11820
11821 2005-12-23  Miguel de Icaza  <miguel@novell.com>
11822
11823         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
11824         parent if its the same scope.  Fixes #77060.
11825
11826 2005-12-21  Miguel de Icaza  <miguel@novell.com>
11827
11828         * driver.cs: Report the case of no source files and no -out:
11829         argument provided.
11830
11831 2005-12-20  Raja R Harinath  <rharinath@novell.com>
11832
11833         Fix #77035.
11834         * expression.cs (ComposedCast.GetSignatureForError): Define.
11835
11836 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11837
11838         Fix #76995
11839
11840         * namespace.cs (NamespaceEntry): Add extern_aliases as a
11841         ListDictionary, to contain the ExternAliasEntry entries (in
11842         addition to the NamespaceEntry.aliases hashtable). This field is
11843         shared between the original entry and its doppelganger (bodyless 
11844         copy of it).
11845         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
11846         extern_aliases field.
11847         (NamespaceEntry.Lookup): Move the IsImplicit check after the
11848         lookup in extern_aliases.
11849
11850 2005-12-16  Raja R Harinath  <rharinath@novell.com>
11851
11852         Fix #77006.
11853         * class.cs (TypeContainer.Mark_HasEquals): New.
11854         (TypeContainer.Mark_HasGetHashCode): New.
11855         (ClassPart): Override them.
11856         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
11857
11858         Fix #77008.
11859         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
11860         'parent' argument to the base constructor.
11861
11862         Remove all mention of TypeContainer from decl.cs.
11863         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
11864         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
11865         (DeclSpace.DeclSpace): Likewise.
11866         (DeclSpace.DefineMembers): Remove unused argument.
11867         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
11868         debugging check -- we don't care if the debug code throws an
11869         InvalidCastException instead of an InternalErrorException.
11870         * class.cs (TypeContainer.DefineMembers): Update to changes.
11871         (TypeContainer.DoDefineMembers): Likewise.
11872         (TypeContainer.GetMethods): Likewise.
11873         (PropertyMember.Define): Likewise.
11874         (MemberBase.Parent): New property that forwards to
11875         MemberCore.Parent, but ensures that we get a TypeContainer.
11876         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
11877         (RootContext.PopulateTypes): Likewise.  Remove special case code
11878         for !RootContext.StdLib: DefineMembers is idempotent.
11879
11880 2005-12-14  Miguel de Icaza  <miguel@novell.com>
11881
11882         * convert.cs (ExplicitConversionCore): Check the return value from
11883         ExplicitConversionCore which can return null on failure.  Fixes #76914
11884
11885 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
11886
11887         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
11888
11889 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
11890
11891         * doc.cs : The search for referenced namespace was insufficient to
11892           get global one as it used to do. Fixed bug #76965.
11893
11894 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
11895
11896         * doc.cs : check name in cref in the last phase that whether it is
11897           namespace or not.
11898
11899 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11900
11901         * cs-tokenizer.cs : reverted the latest change: it somehow broke
11902           Mono.C5.
11903
11904 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11905
11906         * doc.cs : so it turned out that we cannot skip override check for 
11907           interface members. Fixed bug #76954.
11908
11909 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11910
11911         * cs-tokenizer.cs : fixed bug #75984:
11912           - #warning and #error should not be handled when the source line
11913             is disabled.
11914           - #line is not checked strictly when the source line is disabled.
11915           - #define and #undef is on the other hand checked strictly at any
11916             state.
11917
11918 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
11919
11920         * cs-tokenizer.cs : missing Location (actually, filename) in one of
11921           CS1027 report.
11922
11923 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11924
11925         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
11926
11927         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
11928         event initializers.
11929         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
11930         (FieldBase.Initializer): Initializer is now optional.
11931         (EventField.Define): Only event field can have initializer.
11932
11933         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
11934
11935         * const.cs (Const): Reuse initializer.
11936
11937         * cs-parser.jay: Updated after FieldBase changes.
11938         Added current_array_type to simplify array initializers.
11939
11940         * ecore.cs (NullCast.IsDefaultValue): Implemented.
11941
11942         * expression.cs, iterators.cs: Updated.
11943
11944         * namespace.cs (NamespaceEntry): Made UsingFound private.
11945
11946 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11947
11948         * parameterCollection.cs: Obsolete, removed.
11949         * parser.cs: Obsolete, removed.
11950
11951 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11952
11953         Fix #76849.
11954         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
11955
11956         * enum.cs (Enum.Define): Set obsolete context here.
11957
11958 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11959
11960         * doc.cs :
11961           - FindDocumentedMember() now expects 1) paramList as null
11962             when "we don't have to check the number of parameters" and
11963             2) Type.EmptyTypes when "there is no arguments".
11964           - Introduced FoundMember struct to hold the exact type which was
11965             used to find the documented member (the above change broke
11966             test-xml-044; it might be better just to use DeclaringType than
11967             what MS does, like this change does, but it depends on usage.)
11968
11969 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11970
11971         * doc.cs : documented member might be from DeclaringType for nested
11972           types. Fixed bug #76782.
11973
11974 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
11975
11976         * anonymous.cs: Have the param code handle leaving copies on the
11977         stack etc. Allows anonymous params to take part in the assignment
11978         code (++, +=, etc). Fixes bug #76550
11979
11980         * expression.cs: Handle the prepare_for_load/leave_copy by passing
11981         it down to the anon code.
11982
11983         * iterators.cs: Use dummy var here
11984
11985         * codegen.cs: Handle new vars
11986
11987 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11988
11989         Fix #76849.
11990         * class.cs (MethodData.Define): Set proper Obsolete context.
11991
11992         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
11993         obsolete context.
11994         (FieldExpr.DoResolve): Ditto.
11995
11996 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11997
11998         Fix #76849.
11999         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
12000         parent is not obsolete.
12001
12002 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
12003
12004         * doc.cs : (FindDocumentedMember) find parameterless members first
12005           and get CS0419 in the early stage. Fixed first case of bug #76727.
12006
12007 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
12008
12009         Fix #76859.
12010         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
12011         no error was reported.
12012
12013         *expression.cs (Binary.DoResolve): left can be null.
12014
12015 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
12016
12017         Fix #76783.
12018         * class.cs (MethodData.Emit): Parameters should be labeled first.
12019
12020 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
12021
12022         Fix #76761.
12023         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
12024
12025 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
12026
12027         * attribute.cs (AreParametersCompliant): Moved to Parameter.
12028
12029         * class.cs (MethodCore): Parameter clean up.
12030         (IMethodData): Added ParameterInfo.
12031         (MethodData): Parameter clean up.
12032         (Indexer.Define): Parameter clean up.
12033
12034         * anonymous.cs,
12035         * codegen.cs,
12036         * cs-parser.jay,
12037         * decl.cs,
12038         * doc.cs,
12039         * ecore.cs,
12040         * flowanalysis.cs,
12041         * iterators.cs,
12042         * pending.cs,
12043         * statement.cs,
12044         * typemanager.cs: Parameter clean up.
12045
12046         * delegate.cs (Define): Get rid of duplicated code.
12047
12048         * expression.cs (ParameterReference): Removed useless parameters
12049         and simplified.
12050         (Invocation): Ditto.
12051
12052         * parameter.cs (ParamsParameter): New class, params specialization.
12053         (ArglistParameter): Attemp to separate arglist.
12054         (Parameter): Refactored to be reusable and faster.
12055         (Parameter.Modifier): Made understandable.
12056         (Parameters): Changed to be used as a class for `this' assembly
12057         parameters. Refactored to use new specialized classes.
12058
12059         * support.cs (ParameterData): Added Types property.
12060         (InternalParameters): Deleted.
12061
12062 2005-08-20  Martin Baulig  <martin@ximian.com>
12063
12064         Merging this patch from GMCS to fix #75867.
12065
12066         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12067         scope if we don't already have it.
12068
12069 2005-11-17  Martin Baulig  <martin@ximian.com>
12070
12071         * anonymous.cs
12072         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
12073         inherit the scope from our parent.  Fixes #76653.
12074
12075 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12076
12077         * doc.cs : the previous patch does not actually fix the bug.
12078           PropertyInfo override check is now implemented and really fixed it.
12079         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
12080
12081 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12082
12083         * doc.cs : apply "override filter" also to properties.
12084           Fixed bug #76730.
12085
12086 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
12087
12088         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
12089           no need to check overrides. For classes, omit those results from 
12090           interfaces since they must exist in the class. Fixed bug #76726.
12091
12092 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12093
12094         * typemanager.cs : (GetFullNameSignature) differentiate indexers
12095           with different parameters. Fixed the second problem in #76685.
12096
12097 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12098
12099         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
12100           get expected 'protected' access in CheckValidFamilyAccess()).
12101           Fixed bug #76692.
12102
12103 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
12104
12105         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
12106           Fixed bug #76705.  CS1569 was incorrectly commented out.
12107
12108 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12109
12110         * doc.cs : use Invocation.IsOverride() to do real override check.
12111         * expression.cs : made Invocation.IsOverride() internal.
12112
12113 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12114
12115         * doc.cs : use TypeManager.FindMembers() instead of (possible)
12116           TypeBuilder.FindMembers() and filter overriden base members out.
12117           Fixed bug #76990.
12118
12119 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12120
12121         * doc.cs : ref/out parameters are represented as '@' (instead of
12122           '&' in type FullName). Fixed bug #76630 (additionally crefs).
12123
12124 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12125
12126         * doc.cs : when there was no '.' in cref to methods in doc comment,
12127           then parameters were missing in the output. Fixed bug #76691.
12128
12129 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12130
12131         * driver.cs : don't output docs when there is an error.
12132           Fixed bug #76693.
12133
12134 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12135
12136         * doc.cs :
12137           Now it should detect indexers. Fixed primary concern in bug #76685.
12138           Fixed CS0419 message to not show the identical member signature in
12139           the message.
12140
12141 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12142
12143         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
12144           instead of Type.FindMembers() since it does not handle events.
12145           Fixed bug #71604.
12146
12147 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
12148
12149         * codegen.cs: Fixed typo (speficied -> specified).
12150
12151 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12152
12153         Fix #76369.
12154         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
12155
12156 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12157
12158         * attribute.cs: Changed error message.
12159
12160         * cs-tokenizer.cs: One more check.
12161
12162 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12163
12164         * statement.cs (Block.Resolve): Ignore empty statement.
12165
12166 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12167
12168         * report.cs: Made error/warning methods more strict to avoid
12169         their misuse.
12170
12171         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
12172         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
12173         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
12174         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
12175
12176 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
12177
12178         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
12179         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
12180
12181         * class.cs (TypeContainer.IsComImport): New property.
12182         (Constructor.Define): Create proper ctor for ComImport types.
12183
12184         * expression.cs (New.CheckComImport): Fixed.
12185
12186 2005-11-07  Miguel de Icaza  <miguel@novell.com>
12187
12188         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
12189         that a parameter has been captured does not mean that we do not
12190         have to do the rest of the processing.  This fixes the second part
12191         of #76592.  If there was another anonymous method capturing
12192         values in the past, the Scope would never be set for the second
12193         method that captured the same parameter.
12194
12195         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
12196         properly manipulate the stack.   Second part of fix for #76592.
12197
12198         * expression.cs (New): Add support for invoking "new" on
12199         interfaces that have been flagged with the ComImport attribute and
12200         the CoClass.  Fixes #76637 
12201
12202         * statement.cs (Try.DoEmit): When a variable is captured, do not
12203         try to emit the vi.LocalBuilder variable as it has been captured.
12204         Create a temporary variable and store the results on the
12205         FieldBuilder.  Fixes #76642
12206
12207 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
12208
12209         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
12210
12211         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
12212
12213         * expression.cs (Binary.DoResolve): Added && optimalization.
12214     
12215         * typemanager.cs (AddUserType): Removed useless argument.
12216
12217 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12218
12219         * statement.cs (Block.variables): Uses ListDictionary.
12220
12221 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12222
12223         Fix #75969.
12224         * class.cs (PartialContainer.EmitType): Customized to emit
12225         security attributes.
12226         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12227         for partial classes.
12228
12229 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12230
12231         Fix #76599.
12232         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12233         access has to be fixed.
12234         
12235         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12236
12237 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12238
12239         Fix #76590.
12240         * ecore.cs (NullCast.Reduce): Implemented.
12241
12242         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12243         constant type.
12244         
12245         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12246         properly.
12247         (Foreach.Resolve): Catch null properly.
12248
12249 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12250  
12251         * cs-tokenizer.cs: Warning text fix.
12252
12253         * driver.cs: AllWarningNumbers exposed on public interface.
12254
12255         * report.cs (): Reviewed warning numbers.
12256         (IsValidWarning): Use binary search.
12257
12258 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12259  
12260         * driver.cs: Implemeted resource visibility.
12261         (Resources): New class for code sharing between /res: and
12262         /linkres:
12263  
12264 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12265
12266         Fix #76568.
12267         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12268         folding.
12269         
12270         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12271         contants only.
12272         
12273         * ecore.cs (NullCast): Child is contant only.
12274         
12275         * literal.cs (NullLiteral.Reduce): null can be converted to any
12276         reference type.
12277
12278 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12279
12280         * driver.cs: Use Encoding.Default as default code page instead
12281           of ISO-28591.
12282
12283 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12284
12285         Fix #76085.
12286         * expression.cs (Invocation.Error_InvalidArguments): Handle
12287         __arglist parameters.
12288         (Invocation.VerifyArgumentsCompat): Likewise.
12289         * support.cs (ReflectionParameters.GetSignatureForError): Print
12290         __arglist parameters.
12291         (InternalParamters.GetSignatureForError): Likewise.
12292         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12293
12294 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12295
12296         * attribute.cs (GetPropertyValue): Made public.
12297
12298         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12299         Resolve.
12300         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12301         attribute.
12302         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12303         is not defined.
12304         
12305         * driver.cs: Reflect method name change.
12306         
12307         * statement.cs (Try.Resolve): Warn when try has both general
12308         exception handlers.
12309         
12310         * typemanager.cs: runtime_compatibility_attr_type new predefined
12311         type.
12312
12313 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12314
12315         Fix #76419.
12316         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12317         treat it as an empty parameter list.
12318
12319 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12320
12321         Fix #76271.     
12322         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12323         ResolveAsTypeStep silent.
12324         * statement.cs (Block.AddConstant): Mark block as used.
12325         (Block.ResolveMeta): Avoid piling on error messages
12326         if a constant initializer resolution fails.
12327
12328 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12329
12330         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12331         Remove.
12332         (NamespaceEntry.VerifyAllUsing): New.
12333         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12334         behaviour.  Delegates actual resolution of alias to ...
12335         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12336         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12337         Update.
12338         * driver.cs (Driver.MainDriver): Update.
12339         
12340         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12341         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12342         property.
12343         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12344         Remove.
12345         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12346         RootNamespace.DefineNamespacesForAll.
12347
12348 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12349
12350         * typemanager.cs (assemblies, external_aliases, modules)
12351         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12352         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12353         overhead.  Move resposibility ...
12354         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12355         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12356
12357 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12358
12359         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12360         cached_namespaces.  Improve usage.
12361         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12362         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12363         Move from GlobalRootNamespace and simplify.
12364         (RootNamespace.Global): Make instance variable.
12365         (RootNamespace.RootNamespace): Add "alias name" parameter.
12366         (GlobalRootNamespace): Simplify drastically.
12367         (Namespace.Lookup): Don't use GetNamespace.
12368         * typemanager.cs (GetRootNamespace): Rename from
12369         ComputeNamespaceForAlias.
12370         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12371
12372 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12373
12374         * anonymous.cs (AnonymousContainer): Don't crash when container
12375         doesn't exist.
12376
12377 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12378
12379         * expression.cs (Binary.DoResolve): Warn when comparing same
12380         values.
12381
12382 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12383
12384         Fix #76486.
12385         * expression.cs (Binary.DoResolve): It looks like there are no
12386         convetsion rules in enum context.
12387
12388 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12389
12390         Add support for extern alias qualifiers.
12391         * typemanager.cs: Move some LookupTypeReflection code
12392         to namespace.cs, to have cleaner code. Added some methods
12393         to help us keep track of the extern aliased references.
12394         * driver.cs: Add suport for extern alias assemblies on command
12395         line and check for their warnings/errors. Also keep track of the
12396         extern aliased assemblies.
12397         * namespace.cs: Move the global functionality of Namespace
12398         to GlobalRootNamespace/RootNamespace. Now the global namespace
12399         is GlobalRootNamespace.Globa. Also the code moved from 
12400         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12401         Finally added LocalAliasEntry (AliasEntry before) and
12402         ExternAliasEntry, to handle alias statements.
12403         * cs-parser.jay: Add support in the grammar for extern alias
12404         statement.
12405         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12406         Update callings to Namespace (now in GlobalRootNamespace).
12407
12408 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12409
12410         Fix #76371.
12411         * class.cs (TypeContainer.DefineType): Move updating of
12412         topological sort earlier in the code.
12413         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12414
12415 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12416
12417         Fix #76273.
12418         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12419         
12420         * constant.cs (Constant.TryReduce): Moved from Cast class.
12421         (Reduce): Made little bit more OO and fixed missing conversions.
12422         
12423         * ecore.cs (Reduce): Implemented.
12424         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12425         
12426         * literal.cs (Reduce): Implemented.
12427         
12428         * class.cs: Reverted Miguel's wrong commit.
12429
12430 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12431
12432         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12433
12434 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12435
12436         * cs-parser.jay, expression.cs : CS0214 was missing error location
12437           for constants. Fixed bug #76404.
12438
12439 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12440
12441         Fix #76370.
12442         * convert.cs (ExplicitConversionCore): Fixed object->enum
12443         conversion.
12444
12445 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12446
12447         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12448         InstanceExpression.
12449         (PropertyExpr.EmitCall): Likewise.
12450         * expression.cs (Invocation.EmitArguments): Handle case where
12451         arguments == null.
12452         (Invocation.EmitCall): Avoid allocating temporary variable if
12453         there are no arguments.
12454
12455 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12456
12457         Fix #76323.
12458         * convert.cs (ImplicitConversionStandard): Move conversion of
12459         void* to arbitrary pointer types ...
12460         (ExplicitConversionStandard): .. here.
12461         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12462         error to always print typenames.
12463
12464 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12465
12466         * convert.cs (GetConversionOperator): Rename from
12467         GetConversionOperators.  Move operator selection code from ...
12468         (UserDefinedConversion): ... here.
12469
12470 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12471
12472         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12473         conversion.
12474
12475 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12476
12477         * assign.cs (Assign.DoResolve): Error method changed.
12478
12479         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12480         
12481         * const.cs (ResolveValue): Reset in_transit immediately.
12482         
12483         * constant.cs: Error method changed.
12484         
12485         * convert.cs: Removed useless location parameter.
12486         (ExplicitNumericConversion): Don't do double enum check.
12487         (ExplicitConversionCore): Renamed from ExplicitConversion.
12488         (ExplicitUnsafe): Extracted from ExplicitConversion.
12489         (ExplicitConversion): Uses for error reporting.
12490         
12491         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12492         error messages.
12493         (ResolveBoolean): Uses common error method.
12494         (CastToDecimal): Get rid of ec.
12495         (CastFromDecimal): Optimized.
12496         (ConvCast): Get rid of ec.
12497         
12498         * enum.cs (ResolveValue): Reset in_transit immediately.
12499         (Emit): Return after first error.
12500         
12501         * expression.cs: Convert changes.
12502         
12503         * literal.cs: Error method changed.
12504         
12505         * statement.cs: Error method changed.
12506
12507 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12508
12509         * support.cs (SeekableStreamReader.Position): Don't error out when
12510         the requested position is just beyond the end of the current
12511         buffered data.
12512
12513 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12514
12515         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12516         try to keep in sync with the byte count of the underlying Stream.
12517         However, this limits us to a window size of 2048 characters: i.e.,
12518         the maximum lookahead of our lexer/parser can be 2048 characters.
12519
12520 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12521
12522         Fix #76255.
12523         * driver.cs: Fix compilation files with full root path.
12524
12525 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12526
12527         * report.cs (SymbolRelatedToPreviousError): Format the output so
12528         it does not use an open parenthesis that is never closed. 
12529
12530         * driver.cs: Follow coding guidelines
12531
12532 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12533
12534         Fix #72930.
12535         * const.cs (Const.ResolveValue): Check for assigning non-null
12536         value to reference type.
12537
12538 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12539
12540         * anonymous.cs: Implemented ExprClassName.
12541         
12542         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12543         delegate.
12544         
12545         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12546         check.
12547         
12548         * class.cs (StaticClass.DefineContainerMembers): Report protected
12549         members as error.
12550         
12551         * codegen.cs: if(ed) PRODUCTION.
12552         
12553         * convert.cs (Error_CannotImplicitConversion): Better error
12554         distinction.
12555         
12556         * cs-parser.jay: More error checks.
12557         
12558         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12559         
12560         * driver.cs (CSCParseOption): Enabled wrong option check.
12561         
12562         * ecore.cs (Expression.ExprClassName): Turned to property.
12563         (MemberExpr.CheckIntermediateModification): For checking boxed
12564         value types     modification.
12565         
12566         * statement.cs (Fixed.Resolve): Expression type must be
12567         convertible to fixed type.
12568         (CollectionForeach.GetEnumeratorFilter,TryType):
12569         Small refactoring for easier error checking.
12570
12571 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12572
12573         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12574         attributes.
12575         
12576         * class.cs (GeneratedBaseInitializer): New class for customization
12577         compiler generated initializers.
12578         (MemberBase.DoDefine): Check Obsolete attribute here.
12579         (FieldMember.DoDefine): Ditto.
12580         
12581         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12582         constants.
12583         
12584         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12585         (MemberCore.GetObsoleteAttribute): Removed argument.
12586         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12587         (MemberCore.CheckObsoleteType): New helper.
12588         
12589         * delegate.cs,
12590         * enum.cs,
12591         * statement.cs: Updates after MemberCore changes.
12592         
12593         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12594         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12595         
12596         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12597         obsolete attribute for compiler construct.
12598         (As.DoResolve): Cache result.
12599         
12600         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12601
12602 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12603
12604         Fix #76133.
12605         * expression.cs (This.VerifyFixed): In a value type T, the type of
12606         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12607         value type R, 'this' is treated as a value parameter.
12608
12609 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12610
12611         * statement.cs (Lock): Use the TemporaryVariable class instead of
12612         manually using local variables as those do not work when variables
12613         are captured.
12614
12615         * ecore.cs: Moved the TemporaryVariable class from being a nested
12616         class inside Foreach to be a public class that can be employed in
12617         other places. 
12618
12619 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12620
12621         * cs-parser.jay: interface_accessors replaced by
12622         accessor_declarations.
12623
12624         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12625         location.
12626         
12627         * statement.cs (GotoCase.Resolve): Convert null constant to
12628         null case.
12629         (SwitchLabel.ResolveAndReduce): Ditto.
12630         (SwitchLabel.NullStringCase): Custom null stamp.
12631         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12632         
12633         typemanager.cs (CSharpSignature): Don't skip first argument
12634         for full names.
12635
12636 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12637
12638         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12639
12640         * location.cs (InEmacs): in this mode, do not report column
12641         location as it confuses Emacs.
12642
12643 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12644
12645         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12646         expression.cs, iterators.cs, literal.cs: Store constants and
12647         literals location.
12648         
12649         * class.cs (MemberBase.ShortName): Pass location.
12650         
12651         * cs-parser.jay: Some location fixes.
12652         
12653         * ecore.cs (Expression.Location): Made virtual.
12654
12655 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12656
12657         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12658         if the underlying types are the same, otherwise we need to produce
12659         code that will do the proper cast.
12660
12661         This was exposed by Marek's constant rewrite which produced
12662         invalid code for the call site:
12663
12664         enum X : long { a }
12665         void Method (X v) {}
12666
12667         Method ((X) 5)
12668
12669         This fixes test-49.cs
12670
12671 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12672
12673         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12674           Type/Object should be allowed as well. Fixed bug #75968.
12675
12676 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12677
12678         * expression.cs : (Binary.DoResolve): when one is enum constant and
12679           another is constant 0, then return enum one *as enum type*.
12680           Fixed bug 74846.
12681
12682 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12683
12684         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12685         internal.
12686
12687         Fix #75941.
12688         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12689         flow-branching for LocalVariableReferences in case we were invoked
12690         from a MemberAccess.
12691         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12692         Carved out of ...
12693         (LocalVariableReference.DoResolveBase): ... this.
12694         (MemberAccess.Resolve): Do the check that was disabled during
12695         SimpleNameResolve.
12696
12697 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12698
12699         * class.cs :
12700           (PartialContainer.Create): check abstract/sealed/static strictly
12701           but abstract/sealed can exist only at one side. Fixed bug #75883.
12702
12703 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12704
12705         Fix #75945.
12706         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12707         specified, don't default to UnmanagedType.I4.
12708
12709 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12710
12711         * expression.cs : conditional operator should check possibly
12712           incorrect assign expression. Fixed bug #75946.
12713
12714 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12715
12716         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12717           Reverting the change. gmcs is much complex than mcs on this matter.
12718
12719 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12720
12721         * cs-tokenizer.cs : To read another token ahead of the actual 
12722           consumption, use new SavedToken and cache token instead of moving
12723           back the stream with SeekableStreamReader (it seemed problematic).
12724         * cs-parser.jay,
12725           driver.cs : Thus use StreamReader directly.
12726         * support.cs : Thus removed SeekableStreamReader.
12727
12728 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12729
12730         Fix #75934.
12731         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12732         (ScopeInfo.EmitScopeType): Use it to construct field names from
12733         names of captured locals.
12734
12735         Fix #75929.
12736         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12737         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12738         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12739         (ExplicitConversion): Remove enum cases already handled by
12740         implicit conversion.  Move implicit conversion check to the beginning.
12741         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12742         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12743         Don't treat System.Enum as a struct.
12744
12745 2005-08-30  Jb Evain  <jbevain@gmail.com>
12746
12747         * attribute.cs: handles as expression in parameters.
12748
12749 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12750
12751         Fix #75802.
12752         * class.cs (TypeContainer.VerifyClsName): Don't use a
12753         PartialContainer when verifying CLS compliance.
12754         (AbstractPropertyEventMethod): Set Parent here, ...
12755         (PropertyMethod): ... not here.
12756
12757 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12758
12759         * attribute.cs : escaped attribute name should not be allowed to be
12760           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12761
12762 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12763
12764         Fix #75927.
12765         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12766         when converting a long constant to unsigned long.
12767         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12768         detect where IsApplicable and VerifyArgumentsCompat disagree.
12769
12770 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12771         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12772
12773         Fix #75848.
12774         * class.cs (TypeContainer.CanElideInitializer): New helper.
12775         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12776         can safely emitting the initializer of a field.
12777
12778 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12779
12780         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12781           allowed inside a switch (without loop). Fixed bug #75433.
12782
12783 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12784
12785         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12786         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12787
12788 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12789
12790         * driver.cs : kinda reverting the default encoding changes (not exact 
12791           revert since I noticed that "codepage:reset" might not work fine).
12792
12793 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12794
12795         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12796           Location. Now getter and setter store location correctly.
12797           (errors/cs0111-12.cs now reports the expected location.)
12798
12799 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12800
12801         * driver.cs : Use default encoding on the environment.
12802           Removed (now that) extra parameter for SeekableStreamReader.
12803         * support.cs : (SeekableStreamReader) third .ctor() argument for
12804           StreamReader is not required (always true). preamble size could
12805           be acquired in simpler and safe way.
12806
12807 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12808
12809         * cs-parser.jay: report CS0642 at warning level 3
12810           and report CS0642 for an if else statement also
12811           fixes bug #74745. Patch by John Luke (and a bit
12812           modified by me).
12813           Removed extra CS0642 warning check for "while",
12814           "for" and "fixed".
12815         * statement.cs: In Block.Resolve(), CS0642 check
12816           is reimplemented to check a sequence of an empty
12817           statement and a block.
12818
12819           Both fix bug #66777.
12820
12821 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
12822
12823         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
12824         detection until I fix it.
12825         
12826         * cs-tokenizer.cs: Changed error message.
12827         
12828         * cs-parser.jay: Fixed 2 error locations.
12829         
12830         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
12831         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
12832         properties.
12833         
12834         * enum.cs (GetSignatureForError): Fixed.
12835         
12836         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
12837         method detection.
12838         
12839         * class.cs,
12840         * typemanager.cs (RegisterProperty): Removed.
12841         
12842         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
12843
12844 2005-08-24  Raja R Harinath  <rharinath@novell.com>
12845
12846         Fix #75874.
12847         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
12848         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
12849
12850 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12851
12852         * expression.cs : tiny fix is required for not warning positive ulong.
12853           See test-441.cs.
12854
12855 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12856
12857         * expression.cs : add CS0652 check for constant and integral
12858           expression. Fixed bug #53974.
12859
12860 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12861
12862         * expression.cs : in DoNumericPromotions(), check if there is implicit
12863           conversion overload for string (to check CS0034). Fixed bug #52492.
12864
12865 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12866
12867         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
12868
12869 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12870
12871         * ecore.cs : report location when it is *not* Null.
12872
12873 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12874
12875         * codegen.cs,
12876           ecore.cs,
12877           flowanalysis.cs,
12878           expression.cs:
12879           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
12880           correctly. Fixed bug #75721.
12881
12882 2005-08-23  Raja R Harinath  <rharinath@novell.com>
12883
12884         * support.cs (SeekableStreamReader.Position): Avoid an expensive
12885         loop that performs 'min (pos, char_count)'.
12886
12887         Fix #75862.
12888         * expression.cs (Unary.ResolveOperator): Don't discard implicit
12889         converted value in Operator.OnesComplement.
12890
12891 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
12892
12893         * anonymous.cs: If the anon method is pulled into a helper class,
12894         it needs to be `internal' not `private'. Fixes runtime behavior on
12895         msft. bug #75704
12896
12897 2005-08-20  Martin Baulig  <martin@ximian.com>
12898
12899         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12900         scope if we don't already have it.
12901
12902         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
12903         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
12904         fixes #75867.
12905
12906 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
12907
12908         Fix #75803
12909         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
12910         is a partial class.
12911
12912 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
12913
12914         The big constants rewrite
12915         Fix #75746, #75685 and more
12916         As a side effect saved 1MB for MWF ;-)
12917         
12918         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
12919         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
12920         enum based for corlib compilation.
12921         
12922         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
12923         subtractions.
12924         
12925         * class.cs (FixedField.Define): Use ResolveAsConstant.
12926         
12927         * const.cs (IConstant): Interface constants and enums.
12928         (Const.ResolveValue): New method for constant resolvning.
12929         (ExternalConstant): Constants from imported assemblies.
12930         
12931         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
12932         conversion; like enums.
12933         (Constant.ToType): Converts this constant to different type.
12934         (Constant.Increment): Adds 1.
12935         
12936         * convert.cs (ImplicitConversionRequired): Simplified.
12937         
12938         * cs-parser.jay: Create EnumMember directly.
12939         
12940         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
12941         
12942         * doc.cs (GenerateEnumDocComment): Removed.
12943         
12944         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
12945         (ConvertIntLiteral): Removed.
12946         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
12947         
12948         * enum.cs (EnumMember): Implement IConstant.
12949         (Enum.IsValidEnumConstant): Removed.
12950         (Enum.GetNextDefaultValue): Removed.
12951         (Enum.FindMembers): Updated.
12952         (Enum.GenerateDocComment): Iterate enum members.
12953         
12954         * expression.cs (Cast.TryReduce): Handle enums correctly.
12955         (New.Constantify): Made public.
12956         (MemberAccess.DoResolve): Removed contant specific if(s).
12957         
12958         * literal.cs (NullLiteral): Implement new abstract methods.
12959         
12960         * statement.cs (GotoCase.Resolve): Use new constant methods.
12961         (SwitchLabel.ResolveAndReduce): Use new constant methods.
12962         
12963         * typemanager.cs (LookupEnum): Removed.
12964         (IsEnumType): Fixed to work with corlib.
12965         (RegisterConstant): Removed.
12966         (LookupConstant): Removed.
12967         (GetConstant): Changed to work with IConstant.
12968
12969 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
12970
12971         * location.cs : Fixed overflown (>255) column number.
12972
12973 2005-08-03  Raja R Harinath  <rharinath@novell.com>
12974
12975         First cut of the qualified-alias-member feature.
12976         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
12977         token.
12978         * cs-parser.jay (DOUBLE_COLON): New token.
12979         (namespace_or_type_name): Add rule for recognizing
12980         qualified-alias-members.
12981         (primary_expression): Likewise.
12982         (element_access): Allow QualifiedAliasMember as a possible
12983         type-bearing expression.
12984         (local_variable_type, local_variable_pointer_type): Likewise.
12985         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
12986         aliases in the current and enclosing namespace declarations.
12987         (NamespaceEntry.UsingAlias): Add CS0440 warning.
12988         * decl.cs (MemberName.is_double_colon): New.
12989         (MemberName.MemberName): Add new constructor for alias-member.
12990         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
12991         * expression.cs (QualifiedAliasMember): New expression type.
12992
12993 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12994
12995         * location.cs : it borked when no argument was specified.
12996
12997 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12998
12999         * location.cs : tiny ToString() format fix.
13000
13001 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13002
13003         * statement.cs : oops, it was missing.
13004
13005 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
13006
13007         A set of fixes for precise line/column location.
13008
13009         * location.cs :
13010           "token" field now holds a file/line "delta", a line number offset 
13011           from the segment, and a column number. See also:
13012           http://lists.ximian.com/pipermail/mono-devel-list/2004-
13013           December/009508.html
13014           Removed static IsNull. Use instance IsNull property instead.
13015         * cs-tokenizer.cs :
13016           For some tokens it stores Location. For Identifier it stores
13017           LocatedToken which is a pair of string name and location.
13018           Column numbers are adjusted only at getChar().
13019         * report.cs :
13020           Use Location.ToString() for reporting (it now contains column).
13021         * cs-parser.jay :
13022           Largely modified to use LocatedToken instead of
13023           string (IDENTIFIER), and to acquire Location from some tokens.
13024         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
13025           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
13026           codegen.cs :
13027           Now MemberName holds Location. DeclSpace.ctor() receives Location
13028           as a parameter. Removed extra parameters to all derived classes.
13029           Replaced Location.IsNull() with instance property.
13030         * assign.cs, expression.cs :
13031           Added .ctor() overload that omits Location.
13032         * attribute.cs :
13033           Added "nameEscaped" flag that indicates the identifier was escaped
13034           in the source file. This fixes bug #57047.
13035
13036 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
13037
13038         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
13039         New method, looking for lo-case imported cls type.
13040
13041         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
13042         here.
13043
13044         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
13045
13046         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
13047
13048         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
13049         all_imported_types.
13050         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
13051
13052         Optimized to save 3.5 MB for SWF compilation.
13053
13054 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13055
13056         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
13057         (PartialContainer.Create): Moved logic AddToContainer.
13058         (PartialContainer.MarkForDuplicationCheck): Shares name.
13059         
13060         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
13061         place.
13062         
13063         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
13064         initialization.
13065         (Namespace.GetSignatureForError): New method.
13066         
13067         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
13068         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
13069
13070 2005-08-01  Raja R Harinath  <rharinath@novell.com>
13071
13072         Fix #75669.
13073         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
13074         member lookup rather than qualifier_type, since qualifier_type can
13075         be null.
13076
13077 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
13078
13079         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
13080         enum member.
13081
13082 2005-07-31  Miguel de Icaza  <miguel@novell.com>
13083
13084         * statement.cs: Copy the local exception into the exception
13085         captured local.  Fixes 75674
13086
13087 2005-07-31  Raja R Harinath  <harinath@gmail.com>
13088
13089         Fix #75658.
13090         * expression.cs (Invocation.OverloadResolve): Don't report error
13091         CS1501 if error CS1502 has been reported.
13092         (New.DoResolve): Delegate CS1501 reporting to
13093         Invocation.OverloadResolve.
13094
13095         Fix #75656.
13096         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
13097         invariant-meaning-in-block property in an enclosing block if
13098         necessary.
13099
13100 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
13101
13102         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
13103         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
13104         (Switch.CheckSwitch): Just save 50kb for SWF.
13105
13106 2005-07-27  Martin Baulig  <martin@ximian.com>
13107
13108         * anonymous.cs (CaptureContext.AddField): Added
13109         `AnonymousContainer am' argument; compute its toplevel scope if
13110         it's not already computed.  Fixes #75649.
13111
13112 2005-07-26  Raja R Harinath  <rharinath@novell.com>
13113
13114         Fix #75628.
13115         * class.cs (Constructor.Emit): Reset block to null if the block
13116         resolve fails.
13117
13118 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13119
13120         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
13121
13122 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13123
13124         * class.cs (MethodData.Define): Check whether accessor implementing
13125         interface is public.
13126
13127         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
13128
13129 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
13130
13131         Fix #57245
13132         * namespace.cs (LookupType): Moved same type check to...
13133         
13134         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
13135         with the same name.
13136
13137 2005-07-21  Raja R Harinath  <rharinath@novell.com>
13138
13139         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
13140         already found a typebuilder.
13141         * class.cs (MethodCore.IsDuplicateImplementation): Compare
13142         MemberNames, not strings.
13143
13144         * const.cs (Error_ExpressionMustBeConst): 
13145         Rename from Error_EpressionMustBeConst.
13146         * const.cs, class.cs, statement.cd: Update.
13147
13148 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
13149
13150         Fix #65573
13151
13152         * const.cs (Const.LookupConstantValue): Report missing contant expression
13153         everytime.
13154         (Error_EpressionMustBeConstant): Only one error method.
13155
13156         * class.cs, statement.c: Updated.
13157
13158 2005-07-20  Raja R Harinath  <rharinath@novell.com>
13159
13160         * statement.cs (Block.Flags): Add back HasVarargs.
13161         (Block.flags): Make protected.
13162         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
13163
13164         * typemanager.cs (types, typecontainers, user_types): Remove.
13165         (UserTypes, TypeContainers): Likewise.
13166         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
13167         (CleanUp, Reset): Update.
13168         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
13169         (GetNestedType): Use Type.GetNestedType.
13170         (CoreLookupType): Take two arguments, the namespace and the
13171         basename of the type.  Update to use the Namespace.Lookup
13172         mechanism.
13173         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
13174         (RealMemberLookup): Use IsNestedChildOf instead of playing with
13175         string concatenation and substring matches.
13176         * class.cs, enum.cs, delegate.cs: Update to changes.
13177
13178 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
13179
13180         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
13181         Expression and made virtual.
13182
13183         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
13184         (ImplicitStandardConversionExists): Fixed `byte' typo ?
13185
13186         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
13187
13188         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
13189         error message.
13190
13191         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
13192         change.
13193
13194 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
13195
13196         Fix #57707
13197         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
13198         AssemblyCultureAttribute is not used on executable.
13199
13200         * rootcontext.cs,
13201         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
13202
13203 2005-07-16  Raja R Harinath  <rharinath@novell.com>
13204
13205         Fix #60638.
13206         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
13207         New.  Reports CS0252/CS0253.
13208         Mostly taken from preliminary patch by Duncak Mak.
13209         (Binary.DoResolveOperator): Store results of operator lookup.
13210         Use them to detect if we need to warn about unintended reference
13211         comparisons.
13212
13213 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13214
13215         Fix #72969.
13216         * namespace.cs (Namespace.Lookup): Add back location parameter.
13217         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13218         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13219
13220         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13221         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13222         (Namespace.LookupType): ... this.
13223         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13224         of namespaces.
13225         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13226         purported to handle pointers.
13227         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13228         CoreLookupType.
13229
13230 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13231
13232         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13233         type as namespace.
13234
13235 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13236
13237         * namespace.cs (Namespace.Lookup): Drop location parameter.
13238         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13239         (NamespaceEntry.Lookup): ... this.
13240         (NamespaceEntry.Error_AmbiguousTypeReference):
13241         Move here from DeclSpace.
13242         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13243         names ...
13244         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13245         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13246         Move to NamespaceEntry.
13247         * delegate.cs, expression.cs: Update to changes.
13248
13249 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13250
13251         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13252         CheckAttributeType and refactored.
13253         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13254         ResolveAsTypeTerminal error handling.
13255         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13256         handling.
13257         (GetSignatureForError): Print errors in same way.
13258
13259         * class.cs,
13260         * codegen.cs: Reflect attribute GetSignatureForError change.
13261
13262         * ecore.cs,
13263         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13264
13265         * namespace.cs (UsingEntry): Refactored to make fields private.
13266
13267         * assign.cs,
13268         statement.cs: Error_UnexpectedKind has extra parameter.
13269
13270 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13271
13272         * ecore.cs (IAlias): Remove.
13273         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13274         that implement the interface.
13275         * namespace.cs (Namespace): Likewise.
13276         (Namespace.declspaces): Renamed from 'defined_names'.
13277         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13278         DeclSpace instead of an IAlias.
13279         * tree.cs (Tree.AddDecl): Update.
13280
13281 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13282
13283         * statement.cs (Block.Flags); Remove HasVarargs.
13284         (Block.HasVarargs): Move to ToplevelBlock.
13285         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13286         (Block.Variables): Make protected.  Initialize variable hashtable
13287         if necessary.
13288         (Block.AddVariable): Update.
13289         (Block.Resolve): Update to changes.
13290         (ToplevelBlock.HasVarargs): New boolean.
13291         (ToplevelBlock.ThisVariable): Move here from Block.
13292         (ToplevelBlock.AddThisVariable): Likewise.
13293         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13294         * expression.cs (This.ResolveBase): Update to changes.
13295         (ArglistAccess.DoResolve): Likewise.
13296
13297 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13298
13299         Fix #75321
13300         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13301
13302         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13303         not used and not used & assigned.
13304         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13305
13306 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13307
13308         Fix #75053
13309         * expression.cs (Is.DoResolve): null is never provided type.
13310
13311 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13312
13313         Fix #52496
13314         * cs-parser.jay: Less strict event error rule to catch more errors.
13315
13316 2005-07-08  Martin Baulig  <martin@ximian.com>
13317
13318         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13319         gettter (allowed) or setter (not allowed).
13320
13321         * class.cs (Accessor): Implement IIteratorContainer.
13322         (Accessor.Yields): New public field.
13323         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13324         per-accessor basis.
13325
13326         * cs-parser.jay
13327         (get_accessor_declaration, set_accessor_declaration): Set the
13328         `yields' flag on the accessor, not the property.
13329         (property_declaration): Do the iterators check on a per-accessor
13330         basis and not for the whole property.
13331
13332 2005-07-08  Martin Baulig  <martin@ximian.com>
13333
13334         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13335         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13336
13337 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13338
13339         Fix #74975
13340         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13341         (ExtractSecurityPermissionSet): Cope with self referencing security
13342         attributes properly.
13343
13344         * driver.cs (SetOutputFile): Made public property OutputFile.
13345
13346 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13347
13348         Fix #75486.
13349         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13350         has_nonstatic_fields.  Make into a FieldBase pointer.
13351         (TypeContainer.AddField): Add CS0282 check.
13352         (TypeContainer.EmitType): Update.
13353
13354 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13355
13356         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13357         compare if they start with __.
13358
13359 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13360
13361         * statement.cs (Switch.SwitchGoverningType): Only look at
13362         UserCasts that don't need implicit standard conversions to one of
13363         the allowed switch types (Fixes test-322.cs).
13364         (LocalInfo.Resolve): Re-enable sanity-test.
13365
13366 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13367
13368         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13369         
13370         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13371         
13372         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13373
13374 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13375
13376         Fix #75472.
13377         * ecore.cs (SimpleName.GetSignatureForError): Add.
13378         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13379         (MemberAccess.GetSignatureForError): Add.
13380
13381 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13382  
13383         The big error and warning messages review.
13384         
13385         * anonymous.cs,
13386         * assign.cs,
13387         * attribute.cs,
13388         * class.cs,
13389         * codegen.cs,
13390         * convert.cs,
13391         * cs-parser.jay,
13392         * cs-tokenizer.cs,
13393         * decl.cs,
13394         * delegate.cs,
13395         * doc.cs,
13396         * driver.cs,
13397         * ecore.cs,
13398         * enum.cs,
13399         * expression.cs,
13400         * flowanalysis.cs,
13401         * iterators.cs,
13402         * literal.cs,
13403         * location.cs,
13404         * modifiers.cs,
13405         * namespace.cs,
13406         * parameter.cs,
13407         * pending.cs,
13408         * report.cs,
13409         * rootcontext.cs,
13410         * statement.cs,
13411         * support.cs,
13412         * tree.cs,
13413         * typemanager.cs: Updated.
13414         
13415         * class.cs: (MethodCore.SetYields): Moved here to share.
13416         (PropertyMethod.Define): Moved iterator setup here.
13417         
13418         * iterators.cs: Add orig_method to have full access to parent
13419         container.
13420
13421 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13422
13423         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13424         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13425         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13426         variable of struct type.
13427         * expression.cs (Unary.ResolveOperator): Update to change.
13428         (Indirection.VerifyFixed): Likewise.
13429         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13430         (ParameterReference.VerifyFixed): Value parameters are fixed.
13431         (This.VerifyFixed): Treat 'this' as a value parameter.
13432         * statement.cs (LocalInfo.IsFixed): Remove.
13433
13434 2005-07-01  Martin Baulig  <martin@ximian.com>
13435
13436         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13437         `ec.EmitThis ()' to get the correct scope.
13438
13439 2005-07-01  Martin Baulig  <martin@ximian.com>
13440
13441         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13442         instance is a ParameterReference; fixes #75299.
13443
13444 2005-07-01  Martin Baulig  <martin@ximian.com>
13445
13446         Reverted Marek's latest patch (r46725):
13447         - it contains structural changes which are neither mentioned in
13448           the ChangeLog nor explained anywhere; for example the additional
13449           argument of EmitContext's and Iterator's .ctor's and the
13450           TypeContainer.DefineMembers() change.
13451         - structural changes like this should go in in seperate patches
13452           and not be hidden in a huge patch which just seems to affect
13453           warnings and errors.
13454           a big and hard to understand patch.
13455         - it breaks iterators and causes regressions, for instance in
13456           test-iter-03.cs.      
13457
13458 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13459
13460         Fix #75412.
13461         * expression.cs (Indexers.map): Remove.
13462         (Indexers.Append): Filter out inaccessible setters and getters.
13463         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13464
13465         Fix #75283.
13466         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13467         Refactored from ...
13468         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13469         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13470         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13471         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13472
13473 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13474
13475         Fix #75322
13476         * class.cs (FieldBase.GetInitializerExpression): One more field
13477         for backup.
13478
13479 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13480
13481         * pending.cs: Do not define a proxy if the base method is virtual,
13482         it will be picked up by the runtime (bug 75270).
13483
13484 2005-06-08  Martin Baulig  <martin@ximian.com>
13485
13486         The big Iterators rewrite :-)
13487
13488         * iterators.cs: Rewrite this to use the anonymous methods framework.
13489
13490         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13491         before the TypeContainers; see 2test-21.cs.
13492
13493         * class.cs
13494         (TypeContainer.DefineType): Don't create a new EmitContext if we
13495         already have one (this only happens if we're an Iterator).
13496         (TypeContainer.Define): Also call Define() on all our iterators.
13497         (Method.CreateEmitContext): Added support for iterators.
13498
13499         * anonymous.cs
13500         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13501         (AnonymousContainer.CreateMethodHost): Moved here from
13502         AnonymousMethod and made abstract.
13503         (AnonymousContainer.CreateScopeType): New abstract method.
13504         (AnonymousContainer.IsIterator): New public property.
13505         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13506         get the ScopeTypeBuilder rather than manually defining it here. 
13507         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13508         iterators here.
13509
13510         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13511         before RootContext.DefineTypes().
13512
13513         * codegen.cs (EmitContext.RemapToProxy): Removed.
13514         (EmitContext.CurrentAnonymousMethod): Changed type from
13515         AnonymousMethod -> AnonymousContainer.
13516         (EmitContext.ResolveTopBlock): Protect from being called twice.
13517         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13518         (EmitContext.EmitThis): Removed the iterators hacks; use the
13519         anonymous methods framework for that.
13520
13521         * statement.cs
13522         (ToplevelBlock.Container): Make this a property, not a field.
13523         (ToplevelBlock.ReParent): New public method; move the
13524         ToplevelBlock into a new container.
13525         (Foreach.TemporaryVariable): Simplify.
13526
13527 2005-06-05  Martin Baulig  <martin@ximian.com>
13528
13529         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13530         (Block.AddTemporaryVariable): New public method; creates a new
13531         `LocalInfo' for a temporary variable.
13532         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13533         variables here.
13534         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13535         non-iterator variables.
13536
13537 2005-06-05  Martin Baulig  <martin@ximian.com>
13538
13539         * statement.cs (Foreach.TemporaryVariable): Create the
13540         LocalBuilder in the Emit phase and not in Resolve since in some
13541         situations, we don't have an ILGenerator during Resolve; see
13542         2test-19.cs for an example.
13543
13544 2005-06-04  Martin Baulig  <martin@ximian.com>
13545
13546         **** Merged r45395 from GCS ****
13547
13548         The big Foreach rewrite - Part II.
13549
13550         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13551         with `PropertyInfo ienumerator_getcurrent'.
13552
13553         * codegen.cs (VariableStorage): Removed.
13554
13555         * statement.cs
13556         (Foreach): Derive from Statement, not ExceptionStatement.
13557         (Foreach.CollectionForeach): New nested class.  Moved all the code
13558         dealing with collection foreach here.
13559         (Foreach.ForeachHelperMethods): Removed.
13560         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13561
13562 2005-05-23  Martin Baulig  <martin@ximian.com>
13563
13564         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13565         don't need to.  Fix #75014.
13566
13567 2005-05-20  Martin Baulig  <martin@ximian.com>
13568
13569         Merged r44808 from GMCS.
13570
13571         * class.cs (TypeContainer.CircularDepException): Removed.
13572         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13573         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13574         (CS0146) and interface (CS0529) dependencies here.
13575
13576 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13577
13578         * expression.cs (Invocation.EmitCall): Fix initialization
13579         'this_call' to reflect current behaviour.  Fix indentation.
13580
13581         * convert.cs (FindMostEncompassedType): Add two trivial special
13582         cases (number_of_types == 0 || number_of_types == 1).
13583         (FindMostEncompasingType): Likewise.
13584
13585 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13586
13587         Some cleanups preparing for the fix of #75283.
13588         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13589         error testing.
13590         (EventExpr.InstanceResolve): Likewise.
13591         (EventExpr.DoResolve): Remove redundant checks.
13592
13593 2005-06-10  Duncan Mak  <duncan@novell.com>
13594
13595         * cs-tokenizer.cs (process_directives): New flag for controlling
13596         the processing of preprocessor directives.
13597         (x_token): After seeing a '#', return Token.NONE instead of going
13598         to handle_preprocessing_directive() when not processing
13599         directives. This avoids unnecessary processing during the token peek in
13600         is_punct().
13601
13602         This fixes #74939.
13603
13604         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13605         the existing error reporting methods instead of Report.Error.
13606
13607         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13608         after Raja's rewrite.
13609
13610 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13611
13612         * class.cs: Small fix.
13613
13614 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13615
13616         Fix #75160.
13617         * class.cs (GetPartialBases): Fix return value check of
13618         part.GetClassBases.
13619
13620 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13621
13622         Ensure that partial classes are registered in their enclosing
13623         namespace.  Initial part of fix of #75160.
13624         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13625         Register declspace with namespace here, not in
13626         DeclSpace.RecordDecl.
13627         * cs-parser.jay: Pass namespace to RecordDecl.
13628         * class.cs (PartialContainer.Create): Likewise.
13629         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13630         called.
13631         * decl.cs (Declspace.RecordDecl): Remove.
13632         * namespace.cs (NamespaceEntry.DefineName): Remove.
13633
13634 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13635
13636         * rootcontext.cs: Reset TargetExt as well.
13637
13638 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13639
13640         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13641         -langversion:ISO-1.
13642
13643 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13644
13645         Fix #75080, cs0119.cs.
13646         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13647         of ...
13648         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13649         allowing ExprClass.Type and ExprClass.Namespace for
13650         ResolveFlags.VariableOrValue.
13651         (Expression.Resolve) [1-argument variant]: Change default resolve
13652         flags based on language version.
13653         (Expression.Error_UnexpectedKind): Use a simple string array
13654         rather than an ArrayList.
13655         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13656         not ExprClass.Type.
13657         (TypeOfVoid.DoResolve): Likewise.
13658         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13659         flags argument -- it always has the same value.
13660
13661 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13662
13663         Fix #75081.
13664         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13665         Use it in the error message.
13666         * assign.cs, expression.cs, statement.cs: Update.
13667
13668 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13669
13670         Fix #75088.
13671         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13672         the "almostMatchedMember" case too.
13673         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13674         that failed the accessibility checks to 'almost_match'.
13675
13676 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13677
13678         * attribute.cs: Use internal MethodBuilder methods to set
13679         ExactSpelling and SetLastError on PInvoke methods, instead
13680         of passing them via charset.  Fixes #75060.
13681
13682 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13683
13684         * parameter.cs (Parameter): Remove TODO comment.
13685         (Parameter.DefineParameter): Remove Location parameter.
13686         (Parameters.LabelParameters): Likewise.
13687         * class.cs (Constructor.Emit): Update to change.
13688         (MethodData.Emit): Likewise.
13689         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13690         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13691
13692 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13693
13694         * parameter.cs,
13695           Removed Parameters.Location and added Parameter.Location instead.
13696           Removed Location parameter from Emit() and GetSignature().
13697         * anonymous.cs,
13698           class.cs,
13699           cs-parser.jay,
13700           delegate.cs,
13701           iterators.cs,
13702           statement.cs :
13703           Modified all related calls.
13704
13705 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13706
13707         Improve user-defined conversion handling.
13708         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13709         applicable operators.
13710         (AddConversionOperators): New.  Helper for GetConversionOperators.
13711         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13712         there is only one most encompassed/encompassing type.
13713         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13714         "applicable operator" handling.
13715         (UserConversion): Move cache here from GetConversionOperators.
13716         Directly cache the chosen operator, rather than the whole
13717         MethodGroup.
13718         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13719         case.  Allow conversion of decimal to sbyte and byte too.
13720         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13721         New static methods.  Used to avoid allocating EmptyExpressions in
13722         convert.cs.
13723
13724 2005-05-24  Duncan Mak  <duncan@novell.com>
13725
13726         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13727         another class, used in Convert.ExplicitNumericConversion.
13728         (CastToDecimal): New class, similar to above, but casts to
13729         System.Decimal, used in Convert.ImplicitNumericConversion and also
13730         in explicit convesion from double/float to decimal.
13731
13732         * convert.cs (ImplicitNumericConversion): Handle implicit
13733         conversions to System.Decimal.
13734         (ExplicitNumericConversion): handle explicit conversions to
13735         System.Decimal.
13736
13737         This fixes #68711.
13738         
13739 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13740
13741         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13742         know the type at this stage, just break through.   Fixes #75008 
13743
13744 2005-05-19  Martin Baulig  <martin@ximian.com>
13745
13746         * delegate.cs
13747         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13748         to disable error reporting.
13749
13750         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13751         here since we don't want to report an error; see the new test-336.cs.
13752
13753 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13754
13755         * statement.cs (ToplevelBlock.GetParameterReference)
13756         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13757         Move here from class Block.
13758         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13759         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13760
13761 2005-05-18  Martin Baulig  <martin@ximian.com>
13762
13763         Fix #74978.
13764
13765         * flowanalysis.cs
13766         (FlowBranching.Reachability): Add non-static public And() and Or()
13767         methods.
13768         (FlowBranchingSwitch): New class; do the `break_origins' thing
13769         like in FlowBranchingLoop.
13770         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13771         reachability, not just locals and parameters.
13772         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13773         switch; MergeBreakOrigins() now takes care of that.
13774
13775 2005-05-18  Martin Baulig  <martin@ximian.com>
13776
13777         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13778         a loop and may leave it, reset the barrier; fixes #74974.
13779
13780 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13781         
13782         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13783         is back.
13784         
13785         * cs-parser.jay: Catch more lexical errors.
13786         
13787         * report.cs: Add one more Error method.
13788         
13789         * rootcontext.cs,
13790         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13791
13792 2005-05-17  Martin Baulig  <martin@ximian.com>
13793
13794         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13795         #70970. 
13796
13797 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13798
13799         Fix test-382.cs.  Emit values of decimal constants.
13800         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13801         Carved out of ...
13802         (TypeContainer.AddField): ... this.
13803         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13804         with initializers to include 'Const's.
13805         (ClassPart.RegisterFieldForInitialization): Forward to
13806         PartialContainer.
13807         * const.cs (Const.Const): Pass initializer to base class.
13808         (Const.Define): In case of decimal constants, register them for
13809         initialization in a static constructor.
13810
13811 2005-05-14  Martin Baulig  <martin@ximian.com>
13812
13813         * statement.cs (Block.Resolve): Correctly handle unreachable code;
13814         do not call ResolveUnreachable() on unreachable statements in
13815         here, see the comment in the source code.
13816
13817 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13818
13819         Fix #74934.
13820         * expression.cs (BinaryResolveOperator): If one of the operands of
13821         an equality comparison is 'null' and the other is a pointer type,
13822         convert the null to a NullPointer.
13823         * convert.cs (ImplicitReferenceConversion): If the expression is a
13824         NullLiteral and the target type is a pointer type, return a
13825         NullPointer instead.
13826         (ImplicitConversionStandard): Likewise.
13827
13828 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
13829         
13830         * cs-parser.jay: Set readonly context based on special constructs.
13831         
13832         * expression.cs (LocalVariableReference.DoResolveBase): Improved
13833         readonly variable error handling.
13834         
13835         * rootcontext.cs (EmitCode): Don't verify members when error
13836         occurred.
13837         
13838         * statement.cs (LocalInfo): Add reaodnly context information.
13839         (SetReadOnlyContext, GetReadOnlyContext): New methods.
13840
13841 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13842
13843         * statement.cs (Block.Resolve): Revert change below.  Modify fix
13844         for #74041 to initialize 'resolved' to false only for explicit
13845         blocks.  Fixes #74873.
13846
13847 2005-05-12  Raja R Harinath  <harinath@gmail.com>
13848
13849         Fix #74920.
13850         * typemanager.cs (unmanaged_enclosing_types): New.
13851         (IsUnmanagedType): Avoid infloops by using
13852         'unmanaged_enclosing_types' to talk with recursive invocations.
13853
13854 2005-05-13  Martin Baulig  <martin@ximian.com>
13855
13856         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
13857         instance variable, not a local.  Fix #74873.
13858         (Block.ResolveUnreachable): Set it to true here.
13859
13860 2005-05-11  Duncan Mak  <duncan@novell.com>
13861
13862         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
13863         continuing to process for 'arg'.
13864         (handle_preprocessing_directive): Check the argument of the #endif
13865         directive and report error CS1025 if there are any trailing
13866         characters.
13867
13868         According to the C# spec, having even whitespace after the #endif
13869         directive is illegal; however, because we call arg.TrimEnd ()
13870         beforehand, we have the same behavior as csc, allowing whitespace
13871         after the directive.
13872
13873         Fixes #74892.
13874
13875 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
13876
13877         Fix #74863.
13878         
13879         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
13880         (Constructor.GetObsoleteAttribute): Implemented correctly.
13881
13882 2005-05-10  Martin Baulig  <martin@ximian.com>
13883
13884         * support.cs (ReflectionParameters.ParameterModifier): Use
13885         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
13886         and `ParameterAttributes.In'.  Fixes #74884.
13887
13888 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
13889
13890         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
13891         
13892         * expression.cs (Argument.GetParameterModifier): Turned to property.
13893         (Invocation.Error_InvalidArguments): Add more descriptive errors.
13894         
13895         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
13896         its C# equivalent.
13897         
13898 2005-05-09  Raja R Harinath  <rharinath@novell.com>
13899
13900         Fix #74852.
13901         * decl.cs (MemberCache.AddMethods): Register override methods,
13902         rather than non-override methods.
13903         * typemanager.cs (RegisterOverride): New.
13904         (IsOverride): Update.
13905
13906 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
13907
13908         Fix #73105.
13909         
13910         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
13911         recursive declaration.
13912         
13913         * statement.cs (Block.ResolveMeta): Report any error in resolving.
13914         
13915 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
13916
13917         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
13918         
13919         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
13920
13921 2005-05-05  Raja R Harinath  <rharinath@novell.com>
13922
13923         Fix #74797.
13924         * decl.cs (DeclSpace.FamilyAccessible): 
13925         Use TypeManager.IsNestedFamilyAccessible.
13926
13927         Fix reopened #64812.
13928         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
13929         internal'.
13930
13931 2005-05-04  Raja R Harinath  <rharinath@novell.com>
13932             Abin Thomas  <projectmonokochi@rediffmail.com>
13933             Anoob V E  <projectmonokochi@rediffmail.com>
13934             Harilal P R  <projectmonokochi@rediffmail.com>
13935
13936         Fix #64812.
13937         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
13938         allow access to all static members.
13939
13940 2005-05-04  Martin Baulig  <martin@ximian.com>
13941
13942         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
13943
13944 2005-05-04  Martin Baulig  <martin@ximian.com>
13945
13946         Fix #74655.
13947
13948         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
13949         section at the end; make things work if `default' is not the last
13950         section.        
13951
13952 2005-05-04  Martin Baulig  <martin@ximian.com>
13953
13954         Fix #70400.
13955
13956         * statement.cs (Switch): Replaced the `got_default' field with a
13957         `default_section' one.
13958         (Switch.CheckSwitch): Set `default_section' here.
13959         (Switch.Resolve): If we're a constant switch and the constant is
13960         not found, use the default section.
13961
13962 2005-05-03  Martin Baulig  <martin@ximian.com>
13963
13964         * expression.cs (ArrayAccess.EmitGetLength): New public method.
13965
13966         * statement.cs (Foreach.ArrayForeach): New nested class.
13967         (Foreach.TemporaryVariable): New nested class.
13968         (Foreach.EmitArrayForeach): Removed; this is now in the new
13969         ArrayForeach class.
13970
13971 2005-05-03  Raja R Harinath  <rharinath@novell.com>
13972
13973         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
13974         more conservative.
13975         (VerifyPendingMethods): Revert change below.
13976
13977         * typemanager.cs (IsOverride, RegisterNonOverride): New.
13978         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
13979         that used to trigger warning -28.  Remove warning -28.
13980         * expression.cs (Invocation.OverloadResolve): Use
13981         TypeManager.IsOverride to distinguish override methods.
13982
13983         Fix #74773.
13984         * pending.cs (VerifyPendingMethods): If a base type implements the
13985         requested interface, don't bother checking individual methods of
13986         the base type.  As a side-effect, this prevents the creation of
13987         unnecessary proxies.
13988
13989 2005-05-02  Martin Baulig  <martin@ximian.com>
13990
13991         Fix #70182.
13992
13993         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
13994         Also `And' the locals if the old vector is null.
13995         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
13996         null; in this case we basically reset all the variables.        
13997
13998 2005-05-02  Martin Baulig  <martin@ximian.com>
13999
14000         Fix #74529.
14001
14002         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
14003         Added `FlowBranching branching' argument; always `and' the
14004         variables instead of `or'ing them unless we're an infinite loop.
14005
14006         * statement.cs (While.Resolve): Create a new sibling unless we're
14007         infinite.       
14008
14009 2005-05-02  Martin Baulig  <martin@ximian.com>
14010
14011         Fix #70140.
14012
14013         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
14014         arguments; use it instead of creating a new TopLevelBlock.
14015         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
14016         our ConstructorInitializer.
14017
14018         * statement.cs
14019         (TopLevelBlock.TopLevelBranching): New public property.
14020         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
14021         and create our `TopLevelBranching'.
14022
14023         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
14024         anonymous method host, use `block.TopLevelBranching' rather than
14025         creating a new branching.
14026
14027 2005-04-20  Miguel de Icaza  <miguel@novell.com>
14028
14029         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
14030         a ScopeInfo, if any of the current children is a child of the new
14031         entry, move those children there.
14032
14033 2005-04-30  Martin Baulig  <martin@ximian.com>
14034
14035         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
14036         at the beginning of a SwitchSection.  Fix #73335.
14037
14038 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
14039
14040         Fix #74378
14041         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
14042         
14043         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
14044         (FieldExpr.DoResolve): Obsolete members are ignored for field
14045         initializers.
14046         
14047 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
14048
14049         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
14050         of arrays detection.
14051
14052         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
14053         verification.
14054         (Field.VerifyClsCompliance): Volatile fields are not compliant.
14055
14056         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
14057         arrays report.
14058
14059 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
14060
14061         * cs-parser.jay: Use the prefered version of -unsafe in error
14062         message.
14063
14064 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
14065
14066         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
14067         circumstances.
14068
14069 2005-04-20  John Luke  <john.luke@gmail.com>
14070
14071         * driver.cs: fix typo in error message, --outout to --output
14072
14073 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
14074
14075         * codegen.cs (InRefOutArgumentResolving): New field.
14076         
14077         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
14078         fields outside contructor.
14079         
14080         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
14081         
14082 2005-04-19  Miguel de Icaza  <miguel@novell.com>
14083
14084         * anonymous.cs (CaptureContext.EmitParameterInstance): The
14085         parameter code was not completed ever, so it was not as up-to-date
14086         as local variables.  Must finish it.
14087
14088         The bug fix was to compare the Toplevel of the block, not the
14089         current block.  Thanks for Ben for pointing this out. 
14090
14091 2005-04-19  Raja R Harinath  <rharinath@novell.com>
14092
14093         * decl.cs (AddMethods): Use the declaring type of the problem
14094         method to determine if we want to squash a warning.
14095
14096 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
14097
14098         * attribute.cs: Removed debug output.
14099
14100         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
14101         
14102         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
14103         Report.Stderr.
14104         
14105 2005-04-18  Raja R Harinath  <rharinath@novell.com>
14106
14107         Fix #74481.
14108         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
14109         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
14110         all null comparisons against reference types.
14111
14112 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
14113
14114         Fix# 74565
14115         * class.cs (TypeContainer.CircularDepException) New nested
14116         exception class.
14117         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
14118         (TypeContainer.DefineType): Removed error, reset InTransit before
14119         exit.
14120         (Class.DefineType): Throw exception when is in Transit.
14121         Catch exception and report error.
14122         (Struct.DefineType): Throw exception when is in Transit.
14123         Catch exception and report error.
14124         (Interface.DefineType): Throw exception when is in Transit.
14125         Catch exception and report error.
14126
14127         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
14128         handle nested exception handlers.
14129
14130         * flowanalysis.cs (InTryWithCatch): New method, search for try with
14131         a catch.
14132
14133         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
14134         InFinally and InCatch storage.
14135
14136         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
14137         (Catch.Resolve): Set and Restore ec.InCatch.
14138         (Try.Resolve): Set and Restore ec.InFinally.
14139         (Try.HasCatch): True when try has catch.
14140
14141 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
14142
14143         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
14144           for the same event member, so exclude such cases from warning 419.
14145           Fixed bug #74633.
14146
14147 2005-04-16  Miguel de Icaza  <miguel@novell.com>
14148
14149         * expression.cs (Binary.ResolveOperator): Apply patch from John
14150         Luke to fix bug 59864: operators &, | and ^ on enumerations
14151         require that the same enum type on both sides.
14152
14153         * driver.cs: Add warnings to old flag usage, this is to assist
14154         people who produce Makefiles and hope that the Makefiles will be
14155         used on Windows.
14156
14157         * class.cs (TypeContainer.EmitType): Moved the definition of the
14158         special $PRIVATE$ field from the resolve phase to the Emit phase.
14159         During resolve we do not know if we are a struct with
14160         HasExplicitLayout, we know this only after the attributes for the
14161         type are emitted.
14162
14163         Set the FieldOffset to zero on the dummy field that we create for
14164         the class.   Fixes 74590.
14165
14166 2005-04-16  Raja R Harinath  <rharinath@novell.com>
14167
14168         Fix #73834.
14169         * ecore.cs (PropertyExpr.resolved): New.
14170         (DoResolve): Use it to handle a case of double resolution here.
14171         Handle a case of identical-name-and-type-name.
14172         * expression.cs (ArrayCreation.CheckIndices): Avoid double
14173         resolution by storing the results of expression resolution back
14174         into the "probes" array.
14175
14176 2005-04-15  Raja R Harinath  <rharinath@novell.com>
14177
14178         Fix cs0208-7.cs and cs0208-8.cs.
14179         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
14180         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
14181         error reporting to point out the reason a struct is not unmanaged.
14182
14183 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14184
14185         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
14186           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
14187
14188 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14189
14190         Fix #74528.
14191         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
14192         IdenticalNameAndTypeName here.
14193         (EventExpr.InstanceResolve): Likewise.
14194
14195 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
14196
14197         C# 2.0 DefaultCharSetAttribute implementation
14198         
14199         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
14200         which allows us to set GlobalNamespace for every resolve.
14201         (Attribute.ResolveArguments): Cut from Resolve.
14202         (Attribute.GetCharSetValue): Returns CharSet named argument.
14203         (Attribute.DefinePInvokeMethod): Gets default charset from
14204         module settings.
14205         (GlobalAttribute.ResolveAsTypeStep): Override.
14206         (GlobalAttribute.ResolveArguments): Override.
14207         
14208         * class.cs (TypeAttr): Is protected.
14209         
14210         * codegen.cs (ModuleClass.DefaultCharSet): New member.
14211         (ModuleClass.DefaultCharSetType): New memeber.
14212         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
14213         
14214         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
14215         charset from module.
14216         
14217         * delegate.cs (TypeAttr): Override.
14218         (Delegate.DefineType): Use this TypeAttr.
14219         
14220         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14221         at very early stage (before types are defined) to resolve model
14222         module attributes. It will probably not work with corlib but it
14223         should be ok.
14224         
14225         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14226         charset from module.
14227         
14228         * typemanager.cs (default_charset_type): New type.
14229
14230 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14231
14232         * decl.cs (MemberCache.AddMethods): Don't warn if
14233         System.Object.Finalize has buggy MethodAttributes.
14234
14235         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14236         removed below.
14237
14238 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14239
14240         * doc.cs : detect ambiguous reference to overloaded members.
14241           Fixed bug #71603. MS 1.1 csc does not detect it.
14242
14243 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14244
14245         * doc.cs : delegates must not be referenced with parameters.
14246           Fixed bug #71605.
14247
14248 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14249
14250         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14251
14252 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14253
14254         * driver.cs (MainDriver): Stop processing if the CLS stage found
14255         errors. 
14256
14257         (CompilerCallableEntryPoint.InvokeCompiler): Always
14258         reset after execution;   Take a TextWriter argument for the
14259         output.
14260
14261         * report.cs: Use the error stream instead of hardcoding stderr. 
14262
14263 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14264
14265         * class.cs: Reduce code paths to test, too small of an
14266         optimization to make it worth the extra testing.  Always perform
14267         it. 
14268
14269 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14270
14271         Fix #74510.
14272         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14273         operators that had errors reported on them.
14274
14275 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14276
14277         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14278         argument types.
14279         (Attribute.Resolve): Add named argument type checking.
14280         
14281         * class.cs (FixedField.Define): Use IsPrimitiveType
14282         
14283         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14284         
14285         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14286         unsafe parameter types.
14287         
14288         * statement.cs (Using.ResolveExpression): Add better error description.
14289         
14290         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14291         
14292 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14293
14294         Fix #74484.
14295         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14296         AttributeUsageAttribute in the emitcontext of the attribute class,
14297         not in the emitcontext of the attributable entity it was attached to.
14298         * cs-parser.jay: Use 'current_class', not 'current_container',
14299         when creating a GlobalAttribute.
14300
14301 2005-04-08  Alp Toker  <alp@atoker.com>
14302
14303         * pending.cs: The fix to #58413 failed to compile methods implementing
14304         interfaces with/without params modifiers and vice versa, even though
14305         params modifiers aren't part of the signature. Make the modifier check
14306         less strict as in csc.
14307
14308 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14309             Anoob V E  <projectmonokochi@rediffmail.com>
14310             Harilal P R  <projectmonokochi@rediffmail.com>
14311
14312         Fix #58413.
14313         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14314         modifiers of pending methods.
14315         (PendingImplementation.PendingImplementation): Initialize it.
14316         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14317         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14318         with ParameterData.  Add check for modifiers.
14319         * class.cs (MethodData.Define): Update to changes.
14320
14321 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14322
14323         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14324
14325 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14326
14327         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14328         property.
14329         
14330         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14331         
14332         * rootcontext.cs,
14333         * typemanager.cs: Registered RequiredAttributeAttribute.
14334         
14335 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14336
14337         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14338         Warning CS0169 is back at level 3.
14339         (IMethodData.SetMemberIsUsed): New method.
14340         
14341         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14342         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14343         
14344         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14345
14346         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14347         contants.
14348         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14349         is used.
14350         
14351         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14352         is used.
14353         
14354         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14355         to avoid the problems with nested types.
14356
14357 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14358             Anoob V.E  <projectmonokochi@rediffmail.com>
14359             Harilal P.R  <projectmonokochi@rediffmail.com>
14360             Raja R Harinath  <rharinath@novell.com>
14361
14362         Fix #73820.
14363         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14364         attribute.
14365         * typemanager (GetConstructor): Make public.
14366
14367 2005-04-05  John Luke  <john.luke@gmail.com>
14368             Raja R Harinath  <rharinath@novell.com>
14369
14370         Fix #62232.
14371         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14372         struct too.  Return false quicker in a few cases.
14373         (VerifyUnManaged): Use it.
14374
14375 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14376
14377         Fix #74041.
14378         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14379         not 'unreachable_seen'.
14380
14381 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14382
14383         * attribute.cs (Attribute.GetValue): Removed unused.
14384         
14385         * codegen.cs (CodeGen.TrimExt): Removed unused.
14386         
14387         * cs-parser.jay (output): Removed unused.
14388         
14389         * cs-tokenizer.cs (hex_digits): Removed unused.
14390         
14391         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14392         
14393         * expression.cs (Indirection.LoadExprValue): Removed unused.
14394         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14395         
14396         * iterators.cs (Iterator.param_types): Removed unused.
14397         
14398         * statement.cs (Goto.block): Removed unused.
14399         (ToplevelBlock.did): Removed unused.
14400         (Switch.ResolveConstantSwitch): Removed unused.
14401
14402 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14403
14404         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14405         resetting thingy.
14406
14407 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14408
14409         Fix #74232 and cs0208-3.cs.
14410         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14411         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14412         unmanaged type.  Don't use FieldBuilders when 't' is a
14413         TypeBuilder.  Use ModFlags and MemberType fields.
14414         * class.cs (MemberBase.member_type): Rename from MemberType.
14415         (MemberBase.MemberType): New property.  Determines member_type on
14416         demand.
14417         (MemberBase.DoDefine): Don't initialize MemberType here.
14418         (FieldMember.Define): Likewise.
14419
14420 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14421
14422         Fix #74241
14423         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14424         Attributes are emitted there.
14425         
14426 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14427
14428         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14429         keyword in 'partial enum' too.
14430         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14431         is not allowed).
14432         Report from Kamil Skalski <nazgul@omega.pl>.
14433
14434         Fix #74309.
14435         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14436         have partial containers too.
14437
14438         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14439         in block' checks to Block.CheckInvariantMeaningInBlock.
14440         * statement.cs (Block.GetKnownVariableInfo): Make private.
14441         (Block.IsVariableUsedInChildBlock): Remove.
14442         (Block.IsVariableUsedInBlock): Likewise.
14443         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14444         conflicting declaration.
14445         (Block.AddVariable): Make error messages less long-winded and more
14446         specific.  Show location of conflicting declaration.
14447         * parameter.cs (Parameters.Location): New readonly property.
14448
14449 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14450
14451         Clean up semantics of invoking ResolveMemberAccess.
14452         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14453         can have an instance, ensure that we pass in a non-TypeExpression
14454         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14455         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14456         argument.  Update to changes and simplify.
14457         (FieldExpr.Emitinstance): Remove CS0120 check.
14458         (PropertyExpr.EmitInstance): Likewise.
14459         * expression.cs (Argument.Resolve): Likewise.
14460         (Invocation.DoResolve): Update to changes in semantics of
14461         InstanceExpression.
14462
14463 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14464
14465         Fix #74241
14466         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14467         customization.
14468         
14469         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14470
14471 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14472
14473         Fix difference in behaviour with commandline invocation.
14474         * driver.cs (Driver.Reset): New.
14475         (CompilerCallableEntryPoint): Call it.
14476
14477         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14478         variable" warnings if the boolean expression failed to resolve.
14479
14480 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14481
14482         * attribute.cs: Fix the union of several permissions when some of them
14483         are unrestricted (so the result isn't an unrestricted permission set).
14484         Fix #74036.
14485
14486 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14487
14488         * ecore.cs (MemberExpr): New class.  Convert from interface
14489         IMemberExpr.
14490         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14491         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14492         error checks.
14493         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14494         (MethodGroupExpr.IsExplicitImpl): Remove.
14495         (Expression.GetFieldFromEvent): Remove.
14496         (SimpleName.MemberStaticCheck): Remove.
14497         (SimpleName.DoSimpleNameResolve): Update to changes.
14498         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14499         (MemberAccess.IdenticalNameAndTypeName): Remove.
14500         (MemberAccess.error176): Move to MemberExpr.
14501         (MemberAccess.DoResolve): Update to changes.
14502         (BaseAccess.DoResolve): Likewise.
14503
14504 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14505
14506         C# 2.0 Conditional attribute class implementation
14507         
14508         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14509         Analyzes class whether it has attribute which has ConditionalAttribute
14510         and its condition is not defined.
14511         
14512         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14513         (Class.IsExcluded): New method. Search for at least one defined
14514         condition in ConditionalAttribute of attribute class.
14515
14516 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14517
14518         * ecore.cs (PropertyExpr): Derive from Expression, not
14519         ExpressionStatement.
14520         (PropertyExpr.EmitStatement): Remove.
14521
14522 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14523
14524         Fix #74060.
14525         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14526         internal field "value__" of an enum be private.  The examples for
14527         "value__" that I found on MSDN all used FieldAttributes.Private.
14528
14529         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14530         Don't mention IL method attribute names.
14531
14532         Fix #47991.  Remove a TODO.
14533         * statement.cs (Block.Toplevel): Make into a field.
14534         (Block.Parameters): Move into ToplevelBlock.
14535         (Block.known_variables): Rename from child_variable_names.
14536         (Block.Block): Remove variants that take Parameters.  Initialize
14537         'Toplevel' with the immediately surrounding toplevel block.
14538         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14539         LocalInfo parameter.
14540         (Block.GetKnownVariableInfo): New.
14541         (Block.IsVariableNameUsedInChildBlock): Update.
14542         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14543         the block, even though it may not be in scope.
14544         (Block.AddVariable): Remove Parameters parameter.  Use
14545         Toplevel.Parameters instead.
14546         (Block.AddConstant): Remove Parameters parameter.
14547         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14548         (Block.IsParamaterReference): Likewise.
14549         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14550         (ToplevelBlock.Parameters): New.  Moved from Block.
14551         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14552         initialize Parameters to a non-null value.
14553         * cs-parser.jay: Update to changes.
14554         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14555         simple names that mean different things in the same block.  Use
14556         Block.IsVariableNameUsedInBlock.
14557
14558 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14559
14560         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14561         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14562         GetTypeHandle.  It is possible for a reflected type to derive from
14563         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14564         System.Array during mscorlib compilation).
14565         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14566         contain a method_hash, don't create one either.  Don't create a
14567         deep copy of the base cache's method_hash.
14568         (MemberCache.SetupCache): Rename back from DeepCopy.
14569         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14570         already initialized.  If we see an override function, add its
14571         underlying base virtual function to the member_hash too.
14572
14573         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14574
14575 2005-03-26  Raja R Harinath  <harinath@acm.org>
14576
14577         Fix #73038.
14578         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14579         fails to resolve, ensure that the LHS is still resolved as an
14580         lvalue.
14581
14582 2005-03-25  Raja R Harinath  <harinath@acm.org>
14583
14584         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14585         ec.ContainerType.
14586         (Enum.current_ec): Remove.
14587         (Enum.LookupEnumValue): Remove EmitContext argument.
14588         Just uses the one created during DefineType.
14589         (Enum.FindMembers): Update.
14590         * expression.cs (MemberAccess.DoResolve): Update.
14591
14592 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14593
14594         * assign.cs (Assign.DoResolve): Check for CS1717 when
14595         source and target are same (uses Equals).
14596
14597         * expression.cs (LocalVariableReference, ParameterReference,
14598         This): Implemented Equals, GetHashCode.
14599
14600         * statement.cs (Block.GetParameterReference): Removed useless
14601         local variable.
14602
14603 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14604
14605         Fix cs0128.cs
14606         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14607         blocks before deciding whether the error is cs0136 or cs0128.
14608
14609         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14610         (using_alias_directive, using_namespace_directive): Pass
14611         MemberName, not an expression to Namespace.UsingAlias and
14612         Namespace.Using.
14613         (MakeName): Use the MemberName of the namespace.
14614         * namespace.cs (Namespace.MemberName): New.
14615         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14616         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14617         Likewise.
14618         * decl.cs (MemberName.Name): Make readonly.
14619         (MemberName.FromDotted): New "constructor".
14620         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14621         (MemberCore.Name): Compute from MemberName on demand.
14622         (MemberCore.SetMemberName): Provide a way to change the
14623         MemberName.
14624         (MemberCore.AddToContainer): Don't take a fullname parameter.
14625         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14626         fully qualified name of the container to the member name.
14627         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14628         only if the type is a member of the root container.
14629         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14630         MemberName.Left rather than searching for an embedded ".".
14631         (PartialContainer.CreatePart): Update to changes in RootContext.
14632         (MemberBase.ShortName): Turn into a property.  Use
14633         MemberCore.SetMemberName.
14634         (MemberBase.ExplicitInterfaceName): Remove.
14635         (MemberBase.UpdateMemberName): Remove.
14636         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14637         (PropertyBase.SetMemberName): New override.
14638         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14639         (Tree.GetDecl): New.
14640         (Tree.AllDecls): Rename from Decls.
14641         * attribute.cs, enum.cs, report.cs: Update to changes.
14642         * driver.cs (MainDriver): Use MemberName.FromDotted on
14643         RootContext.MainClass.
14644
14645 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14646
14647         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14648         checks.
14649
14650         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14651
14652 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14653
14654         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14655         property accessor modifiers.
14656
14657         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14658         fixed buffer attribute (CS1716).
14659         (PropertyMethod.HasCustomAccessModifier): When property accessor
14660         has custom modifier.
14661
14662         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14663         modifiers.
14664         (PropertyExpr.DoResolveLValue): Add CS0272.
14665
14666 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14667
14668         * convert.cs: When converting to a pointer, use the proper Conv.U
14669         or Conv.I depending on the source data type.
14670
14671         * cs-tokenizer.cs: Make the size for large decimal constants,
14672         fixes #72957.
14673
14674 2005-03-17  Martin Baulig  <martin@ximian.com>
14675
14676         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14677         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14678
14679 2005-03-17  Martin Baulig  <martin@ximian.com>
14680
14681         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14682         to bool so we can return an error condition.
14683         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14684         returned an error.
14685
14686 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14687
14688         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14689         attributes.
14690
14691 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14692
14693         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14694         Refactor to avoid traversing the list of assemblies, and to avoid
14695         string concatenation.
14696         * typemanager.cs (guid_attr_type): Remove.
14697         (negative_hits, pointers, references): Remove hashes.
14698         (type_hash): New.
14699         (GetConstructedType): New.  Uses type_hash to handle constructed
14700         types (arrays, references, pointers).
14701         (GetReferenceType, GetPointerType): Use it.
14702         (GetNestedType): New.  Uses type_hash to handle nested types of
14703         reflected types.
14704         (LookupType, LookupTypeDirect): Remove.
14705         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14706         'types' hash and LookupTypeReflection directly.
14707         (params_string, params_object): Use GetConstructedType.
14708         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14709         top-level types.
14710         (Namespace.Lookup): Use cached_types.
14711         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14712         provided by old TypeManager.LookupType.
14713         * rootcontext.cs (MakeFQN): Remove.
14714         * decl.cs (DeclSpace.MakeFQN): Likewise.
14715         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14716         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14717         TypeManager.GetConstructedType.
14718         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14719
14720 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14721
14722         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14723         indexers.
14724
14725         * cs-parser.jay: Reports CS1527 for any namespace element.
14726
14727         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14728         Added CS0407.
14729
14730         * expression.cs (ParameterReference.IsAssigned): Changed error to
14731         CS0269.
14732         (Error_WrongNumArguments): Moved CS0245 detection here.
14733
14734         * statement.cs (Return.Resolve): Add CS1622 report.
14735
14736 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14737
14738         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14739
14740 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14741
14742         * attribute.cs expression.cs: Get rid of some allocations.
14743
14744 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14745
14746         * doc.cs : just eliminate the latest change.
14747
14748 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14749
14750         * doc.cs : commented out the latest change. It breaks xml-030.cs
14751
14752 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14753
14754         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14755           fail. So invoke CreateType() in FindDocumentedType().
14756
14757 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14758
14759         * cs-tokenizer.cs : added IsKeyword().
14760         * doc.cs : Detect keyword incorrectly used as identifier.
14761           Allow identifiers prefixed by @.
14762
14763 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14764
14765         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14766         It caused exception in namespace resolving (again!).
14767         
14768         * class.cs (Class.ctor): Removed exit.
14769         (PropertyMethod.ctor): ditto.
14770         
14771         * codegen.cs (Codegen.Reset): Reset static data.
14772         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14773         
14774         * cs-tokenizer.cs (Cleanup): Removed.
14775         
14776         * driver.cs (GetSystemDir): Rewrote to one line command.
14777         It caused problem with unloaded dynamic modules.
14778         (UnixParseOption): Removed Exit.
14779         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14780         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14781         Now can be mcs used as library.
14782         
14783         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14784         empty location.
14785         
14786         * location.cs (Reset): Reset static data.
14787         
14788         * namespace.cs (Reset): Reset static data.
14789         
14790         * report.cs (Report.Reset): Reset static data.
14791         
14792         * rootcontext.cs (RootContext.Reset): Reset static data.
14793         
14794         * tree.cs (RootTypes.ctor): Use Location.Null
14795         
14796         * typemanager.cs (TypeManager.Reset): Reset static data.
14797         (CoreLookupType): Removed Exit.
14798         (TypeHandle.Reset): Reset static data.
14799         
14800 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14801
14802         Fix #73516.
14803         * typemanager.cs (ComputeNamespaces): Import namespaces from
14804         referenced modules too.
14805
14806 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14807
14808         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
14809         than '.'.
14810
14811 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14812
14813         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
14814         enclosing DeclSpace.  This ensures that a name-lookup populates
14815         more caches and there are fewer 'TypeExpression's.  Carve out
14816         nested type lookup into ...
14817         (LookupNestedTypeInHierarchy): ... this.
14818
14819 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14820
14821         Clean up a few partial-class semantics.  
14822         Fixes test-357.cs and cs1618-2.cs.
14823         * cs-parser.jay (struct_declaration): Use 'current_class' as
14824         parent of newly-created struct.  Remove call to Register ().
14825         Use 'pop_current_class' to complete handing the current struct.
14826         (interface_declaration): Likewise.
14827         (class_declaration): Likewise.
14828         (enum_declaration): Use 'current_class' as parent of newly created
14829         enum.
14830         (delegate_declaration): Likewise.
14831         (pop_current_class): New function.  This is used to handle closing
14832         up the 'current_class' and 'current_container', and pointing them
14833         to the enclosing class/container.
14834         (CSharpParser): Initialize 'current_class' too.
14835         * decl.cs (MemberCore): Add check for invariant: a partial
14836         container is not a parsed entity, and thus does not enclose any
14837         parsed members.
14838         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
14839         (DeclSpace.BaseTypeExpr): Use it.
14840         (DeclSpace.LookupType): Add check for invariant.
14841         * class.cs (TypeContainer): Add check for invariant: a nested
14842         class should have the same NamespaceEntry as its enclosing class.
14843         (TypeContainer.EmitFieldInitializers): Make virtual.
14844         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
14845         MemberCore.
14846         (TypeContainer.Register): Remove.
14847         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
14848         null.  Use TypeResolveEmitContext for resolving base types and
14849         interfaces.  Move initialization of Parts.TypeBuilder here from
14850         ...
14851         (TypeContainer.DefineNestedTypes): ... here.
14852         (PartialContainer): Take a Namespace not a NamespaceEntry.
14853         (PartialContainer.Create): Don't use Register.  Call the
14854         appropriate Add... function directly.
14855         (ClassPart): Take both the PartialContainer and the enclosing
14856         class as constructor arguments.
14857         (ClassPart.EmitFieldInitializers): Override.
14858         (ClassPart.PartFindNestedTypes): Remove.
14859         (FieldBase.GetInitializerExpression): Resolve the initializer
14860         expression in the emit context of the enclosing class.
14861         * tree.cs (RootTypes): Remove Register ().
14862         
14863 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
14864
14865         * cs-parser.jay: Removed CS0134.
14866         
14867         * driver.cs: Removed CS1901.
14868         
14869         * expression.cs (SizeOf.DoResolve): Don't report CS0233
14870         for predefined types.
14871
14872 2005-03-07  Duncan Mak  <duncan@novell.com>
14873
14874         * codegen.cs (Save):  Catch UnauthorizedAccessException as
14875         well. Fixes bug #73454.
14876
14877 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
14878
14879         * cs-tokenizer.cs (xtoken): Add CS1035.
14880         
14881         * class.cs (MethodData.Define): Add CS0683.
14882         (FieldMember.ctor): Add CS0681.
14883
14884 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14885
14886         * ecore.cs (SimpleName.DoResolve): Rename from
14887         SimpleName.DoResolveAllowStatic.
14888         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
14889         Pass 'intermediate' flag to MemberStaticCheck.
14890         (SimpleName.MemberStaticCheck): Skip "static check" only in case
14891         of "intermediate" lookups via MemberAccess.
14892         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
14893         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
14894
14895 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14896
14897         Fix #73394.
14898         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
14899         slipped in because of variable names that are identical to a
14900         builtin type's BCL equivalent ('string String;', 'int Int32;').
14901         (PropertyExpr.EmitInstance): Likewise.
14902
14903 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
14904
14905         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
14906         
14907         * report.cs (warning_ignore_table): Made public.
14908
14909 2005-03-04  Raja R Harinath  <rharinath@novell.com>
14910
14911         Fix #73282.
14912         * class.cs (MethodData.Emit): Pass 'container' to
14913         container.GetObsoleteAttribute instead of 'container.Parent'.
14914
14915 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
14916
14917         * cs-parser.jay: Add 1534 error test.
14918
14919         * iterators.cs (Yield.CheckContext): Add error 1629.
14920         (Iterator.ctor): Save unsafe modifier.
14921         (MoveNextMethod.DoEmit): Restore unsafe context.
14922
14923         * namespace.cs (UsingAlias): Better error message.
14924
14925 2005-03-03  Dan Winship  <danw@novell.com>
14926
14927         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
14928         the warning message [#73219]
14929
14930 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14931
14932         Fix compile with MCS 1.0.0.0.
14933         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
14934         w_restore to not depend on string constant folding.
14935
14936 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14937
14938         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
14939         CS0246 check to users who passed 'silent = false'.
14940         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
14941         check.
14942         (SimpleName.SimpleNameResolve): Update.
14943         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
14944         (MemberAccess.IdenticalNameAndTypeName): Update.
14945         * doc.cs (FindDocumentedTypeNonArray): Update.
14946
14947 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
14948
14949         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
14950         * parameters.cs (ComputeAndDefineParameters): Remove.
14951         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
14952         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
14953         Use GetParameterInfo.
14954
14955 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
14956
14957         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
14958
14959 2005-03-02  Raja R Harinath  <rharinath@novell.com>
14960
14961         Unify DeclSpace.LookupType and DeclSpace.FindType.
14962         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
14963         is in charge of defining nested types on demand.
14964         (DeclSpace.LookupType): Use it when the current_type is a
14965         TypeBuilder.  Use LookupTypeDirect for reflected types.
14966         (DeclSpace.FindType): Remove.
14967         (DeclSpace.LookupInterfaceOrClass): Likewise.
14968         (DeclSpace.DefineTypeAndParents): Likewise.
14969         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
14970         DeclSpace.LookupType.
14971         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
14972         * typemanager.cs (LookupType): Simplify.
14973         (AddUserType): Remove type from negative_hits.
14974         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
14975         * class.cs (TypeContainer.FindMembers): Move handling of nested
14976         types ...
14977         (TypeContainer.FindMembers_NestedTypes): ... here.
14978         (TypeContainer.FindNestedType): Implement override.
14979         (ClassPart.FindNestedType): Delegate to PartialContainer.
14980         (ClassPart.PartFindNestedType): Looks up the nested types of the
14981         part alone.
14982
14983 2005-03-02  Martin Baulig  <martin@ximian.com>
14984
14985         * class.cs (TypeContainer.DoDefineMembers): We also need a default
14986         static constructor in static classes.
14987
14988 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
14989
14990         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
14991         sizeParamIndex is not specified.
14992
14993 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
14994
14995         Fix #73117
14996         * report.cs (WarningMessage.IsEnabled): Missing null check.
14997
14998 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14999
15000         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
15001         in the fields and not in the properties.
15002
15003 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
15004
15005         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
15006         fields as well.
15007
15008 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15009
15010         * attribute.cs: Small refactoring (improved robustness).
15011         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
15012         (ValidateGuid): Removed.
15013         (Resolve): Removed referenced to above mentioned.
15014         (GetAttributeUsage): Made private and changed to work without
15015         class assistance.
15016         (GetIndexerAttributeValue): Don't crash.
15017         (GetConditionalAttributeValue): Ditto.
15018         (GetClsCompliantAttributeValue): Ditto.
15019         (ExtractSecurityPermissionSet): All attributes exceptions are
15020         error 648.
15021         (GetPropertyValue): New helper.
15022         (GetMethodImplOptions): New method.
15023         (DefinePInvokeMethod): Reuse common code. Implemented handling of
15024         some missing properties.
15025         
15026         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
15027         (Method.ApplyAttributeBuilder): Updated.
15028         
15029         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
15030         exception.
15031
15032 2005-02-28  Raja R Harinath  <rharinath@novell.com>
15033
15034         Fix #73052.
15035         * report.cs (Report.SymbolRelatedToPreviousError): Handle
15036         non-simple types (array, pointer, reference).
15037
15038 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
15039
15040         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
15041
15042         * class.cs (MethodCore.IsDuplicateImplementation): Special error
15043         for operators.
15044         (Method.CheckBase): Catch wrong destructor here.
15045         (MethodData.Define): Add errors 550, 668.
15046
15047         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
15048
15049         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
15050
15051         * pending.cs (VerifyPendingMethods): Add error 551.
15052
15053         * typemanager.cs (CSharpName): Next error report helper.
15054
15055 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
15056
15057         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
15058         attributes. Removed useless attribute double check.
15059         It saves almost 2MBs for corlib.
15060
15061 2005-02-25  Raja R Harinath  <rharinath@novell.com>
15062
15063         Fix #72924.
15064         * statement.cs (ExpressionStatement.Resolve): Make robust to being
15065         called twice in case of error.
15066
15067 2005-02-23  Chris Toshok  <toshok@ximian.com>
15068
15069         Fix compiler portions of #72827.
15070         * statement.cs (Block.Emit): call Begin/EndScope on the
15071         EmitContext instead of the ILGenerator.
15072
15073         * codegen.cs (EmitContext.BeginScope): new method, call
15074         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
15075         we have one.)
15076         (EmitContext.BeginScope): same, but EndScope and CloseScope
15077
15078         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
15079         offset and call the superclass's OpenScope(int) with it.
15080         (SymbolWriter.CloseScope): get the current il
15081         offset and call superclass's CloseScope(int) with it.
15082
15083 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
15084
15085         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
15086         CS1677 for out and ref as well.
15087
15088         * class.cs (Method.Define): Add error CS1599 detection.
15089         
15090         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
15091         
15092         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
15093         
15094         * delegate.cs (Delegate.Define): Add error CS1599 detection.
15095         
15096         * support.cs.cs (ModifierDesc): New helper method.
15097
15098 2005-02-23  Raja R Harinath  <rharinath@novell.com>
15099             Abin Thomas  <projectmonokochi@rediffmail.com>
15100             Anoob V E  <projectmonokochi@rediffmail.com>
15101             Harilal P R  <projectmonokochi@rediffmail.com>
15102
15103         Fix #57851, #72718.
15104         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
15105         MemberLookup (used for error reporting) actually returns a result.
15106         Fix error report number (122, not 112).
15107
15108 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
15109             Anoob V E  <projectmonokochi@rediffmail.com>
15110             Harilal P R  <projectmonokochi@rediffmail.com>
15111
15112         Fix #71134.
15113         * pending.cs (PendingImplementation.GetAbstractMethods):
15114         Find NonPublic members too.
15115
15116 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
15117
15118         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
15119         Fixed error 217.
15120         
15121         * class.cs (MethodCore.CheckMethodAgainstBase):
15122         Add error 239 report.
15123
15124 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15125
15126         Fix #68955.
15127         * expression.cs (Invocation.IsApplicable): Make public.
15128         (Invocation.IsParamsMethodApplicable): Likewise.
15129         * delegate.cs (Delegate.VerifyApplicability): Don't use
15130         Invocation.VerifyArgumentCompat for parameter applicability
15131         testing.  Use Invocation.IsApplicable and
15132         Invocation.IsParamsMethodApplicable.
15133
15134 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15135
15136         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
15137         
15138         * class.cs (Operator.Define): Add error 217 report.
15139         
15140 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15141
15142         * namespace.cs (UsingEntry.Resolve): Undo change below.
15143
15144 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15145
15146         Fix #72756.
15147         * ecore.cs (Expression.MemberLookupFailed): Add argument to
15148         disable the error message when the extended MemberLookup also
15149         fails.
15150         (Expression.MemberLookupFinal): Update.
15151         (SimpleName.DoSimpleNameResolve): Update.
15152         * expression.cs (MemberAccess.ResolveNamespaceOrType):
15153         Don't use MemberLookupFinal.
15154         (New.DoResolve): Update.
15155         (BaseAccess.CommonResolve): Update.
15156
15157 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15158
15159         Fix #72732.
15160         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
15161         occured previously, don't resolve again.
15162
15163 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15164
15165         Fix #69949
15166         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
15167         argument. Call ResolveAttributeUsage for unresolved.
15168         when types doesn't match ctor arguments.
15169         
15170         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
15171         for nested attribute classes.
15172         (Class.attribute_usage): Removed.
15173         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
15174         for attribute class.
15175         
15176         * ecore.cs (IsAttribute): Removed.
15177         
15178         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
15179         
15180         * rootcontext.cs (RegisterAttribute): Removed, attributes are
15181         now normal types.
15182         (attribute_types): Removed.
15183         (EmitCode): Global attributes are emited as the latest.
15184
15185 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
15186
15187         * class.cs (EmitFieldInitializers): Don't emit field initializer
15188         for default values when optimilization is on.
15189         
15190         * constant.cs (Constant.IsDefaultValue): New property.
15191         
15192         * driver.cs: Add /optimize handling.
15193         
15194         * constant.cs,
15195         * ecore.cs,
15196         * literal.cs: Implement new IsDefaultValue property.
15197         
15198         * rootcontext.cs (Optimize): New field, holds /optimize option.
15199
15200 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15201
15202         Fix crasher in re-opened #72347.
15203         * namespace.cs (Namespace.Lookup): Return null if
15204         DeclSpace.DefineType returns null.
15205
15206         Fix #72678.
15207         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
15208
15209 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15210
15211         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
15212         now returns null if it cannot resolve to an lvalue.
15213         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
15214         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
15215         returned null.  Remove check for SimpleName.
15216         (EventExpr.DoResolveLValue): New.
15217         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15218         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15219         error from ...
15220         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15221         avoid CS0131 error.
15222         (Unary.ResolveOperator): Move CS0211 check ...
15223         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15224         CS0131 error.
15225         (Unary.DoResolveLValue): Simplify.
15226         (AddressOf.DoResolveLValue): New.
15227         (ArrayAccess.DoResolveLValue): New.
15228
15229 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15230
15231         * attribute.cs (Attribute.Resolve): Add arguments casting for
15232         when types doesn't match ctor arguments.
15233
15234 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15235
15236         Fix parts of #63202.
15237         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15238         lookup of operator in base type.  Ensure that all checks happen
15239         when the operator resolves to an "op_..." method.
15240
15241 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15242
15243         Fix #71992.
15244         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15245         'ignore_cs0104' parameter.  Pass it to ...
15246         (NamespaceEntry.Lookup): ... this.
15247         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15248         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15249         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15250         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15251         Update.  Request that cs0104 errors be ignored.
15252         (ComposedCast.ResolveAsTypeStep): Update.
15253
15254 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15255
15256         Fix #59209.
15257         * expression.cs (Invocation.BetterFunction): Remove support for
15258         comparing virtual functions and their overrides.
15259         (Invocation.IsOverride): New.
15260         (Invocation.OverloadResolve): Don't consider 'override' functions
15261         during candidate selection.  Store them in a lookaside list.
15262         If the selected method is a 'virtual' function, use the list to
15263         find any overrides that are closer to the LHS type.
15264
15265 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15266
15267         * expression.cs (New.DoResolve): Add complex core type reduction.
15268         (New.Constantify): Converts complex core type syntax like 'new int ()'
15269         to simple constant.
15270         
15271 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15272
15273         * decl.cs (EntryType.EntryType): New constructor to create an
15274         updated copy of a cache entry.
15275         (MemberCache.AddMethods): Use it.
15276         (MemberCache.ClearDeclaredOnly): Remove.
15277         (MemberCache.MemberCache): Update.
15278
15279 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15280
15281         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15282         variable.  This one is represents the actual low-level declaration
15283         of the method, as opposed to the semantic level `IsStatic'.   
15284
15285         An anonymous method which is hosted into a static method might be
15286         actually an instance method.  IsStatic would reflect the
15287         container, while MethodIsStatic represents the actual code
15288         generated.
15289
15290         * expression.cs (ParameterReference): Use the new MethodIsStatic
15291         instead of IsStatic.
15292
15293         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15294         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15295         set on the current EmitContext. 
15296
15297         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15298         resolve our casted expression as an LValue.  This triggers the
15299         proper LValue processing that is later required by Assign.
15300
15301         This fixes 72347.
15302
15303         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15304
15305 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15306
15307         C# 2.0 Fixed buffer implementation
15308
15309         * anonymous.cs: Update after RegisterHelperClass renaming.
15310
15311         * attribute.cs (AttributeTester.fixed_buffer_cache):
15312         Cache of external fixed buffers.
15313         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15314         implementation if field is fixed buffer else null.
15315
15316         * class.cs
15317         (TypeContainer.AddField): Accept FieldMember instead of Field.
15318         (FieldBase.IsFieldClsCompliant): Extracted code from
15319         VerifyClsCompliance descendant customization.
15320         (FixedField): New class handles fixed buffer fields.
15321         (FixedFieldExternal): Keeps information about imported fixed
15322         buffer.
15323         (IFixedField): Make access to internal or external fixed buffer
15324         same.
15325
15326         * cs-parser.jay: Add fixed buffer parsing.
15327
15328         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15329         buffer.
15330
15331         * expression.cs (Indirection): Extended implementation to accept
15332         fixed buffer field.
15333         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15334         (ElementAccess.MakePointerAccess): Get type as parameter.
15335         (DoResolve): Add fixed buffer field expression conversion.
15336         (DoResolveLValue): Ditto.
15337         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15338         (ArrayPtr): Derives from FixedBufferPtr.
15339         (ArrayPtr.Emit): Add extra emit for array elements.
15340
15341         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15342
15343         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15344         for compiler generated types.
15345         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15346
15347         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15348         and consume less memory.
15349         (Fixed.Resolve): Add fixed buffer case.
15350
15351         * typemanager.cs (compiler_generated_attr_ctor,
15352         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15353         (HasElementType): Add our own implementation to work on every
15354         runtime.
15355
15356 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15357
15358         * anonymous.cs (CaptureContext): Track whether `this' has been
15359         referenced.   
15360
15361         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15362         only captured `this' if it was implicitly done (instance
15363         methods/variables were used). 
15364
15365         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15366         `this' must be captured.
15367
15368 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15369  
15370         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15371         is null it means that there has been no need to capture anything,
15372         so we just create a sibling.
15373
15374         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15375
15376         Just a partial fix.  The other half is fairly elusive.
15377         
15378 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15379
15380         Fix #52586, cs0121-4.cs.
15381         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15382         and return a hashtable.
15383         (MemberCache.ClearDeclaredOnly): New.
15384         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15385         the method_hash of a base type too.
15386         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15387         type methods.  Overwrite entries with the same MethodHandle so
15388         that the ReflectedType is correct.  The process leaves in base
15389         virtual functions and their overrides as distinct entries.
15390         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15391         matters since it was boxed in a ArrayList before.
15392         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15393         modifier.
15394         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15395         case of a virtual function and its override (choose the overload
15396         as better).
15397         (Invocation.OverloadResolve): Avoid 'override' members during
15398         'applicable_type' calculation.
15399
15400 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15401
15402         Combine two near-redundant caches.
15403         * typemanager.cs (method_params): Rename from method_internal_params.
15404         (TypeManager.GetParameterData): New.  Replace
15405         Invocation.GetParameterData.
15406         (TypeManager.LookupParametersByBuilder): Remove.
15407         * expression.cs (Invocation.method_parameter_cache): Remove.
15408         (Invocation.GetParameterData): Remove.
15409         Update to changes.
15410         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15411         Update to changes.
15412
15413 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15414
15415         Fix #72015.
15416         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15417         TypeManager.multicast_delegate_type is null, resolve it by looking
15418         up "System.MulticastDelegate".
15419         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15420
15421 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15422             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15423             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15424
15425         Fix cs0164.cs.
15426         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15427         (LabeledStatement.AddReference): New.  Set 'referenced'.
15428         (Goto.Resolve): Use it.
15429
15430 2005-02-05  John Luke  <john.luke@gmail.com>
15431
15432         * driver.cs: remove duplicate -doc line in Usage ()
15433
15434 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15435
15436         * location.cs (Location.AddFile): Fix CS2002 error report.
15437
15438 2005-02-02  Martin Baulig  <martin@ximian.com>
15439
15440         * delegate.cs (Delegate.DefineType): Report an internal error if
15441         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15442         details.        
15443
15444 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15445
15446         Fix a crasher in a variant of #31984.
15447         * const.cs (Constant.CheckBase): New override that defers the
15448         new-or-override check in case the base type hasn't been populated
15449         yet.
15450         (Constant.Define): Ensure the new-or-override check is performed.
15451
15452 2005-02-01  Duncan Mak  <duncan@ximian.com>
15453
15454         * const.cs (LookupConstantValue): Check that `ce' is not null
15455         before calling GetValue ().
15456
15457 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15458
15459         Fix test-334.cs (#69519).
15460         * cs-parser.jay (using_alias_directive): Pass in an expression to
15461         NamespaceEntry.UsingAlias.
15462         (using_namespace_directive): Pass in an expression to
15463         NamespaceEntry.Using.
15464         (namespace_name): Don't flatten to a string.
15465         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15466         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15467         ResolveAsTypeStep.
15468         (NamespaceEntry.UsingEntry): Likewise.
15469         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15470         changes.
15471         (NamespaceEntry.LookupForUsing): Remove.
15472         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15473         names.
15474         (NamespaceEntry.Lookup): Remove support for dotted names.
15475
15476 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15477
15478         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15479         split into two.
15480         (NamespaceEntry.ImplicitParent): Compute on demand.
15481         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15482         parallels the current.
15483         (NamespaceEntry.LookupForUsing): Use it.
15484         (NamespaceEntry.Lookup): If the current namespace-entry is
15485         implicit, don't search aliases and using tables.
15486
15487 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15488
15489         Fix #31984.
15490         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15491         BaseCache here.
15492         (TypeContainer.BaseCache): Compute on demand.
15493         (TypeContainer.FindMembers): Define constants and types if they're
15494         not already created.
15495         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15496         check.
15497         * const.cs (Constant.Define): Make idempotent.
15498
15499 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15500
15501         * pending.cs: Produce better code (no nops produced by using Ldarg
15502         + value).
15503         
15504         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15505         i - 1' it should be arg + 1.
15506
15507         Fixes bug #71819.
15508
15509 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15510
15511         * attribute.cs (Attribute.CheckAttributeType): Make private
15512         non-virtual.
15513         (Attribute.ResolveType): Make virtual.
15514         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15515         handling of RootContext.Tree.Types.
15516
15517 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15518
15519         Update attribute-handling to use the SimpleName/MemberAccess
15520         mechanisms.
15521         * cs-parser.jay (attribute): Pass in an expression to the
15522         constructors of Attribute and GlobalAttribute.
15523         * attribute.cs (Attribute): Take an expression for the name.
15524         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15525         passed in attribute name expression.
15526         (Attribute.CheckAttributeType): Use it.
15527         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15528         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15529         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15530         argument to prevent error messages if the lookup fails.
15531
15532 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15533
15534         * expression.cs (Indirection): Implemented IVariable interface
15535         to support indirection in AddressOf operator.
15536         (PointerArithmetic.Emit): Add optimalization for case where
15537         result can be precomputed.
15538
15539 2005-01-26  Martin Baulig  <martin@ximian.com>
15540
15541         * class.cs (TypeContainer.AttributeTargets): Return the correct
15542         AttributeTargets depending on our `Kind' instead of throwing an
15543         exception; fixes #71632.
15544
15545 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15546
15547         Fix #71257
15548         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15549         constant members.
15550
15551 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15552
15553         Fix #71602.
15554         * expression.cs (MemberAccess.DoResolve): Don't complain with
15555         cs0572 when the LHS of a member access has identical name and type
15556         name.
15557
15558 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15559
15560         Fix #71651, #71675
15561         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15562         CreatePermission.
15563         Create custom PermissionSet only for PermissionSetAttribute.
15564
15565 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15566
15567         Fix #71649
15568         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15569         delegates in static class.
15570
15571 2005-01-24  Martin Baulig  <martin@ximian.com>
15572
15573         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15574         merging an implicit block, just use its reachability.
15575
15576         * statement.cs (Block.Resolve): Make the unreachable code check
15577         work wrt. implicit blocks; see test-337 from #63842.
15578
15579 2005-01-21  Alp Toker  <alp@atoker.com>
15580  
15581         * cs-parser.jay: destructor_declaration's container is PartialContainer
15582         not Class when partial types are used, so use Kind prop instead of
15583         'is'.
15584         
15585 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15586
15587         * cs-parser.jay: Improve error reporting when an interface
15588         declares new types.
15589
15590 2005-01-20  Dick Porter  <dick@ximian.com>
15591
15592         * support.cs: SeekableStreamReader fix from Sandor Dobos
15593         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15594         chars are read.  Fixes bug 70369.
15595
15596 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15597
15598         * cs-parser.jay (catch_clause): Simplify current_block handling
15599         somewhat.
15600
15601 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15602
15603         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15604         code with ImplicitStandardConversion to handle the implicit
15605         conversion of method groups into valid delegate invocations. 
15606
15607         The problem is that in parameter handling we were using this code
15608         path.  Fixes bug #64698
15609
15610 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15611
15612         * cs-parser.jay: Fix several infelicities.
15613         - Avoid assigning to the parser value stack.  Code like 
15614           '$3 = null' is unclean.  Synthesize a value for the code block
15615           instead. 
15616         - Avoid using oob_stack for storing location information.  Use ...
15617         (_mark_): ... this.  New (empty) rule.  Saves the current location
15618         in $$.
15619         (foreach_statement): Avoid using oob_stack for current_block
15620         handling.  Use technique used in for_statement and
15621         using_statement.  Synthesize a value for the code block to store
15622         additional intermediate information.
15623
15624 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15625
15626         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15627         of a different type is only allowed to private fields of a
15628         containing type, not on fields of a base class.
15629
15630         See test-174.cs and error cs0122-9.cs
15631
15632 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15633
15634         Fix test-335.cs (bug #58126).
15635         * cs-parser.jay (argument): Split out non-expression parts of the
15636         rule into 'non_simple_argument'.
15637         (invocation_expression): Support parenthesized invocations with
15638         multiple arguments, and with single non-simple arguments.
15639
15640 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15641
15642         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15643         places.
15644
15645 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15646
15647         Fix cs0038-1.cs, cs1640-6.cs.
15648         * ecore.cs (Expression.Resolve): Remove special-case for
15649         SimpleName in error-handling.
15650         (Expression.almostMatchedMembers): Relax access permission to
15651         protected.
15652         (Expression.MemberLookupFailed): Handle duplicates in
15653         almostMatchedMembers list.
15654         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15655         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15656         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15657         overload if the passed in MemberInfo is a MethodBase.
15658
15659 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15660
15661         Fix #70749
15662         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15663         for non-CAS & merge permission sets properly.
15664
15665 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15666
15667         Improve standard-compliance of simple name and member access 
15668         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15669         * ecore.cs (FullNamedExpression): New abstract base class 
15670         for Namespaces and TypeExpressions.
15671         (ResolveFlags.SimpleName): Remove.
15672         (SimpleName): Remove support for dotted names.
15673         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15674         DeclSpace.FindType and DeclSpace.LookupType.
15675         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15676         (Expression.ExprClassName): Make member function.
15677         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15678         a namespace.  Remove creation of dotted "SimpleName"s.
15679         (MemberAccess.DoResolve): Likewise.
15680         * decl.cs (DeclSpace.Cache): Make private.
15681         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15682         (DeclSpace.FindType): Update.
15683         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15684         FullNamedExpression.
15685         * namespace.cs (Namespace): Derive from FullNamedExpression
15686         so that it can be part of expression resolution.
15687         (Namespace.Lookup): Return an FullNamedExpression.
15688         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15689         namespace.
15690         * rootcontext.cs (NamespaceLookup): Remove.
15691         (LookupType): Move to DeclSpace.
15692         * attribute.cs (CheckAttributeType): Update.
15693         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15694         (FindDocumentedTypeNonArray): Likewise.
15695
15696 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15697
15698         Fix cs0509.cs, cs1632.cs.
15699         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15700         is the same as IsInterface.
15701         (TypeContainer.GetClassBases): Likewise.
15702         * statement.cs (LabeledStatement.ig): New field.
15703         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15704         label.
15705         (LabeledStatement.DoEmit): Check that the label was created with
15706         the same ILGenerator.
15707
15708 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15709
15710         Fix #71058
15711         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15712         accessors to its properties.
15713
15714         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15715         from accessors to property.
15716         
15717 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15718
15719         Fix #70722
15720         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15721         only for overrides.
15722         
15723 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15724
15725         * attribute.cs: Check for null and empty strings.  
15726
15727         I have lost another battle to Paolo.
15728
15729 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15730
15731         Fix #70942
15732         * class.cs (PropertyMethod): Set Parent field in ctors.
15733         (SetMethod.InternalParameters): Add unsafe switch hack.
15734         Override MarkForDuplicationCheck where it is appropriate.
15735
15736         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15737         It says whether container allows members with the same name.
15738         Base default is no.
15739         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15740         Removed is_method parameter.
15741
15742 2005-01-06  Duncan Mak  <duncan@ximian.com>
15743
15744         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15745         because the previous change led to incorrect reporting of CS1032
15746         ("Cannot define/undefine preprocessor symbols after first token in
15747         file"). Instead of using `tokens_seen' as the only flag that
15748         triggers CS1040, introduce `comments_seen'. This new flag is used
15749         to signify having seen comments on the current line, so it is
15750         unset after a newline.
15751
15752 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15753
15754         * doc.cs : When searching for a type, find nested type too.
15755           This fixes bug #71040.
15756
15757 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15758
15759         * doc.cs :
15760           - Warn missing member comment on those classes which also does not
15761             have doc comments. Fixed bug #71041.
15762           - Don't warn missing doc comment on default constructor.
15763             Fixed bug #71042.
15764
15765 2005-01-06  Duncan Mak  <duncan@ximian.com>
15766
15767         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15768         comments, set `tokens_seen' to true. This allows us to detect
15769         misplaced preprocessor directives (i.e. not at the beginning of
15770         the a line, nor after whitespaces). In that case, report error
15771         CS1040. This fixes bug #56460.
15772
15773         * cs-parser.jay (interface_member_declaration): Add checks for
15774         IsExplicitImpl, and report CS0541 error if an interface member is
15775         defined as an explicit interface declaration.
15776
15777 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15778
15779         Fix #70817
15780         * class.cs (PropertyMethod): Set Parent field in ctors.
15781         (SetMethod.InternalParameters): Add unsafe switch hack.
15782         
15783         * decl.cs (MemberCore.Parent): Cannot be readonly.
15784
15785 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15786
15787         * decl.cs (DeclSpace.ResolveType): Remove.
15788         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15789         Merge in code from ...
15790         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15791         * class.cs, enum.cs: Update to changes.
15792
15793 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15794
15795         * anonymous.cs: Ensure that we init the scope of our parent if it
15796         has not been initialized yet.
15797
15798 2004-12-30  Duncan Mak  <duncan@ximian.com>
15799
15800         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15801         if field.FieldBuilder is null. Fixes #70758.
15802
15803         * convert.cs: Fixed some typos and updated some of the comments.
15804         (ImplicitStandardConversionExists):
15805         (TryImplicitIntConversion): If `target_type' is an interface and
15806         the type of `ic' implements this interface, return true or a new
15807         BoxedCast instead of null. This fixes #70468.
15808
15809 2004-12-29  Duncan Mak  <duncan@ximian.com>
15810
15811         * expression.cs (Argument.Emit): Check that Expr is
15812         IMemoryLocation before casting to it, and report CS1510 otherwise.
15813
15814         This fixes #70402.
15815
15816 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15817
15818         * statement.cs (Block.ThisVariable): remove the recursion here, to
15819         make the --profile more sane.
15820
15821 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
15822
15823         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
15824         assembly, by JB Evain.
15825
15826 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15827
15828         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
15829           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
15830         "parent" refers to enclosing type/class.  "base" refers to superclass.
15831
15832 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15833
15834         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15835         Ensure that we only have GlobalAttributes.
15836         * attribute.cs (Attribute.Emit): Make non-virtual.
15837         (GlobalAttribute.Emit): Remove.
15838         (Attribute.Resolve): Make virtual.
15839         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
15840         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
15841         the argument. Don't create one.
15842         (Attribute.GetObsoleteAttribute): Likewise.
15843         (Attribute.GetClsCompliantAttributeValue): Likewise.
15844         * class.cs, decl.cs: Update to changes.
15845
15846 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
15847
15848         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
15849         
15850         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
15851         
15852         * statement.cs (Foreach.Resolve): Add error 186 report.
15853
15854 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
15855
15856         * expression.cs (Conditional.DoResolve): Add warning 429.
15857         
15858         * statement.cs (If.Resolve): Add warning 665.
15859
15860 2004-12-16  Raja R Harinath  <rharinath@novell.com>
15861
15862         New invariant: RootContext.Tree.Types.NamespaceEntry == null
15863         except when in the parser, and in GlobalAttribute.
15864         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
15865         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
15866         RootContext.Tree.Types.NamespaceEntry once work is done.
15867         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
15868         and resets RootContext.Tree.Types.NamespaceEntry.
15869
15870 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
15871
15872         * cs-parser.jay: Don't create a block for every variable.
15873
15874 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
15875
15876         * location.cs: Provide extra information.
15877
15878         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
15879         variables from the captured environment, it is the ldarg_0.
15880
15881 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15882
15883         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
15884         find a conclusion.
15885         
15886         * class.cs: Changed warning level for 169 to avoid developer
15887         displeasure from warning flooding. It will be changed back when they
15888         fix most of current BCL warnings.
15889         
15890         * RootContext.cs: Pushed default WarningLevel to 3.
15891         
15892         * statement.cs: Removed unused variable.
15893
15894 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15895
15896         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
15897         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
15898         Add error 502 report.
15899         (StaticClass.DefineType): Add error 441 report.
15900         (Class.AllowedModifiersProp): New virtual property as temporary
15901         extension to AllowedModifiers.
15902         (Class.DefineType): Add error 418 report. Moved ModFlags check here
15903         to share implementation with StaticClass and don't call virtual
15904         methods from ctor.
15905         
15906         * driver.cs (MainDriver): Add error 1558 test.
15907
15908         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
15909         report. Moved error 36 test here.
15910
15911         * statement.cs (Throw.Resolve): Add error 724 report.
15912
15913         * typemanager.cs: Add out_attribute_type core type.
15914         
15915 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
15916
15917         * class.cs (TypeContainer.VerifyClsCompliance): Add error
15918         3018 report.
15919         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
15920
15921         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
15922         3017 report.
15923         
15924         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
15925
15926         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
15927         Add error 3023 report.
15928         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
15929
15930         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
15931         implementation.
15932
15933 2004-12-12  John Luke  <john.luke@gmail.com>
15934
15935         * driver.cs (AddArgs): take -- into account when
15936         adding arguments, fixes bug 65710 
15937
15938 2004-12-12  Martin Baulig  <martin@ximian.com>
15939
15940         * expression.cs (Unary.TryReduceNegative): Added support for
15941         SByteConstant and ByteConstant.
15942         (Unary.Reduce): Check error values from TryReduceNegative().
15943
15944 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
15945
15946         * attributes.cs (Attribute.Resolve): Avoid multiple error report
15947         and report exception as error 182.
15948
15949 2004-12-10  Raja R Harinath  <rharinath@novell.com>
15950
15951         * driver.cs (Main): Fix message when there are warnings.
15952
15953 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
15954
15955         * delegate.cs: Fixed my fix from yesterday, sorry about that.
15956
15957 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
15958
15959         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
15960         Reduced number of warnings.
15961         
15962         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
15963
15964 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
15965
15966         * driver.cs: Removed message.
15967
15968         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
15969
15970 2004-12-08    <vargaz@freemail.hu>
15971
15972         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
15973
15974 2004-12-08  Martin Baulig  <martin@ximian.com>
15975
15976         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
15977         instead of a CS3002 for properties and indexer.
15978
15979 2004-12-08  Martin Baulig  <martin@ximian.com>
15980
15981         * decl.cs (MemberName.ToString): Make this work again.
15982
15983 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
15984
15985         * attribute.cs (Resolve): Add error 591 detection.
15986
15987         * class.cs (FieldMember.Define): Add error 1547 detection.
15988         (Indexer.Define): Add error 620 detection.
15989         (Operator.Define): Add error 590 detection.
15990
15991         * ecore.cs: Missing argument for error 79.
15992
15993         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
15994         detection.
15995
15996 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
15997
15998         Fix #70106
15999         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
16000         only.
16001
16002 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
16003
16004         * cs-parser.jay : handle doc comments on implicit/explicit operators.
16005           Some operator comments were suppressed.
16006         * doc.cs : Implicit/explicit operator name in doc comments are like
16007           "op_Explicit(type)~returnType", so added suffix handling.
16008
16009 2004-12-07  Martin Baulig  <martin@ximian.com>
16010
16011         * decl.cs
16012         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
16013         (MemberCore.GetClsCompliantAttributeValue): Likewise.
16014         (DeclSpace.ec): New protected field; store the EmitContext here.
16015         (DeclSpace.EmitContext): New public property; moved here from
16016         `TypeContainer'.
16017         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
16018         EmitContext.
16019
16020         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
16021         (Enum.Emit): Don't create a new EmitContext.
16022
16023         * delegate.cs (Delegate.DefineType): Always create the
16024         EmitContext.
16025
16026         * iterators.cs (Iterators.DefineIterator): Create a new
16027         EmitContext and store it in `ec'.
16028
16029 2004-08-24  Martin Baulig  <martin@ximian.com>
16030
16031         * typemanager.cs
16032         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
16033         this for accessibility checks.
16034         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
16035         IsNestedFamilyAccessible.
16036         (TypeManager.IsSubclassOf): New method, do what the name actually
16037         says.   
16038
16039 2004-12-06  Raja R Harinath  <rharinath@novell.com>
16040
16041         Fix crash on cs0657-17.cs.
16042         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
16043         Use RootContext.Tree.Types, not 'new RootTypes ()'.
16044         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
16045         the case where the NamespaceEntry gets overwritten.
16046
16047 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
16048
16049         Fixed #69195, #56821
16050         * ecore.cs (ResolveBoolean): Tiny refactoring.
16051
16052         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
16053         of right expression resolving when left is false constant and
16054         operator is LogicalAnd OR true constant and operator is LogicalOr.
16055
16056         * statement.cs (ResolveUnreachable): Always reports warning.
16057
16058 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
16059
16060         * class.cs: Distinguish between 1721 and 1722 (just a little help
16061         for the programmer).
16062
16063 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
16064
16065         * delegate.cs: Only allow this on new versions of the language. 
16066
16067 2004-12-02  Duncan Mak  <duncan@ximian.com>
16068
16069         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
16070         Expression class.
16071         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
16072         here as a static method. Take an additional bool out parameter
16073         `must_do_cs1540_check' for signaling to InstanceResolve.
16074         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
16075         member field from PropertyExpr class and made it an argument of
16076         the method instead.
16077         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
16078         check for MarshalByRefObject, and report CS0122 instead of CS1540.
16079         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
16080         and `remove_accessor' as well as InstanceResolve: report CS0122
16081         where applicable.
16082
16083         Fixes #70129.
16084
16085 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16086
16087         Fix test-327.cs, test-328.cs, and put in early infrastructure
16088         for eventually fixing #52697.
16089         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
16090         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
16091         from other methods.
16092         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
16093         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
16094         (VerifyUsing, error246): Update.
16095         * rootcontext.cs (RootContext.NamespaceLookup): Just use
16096         'NamespaceEntry.LookupNamespaceOrType'.
16097
16098 2004-12-03  Martin Baulig  <martin@ximian.com>
16099
16100         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16101         method as our child, call AnonymousMethod.Compatible() on it.
16102
16103 2004-12-03  Raja R Harinath  <rharinath@novell.com>
16104
16105         Disable XML documentation support in 'basic' profile.
16106         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
16107         Redirect XmlElement to System.Object.
16108         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
16109         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
16110         * mcs.exe.sources: Add doc-bootstrap.cs.
16111         * doc-bootstrap.cs: New file.  Contains empty stub implementation
16112         of doc.cs.
16113
16114 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
16115
16116         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
16117           comments are allowed.
16118
16119 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16120
16121         * delegate.cs: Add checks for subtypes in paramaters and return values
16122         in VerifyMethod () to add support for Covariance/Contravariance
16123         in delegates.
16124         
16125 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
16126
16127         * report.cs: Remove extra closing parenthesis.
16128
16129         * convert.cs (Error_CannotImplicitConversion): If the name of the
16130         types are the same, provide some extra information.
16131
16132         * class.cs (FieldBase): Use an unused bit field from the field to
16133         encode the `has_offset' property from the FieldMember.  This saves
16134         a couple of Ks on bootstrap compilation.
16135
16136         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16137         method as our child, return the AnonymousMethod resolved
16138         expression.
16139
16140         * expression.cs (New.DoResolve): Allow return values from
16141         NewDelegate to also include AnonymousMethods.
16142
16143         Fixes #70150.
16144
16145 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
16146
16147         Fix bug #70102
16148         * attribute.cs (Resolve): Improved implementation of params
16149         attribute arguments.
16150
16151         * support.cs (ParameterData): Add HasParams to be faster.
16152
16153 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
16154
16155         all things are for /doc support:
16156
16157         * doc.cs: new file that supports XML documentation generation.
16158         * mcs.exe.sources: added doc.cs.
16159         * driver.cs:
16160           Handle /doc command line option.
16161           Report error 2006 instead of 5 for missing file name for /doc.
16162           Generate XML documentation when required, after type resolution.
16163         * cs-tokenizer.cs:
16164           Added support for picking up documentation (/// and /** ... */),
16165           including a new XmlCommentState enumeration.
16166         * cs-parser.jay:
16167           Added lines to fill Documentation element for field, constant,
16168           property, indexer, method, constructor, destructor, operator, event
16169           and class, struct, interface, delegate, enum.
16170           Added lines to warn incorrect comment.
16171         * rootcontext.cs :
16172           Added Documentation field (passed only when /doc was specified).
16173         * decl.cs:
16174           Added DocComment, DocCommentHeader, GenerateDocComment() and
16175           OnGenerateDocComment() and some supporting private members for
16176           /doc feature to MemberCore.
16177         * class.cs:
16178           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
16179         * delegate.cs:
16180           Added overriden DocCommentHeader.
16181         * enum.cs:
16182           Added overriden DocCommentHeader and GenerateDocComment().
16183
16184 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
16185
16186         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
16187         unwrapping the enumeration values, chain to
16188         DoConstantNumericPromotions again, so we can promote things to the
16189         fundamental types (takes care of enums that are bytes, sbytes).
16190
16191         Fixes bug #62054.
16192
16193 2004-12-01  Raja R Harinath  <rharinath@novell.com>
16194
16195         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
16196         Fix long-standing bug in type-lookup.  Use FindType instead of
16197         LookupType when ec.ResolvingTypeTree.
16198         (Attribute.ResolveType, Attribute.Resolve)
16199         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
16200         Update to changes.
16201         (Attributes.Search): Remove internal version.  Update.
16202         (Attributes.SearchMulti): Update.
16203         (Attributes.GetClsCompliantAttribute): Remove.
16204         (Attributes.GetIndexerNameAttribute): Remove.
16205         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
16206         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
16207         * class.cs (Indexer.Define): Likewise.
16208
16209 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
16210
16211         Fix bug #68790
16212         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
16213         MarshallByReference members access.
16214
16215         * expression.cs: Use CheckMarshallByRefAccess;
16216         Better error CS0197 message.
16217
16218         * report.cs: Print whole related error message.
16219
16220 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16221
16222         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16223         the current directory to help debugging.
16224
16225 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16226
16227         * class (GetClassBases): Better error 60 report.
16228         (EventProperty): Disabled warning 67 detection.
16229
16230 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16231
16232         Fix bug #60324
16233         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16234
16235         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16236         precise values.
16237
16238 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16239
16240         Fix bug #49488
16241         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16242
16243         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16244
16245 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16246
16247         * attribute.cs (Attribute.Resolve): Refine error reporting and
16248         report a cs0117 if the identifier does not exist, to distinguish
16249         from 0617 which is a miss-use of the actual identifier.
16250
16251         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16252         between cs0070 and cs0079.
16253
16254         * class.cs (MemberBase.DoDefine): When reporting a wrong
16255         accessibility level, we use MethodCore to compare instead of
16256         Method (this was a regression in some refactoring effort).
16257
16258         So now we correctly report cs0056 again.
16259
16260         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16261         testing the target_type (which was known to be object_type) and
16262         not the source type (which is anonymous_method).
16263
16264         Fixed reporting of error cs1660.
16265
16266         * expression.cs (UserCast.Source): Expose the underlying cast.
16267
16268         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16269         allowed types to find a match to int32 first (most common).
16270
16271         In addition, it ignores any ImplicitUserConversions that did an
16272         internal implicit conversion (as the switch statement allows only
16273         one integral conversion to exist).
16274
16275         * class.cs (PartialContainer.Create): rename `name' to
16276         `member_name' for clarity.  Then replace the string calls with a
16277         call to MemberName.GetPartialName, as now using
16278         MemberName.ToString is an error (this is due to the side effects
16279         it had, that were fixed in the past).
16280
16281         This will restore the error reporting on a number of partial class
16282         errors that were missusing this (and getting an exception as a
16283         results, which is now just a plain textual warning, because
16284         yyparse debug output would crash otherwise).
16285
16286 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16287
16288         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16289
16290 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16291
16292         * rootcontext.cs (LookupType): Make sure to cache lookups that
16293         don't give us a negative result. This saves about 5% of corlib
16294         compilation time.
16295
16296 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16297
16298         * report.cs (AbstractMessage.Print): messages are sent to stderr
16299
16300         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16301         non-interface in the list of interfaces (at this point, either
16302         parent was properly set, or a base class is being listed in the
16303         interfaces section).
16304
16305         This flags error 1722, and resolves the crash from bug 69259.
16306
16307 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16308
16309         * statement.cs (Using.EmitExpressionFinally): make this work right
16310         for valuetypes. Fixes 69926.
16311
16312 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16313
16314         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16315         converted to an enum" here, before we try to change the underlying
16316         type.  This code exists, but it is a different code path than the
16317         one used while encoding constants.
16318
16319         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16320         old bug: when converting from the null literal to a pointer,
16321         return an EmptyCast, not the NullLiteral.
16322
16323         This fixes #69921, the recent null_type changes probably made this
16324         bug more prominent.
16325
16326         (ImplicitReferenceConversionExists): In addition, resynchronized
16327         the code here, so it matches the same code in
16328         ImplicitReferenceConversionExists for the `from any class-type S
16329         to any interface-type T'.
16330         
16331
16332 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16333
16334         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16335
16336 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16337
16338         * cs-parser.jay: Use verbosity accordingly. 
16339
16340 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16341
16342         * expression.cs (Unary.ResolveOperator): Do not report warning;
16343         AddressOf reads from variable.
16344         
16345         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16346
16347 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16348
16349         Fix bug #69462
16350
16351         * attribute.cs (Attributable): Removed CheckTargets.
16352         (Attributes.Emit): Explicit attribute targets are tested here.
16353
16354         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16355         not enabled for interfaces.
16356
16357         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16358         (GetAssemblyName): Ouch next bug there.
16359
16360 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16361
16362         * expression.cs: Error 275 added.
16363         
16364 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16365
16366         Fix bug #69177 (Implemented decimal constant support)
16367
16368         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16369         (BinaryFold): Add DecimalConstant.
16370
16371         * const.cs (Define): Decimal constant 
16372         (is not constant.
16373         (ChangeType): Add decimal type handling.
16374         (LookupConstantValue): Don't set value for decimal type but
16375         emit DecimalConstantAttribute. Needed for constant optimization.
16376
16377         * constant.cs (ToDecimal): New method.
16378         (ConvertToDecimal): New method.
16379         (IntConstant): Implemented ConvertToDecimal.
16380         (DecimalConstant.Emit): Emit optimized version for decimals in
16381         int range.
16382
16383         * expression.cs (ResolveOperator): Changed order of constant
16384         reduction to work correctly with native types which have
16385         overloaded operators.
16386         (ResolveMemberAccess): Extract constant value from attribute
16387         for decimal type.
16388
16389         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16390
16391         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16392         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16393         (ChangeType): Decimal is special.
16394         (TypeToCoreType): Add decimal type.
16395
16396 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16397
16398         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16399         decimal types.
16400
16401 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16402
16403         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16404         test cs1667-5.cs.
16405
16406 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16407
16408         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16409
16410         * pending.cs (PendingImplementation): Grab only interfaces.
16411
16412 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16413
16414         * statement.cs (ForeachHelperMethods): Add location member and
16415         error 202 detection.
16416
16417 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16418
16419         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16420         automatically handled by executable.make.
16421         (PROGRAM): Make profile-specific.
16422
16423 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16424
16425         * expression.cs (DoResolveBase): Fixed wrong warning for out
16426         variables.
16427
16428 2004-11-18  Martin Baulig  <martin@ximian.com>
16429
16430         Merged latest changes into gmcs.  Please keep this comment in
16431         here, it makes it easier for me to see what changed in MCS since
16432         the last time I merged.
16433
16434 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16435
16436         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16437         (TypeHandle.GetMemberCache): New.
16438         (TypeHandle.TypeHandle): Update.
16439         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16440         (TypeManager.LookupParentInterfacesCache):
16441         Rename from LookupInterfaceCache.  Optimize slightly.
16442         (TypeManager.MemberLookup_FindMembers): Update.
16443         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16444         multi-type variant.
16445         (AddCacheContents): Rename from AddHashtable.
16446         * class.cs (TypeContainer.parent_container): Remove.
16447         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16448         (TypeContainer.DoDefineMembers): Don't initialize it.
16449         Update to name changes.
16450         
16451 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16452
16453         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16454         that factors the code to check access modifiers on override.  
16455
16456         (PropertyBase): Use the code here.
16457
16458         Patch from Lluis S'anchez, fixes bug #69361.
16459
16460 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16461
16462         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16463         routine that is used to report the use of a captured variable
16464         whose address has been taken.
16465
16466         There are two checks: one when variables are being captured and
16467         the other check is when the address of a variable is taken. 
16468         
16469         (because an anonymous methods might be resolved before *or* after
16470         the address has been taken) and 
16471
16472         * expression.cs (Conditional.DoResolve): Remove the special
16473         casing that Martin added to trueExpr and falseExpr being both
16474         NullLiteral.  We get the right behavior now just by introducing
16475         the null_type into the compiler. 
16476
16477         * convert.cs (ExplicitConversion): Change the code to use
16478         null_type instead of testing `expr is NullLiteral'.
16479         (ImplicitConversionStandard): use null_type too.
16480         (ImplicitReferenceConversionExists): use null_type too.
16481         (ImplicitReferenceConversion): use null_type too.
16482
16483         * literal.cs: The type of `NullLiteral' is now null_type instead
16484         of object_type. 
16485         (Resolve): Set the type here.
16486
16487         * typemanager.cs: Introduce null_type.
16488
16489 2004-11-17  Martin Baulig  <martin@ximian.com>
16490
16491         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16492         direction, like FindMembers() does.  Fixes #69546, testcase is in
16493         test-315.cs.    
16494
16495 2004-11-16  Martin Baulig  <martin@ximian.com>
16496
16497         This is based on a patch from Marek Safar, see bug #69082.
16498         Fixes bugs #63705 and #67130.
16499
16500         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16501         method; create a MemberCache for an interface type and cache the
16502         result.
16503
16504         * decl.cs (IMemberContainer.ParentContainer): Removed.
16505         (IMemberContainer.ParentCache): New property.
16506         (MemberCache.SetupCacheForInterface): Removed.
16507         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16508         to create a cache for an interface's "parent".
16509
16510         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16511         interfaces too.
16512
16513 2004-11-16  Martin Baulig  <martin@ximian.com>
16514
16515         Merged back from gmcs; these changes already went into gmcs a
16516         couple of weeks ago.
16517
16518         * typemanager.cs
16519         (TypeManager.AddUserType): Removed the `ifaces' argument.
16520         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16521         `TypeExpr []'.
16522         (TypeManager.AddUserInterface): Removed.
16523         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16524         `TypeExpr []'.
16525         (TypeManager.GetInterfaces): Likewise.
16526         (TypeManager.GetExplicitInterfaces): Likewise.
16527
16528         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16529
16530         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16531         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16532
16533 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16534
16535         * statement.cs: Avoid adding bools to a hashtable.
16536
16537 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16538
16539         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16540         calling an unsafe method from a safe location.
16541
16542 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16543
16544         Fix #69167
16545         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16546
16547 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16548
16549         * namespace.cs (VerifyUsing): use GetPartialName instead of
16550         ToString. 
16551
16552 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16553
16554         * statement.cs (Return.Resolve): Fix regression in typo: if
16555         `in_exc', we have to request a NeedReturnLabel, this was a typo
16556         introduced in the anonymous method check-in.  Fixes #69131.
16557
16558         * Indexers were using the ShortName when defining themselves,
16559         causing a regression in the compiler bootstrap when applying the
16560         patch from 2004-11-02 (first part), now they use their full name
16561         and the bug is gone.
16562
16563 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16564
16565         * driver.cs: Strip the path from the names of embedded resources. Fixes
16566         #68519.
16567
16568 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16569
16570         Fix error message regression: cs0104-2.cs.
16571         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16572         (AliasEntry.Resolve): Update.
16573         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16574         'silent' flag.
16575         (RootContext.LookupType): Update.
16576
16577 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16578
16579         * cs-parser.jay: Add support for handling accessor modifiers
16580         * class: Add support port accessor modifiers and error checking,
16581         define PropertyMethod.Define as virtual (not abstract anymore)
16582         * ecore.cs: Add checking for proeprties access with access modifiers
16583         * iterators.cs: Modify Accessor constructor call based in the modified
16584         constructor
16585 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16586
16587         * expression.cs (StringConcat): Handle being called twice,
16588         as when we have a concat in a field init with more than two
16589         ctors in the class
16590
16591 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16592
16593         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16594         special case explicit implementations, we should always produce
16595         the .property or .event declaration.
16596         
16597         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16598         since it will not return correct data if people use this
16599         unresolved in the presence of using statements (see test-313).
16600
16601         * class.cs (MethodData.Define): If we are an explicit interface
16602         implementation, set the method name to the full name of the
16603         interface plus the name of the method.  
16604
16605         Notice that using the method.MethodName.GetFullName() does not
16606         work, as it will only contain the name as declared on the source
16607         file (it can be a shorthand in the presence of using statements)
16608         and not the fully qualifed type name, for example:
16609
16610         using System;
16611
16612         class D : ICloneable {
16613                 object ICloneable.Clone ()  {
16614                 }
16615         }
16616
16617         Would produce a method called `ICloneable.Clone' instead of
16618         `System.ICloneable.Clone'.
16619
16620         * namespace.cs (Alias.Resolve): Use GetPartialName.
16621         
16622 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16623
16624         * cs-parser.jay: Add error 1055 report.
16625
16626 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16627
16628         * assign.cs (Assign.DoResolve): Only do the transform of
16629         assignment into a New if the types are compatible, if not, fall
16630         through and let the implicit code deal with the errors and with
16631         the necessary conversions. 
16632
16633 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16634
16635         * cs-parser.jay: Add error 1031 report.
16636
16637         * cs-tokenizer.cs: Add location for error 1038.
16638
16639 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16640
16641         * cs-parser.jay: Add error 1016 report.
16642
16643 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16644
16645         * cs-parser.jay: Add errors 1575,1611 report.
16646
16647 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16648
16649         * cs-parser.jay: Add error 1001 report.
16650
16651 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16652
16653         Fix #68850
16654         * attribute.cs (GetMarshal): Add method argument for
16655         caller identification.
16656
16657         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16658         agument for GetMarshal and RuntimeMissingSupport.
16659
16660 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16661
16662         * attribute.cs (ExtractSecurityPermissionSet): Removed
16663         TypeManager.code_access_permission_type.
16664
16665         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16666
16667 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16668
16669         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16670         for obsolete use of a variable here.   Fixes regression on errors
16671         cs0619-25 and cs0619-26.
16672
16673 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16674
16675         Fix #62358, implemented security attribute encoding.
16676
16677         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16678         Tests permitted SecurityAction for assembly or other types.
16679         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16680         data from SecurityPermissionAttribute to PermisionSet class.
16681
16682         * class.cs (ApplyAttributeBuilder): Added special handling
16683         for System.Security.Permissions.SecurityAttribute based types.
16684
16685         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16686         special handling for System.Security.Permissions.SecurityAttribute
16687         based types.
16688
16689         * enum.cs (ApplyAttributeBuilder): Added special handling
16690         for System.Security.Permissions.SecurityAttribute based types.
16691
16692         * parameter.cs (ApplyAttributeBuilder): Added special handling
16693         for System.Security.Permissions.SecurityAttribute based types.
16694
16695         * rootcontext.cs: Next 2 core types.
16696
16697         * typemanager.cs (TypeManager.security_permission_attr_type):
16698         Built in type for the SecurityPermission Attribute.
16699         (code_access_permission_type): Build in type.
16700
16701 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16702
16703         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16704         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16705         all of this information into
16706         EmitContext.EmitCapturedVariableInstance.
16707         
16708         * codegen.cs (EmitCapturedVariableInstance): move here the
16709         funcionality of emitting an ldarg.0 in the presence of a
16710         remapping.   This centralizes the instance emit code.
16711
16712         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16713         then emit a load of this: it means that we have reached the
16714         topmost ScopeInfo: the one that contains the pointer to the
16715         instance of the class hosting the anonymous method.
16716
16717         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16718         captures to the topmost CaptureContext.
16719
16720 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16721
16722         * expression.cs (LocalVariableReference): Move the knowledge about
16723         the iterators into codegen's EmitCapturedVariableInstance.
16724
16725 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16726
16727         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16728         all code paths return a value from an anonymous method (it is the
16729         same as the 161 error, but for anonymous methods).
16730
16731 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16732
16733         The introduction of anonymous methods in the compiler changed
16734         various ways of doing things in the compiler.  The most
16735         significant one is the hard split between the resolution phase
16736         and the emission phases of the compiler.
16737
16738         For instance, routines that referenced local variables no
16739         longer can safely create temporary variables during the
16740         resolution phase: they must do so from the emission phase,
16741         since the variable might have been "captured", hence access to
16742         it can not be done with the local-variable operations from the runtime.
16743         
16744         * statement.cs 
16745
16746         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16747         is a toplevel block.
16748
16749         (ToplevelBlock): A new kind of Block, these are the blocks that
16750         are created by the parser for all toplevel method bodies.  These
16751         include methods, accessors and anonymous methods.
16752
16753         These contain some extra information not found in regular blocks:
16754         A pointer to an optional CaptureContext (for tracking captured
16755         local variables and parameters).  A pointer to the parent
16756         ToplevelBlock.
16757         
16758         (Return.Resolve): Catch missmatches when returning a value from an
16759         anonymous method (error 1662).
16760         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16761         phase.
16762
16763         (Break.Resolve): ditto.
16764
16765         (SwitchLabel): instead of defining the labels during the
16766         resolution phase, we now turned the public ILLabel and ILLabelCode
16767         labels into methods called GetILLabelCode() and GetILLabel() that
16768         only define the label during the Emit phase.
16769
16770         (GotoCase): Track the SwitchLabel instead of the computed label
16771         (its contained therein).  Emit the code by using
16772         SwitchLabel.GetILLabelCode ().
16773
16774         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16775         whether the Local has been captured or not.
16776
16777         (LocalInfo.IsCaptured): New property, used to tell whether the
16778         local has been captured.
16779         
16780         * anonymous.cs: Vastly updated to contain the anonymous method
16781         support.
16782
16783         The main classes here are: CaptureContext which tracks any
16784         captured information for a toplevel block and ScopeInfo used to
16785         track the activation frames for various local variables.   
16786
16787         Each toplevel block has an optional capture context associated
16788         with it.  When a method contains an anonymous method both the
16789         toplevel method and the anonymous method will create a capture
16790         context.   When variables or parameters are captured, they are
16791         recorded on the CaptureContext that owns them, for example:
16792
16793         void Demo () {
16794              int a;
16795              MyDelegate d = delegate {
16796                  a = 1;
16797              }
16798         }
16799
16800         Here `a' will be recorded as captured on the toplevel
16801         CapturedContext, the inner captured context will not have anything
16802         (it will only have data if local variables or parameters from it
16803         are captured in a nested anonymous method.
16804
16805         The ScopeInfo is used to track the activation frames for local
16806         variables, for example:
16807
16808         for (int i = 0; i < 10; i++)
16809                 for (int j = 0; j < 10; j++){
16810                    MyDelegate d = delegate {
16811                         call (i, j);
16812                    }
16813                 }
16814
16815         At runtime this captures a single captured variable `i', but it
16816         captures 10 different versions of the variable `j'.  The variable
16817         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
16818         recorded on a child.  
16819
16820         The toplevel ScopeInfo will also track information like the `this'
16821         pointer if instance variables were referenced (this is necessary
16822         as the anonymous method lives inside a nested class in the host
16823         type of the method). 
16824
16825         (AnonymousMethod): Expanded to track the Toplevel, implement
16826         `AnonymousMethod.Compatible' to tell whether an anonymous method
16827         can be converted to a target delegate type. 
16828
16829         The routine now also produces the anonymous method content
16830
16831         (AnonymousDelegate): A helper class that derives from
16832         DelegateCreation, this is used to generate the code necessary to
16833         produce the delegate for the anonymous method that was created. 
16834
16835         * assign.cs: API adjustments for new changes in
16836         Convert.ImplicitStandardConversionExists.
16837
16838         * class.cs: Adjustments to cope with the fact that now toplevel
16839         blocks are of type `ToplevelBlock'. 
16840
16841         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
16842         insteda of standard blocks.
16843
16844         Flag errors if params arguments are passed to anonymous methods.
16845
16846         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
16847         `CurrentAnonymousMethod' which points to the current Anonymous
16848         Method.  The variable points to the AnonymousMethod class that
16849         holds the code being compiled.  It is set in the new EmitContext
16850         created for the anonymous method.
16851
16852         (EmitContext.Phase): Introduce a variable and an enumeration to
16853         assist in enforcing some rules about when and where we are allowed
16854         to invoke certain methods (EmitContext.NeedsReturnLabel is the
16855         only one that enfonces this right now).
16856
16857         (EmitContext.HaveCaptureInfo): new helper method that returns
16858         whether we have a CapturedContext initialized.
16859
16860         (EmitContext.CaptureVariable): New method used to register that a
16861         LocalInfo must be flagged for capturing. 
16862
16863         (EmitContext.CapturedParameter): New method used to register that a
16864         parameters must be flagged for capturing. 
16865         
16866         (EmitContext.CapturedField): New method used to register that a
16867         field must be flagged for capturing. 
16868
16869         (EmitContext.HaveCapturedVariables,
16870         EmitContext.HaveCapturedFields): Return whether there are captured
16871         variables or fields. 
16872
16873         (EmitContext.EmitMethodHostInstance): This is used to emit the
16874         instance for the anonymous method.  The instance might be null
16875         (static methods), this (for anonymous methods that capture nothing
16876         and happen to live side-by-side with the current method body) or a
16877         more complicated expression if the method has a CaptureContext.
16878
16879         (EmitContext.EmitTopBlock): Routine that drives the emission of
16880         code: it will first resolve the top block, then emit any metadata
16881         and then emit the code.  The split is done so that we can extract
16882         any anonymous methods and flag any captured variables/parameters.
16883         
16884         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
16885         during this phase, the ILGenerator should not be used as labels
16886         and local variables declared here might not be accessible to any
16887         code that is part of an anonymous method.  
16888
16889         Exceptions to this include the temporary variables that are
16890         created by some statements internally for holding temporary
16891         variables. 
16892         
16893         (EmitContext.EmitMeta): New routine, in charge of emitting all the
16894         metadata for a cb
16895
16896         (EmitContext.TemporaryReturn): This method is typically called
16897         from the Emit phase, and its the only place where we allow the
16898         ReturnLabel to be defined other than the EmitMeta.  The reason is
16899         that otherwise we would have to duplicate a lot of logic in the
16900         Resolve phases of various methods that today is on the Emit
16901         phase. 
16902
16903         (EmitContext.NeedReturnLabel): This no longer creates the label,
16904         as the ILGenerator is not valid during the resolve phase.
16905
16906         (EmitContext.EmitThis): Extended the knowledge in this class to
16907         work in anonymous methods in addition to iterators. 
16908
16909         (EmitContext.EmitCapturedVariableInstance): This emits whatever
16910         code is necessary on the stack to access the instance to a local
16911         variable (the variable will be accessed as a field).
16912
16913         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
16914         EmitContext.EmitAddressOfParameter): Routines to support
16915         parameters (not completed at this point). 
16916         
16917         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
16918         will also remove the parameters.
16919
16920         * convert.cs (Convert): Define a `ConstantEC' which points to a
16921         null.  This is just to prefity some code that uses
16922         ImplicitStandardConversion code and do not have an EmitContext
16923         handy.
16924
16925         The idea is to flag explicitly that at that point in time, it is
16926         known that the conversion will not trigger the delegate checking
16927         code in implicit conversions (which requires a valid
16928         EmitContext). 
16929
16930         Everywhere: pass new EmitContext parameter since
16931         ImplicitStandardConversionExists now requires it to check for
16932         anonymous method conversions. 
16933
16934         (Convert.ImplicitStandardConversionExists): If the type of an
16935         expression is the anonymous_method_type, and the type is a
16936         delegate, we invoke the AnonymousMethod.Compatible method to check
16937         whether an implicit conversion is possible. 
16938
16939         (Convert.ImplicitConversionStandard): Only do implicit method
16940         group conversions if the language level is not ISO_1.
16941
16942         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
16943         MethodInfo for the Invoke method.  used by Delegate and
16944         AnonymousDelegate.
16945
16946         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
16947         method conversions if the target type is a delegate.
16948
16949         Removed extra debugging nops.
16950
16951         (LocalVariableReference): Turn the `local_info' into a public
16952         field. 
16953
16954         Add `prepared' field, the same hack used for FieldExprs to cope
16955         with composed assignments, as Local variables do not necessarily
16956         operate purely on the stack as they used to: they can be captured
16957         fields. 
16958
16959         Add `temp' for a temporary result, like fields.
16960
16961         Refactor DoResolve and DoResolveLValue into DoResolveBase.
16962
16963         It now copes with Local variables that are captured and emits the
16964         proper instance variable to load it from a field in the captured
16965         case. 
16966
16967         (ParameterReference.DoResolveBase): During the resolve phase,
16968         capture parameters if we are in an anonymous method.
16969
16970         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
16971         anonymous method, use the EmitContext helper routines to emit the
16972         parameter reference.
16973
16974         * iterators.cs: Set RemapToProxy to true/false during the
16975         EmitDispose class.
16976
16977         * parameters.cs (GetParameterByName): New helper method. 
16978
16979         * typemanager.cs (anonymous_method_type) a new type that
16980         represents an anonyous method.  This is always an internal type,
16981         used as a fencepost to test against the anonymous-methodness of an
16982         expression. 
16983         
16984 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
16985
16986         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
16987         561 report.
16988         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
16989
16990 2004-10-18  Martin Baulig  <martin@ximian.com>
16991
16992         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
16993         `Type' directly, but call ResolveType() on it.
16994         (Catch.Resolve): Likewise.
16995         (Foreach.Resolve): Likewise.
16996
16997 2004-10-18  Martin Baulig  <martin@ximian.com>
16998
16999         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
17000         `Type' directly, but call ResolveType() on it.
17001         (Probe.DoResolve): Likewise.
17002         (ArrayCreation.LookupType): Likewise.
17003         (TypeOf.DoResolve): Likewise.
17004         (SizeOf.DoResolve): Likewise.
17005
17006 2004-10-18  Martin Baulig  <martin@ximian.com>
17007
17008         * expression.cs (Invocation.BetterFunction): Put back
17009         TypeManager.TypeToCoreType().
17010
17011 2004-10-18  Raja R Harinath  <rharinath@novell.com>
17012
17013         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
17014         the ResolveType.
17015
17016 2004-10-18  Martin Baulig  <martin@ximian.com>
17017
17018         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
17019         `Type' directly, but call ResolveType() on it.
17020
17021 2004-10-18  Martin Baulig  <martin@ximian.com>
17022
17023         * class.cs (FieldMember.Define): Don't access the TypeExpr's
17024         `Type' directly, but call ResolveType() on it.
17025         (MemberBase.DoDefine): Likewise.
17026
17027         * expression.cs (New.DoResolve): Don't access the TypeExpr's
17028         `Type' directly, but call ResolveType() on it.
17029         (ComposedCast.DoResolveAsTypeStep): Likewise.
17030
17031         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
17032         `Type' directly, but call ResolveType() on it.
17033
17034 2004-10-17  John Luke  <john.luke@gmail.com>
17035
17036         * class.cs (Operator.GetSignatureForError): use CSharpName
17037
17038         * parameter.cs (Parameter.GetSignatureForError): Returns
17039         correct name even if was not defined.
17040
17041 2004-10-13  Raja R Harinath  <rharinath@novell.com>
17042
17043         Fix #65816.
17044         * class.cs (TypeContainer.EmitContext): New property.
17045         (DefineNestedTypes): Create an emitcontext for each part.
17046         (MethodCore.DoDefineParameters): Use container's emitcontext.
17047         Pass type array to InternalParameters.
17048         (MemberBase.DoDefine): Use container's emitcontext.
17049         (FieldMember.Define): Likewise.
17050         (Event.Define): Likewise.
17051         (SetMethod.GetParameterInfo): Change argument to EmitContext.
17052         Pass type array to InternalParameters.
17053         (SetIndexerMethod.GetParameterInfo): Likewise.
17054         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
17055         * delegate.cs (Define): Pass emitcontext to
17056         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
17057         array to InternalParameters.
17058         * expression.cs (ParameterReference.DoResolveBase): Pass
17059         emitcontext to GetParameterInfo.
17060         (ComposedCast.DoResolveAsTypeStep): Remove check on
17061         ec.ResolvingTypeTree.
17062         * parameter.cs (Parameter.Resolve): Change argument to
17063         EmitContext.  Use ResolveAsTypeTerminal.
17064         (Parameter.GetSignature): Change argument to EmitContext.
17065         (Parameters.ComputeSignature): Likewise.
17066         (Parameters.ComputeParameterTypes): Likewise.
17067         (Parameters.GetParameterInfo): Likewise.
17068         (Parameters.ComputeAndDefineParameterTypes): Likewise.
17069         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
17070         * support.cs (InternalParameters..ctor): Remove variant that takes
17071         a DeclSpace.
17072         * typemanager.cs (system_intptr_expr): New.
17073         (InitExpressionTypes): Initialize it.
17074
17075 2004-10-12  Chris Toshok  <toshok@ximian.com>
17076
17077         * cs-parser.jay: fix location for try_statement and catch_clause.
17078
17079 2004-10-11  Martin Baulig  <martin@ximian.com>
17080
17081         * report.cs: Don't make --fatal abort on warnings, we have
17082         -warnaserror for that.
17083
17084 2004-10-07  Raja R Harinath  <rharinath@novell.com>
17085
17086         More DeclSpace.ResolveType avoidance.
17087         * decl.cs (MemberCore.InUnsafe): New property.
17088         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
17089         with newly created EmitContext.
17090         (FieldMember.Define): Likewise.
17091         * delegate.cs (Delegate.Define): Likewise.
17092         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
17093         only if normal name-lookup fails.
17094         (TypeExpr.DoResolve): Enable error-checking.
17095         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
17096         (SizeOf.DoResolve): Likewise.
17097         (ComposedCast.DoResolveAsTypeStep): Likewise.
17098         (StackAlloc.DoResolve): Likewise.
17099         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
17100         (Block.Unsafe): New property.
17101         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
17102         (Unsafe): Set 'unsafe' flag of contained block.
17103         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
17104         (Fixed.Resolve): Likewise.
17105         (Catch.Resolve): Likewise.
17106         (Using.ResolveLocalVariableDecls): Likewise.
17107         (Foreach.Resolve): Likewise.
17108
17109 2004-10-05  John Luke <john.luke@gmail.com>
17110
17111         * cs-parser.jay: add location to error CS0175
17112
17113 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
17114
17115         * ecore.cs (Expression.Constantity): Add support for turning null
17116         into a constant.
17117
17118         * const.cs (Const.Define): Allow constants to be reference types
17119         as long as the value is Null.
17120
17121 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
17122
17123         * namespace.cs (NamespaceEntry.Using): No matter which warning
17124         level is set, check if this namespace name has already been added.
17125
17126 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
17127
17128         * expression.cs: reftype [!=]= null should always use br[true,false].
17129         # 67410
17130
17131 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
17132
17133         Fix #67108
17134         * attribute.cs: Enum conversion moved to 
17135         GetAttributeArgumentExpression to be applied to the all
17136         expressions.
17137
17138 2004-10-01  Raja R Harinath  <rharinath@novell.com>
17139
17140         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
17141         * class.c (TypeContainer.DefineType): Flag error if
17142         base types aren't accessible due to access permissions.
17143         * decl.cs (DeclSpace.ResolveType): Move logic to
17144         Expression.ResolveAsTypeTerminal.
17145         (DeclSpace.ResolveTypeExpr): Thin layer over
17146         Expression.ResolveAsTypeTerminal.
17147         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
17148         Refactor code into NestedAccess.  Use it.
17149         (DeclSpace.NestedAccess): New.
17150         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
17151         argument to silence errors.  Check access permissions.
17152         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
17153         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
17154         (Cast.DoResolve): Likewise.
17155         (New.DoResolve): Likewise.
17156         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
17157         (TypeOf.DoResolve): Likewise.
17158
17159         * expression.cs (Invocation.BetterConversion): Return the Type of
17160         the better conversion.  Implement section 14.4.2.3 more faithfully.
17161         (Invocation.BetterFunction): Make boolean.  Make correspondence to
17162         section 14.4.2.2 explicit.
17163         (Invocation.OverloadResolve): Update.
17164         (Invocation): Remove is_base field.
17165         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
17166         (Invocation.Emit): Likewise.
17167
17168 2004-09-27  Raja R Harinath  <rharinath@novell.com>
17169
17170         * README: Update to changes.
17171
17172 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
17173
17174         * cs-parser.jay: Reverted 642 warning fix.
17175
17176 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17177
17178         Fix bug #66615
17179         * decl.cs (FindMemberWithSameName): Indexer can have more than
17180         1 argument.
17181
17182 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17183
17184         * expression.cs (LocalVariableReference.DoResolveLValue):
17185         Do not report warning 219 for out values.
17186         (EmptyExpression.Null): New member to avoid extra allocations.
17187
17188 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17189
17190         * cs-parser.jay: Fix wrong warning 642 report.
17191
17192         * cs-tokenizer.cs (CheckNextToken): New helper;
17193         Inspect next character if is same as expected.
17194
17195 2004-09-23  Martin Baulig  <martin@ximian.com>
17196
17197         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
17198         (Convert.ImplicitReferenceConversionExists): Likewise.
17199
17200 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17201
17202         * class.cs (Operator.Define): Add error 448 and 559 report.
17203
17204 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17205
17206         * class.cs (MemberBase.IsTypePermitted): New protected
17207         method for checking error CS0610.
17208
17209 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17210
17211         * class.cs (TypeContainer.HasExplicitLayout): New property
17212         Returns whether container has StructLayout attribute set Explicit.
17213         (FieldMember): New abstract class for consts and fields.
17214         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
17215         (Field): Reuse FieldMember.
17216
17217         * const.cs (Const): Reuse FieldMember.
17218
17219         * rootcontext.cs: EmitConstants call moved to class.
17220
17221 2004-09-22  Martin Baulig  <martin@ximian.com>
17222
17223         Thanks to Peter Sestoft for this bug report.
17224
17225         * expression.cs (Conditional): If both the `trueExpr' and the
17226         `falseExpr' is a NullLiteral, return a NullLiteral.
17227
17228 2004-09-22  Martin Baulig  <martin@ximian.com>
17229
17230         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17231         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17232         for the "get_Current" call.
17233
17234 2004-09-22  Martin Baulig  <martin@ximian.com>
17235
17236         Marek and me just fixed one of our oldest bugs: #28562 :-)
17237
17238         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17239
17240         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17241         we're an EnumConstant, just return that.
17242         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17243         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17244         to get the value which'll actually be written into the attribute.
17245         However, we have to use GetValue() to access the attribute's value
17246         in the compiler.        
17247
17248 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17249
17250         * constant.cs (Constant.IsNegative): New abstract property
17251         IsNegative.
17252
17253         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17254         (StackAlloc.DoResolve): Reused IsNegative.
17255
17256 2004-09-21  Martin Baulig  <martin@ximian.com>
17257
17258         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17259         if we're used in an iterator, we may be called from different
17260         methods.
17261
17262         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17263         we actually have an exception block.
17264
17265 2004-09-20  John Luke <jluke@cfl.rr.com>
17266
17267         * class.cs, cs-parser.jay: Improve the error report for 1520:
17268         report the actual line where the error happens, not where the
17269         class was declared.
17270
17271         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17272         Pass location information that was available elsewhere.
17273
17274 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17275
17276         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17277         runtime to delay sign assemblies.
17278
17279 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17280
17281         * cs-parser.jay: Do not report the stack trace, this is barely
17282         used nowadays.
17283
17284 2004-08-22  John Luke  <john.luke@gmail.com>
17285  
17286         * driver.cs : check that a resource id is not already used
17287         before adding it, report CS1508 if it is, bug #63637
17288
17289 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17290
17291         * ecore.cs: Removed dead code.
17292
17293 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17294
17295         * class.cs: Do not report warning CS0067 on the interfaces.
17296
17297 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17298
17299         * cs-parser.jay: Add error 504 report.
17300
17301 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17302
17303         * rootcontext.cs: WarningLevel is 4 by default now.
17304
17305         * statement.cs (Fixed.Resolve): Do not null
17306         VariableInfo.
17307
17308 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17309
17310         Fixed bug #55780
17311         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17312         deep search when property is not virtual.
17313         (PropertyExpr.ResolveAccessors): Make one call for both
17314         accessors.
17315
17316 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17317
17318         Fixed bug #65766
17319         * statement.cs: Error 152 report constains also location.
17320
17321 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17322
17323         Fixed bug #65766
17324         * const.cs: Explicitly set constant as static.
17325
17326 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17327
17328         Fixed bug #64226
17329         * cs-parser.jay: Add error 1017 report.
17330
17331 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17332
17333         Fixed bug #59980, #64224
17334         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17335
17336         * typemanager.cs (IsSpecialMethod): Simplified
17337
17338 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17339
17340         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17341         condition with better params.
17342
17343 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17344
17345         Fixed bug #65238
17346         * attribute.cs (Resolve): Property has to have both
17347         accessors.
17348
17349 2004-09-14  Martin Baulig  <martin@ximian.com>
17350
17351         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17352
17353 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17354
17355         Fixed bug #61902
17356         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17357         called and is obsolete then this member suppress message
17358         when call is inside next [Obsolete] method or type.
17359
17360         * expression.cs: Use TestObsoleteMethodUsage member.
17361
17362 2004-09-14  Martin Baulig  <martin@ximian.com>
17363
17364         * cs-parser.jay: Sync a bit with the GMCS version.
17365
17366 2004-09-14  Martin Baulig  <martin@ximian.com>
17367
17368         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17369         (CSharpParser.yacc_verbose_flag): New public field.
17370
17371         * genericparser.cs: Removed.
17372
17373 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17374
17375         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17376
17377 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17378
17379         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17380
17381 2004-09-10  Martin Baulig  <martin@ximian.com>
17382
17383         Backported my MemberName changes from GMCS into MCS.
17384
17385         - we are now using a special `MemberName' class instead of using
17386         strings; in GMCS, the `MemberName' also contains the type
17387         arguments.
17388
17389         - changed the grammar rules a bit:
17390           * the old `member_name' is now a `namespace_or_type_name':
17391             The rule is that we use `namespace_or_type_name' everywhere
17392             where we expect either a "member name" (GetEnumerator) or a
17393             "member name" with an explicit interface name
17394             (IEnumerable.GetEnumerator).
17395             In GMCS, the explicit interface name may include type arguments
17396             (IEnumerable<T>.GetEnumerator).
17397           * we use `member_name' instead of just `IDENTIFIER' for
17398             "member names":
17399             The rule is that we use `member_name' wherever a member may
17400             have type parameters in GMCS.       
17401
17402         * decl.cs (MemberName): New public class.
17403         (MemberCore.MemberName): New public readonly field.
17404         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17405         (DeclSpace): Likewise.
17406
17407         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17408         * enum.cs (Enum.ctor): Likewise.
17409
17410         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17411         MemberName.     
17412         (AliasEntry.ctor): Take a MemberName, not an Expression.
17413         (AliasEntry.UsingAlias): Likewise.
17414
17415         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17416         (IMethodData.MemberName): Changed type from string to MemberName.
17417         (MemberBase.ExplicitInterfaceName): Likewise.
17418         (AbstractPropertyEventMethod.SetupName): Make this private.
17419         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17420         argument; compute the member name here.
17421         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17422         on the `member.MemberName' and the `prefix'.
17423
17424         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17425         not `type_name'.
17426         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17427         thus, we get a `MemberName' instead of a `string'.  These
17428         declarations may have type parameters in GMCS.
17429         (interface_method_declaration, delegate_declaration): Likewise.
17430         (class_declaration, interface_declaration): Likewise.
17431         (method_header): Use `namespace_or_type_name' instead of
17432         `member_name'.  We may be an explicit interface implementation.
17433         (property_declaration, event_declaration): Likewise.
17434         (member_name): This is now just an `IDENTIFIER', not a
17435         `namespace_or_type_name'.
17436         (type_name, interface_type): Removed.
17437         (namespace_or_type_name): Return a MemberName, not an Expression.
17438         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17439         call GetTypeExpression() on the MemberName to get an expression.
17440         (IndexerDeclaration.interface_type): Changed type from string to
17441         MemberName.
17442         (MakeName): Operate on MemberName's instead of string's.
17443
17444 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17445
17446         Fix bug #55770.
17447         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17448         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17449         lookup to avoid symbols introduced by 'using'.
17450         * rootcontext.cs (NamespaceLookup): Update.
17451
17452 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17453
17454         * class.cs (TypeContainer.DoDefineMembers): Do not call
17455         DefineDefaultConstructor for static classes.
17456
17457 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17458
17459         * attribute.cs (Attribute.Resolve): Add error 653 report.
17460
17461         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17462         report.
17463         (Method.ApplyAttributeBuilder): Add error 685 report.
17464         (Operator.Define): Add error 564 report.
17465
17466         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17467
17468         * expression.cs (Invocation.DoResolve): Add error
17469         245 and 250 report.
17470
17471         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17472         error 674 report.
17473
17474 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17475
17476         * class.cs (ConstructorInitializer.Resolve):
17477         Wrong error number (515->516).
17478
17479 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17480
17481         * class.cs (Indexer.Define): Add error 631 report.
17482
17483 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17484
17485         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17486
17487 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17488
17489         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17490
17491 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17492
17493         * cs-parser.jay: Added error CS0241 report.
17494
17495 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17496
17497         * cs-parser.jay (fixed_statement): Introduce a scope for the
17498         declaration in the 'fixed' statement.
17499
17500 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17501
17502         * cs-parser.jay: Added CS0230 error report.
17503
17504 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17505
17506         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17507
17508 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17509
17510         * expression.cs (Argument.Resolve): Added error CS0192 and
17511         CS0199 report.
17512
17513 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17514
17515         C# 2.0 #pragma warning feature
17516
17517         * cs-tokenizer.cs (PreProcessPragma): New method; 
17518         Handles #pragma directive.
17519
17520         * report.cs (WarningRegions): New class; Support
17521         class for #pragma warning directive. It tests whether
17522         warning is enabled for a given line.
17523
17524 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17525
17526         * const.cs: Add more descriptive error report, tahnks to
17527         Sebastien. 
17528
17529 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17530
17531         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17532
17533 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17534
17535         * expression.cs: Apply patch from Ben: Remove dead code from
17536         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17537         as that code just threw an exception anwyays.
17538
17539         * const.cs: Remove the call to the turnintoconstant, for details
17540         see bug: #63144
17541         
17542         * literal.cs: The type of the null-literal is the null type;  So
17543         we use a placeholder type (literal.cs:System.Null, defined here)
17544         for it.
17545
17546         * expression.cs (Conditional.DoResolve): Remove some old code that
17547         is no longer needed, conversions have been fixed.
17548
17549         (ArrayCreationExpression.DoResolve): Return false if we fail to
17550         resolve the inner expression.
17551
17552 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17553
17554         Fix test-290.cs.
17555         * cs-parser.jay (delegate_declaration): Record a delegate
17556         declaration as a type declaration.
17557         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17558
17559 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17560
17561         * parameter.cs: Do not crash if the type can not be resolved. 
17562
17563         * expression.cs: Report errors with unsafe pointers, fixes #64896
17564
17565 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17566
17567         * expression.cs: Pointer arith always needs to do a conv.i
17568         if the operand is a long. fix 65320
17569
17570 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17571
17572         Fixed cs0619-37.cs, cs0619-38.cs
17573
17574         * enum.cs (GetObsoleteAttribute): Removed.
17575
17576         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17577         on Enum member is double staged. The first is tested member
17578         and then enum.
17579
17580 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17581
17582         Fixed #56986, #63631, #65231
17583
17584         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17585         adds member to name container.
17586         (TypeContainer.AddToTypeContainer): New method, adds type to
17587         name container.
17588         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17589         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17590         AddOperator): Simplified by reusing AddToMemberContainer.
17591         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17592         instead of field.
17593         (Method.CheckForDuplications): Fixed implementation to test all
17594         possibilities.
17595         (MemberBase): Detection whether member is explicit interface
17596         implementation is now in constructor.
17597         (MemberBase.UpdateMemberName): Handles IndexerName.
17598         (Accessor): Changed to keep also location information.
17599         (AbstractPropertyEventMethod): Is derived from MemberCore.
17600         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17601         will be emited or not.
17602         (PropertyBase.AreAccessorsDuplicateImplementation):
17603         Tests whether accessors are not in collision with some method.
17604         (Operator): Is derived from MethodCore to simplify common
17605         operations.
17606
17607         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17608         must be performed.
17609         (DeclSpace.AddToContainer): Adds the member to defined_names
17610         table. It tests for duplications and enclosing name conflicts.
17611
17612         * enum.cs (EnumMember): Clean up to reuse the base structures
17613
17614 2004-09-03  Martin Baulig  <martin@ximian.com>
17615
17616         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17617         into TypeContainer, to make partial classes work again.
17618
17619 2004-09-03  Martin Baulig  <martin@ximian.com>
17620
17621         * rootcontext.cs (RootContext.V2): Removed.
17622
17623 2004-03-23  Martin Baulig  <martin@ximian.com>
17624
17625         * expression.cs (Invocation.OverloadResolve): Added `bool
17626         may_fail' argument and use it instead of the Location.IsNull() hack.
17627
17628 2004-09-03  Martin Baulig  <martin@ximian.com>
17629
17630         Merged latest changes into gmcs.  Please keep this comment in
17631         here, it makes it easier for me to see what changed in MCS since
17632         the last time I merged.
17633
17634 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17635
17636         Fix #61128.
17637         * expression.cs (BetterConversion): Don't allow either conversion 
17638         to be null.  Remove redundant implicit conversion test when 'q ==
17639         null' -- when this function is invoked, we already know that the
17640         implicit conversion exists.
17641         (BetterFunction): Assume that 'best' is non-null.  Remove
17642         redundant reimplementation of IsApplicable when 'best' is null.
17643         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17644         number of arguments.
17645         (IsAncestralType): Extract from OverloadResolve.
17646         (OverloadResolve): Make robust to the MethodGroupExpr being
17647         unsorted.  Implement all the logic of Section 14.5.5.1, and
17648         support overloading of methods from multiple applicable types.
17649         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17650
17651         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17652         (RealError, Warning): Append type of report to related symbol.
17653
17654 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17655
17656         * enum.cs: Fixed CLS-Compliance checks for enum members.
17657         Error tests cs3008-8.cs, cs3014-8.cs
17658
17659 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17660
17661         Fixed bug #62342, #63102
17662         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17663         like ImplementMethod.
17664
17665 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17666
17667         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17668         Fixed bug #65170.
17669
17670 2004-09-02  Martin Baulig  <martin@ximian.com>
17671
17672         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17673         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17674         on the MethodBase.
17675
17676 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17677
17678         C# 2.0 Static classes implemented
17679
17680         * class.cs (TypeContainer): instance_constructors,
17681         initialized_fields, initialized_static_fields,
17682         default_constructor, base_inteface_types are protected to be
17683         accessible from StaticClass.
17684         (TypeContainer.DefineDefaultConstructor): New virtual method
17685         for custom default constructor generating
17686         (StaticClass): New class to handle "Static classes" feature.
17687
17688         * cs-parser.jay: Handle static keyword on class like instance
17689         of StaticClass.
17690
17691         * driver.cs: Added "/langversion" command line switch with two
17692         options (iso-1, default).
17693
17694 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17695
17696         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17697
17698 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17699
17700         * delegate.cs: Style.
17701
17702 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17703
17704         * delegate.cs: Add seperate instance expr field for miguel.
17705
17706 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17707
17708         * PointerArithmetic (Resolve): make sure we are not doing
17709         pointer arith on void*. Also, make sure we are resolved
17710         by not setting eclass until resolve.
17711
17712         All callers: Make sure that PointerArithmetic gets resolved.
17713
17714 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17715
17716         * ArrayCreation (LookupType): If the type does not resolve 
17717         to an array, give an error.
17718
17719 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17720
17721         * statement.cs (Try.Resolve): Fixed bug #64222
17722
17723 2004-08-27  Martin Baulig  <martin@ximian.com>
17724
17725         * class.cs
17726         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17727         crash here.     
17728
17729 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17730
17731         * ecore.cs (Constantify): Get underlying type via
17732         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17733         Windows in special cases.
17734
17735 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17736
17737         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17738         for obtaining also private methods.
17739         (GetRemoveMethod): Used GetRemoveMethod (true)
17740         for obtaining also private methods.
17741
17742 2004-08-24  Martin Baulig  <martin@ximian.com>
17743
17744         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17745         MethodAttributes.HideBySig for operators.
17746
17747 2004-08-23  Martin Baulig  <martin@ximian.com>
17748
17749         Back to the old error reporting system :-)
17750
17751         * report.cs (Message): Removed.
17752         (Report.MessageData, ErrorData, WarningData): Removed.
17753         (Report.Error, Warning): Back to the old system.
17754
17755 2004-08-23  Martin Baulig  <martin@ximian.com>
17756
17757         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17758
17759         * class.cs (TypeContainer.ParentContainer): New public virtual
17760         method; replaces the explicit interface implementation.
17761         (ClassPart.ParentContainer): Override.
17762
17763 2004-08-23  Martin Baulig  <martin@ximian.com>
17764
17765         * statement.cs (Switch): Added support for constant switches; see
17766         #59428 or test-285.cs.
17767
17768 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17769
17770         Fixed bug #62740.
17771         * statement.cs (GetEnumeratorFilter): Removed useless
17772         logic because C# specs is strict. GetEnumerator must be
17773         public.
17774
17775 2004-08-22  Martin Baulig  <martin@ximian.com>
17776
17777         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17778         a switch and may break, reset the barrier.  Fixes #59867.
17779
17780 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17781
17782         CLS-Compliance speed up (~5% for corlib)
17783
17784         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17785         New method. Tests container for CLS-Compliant names
17786
17787         * class.cs (TypeContainer.VerifyClsName): New method.
17788         Checks whether container name is CLS Compliant.
17789         (Constructor): Implements IMethodData.
17790
17791         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17792         low-case table for CLS Compliance test.
17793         (MemberCache.VerifyClsParameterConflict): New method.
17794         Checks method parameters for CS3006 error.
17795
17796         * enum.cs (EnumMember): Is derived from MemberCore.
17797         (Enum.VerifyClsName): Optimized for better performance.
17798
17799 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17800
17801         * report.cs: Renamed Error_T to Error and changed all
17802         references.
17803
17804 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17805
17806         * class.cs (TypeContainer.IndexerArrayList): New inner class
17807         container for indexers.
17808         (TypeContainer.DefaultIndexerName): New constant for default
17809         indexer name. Replaced all "Item" with this constant.
17810         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
17811
17812         * typemanager.cs (TypeManager.default_member_ctor): Cache here
17813         DefaultMemberAttribute constructor.
17814
17815 2004-08-05  Martin Baulig  <martin@ximian.com>
17816
17817         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
17818         Fix bug #59429.
17819
17820 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
17821
17822         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
17823         multi platforms problem.
17824
17825         * compiler.csproj: Included shared files.
17826
17827 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17828
17829         Fix bug 60333, 55971 in the more general way
17830         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17831         Added arg_type argument for constant conversion.
17832         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
17833
17834 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17835
17836         Fix bug #59760
17837         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
17838         OperatorArrayList, MethodCoreArrayList for typecontainer
17839         containers. Changed class member types to these new types.
17840         (MethodArrayList.DefineMembers): Added test for CS0659.
17841
17842 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
17843
17844         * cfold.cs: Synchronize the folding with the code in expression.cs
17845         Binary.DoNumericPromotions for uint operands.
17846
17847         * attribute.cs: Revert patch from Raja, it introduced a regression
17848         while building Blam-1.2.1 (hard to isolate a test case).
17849
17850 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17851
17852         Fix for #55382
17853         * class.cs:
17854         (TypeContainer.Define): Renamed to DefineContainerMembers because of
17855         name collision.
17856         (MethodCore.parent_method): New member. The method we're overriding
17857         if this is an override method.
17858         (MethodCore.CheckBase): Moved from Method class and made common.
17859         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
17860         private.
17861         (MethodCore.CheckForDuplications): New abstract method. For custom
17862         member duplication search in a container
17863         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
17864         method and its return type.
17865         (Event.conflict_symbol): New member. Symbol with same name in the
17866         parent class.
17867
17868         * decl.cs:
17869         (MemberCache.FindMemberWithSameName): New method. The method
17870         is looking for conflict with inherited symbols.
17871
17872 2004-08-04  Martin Baulig  <martin@ximian.com>
17873
17874         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
17875
17876         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
17877
17878 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17879
17880         * report.cs (Message): New enum for better error, warning reference in
17881         the code.
17882         (MessageData): New inner abstract class. It generally handles printing of
17883         error and warning messages.
17884         Removed unused Error, Warning, Message methods.
17885
17886 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17887
17888         Fix for cs0592-8.cs test
17889         * attribute.cs
17890         (Attributable.ValidAttributeTargets): Made public.
17891         (Attribute.ExplicitTarget): New member for explicit target value.
17892         (Attribute.CheckTargets): Now we translate explicit attribute
17893         target to Target here.
17894
17895 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
17896
17897         * ecore.cs (MethodGroupExpr): new IsBase property.
17898
17899         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
17900
17901         * delegate.cs (DelegateCreation): store a MethodGroupExpr
17902         rather than an instance expr.
17903
17904         (DelegateCreation.Emit): Use the method group rather than
17905         the instance expression. Also, if you have base.Foo as the
17906         method for a delegate, make sure to emit ldftn, not ldftnvirt.
17907
17908         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
17909
17910         (NewDelegate.DoResolve): Only check for the existance of Invoke
17911         if the method is going to be needed. Use MethodGroupExpr.
17912
17913         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
17914
17915         * expression.cs: For pointer arith., make sure to use
17916         the size of the type, not the size of the pointer to
17917         the type.
17918
17919 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17920
17921         Fix for #60722
17922         * class.cs (Class): Added error CS0502 test.
17923
17924 2004-08-03  John Luke  <jluke@cfl.rr.com>
17925             Raja R Harinath  <rharinath@novell.com>
17926
17927         Fix for #60997.
17928         * attribute.cs (Attribute.complained_before): New flag.
17929         (Attribute.ResolveType, Attribute.Resolve),
17930         (Attribute.DefinePInvokeMethod): Set it.
17931         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
17932         
17933 2004-08-03  Martin Baulig  <martin@ximian.com>
17934
17935         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
17936         use a user-defined operator; we still need to do numeric
17937         promotions in case one argument is a builtin type and the other
17938         one has an implicit conversion to that type.  Fixes #62322.
17939
17940 2004-08-02  Martin Baulig  <martin@ximian.com>
17941
17942         * statement.cs (LocalInfo.Flags): Added `IsThis'.
17943         (LocalInfo.IsThis): New public property.
17944         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
17945
17946 2004-08-01  Martin Baulig  <martin@ximian.com>
17947
17948         * class.cs (TypeContainer.GetClassBases): Don't set the default
17949         here since we may get called from GetPartialBases().
17950         (TypeContainer.DefineType): If GetClassBases() didn't return a
17951         parent, use the default one.
17952
17953 2004-07-30  Duncan Mak  <duncan@ximian.com>
17954
17955         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
17956
17957 2004-07-30  Martin Baulig  <martin@ximian.com>
17958
17959         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
17960
17961         * class.cs (SourceMethod): New public class, derive from the
17962         symbol writer's ISourceMethod.
17963         (Method): Use the new symbol writer API.
17964
17965         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
17966         as argument and use the new symbol writer.
17967
17968         * location.cs
17969         (SourceFile): Implement the symbol writer's ISourceFile.
17970         (Location.SymbolDocument): Removed.
17971         (Location.SourceFile): New public property.
17972
17973         * symbolwriter.cs: Use the new symbol writer API.
17974
17975 2004-07-30  Raja R Harinath  <rharinath@novell.com>
17976
17977         * Makefile (install-local): Remove.  Functionality moved to
17978         executable.make.
17979
17980 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17981
17982         * Makefile: Install mcs.exe.config file together with mcs.exe.
17983         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
17984         correct runtime version.
17985         
17986 2004-07-25  Martin Baulig  <martin@ximian.com>
17987
17988         * class.cs
17989         (TypeContainer.RegisterOrder): Removed, this was unused.
17990         (TypeContainer, interface_order): Removed.
17991         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
17992         TypeContainer as argument since we can also be called with a
17993         `PartialContainer' for a partial class/struct/interface.
17994         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
17995         of checking whether we're an `Interface' - we could be a
17996         `PartialContainer'.
17997         (PartialContainer.Register): Override; call
17998         AddClass()/AddStruct()/AddInterface() on our parent.
17999
18000         * cs-parser.jay (interface_member_declaration): Add things to the
18001         `current_container', not the `current_class'.
18002
18003         * rootcontext.cs (RegisterOrder): The overloaded version which
18004         takes an `Interface' was unused, removed.
18005
18006         * typemanager.cs (TypeManager.LookupInterface): Return a
18007         `TypeContainer', not an `Interface'.
18008         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
18009         contain a `PartialContainer' for an interface, so check it's
18010         `Kind' to figure out what it is.
18011
18012 2004-07-25  Martin Baulig  <martin@ximian.com>
18013
18014         * class.cs (Class.DefaultTypeAttributes): New public constant.
18015         (Struct.DefaultTypeAttributes): Likewise.
18016         (Interface.DefaultTypeAttributes): Likewise.
18017         (PartialContainer.TypeAttr): Override this and add the
18018         DefaultTypeAttributes.
18019
18020 2004-07-25  Martin Baulig  <martin@ximian.com>
18021
18022         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
18023         we can just use the `Parent' field instead.
18024
18025 2004-07-25  Martin Baulig  <martin@ximian.com>
18026
18027         * class.cs (TypeContainer.Emit): Renamed to EmitType().
18028
18029 2004-07-25  Martin Baulig  <martin@ximian.com>
18030
18031         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
18032         our parts before defining any methods.
18033         (TypeContainer.VerifyImplements): Make this virtual.
18034         (ClassPart.VerifyImplements): Override and call VerifyImplements()
18035         on our PartialContainer.
18036
18037 2004-07-25  Martin Baulig  <martin@ximian.com>
18038
18039         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
18040
18041         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
18042         argument, we can just use the `Parent' field instead.
18043
18044         * class.cs
18045         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
18046         (MemberBase.DoDefine): Likewise.
18047
18048 2004-07-24  Martin Baulig  <martin@ximian.com>
18049
18050         * decl.cs (MemberCore.Parent): New public field.
18051         (DeclSpace.Parent): Moved to MemberCore.
18052
18053         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
18054         (MemberBase.ctor): Added TypeContainer argument, pass it to our
18055         parent's .ctor.
18056         (FieldBase, Field, Operator): Likewise.
18057         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
18058         (EventField, Event): Likewise.
18059
18060 2004-07-23  Martin Baulig  <martin@ximian.com>
18061
18062         * class.cs (PartialContainer): New public class.
18063         (ClassPart): New public class.
18064         (TypeContainer): Added support for partial classes.
18065         (TypeContainer.GetClassBases): Splitted some of the functionality
18066         out into GetNormalBases() and GetPartialBases().
18067
18068         * cs-tokenizer.cs (Token.PARTIAL): New token.
18069         (Tokenizer.consume_identifier): Added some hacks to recognize
18070         `partial', but only if it's immediately followed by `class',
18071         `struct' or `interface'.
18072
18073         * cs-parser.jay: Added support for partial clases.
18074
18075 2004-07-23  Martin Baulig  <martin@ximian.com>
18076
18077         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
18078         a `DeclSpace' and also made it readonly.
18079         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
18080         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
18081         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
18082
18083         * cs-parser.jay: Pass the `current_class', not the
18084         `current_container' (at the moment, this is still the same thing)
18085         to a new Method, Property, Event, Indexer or Constructor.
18086
18087 2004-07-23  Martin Baulig  <martin@ximian.com>
18088
18089         * cs-parser.jay (CSharpParser): Added a new `current_class' field
18090         and removed the `current_interface' one.
18091         (struct_declaration, class_declaration, interface_declaration):
18092         Set `current_class' to the newly created class/struct/interface;
18093         set their `Bases' and call Register() before parsing their body.
18094
18095 2004-07-23  Martin Baulig  <martin@ximian.com>
18096
18097         * class.cs (Kind): New public enum.
18098         (TypeContainer): Made this class abstract.
18099         (TypeContainer.Kind): New public readonly field.
18100         (TypeContainer.CheckDef): New public method; moved here from
18101         cs-parser.jay.
18102         (TypeContainer.Register): New public abstract method.
18103         (TypeContainer.GetPendingImplementations): New public abstract
18104         method.
18105         (TypeContainer.GetClassBases): Removed the `is_class' and
18106         `is_iface' parameters.
18107         (TypeContainer.DefineNestedTypes): Formerly known as
18108         DoDefineType().
18109         (ClassOrStruct): Made this class abstract.
18110
18111         * tree.cs (RootTypes): New public type. 
18112
18113 2004-07-20  Martin Baulig  <martin@ximian.com>
18114
18115         * tree.cs (Tree.RecordNamespace): Removed.
18116         (Tree.Namespaces): Removed.
18117
18118         * rootcontext.cs (RootContext.IsNamespace): Removed.
18119
18120         * cs-parser.jay (namespace_declaration): Just create a new
18121         NamespaceEntry here.
18122
18123 2004-07-20  Martin Baulig  <martin@ximian.com>
18124
18125         * statement.cs (ExceptionStatement): New abstract class.  This is
18126         now used as a base class for everyone who's using `finally'.
18127         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
18128         our local variables before using them.
18129
18130         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
18131         virtual method.  This is used by Yield.Resolve() to "steal" an
18132         outer block's `finally' clauses.
18133         (FlowBranchingException): The .ctor now takes an ExceptionStatement
18134         argument.
18135
18136         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
18137         version which takes an ExceptionStatement.  This version must be
18138         used to create exception branchings.
18139
18140         * iterator.cs
18141         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
18142         (Iterator.EmitMoveNext): Added exception support; protect the
18143         block with a `fault' clause, properly handle 'finally' clauses.
18144         (Iterator.EmitDispose): Run all the `finally' clauses here.
18145
18146 2004-07-20  Martin Baulig  <martin@ximian.com>
18147
18148         * iterator.cs: This is the first of a set of changes in the
18149         iterator code.  Match the spec more closely: if we're an
18150         IEnumerable, then GetEnumerator() must be called.  The first time
18151         GetEnumerator() is called, it returns the current instance; all
18152         subsequent invocations (if any) must create a copy.
18153
18154 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
18155
18156         * expression.cs: Resolve the constant expression before returning
18157         it. 
18158
18159 2004-07-19  Martin Baulig  <martin@ximian.com>
18160
18161         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
18162         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
18163         the return type of the new EmitContext.
18164
18165 2004-07-18  Martin Baulig  <martin@ximian.com>
18166
18167         * class.cs (Property.Define): Fix iterators.
18168
18169         * iterators.cs (Iterator.Define): Moved the
18170         `container.AddInterator (this)' call here from the .ctor; only do
18171         it if we resolved successfully.
18172
18173 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
18174
18175         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
18176         `true' for preprocessing directives that we parse.  The return
18177         value indicates whether we should return to regular tokenizing or
18178         not, not whether it was parsed successfully.
18179
18180         In the past if we were in: #if false ... #line #endif, we would
18181         resume parsing after `#line'.  See bug 61604.
18182
18183         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
18184         building: IsEnumType should return true only for enums, not for
18185         enums or System.Enum itself.  This fixes #61593.
18186
18187         Likely what happened is that corlib was wrong: mcs depended on
18188         this bug in some places.  The bug got fixed, we had to add the
18189         hack, which caused bug 61593.
18190
18191         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
18192         that was a workaround for the older conditions.
18193
18194 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
18195
18196         * assign.cs: IAssignMethod has a new interface, as documented
18197         inline. All assignment code now uses this new api.
18198
18199         * ecore.cs, expression.cs: All classes which implement
18200         IAssignMethod now use the new interface.
18201
18202         * expression.cs (Invocation): add a hack to EmitCall so that
18203         IndexerAccess can be the target of a compound assignment without
18204         evaluating its arguments twice.
18205
18206         * statement.cs: Handle changes in Invocation api.
18207
18208 2004-07-16  Martin Baulig  <martin@ximian.com>
18209
18210         * iterators.cs: Rewrote this.  We're now using one single Proxy
18211         class for both the IEnumerable and the IEnumerator interface and
18212         `Iterator' derives from Class so we can use the high-level API.
18213
18214         * class.cs (TypeContainer.AddIterator): New method.
18215         (TypeContainer.DoDefineType): New protected virtual method, which
18216         is called from DefineType().
18217         (TypeContainer.DoDefineMembers): Call DefineType() and
18218         DefineMembers() on all our iterators.
18219         (TypeContainer.Emit): Call Emit() on all our iterators.
18220         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18221
18222         * codegen.cs (EmitContext.CurrentIterator): New public field.
18223
18224 2004-07-15  Martin Baulig  <martin@ximian.com>
18225
18226         * typemanager.cs
18227         (TypeManager.not_supported_exception_type): New type.   
18228
18229 2004-07-14  Martin Baulig  <martin@ximian.com>
18230
18231         * iterators.cs: Use real error numbers.
18232
18233 2004-07-14  Martin Baulig  <martin@ximian.com>
18234
18235         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18236         requires this to be a System.Collection.IEnumerable and not a
18237         class implementing that interface.
18238         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18239
18240 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18241
18242         * class.cs: Fixed previous fix, it broke some error tests.
18243
18244 2004-07-12  Martin Baulig  <martin@ximian.com>
18245
18246         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18247         Fixes #61293.
18248
18249 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18250
18251         * assign.cs (LocalTemporary): Add new argument: is_address,If
18252         `is_address' is true, then the value that we store is the address
18253         to the real value, and not the value itself.
18254         
18255         * ecore.cs (PropertyExpr): use the new local temporary
18256         stuff to allow us to handle X.Y += z (where X is a struct)
18257
18258 2004-07-08  Martin Baulig  <martin@ximian.com>
18259
18260         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18261         not always return, just like we're doing in Using.Resolve().
18262
18263 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18264
18265         * cs-parser.jay (fixed_statement): flag this as Pinned.
18266
18267 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18268
18269         * typemanager.cs (TypeManager): Removed MakePinned method, this
18270         mechanism is replaced with the .NET 2.x compatible mechanism of
18271         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18272
18273         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18274         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18275         `IsFixed' property which has a different meaning.
18276
18277 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18278
18279         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18280         visible from inside a nested class, not just the names of the
18281         immediately enclosing class.
18282         Fix for bug #60730.
18283
18284 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18285
18286         * expression.cs (BetterConversion): Remove buggy special-case
18287         handling of "implicit constant expression conversions".  At this
18288         point, we already know that the conversion is possible -- we're
18289         only checking to see which is better.
18290
18291 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18292
18293         * cs-parser.jay: Added error CS0210 test.
18294
18295 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18296
18297         * cs-parser.jay: Added error CS0134 test.
18298
18299 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18300
18301         Fix bug #52507
18302         * cs-parser.jay: Added error CS0145 test.
18303
18304 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18305
18306         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18307
18308 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18309         
18310         * expression.cs (StackAlloc.Resolve): The argument may not
18311         be a constant; deal with this case.
18312         
18313 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18314
18315         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18316         GetIndexerAttributeValue.
18317         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18318
18319         * class.cs (Indexer.Define): Added error tests for CS0415,
18320         CS0609.
18321
18322 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18323
18324         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18325         property code.
18326
18327 2004-06-23  Martin Baulig  <martin@ximian.com>
18328
18329         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18330         neither return nor throw, reset the barrier as well.  Fixes #60457.
18331
18332 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18333
18334         * class.cs : EventAttributes is now set to None by default.
18335           This fixes bug #60459.
18336
18337 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18338
18339         Fix bug #60219
18340         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18341         Don't throw exception but return null (it's sufficient now).
18342
18343 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18344
18345         * typemanager.cs (GetArgumentTypes): Faster implementation.
18346
18347 2004-06-18  Martin Baulig  <martin@ximian.com>
18348
18349         * attribute.cs (Attribute.Resolve): Check whether we're an
18350         EmptyCast which a Constant child.  Fixes #60333.
18351
18352 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18353
18354         * statement.cs (EmitCollectionForeach): Account for the fact that
18355         not all valuetypes are in areas which we can take the address of.
18356         For these variables, we store to a temporary variable. Also, make
18357         sure that we dont emit a `callvirt' on a valuetype method.
18358
18359 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18360
18361         * expression.cs (StackAlloc.DoReSolve): Added test for
18362         negative parameter (CS0247).
18363
18364 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18365
18366         Fix bug #59792
18367         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18368
18369 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18370
18371         Fix bug #59781
18372         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18373         ulong.
18374
18375 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18376
18377         Fix bug #58254 & cs1555.cs, cs1556.cs
18378         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18379
18380 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18381
18382         * cs-parser.jay: Added error CS1669 test for indexers.
18383
18384 2004-06-11  Martin Baulig  <martin@ximian.com>
18385
18386         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18387         call this twice: for params and varargs methods.
18388
18389 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18390
18391         * class.cs:
18392         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18393
18394 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18395
18396         * attribute.cs (Attribute.GetValidTargets): Made public.
18397
18398         * class.cs: 
18399         (AbstractPropertyEventMethod): New class for better code sharing.
18400         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18401         CS1667 report.
18402         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18403
18404 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18405
18406         Fix bug #59477.
18407         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18408         that the call to Resolve is part of a MemberAccess.
18409         (Expression.Resolve): Use it for SimpleName resolution.
18410         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18411         Add 'intermediate' boolean argument.
18412         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18413         error message when the SimpleName can be resolved ambiguously
18414         between an expression and a type.
18415         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18416         public.
18417         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18418         call on the left-side.
18419
18420 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18421
18422         * class.cs:
18423         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18424
18425 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18426
18427         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18428
18429 2004-06-11  Martin Baulig  <martin@ximian.com>
18430
18431         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18432         varargs methods if applicable.
18433
18434 2004-06-11  Martin Baulig  <martin@ximian.com>
18435
18436         * expression.cs (Invocation.EmitCall): Don't use
18437         `method.CallingConvention == CallingConventions.VarArgs' since the
18438         method could also have `CallingConventions.HasThis'.
18439
18440 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18441
18442         * class.cs (Event.GetSignatureForError): Implemented.
18443         Fixed crash in error test cs3010.cs
18444
18445 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18446
18447         * cs-tokenizer.cs: Change the way we track __arglist to be
18448         consistent with the other keywords.
18449
18450 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18451
18452         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18453         tomorrow.
18454
18455 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18456
18457         * codegen.cs: Check that all referenced assemblies have a strongname
18458         before strongnaming the compiled assembly. If not report error CS1577.
18459         Fix bug #56563. Patch by Jackson Harper.
18460         * typemanager.cs: Added a method to return all referenced assemblies.
18461         Fix bug #56563. Patch by Jackson Harper.
18462
18463 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18464
18465         * class.cs:
18466         (Method.ApplyAttributeBuilder): Moved and added conditional
18467         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18468
18469         * delegate.cs:
18470         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18471
18472 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18473
18474         Fixed #59640
18475         * class.cs: (EventField.attribute_targets): Changed default target.
18476
18477 2004-06-08  Martin Baulig  <martin@ximian.com>
18478
18479         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18480
18481 2004-06-08  Martin Baulig  <martin@ximian.com>
18482
18483         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18484
18485 2004-06-07  Martin Baulig  <martin@ximian.com>
18486
18487         Added support for varargs methods.
18488
18489         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18490         keyword.
18491
18492         * cs-parser.jay: Added support for `__arglist'.
18493
18494         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18495
18496         * expression.cs (Argument.AType): Added `ArgList'.
18497         (Invocation): Added support for varargs methods.
18498         (ArglistAccess): New public class.
18499         (Arglist): New public class.
18500
18501         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18502
18503         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18504         a method's top-level block if the method has varargs.
18505
18506         * support.cs (ReflectionParameters, InternalParameters): Added
18507         support for varargs methods.    
18508
18509 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18510
18511         * class.cs: Provide location in indexer error report.
18512
18513         * driver.cs: Use standard names.
18514
18515         * namespace.cs: Catch the use of using after a namespace has been
18516         declared also on using aliases.
18517
18518 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18519
18520         Bug #50820.
18521         * typemanager.cs (closure_private_ok, closure_invocation_type)
18522         (closure_qualifier_type, closure_invocation_assembly)
18523         (FilterWithClosure): Move to ...
18524         (Closure): New internal nested class.
18525         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18526         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18527         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18528         (MemberLookup, MemberLookupFailed): Use it.
18529         * expression.cs (New.DoResolve): Treat the lookup for the
18530         constructor as being qualified by the 'new'ed type.
18531         (Indexers.GetIndexersForTypeOrInterface): Update.
18532
18533 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18534
18535         * attribute.cs
18536         (GetConditionalAttributeValue): New method. Returns
18537         condition of ConditionalAttribute.
18538         (SearchMulti): New method.  Returns all attributes of type 't'.
18539         Use it when attribute is AllowMultiple = true.
18540         (IsConditionalMethodExcluded): New method.
18541
18542         * class.cs
18543         (Method.IsExcluded): Implemented. Returns true if method has conditional
18544         attribute and the conditions is not defined (method is excluded).
18545         (IMethodData): Extended interface for ConditionalAttribute support.
18546         (PropertyMethod.IsExcluded): Implemented.
18547
18548         * decl.cs
18549         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18550
18551         * expression.cs
18552         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18553         on the method.
18554
18555 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18556
18557         * expression.cs (ArrayCreationExpression): Make this just an
18558         `expression'. It can't be a statement, so the code here was
18559         dead.
18560
18561 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18562
18563         Fixed #59072
18564         * typemanager.cs (GetFullNameSignature): New method for
18565         MethodBase types.
18566
18567 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18568
18569         Fixed #56452
18570         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18571         Use this method when MethodBuilder is null.
18572         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18573         Added test for error CS0626 (MONO reports error for this situation).
18574         (IMethodData.GetSignatureForError): Extended interface.
18575
18576 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18577
18578         * attribute.cs
18579         (AttributeTester.GetObsoleteAttribute): Returns instance of
18580         ObsoleteAttribute when type is obsolete.
18581
18582         * class.cs
18583         (TypeContainer.VerifyObsoleteAttribute): Override.
18584         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18585         (MethodCode.VerifyObsoleteAttribute): Override.
18586         (MemberBase.VerifyObsoleteAttribute): Override.
18587
18588         * decl.cs
18589         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18590         and report proper error.
18591
18592         *delegate.cs
18593         Delegate.VerifyObsoleteAttribute): Override.
18594
18595         * ecore.cs
18596         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18597         and report proper error.
18598         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18599
18600         * enum.cs
18601         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18602         and enum member.
18603
18604         * expression.cs
18605         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18606         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18607         Added test for ObsoleteAttribute.
18608
18609         * statement.cs
18610         (Catch): Derived from Statement.
18611
18612 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18613  
18614         Fixed bug #59071 & cs0160.cs
18615  
18616         * statement.cs (Try.Resolve): Check here whether order of catch
18617         clauses matches their dependencies.
18618
18619 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18620
18621         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18622         caused a regression: #59343.  Referencing nested classes from an
18623         assembly stopped working.
18624
18625 2004-05-31  Martin Baulig  <martin@ximian.com>
18626
18627         MCS is now frozen for beta 2.
18628
18629 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18630
18631         * convert.cs: add a trivial cache for overload operator resolution.
18632
18633 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18634
18635         * decl.cs: If possible, use lookuptypedirect here. We can only do
18636         this if there is no `.' after the namespace. Avoids using
18637         LookupType, which does lots of slow processing.
18638         (FindNestedType) New method, does what it says :-).
18639         * namespace.cs: use LookupTypeDirect.
18640         * rootcontext.cs: use membercache, if possible.
18641         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18642
18643 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18644
18645         * expression.cs:
18646         According to the spec, 
18647
18648         In a member access of the form E.I, if E is a single identifier,
18649         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18650         field, property, localvariable, or parameter with the same type as
18651         the meaning of E as a type-name (§3.8), then both possible
18652         meanings of E are permitted.
18653
18654         We did not check that E as a simple-name had the same type as E as
18655         a type name.
18656
18657         This trivial check gives us 5-7% on bootstrap time.
18658
18659 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18660
18661         * expression.cs (Invocation.OverloadResolve): Avoid the
18662         use of hashtables and boxing here by allocating on demand.
18663
18664 2004-05-30  Martin Baulig  <martin@ximian.com>
18665
18666         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18667         we're doing a silent lookup.  Don't try to lookup nested types in
18668         TypeManager.object_type (thanks to Ben Maurer).
18669
18670 2004-05-30  Martin Baulig  <martin@ximian.com>
18671
18672         Committing a patch from Ben Maurer.
18673
18674         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18675
18676 2004-05-29  Martin Baulig  <martin@ximian.com>
18677
18678         * class.cs (IMethodData.ShouldIgnore): New method.
18679
18680         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18681         `Location' argument, we don't need it anywhere.  Use
18682         `IMethodData.ShouldIgnore ()' instead of
18683         `MethodData.GetMethodFlags ()'.
18684         (TypeManager.AddMethod): Removed.
18685         (TypeManager.AddMethod2): Renamed to AddMethod.
18686
18687 2004-05-29  Martin Baulig  <martin@ximian.com>
18688
18689         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18690
18691         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18692         converting from a class type S to an interface type and we already
18693         have an object on the stack, don't box it again.  Fixes #52578.
18694
18695 2004-05-29  Martin Baulig  <martin@ximian.com>
18696
18697         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18698         Added support for `params' parameters.  Fixes #59267.
18699
18700 2004-05-29  Martin Baulig  <martin@ximian.com>
18701
18702         * literal.cs (NullPointer): Provide a private .ctor which sets
18703         `type' to TypeManager.object_type.  Fixes #59048.
18704
18705 2004-05-29  Martin Baulig  <martin@ximian.com>
18706
18707         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18708         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18709
18710         * ecore.cs (EventExpr.instance_expr): Make the field private.
18711
18712 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18713
18714         Fixed bug #50080 & cs0214-2.cs
18715         * expression.cs (Cast.DoResolve): Check unsafe context here.
18716         
18717         * statement.cs (Resolve.DoResolve): Likewise.
18718
18719 2004-05-26  Martin Baulig  <martin@ximian.com>
18720
18721         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18722
18723         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18724         (RootContext.LookupType): Pass down the `silent' flag.
18725
18726 2004-05-25  Martin Baulig  <martin@ximian.com>
18727
18728         * expression.cs
18729         (MethodGroupExpr.IdenticalTypeName): New public property.
18730         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18731         expression actually refers to a type.
18732
18733 2004-05-25  Martin Baulig  <martin@ximian.com>
18734
18735         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18736         for #56176 and made it actually work.
18737
18738 2004-05-25  Martin Baulig  <martin@ximian.com>
18739
18740         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18741         (FieldExpr, PropertyExpr): Override and implement
18742         CacheTemporaries.  Fixes #52279.
18743
18744 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18745
18746         * location.cs: In the new compiler listing a file twice is a
18747         warning, not an error.
18748
18749 2004-05-24  Martin Baulig  <martin@ximian.com>
18750
18751         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18752         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18753
18754 2004-05-24  Martin Baulig  <martin@ximian.com>
18755
18756         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18757         walking the `using' list.  Fixes #53921.
18758
18759 2004-05-24  Martin Baulig  <martin@ximian.com>
18760
18761         * const.cs (Const.LookupConstantValue): Added support for
18762         EmptyCast's; fixes #55251.
18763
18764 2004-05-24  Martin Baulig  <martin@ximian.com>
18765
18766         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18767         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18768         which does the CS0135 check.  The reason is that we first need to
18769         check whether the variable actually exists.
18770
18771 2004-05-24  Martin Baulig  <martin@ximian.com>
18772
18773         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18774         than RootContext.LookupType() to find the explicit interface
18775         type.  Fixes #58584.
18776
18777 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18778
18779         * Makefile: Simplify.  Use executable.make.
18780         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18781
18782 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18783
18784         * decl.cs:
18785         * enum.cs:
18786         Use the invariant culture when doing String.Compare for CLS case
18787         sensitivity.
18788         
18789 2004-05-23  Martin Baulig  <martin@ximian.com>
18790
18791         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18792         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18793
18794         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18795         
18796 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18797
18798         * class.cs (MemberBase.Define): Reuse MemberType member for 
18799         resolved type. Other methods can use it too.
18800
18801 2004-05-23  Martin Baulig  <martin@ximian.com>
18802
18803         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18804         the variable also exists in the current block (otherwise, we need
18805         to report a CS0103).  Fixes #58670.
18806
18807 2004-05-23  Martin Baulig  <martin@ximian.com>
18808
18809         * flowanalysis.cs (Reachability.Reachable): Compute this
18810         on-the-fly rather than storing it as a field.
18811
18812 2004-05-23  Martin Baulig  <martin@ximian.com>
18813
18814         * flowanalysis.cs (Reachability.And): Manually compute the
18815         resulting `barrier' from the reachability.      
18816        
18817 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18818
18819         Fix bug #57835
18820         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
18821         instance of ObsoleteAttribute when symbol is obsolete.
18822
18823         * class.cs
18824         (IMethodData): Extended interface for ObsoleteAttribute support.
18825
18826 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18827
18828         * attribute.cs: Fix bug #55970
18829
18830 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18831
18832         Fix bug #52705
18833         * attribute.cs
18834         (GetObsoleteAttribute): New method. Creates the instance of
18835         ObsoleteAttribute.
18836         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
18837         ObsoleteAttribute when member is obsolete.
18838         (AttributeTester.Report_ObsoleteMessage): Common method for
18839         Obsolete error/warning reporting.
18840
18841         * class.cs
18842         (TypeContainer.base_classs_type): New member for storing parent type.
18843
18844         * decl.cs
18845         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
18846         for this MemberCore.
18847
18848 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18849
18850         * attribute.cs, const.cs: Fix bug #58590
18851
18852 2004-05-21  Martin Baulig  <martin@ximian.com>
18853
18854         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
18855         out parameters if the end of the method is unreachable.  Fixes
18856         #58098. 
18857
18858 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18859
18860         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
18861         Hari was right, why extra method.
18862
18863 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18864
18865         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
18866
18867 2004-05-20  Martin Baulig  <martin@ximian.com>
18868
18869         Merged this back from gmcs to keep the differences to a minumum.
18870
18871         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
18872         instead of a Declspace.
18873         (Attribute.ResolveType): Likewise.
18874         (Attributes.Search): Likewise.
18875         (Attributes.Contains): Likewise.
18876         (Attributes.GetClsCompliantAttribute): Likewise.
18877
18878         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
18879         argument.
18880         (MethodData.ApplyAttributes): Take an EmitContext instead of a
18881         DeclSpace.
18882
18883 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
18884
18885         Fix bug #58688 (MCS does not report error when the same attribute
18886         is assigned twice)
18887
18888         * attribute.cs (Attribute.Emit): Distinction between null and default.
18889
18890 2004-05-19  Raja R Harinath  <rharinath@novell.com>
18891
18892         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
18893         of a top-level attribute without an attribute target.
18894         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
18895         Make non-static.
18896         (Attribute.Conditional_GetConditionName), 
18897         (Attribute.Obsolete_GetObsoleteMessage): Update.
18898         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
18899         part of ScanForIndexerName.
18900         (Attribute.CanIgnoreInvalidAttribute): New function.
18901         (Attribute.ScanForIndexerName): Move to ...
18902         (Attributes.ScanForIndexerName): ... here.
18903         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
18904         (Attributes.Search): New internal variant that can choose not to
18905         complain if types aren't resolved.  The original signature now
18906         complains.
18907         (Attributes.GetClsCompliantAttribute): Use internal variant, with
18908         complaints suppressed.
18909         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
18910         only if it not useful.
18911         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
18912         top-level for attributes that are shared between the assembly
18913         and a top-level class.
18914         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
18915         * class.cs: Update to reflect changes.
18916         (DefineIndexers): Fuse loops.
18917         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
18918         a couple more variants of attribute names.
18919
18920 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
18921
18922         Fix bug #52585 (Implemented explicit attribute declaration)
18923
18924         * attribute.cs:
18925         (Attributable.ValidAttributeTargets): New abstract method. It gets
18926         list of valid attribute targets for explicit target declaration.
18927         (Attribute.Target): It holds target itself.
18928         (AttributeSection): Removed.
18929         (Attribute.CheckTargets): New method. It checks whether attribute
18930         target is valid for the current element.
18931
18932         * class.cs:
18933         (EventProperty): New class. For events that are declared like
18934         property (with add and remove accessors).
18935         (EventField): New class. For events that are declared like field.
18936         class.cs
18937
18938         * cs-parser.jay: Implemented explicit attribute target declaration.
18939
18940         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
18941         Override ValidAttributeTargets.
18942
18943         * parameter.cs:
18944         (ReturnParameter): Class for applying custom attributes on 
18945         the return type.
18946         (ParameterAtribute): New class. Class for applying custom
18947         attributes on the parameter type.
18948
18949 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
18950
18951         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
18952         definitions. 
18953
18954         (Method): Allow UNSAFE here.
18955
18956         * modifiers.cs: Support unsafe reporting.
18957
18958 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
18959
18960         * decl.cs: Fix bug #58478.
18961
18962 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18963
18964         * statement.cs: When checking for unreachable code on an EmptyStatement,
18965         set the location. Fixes bug #58488.
18966
18967 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
18968
18969         * driver.cs: Add -pkg handling.
18970
18971         From Gonzalo: UseShelLExecute=false
18972
18973 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
18974
18975         * attribute.cs:
18976         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
18977         for attribute.
18978         (Attribute.IsClsCompliaceRequired): Moved to base for better
18979         accesibility.
18980         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
18981         when attribute is AttributeUsageAttribute.
18982         (Attribute.GetValidTargets): Simplified.
18983         (Attribute.GetAttributeUsage): New method returns AttributeUsage
18984         attribute for this type.
18985         (Attribute.ApplyAttributes): Method renamed to Emit and make
18986         non-static.
18987         (GlobalAttributeSection): New class for special handling of global
18988         attributes (assembly, module).
18989         (AttributeSection.Emit): New method.
18990
18991         * class.cs: Implemented Attributable abstract methods.
18992         (MethodCore.LabelParameters): Moved to Parameter class.
18993         (Accessor): Is back simple class.
18994         (PropertyMethod): Implemented Attributable abstract class.
18995         (DelegateMethod): Implemented Attributable abstract class.
18996         (Event): New constructor for disctintion between normal Event
18997         and Event with accessors.
18998
18999         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
19000
19001         * codegen.cs, const.cs, decl.cs, delegate.cs:
19002         (CommonAssemblyModulClass): Implemented Attributable abstract class
19003         and simplified.
19004
19005         * enum.cs: Implement IAttributeSupport interface.
19006         (EnumMember): New class for emum members. Implemented Attributable
19007         abstract class
19008
19009         * parameter.cs:
19010         (ParameterBase): Is abstract.
19011         (ReturnParameter): New class for easier [return:] attribute handling.
19012
19013         * typemanager.cs: Removed builder_to_attr.
19014
19015 2004-05-11  Raja R Harinath  <rharinath@novell.com>
19016
19017         Fix bug #57151.
19018         * attribute.cs (Attribute.GetPositionalValue): New function.
19019         * class.cs (TypeContainer.VerifyMembers): New function.
19020         (TypeContainer.Emit): Use it.
19021         (ClassOrStruct): New base class for Class and Struct.
19022         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
19023         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
19024         class.
19025         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
19026         then each non-static field should have a FieldOffset attribute.
19027         Otherwise, none of the fields should have a FieldOffset attribute.
19028         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
19029         and FieldOffset attributes.
19030         * typemanager.cs (TypeManager.struct_layout_attribute_type)
19031         (TypeManager.field_offset_attribute_type): New core types.
19032         (TypeManager.InitCoreTypes): Initialize them.
19033
19034 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
19035
19036         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
19037         Return correct type.
19038         From bug #58270.
19039
19040 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
19041
19042         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
19043         be implicitly converted to ulong.
19044         
19045         * expression.cs: The logic for allowing operator &, | and ^ worked
19046         was wrong, it worked before because we did not report an error in
19047         an else branch.  Fixes 57895.
19048
19049         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
19050         allow volatile fields to be reference types.
19051
19052 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
19053
19054         * driver.cs: Add support for /debug-
19055
19056 2004-05-07  Raja R Harinath  <rharinath@novell.com>
19057
19058         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
19059         Add a 'complain' parameter to silence errors.
19060         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
19061         silently overlooked type-resolutions.
19062         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
19063         to reflect changes.
19064         (Attributes.Search): New function.
19065         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
19066         (Attributes.GetAttributeFullName): Remove hack.
19067         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
19068         Update to reflect changes.
19069         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
19070         Use Attributes.Search instead of nested loops.
19071
19072 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
19073
19074         * decl.cs:
19075         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
19076         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
19077         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
19078
19079         * report.cs: (Report.Warning): Renamed to Warning_T because of
19080         parameter collision.
19081
19082 2004-05-05  Raja R Harinath  <rharinath@novell.com>
19083
19084         * expression.cs (MemberAccess.ResolveMemberAccess):
19085         Exit with non-zero status after Report.Error.
19086         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
19087         Likewise.
19088         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
19089
19090 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19091
19092         * support.cs: Don't hang when the file is empty.
19093
19094 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
19095
19096         * support.cs: In SeekableStreamReader, compute the preamble size of the
19097           underlying stream. Position changes should take into account that initial
19098           count of bytes.
19099
19100 2004-05-03  Todd Berman  <tberman@sevenl.net>
19101
19102         * driver.cs: remove unused GetSysVersion function.
19103
19104 2004-05-03  Todd Berman  <tberman@sevenl.net>
19105
19106         * driver.cs: Remove the hack from saturday, as well as the hack
19107         from jackson (LoadAssemblyFromGac), also adds the CWD to the
19108         link_paths to get that bit proper.
19109
19110 2004-05-01  Todd Berman  <tberman@sevenl.net>
19111
19112         * driver.cs: Try a LoadFrom before a Load, this checks the current
19113         path. This is currently a bug in mono that is be fixed, however, this
19114         provides a workaround for now. This will be removed when the bug
19115         is fixed.
19116
19117 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
19118
19119         * CryptoConvert.cs: Updated to latest version. Fix issue with 
19120         incomplete key pairs (#57941).
19121
19122 2004-05-01  Todd Berman  <tberman@sevenl.net>
19123
19124         * driver.cs: Remove '.' from path_chars, now System.* loads properly
19125         from the GAC
19126
19127 2004-04-30  Jackson Harper  <jackson@ximian.com>
19128
19129         * codegen.cs: Open keys readonly.
19130         
19131 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19132
19133         * typemanager.cs: don't report cyclic struct layout when a struct
19134         contains 2 or more fields of the same type. Failed for Pango.AttrShape
19135         which has 2 Pango.Rectangle fields.
19136
19137 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19138
19139         * expression.cs: Handle IntPtr comparisons with IL code
19140         rather than a method call.
19141
19142 2004-04-29  Martin Baulig  <martin@ximian.com>
19143
19144         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
19145         the list of PropertyInfo's in class hierarchy and find the
19146         accessor.  Fixes #56013.
19147
19148 2004-04-29  Martin Baulig  <martin@ximian.com>
19149
19150         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
19151
19152 2004-04-29  Martin Baulig  <martin@ximian.com>
19153
19154         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19155
19156         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
19157
19158 2004-04-29  Martin Baulig  <martin@ximian.com>
19159
19160         * class.cs (ConstructorInitializer.Resolve): Check whether the
19161         parent .ctor is accessible.  Fixes #52146.
19162
19163 2004-04-29  Martin Baulig  <martin@ximian.com>
19164
19165         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19166
19167         * statement.cs (Using.EmitLocalVariableDecls): Use
19168         TypeManager.idisposable_type, not typeof (IDisposable).
19169         (Foreach.EmitCollectionForeach): Added support for valuetypes.
19170
19171 2004-04-29  Martin Baulig  <martin@ximian.com>
19172
19173         * class.cs (Event.Define): Don't emit the field and don't set
19174         RTSpecialName and SpecialName for events on interfaces.  Fixes
19175         #57703. 
19176
19177 2004-04-29  Raja R Harinath  <rharinath@novell.com>
19178
19179         Refactor Attribute.ApplyAttributes.
19180         * attribute.cs (Attributable): New base class for objects that can
19181         have Attributes applied on them.
19182         (Attribute): Make AttributeUsage fields public.
19183         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
19184         (Attribute.IsInternalCall): New property.
19185         (Attribute.UsageAttr): Convert to a public read-only property.
19186         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
19187         (Attribute.ResolveType, Attribute.Resolve)
19188         (Attribute.ScanForIndexerName): Update to reflect changes.
19189         (Attribute.CheckAttributeTarget): Re-format.
19190         (Attribute.ApplyAttributes): Refactor, to various
19191         Attributable.ApplyAttributeBuilder methods.
19192         * decl.cs (MemberCore): Make Attributable.
19193         * class.cs (Accessor): Make Attributable.
19194         (MethodData.ApplyAttributes): Use proper attribute types, not
19195         attribute names.
19196         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
19197         (TypeContainer.ApplyAttributeBuilder)
19198         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
19199         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
19200         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
19201         (Operator.ApplyAttributeBuilder): New factored-out methods.
19202         * const.cs (Const.ApplyAttributeBuilder): Likewise.
19203         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
19204         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
19205         * parameter.cs (ParameterBase): New Attributable base class
19206         that can also represent Return types.
19207         (Parameter): Update to the changes.
19208
19209 2004-04-29  Jackson Harper  <jackson@ximian.com>
19210
19211         * driver.cs: Prefer the corlib system version when looking for
19212         assemblies in the GAC. This is still a hack, but its a better hack
19213         now.
19214         
19215 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19216
19217         * decl.cs, enum.cs: Improved error 3005 reporting.
19218   
19219         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19220         (related_symbols): New private member for list of symbols
19221         related to reported error/warning.
19222         
19223         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19224
19225 2004-04-29  Martin Baulig  <martin@ximian.com>
19226
19227         * ecore.cs (Expression.Constantify): If we're an enum and
19228         TypeManager.TypeToCoreType() doesn't give us another type, use
19229         t.UnderlyingSystemType.  Fixes #56178.  
19230
19231 2004-04-29  Martin Baulig  <martin@ximian.com>
19232
19233         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19234         interfaces and for each interface, only add members directly
19235         declared in that interface.  Fixes #53255.
19236
19237 2004-04-28  Martin Baulig  <martin@ximian.com>
19238
19239         * expression.cs (ConditionalLogicalOperator): Use a temporary
19240         variable for `left' to avoid that we evaluate it more than once;
19241         bug #52588.
19242
19243 2004-04-28  Martin Baulig  <martin@ximian.com>
19244
19245         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19246         `void[]' (CS1547).
19247
19248 2004-04-28  Martin Baulig  <martin@ximian.com>
19249
19250         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19251         void (CS1547).
19252
19253         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19254         whether the type is not void (CS1547).
19255
19256 2004-04-28  Martin Baulig  <martin@ximian.com>
19257
19258         * expression.cs (Unary.DoResolveLValue): Override this and report
19259         CS0131 for anything but Operator.Indirection.
19260
19261 2004-04-28  Martin Baulig  <martin@ximian.com>
19262
19263         Committing a patch from Ben Maurer; see bug #50820.
19264
19265         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19266         check for classes.
19267
19268         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19269         classes.        
19270
19271 2004-04-28  Martin Baulig  <martin@ximian.com>
19272
19273         Committing a patch from Ben Maurer; see bug #50820.
19274
19275         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19276         check for classes.
19277
19278         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19279         classes.        
19280
19281 2004-04-28  Martin Baulig  <martin@ximian.com>
19282
19283         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19284         (Block.AddLabel): Call DoLookupLabel() to only search in the
19285         current block.
19286
19287 2004-04-28  Martin Baulig  <martin@ximian.com>
19288
19289         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19290         comparing StringConstants and NullLiterals in Equality and Inequality.
19291
19292 2004-04-28  Jackson Harper  <jackson@ximian.com>
19293
19294         * driver.cs: Attempt to load referenced assemblies from the
19295         GAC. This is the quick and dirty version of this method that
19296         doesnt take into account versions and just takes the first
19297         canidate found. Will be good enough for now as we will not have more
19298         then one version installed into the GAC until I update this method.
19299
19300 2004-04-28  Martin Baulig  <martin@ximian.com>
19301
19302         * typemanager.cs (TypeManager.CheckStructCycles): New public
19303         static method to check for cycles in the struct layout.
19304
19305         * rootcontext.cs (RootContext.PopulateTypes): Call
19306         TypeManager.CheckStructCycles() for each TypeContainer.
19307         [Note: We only need to visit each type once.]
19308
19309 2004-04-28  Martin Baulig  <martin@ximian.com>
19310
19311         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19312
19313         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19314         success and added `out object value'.  Use a `bool resolved' field
19315         to check whether we've already been called rather than
19316         `ConstantValue != null' since this breaks for NullLiterals.
19317
19318 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19319
19320         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19321         setting of this flag, since the 'set' method may be non-public.
19322
19323 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19324
19325         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19326         check on current_vector.Block.
19327
19328 2004-04-27  Martin Baulig  <martin@ximian.com>
19329
19330         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19331         a field initializer.  Fixes #56459.
19332
19333 2004-04-27  Martin Baulig  <martin@ximian.com>
19334
19335         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19336         we're not attempting to use an indexer.  Fixes #52154.
19337
19338 2004-04-27  Martin Baulig  <martin@ximian.com>
19339
19340         * statement.cs (Return): Don't create a return label if we don't
19341         need it; reverts my change from January 20th.  Thanks to Ben
19342         Maurer for this.
19343
19344 2004-04-27  Martin Baulig  <martin@ximian.com>
19345
19346         According to the spec, `goto' can only leave a nested scope, but
19347         never enter it.
19348
19349         * statement.cs (Block.LookupLabel): Only lookup in the current
19350         block, don't recurse into parent or child blocks.
19351         (Block.AddLabel): Check in parent and child blocks, report
19352         CS0140/CS0158 if we find a duplicate.
19353         (Block): Removed this indexer for label lookups.
19354         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19355         this already does the error reporting for us.
19356
19357         * flowanalysis.cs
19358         (FlowBranching.UsageVector.Block): New public variable; may be null.
19359         (FlowBranching.CreateSibling): Added `Block' argument.
19360         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19361         label for the target of a `goto' and check whether we're not
19362         leaving a `finally'.
19363
19364 2004-04-27  Martin Baulig  <martin@ximian.com>
19365
19366         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19367         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19368         just for returns).
19369
19370 2004-04-27  Martin Baulig  <martin@ximian.com>
19371
19372         * statement.cs (Block.AddLabel): Also check for implicit blocks
19373         and added a CS0158 check.
19374
19375 2004-04-27  Martin Baulig  <martin@ximian.com>
19376
19377         * flowanalysis.cs (FlowBranchingLoop): New class.
19378         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19379         UsageVector's instead of an ArrayList.
19380         (FlowBranching.Label): Likewise.
19381         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19382         (FlowBranching.AddBreakVector): New method.
19383
19384 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19385
19386         * attribute.cs: Small regression fix: only convert the type if we
19387         the type is different, fixes System.Drawing build.
19388
19389 2004-04-27  Martin Baulig  <martin@ximian.com>
19390
19391         * attribute.cs (Attribute.Resolve): If we have a constant value
19392         for a named field or property, implicity convert it to the correct
19393         type.
19394
19395 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19396
19397         * statement.cs (Block.Block): Implicit blocks share
19398         'child_variable_names' fields with parent blocks.
19399         (Block.AddChildVariableNames): Remove.
19400         (Block.AddVariable): Mark variable as "used by a child block" in
19401         every surrounding block.
19402         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19403         been used in a child block, complain about violation of "Invariant
19404         meaning in blocks" rule.
19405         * cs-parser.jay (declare_local_variables): Don't use
19406         AddChildVariableNames.
19407         (foreach_statement): Don't create an implicit block: 'foreach'
19408         introduces a scope.
19409
19410 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19411
19412         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19413         converting from 0L to ulong.  Fixes 57522.
19414
19415 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19416
19417         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19418         derived class hides via 'new' keyword field from base class (test-242.cs).
19419         TODO: Handle this in the more general way.
19420         
19421         * class.cs (CheckBase): Ditto.
19422
19423 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19424
19425         * decl.cs (caching_flags): New member for storing cached values
19426         as bit flags.
19427         (MemberCore.Flags): New enum where bit flags for caching_flags
19428         are defined.
19429         (MemberCore.cls_compliance): Moved to caching_flags.
19430         (DeclSpace.Created): Moved to caching_flags.
19431
19432         * class.cs: Use caching_flags instead of DeclSpace.Created
19433         
19434 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19435
19436         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19437         if we are only a derived class, not a nested class.
19438
19439         * typemanager.cs: Same as above, but do this at the MemberLookup
19440         level (used by field and methods, properties are handled in
19441         PropertyExpr).   Allow for the qualified access if we are a nested
19442         method. 
19443
19444 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19445
19446         * class.cs: Refactoring.
19447         (IMethodData): New inteface; Holds links to parent members
19448         to avoid member duplication (reduced memory allocation).
19449         (Method): Implemented IMethodData interface.
19450         (PropertyBase): New inner classes for get/set methods.
19451         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19452         (Event): New inner classes for add/remove methods.
19453         (Event.DelegateMethod): Implemented IMethodData interface.
19454
19455         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19456         EmitContext (related to class.cs refactoring).
19457
19458 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19459
19460         * delegate.cs (Delegate.VerifyApplicability): If the number of
19461         arguments are the same as the number of parameters, first try to
19462         verify applicability ignoring  any 'params' modifier on the last
19463         parameter.
19464         Fixes #56442.
19465
19466 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19467
19468         * class.cs (TypeContainer.AddIndexer): Use
19469         'ExplicitInterfaceName' to determine if interface name was
19470         explicitly specified.  'InterfaceType' is not initialized at this time.
19471         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19472         Indexers array is already in the required order.  Initialize
19473         'IndexerName' only if there are normal indexers.
19474         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19475         (TypeContainer.Emit): Emit DefaultMember attribute only if
19476         IndexerName is initialized.
19477         Fixes #56300.
19478
19479 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19480
19481         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19482         Fixes #57007
19483
19484 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19485
19486         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19487         attributes.
19488         Fix for #56456.
19489
19490         * attribute.cs (Attribute.Resolve): Check for duplicate named
19491         attributes.
19492         Fix for #56463.
19493
19494 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19495
19496         * iterators.cs (MarkYield): track whether we are in an exception,
19497         and generate code accordingly.  Use a temporary value to store the
19498         result for our state.
19499
19500         I had ignored a bit the interaction of try/catch with iterators
19501         since their behavior was not entirely obvious, but now it is
19502         possible to verify that our behavior is the same as MS .NET 2.0
19503
19504         Fixes 54814
19505
19506 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19507
19508         * iterators.cs: Avoid creating temporaries if there is no work to
19509         do. 
19510
19511         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19512         Enumerations, use TypeManager.EnumToUnderlying and call
19513         recursively. 
19514
19515         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19516         bug #57013
19517
19518         (This.Emit): Use EmitContext.EmitThis to emit our
19519         instance variable.
19520
19521         (This.EmitAssign): Ditto.
19522
19523         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19524         codepaths, we will move all the functionality into
19525         Mono.CSharp.This 
19526
19527         (FieldExpr.EmitAssign): Ditto.
19528
19529         This fixes several hidden bugs that I uncovered while doing a code
19530         review of this today.
19531
19532         * codegen.cs (EmitThis): reworked so the semantics are more clear
19533         and also support value types "this" instances.
19534
19535         * iterators.cs: Changed so that for iterators in value types, we
19536         do not pass the value type as a parameter.  
19537
19538         Initialization of the enumerator helpers is now done in the caller
19539         instead of passing the parameters to the constructors and having
19540         the constructor set the fields.
19541
19542         The fields have now `assembly' visibility instead of private.
19543
19544 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19545
19546         * expression.cs (Argument.Resolve): Check if fields passed as ref
19547         or out are contained in a MarshalByRefObject.
19548
19549         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19550         another compiler type.
19551
19552 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19553
19554         * class.cs (Indexer.Define): use the new name checking method.
19555         Also, return false on an error.
19556         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19557         (is_identifier_[start/part]_character): make static.
19558
19559 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19560
19561         * expression.cs (Binary.ResolveOperator): Do no append strings
19562         twice: since we can be invoked more than once (array evaluation)
19563         on the same concatenation, take care of this here.  Based on a fix
19564         from Ben (bug #56454)
19565
19566 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19567
19568         * codegen.cs: Fix another case where CS1548 must be reported (when 
19569         delay-sign isn't specified and no private is available #56564). Fix
19570         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19571         error when MCS is used on the MS runtime and we need to delay-sign 
19572         (which seems unsupported by AssemblyBuilder - see #56621).
19573
19574 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19575
19576         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19577         (TypeManager.ComputeNamespaces): Faster implementation for
19578         Microsoft runtime.
19579
19580         * compiler.csproj: Updated AssemblyName to mcs.
19581
19582 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19583
19584         * rootcontext.cs: Add new types to the boot resolution.
19585
19586         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19587         MulticastDelegate is not allowed.
19588
19589         * typemanager.cs: Add new types to lookup: System.TypedReference
19590         and ArgIterator.
19591
19592         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19593         check for TypedReference or ArgIterator, they are not allowed. 
19594
19595         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19596         makes us properly catch 1510 in some conditions (see bug 56016 for
19597         details). 
19598
19599 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19600
19601         * CryptoConvert.cs: update from corlib version
19602         with endian fixes.
19603
19604 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19605
19606         * class.cs (Indexer.Define): Check indexername declaration
19607
19608 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19609
19610         * attribute.cs (IsClsCompliant): Fixed problem with handling
19611         all three states (compliant, not-compliant, undetected).
19612
19613 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19614
19615         * attribute.cs (Attribute): Location is now public.
19616         (Resolve): Store resolved arguments (pos_values) in attribute class.
19617         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19618         (GetClsCompliantAttributeValue): New method that gets
19619         CLSCompliantAttribute value.
19620         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19621         if exists else null.
19622         (AttributeTester): New class for CLS-Compliant verification routines.
19623
19624         * class.cs (Emit): Add CLS-Compliant verification.
19625         (Method.GetSignatureForError): Implemented.
19626         (Constructor.GetSignatureForError): Implemented
19627         (Constructor.HasCompliantArgs): Returns if constructor has
19628         CLS-Compliant arguments.
19629         (Constructor.Emit): Override.
19630         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19631         is needed to test only parameters.
19632         (FieldBase.GetSignatureForError): Implemented.
19633         (TypeContainer): New member for storing base interfaces.
19634         (TypeContainer.FindMembers): Search in base interfaces too.
19635
19636         * codegen.cs (GetClsComplianceAttribute): New method that gets
19637         assembly or module CLSCompliantAttribute value.
19638         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19639         for assembly.
19640         (ModuleClass.Emit): Add error 3012 test.
19641
19642         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19643
19644         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19645         state for all decl types.
19646         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19647         if CLS-Compliant tests are required.
19648         (IsClsCompliaceRequired): New method. Analyze whether code
19649         must be CLS-Compliant.
19650         (IsExposedFromAssembly): New method. Returns true when MemberCore
19651         is exposed from assembly.
19652         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19653         value or gets cached value.
19654         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19655         is explicitly marked with CLSCompliantAttribute.
19656         (IsIdentifierClsCompliant): New abstract method. This method is
19657         used to testing error 3005.
19658         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19659         for identifier and parameters CLS-Compliant testing.
19660         (VerifyClsCompliance): New method. The main virtual method for
19661         CLS-Compliant verifications.
19662         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19663         null. I don't know why is null (too many public members !).
19664         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19665         and get value of first CLSCompliantAttribute that found.
19666
19667         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19668         (VerifyClsCompliance): Override and add extra tests.
19669
19670         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19671         clscheck- disable CLS-Compliant verification event if assembly is has
19672         CLSCompliantAttribute(true).
19673
19674         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19675         ApllyAttribute is now called in emit section as in the other cases.
19676         Possible future Emit integration.
19677         (IsIdentifierClsCompliant): New override.
19678         (VerifyClsCompliance): New override.
19679         (GetEnumeratorName): Returns full enum name.
19680
19681         * parameter.cs (GetSignatureForError): Implemented.
19682
19683         * report.cs (WarningData): New struct for Warning message information.
19684         (LocationOfPreviousError): New method.
19685         (Warning): New method. Reports warning based on the warning table.
19686         (Error_T): New method. Reports error based on the error table.
19687
19688         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19689         verifications are done here.
19690
19691         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19692
19693         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19694         CLSCompliantAttribute.
19695         (all_imported_types): New member holds all imported types from other
19696         assemblies.
19697         (LoadAllImportedTypes): New method fills static table with exported types
19698         from all referenced assemblies.
19699         (Modules): New property returns all assembly modules.
19700
19701 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19702
19703         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19704         throwing a parser error.
19705
19706         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19707         which removes the hardcoded get_/set_ prefixes for properties, as
19708         IL allows for the properties to be named something else.  
19709
19710         Bug #56013
19711
19712         * expression.cs: Do not override operand before we know if it is
19713         non-null.  Fix 56207
19714
19715 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19716
19717         * typemanager.cs: support for pinned variables.
19718
19719 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19720
19721         * decl.cs, typemanager.cs: Avoid using an arraylist
19722         as a buffer if there is only one result set.
19723
19724 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19725
19726         * expression.cs: Make sure you cant call a static method
19727         with an instance expression, bug #56174.
19728
19729 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19730
19731         * class.cs (IsDuplicateImplementation): Improve error reporting to
19732         flag 663 (method only differs in parameter modifier).
19733
19734         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19735         in preprocessor directives.
19736
19737         * location.cs (LookupFile): Allow for the empty path.
19738
19739         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19740         better approach for some of that patch, but its failing with the
19741         CharSet enumeration.  For now try/catch will do.
19742
19743         * typemanager.cs: Do not crash if a struct does not have fields.
19744         Fixes 56150.
19745
19746 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19747
19748         * expression.cs: cs0213, cant fix a fixed expression.
19749         fixes 50231.
19750
19751 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19752
19753         * cs-parser.jay: detect invalid embeded statements gracefully.
19754         bug #51113.
19755
19756 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19757
19758         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19759         As a regex:
19760         s/
19761         the invocation type may not be a subclass of the tye of the item/
19762         The type of the item must be a subclass of the invocation item.
19763         /g
19764
19765         Fixes bug #50820.
19766
19767 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19768
19769         * attribute.cs: Added methods to get a string and a bool from an
19770         attribute. Required to information from AssemblyKeyFileAttribute,
19771         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19772         * codegen.cs: Modified AssemblyName creation to include support for
19773         strongnames. Catch additional exceptions to report them as CS1548.
19774         * compiler.csproj: Updated include CryptoConvert.cs.
19775         * compiler.csproj.user: Removed file - user specific configuration.
19776         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19777         Mono.Security assembly. The original class is maintained and tested in
19778         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19779         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19780         like CSC 8.0 (C# v2) supports.
19781         * Makefile: Added CryptoConvert.cs to mcs sources.
19782         * rootcontext.cs: Added new options for strongnames.
19783
19784 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19785
19786         * driver.cs: For --expect-error, report error code `2'
19787         if the program compiled with no errors, error code `1' if
19788         it compiled with an error other than the one expected.
19789
19790 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19791
19792         * compiler.csproj: Updated for Visual Studio .NET 2003.
19793         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19794         * compiler.sln: Updated for Visual Studio .NET 2003.
19795
19796 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19797
19798         * expression.cs: Fix bug #47234. We basically need to apply the
19799         rule that we prefer the conversion of null to a reference type
19800         when faced with a conversion to 'object' (csc behaviour).
19801
19802 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19803
19804         * statement.cs: Shorter form for foreach, eliminates
19805         a local variable. r=Martin.
19806
19807 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19808
19809         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
19810         checks if we can use brtrue/brfalse to test for 0.
19811         * expression.cs: use the above in the test for using brtrue/brfalse.
19812         cleanup code a bit.
19813
19814 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19815
19816         * expression.cs: Rewrite string concat stuff. Benefits:
19817
19818         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
19819         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
19820         rather than a concat chain.
19821
19822         * typemanager.cs: Add lookups for more concat overloads.
19823
19824 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19825
19826         * expression.cs: Emit shorter il code for array init.
19827
19828         newarr
19829         dup
19830         // set 1
19831
19832         // set 2
19833
19834         newarr
19835         stloc.x
19836
19837         ldloc.x
19838         // set 1
19839
19840         ldloc.x
19841         // set 2
19842
19843 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
19844
19845         * statement.cs: Before, two switch blocks would be merged if the
19846         total size of the blocks (end_item - begin_item + 1) was less than
19847         two times the combined sizes of the blocks.
19848
19849         Now, it will only merge if after the merge at least half of the
19850         slots are filled.
19851
19852         fixes 55885.
19853
19854 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
19855
19856         * class.cs : csc build fix for GetMethods(). See bug #52503.
19857
19858 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19859
19860         * expression.cs: Make sure fp comparisons work with NaN.
19861         This fixes bug #54303. Mig approved this patch a long
19862         time ago, but we were not able to test b/c the runtime
19863         had a related bug.
19864
19865 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
19866
19867         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
19868
19869 2004-03-19  Martin Baulig  <martin@ximian.com>
19870
19871         * class.cs (MemberCore.IsDuplicateImplementation): Report the
19872         error here and not in our caller.
19873
19874 2004-03-19  Martin Baulig  <martin@ximian.com>
19875
19876         * interface.cs: Completely killed this file.
19877         (Interface): We're now a TypeContainer and live in class.cs.
19878
19879         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
19880         argument; we're now also called for interfaces.
19881         (TypeContainer.DefineMembers): Allow this method being called
19882         multiple times.
19883         (TypeContainer.GetMethods): New public method; formerly known as
19884         Interface.GetMethod().  This is used by PendingImplementation.
19885         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
19886         it's now private and non-static.
19887         (Interface): Moved this here; it's now implemented similar to
19888         Class and Struct.
19889         (Method, Property, Event, Indexer): Added `bool is_interface'
19890         argument to their .ctor's.
19891         (MemberBase.IsInterface): New public field.
19892
19893         * cs-parser.jay: Create normal Method, Property, Event, Indexer
19894         instances instead of InterfaceMethod, InterfaceProperty, etc.
19895         (opt_interface_base): Removed; we now use `opt_class_base' instead.
19896         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
19897
19898 2004-03-19  Martin Baulig  <martin@ximian.com>
19899
19900         * class.cs (MethodCore.IsDuplicateImplementation): New private
19901         method which does the CS0111 checking.
19902         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
19903         Use IsDuplicateImplementation().
19904
19905 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19906
19907         * decl.cs (FindMemberToOverride): New method to find the correct
19908         method or property to override in the base class.
19909         * class.cs
19910             - Make Method/Property use the above method to find the
19911               version in the base class.
19912             - Remove the InheritableMemberSignatureCompare as it is now
19913               dead code.
19914
19915         This patch makes large code bases much faster to compile, as it is
19916         O(n) rather than O(n^2) to do this validation.
19917
19918         Also, it fixes bug 52458 which is that nested classes are not
19919         taken into account when finding the base class member.
19920
19921         Reviewed/Approved by Martin.
19922
19923 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
19924
19925         * interface.cs: In all interface classes removed redundant
19926         member initialization.
19927
19928 2004-03-16  Martin Baulig  <martin@ximian.com>
19929
19930         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
19931
19932 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
19933
19934         * decl.cs (DefineTypeAndParents): New helper method to define a
19935         type's containers before the type itself is defined;  This is a
19936         bug exposed by the recent changes to Windows.Forms when an
19937         implemented interface was defined inside a class that had not been
19938         built yet.   
19939
19940         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
19941
19942         (Check): Loop correctly to report errors modifiers
19943         (UNSAFE was not in the loop, since it was the same as TOP).
19944
19945         * interface.cs: Every interface member now takes a ModFlags,
19946         instead of a "is_new" bool, which we set on the base MemberCore. 
19947
19948         Every place where we called "UnsafeOk" in the interface, now we
19949         call the proper member (InterfaceMethod.UnsafeOK) instead to get
19950         the unsafe settings from the member declaration instead of the
19951         container interface. 
19952
19953         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
19954
19955         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
19956         `set_indexer_name' to the pending bits (one per type).
19957
19958         We fixed a bug today that was picking the wrong method to
19959         override, since for properties the existing InterfaceMethod code
19960         basically ignored the method name.  Now we make sure that the
19961         method name is one of the valid indexer names.
19962
19963 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
19964  
19965         * support.cs (SeekableStreamReader): Keep track of stream byte
19966         positions and don't mix them with character offsets to the buffer.
19967
19968         Patch from Gustavo Giráldez
19969
19970 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
19971
19972         * interface.cs (InterfaceSetGetBase): Removed double member
19973         initialization, base class does it as well.
19974
19975 2004-03-13  Martin Baulig  <martin@ximian.com>
19976
19977         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
19978         when compiling corlib.
19979
19980 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
19981
19982         * convert.cs (ExplicitConversion): We were reporting an error on
19983         certain conversions (object_type source to a value type, when the
19984         expression was `null') before we had a chance to pass it through
19985         the user defined conversions.
19986
19987         * driver.cs: Replace / and \ in resource specifications to dots.
19988         Fixes 50752
19989
19990         * class.cs: Add check for duplicate operators.  Fixes 52477
19991
19992 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
19993
19994         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
19995         that are in the middle of the statements, not only at the end.
19996         Fixes #54987
19997
19998         * class.cs (TypeContainer.AddField): No longer set the
19999         `HaveStaticConstructor' flag, now we call it
20000         `UserDefineStaticConstructor' to diferentiate the slightly
20001         semantic difference.
20002
20003         The situation is that we were not adding BeforeFieldInit (from
20004         Modifiers.TypeAttr) to classes that could have it.
20005         BeforeFieldInit should be set to classes that have no static
20006         constructor. 
20007
20008         See:
20009
20010         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
20011
20012         And most importantly Zoltan's comment:
20013
20014         http://bugzilla.ximian.com/show_bug.cgi?id=44229
20015
20016         "I think beforefieldinit means 'it's ok to initialize the type sometime 
20017          before its static fields are used', i.e. initialization does not need
20018          to be triggered by the first access to the type. Setting this flag
20019          helps the JIT to compile better code, since it can run the static
20020          constructor at JIT time, and does not need to generate code to call it
20021          (possibly lots of times) at runtime. Unfortunately, mcs does not set
20022          this flag for lots of classes like String. 
20023          
20024          csc sets this flag if the type does not have an explicit static 
20025          constructor. The reasoning seems to be that if there are only static
20026          initalizers for a type, and no static constructor, then the programmer
20027          does not care when this initialization happens, so beforefieldinit
20028          can be used.
20029          
20030          This bug prevents the AOT compiler from being usable, since it 
20031          generates so many calls to mono_runtime_class_init that the AOT code
20032          is much slower than the JITted code. The JITted code is faster, 
20033          because it does not generate these calls if the vtable is type is
20034          already initialized, which is true in the majority of cases. But the
20035          AOT compiler can't do this."
20036
20037 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
20038
20039         * class.cs (MethodData.Emit): Refactor the code so symbolic
20040         information is generated for destructors;  For some reasons we
20041         were taking a code path that did not generate symbolic information
20042         before. 
20043
20044 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20045
20046         * class.cs: Create a Constructor.CheckBase method that
20047         takes care of all validation type code. The method
20048         contains some code that was moved from Define.
20049
20050         It also includes new code that checks for duplicate ctors.
20051         This fixes bug #55148.
20052
20053 2004-03-09  Joshua Tauberer <tauberer@for.net>
20054
20055         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
20056         a { ... }-style array creation invokes EmitStaticInitializers
20057         which is not good for reference-type arrays.  String, decimal
20058         and now null constants (NullCast) are not counted toward
20059         static initializers.
20060
20061 2004-03-05  Martin Baulig  <martin@ximian.com>
20062
20063         * location.cs (SourceFile.HasLineDirective): New public field;
20064         specifies whether the file contains or is referenced by a "#line"
20065         directive.
20066         (Location.DefineSymbolDocuments): Ignore source files which
20067         either contain or are referenced by a "#line" directive.        
20068
20069 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
20070
20071         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
20072         direct access to our parent, so check the method inline there.
20073
20074 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20075
20076         * expression.cs (Invocation.EmitCall): Miguel's last commit
20077         caused a regression. If you had:
20078
20079             T t = null;
20080             t.Foo ();
20081
20082         In Foo the implict this would be null.
20083
20084 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
20085
20086         * expression.cs (Invocation.EmitCall): If the method is not
20087         virtual, do not emit a CallVirt to it, use Call.
20088
20089         * typemanager.cs (GetFullNameSignature): Improve the method to
20090         cope with ".ctor" and replace it with the type name.
20091
20092         * class.cs (ConstructorInitializer.Resolve): Now the method takes
20093         as an argument the ConstructorBuilder where it is being defined,
20094         to catch the recursive constructor invocations.
20095
20096 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
20097
20098         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
20099         routines to check if a type is an enumerable/enumerator allow
20100         classes that implement the IEnumerable or IEnumerator interfaces.
20101
20102         * class.cs (Property, Operator): Implement IIteratorContainer, and
20103         implement SetYields.
20104
20105         (Property.Define): Do the block swapping for get_methods in the
20106         context of iterators.   We need to check if Properties also
20107         include indexers or not.
20108
20109         (Operator): Assign the Block before invoking the
20110         OperatorMethod.Define, so we can trigger the Iterator code
20111         replacement. 
20112
20113         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
20114         Property and Operator classes are not created when we parse the
20115         declarator but until we have the block completed, so we use a
20116         singleton SimpleIteratorContainer.Simple to flag whether the
20117         SetYields has been invoked.
20118
20119         We propagate this setting then to the Property or the Operator to
20120         allow the `yield' to function.
20121
20122 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
20123
20124         * codegen.cs: Implemented attribute support for modules.
20125         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
20126         Assembly/Module functionality.
20127
20128         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
20129         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
20130         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
20131
20132 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
20133
20134         * interface.cs (FindMembers): The operation is performed on all base
20135         interfaces and not only on the first. It is required for future CLS Compliance patch.
20136
20137 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20138
20139         * statement.cs, codegen.cs:
20140         This patch deals with patterns such as:
20141
20142         public class List : IEnumerable {
20143
20144                 public MyEnumerator GetEnumerator () {
20145                         return new MyEnumerator(this);
20146                 }
20147
20148                 IEnumerator IEnumerable.GetEnumerator () {
20149                         ...
20150                 }
20151                 
20152                 public struct MyEnumerator : IEnumerator {
20153                         ...
20154                 }
20155         }
20156
20157         Before, there were a few things we did wrong:
20158         1) we would emit callvirt on a struct, which is illegal
20159         2) we emited ldarg when we needed to emit ldarga
20160         3) we would mistakenly call the interface methods on an enumerator
20161         type that derived from IEnumerator and was in another assembly. For example:
20162
20163         public class MyEnumerator : IEnumerator
20164
20165         Would have the interface methods called, even if there were public impls of the
20166         method. In a struct, this lead to invalid IL code.
20167
20168 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
20169
20170         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
20171           renamed to Emit.
20172
20173         * delegate.cs (Define): Fixed crash when delegate type is undefined.
20174
20175 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
20176
20177         * cs-parser.jay: Fix small regression: we were not testing V2
20178         compiler features correctly.
20179
20180         * interface.cs: If the emit context is null, then create one
20181
20182 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
20183
20184         * decl.cs (GetSignatureForError): New virtual method to get full name
20185           for error messages.
20186
20187         * attribute.cs (IAttributeSupport): New interface for attribute setting.
20188           Now it is possible to rewrite ApplyAttributes method to be less if/else.
20189
20190         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
20191           Duplicated members and code in these classes has been removed.
20192           Better encapsulation in these classes.
20193
20194 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
20195
20196         * assign.cs (Assign.DoResolve): When dealing with compound
20197         assignments, there is a new rule in ECMA C# 2.4 (might have been
20198         there before, but it is documented here) that states that in:
20199
20200         a op= b;
20201
20202         If b is of type int, and the `op' is a shift-operator, then the
20203         above is evaluated as:
20204
20205         a = (int) a op b 
20206
20207         * expression.cs (Binary.ResolveOperator): Instead of testing for
20208         int/uint/long/ulong, try to implicitly convert to any of those
20209         types and use that in pointer arithmetic.
20210
20211         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
20212         method to print information for from the type, not from the
20213         null-method we were given.
20214
20215 2004-02-01  Duncan Mak  <duncan@ximian.com>
20216
20217         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20218         parsing for cmd, fixes bug #53694.
20219
20220 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20221
20222         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20223         in the member name duplication tests. Property and operator name duplication
20224         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20225
20226 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20227
20228         * interface.cs (PopulateMethod): Fixed crash when interface method
20229         returns not existing type (error test cs0246-3.cs).
20230
20231 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20232
20233         * cs-parser.jay (interface_accessors): Re-write actions to also
20234         store attributes attached to get and set methods. Fix spelling
20235         while at it.
20236
20237         (inteface_property_declaration): Modify accordingly.
20238
20239         (InterfaceAccessorInfo): New helper class to store information to pass
20240         around between rules that use interface_accessors.
20241
20242         * interface.cs (Emit): Apply attributes on the get and set
20243         accessors of properties and indexers too.
20244
20245         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20246         right MethodBuilder when applying attributes to the get and set accessors.
20247
20248 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20249
20250         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20251
20252 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20253
20254         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20255
20256 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20257
20258         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20259         changes that treat `yield' specially when present before `break'
20260         or `return' tokens.
20261
20262         * cs-tokenizer.cs: yield is no longer a keyword.
20263
20264 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20265
20266         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20267         setting for default constructors.
20268         For default constructors are almost every time set wrong Modifier. The
20269         generated IL code has been alright. But inside mcs this values was
20270         wrong and this was reason why several of my CLS Compliance tests
20271         failed.
20272
20273 2004-01-22  Martin Baulig  <martin@ximian.com>
20274
20275         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20276         not a QualifiedIdentifier.  This is what `type_name_expression'
20277         was previously doing.
20278         (type_name_expression): Removed; the code is now in
20279         `namespace_or_type_name'.
20280         (qualified_identifier): Removed, use `namespace_or_type_name'
20281         instead.
20282         (QualifiedIdentifier): Removed this class.      
20283
20284 2004-01-22  Martin Baulig  <martin@ximian.com>
20285
20286         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20287         not a string as alias name.
20288
20289 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20290
20291         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20292         #52730 bug, and instead compute correctly the need to use a
20293         temporary variable when requesting an address based on the
20294         static/instace modified of the field and the constructor.
20295  
20296 2004-01-21  Martin Baulig  <martin@ximian.com>
20297
20298         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20299         class and namespace before looking up aliases.  Fixes #52517.
20300
20301 2004-01-21  Martin Baulig  <martin@ximian.com>
20302
20303         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20304         assinged in a 'try'; fixes exception4.cs.
20305
20306 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20307         * class.cs : Implemented parameter-less constructor for TypeContainer
20308
20309         * decl.cs: Attributes are now stored here. New property OptAttributes
20310
20311         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20312
20313         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20314
20315 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20316
20317         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20318           (CSharpSignature): New method for indexer and property signature.
20319
20320 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20321
20322         * pending.cs (IsVirtualFilter): Faster implementation.
20323
20324 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20325
20326         * typemanager.cs: Avoid inclusion of same assembly more than once.
20327
20328 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20329
20330         * cs-parser.jay: Fixed problem where the last assembly attribute
20331           has been applied also to following declaration (class, struct, etc.)
20332           
20333 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20334
20335         * class.cs: Added error CS0538, CS0539 reporting.
20336         Fixed crash on Microsoft runtime when field type is void.
20337
20338         * cs-parser.jay: Added error CS0537 reporting.
20339
20340         * pending.cs: Added error CS0535 reporting.
20341         Improved error report for errors CS0536, CS0534.
20342
20343 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20344
20345         Merge a few bits from the Anonymous Method MCS tree.
20346
20347         * statement.cs (ToplevelBlock): New class for toplevel methods,
20348         will hold anonymous methods, lifted variables.
20349
20350         * cs-parser.jay: Create toplevel blocks for delegates and for
20351         regular blocks of code. 
20352
20353 2004-01-20  Martin Baulig  <martin@ximian.com>
20354
20355         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20356         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20357         and `NeedExplicitReturn'; added `IsLastStatement'.
20358         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20359         have a `ReturnLabel' or we're not unreachable.
20360
20361         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20362         child's reachability; don't just override ours with it.  Fixes
20363         #58058 (lluis's example).
20364         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20365         InFinally(), InLoop(), InSwitch() and
20366         BreakCrossesTryCatchBoundary() methods.
20367
20368         * statement.cs (Return): Do all error checking in Resolve().
20369         Unless we are the last statement in a top-level block, always
20370         create a return label and jump to it.
20371         (Break, Continue): Do all error checking in Resolve(); also make
20372         sure we aren't leaving a `finally'.
20373         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20374         statement in a top-level block.
20375         (Block.Flags): Added `IsDestructor'.
20376         (Block.IsDestructor): New public property.
20377
20378 2004-01-20  Martin Baulig  <martin@ximian.com>
20379
20380         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20381
20382 2004-01-20  Martin Baulig  <martin@ximian.com>
20383
20384         * statement.cs (Statement.ResolveUnreachable): New public method.
20385         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20386         (Block.Resolve): Resolve unreachable statements.
20387
20388 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20389
20390         * expression.cs: We need to fix the case where we do
20391         not have a temp variable here.
20392
20393         * assign.cs: Only expression compound assignments need
20394         temporary variables.
20395
20396 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20397
20398         * flowanalysis.cs: Reduce memory allocation in a few ways:
20399           - A block with no variables should not allocate a bit
20400             vector for itself.
20401           - A method with no out parameters does not need any tracking
20402             for assignment of the parameters, so we need not allocate
20403             any data for it.
20404           - The arrays:
20405                 public readonly Type[] VariableTypes;
20406                 public readonly string[] VariableNames;
20407             Are redundant. The data is already stored in the variable
20408             map, so we need not allocate another array for it.
20409           - We need to add alot of checks for if (params | locals) == null
20410             due to the first two changes.
20411
20412 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20413
20414         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20415         implement IMemoryLocation, we store a copy on a local variable and
20416         take the address of it.  Patch from Benjamin Jemlich
20417
20418         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20419         to use a special "type_name_expression" rule which reduces the
20420         number of "QualifiedIdentifier" classes created, and instead
20421         directly creates MemberAccess expressions.
20422
20423 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20424
20425         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20426         that fixes #52853.  Null literal assignment to ValueType
20427
20428         * class.cs (MethodData.Emit): Instead of checking the name of the
20429         method to determine if its a destructor, create a new derived
20430         class from Method called Destructor, and test for that.  
20431
20432         * cs-parser.jay: Create a Destructor object instead of a Method.  
20433
20434         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20435
20436         Fixes: 52933
20437
20438 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20439
20440         * expression.cs (Binary.ResolveOperator): Perform an implicit
20441         conversion from MethodGroups to their delegate types on the
20442         Addition operation.
20443
20444         * delegate.cs: Introduce a new class DelegateCreation that is the
20445         base class for `NewDelegate' and `ImplicitDelegateCreation',
20446         factor some code in here.
20447
20448         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20449         conversion from MethodGroups to compatible delegate types. 
20450
20451         * ecore.cs (Expression.Resolve): Do not flag error 654
20452         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20453         we allow conversions from MethodGroups to delegate types now.
20454
20455         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20456         assignments in v2 either.
20457
20458 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20459
20460         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20461         static read-only fields in ctors.
20462
20463         Applied patch from Benjamin Jemlich 
20464
20465         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20466
20467 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20468
20469         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20470         here to return true, as they can be used like this:
20471
20472                 (XXX) int.MEMBER ()
20473
20474         Fixed 49836 and all the other dups
20475
20476 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20477
20478         * driver.cs: Implement /win32res and /win32icon.
20479
20480 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20481
20482         * cs-parser.jay: Add a rule to improve error handling for the
20483         common mistake of placing modifiers after the type.
20484
20485 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20486
20487         * cs-parser.jay (interface_event_declaration): Catch
20488         initialization of events on interfaces, and report cs0068
20489
20490         * cs-parser.jay (interface_event_declaration): Catch
20491         initialization of events. 
20492
20493         * ecore.cs: Better report missing constructors.
20494
20495         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20496         the error reporting done in the wrong place.  Fix.
20497
20498         * expression.cs (Binary.ResolveOperator): Catch the 
20499         operator + (E x, E y) error earlier, and later allow for implicit
20500         conversions in operator +/- (E e, U x) from U to the underlying
20501         type of E.
20502
20503         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20504         52596, if the container class is abstract, the default constructor
20505         is protected otherwise its public (before, we were always public).
20506
20507         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20508         fixed statement.
20509
20510         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20511         Jemlich that fixes bug #52597, MCS was generating invalid code for
20512         idisposable structs.   Thanks to Ben for following up with this
20513         bug as well.
20514
20515 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20516
20517         * driver.cs: Allow assemblies without code to be generated, fixes
20518         52230.
20519
20520 2004-01-07  Nick Drochak <ndrochak@gol.com>
20521
20522         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20523
20524 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20525
20526         * cs-parser.jay: Add rules to improve error reporting if fields or
20527         methods are declared at the namespace level (error 116)
20528
20529         * Add rules to catch event add/remove
20530
20531 2004-01-04  David Sheldon <dave-mono@earth.li>
20532
20533   * expression.cs: Added matching ")" to error message for 
20534   CS0077
20535
20536 2004-01-03 Todd Berman <tberman@gentoo.org>
20537
20538         * ecore.cs, attribute.cs:
20539         Applying fix from #52429.
20540
20541 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20542
20543         * ecore.cs, expression.cs, statement.cs:
20544         Total rewrite of how we handle branching. We
20545         now handle complex boolean expressions with fewer
20546         jumps. As well if (x == 0) no longer emits a ceq.
20547
20548         if (x is Foo) is much faster now, because we generate
20549         better code.
20550
20551         Overall, we get a pretty big improvement on our benchmark
20552         tests. The code we generate is smaller and more readable.
20553
20554         I did a full two-stage bootstrap. The patch was reviewed
20555         by Martin and Miguel.
20556
20557 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20558
20559         * cs-parser.jay: Make primary_expression not take a QI.
20560         we dont need this because the member_access rule covers
20561         us here. So we replace the rule with just IDENTIFIER.
20562
20563         This has two good effects. First, we remove a s/r conflict.
20564         Second, we allocate many fewer QualifiedIdentifier objects.
20565
20566 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20567
20568         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20569         set the correct information via SRE. This prevents
20570         hanging on the MS runtime. Fixes #29374.
20571
20572 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20573
20574         * convert.cs: correctly handle conversions to value types
20575         from Enum and ValueType as unboxing conversions.
20576
20577         Fixes bug #52569. Patch by Benjamin Jemlich.
20578
20579 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20580
20581         * expression.cs (BetterConversion): Prefer int -> uint
20582         over int -> ulong (csc's behaviour). This fixed bug #52046.
20583
20584 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20585
20586         * decl.cs (MemberCache.FindMembers): now returns a
20587         MemberInfo [].
20588
20589         * typemanager.cs: In general, go with with ^^.
20590         (CopyNewMethods): take an IList.
20591         (RealMemberLookup): Only allocate an arraylist
20592         if we copy from two sets of methods.
20593
20594         This change basically does two things:
20595         1) Fewer array lists allocated due to CopyNewMethods.
20596         2) the explicit cast in MemberList costed ALOT.
20597
20598 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20599
20600         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20601         a hashtable to avoid needless string allocations when an identifier is
20602         used more than once (the common case).
20603
20604 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20605
20606         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20607         is broken, it will not return anything. So, we
20608         have to use the information we have in mcs to
20609         do the task.
20610
20611         * typemanager.cs: Add a cache for GetInterfaces,
20612         since this will now be used more often (due to ^^)
20613
20614         (GetExplicitInterfaces) New method that gets the
20615         declared, not effective, interfaces on a type
20616         builder (eg, if you have interface IFoo, interface
20617         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20618         { IBar }.
20619
20620         This patch makes MCS able to bootstrap itself on
20621         Windows again.
20622
20623 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20624
20625         * expression.cs: Remove the Nop's that Miguel put
20626         in by mistake.
20627
20628 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20629
20630         * report.cs, codegen.cs: Give the real stack trace to
20631         the error when an exception is thrown.
20632
20633 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20634
20635         * decl.cs: only allocate hashtables for ifaces if 
20636         it is an iface!
20637
20638 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20639
20640         * expression.cs: fix the error from cs0121-2.cs
20641         (a parent interface has two child interfaces that
20642         have a function with the same name and 0 params
20643         and the function is called through the parent).
20644
20645 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20646
20647         * class.cs, rootcontext.cs, typmanager.cs: do not
20648         leak pointers.
20649
20650 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20651
20652         * codegen.cs: remove stack for the ec flow branching.
20653         It is already a linked list, so no need.
20654
20655 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20656
20657         * Makefile: Allow custom profiler here.
20658
20659 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20660
20661         * typemanager.cs (LookupType):
20662           - Use a static char [], because split takes
20663             a param array for args, so it was allocating
20664             every time.
20665           - Do not store true in a hashtable, it boxes.
20666
20667 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20668
20669         * flowanalysis.cs: bytify common enums.
20670
20671 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20672
20673         * modifiers.cs: Add a new set of flags for the
20674         flags allowed on explicit interface impls.
20675         * cs-parser.jay: catch the use of modifiers in
20676         interfaces correctly.
20677         * class.cs: catch private void IFoo.Blah ().
20678
20679         All related to bug #50572.
20680
20681 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20682
20683         * decl.cs: Rewrite the consistant accessability checking.
20684         Accessability is not linear, it must be implemented in
20685         a tableish way. Fixes #49704.
20686
20687 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20688
20689         * expression.cs: Handle negation in a checked context.
20690         We must use subtraction from zero. Fixes #38674.
20691
20692 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20693
20694         * class.cs: Ignore static void main in DLLs.
20695         * rootcontext.cs: Handle the target type here,
20696         since we are have to access it from class.cs
20697         * driver.cs: account for the above.
20698
20699 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20700
20701         * report.cs: Give line numbers and files if available.
20702
20703 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20704
20705         * driver.cs: Implement /addmodule.
20706
20707         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20708         ModuleBuilders.
20709
20710 2003-12-20  Martin Baulig  <martin@ximian.com>
20711
20712         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20713         (FieldBase.IsAssigned): Removed this field.
20714         (FieldBase.SetAssigned): New public method.
20715         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20716
20717 2003-12-20  Martin Baulig  <martin@ximian.com>
20718
20719         * expression.cs (LocalVariableReference.DoResolve): Don't set
20720         `vi.Used' if we're called from DoResolveLValue().
20721
20722         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20723         returns the usage vector it just merged into the current one -
20724         pass this one to UsageWarning().
20725         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20726         of the `EmitContext', don't call this recursively on our children.
20727
20728 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20729
20730         * driver.cs: Implement /target:module.
20731
20732 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20733
20734         * support.cs (CharArrayHashtable): New helper class.
20735
20736         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20737         char arrays, not strings, so we can avoid creating a string in
20738         consume_identifier if the identifier is a keyword.
20739
20740 2003-12-16  Martin Baulig  <martin@ximian.com>
20741
20742         * statement.cs (LocalInfo.Assigned): Removed this property.
20743         (LocalInfo.Flags): Removed `Assigned'.
20744         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20745         and uses flow analysis.
20746         (Block.UsageWarning): Made this method private.
20747         (Block.Resolve): Call UsageWarning() if appropriate.
20748
20749         * expression.cs (LocalVariableReference.DoResolve): Always set
20750         LocalInfo.Used here.
20751
20752 2003-12-13  Martin Baulig  <martin@ximian.com>
20753
20754         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20755         any value here; we're now using flow analysis to figure out
20756         whether a statement/block returns a value.
20757
20758 2003-12-13  Martin Baulig  <martin@ximian.com>
20759
20760         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20761         working again.
20762         (FlowBranching.MergeFinally): Don't call
20763         `branching.CheckOutParameters()' here, this is called in
20764         MergeTopBlock().
20765         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20766         when adding the `finally' vector.       
20767
20768 2003-12-13  Martin Baulig  <martin@ximian.com>
20769
20770         * flowanalysis.cs
20771         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20772         actually work and also fix #48962.
20773
20774 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20775
20776         * decl.cs: Do not check System.Object for nested types,
20777         since we know it does not have any. Big bang for buck:
20778
20779         BEFORE:
20780            Run 1:   8.35 seconds
20781            Run 2:   8.32 seconds
20782            corlib:  17.99 seconds
20783         AFTER:
20784            Run 1:   8.17 seconds
20785            Run 2:   8.17 seconds
20786            corlib:  17.39 seconds
20787
20788 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20789
20790         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20791         time we are returning 0 members, so we save alot here.
20792
20793 2003-12-11  Martin Baulig  <martin@ximian.com>
20794
20795         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20796         `MergeChild()', also just take the `FlowBranching' as argument;
20797         call Merge() on it and return the result.
20798         (FlowBranching.Merge): We don't need to do anything if we just
20799         have one sibling.
20800
20801 2003-12-11  Martin Baulig  <martin@ximian.com>
20802
20803         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20804         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20805         Maurer for this idea.
20806
20807 2003-12-11  Martin Baulig  <martin@ximian.com>
20808
20809         * flowanalysis.cs (MergeResult): This class is now gone; we now
20810         use the `UsageVector' for this.  The reason for this is that if a
20811         branching just has one sibling, we don't need to "merge" them at
20812         all - that's the next step to do.
20813         (FlowBranching.Merge): We now return a `UsageVector' instead of a
20814         `MergeResult'.
20815
20816 2003-12-11  Martin Baulig  <martin@ximian.com>
20817
20818         Reworked flow analyis and made it more precise and bug-free.  The
20819         most important change is that we're now using a special `Reachability'
20820         class instead of having "magic" meanings of `FlowReturns'.  I'll
20821         do some more cleanups and optimizations and also add some more
20822         documentation this week.
20823
20824         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
20825         largely reworked this class.
20826         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
20827         the new `Reachability' class instead of having "magic" values here.
20828         (FlowBranching): We're now using an instance of `Reachability'
20829         instead of having separate `Returns', `Breaks' etc. fields.
20830
20831         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
20832         based on flow analysis; ignore the return value of block.Emit ().
20833
20834 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
20835
20836         * driver.cs typemanager.cs: Find the mono extensions to corlib even
20837         if they are private.
20838
20839 2003-12-09  Martin Baulig  <martin@ximian.com>
20840
20841         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
20842         call them directly on the UsageVector.
20843
20844 2003-12-09  Martin Baulig  <martin@ximian.com>
20845
20846         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
20847         Changed return type from `FlowReturns' to `Reachability'.
20848
20849 2003-12-09  Martin Baulig  <martin@ximian.com>
20850
20851         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
20852         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
20853         `Reachable' fields with a single `Reachability' one.
20854
20855 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20856
20857         * class.cs (FindMembers): Remove foreach's.
20858
20859         Bootstrap times:
20860
20861         BEFORE
20862                 Run 1:   8.74 seconds
20863                 Run 2:   8.71 seconds
20864
20865         AFTER
20866                 Run 1:   8.64 seconds
20867                 Run 2:   8.58 seconds
20868
20869
20870 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20871
20872         * cs-parser.jay:
20873         * gen-treedump.cs:
20874         * statement.cs:
20875         This patch does a few things:
20876                 1. EmptyStatement is now a singleton, so it is never reallocated.
20877                 2. All blah is EmptyStatement constructs have been changed to
20878                    blah == EmptyStatement.Value, which is much faster and valid
20879                    now that EmptyStatement is a singleton.
20880                 3. When resolving a block, rather than allocating a new array for
20881                    the non-empty statements, empty statements are replaced with
20882                    EmptyStatement.Value
20883                 4. Some recursive functions have been made non-recursive.
20884         Mainly the performance impact is from (3), however (1) and (2) are needed for
20885         this to work. (4) does not make a big difference in normal situations, however
20886         it makes the profile look saner.
20887
20888         Bootstrap times:
20889
20890         BEFORE
20891         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20892         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20893         Total memory allocated: 56397 KB
20894
20895         AFTER
20896         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
20897         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
20898         Total memory allocated: 55666 KB
20899
20900 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20901
20902         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
20903         than the hashtable in a hashtable version
20904
20905         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
20906         we always end up concating a string. This results in a huge perf
20907         loss, because many strings have to be tracked by the GC. In this
20908         patch, we first use a hashtable that works with two keys, so that
20909         the strings do not need to be concat'ed.
20910
20911         Bootstrap times:
20912         BEFORE
20913                 Run 1:   8.74 seconds
20914                 Run 2:   8.71 seconds
20915
20916         AFTER
20917                 Run 1:   8.65 seconds
20918                 Run 2:   8.56 seconds
20919
20920 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20921
20922         * Makefile: Add a new target `do-time' that does a quick and simple
20923         profile, leaving easy to parse output.
20924
20925 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20926
20927         * codegen.cs (Init): Create the dynamic assembly with 
20928         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
20929
20930 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20931
20932         * support.cs: Make the PtrHashtable use only one
20933         instance of its comparer.
20934
20935 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
20936
20937         * typemanager.cs: Fix lookup of GetNamespaces.
20938
20939 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
20940
20941         * expression.cs: Removed redundant line.
20942
20943         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
20944         ArrayLists, use for loops with bounds.  
20945
20946         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
20947         arraylist.
20948
20949         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
20950         arraylists, use for loop with bounds.
20951
20952         The above three changes give us a 0.071 second performance
20953         improvement out of 3.294 seconds down to 3.223.  On my machine
20954         the above changes reduced the memory usage by 1,387 KB during
20955         compiler bootstrap.
20956
20957         * cs-parser.jay (QualifiedIdentifier): New class used to represent
20958         QualifiedIdentifiers.  Before we created a new string through
20959         concatenation, and mostly later on, the result would be
20960         manipulated by DecomposeQI through string manipulation.
20961
20962         This reduced the compiler memory usage for bootstrapping from
20963         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
20964         compile times in 0.05 seconds.
20965
20966 2003-11-28  Dick Porter  <dick@ximian.com>
20967
20968         * support.cs: Do string compares with the Invariant culture.
20969
20970         * rootcontext.cs: 
20971         * gen-treedump.cs: 
20972         * expression.cs: 
20973         * driver.cs: 
20974         * decl.cs: 
20975         * codegen.cs: 
20976         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
20977         the comparison is done with the Invariant culture.
20978
20979 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
20980
20981         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
20982         GetEnumerator method.
20983
20984         (ProbeCollectionType): Iterate starting at the most specific type
20985         upwards looking for a GetEnumerator
20986
20987         * expression.cs: Shift count can be up to 31 for int/uint and 63
20988         for long/ulong.
20989
20990 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
20991
20992         * statement.cs (Block.LookupLabel): Also look for the label on the
20993         children blocks.  Use a hash table to keep track of visited
20994         nodes. 
20995
20996         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
20997         we actually did transform the other operand, otherwise fall back
20998         to the common codepath that casts to long.
20999
21000         * cs-tokenizer.cs: Use the same code pattern as the int case.
21001         Maybe I should do the parsing myself, and avoid depending on the
21002         Parse routines to get this done.
21003
21004 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
21005
21006         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
21007         which fixes bug 51347.  This time test it.
21008
21009         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
21010         attributes for example can not tell the difference between these.
21011         The difference was only a syntax feature of the language. 
21012
21013         * attribute.cs: Apply attributes to delegates.
21014
21015         * delegate.cs: Call the apply attributes method.
21016
21017 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
21018
21019         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
21020         comparing 0 vs Byte.MinValue, not the value
21021
21022         (ImplicitConversionRequired): When reporting a conversion error,
21023         use error 31 to print out the constant error instead of the
21024         simpler 29.
21025
21026         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
21027         which fixes bug 51347.
21028
21029 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
21030
21031         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
21032         which fixes the -warnaserror command line option.
21033
21034 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
21035
21036         * cfold.cs (DoNumericPromotions): During constant folding of
21037         additions on UIntConstant, special case intconstants with
21038         IntConstants like we do on the expression binary operator. 
21039
21040 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
21041
21042         * convert.cs (ImplicitReferenceConversion): We were missing a case
21043         (System.Enum are not value types or class types, so we need to
21044         classify them separatedly).
21045
21046         * driver.cs: We do not support error 2007.
21047
21048 2003-11-12 Jackson Harper <jackson@ximian.com>
21049
21050         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
21051         system directory. Also use the full file name so users can
21052         libraries names mscorlib-o-tron.dll in a non system dir.
21053
21054 2003-11-10  Martin Baulig  <martin@ximian.com>
21055
21056         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
21057         (TypeManager.InitCoreTypes): Initialize them here, but instead of
21058         calling `ResolveType()' on them, directly assign their `Type'.
21059
21060 2003-11-08  Martin Baulig  <martin@ximian.com>
21061
21062         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
21063         return value and the `out parent' parameter.
21064         (TypeContainer.DefineType): Moved the CS0644 check into
21065         GetClassBases().  Don't pass the interface types to the
21066         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
21067         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
21068
21069         * ecore.cs (TypeExpr.IsAttribute): New property.
21070         (TypeExpr.GetInterfaces): New method.
21071
21072         * interface.cs (Interface.GetInterfaceTypeByName): Return a
21073         TypeExpr instead of a Type.
21074         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
21075         (Interface.DefineType): Don't pass the interface types to the
21076         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
21077         them later and then call `TypeBulider.AddInterfaceImplementation()'.
21078
21079         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
21080         instead of a `Type[]'.
21081         (TypeManager.RegisterBuilder): Likewise.
21082         (TypeManager.AddUserInterface): Likewise.
21083         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
21084         `Type[]' and also return a `TypeExpr[]'.
21085         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
21086
21087 2003-11-08  Martin Baulig  <martin@ximian.com>
21088
21089         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
21090         Expression.     
21091
21092 2003-11-08  Martin Baulig  <martin@ximian.com>
21093
21094         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
21095         TypeManager.ResolveExpressionTypes().
21096
21097         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
21098         instead of an Expression.
21099         (TypeExpr): This is now an abstract base class for `TypeExpression'.
21100         (TypeExpression): New public class; formerly known as `TypeExpr'.
21101
21102         * expression.cs (ComposedCast): Derive from TypeExpr.
21103
21104         * typemanager.cs (TypeManager.system_*_expr): These are now
21105         TypExpr's instead of Expression's.
21106         (TypeManager.ResolveExpressionTypes): New public static function;
21107         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
21108         of them.        
21109
21110 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
21111
21112         * expression.cs (New.DoResolve): Do not dereference value that
21113         might be a null return.
21114
21115         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
21116         sure that the constant value has the right type.  Fixes an
21117         unreported bug, similar to 50425.
21118
21119         * const.cs (Const.LookupConstantValue): Call
21120         ImplicitStandardConversionExists before doing a conversion to
21121         avoid havng the TypeManager.ChangeType do conversions.
21122
21123         Reduced the number of casts used
21124
21125         (Const.ChangeType): New routine to enable reuse of the constant
21126         type changing code from statement.
21127
21128         * typemanager.cs (ChangeType): Move common initialization to
21129         static global variables.
21130
21131         Fixes #50425.
21132
21133         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
21134         every value type to go through, even if it was void.  Fix that. 
21135
21136         * cs-tokenizer.cs: Use is_identifier_start_character on the start
21137         character of the define, and the is_identifier_part_character for
21138         the rest of the string.
21139
21140 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
21141
21142         * expression.cs (UnaryMutator.EmitCode): When I updated
21143         LocalVariableReference.DoResolve, I overdid it, and dropped an
21144         optimization done on local variable references.
21145
21146 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
21147
21148         * ecore.cs: Convert the return from Ldlen into an int.
21149
21150 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
21151
21152         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
21153         the accessibility, this is a special case for toplevel non-public
21154         classes (internal for instance).
21155
21156 2003-10-20  Nick Drochak <ndrochak@gol.com>
21157
21158         * ecore.cs: Fix typo and build.  Needed another right paren.
21159
21160 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
21161
21162         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
21163         `internal' case regular and protected, but not allowing protected
21164         to be evaluated later.  Bug 49840
21165
21166 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
21167
21168         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
21169         to kb.Nlast, and not the kb.nFirst to isolate the switch
21170         statement.
21171
21172         Extract the underlying type, so enumerations of long/ulong are
21173         treated like long/ulong.
21174
21175 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
21176
21177         * expression.cs (New): Overload the meaning of RequestedType to
21178         track the possible creation of the NewDelegate type, since
21179         DoResolve is invoked more than once for new constructors on field
21180         initialization.
21181
21182         See bugs: #48800 and #37014
21183
21184         * cs-parser.jay (declare_local_constants): Take an arraylist
21185         instead of a single constant.
21186
21187         (local_constant_declaration): It should take a
21188         constant_declarators, not a constant_declarator.  Fixes 49487
21189
21190         * convert.cs: Fix error report.
21191
21192 2003-10-13 Jackson Harper <jackson@ximian.com>
21193
21194         * typemanager.cs (TypeToCoreType): Add float and double this fixes
21195         bug #49611
21196
21197 2003-10-09  Martin Baulig  <martin@ximian.com>
21198
21199         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
21200         to the .ctor.
21201         (MethodCore.DoDefineParameters): Removed the TypeContainer
21202         argument; use the DeclSpace which was passed to the .ctor instead.
21203         (MethodCore.CheckParameter): Take a DeclSpace instead of a
21204         TypeContainer; we only need a DeclSpace here.
21205
21206 2003-10-09  Martin Baulig  <martin@ximian.com>
21207
21208         * class.cs (MethodData): Added additional `DeclSpace ds' argument
21209         to the .ctor.
21210         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
21211         EmitContext's .ctor.    
21212
21213 2003-10-09  Martin Baulig  <martin@ximian.com>
21214
21215         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21216         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21217         AsAccessible(), moved them as well.
21218
21219         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21220
21221 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21222
21223         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21224
21225 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21226
21227         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21228         generation for >=, as spotted by Paolo, bug 48679.  
21229         Patch from David Waite.
21230
21231         * cs-tokenizer.cs: Add handling for #pragma.
21232
21233         * cs-parser.jay: Allow for both yield and yield return in the
21234         syntax.  The anti-cobolization of C# fight will go on!
21235
21236         * class.cs (TypeBuilder.DefineType): Catch error condition here
21237         (Parent.DefineType erroring out and returning null).
21238
21239         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21240         coping with enumerations variables, we were mistakenly processing
21241         them as a regular value type instead of built-in types.  Fixes the
21242         bug #48063
21243
21244         * typemanager.cs (IsBuiltinOrEnum): New method.
21245
21246 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21247
21248         * cs-parser.jay: Upgrade: yield now needs the return clause.
21249
21250 2003-09-19  Martin Baulig  <martin@ximian.com>
21251
21252         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21253         `MemberCache parent' argument.  Normally, an interface doesn't
21254         have a parent type except System.Object, but we use this in gmcs
21255         for generic type parameters.
21256
21257 2003-09-18  Martin Baulig  <martin@ximian.com>
21258
21259         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21260         on `type.IsInterface'; don't check whether the type has a parent
21261         to determine whether it's an interface.
21262
21263 2003-09-15  Martin Baulig  <martin@ximian.com>
21264
21265         * class.cs (TypeContainer.DefineType): Added an error flag to
21266         avoid reporting duplicate CS0146's ("class definition is
21267         circular.").
21268
21269         * driver.cs (Driver.MainDriver): Abort if
21270         RootContext.ResolveTree() reported any errors.
21271
21272 2003-09-07  Martin Baulig  <martin@ximian.com>
21273
21274         * report.cs (Error, Warning): Added overloaded versions which take
21275         a `params object[] args' and call String.Format().
21276
21277 2003-09-07  Martin Baulig  <martin@ximian.com>
21278
21279         * decl.cs (DeclSpace..ctor): Don't call
21280         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21281         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21282         (DeclSpace.RecordDecl): New method.
21283
21284         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21285
21286 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21287
21288         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21289         value attributes to be applied to ParameterBuilders.
21290
21291         * class.cs (MethodCore.LabelParameters): Make static and more
21292         generic so that it can be used from other places - like interface
21293         methods, for instance.
21294
21295         * interface.cs (Interface.Emit): Call LabelParameters before
21296         emitting attributes on the InterfaceMethod.
21297
21298 2003-08-26  Martin Baulig  <martin@ximian.com>
21299
21300         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21301         resolving aliases; fixes #47927.
21302
21303 2003-08-26  Martin Baulig  <martin@ximian.com>
21304
21305         * statement.cs (Using.DoResolve): This is internally emitting a
21306         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21307         do not always return.  Fixes #47681.
21308
21309 2003-08-26  Martin Baulig  <martin@ximian.com>
21310
21311         * decl.cs (MemberCore): Moved WarningNotHiding(),
21312         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21313         into MemberBase.
21314         (AdditionResult): Make this nested in DeclSpace.
21315         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21316         argument; call NamespaceEntry.Define() unless we're nested in a
21317         class or struct.
21318
21319         * namespace.cs (Namespace.DefineName): New public function.  This
21320         is called from DeclSpace's .ctor to add 
21321         (Namespace.Lookup): Include DeclSpaces in the lookup.
21322
21323         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21324
21325         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21326
21327 2003-08-25  Martin Baulig  <martin@ximian.com>
21328
21329         * convert.cs (Convert.ExplicitReferenceConversion): When
21330         converting from an interface type to a class, unbox if the target
21331         type is a struct type.  Fixes #47822.
21332
21333 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21334
21335         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21336         #47854.
21337
21338 2003-08-22  Martin Baulig  <martin@ximian.com>
21339
21340         * class.cs (TypeManager.DefineType): When defining a nested type,
21341         call DefineType() on our parent; fixes #47801.
21342
21343 2003-08-22  Martin Baulig  <martin@ximian.com>
21344
21345         * class.cs (MethodData.Define): While checking if a method is an
21346         interface implementation, improve the test a bit more to fix #47654.
21347
21348 2003-08-22  Martin Baulig  <martin@ximian.com>
21349
21350         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21351         correctly; fixes #47722.
21352
21353 2003-08-22  Martin Baulig  <martin@ximian.com>
21354
21355         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21356         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21357
21358         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21359
21360 2003-08-22  Martin Baulig  <martin@ximian.com>
21361
21362         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21363         can only be assigned in static constructors.  Fixes #47161.
21364
21365 2003-08-22  Martin Baulig  <martin@ximian.com>
21366
21367         Rewrote and improved the flow analysis code.
21368
21369         * flowbranching.cs (FlowBranching): Make this class abstract.
21370         (FlowBranching.CreateBranching): New static function to create a
21371         new flow branching.
21372         (FlowBranchingBlock, FlowBranchingException): New classes.
21373         (FlowBranching.UsageVector.Type): New public readonly field.
21374         (FlowBranching.UsageVector.Breaks): Removed the setter.
21375         (FlowBranching.UsageVector.Returns): Removed the setter.
21376         (FlowBranching.UsageVector): Added Break(), Return(),
21377         NeverReachable() and Throw() methods to modify the reachability.
21378         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21379         done by FlowBranching.Merge().
21380         (FlowBranching.UsageVector.MergeChild): New method; merges the
21381         merge result into the current vector.
21382         (FlowBranching.Merge): New abstract method to merge a branching.
21383
21384 2003-08-12  Martin Baulig  <martin@ximian.com>
21385
21386         * expression.cs (Indirection.CacheTemporaries): Create the
21387         LocalTemporary with the pointer type, not its element type.
21388
21389 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21390
21391         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21392         token was a keyword or not.
21393
21394         Add `error' options where an IDENTIFIER was expected;  Provide
21395         CheckToken and CheckIdentifierToken convenience error reporting
21396         functions. 
21397
21398         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21399
21400         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21401         NameSpaceEntry NameSpaceEntry.
21402
21403         (LookupInterfaceOrClass): Avoid creating a full qualified name
21404         from namespace and name: avoid doing lookups when we know the
21405         namespace is non-existant.   Use new Tree.LookupByNamespace which
21406         looks up DeclSpaces based on their namespace, name pair.
21407
21408         * driver.cs: Provide a new `parser verbose' to display the
21409         exception thrown during parsing.  This is turned off by default
21410         now, so the output of a failure from mcs is more graceful.
21411
21412         * namespace.cs: Track all the namespaces defined in a hashtable
21413         for quick lookup.
21414
21415         (IsNamespace): New method
21416
21417 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21418
21419         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21420         we know that we need to concatenate (full typename can never be
21421         null). 
21422
21423         * class.cs: ditto.
21424
21425         * statement.cs: Use a bitfield;  Do not initialize to null things
21426         which are done by the constructor by default.
21427
21428         * cs-parser.jay: bug fix, parameter was 4, not 3.
21429
21430         * expression.cs: Just use the property;
21431
21432         * statement.cs: No need for GetVariableInfo method.
21433
21434 2003-08-08  Martin Baulig  <martin@ximian.com>
21435
21436         * flowanalysis.cs (FlowReturns): This is now nested in the
21437         `FlowBranching' class.
21438         (MyBitVector): Moved this here from statement.cs.
21439         (FlowBranching.SiblingType): New enum type.
21440         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21441
21442 2003-08-07  Martin Baulig  <martin@ximian.com>
21443
21444         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21445         `FlowBranching' class and called `BranchingType'.
21446
21447 2003-08-07  Martin Baulig  <martin@ximian.com>
21448
21449         * flowanalysis.cs: Moved all the control flow analysis code into
21450         its own file.
21451
21452 2003-08-07  Martin Baulig  <martin@ximian.com>
21453
21454         * assign.cs (Assign.DoResolve): `target' must either be an
21455         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21456         #37319.
21457
21458 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21459
21460         * expression.cs (BinaryMethod): This kind of expression is created by the
21461         Binary class if it determines that the operator has to be handled
21462         by a method.
21463
21464         (BinaryDelegate): This kind of expression is created if we are
21465         dealing with a + or - operator on delegates.
21466
21467         (Binary): remove method, argumetns, and DelegateOperator: when
21468         dealing with methods, 
21469
21470         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21471
21472         * statement.cs (Block): use bitfields for the three extra booleans
21473         we had in use.   Remove unused topblock parameter.
21474
21475         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21476
21477         * assign.cs: Drop extra unneeded tests.
21478
21479 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21480
21481         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21482
21483         * statement.cs (Foreach): Use VariableStorage instead of
21484         LocalBuilders.   
21485
21486         * codegen.cs (VariableStorage): New class used by clients that
21487         require a variable stored: locals or fields for variables that
21488         need to live across yield.
21489
21490         Maybe provide a convenience api for EmitThis+EmitLoad?
21491
21492         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21493         these bad boys.
21494
21495 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21496
21497         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21498         RemapParameterLValue): New methods that are used to turn a
21499         precomputed FieldInfo into an expression like this:
21500
21501                 instance.FieldInfo
21502
21503         The idea is to use this instead of making LocalVariableReference
21504         have more than one meaning.
21505
21506         * cs-parser.jay: Add error production to BASE.
21507
21508         * ecore.cs: Deal with TypeManager.GetField returning null, which
21509         is now a valid return value.
21510
21511         (FieldExprNoAddress): New expression for Fields whose address can
21512         not be taken.
21513
21514         * expression.cs (LocalVariableReference): During the resolve
21515         phases, create new expressions if we are in a remapping context.
21516         Remove code that dealt with remapping here.
21517
21518         (ParameterReference): same.
21519
21520         (ProxyInstance): New expression, like the `This' expression, but
21521         it is born fully resolved.  We know what we are doing, so remove
21522         the errors that are targeted to user-provided uses of `this'.
21523
21524         * statement.cs (Foreach): our variable is now stored as an
21525         Expression;  During resolution, follow the protocol, dont just
21526         assume it will return this.
21527
21528 2003-08-06  Martin Baulig  <martin@ximian.com>
21529
21530         * support.cs (SeekableStreamReader.cs): New public class.
21531
21532         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21533         SeekableStreamReader instead of the normal StreamReader.
21534
21535 2003-08-04  Martin Baulig  <martin@ximian.com>
21536
21537         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21538         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21539         deambiguate casts and delegate invocations.
21540         (parenthesized_expression): Use the new tokens to ensure this is
21541         not a cast of method invocation.
21542
21543         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21544         when reading a `)' and Deambiguate_CloseParens () was previously
21545         called.
21546
21547         * expression.cs (ParenthesizedExpression): New class.  This is
21548         just used for the CS0075 test.
21549         (Binary.DoResolve): Check for CS0075.   
21550
21551 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21552
21553         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21554         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21555         reference comparison.
21556
21557         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21558         examine the ReturnType for equality - this is necessary in the
21559         cases of implicit and explicit operators whose signature also
21560         includes the return type.
21561
21562 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21563
21564         * namespace.cs: Cache the result of the namespace computation,
21565         instead of computing it every time.
21566
21567 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21568
21569         * decl.cs: Use a global arraylist that we reuse over invocations
21570         to avoid excesive memory consumption.  Reduces memory usage on an
21571         mcs compile by one meg (45 average).
21572
21573         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21574         private, work around that.
21575
21576 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21577
21578         * literal.cs (IntLiteral): Define Zero and One static literals. 
21579
21580         * cs-parser.jay (integer_literal): use static literals to reduce
21581         memory usage for the most used literals (0, 1 and -1).  211kb
21582         reduced in memory usage.
21583
21584         Replace all calls to `new ArrayList' with `new
21585         ArrayList(4)' which is a good average number for most allocations,
21586         and also requires only 16 bytes of memory for its buffer by
21587         default. 
21588
21589         This reduced MCS memory usage in seven megabytes for the RSS after
21590         bootstrapping.
21591
21592 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21593
21594         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21595         handle params methods the correct way by forming only one
21596         applicable set with params and normal methods in them. Earlier we
21597         were looking at params methods only if we found no normal methods
21598         which was not the correct thing to do.
21599
21600         (Invocation.BetterFunction): Take separate arguments indicating
21601         when candidate and the best method are params methods in their
21602         expanded form.
21603
21604         This fixes bugs #43367 and #46199.
21605
21606         * attribute.cs: Documentation updates.
21607
21608         (CheckAttribute): Rename to CheckAttributeTarget.
21609         (GetValidPlaces): Rename to GetValidTargets.
21610
21611         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21612         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21613
21614         Fixes bug #44468.
21615
21616 2003-07-28  Martin Baulig  <martin@ximian.com>
21617
21618         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21619         name when looking up the base class of a nested class.  Fixes #46977.
21620
21621 2003-07-26  Martin Baulig  <martin@ximian.com>
21622
21623         * expression.cs (Indexers.Indexer): New nested struct; contains
21624         getter, setter and the indexer's type.
21625         (Indexers.Properties): This is now an ArrayList of
21626         Indexers.Indexer's.
21627         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21628         indexer doesn't have any getters.
21629
21630         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21631         for embedded property and indexer assignments.
21632
21633 2003-07-26  Martin Baulig  <martin@ximian.com>
21634
21635         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21636         preprocessor directive is not the first non-whitespace character
21637         on a line.
21638
21639 2003-07-26  Martin Baulig  <martin@ximian.com>
21640
21641         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21642         namespace parsing, follow the spec more closely.
21643
21644         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21645         NamespaceEntry.Lookup().
21646
21647 2003-07-25  Martin Baulig  <martin@ximian.com>
21648
21649         * MethodCore.cs (OverridesSomething): New public field; it's set
21650         from TypeContainer.DefineMembers if this method overrides
21651         something (which doesn't need to be a method).  Fix #39462.
21652
21653 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21654
21655         * typemanager.cs (GetMembers): Ensure that the list of members is
21656         reversed. This keeps things in sync.
21657
21658         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21659         find an AttributeUsage attribute.
21660
21661         * expression.cs (Invocation.OverloadResolve): Perform the check
21662         which disallows Invoke to be directly called on a Delegate.
21663
21664         (Error_InvokeOnDelegate): Report error cs1533.
21665
21666 2003-07-25  Martin Baulig  <martin@ximian.com>
21667
21668         * expression.cs (Indexers.GetIndexersForType): Only look in the
21669         interface hierarchy if the requested type is already an
21670         interface.  Fixes #46788 while keeping #46502 fixed.
21671
21672 2003-07-25  Martin Baulig  <martin@ximian.com>
21673
21674         * class.cs (TypeContainer.DefineMembers): Check whether all
21675         readonly fields have been assigned and report warning CS0649 if
21676         not.
21677
21678         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21679         a valuetype.
21680
21681 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21682
21683         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21684         returned from GetMethods to make things consistent with the
21685         assumptions MCS makes about ordering of methods.
21686
21687         This should comprehensively fix bug #45127 and it does :-)
21688
21689         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21690         ordering is actually reverse.
21691
21692         * Clean up some debug messages I left lying around.
21693
21694         * interface.cs (Populate*): Get rid of code which emits attributes
21695         since the stage in which we emit attributes is the 'Emit' stage,
21696         not the define stage.
21697
21698         (Emit): Move attribute emission for interface members here.
21699
21700 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21701
21702         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21703         closely: we eliminate methods in base types when we have an
21704         applicable method in a top-level type.
21705
21706         Please see section 14.5.5.1 for an exact description of what goes
21707         on. 
21708
21709         This fixes bug #45127 and a host of other related to corlib compilation.
21710
21711         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21712         array is the method corresponding to the top-level type (this is
21713         because of the changes made to icall.c) so we change this
21714         accordingly.
21715
21716         (MethodGroupExpr.Name): This too.
21717
21718         * typemanager.cs (GetElementType): New method which does the right
21719         thing when compiling corlib. 
21720
21721         * everywhere: Make use of the above in the relevant places.
21722
21723 2003-07-22  Martin Baulig  <martin@ximian.com>
21724
21725         * cs-parser.jay (invocation_expression): Moved
21726         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21727         `cast_expression', but create a InvocationOrCast which later
21728         resolves to either an Invocation or a Cast.
21729
21730         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21731         method; call this before EmitStatement() to make sure that this
21732         expression can be used as a statement.
21733
21734         * expression.cs (InvocationOrCast): New class; resolves to either
21735         an Invocation or a Cast.
21736
21737         * statement.cs (StatementExpression): Call ResolveStatement() on
21738         the ExpressionStatement before emitting it.
21739
21740 2003-07-21  Martin Baulig  <martin@ximian.com>
21741
21742         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21743         `ref' and `out' attributes match; fixes #46220.
21744         (MemberAccess.ResolveMemberAccess): You can't reference a type
21745         through an expression; fixes #33180.
21746         (Indexers.GetIndexersForType): Don't return the indexers from
21747         interfaces the class implements; fixes #46502.
21748
21749 2003-07-21  Martin Baulig  <martin@ximian.com>
21750
21751         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21752         CS0661 checks; fixes bug #30442.
21753
21754 2003-07-21  Martin Baulig  <martin@ximian.com>
21755
21756         * decl.cs (AdditionResult): Added `Error'.
21757
21758         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21759
21760         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21761         makes cs0031.cs actually work.
21762
21763 2003-07-20  Martin Baulig  <martin@ximian.com>
21764
21765         * namespace.cs: Fixed that bug which caused a crash when compiling
21766         the debugger's GUI.
21767
21768 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21769
21770         * typemanager.cs (LookupTypeReflection): Never expose types which
21771         are NotPublic, NestedPrivate, NestedAssembly, or
21772         NestedFamANDAssem.  We used to return these, and later do a check
21773         that would report a meaningful error, but the problem is that we
21774         would not get the real match, if there was a name override.
21775
21776 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21777
21778         * namespace.cs (Namespace, Name): Do not compute the namespace
21779         name dynamically, compute it in the constructor.  This reduced
21780         memory usage by 1697 KB.
21781
21782         * driver.cs: Use --pause to pause at the end.
21783
21784 2003-07-17  Peter Williams  <peter@newton.cx>
21785
21786         * Makefile: Change the name of the test target so that it doesn't
21787         conflict with the recursive test target.
21788
21789 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21790
21791         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21792         AddressOf): Do not use EmitThis, that was wrong, use the actual
21793         this pointer.
21794
21795 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21796
21797         * class.cs (MethodData.Define): While checking if a method is an
21798         interface implementation, improve the test: If we are not public
21799         (use new test here: use the computed MethodAttributes directly,
21800         instead of the parsed modifier flags) check if the `implementing'
21801         method comes from an interface or not.
21802
21803         * pending.cs (VerifyPendingMethods): Slightly better error
21804         message.
21805
21806         * makefile: add test target that does the mcs bootstrap.
21807
21808 2003-07-16  Ravi Pratap  <ravi@ximian.com>
21809
21810         * interface.cs (Define): Do nothing here since there are no
21811         members to populate etc. Move the attribute emission out of here
21812         since this was just totally the wrong place to put it. Attribute
21813         application happens during the 'Emit' phase, not in the 'Define'
21814         phase.
21815
21816         (Emit): Add this method and move the attribute emission here
21817
21818         * rootcontext.cs (EmitCode): Call the Emit method on interface
21819         types too.
21820
21821 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21822
21823         * expression.cs (OverloadResolve): Report error only if Location
21824         is not 'Null' which means that there was a probe going on.
21825
21826 2003-07-14  Martin Baulig  <martin@ximian.com>
21827
21828         * expression.cs (ConditionalLogicalOperator): New public class to
21829         implement user defined conditional logical operators.
21830         This is section 14.11.2 in the spec and bug #40505.
21831
21832 2003-07-14  Martin Baulig  <martin@ximian.com>
21833
21834         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
21835
21836 2003-07-14  Martin Baulig  <martin@ximian.com>
21837
21838         * codegen.cs (EmitContext.InFixedInitializer): New public field.
21839
21840         * ecore.cs (IVariable.VerifyFixed): New interface method.
21841
21842         * expression.cs (Unary.ResolveOperator): When resolving the `&'
21843         operator, check whether the variable is actually fixed.  Fixes bug
21844         #36055.  Set a variable definitely assigned when taking its
21845         address as required by the spec.
21846
21847         * statement.cs (LocalInfo.IsFixed): New field.
21848         (LocalInfo.MakePinned): Set `IsFixed' to true.
21849
21850 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21851
21852         * attribute.cs (Attribute.Resolve): While doing a Member lookup
21853         for .ctors, ensure that we only ask for members declared in the
21854         attribute type (BindingFlags.DeclaredOnly).
21855
21856         Fixes bug #43632.
21857
21858         * expression.cs (Error_WrongNumArguments): Report error 1501
21859         correctly the way CSC does.
21860
21861 2003-07-13  Martin Baulig  <martin@ximian.com>
21862
21863         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
21864         lookup on the fully qualified name, to make things like "X.X" work
21865         where "X.X" is a fully qualified type name, but we also have a
21866         namespace "X" in the using list.  Fixes #41975.
21867
21868 2003-07-13  Martin Baulig  <martin@ximian.com>
21869
21870         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
21871         function. If we're a CompoundAssign, we need to create an embedded
21872         CompoundAssign, not an embedded Assign.
21873         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
21874         Fixes #45854.
21875
21876 2003-07-13  Martin Baulig  <martin@ximian.com>
21877
21878         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
21879         work to fix bug #46088.
21880
21881 2003-07-13  Ravi Pratap <ravi@ximian.com>
21882
21883         * class.cs (Operator.Emit): Do not emit attributes here - it is
21884         taken care of by the Method class that we delegate too. This takes
21885         care of bug #45876.
21886
21887 2003-07-10  Martin Baulig  <martin@ximian.com>
21888
21889         * expression.cs (TypeOfVoid): New class.
21890         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
21891
21892 2003-07-10  Martin Baulig  <martin@ximian.com>
21893
21894         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
21895         bug #35957.
21896
21897 2003-07-10  Martin Baulig  <martin@ximian.com>
21898
21899         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
21900         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
21901
21902         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
21903
21904         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
21905
21906 2003-07-10  Martin Baulig  <martin@ximian.com>
21907
21908         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
21909         of decimal.  Fixes #42850.
21910
21911         NOTE: I also fixed the created byte blob, but this doesn't work on
21912         the MS runtime and csc never produces any byte blobs for decimal
21913         arrays.
21914
21915 2003-07-10  Martin Baulig  <martin@ximian.com>
21916
21917         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
21918         structs; fixes #32068.
21919         (Block.AddChildVariableNames): Fixed #44302.
21920
21921 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21922
21923         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
21924
21925 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21926
21927         * attribute.cs: And this test is onger needed.
21928
21929 2003-07-08  Martin Baulig  <martin@ximian.com>
21930
21931         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
21932         inaccessible types.  Fixes #36313.
21933
21934         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
21935
21936         * namespace.cs (NamespaceEntry): Create implicit entries for all
21937         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
21938         implicit entries for N1.N2 and N1.
21939
21940 2003-07-08  Martin Baulig  <martin@ximian.com>
21941
21942         Rewrote the handling of namespaces to fix a lot of the issues
21943         wrt. `using' aliases etc.
21944
21945         * namespace.cs (Namespace): Splitted this class into a
21946         per-assembly `Namespace' and a per-file `NamespaceEntry'.
21947
21948         * typemanager.cs (TypeManager.IsNamespace): Removed.
21949         (TypeManager.ComputeNamespaces): Only compute namespaces from
21950         loaded assemblies here, not the namespaces from the assembly we're
21951         currently compiling.
21952
21953 2003-07-08  Martin Baulig  <martin@ximian.com>
21954
21955         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
21956
21957 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21958
21959         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
21960         already fixed it.  
21961
21962         I thought about the memory savings here, but LookupTypeReflection
21963         is used under already very constrained scenarios.  Compiling
21964         corlib or mcs only exposes one hit, so it would not really reduce
21965         any memory consumption.
21966
21967 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21968
21969         * typemanager.cs: fixes bug #45889 by only adding public types from
21970         other assemblies to the list of known types.
21971
21972 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21973
21974         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
21975         on the type we resolved.
21976
21977 2003-07-05  Martin Baulig  <martin@ximian.com>
21978
21979         * pending.cs (PendingImplementation.ParentImplements): Don't
21980         create the proxy if the parent is abstract.
21981
21982         * class.cs (TypeContainer.DefineIndexers): Process explicit
21983         interface implementations first.  Fixes #37714.
21984
21985 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
21986
21987         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
21988         defined recursively;  but since we modify the input parameters
21989         (left is set to `this' temporarily), we reset this value if the
21990         left_is_explicit is false, which gives the original semantics to
21991         the code.  
21992
21993         * literal.cs (NullPointer): new class used to represent a null
21994         literal in a pointer context.
21995
21996         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
21997         type is a pointer, use a NullPointer object instead of a
21998         NullLiteral.   Closes 43687
21999
22000         (ExplicitConversion): Convert pointer values using
22001         the conv opcode to the proper type.
22002
22003         * ecore.cs (New): change ValueTypeVariable property into a method,
22004         that returns whether the valuetype is suitable for being used.
22005
22006         * expression.cs (Binary.DoNumericPromotions): Only return if we
22007         the int constant was a valid uint, and we can return both left and
22008         right as uints.  If not, we continue processing, to trigger the
22009         type conversion.  This fixes 39018.
22010
22011         * statement.cs (Block.EmitMeta): During constant resolution, set
22012         the CurrentBlock property on the emitcontext, so that we resolve
22013         constants propertly.
22014
22015 2003-07-02  Martin Baulig  <martin@ximian.com>
22016
22017         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
22018         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
22019
22020         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
22021         than emitting it here.
22022
22023         * statement.cs: Fixed some more flow analysis bugs.
22024
22025 2003-07-02  Martin Baulig  <martin@ximian.com>
22026
22027         * class.cs (MethodData.Define): When implementing interface
22028         methods, set Final unless we're Virtual.
22029
22030         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
22031         check work for interface methods.
22032
22033 2003-07-01  Martin Baulig  <martin@ximian.com>
22034
22035         * ecore.cs (EmitContext.This): Replaced this property with a
22036         GetThis() method which takes a Location argument.  This ensures
22037         that we get the correct error location for a CS0188.
22038
22039 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
22040
22041         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
22042         ImplicitStandardConversion.
22043
22044         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
22045
22046 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
22047
22048         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
22049         optimization.
22050
22051 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
22052
22053         * class.cs (Constructor.Define): Turn off initlocals for unsafe
22054         constructors.
22055
22056         (MethodData.Define): Turn off initlocals for unsafe methods.
22057
22058 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
22059
22060         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
22061         complete;  Fixes #37521.
22062
22063         * delegate.cs: Use Modifiers.TypeAttr to compute the
22064         TypeAttributes, instead of rolling our own.  This makes the flags
22065         correct for the delegates.
22066
22067 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
22068
22069         * class.cs (Constructor.Define): Set the private flag for static
22070         constructors as well.
22071
22072         * cs-parser.jay (statement_expression): Set the return value to
22073         null, to avoid a crash when we catch an error.
22074
22075 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
22076
22077         * cs-parser.jay: Applied patch from Jackson that adds support for
22078         extern and unsafe modifiers to destructor declarations.
22079
22080         * expression.cs: Report error 21 if the user is trying to index a
22081         System.Array.
22082
22083         * driver.cs: Add an error message, suggested by the bug report.
22084
22085         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
22086         if we do not have a ": this ()" constructor initializer.  Fixes 45149
22087
22088 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
22089
22090         * namespace.cs: Add some information to reduce FAQs.
22091
22092 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
22093
22094         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
22095         underlying enumeration types.  Fixes #43915.
22096
22097         * expression.cs: Treat ushort/short as legal values to be used in
22098         bitwise operations.
22099
22100 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22101
22102         * delegate.cs: transfer custom attributes for paramenters from
22103         the delegate declaration to Invoke and BeginInvoke.
22104
22105 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22106
22107         * attribute.cs: handle custom marshalers and emit marshal info
22108         for fields, too.
22109
22110 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
22111
22112         * makefile.gnu: Added anonymous.cs to the compiler sources.
22113
22114 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
22115
22116         * iterators.cs: Change the name of the proxy class to include two
22117         underscores.
22118
22119         * cs-parser.jay: Update grammar to include anonymous methods.
22120
22121         * anonymous.cs: new file.
22122
22123 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
22124
22125         * class.cs (Field.Define): Add missing test for pointers and
22126         safety. 
22127
22128 2003-05-27  Ravi Pratap  <ravi@ximian.com>
22129
22130         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
22131         we use the stobj opcode.
22132
22133         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
22134         since it wasn't the correct fix. 
22135
22136         It still is puzzling that we are required to use stobj for IntPtr
22137         which seems to be a ValueType.
22138
22139 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
22140
22141         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
22142         during regular simple name resolution.   Now, the trick is that
22143         instead of returning for processing the simplename, we do a
22144         TypeManager.LookupType (ie, a rooted lookup as opposed to a
22145         contextual lookup type).   If a match is found, return that, if
22146         not, return for further composition.
22147
22148         This fixes long-standing 30485.
22149
22150         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
22151         using the address to initialize an object, do an Stobj instead of
22152         using the regular Stelem.
22153
22154         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
22155         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
22156         Because if we are a BaseIndexerAccess that value will be true.
22157         Fixes 43643.
22158
22159         * statement.cs (GotoCase.Resolve): Return after reporting an
22160         error, do not attempt to continue. 
22161
22162         * expression.cs (PointerArithmetic.Emit): If our operand is a
22163         long, convert our constants to match the operand before
22164         multiplying.  Convert to I type before adding.   Fixes 43670.
22165
22166 2003-05-14  Ravi Pratap  <ravi@ximian.com>
22167
22168         * enum.cs (ImplicitConversionExists) : Rename to
22169         ImplicitEnumConversionExists to remove ambiguity. 
22170
22171         * ecore.cs (NullCast): New type of cast expression class which
22172         basically is very similar to EmptyCast with the difference being
22173         it still is a constant since it is used only to cast a null to
22174         something else
22175         (eg. (string) null)
22176
22177         * convert.cs (ImplicitReferenceConversion): When casting a null
22178         literal, we return a NullCast.
22179
22180         * literal.cs (NullLiteralTyped): Remove - I don't see why this
22181         should be around anymore.
22182
22183         The renaming (reported was slightly wrong). Corrections:
22184
22185         ConvertImplicitStandard -> ImplicitConversionStandard
22186         ConvertExplicitStandard -> ExplicitConversionStandard
22187
22188         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
22189         before passing them in !
22190
22191         * convert.cs (ImplicitConversionStandard): When comparing for
22192         equal expr and target types, ensure that expr is not a
22193         NullLiteral.
22194
22195         In general, we must not be checking (expr_type ==
22196         target_type) in the top level conversion methods
22197         (ImplicitConversion, ExplicitConversion etc). This checking is
22198         done in the methods that they delegate to.
22199
22200 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
22201
22202         * convert.cs: Move Error_CannotConvertType,
22203         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
22204         ImplicitNumericConversion, ImplicitConversionExists,
22205         ImplicitUserConversionExists, StandardConversionExists,
22206         FindMostEncompassedType, FindMostSpecificSource,
22207         FindMostSpecificTarget, ImplicitUserConversion,
22208         ExplicitUserConversion, GetConversionOperators,
22209         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
22210         TryImplicitIntConversion, Error_CannotConvertImplicit,
22211         ConvertImplicitRequired, ConvertNumericExplicit,
22212         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
22213         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
22214         its own file.
22215
22216         Perform the following renames:
22217
22218         StandardConversionExists -> ImplicitStandardConversionExists
22219         ConvertImplicit -> ImplicitConversion
22220         ConvertImplicitStandard -> ImplicitStandardConversion
22221         TryImplicitIntConversion -> ImplicitIntConversion
22222         ConvertImplicitRequired -> ImplicitConversionRequired
22223         ConvertNumericExplicit -> ExplicitNumericConversion
22224         ConvertReferenceExplicit -> ExplicitReferenceConversion
22225         ConvertExplicit -> ExplicitConversion
22226         ConvertExplicitStandard -> ExplicitStandardConversion
22227
22228 2003-05-19  Martin Baulig  <martin@ximian.com>
22229
22230         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22231         (TypeInfo): Added support for structs having structs as fields.
22232
22233         * ecore.cs (FieldExpr): Implement IVariable.
22234         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22235         VariableInfo for the field.
22236
22237 2003-05-18  Martin Baulig  <martin@ximian.com>
22238
22239         * expression.cs (This.DoResolve): Report a CS0027 if we're
22240         emitting a field initializer.
22241
22242 2003-05-18  Martin Baulig  <martin@ximian.com>
22243
22244         * expression.cs (This.ResolveBase): New public function.
22245         (This.DoResolve): Check for CS0188.
22246
22247         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22248         This.Resolve().
22249
22250         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22251         `instance_expression' to null if we don't have any non-static
22252         methods.
22253
22254 2003-05-18  Martin Baulig  <martin@ximian.com>
22255
22256         Reworked the way how local variables and parameters are handled by
22257         the flow analysis code.
22258
22259         * statement.cs (TypeInfo, VariableMap): New public classes.
22260         (VariableInfo): New public class.  This is now responsible for
22261         checking whether a variable has been assigned.  It is used for
22262         parameters and local variables.
22263         (Block.EmitMeta): Take the InternalParameters as argument; compute
22264         the layout of the flow vectors here.
22265         (Block.LocalMap, Block.ParameterMap): New public properties.
22266         (FlowBranching): The .ctor doesn't get the InternalParameters
22267         anymore since Block.EmitMeta() now computes the layout of the flow
22268         vector.
22269         (MyStructInfo): This class is now known as `StructInfo' and nested
22270         in `TypeInfo'; we don't access this directly anymore.
22271
22272         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22273         property and removed IsAssigned(), IsFieldAssigned(),
22274         SetAssigned() and SetFieldAssigned(); we now call them on the
22275         VariableInfo so we don't need to duplicate this code everywhere.
22276
22277         * expression.cs (ParameterReference): Added `Block block' argument
22278         to the .ctor.
22279         (LocalVariableReference, ParameterReference, This): The new
22280         VariableInfo class is now responsible for all the definite
22281         assignment stuff.
22282
22283         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22284         IsParameterAssigned, SetParameterAssigned): Removed.
22285
22286 2003-05-18  Martin Baulig  <martin@ximian.com>
22287
22288         * typemanager.cs (InitCoreTypes): Try calling
22289         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22290         the 3-args-version.  Corlib now also needs our `void_type'.
22291         (GetMethod): Added overloaded version which takes an optional
22292         `bool report_errors' to allow lookups of optional methods.
22293
22294 2003-05-12  Martin Baulig  <martin@ximian.com>
22295
22296         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22297         only used for locals and not for parameters.
22298
22299 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22300
22301         * support.cs (InternalParameters.ParameterType): Return the
22302         ExternalType of the parameter.
22303
22304         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22305         they were unused.
22306
22307 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22308
22309         * class.cs (MethodData.Define): Do not set the `newslot' on
22310         interface members, if they are also flagged as "override".
22311
22312         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22313         better code for ++i and i++.  This only works for static fields
22314         and local variables.
22315
22316         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22317         want to pull the DeclSpace out of the builder_to_declspace instead
22318         of the TypeBuilder (like in TypeContainer.FindMembers).
22319
22320         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22321         instead of LookupTypeContainer.  Fixes the crash on .NET for
22322         looking up interface members.
22323
22324         * const.cs: Create our own emit context during the Definition
22325         stage, so that constants are evaluated in the proper context, when
22326         a recursive definition happens.
22327
22328 2003-05-11  Martin Baulig  <martin@ximian.com>
22329
22330         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22331         new block for a switch section.
22332         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22333         the adding/lookup in the switch block.  Fixes #39828.
22334
22335 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22336
22337         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22338         functionality: I needed to convert the data after I had performed
22339         the add/sub operation into the operands type size.
22340
22341         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22342         pass the type for the box operation, otherwise the resulting
22343         object would have been of type object.
22344
22345         (BoxedCast): Add constructor to specify the type to box as.
22346
22347 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22348
22349         * iterators.cs: I was reusing the `count' variable inadvertently,
22350         take steps to not allow this to happen.
22351
22352 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22353
22354         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22355         by creating an array at the point where the params starts and
22356         putting all those arguments there, then adjusting the size of the
22357         array.
22358
22359 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22360
22361         * expression.cs (New.AddressOf): Implement interface
22362         IMemoryLocation.  This is used when the `new' operator is used in
22363         the context of an invocation to a method on a value type.
22364
22365         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22366         example. 
22367
22368         * namespace.cs: Also check the using aliases here.
22369
22370         * driver.cs: Move the test for using validity after the types have
22371         been entered, so we do a single pass that also includes the using
22372         aliases. 
22373
22374         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22375         in the regular case.   CreateSiblingForFinally is doing extra
22376         error checking.
22377
22378         * attribute.cs (GetAttributeArgumentExpression): Store the result
22379         on an out value, and use the return value to indicate failure
22380         instead of using null (which is a valid return for Constant.GetValue).
22381
22382         * statement.cs: Perform the analysis flow for the increment
22383         portion after the statement, because this will be the real flow of
22384         execution.  Fixes #42385
22385
22386         * codegen.cs (EmitContext.EmitArgument,
22387         EmitContext.EmitStoreArgument): New helper functions when the
22388         RemapToProxy flag is set.
22389
22390         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22391         function.
22392
22393         Add support for remapping parameters. 
22394
22395         * iterators.cs: Propagate parameter values;  Store parameter
22396         values in the proxy classes.
22397
22398 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22399
22400         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22401         need a proxy reference;  I do not know what I was thinking
22402
22403         * cs-parser.jay (constructor_initializer): catch another error,
22404         and display nice message.
22405
22406         (field_declaration): catch void field declaration
22407         to flag a better error. 
22408
22409         * class.cs (MemberBase.CheckBase): Report an error instead of a
22410         warning if a new protected member is declared in a struct. 
22411         (Field.Define): catch the error of readonly/volatile.
22412
22413         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22414
22415         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22416         volatile variable is taken
22417
22418 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22419
22420         * statement.cs (Fixed.Resolve): Report an error if we are not in
22421         an unsafe context.
22422
22423 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22424
22425         * typemanager.cs: reuse the code that handles type clashes for
22426         delegates and enumerations.
22427
22428         * class.cs (Report28): Always report.
22429
22430         * expression.cs (EncodeAsAttribute): Allow nulls here.
22431
22432 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22433
22434         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22435         the functionality for testing whether an expression is valid for
22436         an attribute here.  Also handle the case of arrays of elements
22437         being stored. 
22438
22439         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22440         encoding a linear array into an array of objects that are suitable
22441         to be passed to an CustomAttributeBuilder.
22442
22443         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22444
22445         * ecore.cs: (FieldExpr): Handle field remapping here.
22446
22447         * iteratators.cs: Pass the instance variable (if the method is an
22448         instance method) to the constructors, so we can access the field
22449         variables on the class.
22450
22451         TODO: Test this with structs.  I think the THIS variable on
22452         structs might have to be a pointer, and not a refenrece
22453
22454 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22455
22456         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22457         local variables to fields in a proxy class.
22458
22459         * iterators.cs (PopulateProxy): Rename our internal fields to
22460         <XXX>.  
22461         Create a <THIS> field if we are an instance method, so we can
22462         reference our parent container variables.
22463         (MapVariable): Called back from the EmitContext code to enter a
22464         new variable to field mapping into the proxy class (we just create
22465         a FieldBuilder).
22466
22467         * expression.cs
22468         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22469         for using the remapped locals to fields.
22470
22471         I placed the code here, because that gives the same semantics to
22472         local variables, and only changes the Emit code.
22473
22474         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22475         statements inside iterators.
22476         (VariableInfo): Add a FieldBuilder for the cases when we are
22477         remapping local variables to fields in a proxy class
22478
22479         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22480         current_block != null.
22481
22482         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22483         not cope with strings, as it has been moved to the
22484         TableSwitchEmit.  Fixed bug in switch generation.
22485
22486         * expression.cs (New.DoResolve): Provide more context for the user
22487         when reporting an error.
22488
22489         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22490         pointers. 
22491
22492         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22493         check the permissions for it.  Note than in a type-resolution
22494         context the check was already present in DeclSpace.ResolveType,
22495         but was missing from the MemberAccess.
22496
22497         (ArrayCreation.CheckIndices): warn if the user has
22498         more nested levels of expressions, but there are no more
22499         dimensions specified.  Avoids crash on bug 41906.
22500
22501 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22502
22503         * statement.cs (Block): replace Implicit bool, for a generic
22504         flags.   
22505         New flag: `Unchecked'.  This is used during the EmitMeta phase
22506         (which is out-of-line with the regular Resolve/Emit process for a
22507         statement, as this is done ahead of time, but still gets a chance
22508         to call constant resolve).
22509
22510         (Block.Flags): new enum for adding a new flag.
22511
22512         (Block.EmitMeta): track the state of unchecked.
22513
22514         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22515         to enable constant resolution to work there as well.
22516
22517 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22518
22519         * typemanager.cs (ienumerable_type): Also look up
22520         System.Collections.IEnumerable. 
22521
22522 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22523
22524         TODO: Test more than one conditional per method.
22525
22526         * class.cs (Indexer.Define): Report the location where the user is
22527         referencing the unsupported feature.
22528
22529         (MethodData): Overload the use of `conditionals' to
22530         minimize the creation of needless ArrayLists.   This saves roughly
22531         212kb on my machine.
22532
22533         (Method): Implement the new IIteratorContainer interface.
22534         (Method.SetYields): Implement the method by setting the ModFlags
22535         to contain METHOD_YIELDS.
22536
22537         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22538         which just got set to null.
22539
22540         * iterators.cs: New file.
22541
22542         (Yield, YieldBreak): New statements.
22543
22544         * statement.cs (Return.Resolve): Flag an error if we are used in
22545         an iterator method.
22546
22547         * codegen.cs (InIterator): New flag set if the code is being
22548         compiled in an iterator method.
22549
22550         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22551         internal modifier, and we just use it to avoid adding extra
22552         fields, as this is seldom used.  
22553
22554         * cs-parser.jay: Add yield_statement (yield and yield break).
22555
22556         * driver.cs: New flag -v2 to turn on version 2 features. 
22557
22558         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22559         hashtable when v2 is enabled.
22560
22561 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22562
22563         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22564         there is already a namespace defined with this name.
22565
22566         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22567         people upgraded their corlibs.
22568
22569         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22570         always use fully qualified types, no need to use the compiler
22571         front end.
22572
22573         (TypeManager.IsNamespace): Use binarysearch.
22574
22575         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22576         AddDelegate): I did not quite use the new IsValid API properly: I
22577         have to pass the short-name and the fullname.  I was passing only
22578         the basename instead of the fullname sometimes. 
22579
22580         (TypeContainer.DefineType): call NamespaceClash.
22581
22582         * interface.cs (Interface.DefineType): use NamespaceClash before
22583         defining the type.
22584
22585         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22586         defining the type.
22587
22588         * enum.cs: (Enum.DefineType): use NamespaceClash before
22589         defining the type.
22590
22591         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22592         speed increase.  First, use the negative_hits cache when we get a
22593         negative.  Second, add the type with its full original name
22594         instead of the new . and + encoded name (reflection uses + to
22595         separate type from a nested type).  Use LookupTypeReflection
22596         directly which bypasses the type->name hashtable (that we already
22597         know does not contain the type.
22598
22599         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22600         location/container type. 
22601
22602         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22603
22604 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22605
22606         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22607
22608         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22609         method is being referenced in the method group from a static
22610         context, and report error 120 if so.
22611
22612         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22613         Error118. 
22614
22615         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22616         is created, we create the A namespace).
22617
22618         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22619         Fixes #41591
22620
22621 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22622
22623         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22624         invocation to ModuleBuilder.GetType with the same values will
22625         return a new type instance, so we need to cache its return
22626         values. 
22627
22628         * expression.cs (Binary.ResolveOperator): Only allow the compare
22629         operators on enums if they are of the same type.
22630
22631         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22632         types of ValueType on their own case.  Before we were giving them
22633         the same treatment as objects.
22634
22635         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22636         fullname.  Short name is used to compare against container name.
22637         Fullname is used to check against defined namespace names.
22638
22639         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22640         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22641
22642         (Method.CheckBase): Call parent.
22643         (MemberBase.CheckBase): Check for protected members on sealed
22644         classes.
22645         (PropertyBase.CheckBase): Call parent.
22646         (Field.Define): Call parent.
22647
22648         * report.cs: Negative error codes are now mapped to 8000 - code,
22649         so that the display is render more nicely.
22650
22651         * typemanager.cs: Do not use try/catch, instead report a regular
22652         error. 
22653
22654         (GetPointerType, GetReferenceType): These methods provide
22655         mechanisms to obtain the T* and T& from a T.  We had the code
22656         previously scattered around the code base, and it also used
22657         TypeManager.LookupType that would go through plenty of caches.
22658         This one goes directly to the type source.
22659
22660         In some places we did the Type.GetType followed by
22661         ModuleBuilder.GetType, but not in others, so this unifies the
22662         processing as well.
22663
22664         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22665         statements now that we have namespace information.
22666
22667         * typemanager.cs (IsNamespace): New method, returns whether the
22668         string presented is a namespace or not.
22669
22670         (ComputeNamespaces): New public entry point, computes the list of
22671         available namespaces, using the GetNamespaces API call in Mono, or
22672         the slower version in MS.NET.   
22673
22674         Now before we start the semantic analysis phase, we have a
22675         complete list of namespaces including everything that the user has
22676         provided.
22677
22678         Deleted old code to cache namespaces in .nsc files.
22679
22680 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22681
22682         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22683         class/struct location definition Location for the implicit
22684         constructor location.
22685
22686         (Operator.Define): Use the location of the operator for the
22687         implicit Method definition.
22688
22689         (Constructor.Emit): use the constructor location for the implicit
22690         base initializer constructor.
22691
22692         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22693         and the Expression class now contains two new methods:
22694
22695         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22696         isolate type lookup from the rest of the resolution process.
22697
22698         Since we use Expressions to hold type definitions due to the way
22699         we parse the input we have historically overloaded Resolve to
22700         perform the Type lookups if a special flag is passed.  Now this is
22701         eliminated and two methods take their place. 
22702
22703         The differences in the two methods between xStep and xTerminal is
22704         that xStep is involved in our current lookup system that uses
22705         SimpleNames to compose a name, while xTerminal is used just to
22706         catch the case where the simplename lookup failed.
22707
22708 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22709
22710         * expression.cs (ResolveMemberAccess): Remove redundant code.
22711         TypeExpr expressions are always born fully resolved.
22712
22713         * interface.cs (PopulateMethod): Do not lookup the types twice.
22714         We were doing it once during SemanticAnalysis and once during
22715         PopulateMethod.
22716
22717         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22718         in local variable type definitions, were being returned as a
22719         SimpleName (we decomposed everything into a string), that is
22720         because primary_expression was being used instead of a type in the
22721         grammar (reduce/reduce conflicts).
22722
22723         The part that was wrong is that we converted the expression into a
22724         string (an oversimplification in one hand, compounded with primary
22725         expressions doing string concatenation).
22726
22727         So things like:
22728
22729         A.B.C [] x;
22730
22731         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22732         using clauses from working on this particular context.  And a type
22733         was being matched directly against "A.B.C[]".
22734
22735         We now use the correct approach, and allow for ComposedCast to be
22736         part of the unary expression.  So the "A.B.C []" become a composed
22737         cast of "A.B.C" (as a nested group of MemberAccess with a
22738         SimpleName at the end) plus the rank composition "[]". 
22739
22740         Also fixes 35567
22741
22742 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22743
22744         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22745         for the access level checking.
22746
22747         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22748         `TypeContainer container', because I kept getting confused when I
22749         was debugging this code.
22750
22751         * expression.cs (Indexers): Instead of tracking getters/setters,
22752         we now track them in parallel.  We create one arraylist less, but
22753         most importantly it is possible now for the LValue code to find a
22754         matching get for a set.
22755
22756         (IndexerAccess.DoResolveLValue): Update the code.
22757         GetIndexersForType has been modified already to extract all the
22758         indexers from a type.  The code assumed it did not.
22759
22760         Also make the code set the correct return type for the indexer.
22761         This was fixed a long time ago for properties, but was missing for
22762         indexers.  It used to be void_type.
22763
22764         (Binary.Emit): Test first for doubles instead of
22765         floats, as they are more common.
22766
22767         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22768         when dealing with floats and the <=, >= operators.  This fixes bug
22769         #39314 
22770
22771         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22772         to load the array value by emitting a load on the foreach variable
22773         type.  This was incorrect.  
22774
22775         We now emit the code to load an element using the the array
22776         variable type, and then we emit the conversion operator.
22777
22778         Fixed #40176
22779
22780 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22781
22782         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22783
22784 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22785
22786         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22787         test for protection before we test for signatures. 
22788
22789         (MethodSignature.ToString): implement.
22790
22791         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22792         to the case where we reduced into a LongConstant.
22793
22794         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22795         depend on whether the information is acurrate, because the
22796         Microsoft runtime will always claim that the array type is public,
22797         regardless of the real state.
22798
22799         If the type is a pointer, another problem happens: the type is
22800         reported as non-public in Microsoft.  
22801
22802         In both cases we have to call CheckAccessLevel recursively with
22803         the underlying type as the argument to be tested.
22804
22805 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22806
22807         * assign.cs (Assign.Emit): If we are dealing with a compound
22808         assignment expression, we should use the code path that stores the
22809         intermediate result in a temporary value.  This fixes #40903.
22810
22811         *expression.cs (Indirection.ToString): Provide ToString method for
22812         debugging. 
22813
22814 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
22815
22816         * class.cs: Null out fields holding references to Block objects so
22817         they can be garbage collected.
22818
22819         * expression.cs (OverloadResolve): Remove unused local.
22820
22821 2003-04-07  Martin Baulig  <martin@ximian.com>
22822
22823         * codegen.cs (EmitContext.CurrentFile): New public field.
22824         (EmitContext.Mark): Use the CurrentFile to check whether the
22825         location is in the correct file.
22826         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
22827
22828 2003-04-07  Martin Baulig  <martin@ximian.com>
22829
22830         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
22831
22832         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
22833         location.  [FIXME: The location argument which gets passed to this
22834         method is sometimes wrong!]
22835
22836 2003-04-07  Nick Drochak <ndrochak@gol.com>
22837
22838         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
22839
22840 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
22841
22842         * expression.cs (Indirection.EmitAssign): We were using the
22843         temporary, but returning immediately instead of continuing the
22844         EmitAssing flow.
22845
22846 2003-04-06  Martin Baulig  <martin@ximian.com>
22847
22848         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
22849         if it's a nested child, but also deriving from the outer class.
22850         See test 190.cs.
22851
22852         * typemanager.cs (IsNestedChildOf): Make this work if it's a
22853         nested child, but also deriving from the outer class.  See
22854         test-190.cs.
22855         (FilterWithClosure): We may access private members of the outer
22856         class if we're a nested child and deriving from the outer class.
22857         (RealMemberLookup): Only set `closure_private_ok' if the
22858         `original_bf' contained BindingFlags.NonPublic.
22859
22860 2003-04-05  Martin Baulig  <martin@ximian.com>
22861
22862         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
22863
22864 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
22865
22866         * class.cs (Event.Define): Do not allow abstract events to have
22867         initializers. 
22868
22869 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
22870
22871         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
22872         block in event declarations.
22873
22874         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
22875         value type, get its address.
22876
22877         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
22878         leaving a class on the stack instead of a boolean value (int
22879         0/1).  Change the code so we compare against null, and then the
22880         result against zero.
22881
22882         * class.cs (TypeContainer.GetClassBases): We were checking for the
22883         parent class being sealed too late.
22884
22885         * expression.cs (Binary.Emit): For <= and >= when dealing with
22886         floating point values, use cgt.un and clt.un instead of cgt and
22887         clt alone.
22888
22889 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
22890
22891         * statement.cs: Apply the same optimization as MS: skip the 
22892         GetEnumerator returning an IEnumerator, and use the one returning a 
22893         CharEnumerator instead. This allows us to avoid the try-finally block 
22894         and the boxing.
22895
22896 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
22897
22898         * cs-parser.jay: Attributes cannot be applied to
22899                          namespaces. Fixes #40473
22900
22901 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22902
22903         * class.cs:
22904         (Add*): check if the name is valid using the full name for constants,
22905         fields, properties and events.
22906
22907 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
22908
22909         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
22910         char constants to be part of the enumeration.
22911
22912         * expression.cs (Conditional.DoResolve): Add support for operator
22913         true. Implements the missing functionality from 14.12
22914
22915         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
22916         operator true/false as required by the spec.
22917
22918         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
22919         implicit conversion to boolean.
22920
22921         * statement.cs (Statement.ResolveBoolean): A boolean expression is
22922         also one where the type implements `operator true'. 
22923
22924         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
22925         get an expression that will invoke operator true based on an
22926         expression.  
22927
22928         (GetConversionOperators): Removed the hack that called op_True
22929         here.  
22930
22931         (Expression.ResolveBoolean): Move this from Statement.
22932
22933 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
22934
22935         * ecore.cs (FieldExpr): do not allow initialization of initonly
22936         fields on derived classes
22937
22938 2003-03-13  Martin Baulig  <martin@ximian.com>
22939
22940         * statement.cs (Block.Emit): Call ig.BeginScope() and
22941         ig.EndScope() when compiling with debugging info; call
22942         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
22943
22944 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
22945
22946         * expression.cs (Indexers): Do not construct immediately, allow
22947         for new members to be appended as we go.  Fixes 38143
22948
22949 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22950
22951         * expression.cs: save/restore context when resolving an unchecked
22952         expression.
22953
22954 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
22955
22956         * cfold.cs: Catch division by zero in modulus operator during
22957         constant folding.
22958
22959 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
22960
22961         * interface.cs (Interface.DefineMembers): Avoid defining members
22962         twice. 
22963
22964 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
22965
22966         * driver.cs: handle the +/- options for -noconfig
22967
22968         * statement.cs (Unckeched.Resolve): Also track the state of
22969         unchecked in the Resolve phase.
22970
22971 2003-02-27  Martin Baulig  <martin@ximian.com>
22972
22973         * ecore.cs (Expression.MemberLookup): Don't create a
22974         MethodGroupExpr for something which is not a method.  Fixes #38291.
22975
22976 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
22977
22978         * class.cs (MemberBase.CheckParameters): Also check that the type
22979         is unmanaged if it is a pointer.
22980
22981         * expression.cs (SizeOf.Resolve): Add location information.
22982
22983         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
22984         a managed type is declared.
22985
22986         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
22987         parameter modifiers as well.  Fixes bug 38606
22988
22989         * class.cs: Very sad.  Am backing out the speed up changes
22990         introduced by the ArrayList -> Array in the TypeContainer, as they
22991         were not actually that much faster, and introduced a bug (no error
22992         reports on duplicated methods).
22993
22994         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
22995         source first, this will guarantee that we have a valid expression
22996         before calling in lower levels functions that will require a
22997         resolved object.  Then use this original_source in the
22998         target.ResolveLValue instead of the original source that was
22999         passed to us.
23000
23001         Another change.  Use target.Resolve instead of LValueResolve.
23002         Although we are resolving for LValues, we will let the Assign code
23003         take care of that (it will be called again from Resolve).  This
23004         basically allows code like this:
23005
23006         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
23007         class Y { void A (X x) { x [0] += o; }
23008
23009         The problem was that the indexer was trying to resolve for
23010         set_Item (idx, object o) and never finding one.  The real set_Item
23011         was set_Item (idx, X).  By delaying the process we get the right
23012         semantics. 
23013
23014         Fixes bug 36505
23015
23016 2003-02-23  Martin Baulig  <martin@ximian.com>
23017
23018         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
23019         while calling DoEmit ().
23020
23021         * codegen.cs (EmitContext.Mark): Don't mark locations in other
23022         source files; if you use the #line directive inside a method, the
23023         compiler stops emitting line numbers for the debugger until it
23024         reaches the end of the method or another #line directive which
23025         restores the original file.
23026
23027 2003-02-23  Martin Baulig  <martin@ximian.com>
23028
23029         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
23030
23031 2003-02-23  Martin Baulig  <martin@ximian.com>
23032
23033         * statement.cs (Block.AddChildVariableNames): We need to call this
23034         recursively, not just for our immediate children.
23035
23036 2003-02-23  Martin Baulig  <martin@ximian.com>
23037
23038         * class.cs (Event.Define): Always make the field private, like csc does.
23039
23040         * typemanager.cs (TypeManager.RealMemberLookup): Make events
23041         actually work, fixes bug #37521.
23042
23043 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
23044
23045         * delegate.cs: When creating the various temporary "Parameters"
23046         classes, make sure that we call the ComputeAndDefineParameterTypes
23047         on those new parameters (just like we do with the formal ones), to
23048         allow them to be resolved in the context of the DeclSpace.
23049
23050         This fixes the bug that Dick observed in Bugzilla #38530.
23051
23052 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
23053
23054         * expression.cs (ResolveMemberAccess): When resolving a constant,
23055         do not attempt to pull a constant if the value was not able to
23056         generate a valid constant.
23057
23058         * const.cs (LookupConstantValue): Do not report more errors than required.
23059
23060 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23061
23062         * expression.cs: fixes bug #38328.
23063
23064 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23065
23066         * class.cs: Changed all the various members that can be part of a
23067         class from being an ArrayList to be an Array of the right type.
23068         During the DefineType type_list, interface_list, delegate_list and
23069         enum_list are turned into types, interfaces, delegates and enums
23070         arrays.  
23071
23072         And during the member population, indexer_list, event_list,
23073         constant_list, field_list, instance_constructor_list, method_list,
23074         operator_list and property_list are turned into their real arrays.
23075
23076         Although we could probably perform this operation earlier, for
23077         good error reporting we need to keep the lists and remove the
23078         lists for longer than required.
23079
23080         This optimization was triggered by Paolo profiling the compiler
23081         speed on the output of `gen-sample-program.pl' perl script. 
23082
23083         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
23084         not crash in methods like MemberLookupFailed that use this field.  
23085
23086         This problem arises when the compiler fails to resolve a type
23087         during interface type definition for example.
23088
23089 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
23090
23091         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
23092         inherit from System.Object, so we have to stop at null, not only
23093         when reaching System.Object.
23094
23095 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
23096
23097         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
23098         DeclaredOnly because the parent indexer might have had a different
23099         name, but did not loop until the top of the hierarchy was reached.
23100
23101         The problem this one fixes is 35492: when a class implemented an
23102         indexer from an interface, we were getting the interface method
23103         (which was abstract) and we were flagging an error (can not invoke
23104         abstract method).
23105
23106         This also keeps bug 33089 functioning, and test-148 functioning.
23107
23108         * typemanager.cs (IsSpecialMethod): The correct way of figuring
23109         out if a method is special is to see if it is declared in a
23110         property or event, or whether it is one of the predefined operator
23111         names.   This should fix correctly #36804.
23112
23113 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
23114
23115         The goal here is to remove the dependency on EmptyCast.Peel ().
23116         Killing it completely.
23117
23118         The problem is that currently in a number of places where
23119         constants are expected, we have to "probe" for an EmptyCast, and
23120         Peel, which is not the correct thing to do, as this will be
23121         repetitive and will likely lead to errors. 
23122
23123         The idea is to remove any EmptyCasts that are used in casts that
23124         can be reduced to constants, so we only have to cope with
23125         constants. 
23126
23127         This bug hunt was triggered by Bug 37363 and the desire to remove
23128         the duplicate pattern where we were "peeling" emptycasts to check
23129         whether they were constants.  Now constants will always be
23130         constants.
23131
23132         * ecore.cs: Use an enumconstant here instead of wrapping with
23133         EmptyCast.  
23134
23135         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
23136         throwing me off.  By handling this we can get rid of a few hacks.
23137
23138         * statement.cs (Switch): Removed Peel() code.
23139
23140 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
23141
23142         * class.cs: Location information for error 508
23143
23144         * expression.cs (New.DoResolve): Add a guard against double
23145         resolution of an expression.  
23146
23147         The New DoResolve might be called twice when initializing field
23148         expressions (see EmitFieldInitializers, the call to
23149         GetInitializerExpression will perform a resolve on the expression,
23150         and later the assign will trigger another resolution
23151
23152         This leads to bugs (#37014)
23153
23154         * delegate.cs: The signature for EndInvoke should contain any ref
23155         or out parameters as well.  We were not doing this in the past. 
23156
23157         * class.cs (Field.Define): Do not overwrite the type definition
23158         inside the `volatile' group.  Turns out that volatile enumerations
23159         were changing the type here to perform a validity test, which
23160         broke conversions. 
23161
23162 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
23163
23164         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
23165         and structs, we do not want to load the instance variable
23166
23167         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
23168         enum_type has to be handled like an object reference (implicit
23169         conversions exists from this to object), but the regular IsClass
23170         and IsValueType tests will never return true for this one.
23171
23172         Also we use TypeManager.IsValueType instead of type.IsValueType,
23173         just for consistency with the rest of the code (this is only
23174         needed if we ever use the construct exposed by test-180.cs inside
23175         corlib, which we dont today).
23176
23177 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
23178
23179         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
23180         just InternalCall.
23181
23182 2003-02-09  Martin Baulig  <martin@ximian.com>
23183
23184         * namespace.cs (Namespace..ctor): Added SourceFile argument.
23185         (Namespace.DefineNamespaces): New static public method; this is
23186         called when we're compiling with debugging to add all namespaces
23187         to the symbol file.
23188
23189         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
23190         pass it to the Namespace's .ctor.
23191
23192         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
23193         and MethodBase arguments; pass the namespace ID to the symwriter;
23194         pass the MethodBase instead of the token to the symwriter.
23195         (SymbolWriter.DefineNamespace): New method to add a namespace to
23196         the symbol file.
23197
23198 2003-02-09  Martin Baulig  <martin@ximian.com>
23199
23200         * symbolwriter.cs: New file.  This is a wrapper around
23201         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
23202         methods here in near future.
23203
23204 2003-02-09  Martin Baulig  <martin@ximian.com>
23205
23206         * codegen.cs (EmitContext.Mark): Just pass the arguments to
23207         ILGenerator.MarkSequencePoint() which are actually used by the
23208         symbol writer.
23209
23210 2003-02-09  Martin Baulig  <martin@ximian.com>
23211
23212         * location.cs (SourceFile): New public sealed class.  This
23213         contains the name and an index which is used in the location's token.
23214         (Location): Reserve an appropriate number of bits in the token for
23215         the source file instead of walking over that list, this gives us a
23216         really huge performance improvement when compiling with debugging.
23217
23218         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23219         `SourceFile' argument instead of a string.
23220         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23221         but don't parse/tokenize here, we need to generate the list of all
23222         source files before we do that.
23223         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23224         the files.
23225
23226         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23227         instead of a string.
23228
23229         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23230         of a string.
23231
23232 2003-02-09  Martin Baulig  <martin@ximian.com>
23233
23234         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23235         filename on `#line default'.
23236
23237 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23238
23239         * statement.cs: don't clear the pinned var when the fixed statement
23240         returns from the method (fixes bug#37752).
23241
23242 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23243
23244         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23245         to IsValueType.
23246
23247 2003-02-07  Martin Baulig  <martin@ximian.com>
23248
23249         * driver.cs: Removed the `--debug-args' command line argument.
23250
23251         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23252         automatically by the AsssemblyBuilder.
23253         (CodeGen.InitializeSymbolWriter): We don't need to call any
23254         initialization function on the symbol writer anymore.  This method
23255         doesn't take any arguments.
23256
23257 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23258
23259         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23260         from referenced assemblies as well.
23261
23262 2003-02-02  Martin Baulig  <martin@ximian.com>
23263
23264         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23265
23266 2003-02-02  Martin Baulig  <martin@ximian.com>
23267
23268         * class.cs (Constructor.Emit): Open the symbol writer before
23269         emitting the constructor initializer.
23270         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23271         single-stepping through constructor initializers.
23272
23273 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23274
23275         * class.cs: Handle error 549: do not allow virtual methods in
23276         sealed classes. 
23277
23278 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23279
23280         * decl.cs: Check access levels when resolving types
23281
23282 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23283
23284         * statement.cs: Add parameters and locals set in catch blocks that might 
23285         return to set vector
23286
23287 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23288
23289         * class.cs (Operator): Set the SpecialName flags for operators.
23290
23291         * expression.cs (Invocation.DoResolve): Only block calls to
23292         accessors and operators on SpecialName methods.
23293
23294         (Cast.TryReduce): Handle conversions from char constants.
23295
23296
23297 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23298
23299         * statement.cs: small memory and time optimization in FlowBranching.
23300
23301 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23302
23303         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23304         problem that the last fix but in the other sid (Set).
23305
23306         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23307         access when there is no indexer in the hierarchy.
23308
23309 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23310
23311         * class.cs: Combine some if statements.
23312
23313 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23314
23315         * driver.cs: fixed bug #37187.
23316
23317 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23318
23319         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23320         any indexer, it's needed to build a list with all the indexers in the
23321         hierarchy (AllGetters), else we have problems. Fixes #35653.
23322
23323 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23324
23325         * class.cs (MethodData.Define): It is wrong for an interface
23326         implementation to be static in both cases: explicit and implicit.
23327         We were only handling this in one case.
23328
23329         Improve the if situation there to not have negations.
23330
23331         * class.cs (Field.Define): Turns out that we do not need to check
23332         the unsafe bit on field definition, only on usage.  Remove the test.
23333
23334 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23335
23336         * driver.cs: use assembly.Location instead of Codebase (the latest
23337         patch made mcs fail when using MS assemblies).
23338
23339 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23340
23341         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23342         get the path to *corlib.dll.
23343
23344 2003-01-21  Nick Drochak <ndrochak@gol.com>
23345
23346         * cs-tokenizer.cs:
23347         * pending.cs:
23348         * typemanager.cs: Remove compiler warnings
23349
23350 2003-01-20  Duncan Mak  <duncan@ximian.com>
23351
23352         * AssemblyInfo.cs: Bump the version number to 0.19.
23353
23354 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23355
23356         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23357
23358 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23359
23360         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23361
23362 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23363
23364         * cs-parser.jay: Small fix: we were not comparing the constructor
23365         name correctly.   Thanks to Zoltan for the initial pointer.
23366
23367 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23368
23369         * cs-tokenizer.cs: Set file name when specified with #line
23370
23371 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23372
23373         * cs-parser.jay: Only perform the constructor checks here if we
23374         are named like the class;  This will help provider a better
23375         error.  The constructor path is taken when a type definition is
23376         not found, but most likely the user forgot to add the type, so
23377         report that rather than the constructor error.
23378
23379 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23380
23381         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23382         allocations.
23383
23384 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23385
23386         * cs-parser.jay: Add cleanup call.
23387
23388 2003-01-13  Duncan Mak  <duncan@ximian.com>
23389
23390         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23391         consistent with other methods.
23392
23393 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23394
23395         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23396
23397 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23398
23399         * attribute.cs: only set GuidAttr to true when we have a
23400         GuidAttribute.
23401
23402 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23403
23404         * ecore.cs:
23405         * expression.cs:
23406         * typemanager.cs: fixes to allow mcs compile corlib with the new
23407         Type.IsSubclassOf fix.
23408
23409 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23410
23411         * expression.cs (LocalVariableReference.DoResolve): Classify a
23412         constant as a value, not as a variable.   Also, set the type for
23413         the variable.
23414
23415         * cs-parser.jay (fixed_statement): take a type instead of a
23416         pointer_type, so we can produce a better error message later.
23417
23418         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23419         as an error.  
23420
23421         (For.DoEmit): Make inifinite loops have a
23422         non-conditional branch back.
23423
23424         (Fixed.DoEmit): First populate the pinned variables, then emit the
23425         statement, then clear the variables.  Before I was emitting the
23426         code once for each fixed piece.
23427
23428
23429 2003-01-08  Martin Baulig  <martin@ximian.com>
23430
23431         * statement.cs (FlowBranching.MergeChild): A break in a
23432         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23433
23434 2003-01-08  Martin Baulig  <martin@ximian.com>
23435
23436         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23437         lives in the same number space than `param_map'.  Fixes #36154.
23438
23439 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23440
23441         * cs-parser.jay (constructor_declaration): Set the
23442         Constructor.ModFlags before probing for it.  This makes the
23443         compiler report 514, 515 and 132 (the code was there, but got
23444         broken). 
23445
23446         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23447         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23448         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23449
23450 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23451
23452         * enum.cs: create the enum static fields using the enum type.
23453
23454 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23455
23456         * class.cs: don't try to create the ParamBuilder for the return
23457         type if it's not needed (and handle it breaking for the ms runtime
23458         anyway).
23459
23460 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23461
23462         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23463
23464 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23465
23466         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23467         the command.   This showed up while compiling the JANET source
23468         code, which used \r as its only newline separator.
23469
23470 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23471
23472         * class.cs (Method.Define): If we are an operator (because it
23473         reuses our code), then set the SpecialName and HideBySig.  #36128
23474
23475 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23476
23477         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23478         exception, report error 120 `object reference required'.
23479
23480         * driver.cs: Add --pause option, used during to measure the size
23481         of the process as it goes with --timestamp.
23482
23483         * expression.cs (Invocation.DoResolve): Do not allow methods with
23484         SpecialName to be invoked.
23485
23486 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23487
23488         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23489         number before adding it.
23490
23491 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23492
23493         * ecore.cs (StandardImplicitConversion): When in an unsafe
23494         context, we allow conversion between void * to any other pointer
23495         type. This fixes bug #35973.
23496
23497 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23498
23499         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23500         is not thrown when extensionless outputs are used 
23501
23502 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23503
23504         * rootcontext.cs: fixed compilation of corlib.
23505
23506 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23507
23508         * attribute.cs (Attributes.Contains): Add new method.
23509
23510         * class.cs (MethodCore.LabelParameters): if the parameter is an
23511         `out' parameter, check that no attribute `[In]' has been passed.
23512
23513         * enum.cs: Handle the `value__' name in an enumeration.
23514
23515 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23516
23517         * decl.cs: Added special case to allow overrides on "protected
23518         internal" methods
23519
23520 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23521
23522         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23523         since it makes much more sense.
23524
23525         (Attributes.ctor): Don't require a Location parameter.
23526
23527         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23528
23529         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23530         since we already have that information per attribute.
23531
23532         * everywhere : make appropriate changes.
23533
23534         * class.cs (LabelParameters): Write the code which actually
23535         applies attributes to the return type. We can't do this on the MS
23536         .NET runtime so we flag a warning in the case an exception is
23537         thrown.
23538
23539 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23540
23541         * const.cs: Handle implicit null conversions here too.
23542
23543 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23544
23545         * class.cs (MethodCore.LabelParameters): Remove the extra
23546         Type [] parameter since it is completely unnecessary. Instead
23547         pass in the method's attributes so that we can extract
23548         the "return" attribute.
23549
23550 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23551
23552         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23553         of ignoring it and letting the compile continue.
23554
23555         * typemanager.cs (ChangeType): use an extra argument to return an
23556         error condition instead of throwing an exception.
23557
23558 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23559
23560         * expression.cs (Unary.TryReduce): mimic the code for the regular
23561         code path.  Perform an implicit cast in the cases where we can
23562         implicitly convert to one of the integral types, and then reduce
23563         based on that constant.   This fixes bug #35483.
23564
23565 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23566
23567         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23568
23569 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23570
23571         * namespace.cs: fixed bug #35489.
23572
23573 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23574
23575         * class.cs: Remove some dead code.
23576
23577         * cs-parser.jay: Estimate the number of methods needed
23578         (RootContext.MethodCount);
23579
23580         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23581         numbers instead of StringBuilders.
23582
23583         * support.cs (PtrHashtable): Add constructor with initial size;
23584         We can now reduce reallocations of the method table.
23585
23586 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23587
23588         * attribute.cs (ApplyAttributes): Keep track of the emitted
23589         attributes on a per-target basis. This fixes bug #35413.
23590
23591 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23592
23593         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23594         default to the Windows 1252 encoding.
23595
23596         (UnixParseOption): Support version, thanks to Alp for the missing
23597         pointer. 
23598
23599         * AssemblyInfo.cs: Add nice assembly information.
23600
23601         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23602         (bug 35169).
23603
23604         * cs-parser.jay: Allow a trailing comma before the close bracked
23605         in the attribute_section production.
23606
23607         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23608         address of the instance was being taken, I will take this out,
23609         because we take the address of the object immediately here.
23610
23611 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23612
23613         * typemanager.cs (AreMultipleAllowed): Take care of the most
23614         obvious case where attribute type is not in the current assembly -
23615         stupid me ;-)
23616
23617 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23618
23619         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23620         definitions, instead of doing that afterwards.  
23621
23622         Also we use a nice little hack, depending on the constructor, we
23623         know if we are a "composed" name or a simple name.  Hence, we
23624         avoid the IndexOf test, and we avoid 
23625
23626         * codegen.cs: Add code to assist in a bug reporter to track down
23627         the source of a compiler crash. 
23628
23629 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23630
23631         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23632         types have been emitted for a given element and flag an error
23633         if something which does not have AllowMultiple set is used more
23634         than once.
23635
23636         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23637         attribute types and their corresponding AllowMultiple properties
23638
23639         (AreMultipleAllowed): Check the property for a given type.
23640
23641         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23642         property in the case we have a TypeContainer.
23643
23644         (Attributes.AddAttribute): Detect duplicates and just skip on
23645         adding them. This trivial fix catches a pretty gross error in our
23646         attribute emission - global attributes were being emitted twice!
23647
23648         Bugzilla bug #33187 is now fixed.
23649
23650 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23651
23652         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23653         instead of pp_and).
23654
23655         * expression.cs (Binary.ResolveOperator): I can only use the
23656         Concat (string, string, string) and Concat (string, string,
23657         string, string) if the child is actually a concatenation of
23658         strings. 
23659
23660 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23661
23662         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23663         context where we need a 2-character lookahead.
23664
23665         * pending.cs (PendingImplementation): Rework so we can keep track
23666         of interface types all the time, and flag those which were
23667         implemented by parents as optional.
23668
23669 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23670
23671         * expression.cs (Binary.ResolveOperator): Use
23672         String.Concat(string,string,string) or
23673         String.Concat(string,string,string,string) when possible. 
23674
23675         * typemanager: More helper methods.
23676
23677
23678 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23679
23680         * pending.cs: remove the bogus return from GetMissingInterfaces()
23681         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23682
23683 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23684
23685         * namespace.cs: avoid duplicated 'using xxx' being added to
23686         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23687         when we get more than one 'using' statement for the same namespace.
23688         Report a CS0105 warning for it.
23689
23690 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23691
23692         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23693         of calling getChar/putback, uses internal knowledge of it.    
23694
23695         (xtoken): Reorder tokenizer so most common patterns are checked
23696         first.  This reduces the compilation time in another 5% (from 8.11s
23697         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23698
23699         The parsing time is 22% of the compilation in mcs, and from that
23700         64% is spent on the tokenization process.  
23701
23702         I tried using a binary search for keywords, but this is slower
23703         than the hashtable.  Another option would be to do a couple of
23704         things:
23705
23706                 * Not use a StringBuilder, instead use an array of chars,
23707                   with a set value.  Notice that this way we could catch
23708                   the 645 error without having to do it *afterwards*.
23709
23710                 * We could write a hand-parser to avoid the hashtable
23711                   compares altogether.
23712
23713         The identifier consumption process takes 37% of the tokenization
23714         time.  Another 15% is spent on is_number.  56% of the time spent
23715         on is_number is spent on Int64.Parse:
23716
23717                 * We could probably choose based on the string length to
23718                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23719                   computations. 
23720
23721         Another 3% is spend on wrapping `xtoken' in the `token' function.
23722
23723         Handle 0xa0 as whitespace (#34752)
23724
23725 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23726
23727         * typemanager.cs (IsCLRType): New routine to tell whether a type
23728         is one of the builtin types.  
23729
23730         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23731         typecode in more places instead of doing pointer comparissions.
23732         We could leverage some knowledge about the way the typecodes are
23733         laid out.
23734
23735         New code to cache namespaces in assemblies, it is currently not
23736         invoked, to be used soon.
23737
23738         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23739
23740         * expression.cs (Binary.ResolveOperator): specially handle
23741         strings, and do not perform user-defined operator overloading for
23742         built-in types.
23743
23744 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23745
23746         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23747         internalcall as it is a pretty simple operation;  Avoid whenever
23748         possible to call Char.IsLetter.
23749
23750         (consume_identifier): Cut by half the number of
23751         hashtable calls by merging the is_keyword and GetKeyword behavior.
23752
23753         Do not short-circuit, because if we do, we
23754         report errors (ie, #if false && true would produce an invalid
23755         directive error);
23756
23757
23758 2002-11-24  Martin Baulig  <martin@ximian.com>
23759
23760         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23761         check constant ranges and report a CS0221.  Fixes #33186.
23762
23763 2002-11-24  Martin Baulig  <martin@ximian.com>
23764
23765         * cs-parser.jay: Make this work for uninitialized variable
23766         declarations in the `for' initializer.  Fixes #32416.
23767
23768 2002-11-24  Martin Baulig  <martin@ximian.com>
23769
23770         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23771         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23772
23773 2002-11-24  Martin Baulig  <martin@ximian.com>
23774
23775         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23776         argument; if true, we also check for user-defined conversions.
23777         This is only needed if both arguments are of a user-defined type.
23778         Fixes #30443, added test-175.cs.
23779         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23780
23781         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23782
23783 2002-11-24  Martin Baulig  <martin@ximian.com>
23784
23785         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23786         function to get the store opcode.
23787         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23788         only emit the Ldelema if the store opcode is Stobj.  You must run
23789         both test-34 and test-167 to test this.  Fixes #34529.
23790
23791 2002-11-23  Martin Baulig  <martin@ximian.com>
23792
23793         * ecore.cs (Expression.MemberLookup): Added additional
23794         `qualifier_type' argument which is used when we're being called
23795         from MemberAccess.DoResolve() and null if we're called from a
23796         SimpleName lookup.
23797         (Expression.MemberLookupFailed): New method to report errors; this
23798         does the CS1540 check and reports the correct error message.
23799
23800         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23801         argument for the CS1540 check and redone the way how we're dealing
23802         with private members.  See the comment in the source code for details.
23803         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23804         `closure_start_type' to `closure_qualifier_type' and check whether
23805         it's not null.  It was not this filter being broken, it was just
23806         being called with the wrong arguments.
23807
23808         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
23809         and pass it the correct `qualifier_type'; this also does the error
23810         handling for us.
23811
23812 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
23813
23814         * expression.cs (Invocation.EmitParams): If the we are dealing
23815         with a non-built-in value type, load its address as well.
23816
23817         (ArrayCreation): Use a a pretty constant instead
23818         of the hardcoded value 2.   Use 6 instead of 2 for the number of
23819         static initializers.  
23820
23821         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
23822         because they are not really value types, just glorified integers. 
23823
23824         * driver.cs: Do not append .exe, the CSC compiler does not do it.
23825
23826         * ecore.cs: Remove redundant code for enumerations, make them use
23827         the same code path as everything else, fixes the casting issue
23828         with enumerations in Windows.Forms.
23829
23830         * attribute.cs: Do only cast to string if it is a string, the
23831         validation happens later.
23832
23833         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
23834         people upgrade their corlibs.
23835
23836         * ecore.cs: Oops, enumerations were not following the entire code path
23837
23838 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
23839
23840         * typemanager.cs (FilterWithClosure): Commented out the test for
23841         1540 in typemanager.cs, as it has problems when accessing
23842         protected methods from a parent class (see test-174.cs). 
23843
23844         * attribute.cs (Attribute.ValidateGuid): new method.
23845         (Attribute.Resolve): Use above.
23846
23847 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
23848
23849         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
23850
23851         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
23852         handling for enumerations, as we only needed the TypeContainer
23853         functionality to begin with (this is required for the fix below to
23854         work for enums that reference constants in a container class for
23855         example). 
23856
23857         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
23858
23859         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
23860         a valid TypeBuilder to perform lookups on.o
23861
23862         * class.cs (InheritableMemberSignatureCompare): Use true in the
23863         call to GetGetMethod and GetSetMethod, because we are comparing
23864         the signature, and we need to get the methods *even* if they are
23865         private. 
23866
23867         (PropertyBase.CheckBase): ditto.
23868
23869         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
23870         GotoCase.Resolve): Use Peel on EmpytCasts.
23871
23872         * ecore.cs (EmptyCast): drop child, add Peel method.
23873
23874 2002-11-17  Martin Baulig  <martin@ximian.com>
23875
23876         * ecore.cs (EmptyCast.Child): New public property.
23877
23878         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
23879         label resolved to an EmptyCast.  Fixes #34162.
23880         (GotoCase.Resolve): Likewise.
23881         (Block.EmitMeta): Likewise.
23882
23883 2002-11-17  Martin Baulig  <martin@ximian.com>
23884
23885         * expression.cs (Invocation.BetterConversion): Prefer int over
23886         uint; short over ushort; long over ulong for integer literals.
23887         Use ImplicitConversionExists instead of StandardConversionExists
23888         since we also need to check for user-defined implicit conversions.
23889         Fixes #34165.  Added test-173.cs.
23890
23891 2002-11-16  Martin Baulig  <martin@ximian.com>
23892
23893         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
23894         with the `true' and `false' literals.  Fixes #33151.
23895
23896 2002-11-16  Martin Baulig  <martin@ximian.com>
23897
23898         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
23899         October 22nd; don't do the cs1540 check for static members.
23900
23901         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
23902         now using our own filter here and doing the cs1540 check again.
23903
23904 2002-11-16  Martin Baulig  <martin@ximian.com>
23905
23906         * support.cs (InternalParameters): Don't crash if we don't have
23907         any fixed parameters.  Fixes #33532.
23908
23909 2002-11-16  Martin Baulig  <martin@ximian.com>
23910
23911         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
23912         when looking up static methods to make this work on Windows.
23913         Fixes #33773.
23914
23915 2002-11-16  Martin Baulig  <martin@ximian.com>
23916
23917         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
23918         a setter rather than using PropertyInfo.CanWrite.
23919
23920 2002-11-15  Nick Drochak  <ndrochak@gol.com>
23921
23922         * class.cs: Allow acces to block member by subclasses. Fixes build
23923         breaker.
23924
23925 2002-11-14  Martin Baulig  <martin@ximian.com>
23926
23927         * class.cs (Constructor.Emit): Added the extern/block check.
23928         Fixes bug #33678.
23929
23930 2002-11-14  Martin Baulig  <martin@ximian.com>
23931
23932         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
23933         iteration while looking for indexers, this is needed because the
23934         indexer may have a different name in our base classes.  Fixed the
23935         error reporting (no indexers at all, not get accessor, no
23936         overloaded match).  Fixes bug #33089.
23937         (IndexerAccess.DoResolveLValue): Likewise.
23938
23939 2002-11-14  Martin Baulig  <martin@ximian.com>
23940
23941         * class.cs (PropertyBase.CheckBase): Make this work for multiple
23942         indexers.  Fixes the first part of bug #33089.
23943         (MethodSignature.InheritableMemberSignatureCompare): Added support
23944         for properties.
23945
23946 2002-11-13  Ravi Pratap  <ravi@ximian.com>
23947
23948         * attribute.cs (Attribute.Resolve): Catch the
23949         NullReferenceException and report it since it isn't supposed to
23950         happen. 
23951
23952 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
23953
23954         * expression.cs (Binary.EmitBranchable): Also handle the cases for
23955         LogicalOr and LogicalAnd that can benefit from recursively
23956         handling EmitBranchable.  The code now should be nice for Paolo.
23957
23958 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
23959
23960         * typemanager.cs (LookupType): Added a negative-hit hashtable for
23961         the Type lookups, as we perform quite a number of lookups on
23962         non-Types.  This can be removed once we can deterministically tell
23963         whether we have a type or a namespace in advance.
23964
23965         But this might require special hacks from our corlib.
23966
23967         * TODO: updated.
23968
23969         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
23970         and double which avoids a conversion from an integer to a double.
23971
23972         * expression.cs: tiny optimization, avoid calling IsConstant,
23973         because it effectively performs the lookup twice.
23974
23975 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
23976
23977         But a bogus return here to keep the semantics of the old code
23978         until the Mono runtime is fixed.
23979
23980         * pending.cs (GetMissingInterfaces): New method used to remove all
23981         the interfaces that are already implemented by our parent
23982         classes from the list of pending methods. 
23983
23984         * interface.cs: Add checks for calls after ResolveTypeExpr.
23985
23986 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
23987
23988         * class.cs (Class.Emit): Report warning 67: event not used if the
23989         warning level is beyond 3.
23990
23991         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
23992         being a NullLiteral.
23993
23994         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
23995         specifiers. 
23996
23997         * class.cs (TypeContainer.GetClassBases): Cover a missing code
23998         path that might fail if a type can not be resolved.
23999
24000         * expression.cs (Binary.Emit): Emit unsigned versions of the
24001         operators. 
24002
24003         * driver.cs: use error 5.
24004
24005 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
24006
24007         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
24008
24009 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
24010
24011         * cs-parser.jay (switch_section): A beautiful patch from Martin
24012         Baulig that fixed 33094.
24013
24014 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
24015
24016         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
24017         Check whether the base is abstract and report an error if so.
24018
24019         * expression.cs (IndexerAccess.DoResolveLValue,
24020         IndexerAccess.DoResolve): ditto. 
24021
24022         (Invocation.DoResolve): ditto.
24023
24024         (Invocation.FullMethodDesc): Improve the report string.
24025
24026         * statement.cs (Block): Eliminate IsVariableDefined as it is
24027         basically just a wrapper for GetVariableInfo.
24028
24029         * ecore.cs (SimpleName): Use new 
24030
24031         * support.cs (ReflectionParamter.ParameterType): We unwrap the
24032         type, as we return the actual parameter ref/unref state on a
24033         different call.
24034
24035 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
24036
24037         * support.cs: Return proper flags REF/OUT fixing the previous
24038         commit.  
24039
24040         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
24041         not used to mean `ref' but `ref or out' in ParameterReference
24042
24043         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
24044         full type signature instead of calling TypeManger.CSharpName
24045         ourselves. 
24046
24047         * support.cs (InternalParameters.ParameterDesc): Do not compare
24048         directly to the modflags, because REF/OUT will actually be bitsets
24049         if set. 
24050
24051         * delegate.cs (VerifyMethod): Check also the modifiers.
24052
24053         * cs-tokenizer.cs: Fix bug where floating point values with an
24054         exponent where a sign was missing was ignored.
24055
24056         * driver.cs: Allow multiple assemblies to be specified in a single
24057         /r: argument
24058
24059 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
24060
24061         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
24062         because identifiers after a parenthesis would end up in this kind
24063         of production, and we needed to desamiguate it for having casts
24064         like:
24065
24066                 (UserDefinedType *) xxx
24067
24068 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
24069
24070         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
24071         we should set on the Bindingflags.NonPublic, but not turn on
24072         private_ok.  private_ok controls whether a Private member is
24073         returned (this is chekced on the filter routine), while the
24074         BindingFlags.NonPublic just controls whether private/protected
24075         will be allowed.   This fixes the problem part of the problem of
24076         private properties being allowed to be used in derived classes.
24077
24078         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
24079         so we can call the children DoResolveLValue method (this will
24080         properly signal errors on lvalue assignments to base properties)
24081
24082         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
24083         getter are null, and we have a property info, we know that this
24084         happened because the lookup failed, so we report an error 122 for
24085         protection level violation.
24086
24087         We also silently return if setter and getter are null in the
24088         resolve functions, this condition only happens if we have flagged
24089         the error before.  This is the other half of the problem. 
24090
24091         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
24092         not have accessibility information, that is why we were returning
24093         true in the filter function in typemanager.cs.
24094
24095         To properly report 122 (property is inaccessible because of its
24096         protection level) correctly, we report this error in ResolveAccess
24097         by failing if both the setter and the getter are lacking (ie, the
24098         lookup failed). 
24099
24100         DoResolve and DoLResolve have been modified to check for both
24101         setter/getter being null and returning silently, the reason being
24102         that I did not want to put the knowledge about this error in upper
24103         layers, like:
24104
24105         int old = Report.Errors;
24106         x = new PropertyExpr (...);
24107         if (old != Report.Errors)
24108                 return null;
24109         else
24110                 return x;
24111
24112         So the property expr is returned, but it is invalid, so the error
24113         will be flagged during the resolve process. 
24114
24115         * class.cs: Remove InheritablePropertySignatureCompare from the
24116         class, as we no longer depend on the property signature to compute
24117         whether it is possible to implement a method or not.
24118
24119         The reason is that calling PropertyInfo.GetGetMethod will return
24120         null (in .NET, in Mono it works, and we should change this), in
24121         cases where the Get Method does not exist in that particular
24122         class.
24123
24124         So this code:
24125
24126         class X { public virtual int A { get { return 1; } } }
24127         class Y : X { }
24128         class Z : Y { public override int A { get { return 2; } } }
24129
24130         Would fail in Z because the parent (Y) would not have the property
24131         defined.  So we avoid this completely now (because the alternative
24132         fix was ugly and slow), and we now depend exclusively on the
24133         method names.
24134
24135         (PropertyBase.CheckBase): Use a method-base mechanism to find our
24136         reference method, instead of using the property.
24137
24138         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
24139         routines are gone now.
24140
24141         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
24142         names, they were incorrectly named.
24143
24144         * cs-tokenizer.cs: Return are more gentle token on failure. 
24145
24146         * pending.cs (PendingImplementation.InterfaceMethod): This routine
24147         had an out-of-sync index variable, which caused it to remove from
24148         the list of pending methods the wrong method sometimes.
24149
24150 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
24151
24152         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
24153         CanWrite, because those refer to this particular instance of the
24154         property, and do not take into account the fact that we can
24155         override single members of a property.
24156
24157         Constructor requires an EmitContext.  The resolution process does
24158         not happen here, but we need to compute the accessors before,
24159         because the resolution does not always happen for properties.
24160
24161         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
24162         subclass, before we did not update this flag, but we did update
24163         bindingflags. 
24164
24165         (GetAccessors): Drop this routine, as it did not work in the
24166         presence of partially overwritten set/get methods. 
24167
24168         Notice that this broke the cs1540 detection, but that will require
24169         more thinking. 
24170
24171 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24172
24173         * class.cs:
24174         * codegen.cs:
24175         * driver.cs: issue a warning instead of an error if we don't support
24176         debugging for the platform. Also ignore a couple of errors that may
24177         arise when trying to write the symbols. Undo my previous patch.
24178
24179 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24180
24181         * driver.cs: ignore /debug switch except for Unix platforms.
24182
24183 2002-10-23  Nick Drochak  <ndrochak@gol.com>
24184
24185         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
24186
24187 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
24188
24189         * driver.cs: Do not make mcs-debug conditional, so we do not break
24190         builds that use it.
24191
24192         * statement.cs (UsageVector.MergeChildren): I would like Martin to
24193         review this patch.  But basically after all the children variables
24194         have been merged, the value of "Breaks" was not being set to
24195         new_breaks for Switch blocks.  I think that it should be set after
24196         it has executed.  Currently I set this to the value of new_breaks,
24197         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
24198         conservative, but I do not understand this code very well.
24199
24200         I did not break anything in the build, so that is good ;-)
24201
24202         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
24203
24204 2002-10-20  Mark Crichton  <crichton@gimp.org>
24205
24206         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
24207
24208 2002-10-20  Nick Drochak  <ndrochak@gol.com>
24209
24210         * cfold.cs: Fixed compile blocker.
24211
24212 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
24213
24214         * driver.cs: I was chekcing the key, not the file.
24215
24216 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24217
24218         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24219         message that we were generating - we just need to silently return
24220         a null.
24221
24222 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24223
24224         * class.cs (Event.Define): Change my previous commit, as this
24225         breaks the debugger.  This is a temporary hack, as it seems like
24226         the compiler is generating events incorrectly to begin with.
24227
24228         * expression.cs (Binary.ResolveOperator): Added support for 
24229         "U operator - (E x, E y)"
24230
24231         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24232         y)".
24233
24234         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24235         init-only variables, but this path did not take into account that
24236         there might be also instance readonly variables.  Correct this
24237         problem. 
24238
24239         This fixes bug 32253
24240
24241         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24242         delegates as well.
24243
24244         * driver.cs: Change the extension for modules to `netmodule'
24245
24246         * cs-parser.jay: Improved slightly the location tracking for
24247         the debugger symbols.
24248
24249         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24250         modifiers that were specified instead of the hardcoded value
24251         (FamAndAssem).  This was basically ignoring the static modifier,
24252         and others.  Fixes 32429.
24253
24254         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24255         fixed a bug in the process (32476)
24256
24257         * expression.cs (ArrayAccess.EmitAssign): Patch from
24258         hwang_rob@yahoo.ca that fixes bug 31834.3
24259
24260 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24261
24262         * driver.cs: Make the module extension .netmodule.
24263
24264 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24265
24266         * driver.cs: Report an error if the resource file is not found
24267         instead of crashing.
24268
24269         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24270         false, like Emit does.
24271
24272 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24273
24274         * typemanager.cs: Remove unused private member.  Also reported mcs
24275         bug to report this as a warning like csc.
24276
24277 2002-10-15  Martin Baulig  <martin@gnome.org>
24278
24279         * statement.cs (Statement.Emit): Made this a virtual method; emits
24280         the line number info and calls DoEmit().
24281         (Statement.DoEmit): New protected abstract method, formerly knows
24282         as Statement.Emit().
24283
24284         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24285
24286 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24287
24288         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24289         have fixed a remaining problem: not every AddXXXX was adding a
24290         fully qualified name.  
24291
24292         Now everyone registers a fully qualified name in the DeclSpace as
24293         being defined instead of the partial name.  
24294
24295         Downsides: we are slower than we need to be due to the excess
24296         copies and the names being registered this way.  
24297
24298         The reason for this is that we currently depend (on the corlib
24299         bootstrap for instance) that types are fully qualified, because
24300         we dump all the types in the namespace, and we should really have
24301         types inserted into the proper namespace, so we can only store the
24302         basenames in the defined_names array.
24303
24304 2002-10-10  Martin Baulig  <martin@gnome.org>
24305
24306         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24307         from bug #31834, see the bug report for a testcase which is
24308         miscompiled.
24309
24310 2002-10-10  Martin Baulig  <martin@gnome.org>
24311
24312         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24313         flow analysis code for this.
24314
24315         * statement.cs (Do, While, For): Tell the flow analysis code about
24316         infinite loops.
24317         (FlowBranching.UsageVector): Added support for infinite loops.
24318         (Block.Resolve): Moved the dead code elimination here and use flow
24319         analysis to do it.
24320
24321 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24322
24323         * class.cs (Field.Define): Catch cycles on struct type
24324         definitions. 
24325
24326         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24327         fields if the fields are static.  We only need to check instance
24328         fields. 
24329
24330         * expression.cs (As.DoResolve): Test for reference type.
24331
24332         * statement.cs (Using.ResolveExpression): Use
24333         ConvertImplicitRequired, not ConvertImplicit which reports an
24334         error on failture
24335         (Using.ResolveLocalVariableDecls): ditto.
24336
24337         * expression.cs (Binary.ResolveOperator): Report errors in a few
24338         places where we had to.
24339
24340         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24341
24342 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24343
24344         * expression.cs: Use StoreFromPtr instead of extracting the type
24345         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24346
24347         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24348         an enumeration value to a System.Enum, but System.Enum is not a
24349         value type, but an class type, so we need to box.
24350
24351         (Expression.ConvertExplicit): One codepath could return
24352         errors but not flag them.  Fix this.  Fixes #31853
24353
24354         * parameter.cs (Resolve): Do not allow void as a parameter type.
24355
24356 2002-10-06  Martin Baulig  <martin@gnome.org>
24357
24358         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24359         if it's a class type and not a struct.  Fixes #31815.
24360
24361 2002-10-06  Martin Baulig  <martin@gnome.org>
24362
24363         * statement.cs: Reworked the flow analysis code a bit to make it
24364         usable for dead code elimination.
24365
24366 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24367
24368         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24369
24370 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24371
24372         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24373         to fix the test 165, will investigate deeper.
24374
24375 2002-10-04  Martin Baulig  <martin@gnome.org>
24376
24377         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24378         finally blocks actually work.
24379         (Try.Resolve): We don't need to create a sibling for `finally' if
24380         there is no finally block.
24381
24382 2002-10-04  Martin Baulig  <martin@gnome.org>
24383
24384         * class.cs (Constructor.Define): The default accessibility for a
24385         non-default constructor is private, not public.
24386
24387 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24388
24389         * class.cs (Constructor): Make AllowedModifiers public, add
24390         EXTERN.
24391
24392         * cs-parser.jay: Perform the modifiers test here, as the
24393         constructor for the Constructor class usually receives a zero
24394         because of the way we create it (first we create, later we
24395         customize, and we were never checking the modifiers).
24396
24397         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24398         is a version of LookupTypeReflection that includes the type-name
24399         cache.  This can be used as a fast path for functions that know
24400         the fully qualified name and are only calling into *.GetType() to
24401         obtain a composed type.
24402
24403         This is also used by TypeManager.LookupType during its type
24404         composition.
24405
24406         (LookupType): We now also track the real type name, as sometimes
24407         we can get a quey for the real type name from things like
24408         ComposedCast.  This fixes bug 31422.
24409
24410         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24411         complete type fullname, it does not have to go through the type
24412         resolution system to obtain the composed version of the type (for
24413         obtaining arrays or pointers).
24414
24415         (Conditional.Emit): Use the EmitBoolExpression to
24416         generate nicer code, as requested by Paolo.
24417
24418         (ArrayCreation.CheckIndices): Use the patch from
24419         hwang_rob@yahoo.ca to validate the array initializers. 
24420
24421 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24422
24423         * class.cs (ConstructorInitializer.Emit): simplify code by using
24424         Invocation.EmitCall, and at the same time, fix the bugs in calling
24425         parent constructors that took variable arguments. 
24426
24427         * ecore.cs (Expression.ConvertNumericExplicit,
24428         Expression.ImplicitNumericConversion): Remove the code that
24429         manually wrapped decimal (InternalTypeConstructor call is now gone
24430         as well).
24431
24432         * expression.cs (Cast.TryReduce): Also handle decimal types when
24433         trying to perform a constant fold on the type.
24434
24435         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24436
24437         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24438         that only turned off an error report, and did nothing else. 
24439
24440 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24441
24442         * driver.cs: Handle and ignore /fullpaths
24443
24444 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24445
24446         * expression.cs (Binary.ResolveOperator): Catch the case where
24447         DoNumericPromotions returns true, 
24448
24449         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24450
24451 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24452
24453         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24454         report error 70.
24455
24456 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24457
24458         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24459         conversion exists, but it is also required that the conversion be
24460         performed.  This manifested in "(Type64Enum) 2".  
24461
24462         * class.cs (TypeManager.AddMethod): The fix is not to change
24463         AddEnum, because that one was using a fully qualified name (every
24464         DeclSpace derivative does), but to change the AddMethod routine
24465         that was using an un-namespaced name.  This now correctly reports
24466         the duplicated name.
24467
24468         Revert patch until I can properly fix it.  The issue
24469         is that we have a shared Type space across all namespaces
24470         currently, which is wrong.
24471
24472         Options include making the Namespace a DeclSpace, and merge
24473         current_namespace/current_container in the parser.
24474
24475 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24476
24477         * cs-parser.jay: Improve error reporting when we get a different
24478         kind of expression in local_variable_type and
24479         local_variable_pointer_type. 
24480
24481         Propagate this to avoid missleading errors being reported.
24482
24483         * ecore.cs (ImplicitReferenceConversion): treat
24484         TypeManager.value_type as a target just like object_type.   As
24485         code like this:
24486
24487         ValueType v = 1;
24488
24489         Is valid, and needs to result in the int 1 being boxed before it
24490         is assigned to the value type v.
24491
24492         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24493         to validate the enumeration name.
24494
24495         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24496         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24497         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24498
24499         * ecore.cs (TryImplicitIntConversion): When doing an
24500         implicit-enumeration-conversion, check if the type is 64-bits and
24501         perform a conversion before passing to EnumConstant.
24502
24503 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24504
24505         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24506         report ambiguous type references.  Unlike the MS version, we
24507         report what the ambiguity is.   Innovation at work ;-)
24508
24509         (DeclSpace.FindType): Require a location argument to
24510         display when we display an ambiguous error.
24511
24512         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24513
24514         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24515
24516         * expression.cs (EmitDynamicInitializers): Apply patch from
24517         hwang_rob@yahoo.ca that fixes the order in which we emit our
24518         initializers. 
24519
24520 2002-09-21  Martin Baulig  <martin@gnome.org>
24521
24522         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24523         delegate takes no arguments.
24524
24525 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24526
24527         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24528         from integers.
24529
24530         * expression.cs: Extract the underlying type.
24531
24532         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24533
24534         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24535
24536 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24537
24538         * class.cs (TypeContainer.DefineType): We can not use the nice
24539         PackingSize with the size set to 1 DefineType method, because it
24540         will not allow us to define the interfaces that the struct
24541         implements.
24542
24543         This completes the fixing of bug 27287
24544
24545         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24546         means also structs.  This fixes part of the problem. 
24547         (Expresion.ImplicitReferenceConversionExists): ditto.
24548
24549         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24550         error if there were no errors reported during the type lookup
24551         process, to avoid duplicates or redundant errors.  Without this
24552         you would get an ambiguous errors plus a type not found.  We have
24553         beaten the user enough with the first error.  
24554
24555         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24556         reference. 
24557
24558         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24559         during the resolution process, stop the lookup, this avoids
24560         repeated error reports (same error twice).
24561
24562         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24563
24564         * typemanager.cs (LookupType): Redo the type lookup code to match
24565         the needs of System.Reflection.  
24566
24567         The issue is that System.Reflection requires references to nested
24568         types to begin with a "+" sign instead of a dot.  So toplevel
24569         types look like: "NameSpace.TopLevelClass", and nested ones look
24570         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24571         levels. 
24572
24573 2002-09-19  Martin Baulig  <martin@gnome.org>
24574
24575         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24576         says that a method always returns or always throws an exception,
24577         don't report the CS0161.
24578
24579         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24580         set `Returns = new_returns'.
24581
24582 2002-09-19  Martin Baulig  <martin@gnome.org>
24583
24584         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24585         to an enum constant, check for a CS0176.
24586
24587 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24588
24589         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24590         for operators that must be in pairs and report errors.
24591
24592         * ecore.cs (SimpleName.DoResolveType): During the initial type
24593         resolution process, when we define types recursively, we must
24594         check first for types in our current scope before we perform
24595         lookups in the enclosing scopes.
24596
24597         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24598
24599         (Invocation.VerifyArgumentsCompat): Call
24600         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24601         I thought we were supposed to always call this, but there are a
24602         few places in the code where we dont do it.
24603
24604 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24605
24606         * driver.cs: Add support in -linkres and -resource to specify the
24607         name of the identifier.
24608
24609 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24610
24611         * ecore.cs (StandardConversionExists): Sync with the conversion
24612         code: allow anything-* to void* conversions.
24613
24614         (FindMostSpecificSource): Use an Expression argument
24615         instead of a Type, because we might be handed over a Literal which
24616         gets a few more implicit conversions that plain types do not.  So
24617         this information was being lost.
24618
24619         Also, we drop the temporary type-holder expression when not
24620         required.
24621
24622 2002-09-17  Martin Baulig  <martin@gnome.org>
24623
24624         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24625         this is an explicit interface implementation.
24626
24627 2002-09-17  Martin Baulig  <martin@gnome.org>
24628
24629         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24630         different `IndexerName' attributes.
24631
24632         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24633         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24634         virtual CommonResolve().
24635
24636 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24637
24638         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24639         and convert that to the UnderlyingType.
24640
24641         * statement.cs (Foreach.Resolve): Indexers are just like variables
24642         or PropertyAccesses.
24643
24644         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24645         inside quoted strings, we were not doing this before.
24646
24647 2002-09-16  Martin Baulig  <martin@gnome.org>
24648
24649         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24650         resolve it.  This is needed for the definite assignment check of the
24651         instance expression, fixes bug #29846.
24652         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24653
24654 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24655
24656         * parameter.cs: Fix compile error.  Cannot reference static member
24657         from an instance object.  Is this an mcs bug?
24658
24659 2002-09-14  Martin Baulig  <martin@gnome.org>
24660
24661         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24662         multiple times.  Fixes bug #30295, added test-166.cs.
24663
24664 2002-09-14  Martin Baulig  <martin@gnome.org>
24665
24666         * statement.cs (Block.Emit): Don't emit unreachable code.
24667         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24668         `break' statements.
24669         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24670
24671 2002-09-14  Martin Baulig  <martin@gnome.org>
24672
24673         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24674         is set.
24675
24676 2002-09-14  Martin Baulig  <martin@gnome.org>
24677
24678         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24679         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24680         be false on the ms runtime.
24681
24682 2002-09-13  Martin Baulig  <martin@gnome.org>
24683
24684         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24685         the CS0038 error message.
24686
24687 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24688
24689         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24690         constant inside, return it.
24691
24692 2002-09-12  Martin Baulig  <martin@gnome.org>
24693
24694         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24695         implicit conversion can be done between enum types.
24696
24697         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24698         check whether an implicit conversion to the current enum's UnderlyingType
24699         exists and report an error if not.
24700
24701         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24702         without debugging support.
24703
24704         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24705         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24706
24707 2002-09-12  Martin Baulig  <martin@gnome.org>
24708
24709         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24710
24711         * ecore.cs (IMemberExpr.DeclaringType): New property.
24712         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24713         nonstatic member of an outer type (CS0038).
24714
24715 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24716
24717         * driver.cs: Activate the using-error detector at warning level
24718         4 (at least for MS-compatible APIs).
24719
24720         * namespace.cs (VerifyUsing): Small buglett fix.
24721
24722         * pending.cs (PendingImplementation): pass the container pointer. 
24723
24724         * interface.cs (GetMethods): Allow for recursive definition.  Long
24725         term, I would like to move every type to support recursive
24726         definitions, not the current ordering mechanism that we have right
24727         now.
24728
24729         The situation is this: Attributes are handled before interfaces,
24730         so we can apply attributes to interfaces.  But some attributes
24731         implement interfaces, we will now handle the simple cases
24732         (recursive definitions will just get an error).  
24733
24734         * parameter.cs: Only invalidate types at the end if we fail to
24735         lookup all types.  
24736
24737 2002-09-09  Martin Baulig  <martin@gnome.org>
24738
24739         * ecore.cs (PropertyExpr.Emit): Also check for
24740         TypeManager.system_int_array_get_length so this'll also work when
24741         compiling corlib.  Fixes #30003.
24742
24743 2002-09-09  Martin Baulig  <martin@gnome.org>
24744
24745         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24746         and throw an exception if we can't get the type's size.  Fixed #30040,
24747         added test-165.cs.
24748
24749 2002-09-09  Martin Baulig  <martin@gnome.org>
24750
24751         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24752
24753         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24754         context.  Fixes bug #30027.
24755
24756         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24757         virtual functions.  Fixes bug #30043, added test-164.cs.
24758
24759 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24760
24761         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24762
24763 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24764
24765         * driver.cs: Use an object to get the windows codepage since it's not a
24766         static property.
24767
24768 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24769
24770         * statement.cs (For.Emit): for infinite loops (test == null)
24771         return whether there is a break inside, not always "true".
24772
24773         * namespace.cs (UsingEntry): New struct to hold the name of the
24774         using definition, the location where it is defined, and whether it
24775         has been used in a successful type lookup.
24776
24777         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24778         strings.
24779
24780         * decl.cs: ditto.
24781
24782 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24783
24784         * attribute.cs : Fix incorrect code which relied on catching
24785         a NullReferenceException to detect a null being passed in
24786         where an object was expected.
24787
24788 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24789
24790         * statement.cs (Try): flag the catch variable as assigned
24791
24792         * expression.cs (Cast): Simplified by using ResolveType instead of
24793         manually resolving.
24794
24795         * statement.cs (Catch): Fix bug by using ResolveType.
24796
24797 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24798
24799         * expression.cs (BetterConversion): Special case for when we have
24800         a NullLiteral as the argument and we have to choose between string
24801         and object types - we choose string the way csc does.
24802
24803         * attribute.cs (Attribute.Resolve): Catch the
24804         NullReferenceException and report error #182 since the Mono
24805         runtime no more has the bug and having this exception raised means
24806         we tried to select a constructor which takes an object and is
24807         passed a null.
24808
24809 2002-09-05  Ravi Pratap  <ravi@ximian.com>
24810
24811         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
24812         message (1502, 1503) when we can't locate a method after overload
24813         resolution. This is much more informative and closes the bug
24814         Miguel reported.
24815
24816         * interface.cs (PopulateMethod): Return if there are no argument
24817         types. Fixes a NullReferenceException bug.
24818
24819         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
24820         expressions too. Previously we were checking only in one place for
24821         positional arguments leaving out named arguments.
24822
24823         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
24824         type to the enum type is not allowed. Remove code corresponding to
24825         that.
24826
24827         (ConvertNumericExplicit): Allow explicit conversions from
24828         the underlying type to enum type. This precisely follows the spec
24829         and closes a bug filed by Gonzalo.
24830
24831 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24832
24833         * compiler.csproj:
24834         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
24835
24836 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
24837
24838         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
24839         it was important that we stored the right value after the
24840         reduction in `converted'.
24841
24842 2002-09-04  Martin Baulig  <martin@gnome.org>
24843
24844         * location.cs (Location.SymbolDocument): Use full pathnames for the
24845         source files.
24846
24847 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
24848
24849         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
24850         of the expression resolve mechanism, because that will catch the
24851         SimpleName error failures.
24852
24853         (Conditional): If we can not resolve the
24854         expression, return, do not crash.
24855
24856 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24857
24858         * cs-tokenizer.cs:
24859         (location): display token name instead of its number.
24860
24861 2002-08-28  Martin Baulig  <martin@gnome.org>
24862
24863         * expression.cs (Binary.ResolveOperator): Don't silently return
24864         but return an error if an operator cannot be applied between two
24865         enum types.
24866
24867 2002-08-28  Martin Baulig  <martin@gnome.org>
24868
24869         * class.cs (Constructor.Define): Set the permission attributes
24870         correctly instead of making all constructors public.
24871
24872 2002-08-28  Martin Baulig  <martin@gnome.org>
24873
24874         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
24875         for private members before reporting a CS0103; if we find anything,
24876         it's a CS0122.
24877
24878 2002-08-28  Martin Baulig  <martin@gnome.org>
24879
24880         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
24881         to check whether `closure_start_type == closure_invocation_type',
24882         we also need to check whether `m.DeclaringType == closure_invocation_type'
24883         before bypassing the permission checks.  We might be accessing
24884         protected/private members from the base class.
24885         (TypeManager.RealMemberLookup): Only set private_ok if private
24886         members were requested via BindingFlags.NonPublic.
24887
24888         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
24889
24890         * expression.cs (MemberAccess.ResolveMemberAccess): Set
24891         MethodGroupExpr.IsExplicitImpl if appropriate.
24892         (Invocation.DoResolve): Don't report the CS0120 for explicit
24893         interface implementations.
24894
24895 2002-08-27  Martin Baulig  <martin@gnome.org>
24896
24897         * expression.cs (Invocation.DoResolve): If this is a static
24898         method and we don't have an InstanceExpression, we must report
24899         a CS0120.
24900
24901 2002-08-25  Martin Baulig  <martin@gnome.org>
24902
24903         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
24904         `==' between a valuetype and an object.
24905
24906 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
24907
24908         * ecore.cs (TypeExpr): Provide a ToString method.
24909
24910 2002-08-24  Martin Baulig  <martin@gnome.org>
24911
24912         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
24913         now called proggie.dbg and it's a binary file.
24914
24915 2002-08-23  Martin Baulig  <martin@gnome.org>
24916
24917         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
24918
24919 2002-08-23  Martin Baulig  <martin@gnome.org>
24920
24921         * struct.cs (MyStructInfo.ctor): Make this work with empty
24922         structs; it's not allowed to use foreach() on null.
24923
24924 2002-08-23  Martin Baulig  <martin@gnome.org>
24925
24926         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
24927         writer the full pathname of the generated assembly.
24928
24929 2002-08-23  Martin Baulig  <martin@gnome.org>
24930
24931         * statements.cs (FlowBranching.UsageVector.MergeChildren):
24932         A `finally' block never returns or breaks; improved handling of
24933         unreachable code.
24934
24935 2002-08-23  Martin Baulig  <martin@gnome.org>
24936
24937         * statement.cs (Throw.Resolve): Allow `throw null'.
24938
24939 2002-08-23  Martin Baulig  <martin@gnome.org>
24940
24941         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
24942         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
24943         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
24944         MemberLookup would return a wrong event if this is an explicit
24945         interface implementation and the class has an event with the same
24946         name.
24947
24948 2002-08-23  Martin Baulig  <martin@gnome.org>
24949
24950         * statement.cs (Block.AddChildVariableNames): New public method.
24951         (Block.AddChildVariableName): Likewise.
24952         (Block.IsVariableNameUsedInChildBlock): Likewise.
24953         (Block.AddVariable): Check whether a variable name has already
24954         been used in a child block.
24955
24956         * cs-parser.jay (declare_local_variables): Mark all variable names
24957         from the current block as being used in a child block in the
24958         implicit block.
24959
24960 2002-08-23  Martin Baulig  <martin@gnome.org>
24961
24962         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
24963         find the symbol writer.
24964
24965         * driver.cs: csc also allows the arguments to /define being
24966         separated by commas, not only by semicolons.
24967
24968 2002-08-23  Martin Baulig  <martin@gnome.org>
24969
24970         * interface.cs (Interface.GetMembers): Added static check for events.
24971
24972 2002-08-15  Martin Baulig  <martin@gnome.org>
24973
24974         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
24975         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
24976
24977         * ecore.cs (Expression.MemberLookup): Added documentation and explained
24978         why the MethodData.EmitDestructor() change was necessary.
24979
24980 2002-08-20  Martin Baulig  <martin@gnome.org>
24981
24982         * class.cs (TypeContainer.FindMembers): Added static check for events.
24983
24984         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
24985
24986         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
24987         use Type.GetEvents(), not Type.FindMembers().
24988
24989 2002-08-20  Martin Baulig  <martin@gnome.org>
24990
24991         * decl.cs (MemberCache): Added a special method cache which will
24992         be used for method-only searched.  This ensures that a method
24993         search will return a MethodInfo with the correct ReflectedType for
24994         inherited methods.      
24995
24996 2002-08-20  Martin Baulig  <martin@gnome.org>
24997
24998         * decl.cs (DeclSpace.FindMembers): Made this public.
24999
25000 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25001
25002         * delegate.cs: fixed build on windows.
25003         [FIXME:  Filed as bug #29150: MCS must report these errors.]
25004
25005 2002-08-19  Ravi Pratap  <ravi@ximian.com>
25006
25007         * ecore.cs (StandardConversionExists): Return a false
25008         if we are trying to convert the void type to anything else
25009         since that is not allowed.
25010
25011         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
25012         we flag error 70 in the event an event is trying to be accessed
25013         directly from outside the declaring type.
25014
25015 2002-08-20  Martin Baulig  <martin@gnome.org>
25016
25017         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
25018         MemberCache from typemanager.cs to decl.cs.
25019
25020 2002-08-19  Martin Baulig  <martin@gnome.org>
25021
25022         * class.cs (TypeContainer): Implement IMemberContainer.
25023         (TypeContainer.DefineMembers): Create the MemberCache.
25024         (TypeContainer.FindMembers): Do better BindingFlags checking; only
25025         return public members if BindingFlags.Public was given, check
25026         whether members are static.
25027
25028 2002-08-16  Martin Baulig  <martin@gnome.org>
25029
25030         * decl.cs (DeclSpace.Define): Splitted this in Define and
25031         DefineMembers.  DefineMembers is called first and initializes the
25032         MemberCache.
25033
25034         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
25035         DefineMembers() on all our DeclSpaces.
25036
25037         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
25038         but call DefineMembers() on all nested interfaces.  We call their
25039         Define() in our new Define() function.
25040
25041         * interface.cs (Interface): Implement IMemberContainer.
25042         (Interface.Define): Moved all code except the attribute stuf to
25043         DefineMembers().
25044         (Interface.DefineMembers): Initialize the member cache.
25045
25046         * typemanager.cs (IMemberFinder): Removed this interface, we don't
25047         need this anymore since we can use MemberCache.FindMembers directly.
25048
25049 2002-08-19  Martin Baulig  <martin@gnome.org>
25050
25051         * typemanager.cs (MemberCache): When creating the cache for an
25052         interface type, add all inherited members.
25053         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
25054         to `out bool used_cache' and documented it.
25055         (TypeManager.MemberLookup): If we already used the cache in the first
25056         iteration, we don't need to do the interfaces check.
25057
25058 2002-08-19  Martin Baulig  <martin@gnome.org>
25059
25060         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
25061         here from IMemberFinder and don't implement this interface anymore.
25062         (DeclSpace.MemberCache): Moved here from IMemberFinder.
25063
25064         * typemanager.cs (IMemberFinder): This interface is now only used by
25065         classes which actually support the member cache.
25066         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
25067         since we only put DeclSpaces into this Hashtable.
25068         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
25069         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
25070
25071 2002-08-16  Martin Baulig  <martin@gnome.org>
25072
25073         * typemanager.cs (ICachingMemberFinder): Removed.
25074         (IMemberFinder.MemberCache): New property.
25075         (TypeManager.FindMembers): Merged this with RealFindMembers().
25076         This function will never be called from TypeManager.MemberLookup()
25077         so we can't use the cache here, just the IMemberFinder.
25078         (TypeManager.MemberLookup_FindMembers): Check whether the
25079         IMemberFinder has a MemberCache and call the cache's FindMembers
25080         function.
25081         (MemberCache): Rewrote larger parts of this yet another time and
25082         cleaned it up a bit.
25083
25084 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
25085
25086         * driver.cs (LoadArgs): Support quoting.
25087
25088         (Usage): Show the CSC-like command line arguments.
25089
25090         Improved a few error messages.
25091
25092 2002-08-15  Martin Baulig  <martin@gnome.org>
25093
25094         * typemanager.cs (IMemberContainer.Type): New property.
25095         (IMemberContainer.IsInterface): New property.
25096
25097         The following changes are conditional to BROKEN_RUNTIME, which is
25098         defined at the top of the file.
25099
25100         * typemanager.cs (MemberCache.MemberCache): Don't add the base
25101         class'es members, but add all members from TypeHandle.ObjectType
25102         if we're an interface.
25103         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
25104         is the current type.
25105         (MemberCache.CacheEntry.Container): Removed this field.
25106         (TypeHandle.GetMembers): Include inherited members.
25107
25108 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25109
25110         * typemanager.cs: fixed compilation and added a comment on a field that
25111         is never used.
25112
25113 2002-08-15  Martin Baulig  <martin@gnome.org>
25114
25115         * class.cs (ConstructorInitializer.Resolve): In the
25116         Expression.MemberLookup call, use the queried_type as
25117         invocation_type.
25118
25119         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
25120         declared' attribute, it's always true.
25121         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
25122         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
25123         temporary wrapper for FindMembers which tells MemberLookup whether
25124         members from the base classes are included in the return value.
25125         This will go away soon.
25126         (TypeManager.MemberLookup): Use this temporary hack here; once the
25127         new MemberCache is completed, we don't need to do the DeclaredOnly
25128         looping here anymore since the MemberCache will take care of this.
25129         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
25130         (MemberCache): When creating the MemberCache for a class, get
25131         members from the current class and all its base classes.
25132         (MemberCache.CacheEntry.Container): New field.  This is a
25133         temporary hack until the Mono runtime is fixed to distinguish
25134         between ReflectedType and DeclaringType.  It allows us to use MCS
25135         with both the MS runtime and the unfixed Mono runtime without
25136         problems and without accecting performance.
25137         (MemberCache.SearchMembers): The DeclaredOnly looping from
25138         TypeManager.MemberLookup is now done here.      
25139
25140 2002-08-14  Martin Baulig  <martin@gnome.org>
25141
25142         * statement.cs (MyStructInfo.MyStructInfo): Don't call
25143         Type.GetFields on dynamic types but get the fields from the
25144         corresponding TypeContainer.
25145         (MyStructInfo.GetStructInfo): Added check for enum types.
25146
25147         * typemanager.cs (MemberList.IsSynchronized): Implemented.
25148         (MemberList.SyncRoot): Implemented.
25149         (TypeManager.FilterWithClosure): No need to check permissions if
25150         closure_start_type == closure_invocation_type, don't crash if
25151         closure_invocation_type is null.
25152
25153 2002-08-13  Martin Baulig  <martin@gnome.org>
25154
25155         Rewrote TypeContainer.FindMembers to use a member cache.  This
25156         gives us a speed increase of about 35% for the self-hosting MCS
25157         build and of about 15-20% for the class libs (both on GNU/Linux).
25158
25159         * report.cs (Timer): New class to get enhanced profiling.  This
25160         whole class is "TIMER" conditional since it remarkably slows down
25161         compilation speed.
25162
25163         * class.cs (MemberList): New class.  This is an IList wrapper
25164         which we're now using instead of passing MemberInfo[]'s around to
25165         avoid copying this array unnecessarily.
25166         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
25167         (ICachingMemberFinder, IMemberContainer): New interface.
25168         (TypeManager.FilterWithClosure): If `criteria' is null, the name
25169         has already been checked, otherwise use it for the name comparision.
25170         (TypeManager.FindMembers): Renamed to RealMemberFinder and
25171         provided wrapper which tries to use ICachingMemberFinder.FindMembers
25172         if possible.  Returns a MemberList, not a MemberInfo [].
25173         (TypeHandle): New class, implements IMemberContainer.  We create
25174         one instance of this class per type, it contains a MemberCache
25175         which is used to do the member lookups.
25176         (MemberCache): New class.  Each instance of this class contains
25177         all members of a type and a name-based hash table.
25178         (MemberCache.FindMembers): This is our new member lookup
25179         function.  First, it looks up all members of the requested name in
25180         the hash table.  Then, it walks this list and sorts out all
25181         applicable members and returns them.
25182
25183 2002-08-13  Martin Baulig  <martin@gnome.org>
25184
25185         In addition to a nice code cleanup, this gives us a performance
25186         increase of about 1.4% on GNU/Linux - not much, but it's already
25187         half a second for the self-hosting MCS compilation.
25188
25189         * typemanager.cs (IMemberFinder): New interface.  It is used by
25190         TypeManager.FindMembers to call FindMembers on a TypeContainer,
25191         Enum, Delegate or Interface.
25192         (TypeManager.finder_to_member_finder): New PtrHashtable.
25193         (TypeManager.finder_to_container): Removed.
25194         (TypeManager.finder_to_delegate): Removed.
25195         (TypeManager.finder_to_interface): Removed.
25196         (TypeManager.finder_to_enum): Removed.
25197
25198         * interface.cs (Interface): Implement IMemberFinder.
25199
25200         * delegate.cs (Delegate): Implement IMemberFinder.
25201
25202         * enum.cs (Enum): Implement IMemberFinder.
25203
25204         * class.cs (TypeContainer): Implement IMemberFinder.
25205
25206 2002-08-12  Martin Baulig  <martin@gnome.org>
25207
25208         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
25209
25210 2002-08-12  Martin Baulig  <martin@gnome.org>
25211
25212         * ecore.cs (ITypeExpression): New interface for expressions which
25213         resolve to a type.
25214         (TypeExpression): Renamed to TypeLookupExpression.
25215         (Expression.DoResolve): If we're doing a types-only lookup, the
25216         expression must implement the ITypeExpression interface and we
25217         call DoResolveType() on it.
25218         (SimpleName): Implement the new ITypeExpression interface.
25219         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25220         hack, the situation that we're only looking up types can't happen
25221         anymore when this method is called.  Moved the type lookup code to
25222         DoResolveType() and call it.
25223         (SimpleName.DoResolveType): This ITypeExpression interface method
25224         is now doing the types-only lookup.
25225         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25226         (ResolveFlags): Added MaskExprClass.
25227
25228         * expression.cs (MemberAccess): Implement the ITypeExpression
25229         interface.
25230         (MemberAccess.DoResolve): Added support for a types-only lookup
25231         when we're called via ITypeExpression.DoResolveType().
25232         (ComposedCast): Implement the ITypeExpression interface.
25233
25234         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25235         Expression.Resolve() with ResolveFlags.Type instead.
25236
25237 2002-08-12  Martin Baulig  <martin@gnome.org>
25238
25239         * interface.cs (Interface.Define): Apply attributes.
25240
25241         * attribute.cs (Attribute.ApplyAttributes): Added support for
25242         interface attributes.
25243
25244 2002-08-11  Martin Baulig  <martin@gnome.org>
25245
25246         * statement.cs (Block.Emit): Only check the "this" variable if we
25247         do not always throw an exception.
25248
25249         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25250         whether the property has a set accessor.
25251
25252 2002-08-11  Martin Baulig  <martin@gnome.org>
25253
25254         Added control flow analysis support for structs.
25255
25256         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25257         with control flow analysis turned off.
25258         (IVariable): New interface.
25259         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25260         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25261         (FieldExpr.DoResolve): Resolve the instance expression with flow
25262         analysis turned off and do the definite assignment check after the
25263         resolving when we know what the expression will resolve to.
25264
25265         * expression.cs (LocalVariableReference, ParameterReference):
25266         Implement the new IVariable interface, only call the flow analysis
25267         code if ec.DoFlowAnalysis is true.
25268         (This): Added constructor which takes a Block argument.  Implement
25269         the new IVariable interface.
25270         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25271         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25272         This does the definite assignment checks for struct members.
25273
25274         * class.cs (Constructor.Emit): If this is a non-static `struct'
25275         constructor which doesn't have any initializer, call
25276         Block.AddThisVariable() to tell the flow analysis code that all
25277         struct elements must be initialized before control returns from
25278         the constructor.
25279
25280         * statement.cs (MyStructInfo): New public class.
25281         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25282         argument to this indexer.  If non-zero, check an individual struct
25283         member, not the whole struct.
25284         (FlowBranching.CheckOutParameters): Check struct members.
25285         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25286         overloaded versions of these methods which take an additional
25287         `int field_idx' argument to check struct members.
25288         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25289         overloaded versions of these methods which take an additional
25290         `string field_name' argument to check struct member.s
25291         (VariableInfo): Implement the IVariable interface.
25292         (VariableInfo.StructInfo): New public property.  Returns the
25293         MyStructInfo instance of the variable if it's a struct or null.
25294         (Block.AddThisVariable): New public method.  This is called from
25295         Constructor.Emit() for non-static `struct' constructor which do
25296         not have any initializer.  It creates a special variable for the
25297         "this" instance variable which will be checked by the flow
25298         analysis code to ensure that all of the struct's fields are
25299         initialized before control returns from the constructor.
25300         (UsageVector): Added support for struct members.  If a
25301         variable/parameter is a struct with N members, we reserve a slot
25302         in the usage vector for each member.  A struct is considered fully
25303         initialized if either the struct itself (slot 0) or all its
25304         members are initialized.
25305
25306 2002-08-08  Martin Baulig  <martin@gnome.org>
25307
25308         * driver.cs (Driver.MainDriver): Only report an error CS5001
25309         if there were no compilation errors.
25310
25311         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25312         `UnsafeContext' property to determine whether the parent is in
25313         unsafe context rather than checking the parent's ModFlags:
25314         classes nested in an unsafe class are unsafe as well.
25315
25316 2002-08-08  Martin Baulig  <martin@gnome.org>
25317
25318         * statement.cs (UsageVector.MergeChildren): Distinguish between
25319         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25320         we return.  Added test17() and test18() to test-154.cs.
25321
25322 2002-08-08  Martin Baulig  <martin@gnome.org>
25323
25324         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25325         Family access, make sure the invoking type isn't a subclass of the
25326         queried type (that'd be a CS1540).
25327
25328         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25329         this method which takes an additional `Type invocation_type'.
25330
25331         * expression.cs (BaseAccess.DoResolve): Use the base type as
25332         invocation and query type.
25333         (MemberAccess.DoResolve): If the lookup failed and we're about to
25334         report a CS0122, try a lookup with the ec.ContainerType - if this
25335         succeeds, we must report a CS1540.
25336
25337 2002-08-08  Martin Baulig  <martin@gnome.org>
25338
25339         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25340         (MethodGroupExpr): Implement the IMemberExpr interface.
25341
25342         * expression (MemberAccess.ResolveMemberAccess): No need to have
25343         any special code for MethodGroupExprs anymore, they're now
25344         IMemberExprs.   
25345
25346 2002-08-08  Martin Baulig  <martin@gnome.org>
25347
25348         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25349         Family, FamANDAssem and FamORAssem permissions.
25350         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25351
25352 2002-08-08  Martin Baulig  <martin@gnome.org>
25353
25354         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25355         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25356         or loop block.
25357
25358 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25359
25360         * driver.cs: implemented /resource option to embed managed resources.
25361
25362 2002-08-07  Martin Baulig  <martin@gnome.org>
25363
25364         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25365         (FieldBase.HasFieldInitializer): New public property.
25366         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25367         returns the field initializer and makes sure it is only resolved once.
25368         (TypeContainer.EmitFieldInitializers): Call
25369         FieldBase.GetInitializerExpression to get the initializer, this ensures
25370         that it isn't resolved multiple times.
25371
25372         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25373         the resolving process (SimpleName/MemberLookup) that we're currently
25374         emitting a field initializer (which must not access any instance members,
25375         this is an error CS0236).
25376
25377         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25378         argument, if the `IsFieldInitializer' flag is set, we must report and
25379         error CS0236 and not an error CS0120.   
25380
25381 2002-08-07  Martin Baulig  <martin@gnome.org>
25382
25383         * ecore.cs (IMemberExpr): New public interface.
25384         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25385         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25386         if the expression is an IMemberExpr.
25387
25388         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25389         to be null, implicitly default to `this' if we're non-static in
25390         this case.  Simplified the code a lot by using the new IMemberExpr
25391         interface.  Also fixed bug #28176 here.
25392
25393 2002-08-06  Martin Baulig  <martin@gnome.org>
25394
25395         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25396         ParameterReferences during semantic analysis so that we can do a
25397         type-only search when resolving Cast, TypeOf and SizeOf.
25398         (block): Pass the `current_local_parameters' to the Block's
25399         constructor.
25400
25401         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25402         argument to the constructor.
25403         (ConstructorInitializer.Resolve): Create a temporary implicit
25404         block with the parameters.
25405
25406         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25407         references here if we aren't doing a type-only search.
25408
25409         * statement.cs (Block): Added constructor which takes a
25410         `Parameters parameters' argument.
25411         (Block.Parameters): New public property.
25412
25413         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25414         to `Parameters' and made it public readonly.
25415
25416 2002-08-06  Martin Baulig  <martin@gnome.org>
25417
25418         * ecore.cs (Expression.Warning): Made this public as well.
25419
25420         * report.cs (Report.Debug): Print the contents of collections.
25421
25422 2002-08-06  Martin Baulig  <martin@gnome.org>
25423
25424         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25425         used to tell Resolve() which kinds of expressions it may return.
25426         (Expression.Resolve): Added overloaded version of this method which
25427         takes a `ResolveFlags flags' argument.  This can be used to tell
25428         Resolve() which kinds of expressions it may return.  Reports a
25429         CS0118 on error.
25430         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25431         ResolveFlags.SimpleName.
25432         (Expression.Error118): Added overloaded version of this method which
25433         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25434         which kinds of expressions are allowed.
25435
25436         * expression.cs (Argument.ResolveMethodGroup): New public method.
25437         Resolves an argument, but allows a MethodGroup to be returned.
25438         This is used when invoking a delegate.
25439
25440         * TODO: Updated a bit.
25441
25442 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25443
25444         Fixed compilation with csc.
25445
25446         * ecore.cs: Expression.Error made public. Is this correct? Should
25447         Warning be made public too?
25448
25449         * expression.cs: use ea.Location instead of ea.loc.
25450         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25451
25452 2002-08-06  Martin Baulig  <martin@gnome.org>
25453
25454         * ecore.cs (Expression.loc): Moved the location here instead of
25455         duplicating it in all derived classes.
25456         (Expression.Location): New public property.
25457         (Expression.Error, Expression.Warning): Made them non-static and
25458         removed the location argument.
25459         (Expression.Warning): Added overloaded version which takes an
25460         `int level' argument.
25461         (Expression.Error118): Make this non-static and removed the
25462         expression and location arguments.
25463         (TypeExpr): Added location argument to the constructor.
25464
25465         * expression.cs (StaticCallExpr): Added location argument to
25466         the constructor.
25467         (Indirection, PointerArithmetic): Likewise.
25468         (CheckedExpr, UnCheckedExpr): Likewise.
25469         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25470         (StringPtr): Likewise.
25471
25472
25473 2002-08-05  Martin Baulig  <martin@gnome.org>
25474
25475         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25476
25477         * assign.cs (Assign.DoResolve): Check whether the source
25478         expression is a value or variable.
25479
25480         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25481         while resolving the corresponding blocks.
25482
25483         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25484         an error, don't silently return null.
25485
25486         * statement.cs (Block.AddVariable): Do the error reporting here
25487         and distinguish between CS0128 and CS0136.
25488         (Block.DoResolve): Report all unused labels (warning CS0164).
25489         (LabeledStatement): Pass the location to the constructor.
25490         (LabeledStatement.HasBeenReferenced): New property.
25491         (LabeledStatement.Resolve): Set it to true here.
25492
25493         * statement.cs (Return.Emit): Return success even after reporting
25494         a type mismatch error (CS0126 or CS0127), this is what csc does and
25495         it avoids confusing the users with any consecutive errors.
25496
25497 2002-08-05  Martin Baulig  <martin@gnome.org>
25498
25499         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25500
25501         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25502
25503         * expression.cs (MemberAccess.DoResolve): Silently return if an
25504         error has already been reported.
25505
25506         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25507         error has already been reported.
25508
25509 2002-08-05  Martin Baulig  <martin@gnome.org>
25510
25511         * statement.cs (UsageVector): Only initialize the `parameters'
25512         vector if we actually have any "out" parameters.
25513
25514 2002-08-05  Martin Baulig  <martin@gnome.org>
25515
25516         * expression.cs (Binary.ResolveOperator): When combining delegates,
25517         they must have the same type.
25518
25519 2002-08-05  Martin Baulig  <martin@gnome.org>
25520
25521         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25522         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25523         work with the ms runtime and we also don't need it: if we're a
25524         PropertyBuilder and not in the `indexer_arguments' hash, then we
25525         are a property and not an indexer.
25526
25527         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25528         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25529         since the latter one doesn't work with the ms runtime.
25530
25531 2002-08-03  Martin Baulig  <martin@gnome.org>
25532
25533         Fixed bugs #27998 and #22735.
25534
25535         * class.cs (Method.IsOperator): New public field.
25536         (Method.CheckBase): Report CS0111 if there's already a method
25537         with the same parameters in the current class.  Report CS0508 when
25538         attempting to change the return type of an inherited method.
25539         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25540         and it's not marked abstract or extern.
25541         (PropertyBase): New abstract base class for Property and Indexer.
25542         (PropertyBase.CheckBase): Moved here from Property and made it work
25543         for indexers.
25544         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25545         the same so we can reuse it there.
25546         (Property, Indexer): Derive from PropertyBase.
25547         (MethodSignature.inheritable_property_signature_filter): New delegate
25548         to find properties and indexers.
25549
25550         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25551         argument and improved error reporting.
25552
25553         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25554         EmptyReadOnlyParameters and made it a property.
25555
25556         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25557         version of this method which takes a `PropertyInfo indexer'.
25558         (TypeManager.RegisterIndexer): New method.
25559
25560         * class.cs: Added myself as author of this file :-)
25561
25562 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25563
25564         * class.cs: fixed compilation on windoze.
25565
25566 2002-08-03  Martin Baulig  <martin@gnome.org>
25567
25568         * interface.cs (Interface.GetInterfaceBases): Check whether all
25569         base interfaces are at least as accessible than the current one.
25570
25571         * class.cs (TypeContainer.GetClassBases): Check whether base types
25572         are at least as accessible than the current type.
25573         (TypeContainer.AsAccessible): Implemented and made non-static.
25574         (MemberBase.CheckParameters): Report errors if the accessibility
25575         checks fail.
25576
25577         * delegate.cs (Delegate.Delegate): The default visibility is
25578         internal for top-level types and private for nested types.
25579         (Delegate.Define): Report errors if the accessibility checks fail.
25580
25581         * enum.cs (Enum.Enum): The default visibility is internal for
25582         top-level types and private for nested types.
25583         (Enum.DefineType): Compute the correct visibility.
25584
25585         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25586         function which takes a `bool is_toplevel' instead of a TypeContainer.
25587
25588         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25589         builtin type.
25590
25591 2002-08-02  Martin Baulig  <martin@gnome.org>
25592
25593         * expression.cs (LocalVariableReferenc): Added constructor which
25594         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25595         (LocalVariableReference.IsReadOnly): New property.
25596         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25597         variable is readonly, use our own readonly flag to do this; you can
25598         use the new constructor to get a writable reference to a read-only
25599         variable.
25600
25601         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25602         reference to the local variable.
25603
25604 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25605
25606         * rootcontext.cs (ResolveCore): Also include System.Exception
25607
25608         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25609         we reach an EmptyStatement.
25610
25611         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25612         is also fine.
25613
25614         * expression.cs (Binary.ResolveOperator): Check error result in
25615         two places.
25616
25617         use brtrue/brfalse directly and avoid compares to null.
25618
25619 2002-08-02  Martin Baulig  <martin@gnome.org>
25620
25621         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25622         Fixes bug #28407, added test-155.cs.
25623
25624 2002-08-01  Martin Baulig  <martin@gnome.org>
25625
25626         * class.cs (Event.EmitDefaultMethod): Make this work with static
25627         events.  Fixes #28311, added verify-3.cs.
25628
25629 2002-08-01  Martin Baulig  <martin@gnome.org>
25630
25631         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25632         `is_disposable' fields.
25633         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25634         `hm.is_disposable' if we're using the collection pattern.
25635         (Foreach.EmitCollectionForeach): Use the correct type for the
25636         enumerator's local variable, only emit the try/finally block if
25637         necessary (fixes #27713).
25638
25639 2002-08-01  Martin Baulig  <martin@gnome.org>
25640
25641         * ecore.cs (Expression.report118): Renamed to Error118 and made
25642         it public static.
25643
25644         * statement.cs (Throw.Resolve): Check whether the expression is of
25645         the correct type (CS0118) and whether the type derives from
25646         System.Exception (CS0155).
25647         (Catch.Resolve): New method.  Do the type lookup here and check
25648         whether it derives from System.Exception (CS0155).
25649         (Catch.CatchType, Catch.IsGeneral): New public properties.
25650
25651         * typemanager.cs (TypeManager.exception_type): Added.
25652
25653 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25654
25655         * driver.cs: Updated About function.
25656
25657 2002-07-31  Martin Baulig  <martin@gnome.org>
25658
25659         Implemented Control Flow Analysis.
25660
25661         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25662         (EmitContext.CurrentBranching): Added.
25663         (EmitContext.StartFlowBranching): Added.
25664         (EmitContext.EndFlowBranching): Added.
25665         (EmitContext.KillFlowBranching): Added.
25666         (EmitContext.IsVariableAssigned): Added.
25667         (EmitContext.SetVariableAssigned): Added.
25668         (EmitContext.IsParameterAssigned): Added.
25669         (EmitContext.SetParameterAssigned): Added.
25670         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25671         Added control flow analysis stuff here.
25672
25673         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25674         resolve the expression as lvalue.
25675         (LocalVariableReference.DoResolve): Check whether the variable has
25676         already been assigned.
25677         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25678         the parameter as assigned here.
25679         (ParameterReference.DoResolve): Check whether the parameter has already
25680         been assigned.
25681         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25682         expression as lvalue.
25683
25684         * statement.cs (FlowBranching): New class for the flow analysis code.
25685         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25686         (LabeledStatement.IsDefined): New public property.
25687         (LabeledStatement.AddUsageVector): New public method to tell flow
25688         analyis that the label may be reached via a forward jump.
25689         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25690         flow analysis.
25691         (VariableInfo.Number): New public field.  This is used by flow analysis
25692         to number all locals of a block.
25693         (Block.CountVariables): New public property.  This is the number of
25694         local variables in this block (including the locals from all parent
25695         blocks).
25696         (Block.EmitMeta): Number all the variables.
25697
25698         * statement.cs: Added flow analysis support to all classes.
25699
25700 2002-07-31  Martin Baulig  <martin@gnome.org>
25701
25702         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25703         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25704         then use this argument.
25705
25706         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25707
25708         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25709         use this to specify /define options.
25710
25711 2002-07-29  Martin Baulig  <martin@gnome.org>
25712
25713         * statement.cs (Fixed): Moved all code that does variable lookups
25714         and resolvings from Emit to Resolve.
25715
25716         * statement.cs (For): Moved all code that does variable lookups
25717         and resolvings from Emit to Resolve.
25718
25719         * statement.cs (Using): Moved all code that does variable lookups
25720         and resolvings from Emit to Resolve.
25721
25722 2002-07-29  Martin Baulig  <martin@gnome.org>
25723
25724         * attribute.cs (Attribute.Resolve): Explicitly catch a
25725         System.NullReferenceException when creating the
25726         CustromAttributeBuilder and report a different warning message.
25727
25728 2002-07-29  Martin Baulig  <martin@gnome.org>
25729
25730         * support.cs (ParameterData.ParameterName): Added method to
25731         get the name of a parameter.
25732
25733         * typemanager.cs (TypeManager.IsValueType): New public method.
25734
25735 2002-07-29  Martin Baulig  <martin@gnome.org>
25736
25737         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25738         is a flag which specifies that it's either ref or out.
25739         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25740         the out parameter to `out Parameter.Modifier mod', also set the
25741         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25742
25743         * support.cs (InternalParameters.ParameterModifier): Distinguish
25744         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25745         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25746
25747         * expression.cs (Argument.GetParameterModifier): Distinguish
25748         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25749         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25750
25751 2002-07-29  Martin Baulig  <martin@gnome.org>
25752
25753         * expression.cs (ParameterReference.ParameterReference): Added
25754         `Location loc' argument to the constructor.
25755
25756         * cs-parser.jay: Pass location to ParameterReference.
25757
25758 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25759
25760         * statement.cs (Try): Initialize the location.
25761
25762         * cs-parser.jay: pass location to Try.
25763
25764         * expression.cs (Unary.Reduce): Change the prototype to return
25765         whether a constant fold could be performed or not.  The result is
25766         returned in an out parameters.  In the case of Indirection and
25767         AddressOf, we want to perform the full tests.
25768
25769 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25770
25771         * statement.cs (Statement.Emit): Flag dead code.
25772
25773 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25774
25775         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25776
25777 2002-07-27  Martin Baulig  <martin@gnome.org>
25778
25779         * class.cs (MethodData.Define): Put back call to
25780         TypeManager.AddMethod(), accidentally commented this out.
25781
25782         * report.cs (Debug): New public method to print debugging information,
25783         this is `[Conditional ("DEBUG")]'.
25784
25785 2002-07-26  Martin Baulig  <martin@gnome.org>
25786
25787         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25788         (switch_statement): Push the current_block to the switch_stack and
25789         pop it again when we're done with the switch.
25790         (switch_section): The new block is a child of the current_block.
25791         Fixes bug #24007, added test-152.cs.
25792
25793 2002-07-27  Martin Baulig  <martin@gnome.org>
25794
25795         * expression.cs (Invocation.EmitArguments): When calling a varargs
25796         function with only its fixed arguments, we need to pass an empty
25797         array.
25798
25799 2002-07-27  Martin Baulig  <martin@gnome.org>
25800
25801         Mono 0.13 has been released.
25802
25803 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25804
25805         * driver.cs: Rename --resource to --linkres, because that is what
25806         we do currently, we dont support --resource yet.
25807
25808         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
25809
25810 2002-07-25  Martin Baulig  <martin@gnome.org>
25811
25812         * class.cs (MethodData): New public class.  This is a `method builder'
25813         class for a method or one accessor of a Property/Indexer/Event.
25814         (MethodData.GetMethodFlags): Moved here from MemberBase.
25815         (MethodData.ApplyAttributes): Likewise.
25816         (MethodData.ApplyObsoleteAttribute): Likewise.
25817         (MethodData.ApplyConditionalAttribute): Likewise.
25818         (MethodData.ApplyDllImportAttribute): Likewise.
25819         (MethodData.CheckAbstractAndExternal): Likewise.
25820         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
25821         (MethodData.Emit): Formerly known as Method.Emit().
25822         (MemberBase): Moved everything which was specific to a single
25823         accessor/method to MethodData.
25824         (Method): Create a new MethodData and call Define() and Emit() on it.
25825         (Property, Indexer, Event): Create a new MethodData objects for each
25826         accessor and call Define() and Emit() on them.
25827
25828 2002-07-25  Martin Baulig  <martin@gnome.org>
25829
25830         Made MethodCore derive from MemberBase to reuse the code from there.
25831         MemberBase now also checks for attributes.
25832
25833         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
25834         (MemberBase.GetMethodFlags): Moved here from class Method and marked
25835         as virtual.
25836         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
25837         `CallingConventions cc' and `Attributes opt_attrs' arguments.
25838         (MemberBase.ApplyAttributes): New virtual method; applies the
25839         attributes to a method or accessor.
25840         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
25841         (MemberBase.ApplyConditionalAttribute): Likewise.
25842         (MemberBase.ApplyDllImportAttribute): Likewise.
25843         (MemberBase.CheckAbstractAndExternal): Likewise.
25844         (MethodCore.ParameterTypes): This is now a property instead of a
25845         method, it's initialized from DoDefineParameters().
25846         (MethodCore.ParameterInfo): Removed the set accessor.
25847         (MethodCore.DoDefineParameters): New protected virtual method to
25848         initialize ParameterTypes and ParameterInfo.
25849         (Method.GetReturnType): We can now simply return the MemberType.
25850         (Method.GetMethodFlags): Override the MemberBase version and add
25851         the conditional flags.
25852         (Method.CheckBase): Moved some code from Define() here, call
25853         DoDefineParameters() here.
25854         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
25855         here to avoid some larger code duplication.
25856         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
25857         ensure that abstract and external accessors don't declare a body.
25858
25859         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
25860         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
25861         lookup in the attribute's parent classes, so we need to abort as soon
25862         as we found the first match.
25863         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
25864         the attribute has no arguments.
25865
25866         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
25867         of a Method.
25868
25869 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25870
25871         * cs-parser.jay: reverted previous patch.
25872
25873 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25874
25875         * cs-parser.jay: fixed bug #22119.
25876
25877 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25878
25879         * attribute.cs: fixed compilation. The error was:
25880         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
25881         be assigned to before control leaves the current method."
25882         [FIXME:  Filed as bug #28186: MCS must report this error.]
25883
25884 2002-07-25  Martin Baulig  <martin@gnome.org>
25885
25886         * attribute.cs (Attribute.Conditional_GetConditionName): New static
25887         method to pull the condition name ouf of a Conditional attribute.
25888         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
25889         the obsolete message and error flag out of an Obsolete attribute.
25890
25891         * class.cs (Method.GetMethodFlags): New public method to get the
25892         TypeManager.MethodFlags for this method.
25893         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
25894         private methods.
25895         (Method.Define): Get and apply the Obsolete and Conditional attributes;
25896         if we're overriding a virtual function, set the new private variable
25897         `parent_method'; call the new TypeManager.AddMethod().
25898
25899         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
25900         the MethodBuilder and the Method in a PtrHashtable.
25901         (TypeManager.builder_to_method): Added for this purpose.
25902         (TypeManager.MethodFlags): Added IsObsoleteError.
25903         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
25904         Obsolete and Conditional arguments in MethodBuilders.  If we discover
25905         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
25906         the message from the attribute.
25907
25908 2002-07-24  Martin Baulig  <martin@gnome.org>
25909
25910         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
25911         preprocessor directives, ensure that the argument to #define/#undef is
25912         exactly one identifier and that it's actually an identifier.
25913
25914         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
25915         did not work ....
25916
25917 2002-07-24  Martin Baulig  <martin@gnome.org>
25918
25919         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
25920         initialize it to TypeManager.object_type in the constructor.
25921         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
25922         of the `hm.get_current' method if we're using the collection pattern.
25923         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
25924         for the explicit conversion to make it work when we're using the collection
25925         pattern and the `Current' property has a different return type than `object'.
25926         Fixes #27713.
25927
25928 2002-07-24  Martin Baulig  <martin@gnome.org>
25929
25930         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
25931         does not match, but don't report any errors.  This method is called in
25932         order for all methods in a MethodGroupExpr until a matching method is
25933         found, so we don't want to bail out if the first method doesn't match.
25934         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
25935         matches, report the 123.  Fixes #28070.
25936
25937 2002-07-24  Martin Baulig  <martin@gnome.org>
25938
25939         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
25940         TypeManager.TypeToCoreType() to the top of the method so the
25941         following equality checks will work.  Fixes #28107.
25942
25943 2002-07-24  Martin Baulig  <martin@gnome.org>
25944
25945         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
25946         operand is of type uint, and the other operand is of type sbyte,
25947         short or int, the operands are converted to type long." -
25948         Actually do what this comment already told us.  Fixes bug #28106,
25949         added test-150.cs.
25950
25951 2002-07-24  Martin Baulig  <martin@gnome.org>
25952
25953         * class.cs (MethodBase): New abstract class.  This is now a base
25954         class for Property, Indexer and Event to avoid some code duplication
25955         in their Define() and DefineMethods() methods.
25956         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
25957         generic methods for Define() and DefineMethods().
25958         (FieldBase): Derive from MemberBase, not MemberCore.
25959         (Property): Derive from MemberBase, not MemberCore.
25960         (Property.DefineMethod): Moved all the code from this method to the
25961         new MethodBase.DefineAccessor(), just call it with appropriate
25962         argumetnts.
25963         (Property.Define): Call the new Property.DoDefine(), this does some
25964         sanity checks and we don't need to duplicate the code everywhere.
25965         (Event): Derive from MemberBase, not MemberCore.
25966         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
25967         accessors, this will also make them work with interface events.
25968         (Indexer): Derive from MemberBase, not MemberCore.
25969         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
25970         (Indexer.Define): Use the new MethodBase functions.
25971
25972         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
25973         argument to the constructor.
25974         (Interface.FindMembers): Added support for interface events.
25975         (Interface.PopluateEvent): Implemented.
25976
25977         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
25978
25979 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
25980
25981         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
25982         but this is required to check for a method name being the same as
25983         the containing class.  
25984
25985         Handle this now.
25986
25987 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25988
25989         * interface.cs: initialize variable.
25990
25991 2002-07-23  Martin Baulig  <martin@gnome.org>
25992
25993         Implemented the IndexerName attribute in interfaces.
25994
25995         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
25996         name if this is an explicit interface implementation.
25997         (Indexer.InterfaceIndexerName): New public variable.  If we're
25998         implementing an interface indexer, this is the IndexerName in that
25999         interface.  Otherwise, it's the IndexerName.
26000         (Indexer.DefineMethod): If we're implementing interface indexer,
26001         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
26002         and Pending.ImplementIndexer methods.
26003         (Indexer.Define): Also define the PropertyBuilder if we're
26004         implementing an interface indexer and this is neither an explicit
26005         interface implementation nor do the IndexerName match the one in
26006         the interface.
26007
26008         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
26009         If a method is defined here, then we always need to create a proxy
26010         for it.  This is used when implementing interface indexers.
26011         (Pending.IsInterfaceIndexer): New public method.
26012         (Pending.ImplementIndexer): New public method.
26013         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
26014         This is used when implementing interface indexers to define a proxy
26015         if necessary.
26016         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
26017         define a proxy if necessary.
26018
26019         * interface.cs (Interface.IndexerName): New public variable.
26020         (Interface.PopulateIndexer): Set the IndexerName.
26021         (Interface.DefineIndexers): New private method.  Populate all the
26022         indexers and make sure their IndexerNames match.
26023
26024         * typemanager.cs (IndexerPropertyName): Added support for interface
26025         indexers.
26026
26027 2002-07-22  Martin Baulig  <martin@gnome.org>
26028
26029         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
26030         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
26031         ret if HasReturnLabel.
26032         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
26033         variables.
26034
26035         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
26036         and set the ec.LoopBeginTryCatchLevel.
26037         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
26038         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
26039         the current ec.TryCatchLevel, the branch goes out of an exception
26040         block.  In this case, we need to use Leave and not Br.
26041
26042 2002-07-22  Martin Baulig  <martin@gnome.org>
26043
26044         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
26045         block unless the block does not always return or it is contained in
26046         another try { ... } catch { ... } block.  Fixes bug #26506.
26047         Added verify-1.cs to the test suite.
26048
26049 2002-07-22  Martin Baulig  <martin@gnome.org>
26050
26051         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
26052         then we do not always return.  Fixes bug #24985.
26053
26054 2002-07-22  Martin Baulig  <martin@gnome.org>
26055
26056         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
26057         lookup on a per-class level; ie. walk up the class hierarchy until we
26058         found at least one applicable method, then choose the best among them.
26059         Fixes bug #24463 and test-29.cs.
26060
26061 2002-07-22  Martin Baulig  <martin@gnome.org>
26062
26063         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
26064         return types of the methods.  The return type is not part of the
26065         signature and we must not check it to make the `new' modifier work.
26066         Fixes bug #27999, also added test-147.cs.
26067         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
26068
26069         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
26070         on the method's return type.
26071
26072 2002-07-21  Martin Baulig  <martin@gnome.org>
26073
26074         * assign.cs: Make this work if the rightmost source is a constant and
26075         we need to do an implicit type conversion.  Also adding a few more tests
26076         to test-38.cs which should have caught this.
26077
26078         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
26079         target in the makefile for this.  The makefile.gnu is primarily intended
26080         for end-users who don't want to debug the compiler.
26081
26082 2002-07-21  Martin Baulig  <martin@gnome.org>
26083
26084         * assign.cs: Improved the Assign class so it can now handle embedded
26085         assignments (X = Y = Z = something).  As a side-effect this'll now also
26086         consume less local variables.  test-38.cs now passes with MCS, added
26087         a few new test cases to that test.
26088
26089 2002-07-20  Martin Baulig  <martin@gnome.org>
26090
26091         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
26092         instructions.  Fixes bug #27977, also added test-146.cs.
26093
26094 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26095
26096         * cs-tokenizer.cs: fixed getHex ().
26097
26098 2002-07-19  Martin Baulig  <martin@gnome.org>
26099
26100         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
26101         not Type.GetType() to lookup the array type.  This is needed when
26102         we're constructing an array of a user-defined type.
26103         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
26104         single-dimensional arrays, but also for single-dimensial arrays of
26105         type decimal.
26106
26107 2002-07-19  Martin Baulig  <martin@gnome.org>
26108
26109         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
26110         this function is called, it's not allowed to share LocalBuilders
26111         among ILGenerators.
26112
26113 2002-07-19  Martin Baulig  <martin@gnome.org>
26114
26115         * expression.cs (Argument.Resolve): Report an error 118 when trying
26116         to pass a type as argument.
26117
26118 2002-07-18  Martin Baulig  <martin@gnome.org>
26119
26120         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
26121         Conv_R_Un for the signed `long' type.
26122
26123 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
26124
26125         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
26126         `expr' for the temporary result, as that will fail if we do
26127         multiple resolves on the same expression.
26128
26129 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
26130
26131         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
26132         ec.TypeContainer for looking up aliases. 
26133
26134         * class.cs (TypeContainer): Remove LookupAlias from here.
26135
26136         * decl.cs (DeclSpace); Move here.
26137
26138 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
26139
26140         * class.cs (FindMembers): Only call filter if the constructor
26141         bulider is not null.
26142
26143         Also handle delegates in `NestedTypes' now.  Now we will perform
26144         type lookups using the standard resolution process.  This also
26145         fixes a bug.
26146
26147         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
26148         This uses Expressions (the limited kind that can be parsed by the
26149         tree) instead of strings.
26150
26151         * expression.cs (ComposedCast.ToString): Implement, used to flag
26152         errors since now we have to render expressions.
26153
26154         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
26155         FormArrayType. 
26156
26157         * ecore.cs (SimpleName.ToString): ditto.
26158
26159         * cs-parser.jay: Instead of using strings to assemble types, use
26160         Expressions to assemble the type (using SimpleName, ComposedCast,
26161         MemberAccess).  This should fix the type lookups in declarations,
26162         because we were using a different code path for this.
26163
26164         * statement.cs (Block.Resolve): Continue processing statements
26165         even when there is an error.
26166
26167 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
26168
26169         * class.cs (Event.Define): Also remove the `remove' method from
26170         the list of pending items.
26171
26172         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
26173         generate more compact code. 
26174
26175 2002-07-17  Martin Baulig  <martin@gnome.org>
26176
26177         * const.cs (Const.LookupConstantValue): Add support for constant
26178         `unchecked' and `checked' expressions.
26179         Also adding test case test-140.cs for this.
26180
26181 2002-07-17  Martin Baulig  <martin@gnome.org>
26182
26183         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
26184         check whether mi.ReturnType implements the IEnumerator interface; the
26185         `==' and the IsAssignableFrom() will fail in this situation.
26186
26187 2002-07-16  Ravi Pratap  <ravi@ximian.com>
26188
26189         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
26190         here too.
26191
26192 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26193
26194         * expression.cs: fixed bug #27811.
26195
26196 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
26197
26198         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
26199         Molaro: when we are a ref, the value already contains a pointer
26200         value, do not take the address of it.
26201
26202 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
26203         * removed mb-parser.jay and mb-tokenizer.cs
26204
26205 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26206
26207         * expression.cs: check against the building corlib void type.
26208
26209 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26210
26211         * ecore.cs: fix for valuetype static readonly fields: when 
26212         initializing them, we need their address, not the address of a copy.
26213
26214 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26215
26216         * typemanager.cs: register also enum_type in corlib.
26217
26218 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26219
26220         * class.cs: allow calling this (but not base) initializers in structs.
26221
26222 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26223
26224         * ecore.cs: make sure we compare against the building base types
26225         in GetTypeSize ().
26226
26227 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26228
26229         * typemanager.cs: fix TypeToCoreType() to handle void and object
26230         (corlib gets no more typerefs after this change).
26231
26232 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26233
26234         * expression.cs (ArrayCreation.EmitArrayArguments): use
26235         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26236
26237         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26238         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26239         array indexes, the runtime actually forbids them.
26240
26241         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26242         for array arguments here.
26243
26244         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26245         instead of the default for ValueTypes.
26246
26247         (New.DoEmit): Use IsValueType instead of
26248         IsSubclassOf (value_type)
26249         (New.DoResolve): ditto.
26250         (Invocation.EmitCall): ditto.
26251
26252         * assign.cs (Assign): ditto.
26253
26254         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26255         Statements *are* currently doing part of their resolution during
26256         Emit.  
26257
26258         Expressions do always resolve during resolve, but statements are
26259         only required to propagate resolution to their children.
26260
26261 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26262
26263         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26264
26265         (LoadAssembly): Do not add the dll if it is already specified
26266
26267         (MainDriver): Add the System directory to the link path at the end,
26268         after all the other -L arguments. 
26269
26270         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26271         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26272         ldelem.u1) and using the opposite for sbytes.
26273
26274         This fixes Digger, and we can finally run it.
26275
26276         * driver.cs (UnixParseOption): Move the option parsing here.  
26277         (CSCParseOption): Implement CSC-like parsing of options.
26278
26279         We now support both modes of operation, the old Unix way, and the
26280         new CSC-like way.  This should help those who wanted to make cross
26281         platform makefiles.
26282
26283         The only thing broken is that /r:, /reference: and /lib: are not
26284         implemented, because I want to make those have the same semantics
26285         as the CSC compiler has, and kill once and for all the confussion
26286         around this.   Will be doing this tomorrow.
26287
26288         * statement.cs (Unsafe.Resolve): The state is checked during
26289         resolve, not emit, so we have to set the flags for IsUnsfe here.
26290
26291 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26292
26293         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26294         not catch the Error_ObjectRefRequired in SimpleName (as it is
26295         possible to have a class/instance variable name that later gets
26296         deambiguated), we have to check this here.      
26297
26298 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26299
26300         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26301         make static and put into Expression.
26302
26303         (Event.Define): Register the private field of the event with the 
26304         TypeManager so that GetFieldFromEvent can get at it.
26305
26306         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26307         keep track of the private field associated with an event which
26308         has no accessors.
26309
26310         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26311         private field.
26312
26313         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26314
26315 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26316
26317         * expression.cs (Binary.EmitBranchable): this routine emits the
26318         Binary expression in a branchable context.  This basically means:
26319         we need to branch somewhere, not just get the value on the stack.
26320
26321         This works together with Statement.EmitBoolExpression.
26322
26323         * statement.cs (Statement.EmitBoolExpression): Use
26324         EmitBranchable. 
26325
26326 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26327
26328         * statement.cs (For): Reduce the number of jumps in loops.
26329
26330         (For): Implement loop inversion for the For statement.
26331
26332         (Break): We can be breaking out of a Try/Catch controlled section
26333         (foreach might have an implicit try/catch clause), so we need to
26334         use Leave instead of Br.
26335
26336         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26337         now).  If the instace expression supports IMemoryLocation, we use
26338         the AddressOf method from the IMemoryLocation to extract the
26339         address instead of emitting the instance.
26340
26341         This showed up with `This', as we were emitting the instance
26342         always (Emit) instead of the Address of This.  Particularly
26343         interesting when This is a value type, as we dont want the Emit
26344         effect (which was to load the object).
26345
26346 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26347
26348         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26349
26350         * statement.cs (Checked): Set the CheckedState during the resolve
26351         process too, as the ConvCast operations track the checked state on
26352         the resolve process, and not emit.
26353
26354         * cs-parser.jay (namespace_member_declaration): Flag that we have
26355         found a declaration when we do.  This is used to flag error 1529
26356
26357         * driver.cs: Report ok when we display the help only.
26358
26359 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26360
26361         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26362
26363 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26364
26365         * cs-tokenizer.cs (define): We also have to track locally the
26366         defines.  AllDefines is just used for the Conditional Attribute,
26367         but we also need the local defines for the current source code. 
26368
26369 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26370
26371         * statement.cs (While, For, Do): These loops can exit through a
26372         Break statement, use this information to tell whether the
26373         statement is the last piece of code.
26374
26375         (Break): Flag that we break.
26376
26377         * codegen.cs (EmitContexts): New `Breaks' state variable.
26378
26379 2002-07-03  Martin Baulig  <martin@gnome.org>
26380
26381         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26382         modifiers in method declarations in structs.  Otherwise, you won't
26383         be able to override things like Object.Equals().
26384
26385 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26386
26387         * class.cs (Method, Property, Indexer): Do not allow the public
26388         modifier to be used in explicit interface implementations.
26389
26390         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26391         override modifiers in method declarations in structs
26392
26393 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26394
26395         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26396         integer or real overflow, report an error
26397
26398 2002-07-02  Martin Baulig  <martin@gnome.org>
26399
26400         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26401         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26402         to tell the runtime about our newly created System.Object and
26403         System.ValueType types.
26404
26405 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26406
26407         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26408         struct instead of Ldarg/Starg.
26409
26410 2002-07-02  Martin Baulig  <martin@gnome.org>
26411
26412         * expression.cs (Indirection.Indirection): Call
26413         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26414
26415 2002-07-02  Martin Baulig  <martin@gnome.org>
26416
26417         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26418         ValueType, call TypeManager.TypeToCoreType() on it.
26419         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26420         the OpCodes.Newarr argument.
26421
26422 2002-07-02  Martin Baulig  <martin@gnome.org>
26423
26424         * expression.cs (Invocation.EmitCall): When compiling corlib,
26425         replace all calls to the system's System.Array type to calls to
26426         the newly created one.
26427
26428         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26429         System.Array methods.
26430         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26431         from the system's System.Array type which must be replaced.
26432
26433 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26434
26435         * typemanager.cs: load unverifiable_code_ctor so we can build
26436         corlib using the correct type. Avoid using GetTypeCode() with
26437         TypeBuilders.
26438         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26439         TypeManager.object_type to allow building corlib.
26440
26441 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26442
26443         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26444
26445 2002-07-01  Martin Baulig  <martin@gnome.org>
26446
26447         * class.cs: Make the last change actually work, we need to check
26448         whether `ifaces != null' to avoid a crash.
26449
26450 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26451
26452         * class.cs: when we build structs without fields that implement
26453         interfaces, we need to add the interfaces separately, since there is
26454         no API to both set the size and add the interfaces at type creation
26455         time.
26456
26457 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26458
26459         * expression.cs: the dimension arguments to the array constructors
26460         need to be converted if they are a long.
26461
26462 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26463
26464         * class.cs: don't emit ldarg.0 if there is no parent constructor
26465         (fixes showstopper for corlib).
26466
26467 2002-06-29  Martin Baulig  <martin@gnome.org>
26468
26469         MCS now compiles corlib on GNU/Linux :-)
26470
26471         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26472         ie. check for MethodImplOptions.InternalCall.
26473
26474         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26475         and TypeManager.attribute_type are null, so we must explicitly check
26476         whether parent is not null to find out whether it's an attribute type.
26477         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26478         and SetBuilder, not only if the property is neither abstract nor external.
26479         This is necessary to set the MethodImplOptions on the accessor methods.
26480         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26481         SetBuilder, see Property.Emit().
26482
26483         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26484         populate "System.Object", "System.ValueType" and "System.Attribute" since
26485         they've already been populated from BootCorlib_PopulateCoreTypes().
26486
26487 2002-06-29  Martin Baulig  <martin@gnome.org>
26488
26489         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26490         is the NullLiteral, we also need to make sure that target_type is not
26491         an enum type.   
26492
26493 2002-06-29  Martin Baulig  <martin@gnome.org>
26494
26495         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26496         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26497         before calling BootstrapCorlib_ResolveDelegate ().
26498
26499 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26500
26501         * statement.cs: fixed build-breaker. All tests passed ok.
26502
26503 2002-06-27  Martin Baulig  <martin@gnome.org>
26504
26505         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26506         for System.Decimal when compiling corlib.
26507
26508 2002-06-27  Martin Baulig  <martin@gnome.org>
26509
26510         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26511         switch blocks which contain nothing but a default clause.
26512
26513 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26514
26515        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26516
26517 2002-06-27  Martin Baulig  <martin@gnome.org>
26518
26519         * ecore.cs (PropertyExpr.PropertyExpr): Call
26520         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26521
26522         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26523         is already a TypeBuilder.
26524
26525 2002-06-27  Martin Baulig  <martin@gnome.org>
26526
26527         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26528         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26529         the "from an array-type to System.Array" case.  This makes it work
26530         when compiling corlib.
26531
26532 2002-06-27  Martin Baulig  <martin@gnome.org>
26533
26534         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26535         non-static PropertyExpr, set its InstanceExpression.  This makes
26536         the `ICollection.Count' property work in System/Array.cs.
26537
26538 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26539
26540         * driver.cs: Made error handling more consistent.  Errors now
26541         tracked by Report class, so many methods which used to return int
26542         now return void.  Main() now prints success/failure and 
26543         errors/warnings message.
26544
26545         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26546         the magic number return values (123 and 124).  Now, if the
26547         expected error occurs, the compiler exits with success (exit value
26548         0).  If the compilation completes without seeing that particular
26549         error, the compiler exits with failure (exit value 1).  The
26550         makefile in mcs/errors has been changed to handle the new behaviour.
26551
26552         * report.cs: Made 'expected error' number a property and renamed
26553         it from 'Probe' to 'ExpectedError'.
26554
26555         * genericparser.cs: Removed error handling support, since it is
26556         now all done by Report class.
26557
26558         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26559         class, so parse() no longer returns an int.
26560
26561         * namespace.cs: Use Report.Error instead of GenericParser.error
26562
26563 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26564
26565         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26566         TypeContainer.AddOperator): At the front of the list put the
26567         explicit implementations, so they get resolved/defined first. 
26568
26569 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26570
26571         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26572         interface type is implemented by this TypeContainer.  Used during
26573         explicit interface implementation.
26574
26575         (Property.Define, Indexer.Define, Method.Define): Validate that
26576         the given interface in the explicit implementation is one of the
26577         base classes for the containing type.
26578
26579         Also if we are explicitly implementing an interface, but there is
26580         no match in the pending implementation table, report an error.
26581
26582         (Property.Define): Only define the property if we are
26583         not explicitly implementing a property from an interface.  Use the
26584         correct name also for those properties (the same CSC uses,
26585         although that is really not needed).
26586
26587         (Property.Emit): Do not emit attributes for explicitly implemented
26588         properties, as there is no TypeBuilder.
26589
26590         (Indexer.Emit): ditto.
26591
26592         Hiding then means that we do not really *implement* a pending
26593         implementation, which makes code fail.
26594
26595 2002-06-22  Martin Baulig  <martin@gnome.org>
26596
26597         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26598         the return value of Object.GetType().  [FIXME: we need to do this whenever
26599         we get a type back from the reflection library].
26600
26601 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26602
26603         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26604
26605 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26606
26607         * attribute.cs: Return null if we can not look up the type.
26608
26609         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26610         the interface types found.
26611
26612         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26613         interface types found.
26614
26615         * typemanager.cs (GetInterfaces): Make this routine returns alll
26616         the interfaces and work around the lame differences between
26617         System.Type and System.Reflection.Emit.TypeBuilder in the results
26618         result for GetInterfaces.
26619
26620         (ExpandInterfaces): Given an array of interface types, expand and
26621         eliminate repeated ocurrences of an interface.  This expands in
26622         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26623         be IA, IB, IC.
26624
26625 2002-06-21  Martin Baulig  <martin@gnome.org>
26626
26627         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26628         on System.Enum.
26629
26630 2002-06-21  Martin Baulig  <martin@gnome.org>
26631
26632         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26633         and called with one of the core types, return the corresponding typebuilder for
26634         that type.
26635
26636         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26637         element type.
26638
26639 2002-06-21  Martin Baulig  <martin@gnome.org>
26640
26641         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26642         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26643         (Expression.ConvertReferenceExplicit): Likewise.
26644
26645         * expression.cs (ElementAccess.DoResolve): Likewise.
26646         (ElementAccess.DoResolveLValue): Likewise.
26647
26648 2002-06-10  Martin Baulig  <martin@gnome.org>
26649
26650         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26651         add the "value" parameter to the parameter list.
26652
26653         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26654         to our caller.
26655
26656 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26657
26658         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26659         the argument to an int, uint, long or ulong, per the spec.  Also
26660         catch negative constants in array creation.
26661
26662 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26663
26664         * class.cs: do not allow the same interface to appear twice in
26665         the definition list.
26666
26667 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26668
26669         * ecore.cs: don't use ldlen with System.Array.
26670
26671 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26672
26673         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26674
26675 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26676
26677         * modifiers.cs: produce correct field attributes for protected
26678         internal. Easy fix so miguel can work on ther harder stuff:-)
26679
26680 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26681
26682         * pending.cs: New file.  Move the code from class.cs here.
26683         Support clearning the pending flag for all methods (when not doing
26684         explicit interface implementation).
26685
26686 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26687
26688         * rootcontext.cs: added a couple more types needed to bootstrap.
26689
26690 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26691
26692         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26693         constructor in the type, instead of any constructor in the type
26694         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26695         a bug in the Mono runtime when applying the params attribute). 
26696
26697 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26698         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26699
26700 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26701
26702         * expression.cs (Unary.ResolveOperator): Use TypeManager
26703         to resolve the type.
26704
26705 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26706
26707         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26708         attached.
26709
26710         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26711         with each member too.
26712
26713         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26714         field builders too - this takes care of the enum member case.
26715
26716 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26717
26718         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26719         address-of operator on both value types and pointers.
26720
26721 2002-06-10  Martin Baulig  <martin@gnome.org>
26722
26723         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26724         PropertyBuilder to the `property_builders' list.
26725
26726         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26727         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26728         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26729         find any indexers which are inherited from an interface.
26730
26731 2002-06-09  Martin Baulig  <martin@gnome.org>
26732
26733         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26734         the same type as the constant if necessary.  There's also a test-130.cs
26735         for this.
26736
26737         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26738
26739         * typemanager.cs (TypeManager.ChangeType): Previously known as
26740         Enum.ChangeEnumType().
26741
26742 2002-06-09  Martin Baulig  <martin@gnome.org>
26743
26744         * expression.cs (Cast.TryReduce): Added support for consts.
26745
26746 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26747
26748         * class.cs (Accessor): Hold attributes information so we can pass
26749         it along.
26750
26751         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26752         Modify to pass in attributes attached to the methods.
26753
26754         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26755
26756         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26757         to handle the Accessor kind :-)
26758
26759         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26760
26761 2002-06-08  Martin Baulig  <martin@gnome.org>
26762
26763         * expression.cs (Unary.TryReduceNegative): Added support for
26764         ULongConstants.
26765
26766 2002-06-08  Martin Baulig  <martin@gnome.org>
26767
26768         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26769         name can't be found in the `defined_names' - the caller will do a
26770         MemberLookup in this case and thus find methods in System.Enum
26771         such as Enum.IsDefined().
26772
26773 2002-06-08  Martin Baulig  <martin@gnome.org>
26774
26775         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26776         Convert.ChangeType() which works with TypeBuilder created types.
26777         (Enum.LookupEnumValue, Enum.Define): Use it here.
26778
26779         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26780         `TypeBuilder.BaseType != null' check.
26781         (TypeContainer.FindMembers): Only lookup parent members if we
26782         actually have a parent.
26783         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26784         (ConstructorInitializer.Resolve): Likewise.
26785
26786         * interface.cs (Interface.FindMembers): Added
26787         `TypeBuilder.BaseType != null' check.
26788
26789         * rootcontext.cs (RootContext.ResolveCore): Added
26790         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26791         classes_second_stage.
26792
26793         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26794         debug_type and trace_type when compiling with --nostdlib.       
26795
26796 2002-06-07  Martin Baulig  <martin@gnome.org>
26797
26798         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26799         (AddField): Set it to true when adding a non-static field.
26800         (DefineType): Use `have_nonstatic_fields' to find out whether we
26801         have non-static fields, not `Fields != null'.
26802
26803 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26804
26805         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26806         dereferencing a null on the static-field code path)
26807
26808 2002-05-30  Martin Baulig  <martin@gnome.org>
26809
26810         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
26811         to take command line arguments.  Use reflection to call the new
26812         custom `Initialize' function on the symbol writer and pass it the
26813         command line arguments.
26814
26815         * driver.cs (--debug-args): New command line argument to pass command
26816         line arguments to the symbol writer.
26817
26818 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
26819
26820         * assign.cs (DoResolve): Forgot to do the implicit conversion to
26821         the target type for indexers and properties.  Thanks to Joe for
26822         catching this.
26823
26824 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
26825
26826         * typemanager.cs (MethodFlags): returns the method flags
26827         (Obsolete/ShouldIgnore) that control warning emission and whether
26828         the invocation should be made, or ignored. 
26829
26830         * expression.cs (Invocation.Emit): Remove previous hack, we should
26831         not do this on matching a base type, we should do this based on an attribute
26832
26833         Only emit calls to System.Diagnostics.Debug and
26834         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
26835         on the command line.
26836
26837         * rootcontext.cs: Global settings for tracing and debugging.
26838
26839         * cs-tokenizer.cs (define): New utility function to track
26840         defines.   Set the global settings for TRACE and DEBUG if found.
26841
26842 2002-05-25  Ravi Pratap  <ravi@ximian.com>
26843
26844         * interface.cs (Populate*): Pass in the TypeContainer as well as
26845         the DeclSpace as parameters so that we can create EmitContexts and
26846         then use that to apply attributes etc.
26847
26848         (PopulateMethod, PopulateEvent, PopulateProperty)
26849         (PopulateIndexer): Apply attributes everywhere.
26850
26851         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
26852         etc.
26853
26854         (ApplyAttributes): Update accordingly.
26855
26856         We now apply interface attributes for all members too.
26857
26858 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
26859
26860         * class.cs (Indexer.Define); Correctly check if we are explicit
26861         implementation (instead of checking the Name for a ".", we
26862         directly look up if the InterfaceType was specified).
26863
26864         Delay the creation of the PropertyBuilder.
26865
26866         Only create the PropertyBuilder if we are not an explicit
26867         interface implementation.   This means that explicit interface
26868         implementation members do not participate in regular function
26869         lookups, and hence fixes another major ambiguity problem in
26870         overload resolution (that was the visible effect).
26871
26872         (DefineMethod): Return whether we are doing an interface
26873         implementation. 
26874
26875         * typemanager.cs: Temporary hack until we get attributes in
26876         interfaces (Ravi is working on that) and we get IndexerName
26877         support in interfaces.
26878
26879         * interface.cs: Register the indexers as properties.
26880
26881         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
26882         warning, I have verified that this is a bug in the .NET runtime
26883         (JavaScript suffers of the same problem).
26884
26885         * typemanager.cs (MemberLookup): When looking up members for
26886         interfaces, the parent of an interface is the implicit
26887         System.Object (so we succeed in searches of Object methods in an
26888         interface method invocation.  Example:  IEnumerable x;  x.ToString
26889         ()) 
26890
26891 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
26892
26893         * class.cs (Event): Events should also register if they do
26894         implement the methods that an interface requires.
26895
26896         * typemanager.cs (MemberLookup); use the new GetInterfaces
26897         method. 
26898
26899         (GetInterfaces): The code used to lookup interfaces for a type is
26900         used in more than one place, factor it here. 
26901
26902         * driver.cs: Track the errors at the bottom of the file, we kept
26903         on going.
26904
26905         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
26906         instance if the method we are calling is static!
26907
26908 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
26909
26910         * attribute.cs (ApplyAttributes): Make this function filter out
26911         the IndexerName attribute (as that attribute in reality is never
26912         applied) and return the string constant for the IndexerName
26913         attribute. 
26914
26915         * class.cs (TypeContainer.Emit): Validate that all the indexers
26916         have the same IndexerName attribute, and if so, set the
26917         DefaultName attribute on the class. 
26918
26919         * typemanager.cs: The return value might contain other stuff (not
26920         only methods).  For instance, consider a method with an "Item"
26921         property and an Item method.
26922
26923         * class.cs: If there is a problem with the parameter types,
26924         return. 
26925
26926 2002-05-24  Ravi Pratap  <ravi@ximian.com>
26927
26928         * ecore.cs (ImplicitConversionExists): Wrapper function which also
26929         looks at user defined conversion after making a call to 
26930         StandardConversionExists - we need this for overload resolution.
26931
26932         * expression.cs : Update accordingly the various method calls.
26933
26934         This fixes 2 bugs filed against implicit user defined conversions 
26935
26936 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
26937
26938         * statement.cs: Track the result of the assignment.
26939
26940 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
26941
26942         * expression.cs (MemberAccess): Improved error reporting for
26943         inaccessible members.
26944
26945 2002-05-22  Martin Baulig  <martin@gnome.org>
26946
26947         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
26948         itself with debugging support.
26949
26950 2002-05-22  Martin Baulig  <martin@gnome.org>
26951
26952         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
26953         Removed, this isn't needed anymore.
26954
26955 2002-05-20  Martin Baulig  <martin@gnome.org>
26956
26957         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
26958         be underlying type for an enum.
26959
26960 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
26961
26962         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
26963         that splits out the loading of just the core types.
26964
26965         * rootcontext.cs (ResolveCore): Split the struct resolution in
26966         two, so we can load the enumeration underlying types before any
26967         enums are used.
26968
26969         * expression.cs (Is): Bandaid until we fix properly Switch (see
26970         bug #24985 for details).
26971
26972         * typemanager.cs (ImplementsInterface): The hashtable will contain
26973         a null if there are no interfaces implemented.
26974
26975 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
26976
26977         * cs-parser.jay (indexer_declarator): It is fine to have array
26978         parameters
26979
26980 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26981
26982         * typemanager.cs: (RegisterBuilder): New function used to register
26983         TypeBuilders that implement interfaces.  Since
26984         TypeBuilder.GetInterfaces (as usual) does not work with lame
26985         Reflection.Emit. 
26986         (AddUserType): register interfaces.
26987
26988         (ImplementsInterface): Use the builder_to_ifaces hash if we are
26989         dealing with TypeBuilder.  Also, arrays are showing up as
26990         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
26991         methods can not be invoked on them!
26992
26993         * ecore.cs (ExplicitReferenceConversionExists): Made public.
26994         (ImplicitReferenceConversionExists): Split out from
26995         StandardConversionExists. 
26996
26997         * expression.cs (As): We were only implementing one of the three
26998         cases for the as operator.  We now implement them all.
26999         (Is): Implement the various other cases for Is as well.
27000
27001         * typemanager.cs (CACHE): New define used to control if we want or
27002         not the FindMembers cache.  Seems to have a negative impact on
27003         performance currently
27004
27005         (MemberLookup): Nested types have full acess to
27006         enclosing type members
27007
27008         Remove code that coped with instance/static returns for events, we
27009         now catch this in RealFindMembers.
27010
27011         (RealFindMembers): only perform static lookup if the instance
27012         lookup did not return a type or an event.  
27013
27014 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
27015
27016         * assign.cs (CompoundAssign): We pass more semantic information
27017         now to Compound Assignments than we did before: now we have all
27018         the information at hand, and now we resolve the target *before* we
27019         do the expression expansion, which allows the "CacheValue" method
27020         to have the effect we intended (before, a [x] += 1 would generate
27021         two differen ArrayAccess expressions from the ElementAccess,
27022         during the resolution process).
27023
27024         (CompoundAssign.DoResolve): Resolve target and original_source here.
27025
27026 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
27027
27028         * expression.cs (ArrayAccess): dropped debugging information. 
27029
27030         * typemanager.cs: Small bug fix: I was always returning i_members,
27031         instead of one of i_members or s_members (depending on which had
27032         the content).
27033
27034         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
27035         method is invoked before any code generation takes place, and it
27036         is a mechanism to inform that the expression will be invoked more
27037         than once, and that the method should use temporary values to
27038         avoid having side effects
27039
27040         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
27041
27042         * ecore.cs (Expression.CacheTemporaries): Provide empty default
27043         implementation.
27044
27045         * expression.cs (Indirection, ArrayAccess): Add support for
27046         CacheTemporaries in these two bad boys. 
27047
27048         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
27049         ldobj or ldind_ref.  
27050         (StoreFromPtr): Handle stobj as well.
27051
27052         * expression.cs (UnaryMutator): Share more code.
27053
27054         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
27055         down: I was not tracking the Filter function as well, which
27056         was affecting the results of the cache.
27057
27058 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
27059
27060         * attribute.cs: Remove the hack to handle the CharSet property on
27061         StructLayouts. 
27062
27063 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
27064
27065         * attribute.cs (DoResolve): More uglyness, we now only try to
27066         resolve the attribute partially, to extract the CharSet
27067         information (only if we are a StructLayout attribute).  Otherwise 
27068
27069         (GetExtraTypeInfo): Add some code to conditionally kill in the
27070         future this.   I am more and more convinced that the .NET
27071         framework has special code to handle the attribute setting on
27072         certain elements.
27073
27074         * expression.cs (IsParamsMethodApplicable): Revert my previous
27075         foreach change here, it was wrong.
27076
27077 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
27078
27079         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
27080         (pp_expr): do not abort on unknown input, just return.
27081         (eval): abort if there are pending chars.
27082
27083         * attribute.cs (Attribute.Resolve): Positional parameters are
27084         optional.  Deal with that case.
27085
27086         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
27087         the Ansi/Unicode/Auto information for the type.
27088
27089         (TypeContainer.DefineType): instantiate the EmitContext here, as
27090         we will be using it during the type definition (to resolve
27091         attributes) and during the emit phase.
27092
27093         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
27094         to pull type information out of the attributes
27095
27096         (Attribute.Resolve): track the constructor builder, and allow for
27097         multiple invocations (structs and classes will use this).
27098
27099         * ecore.cs (MemberLookupFinal): new version with all the
27100         parameters customizable.
27101
27102         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
27103         constructors.  Return if the result value is null (as the error
27104         would have been flagged already by MemberLookupFinal)
27105
27106         Do not allow instances of abstract classes or interfaces to be
27107         created.
27108
27109         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
27110         We have to compare the assembly property here when dealing with
27111         FamANDAssem and Assembly access modifiers, because we might be
27112         creating an assembly from *modules* (that means that we are not
27113         getting TypeBuilders for types defined in other modules that are
27114         part of this assembly).
27115
27116         (Method.Emit): If the method is marked abstract and has a body,
27117         emit an error. 
27118
27119         (TypeContainer.DefineMembers): If both the defined member and the
27120         parent name match are methods, then do not emit any warnings: let
27121         the Method.Define routine take care of flagging warnings.  But if
27122         there is a mismatch (method overrides something else, or method is
27123         overriwritten by something, then emit warning).
27124
27125         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
27126         set to null, this means `do not check for the return type on the
27127         signature'. 
27128
27129         (Method.Define): set the return type for the method signature to
27130         null, so that we get methods with the same name and parameters and
27131         different return types.  This is used to flag warning 114 (you are
27132         hiding a method, and you probably want to use the new/override
27133         keywords instead).
27134
27135         * typemanager.cs (MemberLookup): Implemented proper access
27136         control, closing a long standing set of bug reports.  The problem
27137         was that the Framework only has two bits: Public and NonPublic,
27138         and NonPublic includes private and protected methods, but we need
27139         to enforce the FamANDAssem, FamOrAssem and Family. 
27140
27141 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
27142
27143         * statement.cs (GotoCase): Return true: Ammounts to giving up
27144         knowledge on whether we return or not, and letting the other case
27145         be responsible for it.
27146
27147 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
27148
27149         * driver.cs: Do not load directories for each file processed, only
27150         do it if there is a pattern.
27151
27152         * ecore.cs: Report readonly assigns here as well, as we might have
27153         been resolved only by MemberAccess.
27154
27155         (SimpleName.SimpleNameResolve): Also be useful for LValue
27156         resolution.   We need this to propagate assign to local readonly variables
27157
27158         * typemanager.cs: Use a ptrhashtable for the criteria, because we
27159         do not want to reuse potential criteria memory.
27160
27161         * class.cs (MyEventBuilder): Set reflected_type;
27162
27163         * ecore.cs (Constantify): Added support for constifying bools.
27164
27165         (RootContext.LookupType): Added a cache for values looked up in
27166         the declaration space.
27167
27168         * typemanager.cs (FindMembers): Now is a front-end to
27169         RealFindMembers, and provides a two-level hashtable-based cache to
27170         the request.  
27171
27172         15% performance improvement: from 22.5 to 19.2 seconds.
27173
27174         * expression.cs (IsParamsMethodApplicable): use foreach.
27175         (Invocation.DoResolve): ditto.
27176         (New.DoResolve): ditto.
27177         (ArrayCreation.DoResolve): ditto.
27178
27179         * ecore.cs (FindMostEncompassingType): use foreach.
27180
27181         * delegate.cs (NewDelegate.DoResolve): Use foreach
27182
27183         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
27184         (RemoveMethods): use foreach.
27185
27186         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
27187         nested foreach statements instead of for, and also break out of
27188         the inner loop once a match is found.
27189
27190         (Invocation.OverloadResolve): Use foreach, simplify the code. 
27191
27192 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
27193
27194         * cfold.cs (BinaryFold): During an enumeration evaluation context,
27195         we actually unwrap the expression to allow for extra information
27196         to be extracted. 
27197
27198         * expression.cs: Use Shr_Un on unsigned operations. 
27199
27200 2002-05-08  Ravi Pratap  <ravi@ximian.com>
27201
27202         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
27203         applicable operators was not being considered correctly. This closes
27204         the bug Miguel reported.
27205
27206 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27207
27208         * attribute.cs: check that the type derives from System.Attribute
27209         and report the correct error in that case (moved the duplicate code to
27210         its own method, too).
27211
27212 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27213
27214         * attribute.cs: lookup attribute type name as the spec says: first the
27215         bare attribute name and then name + "Attribute" (nant compiles with
27216         mcs after this fix).
27217
27218 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27219
27220         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27221         Because of the way we parse things, we should try to see if a
27222         UIntConstant can fit in an integer.
27223
27224 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27225
27226         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27227         when we are in an explicit context.
27228
27229         (ConvertReferenceExplicit): When converting from Iface type S to Class
27230         T make sure the rules are implemented as an OR.
27231
27232         * parameter.cs (ParameterType): Make it a property for now although the
27233         purpose really isn't anything immediate.
27234
27235         * expression.cs (Is*Applicable): Do better checking on the parameter type
27236         of a ref/out parameter. The ones from the system assemblies are already 
27237         marked with the correct type so we don't need to do any correction.
27238
27239         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27240         the object type is standard too so include that.
27241
27242 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27243
27244         * ecore.cs (StandardConversionExists): Augment with missing code:
27245         deal with IntConstant, LongConstants and Enumerations.
27246
27247         * assign.cs: Report the error, instead of failing silently
27248
27249         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27250         typecontainer that they are declared, because the
27251         typecontainer/namespace will have the list of using clauses that
27252         need to be applied.
27253
27254         Assembly Attributes were escaping the normal registration
27255         mechanism. 
27256
27257         (EmitCode): Apply attributes within an EmitContext that represents
27258         the container they were declared on.
27259
27260         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27261
27262 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27263
27264         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27265         Revamp completely - make much cleaner as we now operate only
27266         on a set of Types.
27267
27268         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27269         to implement the logic detailed in the spec more correctly.
27270
27271         (UserDefinedConversion): Update accordingly.
27272
27273 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27274
27275         * statement.cs: Return flow analysis information up.
27276
27277         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27278         and the default.
27279
27280         (token): Do not consume an extra character before calling
27281         decimal_digits.
27282
27283 2002-05-06  Piers Haken <piersh@friskit.com>
27284
27285         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27286
27287 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27288
27289         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27290         EmitContext during the instance constructor initializer
27291         resolution, to stop access to instance variables.
27292
27293         This is mandated by the spec, last paragraph of the `constructor
27294         initializers' section. 
27295
27296 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27297
27298         * cs-parser.jay, class.cs (Accessor): new class used to represent
27299         an accessor (get or set).  In the past we used `null' to represent
27300         a missing accessor.  But this is ambiguous because there was no
27301         way to tell in abstract indexers/properties if one of them was
27302         specified.
27303
27304         Now there is a way of addressing that.
27305
27306         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27307         instead of FindMembers.
27308
27309         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27310         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27311
27312         * attribute.cs: Treat indexers and properties as the same in terms
27313         of applying attributes
27314
27315         * ecore.cs (FindMostEncompassedType): Use statically initialized
27316         EmptyExpressions()s like we do elsewhere to avoid creating useless
27317         objects (and we take this out of the tight loop).
27318
27319         (GetConversionOperators): Move the code to extract the actual
27320         operators to a separate routine to clean things up.
27321
27322 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27323
27324         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27325         events are always registered FieldBuilders.
27326
27327         * class.cs (FieldBase): New class shared by Fields 
27328
27329         * delegate.cs: If we are a toplevel delegate, use our full name.
27330         If we are a nested delegate, then only use our tail name.
27331
27332 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27333
27334         * expression.cs (IsApplicable): Ensure that we add the "&" to
27335         ref/out types before comparing it with the type of the argument.
27336
27337         (IsParamsMethodApplicable): Ditto.
27338
27339         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27340         silly me ;-)
27341
27342         * delegate.cs : Handle the case when we have more than one applicable
27343         method. Flag an error only when we finish checking all.
27344
27345 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27346
27347         * expression.cs: Add support for boolean static initializers.
27348
27349 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27350
27351         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27352
27353         * parameter.cs (ComputeParameterTypes,
27354         ComputeAndDefineParameterTypes): Better error handling: now we
27355         clear the `types' cache if we fail during any of the type lookups.
27356         We also return the status code correctly to our caller
27357
27358         * delegate.cs: If we fail to define a delegate, abort the extra
27359         steps. 
27360
27361         * expression.cs (Binary.ResolveOperator): for
27362         operator==(object,object) and operator !=(object, object) we also
27363         have to verify that there is an implicit conversion from one to
27364         the other.
27365
27366         (ArrayAccess.DoResolve): Array Access can operate on
27367         non-variables. 
27368
27369 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27370
27371         * assign.cs (CompoundAssign): A new class used as a "flag" that
27372         the assignment actually is happening as part of a compound
27373         assignment operator.
27374
27375         During compound assignment, a few new rules exist to enable things
27376         like:
27377
27378         byte b |= 1 + 2
27379
27380         From the spec:
27381
27382         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27383         to the type of x) if y is implicitly convertible to the type of x,
27384         and the operator is a builtin operator and the return type of the
27385         operator is explicitly convertible to the type of x. 
27386
27387         * rootcontext.cs: Reset warning level to 2.  4 catches various
27388         "interesting" features in mcs, we must clean this up at some
27389         point, but currently am trying to kill other bugs ;-)
27390
27391         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27392         in container classes as well.  
27393
27394         * expression.cs (Binary.ResolveOperator): Handle string case
27395         before anything else (as operator overloading does emit an error
27396         before doing anything else).
27397
27398         This code could go away when we move to a table driven model, but
27399         i could not come up with a good plan last night.
27400
27401 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27402
27403         * typemanager.cs (CSharpName): reimplementation using regex.
27404         * class.cs: added null check for fields in Emit
27405         * rootcontext.cs: set warninglevel to 4
27406
27407 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27408
27409         * typemanager.cs (CSharpName): reimplemented with Lupus
27410         suggestion.
27411
27412 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27413
27414         * statement.cs (If): correclty implement Resolve, because we were
27415         not catching sem errors in there.  The same process is needed
27416         everywhere else. 
27417         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27418
27419
27420         (Statement.Warning_DeadCodeFound): Factorize code.
27421         (While): Report dead code here too.
27422
27423         (Statement): Added Resolve virtual method to allow
27424         for resolution split from the emit code.
27425
27426 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27427
27428         * statement.cs (EmitBoolExpression): No longer try to resolve the
27429         expression here.    
27430         (MakeBoolean): New utility function that resolve, implicitly
27431         converts to boolean and tags the expression. 
27432
27433
27434         (If, Do): Implement dead code elimination.
27435         (While): Implement loop inversion
27436
27437         (Do, While, For, If): Resolve the expression prior to calling our
27438         code generation.
27439
27440 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27441
27442         * class.cs:
27443           - added method Report28 (warning: program has more than one entry point)
27444           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27445           - modified method Method.Define, the part at the end of the method
27446
27447         * rootcontext.cs: added static public Location EntryPointLocation;
27448           
27449         * ../errors/cs0028.cs : Add test case for the above warning.              
27450
27451         * typemanager.cs:
27452           - modified method CSharpName to allow arrays of primitive type to
27453             be printed nicely (e.g. instead of System.Int32[][] it now prints
27454             int[][])
27455           - added method CSharpSignature: returns the signature of a method
27456             in string format to be used in reporting errors, warnings, etc.
27457
27458         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27459         with String.Empty.
27460
27461 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27462
27463         * delegate.cs (Define): Fix extremely silly bug where I was
27464         setting the type of the 'object' parameter of the BeginInvoke
27465         method to System.IAsyncResult instead of System.Object ;-)
27466
27467 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27468
27469         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27470         here. 
27471
27472         (Constructor.Emit): return if we fail to initialize the
27473         constructor.  Another door closed!  
27474
27475         * expression.cs (New.DoResolve): Improve error message (from -6 to
27476         1501).  Use DeclaredOnly lookup to find the exact constructor.
27477
27478         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27479         loop.  This is useful.
27480
27481         * cs-parser.jay: Adjust the default parameters so that destructors
27482         have the proper signature.
27483
27484 2002-04-26  Martin Baulig  <martin@gnome.org>
27485
27486         * driver.cs (LoadAssembly): If `assembly' contains any characters
27487         which are only valid in path names and not in assembly names
27488         (currently slash, backslash and point), use Assembly.LoadFrom ()
27489         instead of Assembly.Load () on the `assembly' (before iteration
27490         over the link_paths).
27491
27492 2002-04-26  Martin Baulig  <martin@gnome.org>
27493
27494         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27495
27496 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27497
27498         * class.cs (Property): use the new typemanager.MemberLookup
27499
27500         (TypeContainer.MemberLookup): Implement using the
27501         TypeManager.MemberLookup now. 
27502
27503         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27504         and return MemberInfos, so that these can be used without an
27505         EmitContext (what we had before).
27506
27507 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27508
27509         * expression.cs: Fix the case where the argument to params if the
27510         type of the params.  I omitted handling this before.   Fixed
27511
27512 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27513
27514         * driver.cs: Call BootCorlib_PopulateCoreType
27515
27516         * class.cs (Property.CheckBase): Check for properties only, not
27517         for all members. 
27518
27519         * interface.cs: Temporary hack: try/catch around the
27520         CustomAttributeBuilder, because I am getting an exception that I
27521         do not understand.
27522
27523         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27524         types whose definitions are required to be there (attributes are
27525         defined before standard types).
27526
27527         Compute definitions as we boot the various types, as they are used
27528         immediately (value_type class will need object_type, but if we do
27529         not initialize object_type, we will pass a null, which will let
27530         the runtime pick the System.Object from the existing corlib, which
27531         is not what we want).
27532
27533 2002-04-22  Patrik Torstensson <totte@labs2.com>
27534
27535         * cs-tokenizer.cs: fixed a number of trim() issues.
27536
27537 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27538
27539         * expression.cs (Argument.Type): Ensure that we return the correct
27540         type when we have out or ref parameters [in which case we 
27541         append a "&"].
27542
27543 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27544
27545         * class.cs (Property, Indexer): Allow extern modifier in there. 
27546
27547         * typemanager.cs (InitBaseTypes): Initializes object_type and
27548         value_type, since those will be used early on during the bootstrap
27549         process to compile corlib.
27550
27551         (InitCoreTypes): Move code from here to InitBaseTypes.
27552
27553 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27554
27555         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27556         single-dimension arrays as using the ldlen opcode.  
27557
27558         Daniel Lewis discovered this optimization.  
27559
27560         * typemanager.cs: Add signature for System.Array::get_Length
27561
27562 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27563
27564         * statement.cs: report the error when the foreach does not apply to an
27565         array nor a collection.
27566
27567 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27568
27569         * expression.cs: Add implicit conversions to the operator ~.
27570
27571         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27572
27573         * typemanager.cs: Locate the decimal constructor.
27574
27575 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27576
27577         * attribute.cs: use the new property of TypeOf.
27578         * expression.cs: added 'get' property around typearg.
27579
27580         These changes fix a build breaker reported by NickD. Is this the
27581         correct way to fix?  If not, please, revert my changes and make it
27582         work :-).
27583
27584 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27585
27586         * attribute.cs: Add support for typeof in attribute invocations.
27587         I am not sure that this is right though.
27588
27589 2002-04-14  Duncan Mak  <duncan@ximian.com>
27590
27591         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27592         Binary.Operator.Division case.
27593
27594 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27595
27596         * class.cs (DefineType): Ensure that we do a proper check on
27597         attribute types and also register it with the TypeManager.
27598
27599         (TypeContainer.Targets): The default for attribute types is
27600         AttributeTargets.All.
27601
27602         * attribute.cs (ApplyAttributes): Registering the attribute type
27603         is done elsewhere, not when we discover we have a Usage attribute.
27604
27605 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27606
27607         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27608         and get rid of is_delegate parameter.
27609
27610         * everywhere : update.
27611
27612 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27613
27614         * cs-parser.jay (compilation_unit): Revamp completely to use
27615         some new ideas that I got from Rhys' grammar to solve the problems
27616         with assembly level attributes.
27617
27618         (outer_declaration): New grammar production.
27619
27620         (attribute_sections): Add.
27621
27622         (opt_attributes): Base on attribute_sections
27623
27624         (namespace_declaration): Allow opt_attributes to tackle the case
27625         when we have assembly level attributes - we are clever in this
27626         regard now ;-)
27627
27628         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27629         attributes in the non-global context.
27630
27631         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27632         instead of SetGlobalAttributes.
27633
27634         * class.cs, rootcontext.cs : Ensure we define and generate 
27635         attribute types before anything else.
27636
27637         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27638         and flag the new error -20 for the case when the attribute type
27639         does not have valid targets specified. csc does not catch this.
27640
27641         * ../errors/errors.txt : update for error # -20
27642
27643 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27644
27645         * support.cs (InternalParameters.ParameterModifier): Do some null
27646         checking and return sane values.
27647
27648         * class.cs (Method.Define): If we are a PInvoke method, ensure
27649         that we are static and extern. Report error # 601
27650
27651         * ../errors/cs0601.cs : Add test case for the above error.
27652
27653 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27654
27655         * rootcontext.cs (attribute_types): We need to keep type of
27656         all attribute types separately and emit code for them first.
27657
27658         (RegisterAttribute) : Implement.
27659
27660         * class.cs (DefineType): Check if the current Type is a custom
27661         attribute type and register it accordingly.
27662
27663         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27664         adding the first attribute twice and rename to
27665
27666         (SetGlobalAttributes): this.
27667
27668         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27669         lookups.
27670
27671         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27672         if we are processing global arguments. Hmm, I am unsure of this.
27673
27674 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27675
27676         * expression.cs: added static array of strings to avoid calling
27677         Enum.ToString () for Operator in Binary. Significant recover of
27678         performance.
27679
27680 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27681
27682         * class.cs (FindMembers): Allow the Builders of the various
27683         members to be null.  If they are skip them.  This only happens
27684         during the PInvoke declaration.
27685
27686 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27687
27688         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27689         failure, so we do not keep going afterwards.
27690
27691         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27692         wanted to pass `false' as the `is_delegate' argument.  If this is
27693         the case, why not use delegate_type == null to mean `is_delegate =
27694         false' and anything else as is_delegate = true.
27695
27696 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27697
27698         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27699         code for the section, not the beginning of the tests.
27700
27701 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27702
27703         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27704
27705         * expression.cs (Binary): same.  Warn about errors where we have
27706         Enum/Enum in operator + as well.
27707
27708 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27709
27710         * statement.cs:
27711                 - added support for switch(bool)
27712                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27713                 - add TableSwitchEmit() to handle table-based switch statements
27714
27715 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27716
27717         * expression.cs (Invocation.OverloadResolve): Factor out code which
27718         does parameter compatibility checking with arguments so that we can 
27719         re-use the code even from Delegate.VerifyApplicability
27720
27721         (VerifyArgumentsCompat): Move above code here.
27722
27723         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27724         and instead make a call to the above method.
27725
27726 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27727
27728         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27729         We use it to keep track of classes which are attribute types.
27730
27731 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27732
27733         * delegate.cs (Delegate.Define): Correctly define the types in the
27734         presence of fixed and array parameters.
27735
27736         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27737         doing FindMembers.
27738
27739         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27740         include NonPublic after the first iteration.
27741
27742         * class.cs (Indexer.CheckBase): Only check if both parents are
27743         non-null. 
27744
27745         * cs-parser.jay (accessor_body): If empty, set to null.
27746
27747         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27748         same code path here to resolve constants names that we did have in
27749         MemberAccess.DoResolve.  There is too much code duplicated here.
27750
27751 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27752
27753         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27754
27755         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27756         to MakeUnionSet.
27757
27758         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27759         tokens, numbers and strings.
27760
27761         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27762         parenthesis.
27763
27764         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27765         asyncronous parameters and the regular parameters.  
27766
27767         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27768         specify the target directory.
27769
27770         * expression.cs: (This.DoResolve): Simplify
27771         (As.Emit): Optimize, do not generate IsInst if the expression is
27772         always of the given type.
27773
27774         (Is.DoResolve): Bug fix, we were reporting both always/never for
27775         the is expression.
27776
27777         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27778         creating too many unnecessary arrays.
27779
27780 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27781
27782         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27783         fields instead of rolling our own initializer.   Takes care of all
27784         implicit conversions, and drops unnecessary static checks/argument.
27785
27786 2002-03-31  Dick Porter  <dick@ximian.com>
27787
27788         * driver.cs: use the GetDirectories() return values properly, and
27789         use "/" as path separator.
27790
27791 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27792
27793         * expression.cs (Unary): Optimize - - expr into expr.
27794         (Binary): Optimize a + (-b) into a -b.
27795
27796         * codegen.cs (CodeGen): Made all methods static.
27797
27798 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27799
27800         * rootcontext.cs: 
27801
27802         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27803         TypeBuilder property.
27804
27805         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27806         instead. 
27807
27808         * tree.cs: Removed the various RecordXXXX, and replaced with a
27809         single RecordDecl.  Removed all the accessor methods, and just
27810         left a single access point Type 
27811
27812         * enum.cs: Rename DefineEnum to DefineType.
27813
27814         * decl.cs: New abstract method `DefineType' used to unify the
27815         Defines for Enumerations, Interfaces, TypeContainers and
27816         Delegates.
27817
27818         (FindType): Moved LookupInterfaceOrClass here.  Moved the
27819         LookupBaseClasses method that used to live in class.cs and
27820         interface.cs here, and renamed to FindType.
27821
27822         * delegate.cs: Implement DefineType.  Take advantage of the
27823         refactored pattern for locating the parent builder without taking
27824         the parent_builder argument (which we know does not work if we are
27825         nested, and triggering a toplevel definition).
27826
27827 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27828
27829         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
27830         accessibility of a member has changed during override and report
27831         an error if so.
27832
27833         * class.cs (Method.Define, Property.Define): Only complain on
27834         overrides if the method is private, any other accessibility is
27835         fine (and since we just checked the permission is the same, we are
27836         good to go).
27837
27838         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
27839         and elif are processed always.  The other pre-processing
27840         directives are only processed if we are "taking" the path
27841
27842 2002-03-29  Martin Baulig  <martin@gnome.org>
27843
27844         * class.cs (Method.Emit): Only emit symbolic debugging info if the
27845         current location is not Null.
27846
27847         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
27848         a separate method so we can profile it.
27849
27850         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
27851         `span.Seconds' are just seconds, but no minutes or hours.
27852         (MainDriver): Profile the CodeGen.SaveSymbols calls.
27853
27854 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27855
27856         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
27857         Remove the gratuitous set of Final:
27858
27859                                 // If an interface implementation, then we can set Final.
27860                                 if (((flags & MethodAttributes.Abstract) == 0) &&
27861                                     implementing.DeclaringType.IsInterface)
27862                                         flags |= MethodAttributes.Final;
27863
27864         I do not know what I was smoking when I used that.
27865
27866
27867         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
27868         step into fixing the name resolution issues for delegates and
27869         unifying the toplevel name resolution.
27870
27871 2002-03-28  Martin Baulig  <martin@gnome.org>
27872
27873         * class.cs (Method.Emit): If we have a symbol writer, call its
27874         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
27875         tell it about the current method.
27876
27877         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
27878         writer that we're going to emit the first byte of IL code for a new
27879         statement (a new source line).
27880         (EmitContext.EmitTopBlock): If we have a symbol writer, call
27881         EmitContext.Mark() before emitting any code.
27882
27883         * location.cs (SymbolDocument): Return null when we're Null.
27884
27885         * statement.cs (Statement): Moved the `Location loc' variable here.
27886         (Statement.EmitBoolExpression): If we have a symbol writer, call
27887         ec.Mark() before emitting any code to tell it that we're at the
27888         beginning of a new statement.
27889         (StatementExpression): Added `Location' argument to the constructor.
27890         (Block): Added public readonly variable `StartLocation' and public
27891         variable `EndLocation'.  The latter is to be set using SetEndLocation().
27892         (Block): Added constructor which takes a start and end location.
27893         (Block.SetEndLocation): New method. This sets the end location.
27894         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
27895         local variables we create.
27896         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
27897         each statement and do also mark the begin and end of the block.
27898
27899         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
27900         tell it the current lexer.Location, use Location.Null for the end of the
27901         block.
27902         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
27903         current block, set its end location using SetEndLocation().
27904         (statement_expression): StatementExpression constructor now takes the
27905         lexer.Location as additional argument.
27906         (for_statement, declare_local_variables): Likewise.
27907         (declare_local_variables): When creating a new implicit block, use the
27908         new Block constructor and pass it the lexer.Location.
27909
27910 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27911
27912         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
27913         members also on the parent interfaces recursively.
27914
27915 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
27916
27917         * report.cs: Use new formats, since Gonzalo finished the missing
27918         bits. 
27919
27920         * expression.cs (Binary.ResolveOperator): added missing operator|
27921         operator& and operator^ for bool/bool.
27922
27923         * cs-parser.jay: CheckDef now takes a Location argument that is
27924         used to report errors more precisly (instead of reporting the end
27925         of a definition, we try to track something which is a lot closer
27926         to the source of the problem).
27927
27928         * cs-tokenizer.cs: Track global token use, so we can properly flag
27929         the use of #define/#undef after the first token has been seen.
27930
27931         Also, rename the reportXXXX to Error_DescriptiveName
27932
27933         * decl.cs (DeclSpace.IsTopLevel): Move property here from
27934         TypeContainer, so that Enum and Interface can use this too.
27935
27936         * class.cs (TypeContainer.LookupInterfaceOrClass,
27937         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
27938         `builder' argument.  Typically this was used to pass the parent
27939         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
27940         the definition).  
27941
27942         The problem is that a nested class could trigger the definition of
27943         a toplevel class, and the builder would be obviously wrong in that
27944         case. 
27945
27946         So we drop this argument, and we compute dynamically the
27947         TypeBuilder/ModuleBuilder (the correct information was available
27948         to us anyways from DeclSpace.Parent)
27949
27950         * interface.cs (Interface.DefineInterface): Drop builder
27951         parameter cleanup like class.cs
27952
27953         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
27954         like class.cs
27955
27956         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
27957         values. 
27958
27959         (Try.Emit): Propagate the returns value from the statement.
27960
27961         (Return.Emit): Even if we are leavning 
27962
27963         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
27964
27965         * modifiers.cs: Fix the computation of MethodAttributes flags.
27966
27967 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
27968
27969         * driver.cs: allow compilation of files that start with '/'.
27970         Add a default case when checking the argument of --target.
27971
27972 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
27973
27974         * interface.cs: Implement the same search algorithm for types in
27975         the interface code.
27976
27977         * delegate.cs: Do not allow multiple definition.
27978
27979         * Recovered ChangeLog that got accidentally amputated
27980
27981         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
27982
27983         * rootcontext.cs: Load manually enum to allow core classes to
27984         contain enumerations.
27985
27986         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
27987         Update to new static methods in TypeManager.
27988
27989         * typemanager.cs (GetMethod, GetConstructor): Use our
27990         implementation of FindMembers to find the members, since during
27991         corlib compilation, the types are TypeBuilders and GetMethod and
27992         GetConstructor do not work.
27993
27994         Make all methods in TypeManager static.
27995
27996         (InitCodeHelpers): Split the functionality from
27997         the InitCodeTypes function.
27998
27999         * driver.cs: Call InitCodeHelpers after we have populated the
28000         types. 
28001
28002         * cs-parser.jay (delegate_declaration): we did not used to compute
28003         the delegate name correctly for void delegates.
28004
28005 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
28006
28007         * rootcontext.cs (RootContext): Init the interface_resolve_order
28008         and type_container_resolve_order always.
28009
28010         (ResolveCore, BootstrapCorlib_ResolveClass,
28011         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
28012         compiler when compiling with --nostdlib
28013
28014         * class.cs (TypeContainer.DefineType): Check that our parent is
28015         not null.  This test is most important when we are bootstraping
28016         the core types.
28017
28018         * codegen.cs: Split out the symbol writing code.
28019
28020 2002-03-25  Martin Baulig  <martin@gnome.org>
28021
28022         * driver.cs (-g): Made -g an alias for --debug.
28023
28024 2002-03-24  Martin Baulig  <martin@gnome.org>
28025
28026         * codegen.cs (SymbolWriter): New public variable. Returns the
28027         current symbol writer.
28028         (CodeGen): Added `bool want_debugging_support' argument to the
28029          constructor. If true, tell the ModuleBuild that we want debugging
28030         support and ask it for the ISymbolWriter.
28031         (Save): If we have a symbol writer, call it's Close() method after
28032         saving the assembly.
28033
28034         * driver.c (--debug): New command line argument to create a
28035         debugger information file.
28036
28037         * location.cs (SymbolDocument): New public property. Returns an
28038         ISymbolDocumentWriter object for the current source file or null
28039         if we don't have a symbol writer.
28040
28041 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
28042
28043         * driver.cs (LoadAssembly): Correctly return when all the paths
28044         have been tried and not before.
28045
28046         * statement.cs (Switch.Emit): return the actual coverage for this
28047         statement (returns/not-returns)
28048
28049         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
28050         switch of the statement if we are the last switch section.  That
28051         kills two problems: try/catch problems (we used to emit an empty
28052         nop at the end) and switch statements where all branches would
28053         return. 
28054
28055 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
28056
28057         * driver.cs: Add default assemblies (the equivalent to the
28058         Microsoft CSC.RSP file)
28059
28060         * cs-tokenizer.cs: When updating `cols and setting it to zero,
28061         also update tokens_seen and set it to false.
28062
28063         * driver.cs: Implement --recurse for Mike.
28064
28065         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
28066         correctly splitting out the paths.
28067
28068 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
28069
28070         * interface.cs (Interface.PopulateProperty): Instead of using
28071         `parent' as the declaration space for the set parameters, use
28072         `this' 
28073
28074         * support.cs (InternalParameters): InternalParameters constructor
28075         takes a DeclSpace instead of a TypeContainer.
28076
28077         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
28078         types are being initialized, load the address of it before calling
28079         the function.  
28080
28081         (New): Provide a mechanism to disable the generation of local
28082         value type temporaries when the caller will be providing us with
28083         an address to store it.
28084
28085         (ArrayCreation.EmitDynamicInitializers): Use it.
28086
28087 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
28088
28089         * expression.cs (Invocation.EmitArguments): Only probe for array
28090         property if there is more than one argument.  Sorry about that.
28091
28092         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
28093         empty param arrays.
28094
28095         * class.cs (Method.LabelParameters): Fix incorrect code path that
28096         prevented the `ParamArrayAttribute' from being applied to the
28097         params attribute.
28098
28099 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
28100
28101         * support.cs (ReflectionParameters): Correctly compute whether the
28102         last argument is a params array.  Fixes the problem with
28103         string.Split ('a')
28104
28105         * typemanager.cs: Make the assemblies array always be non-null
28106         (empty, but non-null)
28107
28108         * tree.cs (RecordDecl): New function that abstracts the recording
28109         of names.  This reports error 101, and provides a pointer to the
28110         previous declaration.  Fixes a crash in the compiler.
28111
28112         * cs-parser.jay (constructor_declaration): Update to new grammar,
28113         and provide a constructor_body that can be empty.
28114
28115 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
28116
28117         * driver.cs: Add support for --resources.
28118
28119         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
28120         Make all types for the various array helper methods be integer.
28121
28122         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
28123         CheckState to ConvCast.
28124
28125         (ConvCast): Now it takes a `checked' state argument, to avoid
28126         depending on the emit context for the conversion, and just using
28127         the resolve time setting.
28128
28129         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
28130         instead of Invocation.EmitArguments.  We do not emit the original
28131         arguments, instead we emit those which have been converted to
28132         unsigned int expressions.
28133
28134         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
28135
28136         * codegen.cs: ditto.
28137
28138         * expression.cs (LocalVariableReference): Drop the use of the
28139         Store function that depended on the variable index.
28140
28141         * statement.cs (VariableInfo): Drop the `Idx' property from this
28142         class, as this is not taking into account the indexes for
28143         temporaries tat we generate during the execution, getting the
28144         indexes wrong.
28145
28146         * class.cs: First emit class initializers, then call the parent
28147         constructor. 
28148
28149         * expression.cs (Binary): Fix opcode emision.
28150         (UnaryMutator.EmitCode): Support checked code generation
28151
28152         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
28153         matches for events for both the Static and Instance scans,
28154         pointing to the same element.   Fix that.
28155
28156 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
28157
28158         * rootcontext.cs (ResolveTree): Always set the
28159         interface_resolve_order, because nested interfaces will be calling
28160         into us.
28161
28162         * class.cs (GetInterfaceOrClass): Track the same resolution
28163         process used by TypeManager.LookupType.  This fixes the nested
28164         type lookups in class declarations (separate path from
28165         LookupType). 
28166
28167         (TypeContainer.DefineType): Also define nested interfaces.
28168         (TypeContainer.RegisterOrder): New public function used to
28169         register the order in which child interfaces need to be closed.
28170
28171         Nested interfaces need to be closed after their parents have been
28172         created. 
28173
28174         * interface.cs (InterfaceAttr): Put all the logic for computing
28175         the interface attribute here. 
28176
28177         (DefineInterface): Register our interface order with the
28178         RootContext or with the TypeContainer depending on the case.
28179
28180 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28181
28182         * cs-parser.jay: rework foreach statement to work with the new
28183         changes to the policy on SimpleNames.
28184
28185         * report.cs: support Stacktrace on warnings as well.
28186
28187         * makefile: drop --unsafe and /unsafe from the compile.
28188
28189 2002-03-13  Ravi Pratap  <ravi@ximian.com>
28190
28191         * ecore.cs (StandardConversionExists): Modify to take an Expression
28192         as the first parameter. Ensure we do null -> reference type conversion
28193         checking.
28194
28195         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
28196         temporary Expression objects.
28197
28198 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
28199
28200         * interface.cs: workaround bug in method overloading resolution
28201         (there is already a bugzilla bug for it).
28202
28203 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28204
28205         We could also solve this problem by having a separate path for
28206         performing type lookups, instead of DoResolve, we could have a
28207         ResolveType entry point, and only participating pieces of the
28208         production (simplename, deref, array) would implement this. 
28209
28210         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
28211         signal SimpleName to only resolve type names and not attempt to
28212         resolve anything else.
28213
28214         * expression.cs (Cast): Set the flag.
28215
28216         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28217
28218         * class.cs: Only report 108 if there is no `new' modifier.
28219
28220         * cs-parser.jay: rework foreach statement to work with the new
28221         changes to the policy on SimpleNames.
28222
28223         * report.cs: support Stacktrace on warnings as well.
28224
28225         * makefile: drop --unsafe and /unsafe from the compile.
28226
28227 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28228
28229         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28230         lookups here, instead of doing that at parse time.  This means
28231         that our grammar will not introduce `LocalVariableReferences' as
28232         expressions at this point.  That solves the problem of code like
28233         this:
28234
28235         class X {
28236            static void Main ()
28237            { int X = 1;
28238             { X x = null }}}
28239
28240         This is only half the fix.  The full fix requires parameters to
28241         also be handled in this way.
28242
28243         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28244         makes the use more obvious of the DeclSpace.  The
28245         ec.TypeContainer.TypeBuilder is now only used to pull the
28246         TypeBuilder for it.
28247
28248         My theory is that I can get rid of the TypeBuilder completely from
28249         the EmitContext, and have typecasts where it is used (from
28250         DeclSpace to where it matters).  
28251
28252         The only pending problem is that the code that implements Aliases
28253         is on TypeContainer, and probably should go in DeclSpace.
28254
28255         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28256         lookups here, instead of doing that at parse time.  This means
28257         that our grammar will not introduce `LocalVariableReferences' as
28258         expressions at this point.  That solves the problem of code like
28259         this:
28260
28261         class X {
28262            static void Main ()
28263            { int X = 1;
28264             { X x = null }}}
28265
28266         This is only half the fix.  The full fix requires parameters to
28267         also be handled in this way.
28268
28269         * class.cs (Property.DefineMethod): When implementing an interface
28270         method, set newslot, when implementing an abstract method, do not
28271         set the flag (before we tried never setting it, or always setting
28272         it, which is the difference).
28273         (Indexer.DefineMethod): same.
28274         (Method.DefineMethod): same.
28275
28276         * ecore.cs: Only set the status used flag if we get back a Field.
28277
28278         * attribute.cs: Temporary hack, so Paolo can keep working.
28279
28280 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28281
28282         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28283         the unmanaged type in the case we have a MarshalAs attribute.
28284
28285         (Resolve): Handle the case when we are parsing the special MarshalAs
28286         attribute [we need to store the unmanaged type to use later]
28287
28288         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28289         MarshalAs Attribute.
28290
28291         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28292         on parameters and accordingly set the marshalling info.
28293
28294 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28295
28296         * class.cs: Optimizing slightly by removing redundant code after
28297         we switched to the `NoTypes' return value.
28298         (Property.DefineMethod): use NoTypes here too.
28299
28300         This fixes the bug I introduced in my last batch of changes.
28301
28302 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28303
28304         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28305
28306         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28307         Enums since those are types too. 
28308
28309         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28310
28311         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28312         thanks to a call during the lookup process.
28313
28314 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28315
28316         * statement.cs (Foreach): Lots of work to accomodate a particular
28317         kind of foreach statement that I had not kept in mind.  It is
28318         possible to have foreachs on classes that provide a GetEnumerator
28319         method that return objects that implement the "pattern" for using
28320         a foreach, there is no need to support GetEnumerator
28321         specifically. 
28322
28323         This is needed to compile nant.
28324
28325         * decl.cs: Only report 114 if the member is not `Finalize' and if
28326         the warning level is at least 2.
28327
28328         * class.cs: Moved the compare function from Method to
28329         MethodSignature. 
28330
28331         (MethodSignature.InheritableMemberSignatureCompare): Add new
28332         filter function that is used to extract inheritable methods from a
28333         class. 
28334
28335         (Method.Define): Use the new `inheritable_method_signature_filter'
28336         delegate
28337
28338         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28339         command. 
28340
28341 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28342
28343         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28344
28345         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28346
28347         * expression.cs: Pass location information to
28348         ConvertImplicitStandard. 
28349
28350         * class.cs: Added debugging code to track return values from
28351         interfaces. 
28352
28353 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28354
28355         * expression.cs (Is.DoResolve): If either side of the `is' is an
28356         interface, do not flag the warning.
28357
28358         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28359         for interfaces
28360
28361         * report.cs: Allow for --fatal to be used with --probe.
28362
28363         * typemanager.cs (NoTypes): Move the definition for the empty Type
28364         array here. 
28365
28366         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28367         properties. 
28368         (TypeContainer.DefineProxy): New function used to proxy to parent
28369         implementations when implementing interfaces.
28370         (TypeContainer.ParentImplements): used to lookup if our parent
28371         implements a public function that is required by an interface.
28372         (TypeContainer.VerifyPendingMethods): Hook this up.
28373
28374         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28375         `modules' and `assemblies' arraylists into arrays.  We only grow
28376         these are the very early start up of the program, so this improves
28377         the speedof LookupType (nicely measured).
28378
28379         * expression.cs (MakeByteBlob): Replaced unsafe code with
28380         BitConverter, as suggested by Paolo.
28381
28382         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28383         folding of string concatenation, but if either side is a string,
28384         and the other is not, then return null, and let the runtime use
28385         the concatenation on the string plus the object (using
28386         `Object.ToString'). 
28387
28388 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28389
28390         Constant Folding has been implemented now.
28391
28392         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28393         the error instead on types that are not supported in one's
28394         complement. 
28395
28396         * constant.cs (Constant and all children): New set of functions to
28397         perform implict and explicit conversions.
28398
28399         * ecore.cs (EnumConstant): Implement the new functions to perform
28400         conversion by proxying to the child expression.
28401
28402         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28403         own separate setting that can not be turned off from the command
28404         line using --unchecked or --checked and is only controlled using
28405         the checked/unchecked statements and expressions.  This setting is
28406         used by the constant folder to flag errors.
28407
28408         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28409         ConstantCheckState as well.   
28410
28411         During Resolve, they also have to flag the state, because the
28412         constant folder runs completely in the Resolve phase.
28413
28414         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28415         well.
28416
28417 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28418
28419         * cfold.cs: New file, this file contains the constant folder.
28420
28421         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28422         argument to track whether we are using the resulting address to
28423         load or store a value and provide better error messages. 
28424
28425         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28426         new AddressOf arguments.
28427
28428         * statement.cs (Foreach.EmitCollectionForeach): Update
28429
28430         * expression.cs (Argument.Emit): Call AddressOf with proper
28431         arguments to track usage.
28432
28433         (New.DoEmit): Call AddressOf with new arguments.
28434
28435         (Unary.Emit): Adjust AddressOf call.
28436
28437 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28438
28439         * cs-parser.jay (member_access): Change the case for pre-defined types
28440         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28441         this suggestion.
28442
28443         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28444         a method body.
28445
28446         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28447         essentially like methods and apply attributes like MethodImplOptions to them too.
28448
28449         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28450         not being null.
28451
28452         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28453         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28454         is the DeclSpace.
28455
28456         * Update code everywhere accordingly.
28457
28458         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28459
28460         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28461
28462 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28463
28464         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28465         try performing lookups against those instead of jumping straight into using
28466         the 'using' clauses.
28467
28468         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28469
28470         (LookupType): Perform lookups in implicit parents too.
28471
28472         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28473         sequence as RootContext.LookupType. 
28474
28475         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28476         the various cases of namespace lookups into this method.
28477
28478 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28479
28480         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28481         in positional arguments)
28482
28483         * class.cs (Operator): Update the AllowedModifiers to contain
28484         extern. 
28485
28486         * cs-parser.jay: Update operator declaration to allow for the
28487         operator body to be empty.
28488
28489         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28490         values. 
28491
28492 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28493
28494         * class.cs (Method.Emit): Label parameters.
28495
28496         * driver.cs: Return 1 or 0 as the program exit code.
28497
28498 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28499
28500         * expression.cs: Special case the `null' object when trying to
28501         auto-compute the type, as anything can be explicitly converted to
28502         that. 
28503
28504         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28505         spotting this Paolo.
28506
28507         (Expression.ImplicitNumericConversion): Perform comparissions of
28508         the type using the underlying type in the case of an enumeration
28509         rather than using the enumeration type for the compare.
28510
28511         Cope with the underlying == type case, which is not possible to
28512         catch before. 
28513
28514         (Expression.ConvertNumericExplicit): Perform comparissions of
28515         the type using the underlying type in the case of an enumeration
28516         rather than using the enumeration type for the compare.
28517
28518         * driver.cs: If the user does not supply an extension, assume .exe
28519
28520         * cs-parser.jay (if_statement): Rewrote so that we can track the
28521         location for the if statement.
28522
28523         * expression.cs (Binary.ConstantFold): Only concat strings when
28524         the operation is "+", not everything ;-)
28525
28526         * statement.cs (Statement.EmitBoolExpression): Take a location
28527         argument. 
28528         (If, While, Do): Track location.
28529
28530         * expression.cs (Binary.ResolveOperator): In the object + string
28531         case, I was missing a call to ConvertImplicit
28532
28533 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28534
28535         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28536         Location arguments. Ensure we use RootContext.LookupType to do our work
28537         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28538
28539         * interface.cs (PopulateMethod): Handle the type of the parameter being
28540         null gracefully.
28541
28542         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28543         have a params method with no fixed arguments and a call is made with no
28544         arguments.
28545
28546 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28547
28548         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28549         the verbatim-string-literal
28550
28551         * support.cs (InternalParameters.ParameterModifier): handle null
28552         fixed parameters.
28553         (InternalParameters.ParameterType): ditto.
28554
28555         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28556         duplicating the name of the variable parameter.
28557         (GetParameterByName): Fix bug where we were not looking up array
28558         paramters if they were the only present (thanks Paolo!).
28559         (GetParameterInfo): We only have an empty set of types if both
28560         fixed and array are set to null.
28561         (GetParameterInfo-idx): Handle FixedParameter == null
28562
28563         * cs-parser.jay: Handle the case where there is no catch
28564         statements (missing null test).
28565
28566 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28567
28568         * driver.cs (MainDriver): Be conservative on our command line
28569         handling.
28570
28571         Catch DirectoryNotFoundException when calling GetFiles.
28572
28573         (SplitPathAndPattern): Used to split the input specification into
28574         a path and a pattern that we can feed to Directory.GetFiles.
28575
28576 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28577
28578         * statement.cs (Fixed): Implement the last case of the Fixed
28579         statement (string handling).
28580
28581         * expression.cs (StringPtr): New class used to return a char * to
28582         a string;  Used by the Fixed statement.
28583
28584         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28585
28586         * expression.cs (Binary.ResolveOperator): Remove redundant
28587         MemberLookup pn parent type.
28588         Optimize union call, we do not need a union if the types are the same.
28589         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28590         type.
28591
28592         Specialize the use of MemberLookup everywhere, instead of using
28593         the default settings. 
28594
28595         (StackAlloc): Implement stackalloc keyword.
28596
28597         * cs-parser.jay: Add rule to parse stackalloc.
28598
28599         * driver.cs: Handle /h, /help, /?
28600
28601         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28602         before we supported unsafe code.
28603
28604         * makefile: add --unsafe to the self compilation of mcs.
28605
28606 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28607
28608         * expression.cs (PointerArithmetic): New class that is used to
28609         perform pointer arithmetic.
28610         (Binary.Resolve): Handle pointer arithmetic
28611         Handle pointer comparission.
28612         (ArrayPtr): Utility expression class that is used to take the
28613         address of an array.
28614
28615         (ElementAccess): Implement array access for pointers
28616
28617         * statement.cs (Fixed): Implement fixed statement for arrays, we
28618         are missing one more case before we are done.
28619
28620         * expression.cs (Indirection): Implement EmitAssign and set the
28621         ExprClass to Variable.  This allows pointer dereferences to be
28622         treated as variables, and to have values assigned to them.
28623
28624         * ecore.cs (Expression.StoreFromPtr): New utility function to
28625         store values dereferencing.
28626
28627 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28628
28629         * expression.cs (Binary.ResolveOperator): Ensure that we are
28630         not trying to operate on a void type - this fixes the reported
28631         bug.
28632
28633         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28634         the parent implementation is sealed.
28635
28636         * ../errors/cs0239.cs : Add.
28637
28638         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28639
28640         * typemanager.cs (unverifiable_code_type): Corresponds to 
28641         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28642         which have unsafe code in them.
28643
28644         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28645         unsafe context.
28646
28647 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28648
28649         * cs-tokenizer.cs: Add support for @"litreal strings"
28650
28651         Make tokenizer accept pre-processor directives
28652         on any column (remove the old C-like limitation). 
28653
28654         * rootcontext.cs (EmitCode): Emit any global attributes.
28655         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28656
28657         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28658
28659         * cs-parser.jay: Add support for global attributes.  
28660
28661 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28662
28663         * expression.cs (Indirection): New helper class.  Unary will
28664         create Indirection classes to be able to implement the
28665         IMemoryLocation interface on it.
28666
28667 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28668
28669         * cs-parser.jay (fixed_statement): reference the right statement.
28670
28671         * statement.cs (Fixed.Emit): Finish implementing the fixed
28672         statement for the &x case.
28673
28674 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28675
28676         * class.cs (Property.Define, Method.Define): Remove newslot when
28677         `implementing'.  
28678
28679         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28680         wrong.  NewSlot should only be used if the `new' keyword is present.
28681
28682         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28683         locating our system dir.  Sorry about this.
28684
28685 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28686
28687         * driver.cs (GetSystemDir): Compute correctly the location of our
28688         system assemblies.  I was using the compiler directory instead of
28689         the library directory.
28690
28691 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28692
28693         * expression.cs (BetterFunction): Put back in what Miguel commented out
28694         since it is the correct fix. The problem is elsewhere ;-)
28695
28696         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28697         parameters of the parms method are themselves compatible or not !
28698
28699         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28700         to check that a class implements an interface before saying that an implicit
28701         conversion was allowed. Use ImplementsInterface to do the checking.
28702
28703 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28704
28705         * class.cs (Method.Define): Track whether we are an explicit
28706         implementation or not.  And only call DefineMethodOverride if we
28707         are an explicit implementation.
28708
28709         (Property.DefineMethod): Ditto.
28710
28711 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28712
28713         * expression.cs (BetterFunction): Catch hideous bug which was
28714          preventing us from detecting ambiguous calls due to implicit casts i.e
28715         cs0121.
28716
28717 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28718
28719         * support.cs (Pair): Remove un-needed method.  I figured why I was
28720         getting the error in cs-parser.jay, the variable in a foreach loop
28721         is readonly, and the compiler does not really treat this as a variable.
28722
28723         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28724         instead of EQUALS in grammar.  
28725
28726         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28727
28728         * expression.cs (Unary.DoResolve): Check whether the argument is
28729         managed or not.
28730
28731 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28732
28733         * support.cs: Api for Pair to set a value.  Despite the fact that
28734         the variables are public the MS C# compiler refuses to compile
28735         code that accesses the field if the variable is part of a foreach
28736         statement. 
28737
28738         * statement.cs (Fixed): Begin implementation of the fixed
28739         statement.
28740
28741         (Block.AddVariable): Return the VariableInfo on success and null
28742         on failure instead of true/false. 
28743
28744         * cs-parser.jay (foreach): Catch errors on variables already
28745         defined (we were ignoring this value before) and properly unwind
28746         the block hierarchy
28747
28748         (fixed_statement): grammar for the fixed statement.
28749
28750 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28751
28752         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28753         pointer types to be incretemented.
28754
28755         (SizeOf): Implement.
28756
28757         * cs-parser.jay (pointer_member_access): Implement
28758         expr->IDENTIFIER production.
28759
28760         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28761         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28762         on safe contexts.
28763
28764         (Unary): Implement indirection.
28765
28766         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28767         use in non-unsafe context).
28768
28769         (SimpleName.DoResolve): Check for pointers in field access on safe
28770         contexts. 
28771
28772         (Expression.LoadFromPtr): Factor the load-indirect code in this
28773         function.  This was duplicated in UnboxCast and ParameterReference
28774
28775 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28776
28777         * expression.cs (ComposedCast): report an error if a pointer cast
28778         is used in a safe region.
28779
28780         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28781         pointer type casts in unsafe context.
28782
28783         * codegen.cs (EmitContext): Set up IsUnsafe.
28784
28785         * cs-parser.jay (non_expression_type): Add productions for pointer
28786         casts. 
28787
28788         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28789         code.  We should not use force into static mode if the method is
28790         not virtual.  Fixes bug in MIS
28791
28792         * statement.cs (Do.Emit, While.Emit, For.Emit,
28793         Statement.EmitBoolExpression): Add support to Do and While to
28794         propagate infinite loop as `I do return' semantics.
28795
28796         Improve the For case to also test for boolean constants.
28797
28798         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28799         to the list of attributes we can add.
28800
28801         Remove `EmitContext' argument.
28802
28803         * class.cs (Method.Define): Apply parameter attributes.
28804         (Constructor.Define): Apply parameter attributes.
28805         (MethodCore.LabelParameters): Move here the core of labeling
28806         parameters. 
28807
28808         * support.cs (ReflectionParameters.ParameterModifier,
28809         InternalParameters.ParameterModifier): Use IsByRef on the type and
28810         only return the OUT bit for these parameters instead of in/out/ref
28811         flags.
28812
28813         This is because I miss-understood things.  The ParameterInfo.IsIn
28814         and IsOut represent whether the parameter has the [In] and [Out]
28815         attributes set.  
28816
28817 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
28818
28819         * ecore.cs (FieldExpr.Emit): Release temporaries.
28820
28821         * assign.cs (LocalTemporary.Release): new function.
28822
28823         * codegen.cs (EmitContext.GetTemporaryStorage,
28824         EmitContext.FreeTemporaryStorage): Rework the way we deal with
28825         temporary storage.  Now we can "put back" localbuilders when we
28826         are done with them
28827
28828 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
28829
28830         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
28831         need to make a copy of the variable to generate verifiable code.
28832
28833 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
28834
28835         * driver.cs: Compute dynamically the system directory.
28836
28837         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
28838         Slower, but more generally useful.  Used by the abstract
28839         registering implementation. 
28840
28841         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
28842         the rules for the special rule on Type/instances.  First check if
28843         we have the same name, and if so, try that special static path
28844         rather than the instance path.
28845
28846 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
28847
28848         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
28849         for, while and if.
28850
28851         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
28852         Enum, ValueType, Delegate or Array for non-corlib compiles.
28853
28854         * cs-tokenizer.cs: Catch long identifiers (645)
28855
28856         * typemanager.cs (IndexerPropetyName): Ravi never tested this
28857         piece of code.
28858
28859         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
28860         fix, we were returning too early, so we were not registering
28861         pending methods from abstract classes.
28862
28863         Do not register pending methods if the class is abstract.
28864
28865         * expression.cs (Conditional.DoResolve): Report circular implicit
28866         conversions when we neecd to compute it for conditional
28867         expressions. 
28868
28869         (Is.DoResolve): If the expression is always of the provided type,
28870         flag warning 183.  If the expression can not ever be of the
28871         provided type flag warning 184.
28872
28873         * class.cs: Catch 169 as well.
28874
28875         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
28876         read. 
28877
28878 2002-01-18  Nick Drochak  <ndrochak@gol.com>
28879
28880         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
28881
28882 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
28883
28884         * interface.cs: (PopulateMethod): Check for pointers being defined
28885         only if the unsafe context is active.
28886         (PopulateProperty): ditto.
28887         (PopulateIndexer): ditto.
28888
28889         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
28890         specified.  If pointers are present, make sure that they are
28891         present in an unsafe context.
28892         (Constructor, Constructor.Define): ditto.
28893         (Field, Field.Define): ditto.
28894         (Property, Property.Define): ditto.
28895         (Event, Event.Define): ditto.
28896
28897         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
28898         hashtable if there are classes or structs defined.
28899
28900         * expression.cs (LocalVariableReference.DoResolve): Simplify this
28901         code, as the constant resolution moved.
28902
28903         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
28904         the metadata, so we can flag error 133. 
28905
28906         * decl.cs (MemberCore.UnsafeOK): New function to test that a
28907         pointer is being declared in an unsafe context.
28908
28909 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
28910
28911         * modifiers.cs (Modifiers.Check): Require a Location argument.
28912         Report error 227 for Unsafe use.
28913
28914         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
28915
28916         * statement.cs (For.Emit): If the test is null, then report that
28917         we do `return', as we wont reach anything afterwards.
28918
28919         (Switch.SwitchGoverningType): Track the expression that matched
28920         the conversion.
28921
28922         * driver.cs: Allow negative numbers as an error code to flag.
28923
28924         * cs-parser.jay: Handle 1551.
28925
28926         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
28927
28928 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28929
28930         * cs-parser.jay: Report 1518 (type declaration can only contain
28931         class, struct, interface, enum or delegate)
28932
28933         (switch_label): Report 1523 (keywords `case' or `default' must
28934         preced code)
28935
28936         (opt_switch_sections): Report 1522 (empty switch)
28937
28938         * driver.cs: Report 1515 (response file specified multiple times)
28939         Report 1516 (Source file specified multiple times).
28940
28941         * expression.cs (Argument.Resolve): Signal 1510
28942
28943         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
28944         access not allowed in static code)
28945
28946 2002-01-11  Ravi Pratap  <ravi@ximian.com>
28947
28948         * typemanager.cs (IsPointerType): Utility method which we are going
28949         to need a lot.
28950
28951         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
28952         the object type, so we take care of that.
28953
28954         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
28955
28956         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
28957         added to non-params parameters :-)
28958
28959         * typemanager.cs (CSharpName): Include 'void' type too. 
28960
28961         (void_ptr_type): Include in the set of core types.
28962
28963         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
28964         duplicating code.
28965
28966         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
28967         an unsafe context.
28968
28969         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
28970         completely forgotten about it.
28971
28972 2002-01-10  Ravi Pratap  <ravi@ximian.com>
28973
28974         * cs-parser.jay (pointer_type): Add. This begins our implementation
28975         of parsing rules for unsafe code.
28976
28977         (unsafe_statement): Implement.
28978
28979         (embedded_statement): Modify to include the above.
28980
28981         * statement.cs (Unsafe): Implement new class for unsafe blocks.
28982
28983         * codegen.cs (EmitContext.InUnsafe): Add. This determines
28984         if the current context is an unsafe one.
28985
28986         * cs-parser.jay (local_variable_pointer_type): Since local variable types
28987         are handled differently, we need separate rules for them.
28988
28989         (local_variable_declaration): Update to use local_variable_pointer_type
28990         to allow variable declarations of unmanaged pointer types.
28991
28992         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
28993         in unsafe contexts.
28994
28995         * ../errors/cs0214.cs : Add.
28996
28997 2002-01-16  Nick Drochak  <ndrochak@gol.com>
28998
28999         * makefile: remove 'response' file when cleaning.
29000
29001 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
29002
29003         * cs-parser.jay: Report 1524.
29004
29005 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
29006
29007         * typemanager.cs (RegisterMethod): drop checking if we have
29008         registered this from here
29009
29010 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
29011
29012         * class.cs (Method.EmitDestructor): Implement calling our base
29013         destructor. 
29014
29015         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
29016         value of InFinally.
29017
29018         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
29019         this routine and will wrap the call in a try/catch block.  Deal
29020         with the case.
29021
29022 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
29023
29024         * ecore.cs (Expression.MemberLookup): instead of taking a
29025         parameter `same_type' that was used to tell whether we could
29026         access private members we compute our containing type from the
29027         EmitContext.
29028
29029         (FieldExpr): Added partial support for volatile fields.  This does
29030         not work for volatile fields exposed from assemblies, as I can not
29031         figure out how to extract the modreq from it.
29032
29033         Updated all the source files to use this.
29034
29035         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
29036         because it is referenced by MemberLookup very often. 
29037
29038 2002-01-09  Ravi Pratap  <ravi@ximian.com>
29039
29040         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
29041         TypeBuilder.GetCustomAttributes to retrieve what we need.
29042
29043         Get rid of redundant default_member_attr_type as this is the same as
29044         default_member_type which already exists.
29045
29046         * interface.cs, attribute.cs : Update accordingly.
29047
29048 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
29049
29050         * typemanager.cs: Enable IndexerPropertyName again.  It does not
29051         work for TYpeBuilders though.  Ravi, can you please fix this?
29052
29053         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
29054
29055         * expression.cs (Argument.Emit): Handle the case of ref objects
29056         being passed to ref functions;  
29057
29058         (ParameterReference.EmitLoad): Loads the content of the pointer
29059         without dereferencing.
29060
29061 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29062
29063         * cs-tokenizer.cs: Implemented the pre-processing expressions.
29064
29065 2002-01-08  Ravi Pratap  <ravi@ximian.com>
29066
29067         * class.cs (Indexer.DefineMethod): Incorporate the interface
29068         type in the name of the method if we are doing explicit interface
29069         implementation.
29070
29071         * expression.cs (ConversionExists): Remove as it is completely obsolete.
29072
29073         (BetterConversion): Fix extremely trivial bug where we were referring to
29074         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
29075         again !
29076
29077         * ../errors/bug16.cs : Add although we have fixed it.
29078
29079 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
29080
29081         * expression.cs (BaseIndexer): Begin implementation.
29082
29083         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
29084
29085         * cs-parser.jay (indexer_declarator): Use qualified_identifier
29086         production directly to remove a shift/reduce, and implement
29087         explicit interface implementation.
29088
29089         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
29090         after a floating point suffix.
29091
29092         * expression.cs (DoNumericPromotions): Improved the conversion for
29093         uint/uint.  If we have a constant, we avoid doing a typecast to a
29094         larger type.
29095
29096         * class.cs (Indexer): Implement explicit interface implementation
29097         for indexers.
29098
29099 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
29100
29101         * class.cs: make the default instance constructor public and hidebysig.
29102
29103 2001-01-03  Ravi Pratap  <ravi@ximian.com>
29104
29105         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
29106         so we can call it from elsewhere.
29107
29108         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
29109         we emit it internally if the class has a defined indexer; otherwise the user
29110         emits it by decorating the class definition with the DefaultMemberAttribute.
29111
29112         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
29113         attribute is not used on a type which defines an indexer.
29114
29115         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
29116         character when we skip whitespace.
29117
29118         * ../errors/cs0646.cs : Add.
29119
29120 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
29121
29122         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
29123         again. 
29124
29125         * makefile: Add practical target `mcs3.exe' which builds the third
29126         generation compiler. 
29127
29128         * expression.cs (New): Fix structures constructor calling.
29129
29130         * class.cs (Property, Method, Indexer): Emit Final flag on the
29131         method if we are an interface implementation and we are not
29132         abstract. 
29133
29134         * ecore.cs (PropertyExpr): New public field `IsBase', tells
29135         whether this property is referencing a `base' method.
29136
29137         * expression.cs (Invocation.EmitCall): take an extra argument:
29138         is_base, this is used to determine whether the `call' or
29139         `callvirt' opcode should be used.
29140
29141
29142         * delegate.cs: update EmitCall.
29143
29144         * class.cs (Method.Define): Set NewSlot for the cases where we are
29145         not implementing an interface method.
29146
29147         (Property.Define): ditto.
29148
29149 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
29150
29151         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
29152         'r'.  Allows mcs to parse itself fully.
29153
29154 2002-01-02  Ravi Pratap  <ravi@ximian.com>
29155
29156         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
29157         of the number of initializers that require the InitializeArray method.
29158
29159         (CheckIndices): Store the Expression in all cases - not the plain value. Also
29160         update the above field where necessary.
29161
29162         (MakeByteBlob): Update accordingly.
29163
29164         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
29165         greater than 2.
29166
29167         (EmitDynamicInitializers): Update in accordance with the new optimization.
29168
29169         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
29170         same OpCode applies.
29171
29172         * cs-parser.jay : Fix some glaring errors I introduced.
29173
29174 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
29175
29176         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
29177         so that we can check for name clashes there too.
29178
29179         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
29180         for interface indexers.
29181
29182         * interfaces.cs (Define): Emit the default member attribute.
29183
29184         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
29185         variable was being referred to while setting the value ;-)
29186
29187 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
29188
29189         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
29190         byte-by-byte information when we know the data is zero.
29191
29192         Make the block always a multiple of 4, because
29193         DefineInitializedData has a bug.
29194
29195         * assign.cs: Fix, we should assign from the temporary, not from
29196         the source. 
29197
29198         * expression.cs (MakeByteBlob): Fix my incorrect code.
29199
29200 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
29201
29202         * typemanager.cs (EnumToUnderlying): This function is used to get
29203         the underlying type from an enumeration, because it does not
29204         always work. 
29205
29206         * constant.cs: Use the I4_S form for values between -128 and 127.
29207
29208         * statement.cs (Block.LookupLabel): Looks up a label.
29209         (Block): Drop support for labeled blocks.
29210
29211         (LabeledStatement): New kind of statement that represents a label
29212         only.
29213
29214         (Goto): Finally implement this bad boy.
29215
29216         * cs-parser.jay: Update to reflect new mechanism to implement
29217         labels.
29218
29219 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29220
29221         * codegen.cs (EmitContext.This): a codegen property that keeps the
29222         a single instance of this instead of creating many different this
29223         instances. 
29224
29225         * delegate.cs (Delegate.DoResolve): Update to use the property;
29226
29227         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29228
29229         * expression.cs (BaseAccess.DoResolve): Ditto.
29230
29231 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29232
29233         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29234         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29235
29236         (InitCoreTypes): Update accordingly.
29237
29238         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29239         so we can quickly store the state.
29240
29241         (ApplyAttributes): Set the correct implementation flags
29242         for InternalCall methods.
29243
29244 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29245
29246         * expression.cs (EmitCall): if a method is not virtual, then do
29247         not use callvirt on it.
29248
29249         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29250         user defined stuff) requires the use of stobj, which takes an
29251         address on the stack instead of an array and an index.  So emit
29252         the Ldelema operation for it.
29253
29254         (EmitStoreOpcode): Use stobj for valuetypes.
29255
29256         (UnaryMutator.EmitCode): Use the right 1 value depending on
29257         whether we are dealing with int64/uint64, float or doubles.
29258
29259         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29260         constructors that I implemented last night.
29261
29262         (Constructor.IsDefault): Fix to work properly for static
29263         constructors.
29264
29265         * cs-parser.jay (CheckDef): report method signature errors.
29266         Update error number 103 to be 132.
29267
29268         * decl.cs: New AdditionResult enumeration value: MethodExists.
29269         Although we do this check for methods later on in the semantic
29270         analysis, catching repeated default constructors is so easy that
29271         we catch these here. 
29272
29273         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29274         promotions code.
29275
29276         (ParameterReference.EmitAssign, Emit): handle
29277         bools as bytes.
29278
29279         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29280         (ArrayAccess.EmitStoreOpcode): ditto.
29281
29282         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29283
29284         * expression.cs (MakeByteBlob): Complete all the missing types
29285         (uint, short, ushort, byte, sbyte)
29286
29287         * class.cs: Only init instance field initializers on instance
29288         constructors. 
29289
29290         Rename `constructors' to instance_constructors. 
29291
29292         (TypeContainer.AddConstructor): Only add constructors to the list
29293         if it is not static.
29294
29295         Make sure that we handle default_static_constructor independently
29296         everywhere where we handle instance_constructors
29297
29298 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29299
29300         * class.cs: Do not lookup or create a base initializer for a
29301         static constructor.
29302
29303         (ConstructorInitializer.Resolve): use the proper type to lookup
29304         for constructors.
29305
29306         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29307
29308         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29309         in DeclSpace. 
29310
29311         * decl.cs: CloseType is now an virtual method, the default
29312         implementation just closes this type.
29313
29314 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29315
29316         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29317         to PreserveSig by default. Also emit HideBySig on such methods.
29318
29319         Basically, set the defaults to standard values.
29320
29321         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29322         argument, if candidate is better, it can't be worse than the best !
29323
29324         (Invocation): Re-write bits to differentiate between methods being
29325         applicable in their expanded form and their normal form - for params
29326         methods of course.
29327
29328         Get rid of use_standard everywhere as only standard conversions are allowed
29329         in overload resolution. 
29330
29331         More spec conformance.
29332
29333 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29334
29335         * driver.cs: Add --timestamp, to see where the compiler spends
29336         most of its time.
29337
29338         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29339         `this' in static code.
29340
29341         (SimpleName.DoResolve): Implement in terms of a helper function
29342         that allows static-references to be passed upstream to
29343         MemberAccess.
29344
29345         (Expression.ResolveWithSimpleName): Resolve specially simple
29346         names when called by MemberAccess to implement the special
29347         semantics. 
29348
29349         (Expression.ImplicitReferenceConversion): Handle conversions from
29350         Null to reference types before others, as Null's type is
29351         System.Object. 
29352
29353         * expression.cs (Invocation.EmitCall): Handle the special case of
29354         calling methods declared on a reference type from a ValueType
29355         (Base classes System.Object and System.Enum)
29356
29357         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29358         the left hand side is a TypeExpr, not on every enumeration. 
29359
29360         (Binary.Resolve): If types are reference types, then do a cast to
29361         object on operators != and == of both arguments.
29362
29363         * typemanager.cs (FindMembers): Extract instance and static
29364         members if requested.
29365
29366         * interface.cs (PopulateProperty): Use void_type instead of null
29367         as the return type for the setter method.
29368
29369         (PopulateIndexer): ditto.
29370
29371 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29372
29373         * support.cs (ReflectionParameters): Fix minor bug where we
29374         were examining the wrong parameter for the ParamArray attribute.
29375
29376         Cope with requests for the type of the parameter at position
29377         greater than the params parameter's. We now return the element
29378         type of the params array as that makes more sense.
29379
29380         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29381         accordingly as we no longer have to extract the element type
29382         ourselves.
29383
29384         (Invocation.OverloadResolve): Update.
29385
29386 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29387
29388         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29389         against IEnumerator, test whether the return value is a descendant
29390         of the IEnumerator interface.
29391
29392         * class.cs (Indexer.Define): Use an auxiliary method to implement
29393         the other bits of the method definition.  Begin support for
29394         explicit interface implementation.
29395
29396         (Property.DefineMethod): Use TypeManager.void_type instead of null
29397         for an empty return value.
29398
29399 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29400
29401         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29402         dealing with a FieldExpr which is composed of a FieldBuilder, in
29403         the code path we did extract the constant, but we should have
29404         obtained the underlying value to be able to cast it (otherwise we
29405         end up in an infinite loop, this is what Ravi was running into).
29406
29407         (ArrayCreation.UpdateIndices): Arrays might be empty.
29408
29409         (MemberAccess.ResolveMemberAccess): Add support for section
29410         14.5.4.1 that deals with the special case of E.I when E is a type
29411         and something else, that I can be a reference to a static member.
29412
29413         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29414         handle a particular array type to create byte blobs, it is just
29415         something we dont generate byteblobs for.
29416
29417         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29418         arguments. 
29419
29420         * location.cs (Push): remove the key from the hashtable that we
29421         are about to add.   This happens for empty files.
29422
29423         * driver.cs: Dispose files after we have parsed them.
29424
29425         (tokenize): new function that only runs the tokenizer on its
29426         input, for speed testing.
29427
29428 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29429
29430         * class.cs (Event.Define): Define the private field only if there
29431         are no accessors defined.
29432
29433         * expression.cs (ResolveMemberAccess): If there is no associated
29434         field with the event, that means we have an event defined with its
29435         own accessors and we should flag error cs0070 since transforming
29436         ourselves into a field is not valid in that case.
29437
29438         * ecore.cs (SimpleName.DoResolve): Same as above.
29439
29440         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29441         and charset to sane values.
29442
29443 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29444
29445         * assign.cs (DoResolve): Perform check on events only if they 
29446         are being accessed outside the declaring type.
29447
29448         * cs-parser.jay (event_declarations): Update rules to correctly
29449         set the type of the implicit parameter etc.
29450
29451         (add_accessor, remove_accessor): Set current local parameters.
29452
29453         * expression.cs (Binary): For delegate addition and subtraction,
29454         cast the return value from the method into the appropriate delegate
29455         type.
29456
29457 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29458
29459         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29460         of these as the workaround is unnecessary.
29461
29462         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29463         delegate data - none of that is needed at all.
29464
29465         Re-write bits to extract the instance expression and the delegate method
29466         correctly.
29467
29468         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29469         on delegates too.
29470
29471         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29472         of attaching attributes instead of duplicating code everywhere.
29473
29474         * everywhere : Update code to do attribute emission using the above method.
29475
29476 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29477
29478         * expression.cs (IsParamsMethodApplicable): if there are not
29479         parameters, return immediately.
29480
29481         * ecore.cs: The 0 literal can be implicity converted to an enum
29482         type. 
29483
29484         (SimpleName.DoResolve): First lookup the type, then lookup the
29485         members. 
29486
29487         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29488         want to get its address.  If the InstanceExpression is not
29489         addressable, store the result in a temporary variable, then get
29490         the address of it.
29491
29492         * codegen.cs: Only display 219 errors on warning level or above. 
29493
29494         * expression.cs (ArrayAccess): Make it implement the
29495         IMemoryLocation interface.
29496
29497         (Binary.DoResolve): handle the operator == (object a, object b)
29498         and operator != (object a, object b) without incurring into a
29499         BoxedCast (because 5 != o should never be performed).
29500
29501         Handle binary enumerator operators.
29502
29503         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29504         value type, otherwise use Ldelem_ref.
29505
29506         Use precomputed names;
29507
29508         (AddressOf): Implement address of
29509
29510         * cs-parser.jay (labeled_statement): Fix recursive block
29511         addition by reworking the production.
29512
29513         * expression.cs (New.DoEmit): New has a special case:
29514                 
29515                  If we are dealing with a ValueType, we have a few
29516                  situations to deal with:
29517                 
29518                     * The target of New is a ValueType variable, that is
29519                       easy, we just pass this as the variable reference
29520                 
29521                     * The target of New is being passed as an argument,
29522                       to a boxing operation or a function that takes a
29523                       ValueType.
29524                 
29525                       In this case, we need to create a temporary variable
29526                       that is the argument of New.
29527
29528
29529 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29530
29531         * rootcontext.cs (LookupType): Check that current_type is not null before
29532         going about looking at nested types.
29533
29534         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29535         not implement the IAssignMethod interface any more.
29536
29537         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29538         where we tranform them into FieldExprs if they are being resolved from within
29539         the declaring type.
29540
29541         * ecore.cs (SimpleName.DoResolve): Do the same here.
29542
29543         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29544
29545         * ../errors/bug10.cs : Add.
29546
29547         * ../errors/cs0070.cs : Add.
29548
29549         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29550
29551         * assign.cs : Get rid of EventIsLocal everywhere.
29552
29553 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29554
29555         * ecore.cs (ConvertIntLiteral): finished the implementation.
29556
29557         * statement.cs (SwitchLabel): Convert the value we are using as a
29558         key before looking up the table.
29559
29560 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29561
29562         * codegen.cs (EmitTopBlock): Require a Location argument now.
29563
29564         * cs-parser.jay (constructor_declarator): We need to setup
29565         current_local_parameters before we parse the
29566         opt_constructor_initializer, to allow the variables to be bound
29567         to the constructor arguments.
29568
29569         * rootcontext.cs (LookupType): First lookup nested classes in our
29570         class and our parents before we go looking outside our class.
29571
29572         * expression.cs (ConstantFold): Extract/debox the values at the
29573         beginnning. 
29574
29575         * rootcontext.cs (EmitCode): Resolve the constants first before we
29576         resolve the types.  This is not really needed, but it helps debugging.
29577
29578         * statement.cs: report location.
29579
29580         * cs-parser.jay: pass location to throw statement.
29581
29582         * driver.cs: Small bug fix.
29583
29584         * report.cs: Updated format to be 4-zero filled digits.
29585
29586 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29587
29588         * expression.cs (CheckIndices): Fix minor bug where the wrong
29589         variable was being referred to ;-)
29590
29591         (DoEmit): Do not call EmitStaticInitializers when the 
29592         underlying type is System.Object.
29593
29594 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29595
29596         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29597         and do the usual workaround for SRE.
29598
29599         * class.cs (MyEventBuilder.EventType): New member to get at the type
29600         of the event, quickly.
29601
29602         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29603
29604         * assign.cs (Assign.DoResolve): Handle the case when the target
29605         is an EventExpr and perform the necessary checks.
29606
29607         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29608         interface.
29609
29610         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29611
29612         (EventExpr): Set the type in the constructor itself since we 
29613         are meant to be born fully resolved.
29614
29615         (EventExpr.Define): Revert code I wrote earlier.
29616                 
29617         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29618         instance expression is null. The instance expression is a This in that case
29619         or a null, depending on whether it is a static method or not.
29620
29621         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29622         refers to more than one method.
29623
29624         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29625         and accordingly flag errors.
29626
29627 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29628
29629         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29630
29631 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29632
29633         * location.cs (ToString): Provide useful rutine.
29634
29635 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29636
29637         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29638         objects, return the actual integral boxed.
29639
29640         * statement.cs (SwitchLabel): define an ILLabel for each
29641         SwitchLabel. 
29642
29643         (Switch.CheckSwitch): If the value is a Literal, extract
29644         the underlying literal.
29645
29646         Also in the unused hashtable we had, add the SwitchLabel so we can
29647         quickly look this value up.
29648
29649         * constant.cs: Implement a bunch of new constants.  Rewrite
29650         Literal based on this.  Made changes everywhere to adapt to this.
29651
29652         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29653         dereferencing array only once, and also copes with enumrations.
29654
29655         bytes are two bytes wide, not one.
29656
29657         (Cast): Perform constant conversions.
29658
29659         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29660         wrappers to the literals here.
29661
29662         * expression.cs (DoNumericPromotions): long literals can converted
29663         to ulong implicity (this is taken care of elsewhere, but I was
29664         missing this spot).
29665
29666         * ecore.cs (Expression.Literalize): Make the return type Literal,
29667         to improve type checking.
29668
29669         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29670
29671 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29672
29673         * literal.cs: Revert code from ravi that checked the bounds.  The
29674         bounds are sane by the definition of the type itself. 
29675
29676         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29677         need to actually look up in our parent hierarchy for interfaces
29678         implemented. 
29679
29680         * const.cs: Use the underlying type for enumerations
29681
29682         * delegate.cs: Compute the basename for the delegate creation,
29683         that should fix the delegate test case, and restore the correct
29684         Type Lookup semantics in rootcontext
29685
29686         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29687         referencing a nested type with the Reflection API is using the "+"
29688         sign. 
29689
29690         * cs-parser.jay: Do not require EOF token at the end.
29691
29692 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29693
29694         * rootcontext.cs (LookupType): Concatenate type names with
29695         a '.' instead of a '+' The test suite passes again.
29696
29697         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29698         field of the enumeration.
29699
29700         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29701         the case when the member is an EventExpr.
29702
29703         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29704         static has an associated instance expression.
29705
29706         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29707
29708         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29709
29710         * class.cs (Event.Define): Register event and perform appropriate checks
29711         for error #111.
29712
29713         We define the Add and Remove methods even if the use provides none because
29714         in that case, we provide default implementations ourselves.
29715
29716         Define a private field of the type of the event. This is done by the CSC compiler
29717         and we should be doing it too ;-)
29718
29719         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29720         More methods we use in code we generate.
29721
29722         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29723         is important.
29724
29725         (InitCoreTypes): Update accordingly for the above.
29726
29727         * class.cs (Event.Emit): Generate code for default accessors that we provide
29728
29729         (EmitDefaultMethod): Do the job in the above.
29730
29731         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29732         appropriate place.
29733
29734 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29735
29736         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29737         builders even if we were missing one.
29738
29739         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29740         pass the Basename as our class name instead of the Name.  The
29741         basename will be correctly composed for us.
29742
29743         * parameter.cs (Paramters): Now takes a Location argument.
29744
29745         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29746         make all the code call directly LookupType in RootContext and take
29747         this chance to pass the Location information everywhere.
29748
29749         * Everywhere: pass Location information.
29750
29751 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29752
29753         * class.cs (Constructor.Define): Updated way of detecting the
29754         length of the parameters.
29755
29756         (TypeContainer.DefineType): Use basename as the type name for
29757         nested types.
29758
29759         (TypeContainer.Define): Do not recursively define types here, as
29760         definition is taken care in order by the RootContext.
29761
29762         * tree.cs: Keep track of namespaces in a per-file basis.
29763
29764         * parameter.cs (Parameter.ComputeSignature): Update to use
29765         DeclSpace. 
29766
29767         (Parameters.GetSignature): ditto.
29768
29769         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29770         instead of a TypeContainer.
29771
29772         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29773         resolve names.  Because we need to be resolve in our context, not
29774         our parents.
29775
29776         * driver.cs: Implement response files.
29777
29778         * class.cs (TypeContainer.DefineType): If we are defined, do not
29779         redefine ourselves.
29780
29781         (Event.Emit): Emit the code for add/remove handlers.
29782         (Event.Define): Save the MethodBuilders for add/remove.
29783
29784         * typemanager.cs: Use pair here too.
29785
29786         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29787         DictionaryEntry requires the first argument to be non-null.  
29788
29789         (enum_declaration): Compute full name for registering the
29790         enumeration.
29791
29792         (delegate_declaration): Instead of using
29793         formal_parameter_list, use opt_formal_parameter_list as the list
29794         can be empty.
29795
29796         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29797         (EventParsing): New property that controls whether `add' and
29798         `remove' are returned as tokens or identifiers (for events);
29799
29800 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29801
29802         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29803         use MyEventBuilder only and let it wrap the real builder for us.
29804
29805         (MyEventBuilder): Revamp constructor etc.
29806
29807         Implement all operations that we perform on EventBuilder in precisely the same
29808         way here too.
29809
29810         (FindMembers): Update to use the EventBuilder member.
29811
29812         (Event.Emit): Update accordingly.
29813
29814 2001-12-18  Ravi Pratap  <ravi@ximian.com>
29815
29816         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
29817         by calling the appropriate methods.
29818
29819         (GetCustomAttributes): Make stubs as they cannot possibly do anything
29820         useful.
29821
29822         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
29823
29824 2001-12-17  Ravi Pratap  <ravi@ximian.com>
29825
29826         * delegate.cs (Delegate.Populate): Check that the return type
29827         and various parameters types are indeed accessible.
29828
29829         * class.cs (Constructor.Define): Same here.
29830
29831         (Field.Define): Ditto.
29832
29833         (Event.Define): Ditto.
29834
29835         (Operator.Define): Check that the underlying Method defined itself
29836         correctly - so it's MethodBuilder should not be null.
29837
29838         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
29839         expression happens to be null.
29840
29841         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
29842         members but as of now we don't seem to be able to do anything really useful with it.
29843
29844         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
29845         not the EventBuilder.
29846
29847 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
29848
29849         * cs-tokenizer.cs: Add support for defines.
29850         Add support for #if, #elif, #else, #endif
29851
29852         (eval_var): evaluates a variable.
29853         (eval): stubbed for evaluating functions.
29854
29855         * cs-parser.jay: Pass the defines information
29856
29857         * driver.cs: Add --define command line option.
29858
29859         * decl.cs: Move MemberCore here.
29860
29861         Make it the base class for DeclSpace.  This allows us to catch and
29862         report 108 and 109 for everything now.
29863
29864         * class.cs (TypeContainer.Define): Extract all the members
29865         before populating and emit the warning 108 (new keyword required
29866         to override) instead of having each member implement this.
29867
29868         (MemberCore.Define): New abstract method, we will be using this in
29869         the warning reporting engine in Populate.
29870
29871         (Operator.Define): Adjust to new MemberCore protocol. 
29872
29873         * const.cs (Const): This does not derive from Expression, it is a
29874         temporary object we use to create fields, it is a MemberCore. 
29875
29876         * class.cs (Method.Define): Allow the entry point to be in a
29877         specific class.
29878
29879         * driver.cs: Rewrite the argument handler to clean it up a bit.
29880
29881         * rootcontext.cs: Made it just an auxiliary namespace feature by
29882         making everything static.
29883
29884         * driver.cs: Adapt code to use RootContext type name instead of
29885         instance variable.
29886
29887         * delegate.cs: Remove RootContext argument.
29888
29889         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
29890         argument. 
29891
29892         * class.cs (Event.Define): The lookup can fail.
29893
29894         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
29895
29896         * expression.cs: Resolve the this instance before invoking the code.
29897
29898 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
29899
29900         * cs-parser.jay: Add a production in element_access that allows
29901         the thing to become a "type" reference.  This way we can parse
29902         things like "(string [])" as a type.
29903
29904         Note that this still does not handle the more complex rules of
29905         casts. 
29906
29907
29908         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
29909
29910         * ecore.cs: (CopyNewMethods): new utility function used to
29911         assemble the list of methods from running FindMembers.
29912
29913         (MemberLookup): Rework FindMembers so that 
29914
29915 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
29916
29917         * class.cs (TypeContainer): Remove Delegates who fail to be
29918         defined.
29919
29920         * delegate.cs (Populate): Verify that we dont get null return
29921         values.   TODO: Check for AsAccessible.
29922
29923         * cs-parser.jay: Use basename to emit error 574 (destructor should
29924         have the same name as container class), not the full name.
29925
29926         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
29927         possible representation.  
29928
29929         Also implements integer type suffixes U and L.
29930
29931 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
29932
29933         * expression.cs (ArrayCreation.DoResolve): We need to do the
29934         argument resolution *always*.
29935
29936         * decl.cs: Make this hold the namespace.  Hold the root context as
29937         well.
29938         (LookupType): Move here.
29939
29940         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
29941
29942         * location.cs (Row, Name): Fixed the code, it was always returning
29943         references to the first file.
29944
29945         * interface.cs: Register properties defined through interfaces.
29946
29947         * driver.cs: Add support for globbing on the command line
29948
29949         * class.cs (Field): Make it derive from MemberCore as well.
29950         (Event): ditto.
29951
29952 2001-12-15  Ravi Pratap  <ravi@ximian.com>
29953
29954         * class.cs (Event::Define): Check that the type of the event is a delegate
29955         type else flag error #66.
29956
29957         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
29958         same.
29959
29960         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
29961         values of EntryPoint, CharSet etc etc.
29962
29963         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
29964
29965         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
29966         be null and we should ignore this. I am not sure if this is really clean. Apparently,
29967         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
29968         which needs this to do its work.
29969
29970         * ../errors/cs0066.cs : Add.
29971
29972 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
29973
29974         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
29975         helper functions.
29976
29977         * class.cs: (MethodSignature.MethodSignature): Removed hack that
29978         clears out the parameters field.
29979         (MemberSignatureCompare): Cleanup
29980
29981         (MemberCore): New base class used to share code between MethodCore
29982         and Property.
29983
29984         (RegisterRequiredImplementations) BindingFlags.Public requires
29985         either BindingFlags.Instace or Static.  Use instance here.
29986
29987         (Property): Refactored code to cope better with the full spec.
29988
29989         * parameter.cs (GetParameterInfo): Return an empty array instead
29990         of null on error.
29991
29992         * class.cs (Property): Abstract or extern properties have no bodies.
29993
29994         * parameter.cs (GetParameterInfo): return a zero-sized array.
29995
29996         * class.cs (TypeContainer.MethodModifiersValid): Move all the
29997         method modifier validation to the typecontainer so we can reuse
29998         this on properties.
29999
30000         (MethodCore.ParameterTypes): return an empty sized array of types.
30001
30002         (Property.Define): Test property modifier validity.
30003
30004         Add tests for sealed/override too.
30005
30006         (Method.Emit): abstract or extern methods have no bodies.
30007
30008 2001-12-14  Ravi Pratap  <ravi@ximian.com>
30009
30010         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
30011         thing.
30012
30013         (Method::Define, ::Emit): Modify accordingly.
30014
30015         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
30016
30017         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
30018
30019         * makefile: Pass in /unsafe.
30020
30021 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
30022
30023         * class.cs (MakeKey): Kill routine.
30024
30025         * class.cs (TypeContainer.Define): Correctly define explicit
30026         method implementations (they require the full interface name plus
30027         the method name).
30028
30029         * typemanager.cs: Deply the PtrHashtable here and stop using the
30030         lame keys.  Things work so much better.
30031
30032         This of course broke everyone who depended on `RegisterMethod' to
30033         do the `test for existance' test.  This has to be done elsewhere.
30034
30035         * support.cs (PtrHashtable): A hashtable that avoid comparing with
30036         the object stupid Equals method (because, that like fails all over
30037         the place).  We still do not use it.
30038
30039         * class.cs (TypeContainer.SetRequiredInterface,
30040         TypeContainer.RequireMethods): Killed these two routines and moved
30041         all the functionality to RegisterRequiredImplementations.
30042
30043         (TypeContainer.RegisterRequiredImplementations): This routine now
30044         registers all the implementations required in an array for the
30045         interfaces and abstract methods.  We use an array of structures
30046         which can be computed ahead of time to reduce memory usage and we
30047         also assume that lookups are cheap as most classes will not
30048         implement too many interfaces.
30049
30050         We also avoid creating too many MethodSignatures.
30051
30052         (TypeContainer.IsInterfaceMethod): Update and optionally does not
30053         clear the "pending" bit if we find that there are problems with
30054         the declaration.
30055
30056         (TypeContainer.VerifyPendingMethods): Update to report errors of
30057         methods that look like implementations but are not.
30058
30059         (TypeContainer.Define): Add support for explicit interface method
30060         implementation. 
30061
30062 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
30063
30064         * typemanager.cs: Keep track of the parameters here instead of
30065         being a feature of the TypeContainer.
30066
30067         * class.cs: Drop the registration of parameters here, as
30068         InterfaceMethods are also interface declarations.
30069
30070         * delegate.cs: Register methods with the TypeManager not only with
30071         the TypeContainer.  This code was buggy.
30072
30073         * interface.cs: Full registation here.
30074
30075 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
30076
30077         * expression.cs: Remove reducer for binary expressions, it can not
30078         be done this way.
30079
30080         * const.cs: Put here the code that used to go into constant.cs
30081
30082         * constant.cs: Put here the code for constants, this is a new base
30083         class for Literals.
30084
30085         * literal.cs: Make Literal derive from Constant.
30086
30087 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
30088
30089         * statement.cs (Return.Emit): Report error 157 if the user
30090         attempts to return from a finally block.
30091
30092         (Return.Emit): Instead of emitting a return, jump to the end of
30093         the function.
30094
30095         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
30096         LocalBuilder to store the result of the function.  ReturnLabel is
30097         the target where we jump.
30098
30099
30100 2001-12-09  Radek Doulik  <rodo@ximian.com>
30101
30102         * cs-parser.jay: remember alias in current namespace
30103
30104         * ecore.cs (SimpleName::DoResolve): use aliases for types or
30105         namespaces
30106
30107         * class.cs (LookupAlias): lookup alias in my_namespace
30108
30109         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
30110         aliases hashtable
30111         (LookupAlias): lookup alias in this and if needed in parent
30112         namespaces
30113
30114 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
30115
30116         * support.cs: 
30117
30118         * rootcontext.cs: (ModuleBuilder) Made static, first step into
30119         making things static.  I need this to avoid passing the
30120         TypeContainer when calling ParameterType.
30121
30122         * support.cs (InternalParameters.ParameterType): Remove ugly hack
30123         that did string manipulation to compute the type and then call
30124         GetType.  Use Parameter.ParameterType instead.
30125
30126         * cs-tokenizer.cs: Consume the suffix for floating values.
30127
30128         * expression.cs (ParameterReference): figure out whether this is a
30129         reference parameter or not.  Kill an extra variable by computing
30130         the arg_idx during emission.
30131
30132         * parameter.cs (Parameters.GetParameterInfo): New overloaded
30133         function that returns whether a parameter is an out/ref value or not.
30134
30135         (Parameter.ParameterType): The type of the parameter (base,
30136         without ref/out applied).
30137
30138         (Parameter.Resolve): Perform resolution here.
30139         (Parameter.ExternalType): The full type (with ref/out applied).
30140
30141         * statement.cs (Using.Emit, Using.EmitExpression): Implement
30142         support for expressions on the using statement.
30143
30144 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
30145
30146         * statement.cs (Using.EmitLocalVariableDecls): Split the
30147         localvariable handling of the using statement.
30148
30149         (Block.EmitMeta): Keep track of variable count across blocks.  We
30150         were reusing slots on separate branches of blocks.
30151
30152         (Try.Emit): Emit the general code block, we were not emitting it. 
30153
30154         Check the type of the declaration to be an IDisposable or
30155         something that can be implicity converted to it. 
30156
30157         Emit conversions if required.
30158
30159         * ecore.cs (EmptyExpression): New utility class.
30160         (Expression.ImplicitConversionExists): New utility function.
30161
30162 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
30163
30164         * statement.cs (Using): Implement.
30165
30166         * expression.cs (LocalVariableReference): Support read only variables.
30167
30168         * statement.cs: Remove the explicit emit for the Leave opcode.
30169         (VariableInfo): Add a readonly field.
30170
30171 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
30172
30173         * ecore.cs (ConvCast): new class used to encapsulate the various
30174         explicit integer conversions that works in both checked and
30175         unchecked contexts.
30176
30177         (Expression.ConvertNumericExplicit): Use new ConvCast class to
30178         properly generate the overflow opcodes.
30179
30180 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30181
30182         * statement.cs: The correct type for the EmptyExpression is the
30183         element_type, not the variable type.  Ravi pointed this out.
30184
30185 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30186
30187         * class.cs (Method::Define): Handle PInvoke methods specially
30188         by using DefinePInvokeMethod instead of the usual one.
30189
30190         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
30191         above to do the task of extracting information and defining the method.
30192
30193 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30194
30195         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
30196         of the condition for string type.
30197
30198         (Emit): Move that here. 
30199
30200         (ArrayCreation::CheckIndices): Keep string literals in their expression
30201         form.
30202
30203         (EmitDynamicInitializers): Handle strings appropriately.
30204
30205 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30206
30207         * codegen.cs (EmitContext): Replace multiple variables with a
30208         single pointer to the current Switch statement.
30209
30210         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
30211         EmitContext.
30212
30213 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30214
30215         * statement.cs 
30216
30217         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30218         default'.
30219
30220         (Foreach.Emit): Foreach on arrays was not setting
30221         up the loop variables (for break/continue).
30222
30223         (GotoCase): Semi-implented.
30224
30225 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30226
30227         * attribute.cs (CheckAttribute): Handle system attributes by using
30228         Attribute.GetAttributes to examine information we need.
30229
30230         (GetValidPlaces): Same here.
30231
30232         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30233
30234         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30235
30236         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30237
30238         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30239
30240         (Method::Emit): Handle the case when we are a PInvoke method.
30241
30242 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30243
30244         * expression.cs: Use ResolveWithSimpleName on compound names.
30245
30246 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30247
30248         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30249         before trying to reduce it.
30250
30251         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30252
30253         * constant.cs (LookupConstantValue): Implement.
30254
30255         (EmitConstant): Use the above in emitting the constant.
30256
30257         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30258         that are user-defined by doing a LookupConstantValue on them.
30259
30260         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30261         too, like above.
30262
30263 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30264
30265         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30266
30267         (BaseAccess.DoResolve): Implement.
30268
30269         (MemberAccess.DoResolve): Split this routine into a
30270         ResolveMemberAccess routine that can be used independently
30271
30272 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30273
30274         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30275         As that share bits of the implementation.  Is returns a boolean,
30276         while As returns the Type that is being probed.
30277
30278 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30279
30280         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30281         instead of a Literal - much easier.
30282
30283         (EnumInTransit): Remove - utterly useless :-)
30284
30285         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30286
30287         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30288
30289         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30290         chain when we have no associated expression.
30291
30292 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30293
30294         * constant.cs (Define): Use Location while reporting the errror.
30295
30296         Also emit a warning when 'new' is used and there is no inherited
30297         member to hide.
30298
30299         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30300         populated.
30301
30302         (LookupEnumValue): Implement to lookup an enum member's value and define it
30303         if necessary.
30304
30305         (Populate): Re-write accordingly to use the above routine.
30306
30307 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30308
30309         * expression.cs (This): Fix prototype for DoResolveLValue to
30310         override the base class DoResolveLValue.
30311
30312         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30313         declarations) 
30314
30315         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30316         (we need to load the address of the field here).  This fixes
30317         test-22. 
30318
30319         (FieldExpr.DoResolveLValue): Call the DoResolve
30320         function to initialize the Instance expression.
30321
30322         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30323         correctly the GetEnumerator operation on a value type.
30324
30325         * cs-parser.jay: Add more simple parsing error catches.
30326
30327         * statement.cs (Switch): Add support for string switches.
30328         Handle null specially.
30329
30330         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30331
30332 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30333
30334         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30335
30336         (declare_local_constant): New helper function.
30337
30338         * statement.cs (AddConstant): Keep a separate record of constants
30339
30340         (IsConstant): Implement to determine if a variable is a constant.
30341
30342         (GetConstantExpression): Implement.
30343
30344         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30345
30346         * statement.cs (IsVariableDefined): Re-write.
30347
30348 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30349
30350         * class.cs (TypeContainer::FindMembers): Look for constants
30351         in the case when we are looking for MemberTypes.Field
30352
30353         * expression.cs (MemberAccess::DoResolve): Check that in the
30354         case we are a FieldExpr and a Literal, we are not being accessed
30355         by an instance reference.
30356
30357         * cs-parser.jay (local_constant_declaration): Implement.
30358
30359         (declaration_statement): Implement for constant declarations.
30360
30361 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30362
30363         * statement.cs (Switch): Catch double defaults.
30364
30365         (Switch): More work on the switch() statement
30366         implementation.  It works for integral values now, need to finish
30367         string support.
30368
30369
30370 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30371
30372         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30373         integer literals into other integer literals.  To be used by
30374         switch. 
30375
30376 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30377
30378         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30379         some memory.
30380
30381         (EmitDynamicInitializers): Cope with the above since we extract data
30382         directly from ArrayData now.
30383
30384         (ExpectInitializers): Keep track of whether initializers are mandatory
30385         or not.
30386
30387         (Bounds): Make it a hashtable to prevent the same dimension being 
30388         recorded for every element in that dimension.
30389
30390         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30391         from being found.
30392
30393         Also fix bug which was causing the indices to be emitted in the reverse
30394         order.
30395
30396 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30397
30398         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30399         unfinished.  They do not work, because the underlying code is
30400         sloppy.
30401
30402 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30403
30404         * cs-parser.jay: Remove bogus fixme.
30405
30406         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30407         on Switch statement.
30408
30409 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30410
30411         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30412         the same. 
30413
30414         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30415         parameter. Apparently, any expression is allowed. 
30416
30417         (ValidateInitializers): Update accordingly.
30418
30419         (CheckIndices): Fix some tricky bugs thanks to recursion.
30420
30421         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30422         I was being completely brain-dead.
30423
30424         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30425         and re-write acordingly.
30426
30427         (DelegateInvocation): Re-write accordingly.
30428
30429         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30430
30431         (MakeByteBlob): Handle types more correctly.
30432
30433         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30434         initialization from expressions but it is incomplete because I am a complete
30435         Dodo :-|
30436
30437 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30438
30439         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30440         on If.  Basically, we have to return `true' (ie, we do return to
30441         our caller) only if both branches of the if return.
30442
30443         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30444         short-circuit operators, handle them as short circuit operators. 
30445
30446         (Cast.DoResolve): Resolve type.
30447         (Cast.Cast): Take an expression as the target type.
30448
30449         * cs-parser.jay (cast_expression): Remove old hack that only
30450         allowed a limited set of types to be handled.  Now we take a
30451         unary_expression and we resolve to a type during semantic
30452         analysis.
30453
30454         Use the grammar productions from Rhys to handle casts (this is
30455         not complete like Rhys syntax yet, we fail to handle that corner
30456         case that C# has regarding (-x), but we will get there.
30457
30458 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30459
30460         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30461         field which is an array type.
30462
30463         * cs-parser.jay (declare_local_variables): Support array initialization too.
30464
30465         * typemanager.cs (MakeKey): Implement.
30466
30467         (everywhere): Use the above appropriately.
30468
30469         * cs-parser.jay (for_statement): Update for array initialization while
30470         declaring variables.
30471
30472         * ecore.cs : The error message was correct, it's the variable's names that
30473         were misleading ;-) Make the code more readable.
30474
30475         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30476         the correct type etc.
30477
30478         (ConvertExplicit): Handle Enum types by examining the underlying type.
30479
30480 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30481
30482         * parameter.cs (GetCallingConvention): Always return
30483         CallingConventions.Standard for now.
30484
30485 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30486
30487         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30488         and `r' after calling DoNumericPromotions.
30489
30490         * ecore.cs: Fix error message (the types were in the wrong order).
30491
30492         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30493         BindingFlags.Instance as well 
30494
30495         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30496         implicit int literal conversion in an empty cast so that we
30497         propagate the right type upstream.
30498
30499         (UnboxCast): new class used to unbox value types.
30500         (Expression.ConvertExplicit): Add explicit type conversions done
30501         by unboxing.
30502
30503         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30504         the target type before applying the implicit LongLiterals to ULong
30505         literal cast.
30506
30507 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30508
30509         * cs-parser.jay (for_statement): Reworked the way For works: now
30510         we declare manually any variables that are introduced in
30511         for_initializer to solve the problem of having out-of-band code
30512         emition (that is what got for broken).
30513
30514         (declaration_statement): Perform the actual variable declaration
30515         that used to be done in local_variable_declaration here.
30516
30517         (local_variable_declaration): Do not declare anything, just pass
30518         the information on a DictionaryEntry
30519
30520 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30521
30522         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30523         re-write of the logic to now make it recursive.
30524
30525         (UpdateIndices): Re-write accordingly.
30526
30527         Store element data in a separate ArrayData list in the above methods.
30528
30529         (MakeByteBlob): Implement to dump the array data into a byte array.
30530
30531 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30532
30533         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30534         into CheckIndices.
30535
30536         * constant.cs (Define): Implement.
30537
30538         (EmitConstant): Re-write fully.
30539
30540         Pass in location info.
30541
30542         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30543         respectively.
30544
30545         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30546         DictionaryEntry since we need location info too.
30547
30548         (constant_declaration): Update accordingly.
30549
30550         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30551         code into another method : UpdateIndices.
30552
30553 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30554
30555         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30556         some type checking etc.
30557
30558 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30559
30560         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30561         bits to provide dimension info if the user skips doing that.
30562
30563         Update second constructor to store the rank correctly.
30564
30565 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30566
30567         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30568         and try to implement.
30569
30570         * ../errors/cs0150.cs : Add.
30571
30572         * ../errors/cs0178.cs : Add.
30573
30574 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30575
30576         * statement.cs: Implement foreach on multi-dimensional arrays. 
30577
30578         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30579         name of the params argument.
30580
30581         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30582         initializing the array.
30583
30584         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30585         we can use this elsewhere.
30586
30587         * statement.cs: Finish implementation of foreach for single
30588         dimension arrays.
30589
30590         * cs-parser.jay: Use an out-of-band stack to pass information
30591         around, I wonder why I need this.
30592
30593         foreach_block: Make the new foreach_block the current_block.
30594
30595         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30596         function used to return a static Parameters structure.  Used for
30597         empty parameters, as those are created very frequently.
30598
30599         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30600
30601 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30602
30603         * interface.cs : Default modifier is private, not public. The
30604         make verify test passes again.
30605
30606 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30607
30608         * support.cs (ReflectionParameters): Fix logic to determine
30609         whether the last parameter is a params one. Test 9 passes again.
30610
30611         * delegate.cs (Populate): Register the builders we define with
30612         RegisterParameterForBuilder. Test 19 passes again.
30613
30614         * cs-parser.jay (property_declaration): Reference $6 instead
30615         of $$ to get at the location.
30616
30617         (indexer_declaration): Similar stuff.
30618
30619         (attribute): Ditto.
30620
30621         * class.cs (Property): Register parameters for the Get and Set methods
30622         if they exist. Test 23 passes again.
30623
30624         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30625         call to EmitArguments as we are sure there aren't any params arguments. 
30626         Test 32 passes again.
30627
30628         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30629         IndexOutOfRangeException. 
30630
30631         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30632         Test 33 now passes again.
30633
30634 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30635
30636         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30637         broke a bunch of things.  Will have to come up with a better way
30638         of tracking locations.
30639
30640         * statement.cs: Implemented foreach for single dimension arrays.
30641
30642 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30643
30644         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30645         an error.  This removes the lookup from the critical path.
30646
30647         * cs-parser.jay: Removed use of temporary_loc, which is completely
30648         broken. 
30649
30650 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30651
30652         * support.cs (ReflectionParameters.ParameterModifier): Report
30653         whether the argument is a PARAMS argument or not.
30654
30655         * class.cs: Set the attribute `ParamArrayAttribute' on the
30656         parameter argument.
30657
30658         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30659         and cons_param_array_attribute (ConstructorInfo for
30660         ParamArrayAttribute)., 
30661
30662         * codegen.cs: Emit the return using the `Return' statement, that
30663         way we can report the error correctly for missing return values. 
30664
30665         * class.cs (Method.Emit): Clean up.
30666
30667         * expression.cs (Argument.Resolve): Take another argument: the
30668         location where this argument is used.  Notice that this is not
30669         part of the "Argument" class as to reduce the size of the
30670         structure (we know the approximate location anyways).
30671
30672         Test if the argument is a variable-reference, if not, then
30673         complain with a 206.
30674
30675         (Argument.Emit): Emit addresses of variables.
30676
30677         (Argument.FullDesc): Simplify.
30678
30679         (Invocation.DoResolve): Update for Argument.Resolve.
30680
30681         (ElementAccess.DoResolve): ditto.
30682
30683         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30684         method should be virtual, as this method is always virtual.
30685
30686         (NewDelegate.DoResolve): Update for Argument.Resolve.
30687
30688         * class.cs (ConstructorInitializer.DoResolve): ditto.
30689
30690         * attribute.cs (Attribute.Resolve): ditto.
30691
30692 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30693
30694         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30695
30696         * expression.cs (ParameterReference): Drop IStackStorage and implement
30697         IAssignMethod instead. 
30698
30699         (LocalVariableReference): ditto.
30700
30701         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30702         IAssignMethod instead. 
30703
30704 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30705
30706         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30707         enumerations that are used in heavily used structures derive from
30708         byte in a laughable and pathetic attempt to reduce memory usage.
30709         This is the kind of pre-optimzations that you should not do at
30710         home without adult supervision.
30711
30712         * expression.cs (UnaryMutator): New class, used to handle ++ and
30713         -- separatedly from the other unary operators.  Cleans up the
30714         code, and kills the ExpressionStatement dependency in Unary.
30715
30716         (Unary): Removed `method' and `Arguments' from this class, making
30717         it smaller, and moving it all to SimpleCall, so I can reuse this
30718         code in other locations and avoid creating a lot of transient data
30719         strucutres when not required.
30720
30721         * cs-parser.jay: Adjust for new changes.
30722
30723 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30724
30725         * enum.cs (Enum.Populate): If there is a failure during
30726         definition, return
30727
30728         * cs-parser.jay (opt_enum_base): we used to catch type errors
30729         here, but this is really incorrect.  The type error should be
30730         catched during semantic analysis.
30731
30732 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30733
30734         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30735         current_local_parameters as expected since I, in my stupidity, had forgotten
30736         to do this :-)
30737
30738         * attribute.cs (GetValidPlaces): Fix stupid bug.
30739
30740         * class.cs (Method::Emit): Perform check on applicability of attributes.
30741
30742         (Constructor::Emit): Ditto.
30743
30744         (Field::Emit): Ditto.
30745
30746         (Field.Location): Store location information.
30747
30748         (Property, Event, Indexer, Operator): Ditto.
30749
30750         * cs-parser.jay (field_declaration): Pass in location for each field.
30751
30752         * ../errors/cs0592.cs : Add.
30753
30754 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30755
30756         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30757
30758         (InitCoreTypes): Update accordingly.
30759
30760         (RegisterAttrType, LookupAttr): Implement.
30761
30762         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30763         info about the same.
30764
30765         (Resolve): Update to populate the above as necessary.
30766
30767         (Error592): Helper.
30768
30769         (GetValidPlaces): Helper to the above.
30770
30771         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30772
30773         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30774
30775 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30776
30777         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30778
30779         * ../errors/cs0617.cs : Add.
30780
30781 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30782
30783         * enum.cs (Emit): Rename to Populate to be more consistent with what
30784         we expect it to do and when exactly it is called.
30785
30786         * class.cs, rootcontext.cs : Update accordingly.
30787
30788         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30789         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30790
30791         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30792
30793         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30794         of a fieldinfo using the above, when dealing with a FieldBuilder.
30795
30796 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30797
30798         * ../errors/cs0031.cs : Add.
30799
30800         * ../errors/cs1008.cs : Add.
30801
30802         * ../errrors/cs0543.cs : Add.
30803
30804         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30805         enum type.
30806
30807         (FindMembers): Implement.
30808
30809         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
30810         enums and delegates too.
30811
30812         (enum_types): Rename to builder_to_enum.
30813
30814         (delegate_types): Rename to builder_to_delegate.
30815
30816         * delegate.cs (FindMembers): Implement.
30817
30818 2001-11-09  Ravi Pratap  <ravi@ximian.com>
30819
30820         * typemanager.cs (IsEnumType): Implement.
30821
30822         * enum.cs (Emit): Re-write parts to account for the underlying type
30823         better and perform checking etc.
30824
30825         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
30826         of the underlying type.
30827
30828         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
30829         value
30830
30831         * enum.cs (error31): Helper to report error #31.
30832
30833         * cs-parser.jay (enum_declaration): Store location of each member too.
30834
30835         * enum.cs (member_to_location): New hashtable. 
30836
30837         (AddEnumMember): Update location hashtable.
30838
30839         (Emit): Use the location of each member while reporting errors.
30840
30841 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30842
30843         * cs-parser.jay: A for_initializer if is a
30844         local_variable_declaration really ammount to have an implicit
30845         block with the variable declaration and no initializer for for.
30846
30847         * statement.cs (For.Emit): Cope with null initializers.
30848
30849         This fixes the infinite loop on for initializers.
30850
30851 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
30852
30853         * enum.cs: More cleanup.
30854
30855         * ecore.cs: Remove dead code.
30856
30857         * class.cs (Property.Emit): More simplification.
30858         (Event.Emit): ditto.
30859
30860         Reworked to have less levels of indentation.
30861
30862 2001-11-08  Ravi Pratap  <ravi@ximian.com>
30863
30864         * class.cs (Property): Emit attributes.
30865
30866         (Field): Ditto.
30867
30868         (Event): Ditto.
30869
30870         (Indexer): Ditto.
30871
30872         (Operator): Ditto.
30873
30874         * enum.cs (Emit): Ditto.
30875
30876         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
30877         Enums too.
30878
30879         * class.cs (Field, Event, etc.): Move attribute generation into the
30880         Emit method everywhere.
30881
30882         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
30883         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
30884         as we had no way of defining nested enums !
30885
30886         * rootcontext.cs : Adjust code accordingly.
30887
30888         * typemanager.cs (AddEnumType): To keep track of enum types separately.
30889
30890 2001-11-07  Ravi Pratap  <ravi@ximian.com>
30891
30892         * expression.cs (EvalConstantExpression): Move into ecore.cs
30893
30894         * enum.cs (Enum): Rename some members and make them public and readonly
30895         according to our convention.
30896
30897         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
30898         nothing else.
30899
30900         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
30901
30902         (Enum::Emit): Write a simple version for now which doesn't try to compute
30903         expressions. I shall modify this to be more robust in just a while.
30904
30905         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
30906
30907         (TypeContainer::CloseType): Create the Enum types too.
30908
30909         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
30910
30911         * expression.cs (EvalConstantExpression): Get rid of completely.
30912
30913         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
30914         user-defined values and other cases.
30915
30916         (IsValidEnumLiteral): Helper function.
30917
30918         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
30919         out there in the case we had a literal FieldExpr.
30920
30921         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
30922
30923         (Literalize): Revamp a bit to take two arguments.
30924
30925         (EnumLiteral): New class which derives from Literal to wrap enum literals.
30926
30927 2001-11-06  Ravi Pratap  <ravi@ximian.com>
30928
30929         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
30930
30931         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
30932
30933         (Resolve): Use the above to ensure we have proper initializers.
30934
30935 2001-11-05  Ravi Pratap  <ravi@ximian.com>
30936
30937         * expression.cs (Expression::EvalConstantExpression): New method to 
30938         evaluate constant expressions.
30939
30940         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
30941
30942 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30943
30944         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
30945         in an array.
30946
30947         (Binary.ResolveOperator): Handle operator != (object a, object b)
30948         and operator == (object a, object b);
30949
30950         (Binary.DoNumericPromotions): Indicate whether the numeric
30951         promotion was possible.
30952
30953         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
30954         Implement.  
30955
30956         Made the ArrayAccess implement interface IAssignMethod instead of
30957         IStackStore as the order in which arguments are passed reflects
30958         this.
30959
30960         * assign.cs: Instead of using expr.ExprClass to select the way of
30961         assinging, probe for the IStackStore/IAssignMethod interfaces.
30962
30963         * typemanager.cs: Load InitializeArray definition.
30964
30965         * rootcontext.cs (RootContext.MakeStaticData): Used to define
30966         static data that can be used to initialize arrays. 
30967
30968 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
30969
30970         * expression.cs: Handle operator== and operator!= for booleans.
30971
30972         (Conditioal.Reduce): Implement reducer for the ?: operator.
30973
30974         (Conditional.Resolve): Implement dead code elimination.
30975
30976         (Binary.Resolve): Catch string literals and return a new
30977         concatenated string.
30978
30979         (Unary.Reduce): Implement reduction of unary expressions.
30980
30981         * ecore.cs: Split out the expression core handling here.
30982
30983         (Expression.Reduce): New method used to perform constant folding
30984         and CSE.  This is needed to support constant-expressions. 
30985
30986         * statement.cs (Statement.EmitBoolExpression): Pass true and false
30987         targets, and optimize for !x.
30988
30989 2001-11-04  Ravi Pratap  <ravi@ximian.com>
30990
30991         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
30992         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
30993         set custom atttributes.
30994
30995         * literal.cs (Literal::GetValue): New abstract method to return the actual
30996         value of the literal, cast as an object.
30997
30998         (*Literal): Implement GetValue method.
30999
31000         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
31001         expressions to the arraylist but objects of type Argument.
31002
31003         * class.cs (TypeContainer::Emit): Emit our attributes too.
31004
31005         (Method::Emit, Constructor::Emit): Ditto.
31006
31007         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
31008         to be ignoring earlier.
31009
31010 2001-11-03  Ravi Pratap  <ravi@ximian.com>
31011
31012         * attribute.cs (AttributeSection::Define): Implement to do the business
31013         of constructing a CustomAttributeBuilder.
31014
31015         (Attribute): New trivial class. Increases readability of code.  
31016
31017         * cs-parser.jay : Update accordingly.
31018
31019         (positional_argument_list, named_argument_list, named_argument): New rules
31020
31021         (attribute_arguments): Use the above so that we are more correct.
31022
31023 2001-11-02  Ravi Pratap  <ravi@ximian.com>
31024
31025         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
31026         to perform all checks for a method with a params parameter.
31027
31028         (Invocation::OverloadResolve): Update to use the above method and therefore
31029         cope correctly with params method invocations.
31030
31031         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
31032         params too.
31033
31034         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
31035         constructors in our parent too because we can't afford to miss out on 
31036         protected ones ;-)
31037
31038         * attribute.cs (AttributeSection): New name for the class Attribute
31039
31040         Other trivial changes to improve readability.
31041
31042         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
31043         use the new class names.
31044
31045 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31046
31047         * class.cs (Method::Define): Complete definition for params types too
31048
31049         (Indexer::Define): Ditto.
31050
31051         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
31052         Cope everywhere with a request for info about the array parameter.
31053
31054 2001-11-01  Ravi Pratap  <ravi@ximian.com>
31055
31056         * tree.cs (RecordNamespace): Fix up to check for the correct key.
31057
31058         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
31059         local_variable_type to extract the string corresponding to the type.
31060
31061         (local_variable_type): Fixup the action to use the new helper method.
31062
31063         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
31064         go.
31065
31066         * expression.cs : Clean out code which uses the above.
31067
31068 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31069
31070         * typemanager.cs (RegisterMethod): Check if we already have an existing key
31071         and bale out if necessary by returning a false.
31072
31073         (RegisterProperty): Ditto.
31074
31075         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
31076         and print out appropriate error messages.
31077
31078         * interface.cs (everywhere): Ditto.
31079
31080         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
31081         location to constructor.
31082
31083         * class.cs (Property, Event, Indexer): Update accordingly.
31084
31085         * ../errors/cs111.cs : Added.
31086
31087         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
31088         of a method, as laid down by the spec.
31089
31090         (Invocation::OverloadResolve): Use the above method.
31091
31092 2001-10-31  Ravi Pratap  <ravi@ximian.com>
31093
31094         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
31095         now take a TypeContainer and a Parameters object.
31096
31097         (ParameterData): Modify return type of ParameterModifier method to be 
31098         Parameter.Modifier and not a string.
31099
31100         (ReflectionParameters, InternalParameters): Update accordingly.
31101
31102         * expression.cs (Argument::GetParameterModifier): Same here.
31103
31104         * support.cs (InternalParameters::ParameterType): Find a better way of determining
31105         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
31106         symbol in it at all so maybe this is only for now.
31107
31108 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31109
31110         * support.cs (InternalParameters): Constructor now takes an extra argument 
31111         which is the actual Parameters class.
31112
31113         (ParameterDesc): Update to provide info on ref/out modifiers.
31114
31115         * class.cs (everywhere): Update call to InternalParameters to pass in
31116         the second argument too.
31117
31118         * support.cs (ParameterData): Add ParameterModifier, which is a method 
31119         to return the modifier info [ref/out etc]
31120
31121         (InternalParameters, ReflectionParameters): Implement the above.
31122
31123         * expression.cs (Argument::ParameterModifier): Similar function to return
31124         info about the argument's modifiers.
31125
31126         (Invocation::OverloadResolve): Update to take into account matching modifiers 
31127         too.
31128
31129         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
31130         a new SetFormalParameters object which we pass to InternalParameters.
31131
31132 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31133
31134         * expression.cs (NewArray): Merge into the ArrayCreation class.
31135
31136 2001-10-29  Ravi Pratap  <ravi@ximian.com>
31137
31138         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
31139         NewUserdefinedArray into one as there wasn't much of a use in having
31140         two separate ones.
31141
31142         * expression.cs (Argument): Change field's name to ArgType from Type.
31143
31144         (Type): New readonly property which returns the proper type, taking into 
31145         account ref/out modifiers.
31146
31147         (everywhere): Adjust code accordingly for the above.
31148
31149         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
31150         whether we are emitting for a ref or out parameter.
31151
31152         * expression.cs (Argument::Emit): Use the above field to set the state.
31153
31154         (LocalVariableReference::Emit): Update to honour the flag and emit the
31155         right stuff.
31156
31157         * parameter.cs (Attributes): Set the correct flags for ref parameters.
31158
31159         * expression.cs (Argument::FullDesc): New function to provide a full desc.
31160
31161         * support.cs (ParameterData): Add method ParameterDesc to the interface.
31162
31163         (ReflectionParameters, InternalParameters): Implement the above method.
31164
31165         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
31166         reporting errors.
31167
31168         (Invocation::FullMethodDesc): Ditto. 
31169
31170 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
31171
31172         * cs-parser.jay: Add extra production for the second form of array
31173         creation. 
31174
31175         * expression.cs (ArrayCreation): Update to reflect the above
31176         change. 
31177
31178         * Small changes to prepare for Array initialization.
31179
31180 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
31181
31182         * typemanager.cs (ImplementsInterface): interface might be null;
31183         Deal with this problem;
31184
31185         Also, we do store negative hits on the cache (null values), so use
31186         this instead of calling t.GetInterfaces on the type everytime.
31187
31188 2001-10-28  Ravi Pratap  <ravi@ximian.com>
31189
31190         * typemanager.cs (IsBuiltinType): New method to help determine the same.
31191
31192         * expression.cs (New::DoResolve): Get rid of array creation code and instead
31193         split functionality out into different classes.
31194
31195         (New::FormArrayType): Move into NewBuiltinArray.
31196
31197         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
31198         quite useless.
31199
31200         (NewBuiltinArray): New class to handle creation of built-in arrays.
31201
31202         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
31203         account creation of one-dimensional arrays.
31204
31205         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
31206
31207         (NewUserdefinedArray::DoResolve): Implement.
31208
31209         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
31210
31211         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
31212         we maintain inside the TypeManager. This is necessary to perform lookups on the
31213         module builder.
31214
31215         (LookupType): Update to perform GetType on the module builders too.     
31216
31217         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31218
31219         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31220
31221 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31222
31223         * expression.cs (New::DoResolve): Implement guts of array creation.
31224
31225         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31226
31227 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31228
31229         * expression.cs: Fix bug I introduced lsat night that broke
31230         Delegates. 
31231
31232         (Expression.Resolve): Report a 246 error (can not resolve name)
31233         if we find a SimpleName in the stream.
31234
31235         (Expression.ResolveLValue): Ditto.
31236
31237         (Expression.ResolveWithSimpleName): This function is a variant of
31238         ResolveName, this one allows SimpleNames to be returned without a
31239         warning.  The only consumer of SimpleNames is MemberAccess
31240
31241 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31242
31243         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31244         might arrive here.  I have my doubts that this is correct.
31245
31246         * statement.cs (Lock): Implement lock statement.
31247
31248         * cs-parser.jay: Small fixes to support `lock' and `using'
31249
31250         * cs-tokenizer.cs: Remove extra space
31251
31252         * driver.cs: New flag --checked, allows to turn on integer math
31253         checking. 
31254
31255         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31256         Threading.Monitor.Exit 
31257
31258 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31259
31260         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31261         Expression Class to be IndexerAccess.
31262
31263         Notice that Indexer::DoResolve sets the eclass to Value.
31264
31265 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31266
31267         * class.cs (TypeContainer::Emit): Emit code for indexers.
31268
31269         * assign.cs (IAssignMethod): New interface implemented by Indexers
31270         and Properties for handling assignment.
31271
31272         (Assign::Emit): Simplify and reuse code. 
31273
31274         * expression.cs (IndexerAccess, PropertyExpr): Implement
31275         IAssignMethod, clean up old code. 
31276
31277 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31278
31279         * typemanager.cs (ImplementsInterface): New method to determine if a type
31280         implements a given interface. Provides a nice cache too.
31281
31282         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31283         method.
31284
31285         (ConvertReferenceExplicit): Ditto.
31286
31287         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31288         various methods, with correct names etc.
31289
31290         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31291         Operator.UnaryNegation.
31292
31293         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31294         we have a unary plus or minus operator.
31295
31296         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31297         UnaryMinus.
31298
31299         * everywhere : update accordingly.
31300
31301         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31302         respectively.
31303
31304         * class.cs (Method::Define): For the case where we are implementing a method
31305         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31306         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31307
31308 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31309
31310         * interface.cs (FindMembers): Implement to work around S.R.E
31311         lameness.
31312
31313         * typemanager.cs (IsInterfaceType): Implement.
31314
31315         (FindMembers): Update to handle interface types too.
31316
31317         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31318         use IsAssignableFrom as that is not correct - it doesn't work.
31319
31320         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31321         and accordingly override EmitStatement.
31322
31323         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31324         using the correct logic :-)
31325
31326 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31327
31328         * ../errors/cs-11.cs : Add to demonstrate error -11 
31329
31330 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31331
31332         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31333         then pass this as a hint to ResolveLValue.
31334
31335         * expression.cs (FieldExpr): Add Location information
31336
31337         (FieldExpr::LValueResolve): Report assignment to readonly
31338         variable. 
31339
31340         (Expression::ExprClassFromMemberInfo): Pass location information.
31341
31342         (Expression::ResolveLValue): Add new method that resolves an
31343         LValue. 
31344
31345         (Expression::DoResolveLValue): Default invocation calls
31346         DoResolve. 
31347
31348         (Indexers): New class used to keep track of indexers in a given
31349         Type. 
31350
31351         (IStackStore): Renamed from LValue, as it did not really describe
31352         what this did.  Also ResolveLValue is gone from this interface and
31353         now is part of Expression.
31354
31355         (ElementAccess): Depending on the element access type
31356
31357         * typemanager.cs: Add `indexer_name_type' as a Core type
31358         (System.Runtime.CompilerServices.IndexerNameAttribute)
31359
31360         * statement.cs (Goto): Take a location.
31361
31362 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31363
31364         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31365         if two delegates are compatible.
31366
31367         (NewDelegate::DoResolve): Update to take care of the case when
31368         we instantiate a delegate from another delegate.
31369
31370         * typemanager.cs (FindMembers): Don't even try to look up members
31371         of Delegate types for now.
31372
31373 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31374
31375         * delegate.cs (NewDelegate): New class to take care of delegate
31376         instantiation.
31377
31378         * expression.cs (New): Split the delegate related code out into 
31379         the NewDelegate class.
31380
31381         * delegate.cs (DelegateInvocation): New class to handle delegate 
31382         invocation.
31383
31384         * expression.cs (Invocation): Split out delegate related code into
31385         the DelegateInvocation class.
31386
31387 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31388
31389         * expression.cs (New::DoResolve): Implement delegate creation fully
31390         and according to the spec.
31391
31392         (New::DoEmit): Update to handle delegates differently.
31393
31394         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31395         because of which we were printing out arguments in reverse order !
31396
31397         * delegate.cs (VerifyMethod): Implement to check if the given method
31398         matches the delegate.
31399
31400         (FullDelegateDesc): Implement.
31401
31402         (VerifyApplicability): Implement.
31403
31404         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31405         delegate invocations too.
31406
31407         (Invocation::Emit): Ditto.
31408
31409         * ../errors/cs1593.cs : Added.
31410
31411         * ../errors/cs1594.cs : Added.
31412
31413         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31414
31415 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31416
31417         * typemanager.cs (intptr_type): Core type for System.IntPtr
31418
31419         (InitCoreTypes): Update for the same.
31420
31421         (iasyncresult_type, asynccallback_type): Ditto.
31422
31423         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31424         correct.
31425
31426         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31427         too.
31428
31429         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31430         the builders for the 4 members of a delegate type :-)
31431
31432         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31433         type.
31434
31435         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31436
31437         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31438
31439 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31440
31441         * statement.cs (Break::Emit): Implement.   
31442         (Continue::Emit): Implement.
31443
31444         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31445         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31446         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31447         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31448         end loop
31449
31450         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31451         properties that track the label for the current loop (begin of the
31452         loop and end of the loop).
31453
31454 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31455
31456         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31457         use of emitting anything at all.
31458
31459         * class.cs, rootcontext.cs : Get rid of calls to the same.
31460
31461         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31462
31463         (Populate): Define the constructor correctly and set the implementation
31464         attributes.
31465
31466         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31467         have been defined.
31468
31469         (AddDelegateType): Implement.
31470
31471         (IsDelegateType): Implement helper method.
31472
31473         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31474
31475         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31476         and accordingly handle it.
31477
31478         * delegate.cs (Populate): Take TypeContainer argument.
31479         Implement bits to define the Invoke method. However, I still haven't figured out
31480         how to take care of the native int bit :-(
31481
31482         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31483         Qualify the name of the delegate, not its return type !
31484
31485         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31486         conversion.
31487
31488         (StandardConversionExists): Checking for array types turns out to be recursive.
31489
31490         (ConvertReferenceExplicit): Implement array conversion.
31491
31492         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31493
31494 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31495
31496         * cs-parser.jay (delegate_declaration): Store the fully qualified
31497         name as it is a type declaration.
31498
31499         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31500         readonly.
31501
31502         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31503         as TypeContainer::DefineType.
31504
31505         (Populate): Method in which all the definition of the various methods (Invoke)
31506         etc is done.
31507
31508         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31509         see.
31510
31511         (CloseDelegate): Finally creates the delegate.
31512
31513         * class.cs (TypeContainer::DefineType): Update to define delegates.
31514         (Populate, Emit and CloseType): Do the same thing here too.
31515
31516         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31517         delegates in all these operations.
31518
31519 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31520
31521         * expression.cs: LocalTemporary: a new expression used to
31522         reference a temporary that has been created.
31523
31524         * assign.cs: Handle PropertyAccess back here, so that we can
31525         provide the proper semantic access to properties.
31526
31527         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31528         a few more explicit conversions. 
31529
31530         * modifiers.cs: `NEW' modifier maps to HideBySig.
31531
31532         * expression.cs (PropertyExpr): Make this into an
31533         ExpressionStatement, and support the EmitStatement code path. 
31534
31535         Perform get/set error checking, clean up the interface.
31536
31537         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31538         them into toplevel access objects.
31539
31540 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31541
31542         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31543         SRE.
31544
31545         * typemanager.cs: Keep track here of our PropertyBuilders again to
31546         work around lameness in SRE.
31547
31548 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31549
31550         * expression.cs (LValue::LValueResolve): New method in the
31551         interface, used to perform a second resolution pass for LValues. 
31552
31553         (This::DoResolve): Catch the use of this in static methods.
31554
31555         (This::LValueResolve): Implement.
31556
31557         (This::Store): Remove warning, assigning to `this' in structures
31558         is 
31559
31560         (Invocation::Emit): Deal with invocation of
31561         methods on value types.  We need to pass the address to structure
31562         methods rather than the object itself.  (The equivalent code to
31563         emit "this" for structures leaves the entire structure on the
31564         stack instead of a pointer to it). 
31565
31566         (ParameterReference::DoResolve): Compute the real index for the
31567         argument based on whether the method takes or not a `this' pointer
31568         (ie, the method is static).
31569
31570         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31571         value types returned from functions when we need to invoke a
31572         method on the sturcture.
31573
31574
31575 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31576
31577         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31578         defining the type in the Modulebuilder or Typebuilder. This is to take
31579         care of nested types which need to be defined on the TypeBuilder using
31580         DefineNestedMethod.
31581
31582         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31583         methods in RootContext, only ported to be part of TypeContainer.
31584
31585         (TypeContainer::GetInterfaceOrClass): Ditto.
31586
31587         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31588
31589         * interface.cs (Interface::DefineInterface): New method. Does exactly
31590         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31591         too.
31592
31593         (Interface::GetInterfaces): Move from RootContext here and port.
31594
31595         (Interface::GetInterfaceByName): Same here.
31596
31597         * rootcontext.cs (ResolveTree): Re-write.
31598
31599         (PopulateTypes): Re-write.
31600
31601         * class.cs (TypeContainer::Populate): Populate nested types too.
31602         (TypeContainer::Emit): Emit nested members too.
31603
31604         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31605         instead just use the name argument passed in as it is already fully
31606         qualified.
31607
31608         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31609         to TypeContainer mapping to see if a type is user-defined.
31610
31611         * class.cs (TypeContainer::CloseType): Implement. 
31612
31613         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31614         the default constructor.
31615
31616         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31617         twice.
31618
31619         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31620
31621         * interface.cs (CloseType): Create the type here.
31622
31623         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31624         the hierarchy.
31625
31626         Remove all the methods which are now in TypeContainer.
31627
31628 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31629
31630         * delegate.cs (Define): Re-write bits to define the delegate
31631         correctly.
31632
31633 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31634
31635         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31636
31637         * expression.cs (ImplicitReferenceConversion): handle null as well
31638         as a source to convert to any reference type.
31639
31640         * statement.cs (Return): Perform any implicit conversions to
31641         expected return type.  
31642
31643         Validate use of return statement.  
31644
31645         * codegen.cs (EmitContext): Pass the expected return type here.
31646
31647         * class.cs (Method, Constructor, Property): Pass expected return
31648         type to EmitContext.
31649
31650 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31651
31652         * expression.cs: Make DoResolve take an EmitContext instead of a
31653         TypeContainer.
31654
31655         Replaced `l' and `location' for `loc', for consistency.
31656
31657         (Error, Warning): Remove unneeded Tc argument.
31658
31659         * assign.cs, literal.cs, constant.cs: Update to new calling
31660         convention. 
31661
31662         * codegen.cs: EmitContext now contains a flag indicating whether
31663         code is being generated in a static method or not.
31664
31665         * cs-parser.jay: DecomposeQI, new function that replaces the old
31666         QualifiedIdentifier.  Now we always decompose the assembled
31667         strings from qualified_identifier productions into a group of
31668         memberaccesses.
31669
31670 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31671
31672         * rootcontext.cs: Deal with field-less struct types correctly now
31673         by passing the size option to Define Type.
31674
31675         * class.cs: Removed hack that created one static field. 
31676
31677 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31678
31679         * statement.cs: Moved most of the code generation here. 
31680
31681 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31682
31683         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31684         seem very right.
31685
31686         (ElementAccess): Remove useless bits for now - keep checks as the spec
31687         says.
31688
31689 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31690
31691         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31692         and start performing checks according to the spec.
31693
31694 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31695
31696         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31697         rank_specifiers instead.
31698
31699         (rank_specifiers): Change the order in which the rank specifiers are stored
31700
31701         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31702
31703         * expression.cs (ElementAccess): Implement the LValue interface too.
31704
31705 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31706
31707         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31708         except that user defined conversions are not included.
31709
31710         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31711         perform the conversion of the return type, if necessary.
31712
31713         (New::DoResolve): Check whether we are creating an array or an object
31714         and accordingly do the needful.
31715
31716         (New::Emit): Same here.
31717
31718         (New::DoResolve): Implement guts of array creation.
31719
31720         (New::FormLookupType): Helper function.
31721
31722 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31723
31724         * codegen.cs: Removed most of the code generation here, and move the
31725         corresponding code generation bits to the statement classes. 
31726
31727         Added support for try/catch/finalize and throw.
31728
31729         * cs-parser.jay: Added support for try/catch/finalize.
31730
31731         * class.cs: Catch static methods having the flags override,
31732         virtual or abstract.
31733
31734         * expression.cs (UserCast): This user cast was not really doing
31735         what it was supposed to do.  Which is to be born in fully resolved
31736         state.  Parts of the resolution were being performed at Emit time! 
31737
31738         Fixed this code.
31739
31740 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31741
31742         * expression.cs: Implicity convert the result from UserCast.
31743
31744 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31745
31746         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31747         prevented it from working correctly. 
31748
31749         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31750         merely ConvertImplicit.
31751
31752 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31753
31754         * typemanager.cs: Make the LookupTypeContainer function static,
31755         and not per-instance.  
31756
31757         * class.cs: Make static FindMembers (the one that takes a Type
31758         argument). 
31759
31760         * codegen.cs: Add EmitForeach here.
31761
31762         * cs-parser.jay: Make foreach a toplevel object instead of the
31763         inline expansion, as we need to perform semantic analysis on it. 
31764
31765 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31766
31767         * expression.cs (Expression::ImplicitUserConversion): Rename to
31768         UserDefinedConversion.
31769
31770         (Expression::UserDefinedConversion): Take an extra argument specifying 
31771         whether we look for explicit user conversions too.
31772
31773         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31774
31775         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31776
31777         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31778         with the appropriate arguments.
31779
31780         * cs-parser.jay (cast_expression): Record location too.
31781
31782         * expression.cs (Cast): Record location info.
31783
31784         (Expression::ConvertExplicit): Take location argument.
31785
31786         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31787         to determine if we are doing explicit conversions.
31788
31789         (UserCast::Emit): Update accordingly.
31790
31791         (Expression::ConvertExplicit): Report an error if everything fails.
31792
31793         * ../errors/cs0030.cs : Add.
31794
31795 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31796
31797         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31798         virtual and newslot bits. 
31799
31800         * class.cs (TypeContainer::RegisterRequiredImplementations):
31801         Record methods we need.
31802
31803         (TypeContainer::MakeKey): Helper function to make keys for
31804         MethodBases, since the Methodbase key is useless.
31805
31806         (TypeContainer::Populate): Call RegisterRequiredImplementations
31807         before defining the methods.   
31808
31809         Create a mapping for method_builders_to_methods ahead of time
31810         instead of inside a tight loop.
31811
31812         (::RequireMethods):  Accept an object as the data to set into the
31813         hashtable so we can report interface vs abstract method mismatch.
31814
31815 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31816
31817         * report.cs: Make all of it static.
31818
31819         * rootcontext.cs: Drop object_type and value_type computations, as
31820         we have those in the TypeManager anyways.
31821
31822         Drop report instance variable too, now it is a global.
31823
31824         * driver.cs: Use try/catch on command line handling.
31825
31826         Add --probe option to debug the error reporting system with a test
31827         suite. 
31828
31829         * report.cs: Add support for exiting program when a probe
31830         condition is reached.
31831
31832 2001-10-03  Ravi Pratap  <ravi@ximian.com>
31833
31834         * expression.cs (Binary::DoNumericPromotions): Fix the case when
31835         we do a forcible conversion regardless of type, to check if 
31836         ForceConversion returns a null.
31837
31838         (Binary::error19): Use location to report error.
31839
31840         (Unary::error23): Use location here too.
31841
31842         * ../errors/cs0019.cs : Check in.
31843
31844         * ../errors/cs0023.cs : Check in.
31845
31846         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
31847         case of a non-null MethodInfo object with a length of 0 !
31848
31849         (Binary::ResolveOperator): Flag error if overload resolution fails to find
31850         an applicable member - according to the spec :-)
31851         Also fix logic to find members in base types.
31852
31853         (Unary::ResolveOperator): Same here.
31854
31855         (Unary::report23): Change name to error23 and make first argument a TypeContainer
31856         as I was getting thoroughly confused between this and error19 :-)
31857
31858         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
31859         (::FindMostEncompassedType): Implement.
31860         (::FindMostEncompassingType): Implement.
31861         (::StandardConversionExists): Implement.
31862
31863         (UserImplicitCast): Re-vamp. We now need info about most specific
31864         source and target types so that we can do the necessary conversions.
31865
31866         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
31867         mathematical union with no duplicates.
31868
31869 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31870
31871         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
31872         in order from base classes to child classes, so that we can in
31873         child classes look up in our parent for method names and
31874         attributes (required for handling abstract, virtual, new, override
31875         constructs: we need to instrospect our base class, and if we dont
31876         populate the classes in order, the introspection might be
31877         incorrect.  For example, a method could query its parent before
31878         the parent has any methods and would determine that the parent has
31879         no abstract methods (while it could have had them)).
31880
31881         (RootContext::CreateType): Record the order in which we define the
31882         classes.
31883
31884 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
31885
31886         * class.cs (TypeContainer::Populate): Also method definitions can
31887         fail now, keep track of this.
31888
31889         (TypeContainer::FindMembers): Implement support for
31890         DeclaredOnly/noDeclaredOnly flag.
31891
31892         (Constructor::Emit) Return the ConstructorBuilder.
31893
31894         (Method::Emit) Return the MethodBuilder. 
31895         Check for abstract or virtual methods to be public.
31896
31897         * rootcontext.cs (RootContext::CreateType): Register all the
31898         abstract methods required for the class to be complete and the
31899         interface methods that must be implemented. 
31900
31901         * cs-parser.jay: Report error 501 (method requires body if it is
31902         not marked abstract or extern).
31903
31904         * expression.cs (TypeOf::Emit): Implement.
31905
31906         * typemanager.cs: runtime_handle_type, new global type.
31907
31908         * class.cs (Property::Emit): Generate code for properties.
31909
31910 2001-10-02  Ravi Pratap  <ravi@ximian.com>
31911
31912         * expression.cs (Unary::ResolveOperator): Find operators on base type
31913         too - we now conform exactly to the spec.
31914
31915         (Binary::ResolveOperator): Same here.
31916
31917         * class.cs (Operator::Define): Fix minor quirk in the tests.
31918
31919         * ../errors/cs0215.cs : Added.
31920
31921         * ../errors/cs0556.cs : Added.
31922
31923         * ../errors/cs0555.cs : Added.
31924
31925 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31926
31927         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
31928         single integer which is really efficient
31929
31930 2001-10-01  Ravi Pratap  <ravi@ximian.com>
31931
31932         *  expression.cs (Expression::ImplicitUserConversion): Use location
31933         even in the case when we are examining True operators.
31934  
31935         * class.cs (Operator::Define): Perform extensive checks to conform
31936         with the rules for operator overloading in the spec.
31937
31938         * expression.cs (Expression::ImplicitReferenceConversion): Implement
31939         some of the other conversions mentioned in the spec.
31940
31941         * typemanager.cs (array_type): New static member for the System.Array built-in
31942         type.
31943
31944         (cloneable_interface): For System.ICloneable interface.
31945
31946         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
31947         we start resolving the tree and populating types.
31948
31949         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
31950  
31951 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31952
31953         * expression.cs (Expression::ExprClassFromMemberInfo,
31954         Expression::Literalize): Create literal expressions from
31955         FieldInfos which are literals.
31956
31957         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
31958         type casts, because they were wrong.  The test suite in tests
31959         caught these ones.
31960
31961         (ImplicitNumericConversion): ushort to ulong requires a widening
31962         cast. 
31963
31964         Int32 constant to long requires widening cast as well.
31965
31966         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
31967         for integers because the type on the stack is not i4.
31968
31969 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
31970
31971         * expression.cs (report118): require location argument. 
31972
31973         * parameter.cs: Do not dereference potential null value.
31974
31975         * class.cs: Catch methods that lack the `new' keyword when
31976         overriding a name.  Report warnings when `new' is used without
31977         anything being there to override.
31978
31979         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
31980
31981         * class.cs: Only add constructor to hashtable if it is non-null
31982         (as now constructors can fail on define).
31983
31984         (TypeManager, Class, Struct): Take location arguments.
31985
31986         Catch field instance initialization in structs as errors.
31987
31988         accepting_filter: a new filter for FindMembers that is static so
31989         that we dont create an instance per invocation.
31990
31991         (Constructor::Define): Catch errors where a struct constructor is
31992         parameterless 
31993
31994         * cs-parser.jay: Pass location information for various new
31995         constructs. 
31996
31997         * delegate.cs (Delegate): take a location argument.
31998
31999         * driver.cs: Do not call EmitCode if there were problesm in the
32000         Definition of the types, as many Builders wont be there. 
32001
32002         * decl.cs (Decl::Decl): Require a location argument.
32003
32004         * cs-tokenizer.cs: Handle properly hex constants that can not fit
32005         into integers, and find the most appropiate integer for it.
32006
32007         * literal.cs: Implement ULongLiteral.
32008
32009         * rootcontext.cs: Provide better information about the location of
32010         failure when CreateType fails.
32011
32012 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
32013
32014         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
32015         as well.
32016
32017         * expression.cs (Binary::CheckShiftArguments): Add missing type
32018         computation.
32019         (Binary::ResolveOperator): Add type to the logical and and logical
32020         or, Bitwise And/Or and Exclusive Or code paths, it was missing
32021         before.
32022
32023         (Binary::DoNumericPromotions): In the case where either argument
32024         is ulong (and most signed types combined with ulong cause an
32025         error) perform implicit integer constant conversions as well.
32026
32027 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32028
32029         * expression.cs (UserImplicitCast): Method should always be
32030         non-null. 
32031         (Invocation::BetterConversion): Simplified test for IntLiteral.
32032
32033         (Expression::ImplicitNumericConversion): Split this routine out.
32034         Put the code that performs implicit constant integer conversions
32035         here. 
32036
32037         (Expression::Resolve): Become a wrapper around DoResolve so we can
32038         check eclass and type being set after resolve.
32039
32040         (Invocation::Badness): Remove this dead function
32041
32042         (Binary::ResolveOperator): Do not compute the expensive argumnets
32043         unless we have a union for it.
32044
32045         (Probe::Emit): Is needs to do an isinst and then
32046         compare against null.
32047
32048         (::CanConvert): Added Location argument.  If the Location argument
32049         is null (Location.Null), then we do not report errors.  This is
32050         used by the `probe' mechanism of the Explicit conversion.  We do
32051         not want to generate an error for something that the user
32052         explicitly requested to be casted.  But the pipeline for an
32053         explicit cast first tests for potential implicit casts.
32054
32055         So for now, if the Location is null, it means `Probe only' to
32056         avoid adding another argument.   Might have to revise this
32057         strategy later.
32058
32059         (ClassCast): New class used to type cast objects into arbitrary
32060         classes (used in Explicit Reference Conversions).
32061
32062         Implement `as' as well.
32063
32064         Reverted all the patches from Ravi below: they were broken:
32065
32066                 * The use of `level' as a mechanism to stop recursive
32067                   invocations is wrong.  That was there just to catch the
32068                   bug with a strack trace but not as a way of addressing
32069                   the problem.
32070
32071                   To fix the problem we have to *understand* what is going
32072                   on and the interactions and come up with a plan, not
32073                   just get things going.
32074
32075                 * The use of the type conversion cache that I proposed
32076                   last night had an open topic: How does this work across
32077                   protection domains.  A user defined conversion might not
32078                   be public in the location where we are applying the
32079                   conversion, a different conversion might be selected
32080                   (ie, private A->B (better) but public B->A (worse),
32081                   inside A, A->B applies, but outside it, B->A will
32082                   apply).
32083
32084                 * On top of that (ie, even if the above is solved),
32085                   conversions in a cache need to be abstract.  Ie, `To
32086                   convert from an Int to a Short use an OpcodeCast', not
32087                   `To convert from an Int to a Short use the OpcodeCast on
32088                   the variable 5' (which is what this patch was doing).
32089
32090 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32091
32092         * expression.cs (Invocation::ConversionExists): Re-write to use
32093         the conversion cache
32094
32095         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
32096         cache all conversions done, not just user-defined ones.
32097
32098         (Invocation::BetterConversion): The real culprit. Use ConversionExists
32099         to determine if a conversion exists instead of acutually trying to 
32100         perform the conversion. It's faster too.
32101
32102         (Expression::ConvertExplicit): Modify to use ConversionExists to check
32103         and only then attempt the implicit conversion.
32104
32105 2001-09-28  Ravi Pratap  <ravi@ximian.com>
32106
32107         * expression.cs (ConvertImplicit): Use a cache for conversions
32108         already found. Check level of recursion and bail out if necessary.
32109
32110 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
32111
32112         * typemanager.cs (string_concat_string_string, string_concat_object_object):
32113         Export standard methods that we expect for string operations.
32114
32115         * statement.cs (Block::UsageWarning): Track usage of variables and
32116         report the errors for not used variables.
32117
32118         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
32119         operator. 
32120
32121 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32122
32123         * codegen.cs: remove unnneded code 
32124
32125         * expression.cs: Removed BuiltinTypeAccess class
32126
32127         Fix the order in which implicit conversions are
32128         done.  
32129
32130         The previous fixed dropped support for boxed conversions (adding a
32131         test to the test suite now)
32132
32133         (UserImplicitCast::CanConvert): Remove test for source being null,
32134         that code is broken.  We should not feed a null to begin with, if
32135         we do, then we should track the bug where the problem originates
32136         and not try to cover it up here.
32137
32138         Return a resolved expression of type UserImplicitCast on success
32139         rather than true/false.  Ravi: this is what I was talking about,
32140         the pattern is to use a static method as a "constructor" for
32141         objects. 
32142
32143         Also, do not create arguments until the very last minute,
32144         otherwise we always create the arguments even for lookups that
32145         will never be performed. 
32146
32147         (UserImplicitCast::Resolve): Eliminate, objects of type
32148         UserImplicitCast are born in a fully resolved state. 
32149
32150         * typemanager.cs (InitCoreTypes): Init also value_type
32151         (System.ValueType). 
32152
32153         * expression.cs (Cast::Resolve): First resolve the child expression.
32154
32155         (LValue): Add new method AddressOf to be used by
32156         the `&' operator.  
32157
32158         Change the argument of Store to take an EmitContext instead of an
32159         ILGenerator, because things like FieldExpr need to be able to call
32160         their children expression to generate the instance code. 
32161
32162         (Expression::Error, Expression::Warning): Sugar functions for
32163         reporting errors.
32164
32165         (Expression::MemberLookup): Accept a TypeContainer instead of a
32166         Report as the first argument.
32167
32168         (Expression::ResolvePrimary): Killed.  I still want to improve
32169         this as currently the code is just not right.
32170
32171         (Expression::ResolveMemberAccess): Simplify, but it is still
32172         wrong. 
32173
32174         (Unary::Resolve): Catch errors in AddressOf operators.
32175
32176         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
32177         index to a byte for the short-version, or the compiler will choose
32178         the wrong Emit call, which generates the wrong data.
32179
32180         (ParameterReference::Emit, ::Store): same.
32181
32182         (FieldExpr::AddressOf): Implement.
32183
32184         * typemanager.cs: TypeManager: made public variable instead of
32185         property.
32186
32187         * driver.cs: document --fatal.
32188
32189         * report.cs (ErrorMessage, WarningMessage): new names for the old
32190         Error and Warning classes.
32191
32192         * cs-parser.jay (member_access): Turn built-in access to types
32193         into a normal simplename
32194
32195 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32196
32197         * expression.cs (Invocation::BetterConversion): Fix to cope
32198         with q being null, since this was introducing a bug.
32199
32200         * expression.cs (ConvertImplicit): Do built-in conversions first.
32201
32202 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32203
32204         * expression.cs (UserImplicitCast::Resolve): Fix bug.
32205
32206 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32207
32208         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
32209         I had introduced long ago (what's new ?).
32210
32211         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
32212         the work of all the checking. 
32213         (ConvertImplicit): Call CanConvert and only then create object if necessary.
32214         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
32215
32216         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32217         that is the right way. 
32218
32219         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32220         overloading resolution. Use everywhere instead of cutting and pasting code.
32221
32222         (Binary::ResolveOperator): Use MakeUnionSet.
32223
32224         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32225         we have to convert to bool types. Not complete yet.
32226
32227 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32228
32229         * typemanager.cs (TypeManager::CSharpName): support ushort.
32230
32231         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32232         to provide an expression that performsn an implicit constant int
32233         conversion (section 6.1.6).
32234         (Expression::ConvertImplicitRequired): Reworked to include
32235         implicit constant expression conversions.
32236
32237         (Expression::ConvertNumericExplicit): Finished.
32238
32239         (Invocation::Emit): If InstanceExpression is null, then it means
32240         that we perform a call on this.
32241
32242 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32243
32244         * expression.cs (Unary::Emit): Remove some dead code.
32245         (Probe): Implement Resolve and Emit for `is'.
32246         (Expression::ConvertImplicitRequired): Attempt to do constant
32247         expression conversions here.  Maybe should be moved to
32248         ConvertImplicit, but I am not sure.
32249         (Expression::ImplicitLongConstantConversionPossible,
32250         Expression::ImplicitIntConstantConversionPossible): New functions
32251         that tell whether is it possible to apply an implicit constant
32252         expression conversion.
32253
32254         (ConvertNumericExplicit): Started work on explicit numeric
32255         conversions.
32256
32257         * cs-parser.jay: Update operator constants.
32258
32259         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32260         (Parameters::GetSignature): Hook up VerifyArgs here.
32261         (Parameters::VerifyArgs): Verifies that no two arguments have the
32262         same name. 
32263
32264         * class.cs (Operator): Update the operator names to reflect the
32265         ones that the spec expects (as we are just stringizing the
32266         operator names).
32267
32268         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32269         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32270         previous usage did only work for our methods.
32271         (Expression::ConvertImplicit): Handle decimal implicit numeric
32272         conversions as well.
32273         (Expression::InternalTypeConstructor): Used to invoke constructors
32274         on internal types for default promotions.
32275
32276         (Unary::Emit): Implement special handling for the pre/post
32277         increment/decrement for overloaded operators, as they need to have
32278         the same semantics as the other operators.
32279
32280         (Binary::ResolveOperator): ditto.
32281         (Invocation::ConversionExists): ditto.
32282         (UserImplicitCast::Resolve): ditto.
32283
32284 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32285
32286         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32287         operator, return after emitting body. Regression tests pass again !
32288
32289         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32290         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32291         (Invocation::OverloadResolve): Ditto.
32292         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32293
32294         * everywhere : update calls to the above methods accordingly.
32295
32296 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32297
32298         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32299
32300         * expression.cs (ExpressionStatement): New base class used for
32301         expressions that can appear in statements, so that we can provide
32302         an alternate path to generate expression that do not leave a value
32303         on the stack.
32304
32305         (Expression::Emit, and all the derivatives): We no longer return
32306         whether a value is left on the stack or not.  Every expression
32307         after being emitted leaves a single value on the stack.
32308
32309         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32310         facilties of ExpressionStatement if possible.
32311
32312         * cs-parser.jay: Update statement_expression.
32313
32314 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32315
32316         * driver.cs: Change the wording of message
32317
32318 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32319
32320         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32321         the type of the expression to the return type of the method if
32322         we have an overloaded operator match ! The regression tests pass again !
32323         (Unary::ResolveOperator): Ditto.
32324
32325         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32326         to find "op_Implicit", not "implicit" ;-)
32327         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32328         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32329
32330         * everywhere : Correct calls to the above accordingly.
32331
32332         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32333         (ConvertImplicit): Do user-defined conversion if it exists.
32334
32335 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32336
32337         * assign.cs: track location.
32338         (Resolve): Use implicit conversions on assignment.
32339
32340         * literal.cs: Oops.  Not good, Emit of short access values should
32341         pass (Bytes) or the wrong argument will be selected.
32342
32343         * expression.cs (Unary::Emit): Emit code for -expr.
32344
32345         (Unary::ResolveOperator): Handle `Substract' for non-constants
32346         (substract from zero from the non-constants).
32347         Deal with Doubles as well. 
32348
32349         (Expression::ConvertImplicitRequired): New routine that reports an
32350         error if no implicit conversion exists. 
32351
32352         (Invocation::OverloadResolve): Store the converted implicit
32353         expressions if we make them
32354
32355 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32356
32357         * class.cs (ConstructorInitializer): Take a Location argument.
32358         (ConstructorBaseInitializer): Same here.
32359         (ConstructorThisInitializer): Same here.
32360
32361         * cs-parser.jay : Update all calls accordingly.
32362
32363         * expression.cs (Unary, Binary, New): Take location argument.
32364         Update accordingly everywhere.
32365
32366         * cs-parser.jay : Update all calls to the above to take a location
32367         argument.
32368
32369         * class.cs : Ditto.
32370
32371 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32372
32373         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32374         (Invocation::BetterConversion): Same here
32375         (Invocation::ConversionExists): Ditto.
32376
32377         (Invocation::ConversionExists): Implement.
32378
32379 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32380
32381         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32382         Also take an additional TypeContainer argument.
32383
32384         * All over : Pass in TypeContainer as argument to OverloadResolve.
32385
32386         * typemanager.cs (CSharpName): Update to check for the string type and return
32387         that too.
32388
32389         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32390         a given method.
32391
32392 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32393
32394         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32395         (Invocation::BetterFunction): Implement.
32396         (Invocation::BetterConversion): Implement.
32397         (Invocation::ConversionExists): Skeleton, no implementation yet.
32398
32399         Okay, things work fine !
32400
32401 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32402
32403         * typemanager.cs: declare and load enum_type, delegate_type and
32404         void_type. 
32405
32406         * expression.cs (Expression::Emit): Now emit returns a value that
32407         tells whether a value is left on the stack or not.  This strategy
32408         might be reveted tomorrow with a mechanism that would address
32409         multiple assignments.
32410         (Expression::report118): Utility routine to report mismatches on
32411         the ExprClass.
32412
32413         (Unary::Report23): Report impossible type/operator combination
32414         utility function.
32415
32416         (Unary::IsIncrementableNumber): Whether the type can be
32417         incremented or decremented with add.
32418         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32419         complemented. 
32420         (Unary::ResolveOperator): Implement ++, !, ~,
32421
32422         (Invocation::Emit): Deal with new Emit convetion.
32423
32424         * All Expression derivatives: Updated their Emit method to return
32425         whether they leave values on the stack or not.
32426
32427         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32428         stack for expressions that are statements. 
32429
32430 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32431
32432         * expression.cs (LValue): New interface.  Must be implemented by
32433         LValue objects.
32434         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32435         LValue interface.
32436
32437         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32438         interface for generating code, simplifies the code.
32439
32440 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32441
32442         * expression.cs (everywhere): Comment out return statements in ::Resolve
32443         methods to avoid the warnings.
32444
32445 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32446
32447         * driver.cs (parse): Report error 2001 if we can not open the
32448         source file.
32449
32450         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32451         not resolve it.
32452
32453         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32454         object. 
32455
32456         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32457         otherwise nested blocks end up with the same index.
32458
32459         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32460
32461         * expression.cs:  Instead of having FIXMEs in the Resolve
32462         functions, throw exceptions so it is obvious that we are facing a
32463         bug. 
32464
32465         * cs-parser.jay (invocation_expression): Pass Location information.
32466
32467         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32468         Use a basename for those routines because .NET does not like paths
32469         on them. 
32470
32471         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32472         already defined.
32473
32474 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32475
32476         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32477         are loading the correct data types (throws an exception if not).
32478         (TypeManager::InitCoreTypes): Use CoreLookupType
32479
32480         * expression.cs (Unary::ResolveOperator): return the child
32481         expression for expressions which are just +expr.
32482         (Unary::ResolveOperator): Return negative literals for -LITERAL
32483         expressions (otherwise they are Unary {Literal}).
32484         (Invocation::Badness): Take into account `Implicit constant
32485         expression conversions'.
32486
32487         * literal.cs (LongLiteral): Implement long literal class.
32488         (IntLiteral): export the `Value' of the intliteral. 
32489
32490 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32491
32492         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32493
32494         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32495         instead of 'Operator'
32496
32497         * expression.cs (Binary::ResolveOperator): Update accordingly.
32498         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32499         and 'Minus'
32500
32501         * cs-parser.jay (unary_expression): Update to use the new names.
32502
32503         * gen-treedump.cs (GetUnary): Same here.
32504
32505         * expression.cs (Unary::Resolve): Implement.
32506         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32507         operators are found instead of making noise ;-)
32508         (Unary::ResolveOperator): New method to do precisely the same thing which
32509         Binary::ResolveOperator does for Binary expressions.
32510         (Unary.method, .Arguments): Add.
32511         (Unary::OperName): Implement.   
32512         (Unary::ForceConversion): Copy and Paste !
32513
32514         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32515         a unary operator.
32516
32517         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32518         for the inbuilt operators. Only overloading works for now ;-)
32519
32520 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32521
32522         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32523         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32524
32525         * expression.cs (This::Emit): Implement. 
32526         (This::Resolve): Implement.
32527         (TypeOf:Resolve): Implement.
32528         (Expression::ResolveSimpleName): Add an implicit this to instance
32529         field references. 
32530         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32531         Bind instance variable to Field expressions.
32532         (FieldExpr::Instance): New field used to track the expression that
32533         represents the object instance.
32534         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32535         binding 
32536         (FieldExpr::Emit): Implement.
32537
32538         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32539         the last instruction contains a return opcode to avoid generating
32540         the last `ret' instruction (this generates correct code, and it is
32541         nice to pass the peverify output).
32542
32543         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32544         initializer for static and instance variables.
32545         (Constructor::Emit): Allow initializer to be null in the case of
32546         static constructors.  Only emit initializer for instance
32547         constructors. 
32548
32549         (TypeContainer::FindMembers): Return a null array if there are no
32550         matches.
32551
32552         Also fix the code for the MemberTypes.Method branch, as it was not
32553         scanning that for operators (or tried to access null variables before).
32554
32555         * assign.cs (Assign::Emit): Handle instance and static fields. 
32556
32557         * TODO: Updated.
32558
32559         * driver.cs: Stop compilation if there are parse errors.
32560
32561         * cs-parser.jay (constructor_declaration): Provide default base
32562         initializer for non-static constructors.
32563         (constructor_declarator): Do not provide a default base
32564         initializers if none was specified.
32565         Catch the fact that constructors should not have parameters.
32566
32567         * class.cs: Do not emit parent class initializers for static
32568         constructors, that should be flagged as an error.
32569
32570 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32571
32572         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32573         Move back code into TypeContainer::Populate.
32574
32575 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32576
32577         * class.cs (TypeContainer::AddConstructor): Fix the check to
32578         compare against Name, not Basename. 
32579         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32580
32581         * cs-parser.jay : Update accordingly.
32582
32583         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32584         for methods, don't forget to look into the operators too.
32585         (RegisterMethodBuilder): Helper method to take care of this for
32586         methods, constructors and operators.
32587         (Operator::Define): Completely revamp.
32588         (Operator.OperatorMethod, MethodName): New fields.
32589         (TypeContainer::Populate): Move the registering of builders into
32590         RegisterMethodBuilder.
32591         (Operator::Emit): Re-write.
32592
32593         * expression.cs (Binary::Emit): Comment out code path to emit method
32594         invocation stuff for the case when we have a user defined operator. I am
32595         just not able to get it right !
32596
32597 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32598
32599         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32600         argument. 
32601
32602         (Expression::MemberLookup): Provide a version that allows to
32603         specify the MemberTypes and BindingFlags. 
32604
32605         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32606         so it was not fetching variable information from outer blocks.
32607
32608         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32609         Beforefieldinit as it was buggy.
32610
32611         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32612         that Ravi put here.  
32613
32614         * class.cs (Constructor::Emit): Only emit if block is not null.
32615         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32616         deal with this by semantically definining it as if the user had
32617         done it.
32618
32619         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32620         constructors as we now "emit" them at a higher level.
32621
32622         (TypeContainer::DefineDefaultConstructor): Used to define the
32623         default constructors if none was provided.
32624
32625         (ConstructorInitializer): Add methods Resolve and Emit. 
32626
32627         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32628
32629 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32630
32631         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32632         the default constructor builder with our hashtable for methodbuilders
32633         to methodcores.
32634
32635         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32636         and argument_count is 0 in which case we have a match.
32637         (Binary::ResolveOperator): More null checking and miscellaneous coding
32638         style cleanup.
32639
32640 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32641
32642         * rootcontext.cs (IsNameSpace): Compare against null.
32643
32644         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32645
32646         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32647         and Unary::Operator.
32648
32649         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32650         accordingly.
32651
32652         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32653         we have overloaded operators.
32654         (Binary::ResolveOperator): Implement the part which does the operator overload
32655         resolution.
32656
32657         * class.cs (Operator::Emit): Implement.
32658         (TypeContainer::Emit): Emit the operators we have too.
32659
32660         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32661         the case when we have a user-defined operator.
32662
32663 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32664
32665         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32666
32667 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32668
32669         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32670         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32671         (Constructor::Emit): Implement.
32672         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32673         if we have no work to do. 
32674         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32675         Emit method.
32676
32677         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32678         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32679
32680         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32681         of parent.parent.
32682
32683 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32684
32685         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32686         in the source.
32687         (Tree::RecordNamespace): Method to do what the name says ;-)
32688         (Tree::Namespaces): Property to get at the namespaces hashtable.
32689
32690         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32691         keep track.
32692
32693         * rootcontext.cs (IsNamespace): Fixed it :-)
32694
32695 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32696
32697         * class.cs (TypeContainer::FindMembers): Add support for
32698         constructors. 
32699         (MethodCore): New class that encapsulates both the shared aspects
32700         of a Constructor and a Method.  
32701         (Method, Constructor): Factored pieces into MethodCore.
32702
32703         * driver.cs: Added --fatal which makes errors throw exceptions.
32704         Load System assembly as well as part of the standard library.
32705
32706         * report.cs: Allow throwing exceptions on errors for debugging.
32707
32708         * modifiers.cs: Do not use `parent', instead use the real type
32709         container to evaluate permission settings.
32710
32711         * class.cs: Put Ravi's patch back in.  He is right, and we will
32712         have to cope with the
32713
32714 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32715
32716         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32717         FamORAssem, not FamANDAssem.
32718
32719 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32720
32721         * driver.cs: Added --parse option that only parses its input files
32722         and terminates.
32723
32724         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32725         incorrect.  IsTopLevel is not used to tell whether an object is
32726         root_types or not (that can be achieved by testing this ==
32727         root_types).  But to see if this is a top-level *class* (not
32728         necessarly our "toplevel" container). 
32729
32730 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32731
32732         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32733         parent instead of a direct call to GetType.
32734
32735 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32736
32737         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32738         Modifiers.TypeAttr. This should just be a call to that method.
32739
32740         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32741         object so that we can determine if we are top-level or not.
32742
32743         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32744         TypeContainer too.
32745
32746         * enum.cs (Enum::Define): Ditto.
32747
32748         * modifiers.cs (FieldAttr): Re-write.
32749
32750         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32751         (TypeContainer::HaveStaticConstructor): New property to provide access
32752         to precisely that info.
32753
32754         * modifiers.cs (MethodAttr): Re-write.
32755         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32756
32757         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32758         of top-level types as claimed.
32759
32760 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32761
32762         * expression.cs (MemberLookup): Fruitless attempt to lookup
32763         constructors.  Maybe I need to emit default constructors?  That
32764         might be it (currently .NET emits this for me automatically).
32765         (Invocation::OverloadResolve): Cope with Arguments == null.
32766         (Invocation::EmitArguments): new function, shared by the new
32767         constructor and us.
32768         (Invocation::Emit): Handle static and instance methods.  Emit
32769         proper call instruction for virtual or non-virtual invocations.
32770         (New::Emit): Implement.
32771         (New::Resolve): Implement.
32772         (MemberAccess:Resolve): Implement.
32773         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32774         to track instances.
32775         (FieldExpr::Resolve): Set type.
32776
32777         * support.cs: Handle empty arguments.
32778                 
32779         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32780         SimpleLookup): Auxiliary routines to help parse a qualifier
32781         identifier.  
32782
32783         Update qualifier_identifier rule.
32784
32785         * codegen.cs: Removed debugging messages.
32786
32787         * class.cs: Make this a global thing, this acts just as a "key" to
32788         objects that we might have around.
32789
32790         (Populate): Only initialize method_builders_to_methods once.
32791
32792         * expression.cs (PropertyExpr): Initialize type from the
32793         PropertyType. 
32794
32795         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32796         Resolve pattern.  Attempt to implicitly convert value to boolean.
32797         Emit code.
32798
32799         * expression.cs: Set the type for the int32/int32 argument case.
32800         (Binary::ResolveOperator): Set the return type to boolean for
32801         comparission operators
32802
32803         * typemanager.cs: Remove debugging print code.
32804
32805         (Invocation::Resolve): resolve type.
32806
32807         * class.cs: Allocate a MemberInfo of the correct size, as the code
32808         elsewhere depends on the test to reflect the correct contents.
32809
32810         (Method::) Keep track of parameters, due to System.Reflection holes
32811
32812         (TypeContainer::Populate): Keep track of MethodBuilders to Method
32813         mapping here.
32814
32815         (TypeContainer::FindMembers): Use ArrayList and then copy an array
32816         of the exact size and return that.
32817
32818         (Class::LookupMethodByBuilder): New function that maps
32819         MethodBuilders to its methods.  Required to locate the information
32820         on methods because System.Reflection bit us again.
32821
32822         * support.cs: New file, contains an interface ParameterData and
32823         two implementations: ReflectionParameters and InternalParameters
32824         used to access Parameter information.  We will need to grow this
32825         as required.
32826
32827         * expression.cs (Invocation::GetParameterData): implement a cache
32828         and a wrapper around the ParameterData creation for methods. 
32829         (Invocation::OverloadResolve): Use new code.
32830
32831 2001-09-13  Ravi Pratap  <ravi@ximian.com>
32832
32833         * class.cs (TypeContainer::EmitField): Remove and move into 
32834         (Field::Define): here and modify accordingly.
32835         (Field.FieldBuilder): New member.
32836         (TypeContainer::Populate): Update accordingly.
32837         (TypeContainer::FindMembers): Implement.
32838
32839 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32840
32841         * statement.cs: (VariableInfo::VariableType): New field to be
32842         initialized with the full type once it is resolved. 
32843
32844 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
32845
32846         * parameter.cs (GetParameterInfo): Use a type cache to compute
32847         things only once, and to reuse this information
32848
32849         * expression.cs (LocalVariableReference::Emit): Implement.
32850         (OpcodeCast::Emit): fix.
32851
32852         (ParameterReference::Resolve): Implement.
32853         (ParameterReference::Emit): Implement.
32854
32855         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
32856         that are expressions need to stay as Expressions.
32857
32858         * typemanager.cs (CSharpName): Returns the C# name of a type if
32859         possible. 
32860
32861         * expression.cs (Expression::ConvertImplicit): New function that
32862         implements implicit type conversions.
32863
32864         (Expression::ImplicitReferenceConversion): Implements implicit
32865         reference conversions.
32866
32867         (EmptyCast): New type for transparent casts.
32868
32869         (OpcodeCast): New type for casts of types that are performed with
32870         a sequence of bytecodes.
32871
32872         (BoxedCast): New type used for casting value types into reference
32873         types.  Emits a box opcode.
32874
32875         (Binary::DoNumericPromotions): Implements numeric promotions of
32876         and computation of the Binary::Type.
32877
32878         (Binary::EmitBranchable): Optimization.
32879
32880         (Binary::Emit): Implement code emission for expressions.
32881
32882         * typemanager.cs (TypeManager): Added two new core types: sbyte
32883         and byte.
32884
32885 2001-09-12  Ravi Pratap  <ravi@ximian.com>
32886
32887         * class.cs (TypeContainer::FindMembers): Method which does exactly
32888         what Type.FindMembers does, only we don't have to use reflection. No
32889         implementation yet.
32890
32891         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
32892         typecontainer objects as we need to get at them.
32893         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
32894
32895         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
32896         typecontainer object.
32897
32898         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
32899         of just a Report object.
32900
32901 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32902
32903         * class.cs (Event::Define): Go back to using the prefixes "add_" and
32904         "remove_"
32905         (TypeContainer::Populate): Now define the delegates of the type too.
32906         (TypeContainer.Delegates): Property to access the list of delegates defined
32907         in the type.
32908
32909         * delegates.cs (Delegate::Define): Implement partially.
32910
32911         * modifiers.cs (TypeAttr): Handle more flags.
32912
32913 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32914
32915         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
32916         and not <=
32917         (Operator::Define): Re-write logic to get types by using the LookupType method
32918         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
32919         (Indexer::Define): Ditto.
32920         (Event::Define): Ditto.
32921         (Property::Define): Ditto.
32922
32923 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32924
32925         * class.cs (TypeContainer::Populate): Now define operators too. 
32926         (TypeContainer.Operators): New property to access the list of operators
32927         in a type.
32928         (Operator.OperatorMethodBuilder): New member to hold the method builder
32929         for the operator we are defining.
32930         (Operator::Define): Implement.
32931
32932 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32933
32934         * class.cs (Event::Define): Make the prefixes of the accessor methods
32935         addOn_ and removeOn_ 
32936
32937         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
32938         of the location being passed in too. Ideally, this should go later since all
32939         error reporting should be done through the Report object.
32940
32941         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
32942         (Populate): Iterate thru the indexers we have and define them too.
32943         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
32944         for the get and set accessors.
32945         (Indexer::Define): Implement.
32946
32947 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
32948
32949         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
32950         my previous implementation, did not work.
32951
32952         * typemanager.cs: Add a couple of missing types (the longs).
32953
32954         * literal.cs: Use TypeManager.bool_type instead of getting it.
32955
32956         * expression.cs (EventExpr): New kind of expressions.
32957         (Expressio::ExprClassFromMemberInfo): finish
32958
32959 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
32960
32961         * assign.cs: Emit stores to static fields differently.
32962
32963 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32964
32965         * Merge in changes and adjust code to tackle conflicts. Backed out my
32966         code in Assign::Resolve ;-) 
32967
32968 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32969
32970         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
32971         instead Report.Error and also pass in the location.
32972         (CSharpParser::Lexer): New readonly property to return the reference
32973         to the Tokenizer object.
32974         (declare_local_variables): Use Report.Error with location instead of plain 
32975         old error.
32976         (CheckDef): Ditto.
32977
32978         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
32979         (Operator.CheckBinaryOperator): Ditto.
32980
32981         * cs-parser.jay (operator_declarator): Update accordingly.
32982
32983         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
32984         (CheckBinaryOperator): Same here.
32985
32986         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
32987         on the name without any prefixes of namespace names etc. This is because we
32988         already might have something already fully qualified like 
32989         'System.Console.WriteLine'
32990
32991         * assign.cs (Resolve): Begin implementation. Stuck ;-)
32992
32993 2001-09-07  Ravi Pratap  <ravi@ximian.com>
32994
32995         * cs-tokenizer.cs (location): Return a string which also contains
32996         the file name.
32997
32998         * expression.cs (ElementAccess): New class for expressions of the
32999         type 'element access.'
33000         (BaseAccess): New class for expressions of the type 'base access.'
33001         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
33002         respectively.
33003
33004         * cs-parser.jay (element_access): Implement action.
33005         (base_access): Implement actions.
33006         (checked_expression, unchecked_expression): Implement.
33007
33008         * cs-parser.jay (local_variable_type): Correct and implement.
33009         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
33010
33011         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
33012
33013         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
33014         name and the specifiers.
33015
33016         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
33017
33018         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
33019         making them all public ;-)
33020
33021         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
33022         class anyways.
33023
33024 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
33025
33026         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
33027         PropertyExprs.
33028         (FieldExpr, PropertyExprs): New resolved expressions.
33029         (SimpleName::MemberStaticCheck): Perform static checks for access
33030         to non-static fields on static methods. Maybe this should be
33031         generalized for MemberAccesses. 
33032         (SimpleName::ResolveSimpleName): More work on simple name
33033         resolution. 
33034
33035         * cs-parser.jay (primary_expression/qualified_identifier): track
33036         the parameter index.
33037
33038         * codegen.cs (CodeGen::Save): Catch save exception, report error.
33039         (EmitContext::EmitBoolExpression): Chain to expression generation
33040         instead of temporary hack.
33041         (::EmitStatementExpression): Put generic expression code generation.
33042
33043         * assign.cs (Assign::Emit): Implement variable assignments to
33044         local variables, parameters and fields.
33045
33046 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
33047
33048         * statement.cs (Block::GetVariableInfo): New method, returns the
33049         VariableInfo for a variable name in a block.
33050         (Block::GetVariableType): Implement in terms of GetVariableInfo
33051
33052         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
33053         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
33054
33055 2001-09-06  Ravi Pratap  <ravi@ximian.com>
33056
33057         * cs-parser.jay (operator_declaration): Continue on my quest : update
33058         to take attributes argument.
33059         (event_declaration): Ditto.
33060         (enum_declaration): Ditto.
33061         (indexer_declaration): Ditto.
33062
33063         * class.cs (Operator::Operator): Update constructor accordingly.
33064         (Event::Event): Ditto.
33065
33066         * delegate.cs (Delegate::Delegate): Same here.
33067
33068         * enum.cs (Enum::Enum): Same here.
33069
33070 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33071
33072         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
33073
33074         * ../tests/cs0658.cs : New file to demonstrate error 0658.
33075
33076         * attribute.cs (Attributes): New class to encapsulate all attributes which were
33077         being passed around as an arraylist.
33078         (Attributes::AddAttribute): Method to add attribute sections.
33079
33080         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
33081         (struct_declaration): Update accordingly.
33082         (constant_declaration): Update.
33083         (field_declaration): Update.
33084         (method_header): Update.
33085         (fixed_parameter): Update.
33086         (parameter_array): Ditto.
33087         (property_declaration): Ditto.
33088         (destructor_declaration): Ditto.
33089
33090         * class.cs (Struct::Struct): Update constructors accordingly.
33091         (Class::Class): Ditto.
33092         (Field::Field): Ditto.
33093         (Method::Method): Ditto.
33094         (Property::Property): Ditto.
33095         (TypeContainer::OptAttribute): update property's return type.
33096
33097         * interface.cs (Interface.opt_attributes): New member.
33098         (Interface::Interface): Update to take the extra Attributes argument.
33099
33100         * parameter.cs (Parameter::Parameter): Ditto.
33101
33102         * constant.cs (Constant::Constant): Ditto.
33103
33104         * interface.cs (InterfaceMemberBase): New OptAttributes field.
33105         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
33106         the attributes as a parameter.
33107         (InterfaceProperty): Update constructor call.
33108         (InterfaceEvent): Ditto.
33109         (InterfaceMethod): Ditto.
33110         (InterfaceIndexer): Ditto.
33111
33112         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
33113         pass the attributes too.
33114         (interface_event_declaration): Ditto.
33115         (interface_property_declaration): Ditto.
33116         (interface_method_declaration): Ditto.
33117         (interface_declaration): Ditto.
33118
33119 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
33120
33121         * class.cs (Method::Define): Track the "static Main" definition to
33122         create an entry point. 
33123
33124         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
33125         EntryPoint if we find it. 
33126
33127         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
33128         (EmitContext::ig): Make this variable public.
33129
33130         * driver.cs: Make the default output file be the first file name
33131         with the .exe extension.  
33132
33133         Detect empty compilations
33134
33135         Handle various kinds of output targets.  Handle --target and
33136         rename -t to --dumper.
33137
33138         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
33139         methods inherited from Expression return now an Expression.  This
33140         will is used during the tree rewriting as we resolve them during
33141         semantic analysis.
33142
33143         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
33144         the spec.  Missing entirely is the information about
33145         accessability of elements of it.
33146
33147         (Expression::ExprClassFromMemberInfo): New constructor for
33148         Expressions that creates a fully initialized Expression based on
33149         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
33150         a Type.
33151
33152         (Invocation::Resolve): Begin implementing resolution of invocations.
33153
33154         * literal.cs (StringLiteral):  Implement Emit.
33155
33156 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33157
33158         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
33159         member.
33160
33161 2001-09-04  Ravi Pratap  <ravi@ximian.com>
33162
33163         * cs-parser.jay (attribute_arguments): Implement actions.
33164         (attribute): Fix bug in production. Implement action.
33165         (attribute_list): Implement.
33166         (attribute_target): Implement.
33167         (attribute_target_specifier, opt_target_specifier): Implement
33168         (CheckAttributeTarget): New method to check if the attribute target
33169         is valid.
33170         (attribute_section): Implement.
33171         (opt_attributes): Implement.
33172
33173         * attribute.cs : New file to handle attributes.
33174         (Attribute): Class to hold attribute info.
33175
33176         * cs-parser.jay (opt_attribute_target_specifier): Remove production
33177         (attribute_section): Modify production to use 2 different rules to 
33178         achieve the same thing. 1 s/r conflict down !
33179         Clean out commented, useless, non-reducing dimension_separator rules.
33180
33181         * class.cs (TypeContainer.attributes): New member to hold list
33182         of attributes for a type.
33183         (Struct::Struct): Modify to take one more argument, the attribute list.
33184         (Class::Class): Ditto.
33185         (Field::Field): Ditto.
33186         (Method::Method): Ditto.
33187         (Property::Property): Ditto.
33188
33189         * cs-parser.jay (struct_declaration): Update constructor call to
33190         pass in the attributes too.
33191         (class_declaration): Ditto.
33192         (constant_declaration): Ditto.
33193         (field_declaration): Ditto.
33194         (method_header): Ditto.
33195         (fixed_parameter): Ditto.
33196         (parameter_array): Ditto.
33197         (property_declaration): Ditto.
33198
33199         * constant.cs (Constant::Constant): Update constructor similarly.
33200         Use System.Collections.
33201
33202         * parameter.cs (Parameter::Parameter): Update as above.
33203
33204 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33205
33206         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
33207         (TypeContainer.delegates): New member to hold list of delegates.
33208
33209         * cs-parser.jay (delegate_declaration): Implement the action correctly 
33210         this time as I seem to be on crack ;-)
33211
33212 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
33213
33214         * rootcontext.cs (RootContext::IsNamespace): new function, used to
33215         tell whether an identifier represents a namespace.
33216
33217         * expression.cs (NamespaceExpr): A namespace expression, used only
33218         temporarly during expression resolution.
33219         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33220         utility functions to resolve names on expressions.
33221
33222 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33223
33224         * codegen.cs: Add hook for StatementExpressions. 
33225
33226         * class.cs: Fix inverted test for static flag in methods.
33227
33228 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33229
33230         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33231         to make it coincide with MS' number.
33232         (Operator::CheckBinaryOperator): Ditto.
33233
33234         * ../errors/errors.txt : Remove error numbers added earlier.
33235
33236         * ../errors/cs1019.cs : Test case for error # 1019
33237
33238         * ../errros/cs1020.cs : Test case for error # 1020
33239
33240         * cs-parser.jay : Clean out commented cruft.
33241         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33242         used anywhere - non-reducing rule.
33243         (namespace_declarations): Non-reducing rule - comment out.
33244
33245         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33246         with TypeContainer::AddEnum.
33247
33248         * delegate.cs : New file for delegate handling classes.
33249         (Delegate): Class for declaring delegates.
33250
33251         * makefile : Update.
33252
33253         * cs-parser.jay (delegate_declaration): Implement.
33254
33255 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33256
33257         * class.cs (Event::Define): Implement.
33258         (Event.EventBuilder): New member.
33259
33260         * class.cs (TypeContainer::Populate): Update to define all enums and events
33261         we have.
33262         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33263         readonly fields for all these cases ?
33264
33265 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33266
33267         * class.cs (Property): Revamp to use the convention of making fields readonly.
33268         Accordingly modify code elsewhere.
33269
33270         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33271         the Define method of the Property class.
33272
33273         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33274         trivial bug.
33275         (TypeContainer::Populate): Update to define all the properties we have. Also
33276         define all enumerations.
33277
33278         * enum.cs (Define): Implement.
33279
33280 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33281
33282         * cs-parser.jay (overloadable_operator): The semantic value is an
33283         enum of the Operator class.
33284         (operator_declarator): Implement actions.
33285         (operator_declaration): Implement.
33286
33287         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33288         validity of definitions.
33289         (Operator::CheckBinaryOperator): Static method to check for binary operators
33290         (TypeContainer::AddOperator): New method to add an operator to a type.
33291
33292         * cs-parser.jay (indexer_declaration): Added line to actually call the
33293         AddIndexer method so it gets added ;-)
33294
33295         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33296         already taken care of by the MS compiler ?  
33297
33298 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33299
33300         * class.cs (Operator): New class for operator declarations.
33301         (Operator::OpType): Enum for the various operators.
33302
33303 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33304
33305         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33306         ostensibly handle this in semantic analysis.
33307
33308         * cs-parser.jay (general_catch_clause): Comment out
33309         (specific_catch_clauses, specific_catch_clause): Ditto.
33310         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33311         (catch_args, opt_catch_args): New productions.
33312         (catch_clause): Rewrite to use the new productions above
33313         (catch_clauses): Modify accordingly.
33314         (opt_catch_clauses): New production to use in try_statement
33315         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33316         and re-write the code in the actions to extract the specific and
33317         general catch clauses by being a little smart ;-)
33318
33319         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33320         Hooray, try and catch statements parse fine !
33321
33322 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33323
33324         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33325         string from the hashtable of variables.
33326
33327         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33328         I end up making that mistake ;-)
33329         (catch_clauses): Fixed gross error which made Key and Value of the 
33330         DictionaryEntry the same : $1 !!
33331
33332 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33333
33334         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33335
33336         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33337         when the add and remove accessors are specified. 
33338
33339 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33340
33341         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33342         information about indexer_declarator.
33343         (indexer_declarator): Implement actions.
33344         (parsing_indexer): New local boolean used to keep track of whether
33345         we are parsing indexers or properties. This is necessary because 
33346         implicit_parameters come into picture even for the get accessor in the 
33347         case of an indexer.
33348         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33349
33350         * class.cs (Indexer): New class for indexer declarations.
33351         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33352         (TypeContainer::indexers): New member to hold list of indexers for the
33353         type.
33354
33355 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33356
33357         * cs-parser.jay (add_accessor_declaration): Implement action.
33358         (remove_accessor_declaration): Implement action.
33359         (event_accessors_declaration): Implement
33360         (variable_declarators): swap statements for first rule - trivial.
33361
33362         * class.cs (Event): New class to hold information about event
33363         declarations.
33364         (TypeContainer::AddEvent): New method to add an event to a type
33365         (TypeContainer::events): New member to hold list of events.
33366
33367         * cs-parser.jay (event_declaration): Implement actions.
33368
33369 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33370
33371         * cs-parser.jay (dim_separators): Implement. Make it a string
33372         concatenating all the commas together, just as they appear.
33373         (opt_dim_separators): Modify accordingly
33374         (rank_specifiers): Update accordingly. Basically do the same
33375         thing - instead, collect the brackets here.
33376         (opt_rank_sepcifiers): Modify accordingly.
33377         (array_type): Modify to actually return the complete type string
33378         instead of ignoring the rank_specifiers.
33379         (expression_list): Implement to collect the expressions
33380         (variable_initializer): Implement. We make it a list of expressions
33381         essentially so that we can handle the array_initializer case neatly too.
33382         (variable_initializer_list): Implement.
33383         (array_initializer): Make it a list of variable_initializers
33384         (opt_array_initializer): Modify accordingly.
33385
33386         * expression.cs (New::NType): Add enumeration to help us
33387         keep track of whether we have an object/delegate creation
33388         or an array creation.
33389         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33390         members to hold data about array creation.
33391         (New:New): Modify to update NewType
33392         (New:New): New Overloaded contructor for the array creation
33393         case.
33394
33395         * cs-parser.jay (array_creation_expression): Implement to call
33396         the overloaded New constructor.
33397
33398 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33399
33400         * class.cs (TypeContainer::Constructors): Return member
33401         constructors instead of returning null.
33402
33403 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33404
33405         * typemanager.cs (InitCoreTypes): Initialize the various core
33406         types after we have populated the type manager with the user
33407         defined types (this distinction will be important later while
33408         compiling corlib.dll)
33409
33410         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33411         on Expression Classification.  Now all expressions have a method
33412         `Resolve' and a method `Emit'.
33413
33414         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33415         generation from working.     Also add some temporary debugging
33416         code. 
33417
33418 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33419
33420         * codegen.cs: Lots of code generation pieces.  This is only the
33421         beginning, will continue tomorrow with more touches of polish.  We
33422         handle the fundamentals of if, while, do, for, return.  Others are
33423         trickier and I need to start working on invocations soon.
33424
33425         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33426         s.InitStatement. 
33427
33428         * codegen.cs (EmitContext): New struct, used during code
33429         emission to keep a context.   Most of the code generation will be
33430         here. 
33431
33432         * cs-parser.jay: Add embedded blocks to the list of statements of
33433         this block.  So code generation proceeds in a top down fashion.
33434
33435 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33436
33437         * statement.cs: Add support for multiple child blocks.
33438
33439 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33440
33441         * codegen.cs (EmitCode): New function, will emit the code for a
33442         Block of code given a TypeContainer and its ILGenerator. 
33443
33444         * statement.cs (Block): Standard public readonly optimization.
33445         (Block::Block constructors): Link children. 
33446         (Block::Child): Child Linker.
33447         (Block::EmitVariables): Emits IL variable declarations.
33448
33449         * class.cs: Drop support for MethodGroups here, delay until
33450         Semantic Analysis.
33451         (Method::): Applied the same simplification that I did before, and
33452         move from Properties to public readonly fields.
33453         (Method::ParameterTypes): Returns the parameter types for the
33454         function, and implements a cache that will be useful later when I
33455         do error checking and the semantic analysis on the methods is
33456         performed.
33457         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33458         and made a method, optional argument tells whether this is a class
33459         or a structure to apply the `has-this' bit.
33460         (Method::GetCallingConvention): Implement, returns the calling
33461         convention. 
33462         (Method::Define): Defines the type, a second pass is performed
33463         later to populate the methods.
33464
33465         (Constructor::ParameterTypes): implement a cache similar to the
33466         one on Method::ParameterTypes, useful later when we do semantic
33467         analysis. 
33468
33469         (TypeContainer::EmitMethod):  New method.  Emits methods.
33470
33471         * expression.cs: Removed MethodGroup class from here.
33472
33473         * parameter.cs (Parameters::GetCallingConvention): new method.
33474
33475 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33476
33477         * class.cs (TypeContainer::Populate): Drop RootContext from the
33478         argument. 
33479
33480         (Constructor::CallingConvention): Returns the calling convention.
33481         (Constructor::ParameterTypes): Returns the constructor parameter
33482         types. 
33483
33484         (TypeContainer::AddConstructor): Keep track of default constructor
33485         and the default static constructor.
33486
33487         (Constructor::) Another class that starts using `public readonly'
33488         instead of properties. 
33489
33490         (Constructor::IsDefault): Whether this is a default constructor. 
33491
33492         (Field::) use readonly public fields instead of properties also.
33493
33494         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33495         track of static constructors;  If none is used, turn on
33496         BeforeFieldInit in the TypeAttributes. 
33497
33498         * cs-parser.jay (opt_argument_list): now the return can be null
33499         for the cases where there are no arguments. 
33500
33501         (constructor_declarator): If there is no implicit `base' or
33502         `this', then invoke the default parent constructor. 
33503
33504         * modifiers.cs (MethodAttr): New static function maps a set of
33505         modifiers flags into a MethodAttributes enum
33506         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33507         MethodAttr, TypeAttr to represent the various mappings where the
33508         modifiers are used.
33509         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33510
33511 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33512
33513         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33514         method arguments.
33515
33516         * interface.cs (PopulateIndexer): Implemented the code generator
33517         for interface indexers.
33518
33519 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33520
33521         * interface.cs (InterfaceMemberBase): Now we track the new status
33522         here.  
33523
33524         (PopulateProperty): Implement property population.  Woohoo!  Got
33525         Methods and Properties going today. 
33526
33527         Removed all the properties for interfaces, and replaced them with
33528         `public readonly' fields. 
33529
33530 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33531
33532         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33533         initialize their hashtables/arraylists only when they are needed
33534         instead of doing this always.
33535
33536         * parameter.cs: Handle refs and out parameters.
33537
33538         * cs-parser.jay: Use an ArrayList to construct the arguments
33539         instead of the ParameterCollection, and then cast that to a
33540         Parameter[] array.
33541
33542         * parameter.cs: Drop the use of ParameterCollection and use
33543         instead arrays of Parameters.
33544
33545         (GetParameterInfo): Use the Type, not the Name when resolving
33546         types. 
33547
33548 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33549
33550         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33551         and instead use public readonly fields.
33552
33553         * class.cs: Put back walking code for type containers.
33554
33555 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33556
33557         * class.cs (MakeConstant): Code to define constants.
33558
33559         * rootcontext.cs (LookupType): New function.  Used to locate types 
33560
33561
33562 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33563
33564         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33565         this System.Reflection code is.  Kudos to Microsoft
33566
33567         * typemanager.cs: Implement a type cache and avoid loading all
33568         types at boot time.  Wrap in LookupType the internals.  This made
33569         the compiler so much faster.  Wow.  I rule!
33570
33571         * driver.cs: Make sure we always load mscorlib first (for
33572         debugging purposes, nothing really important).
33573
33574         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33575         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33576
33577         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33578         on namespaces that have been imported using the `using' keyword.
33579
33580         * class.cs (TypeContainer::TypeAttr): Virtualize.
33581         (Class::TypeAttr): Return attributes suitable for this bad boy.
33582         (Struct::TypeAttr): ditto.
33583         Handle nested classes.
33584         (TypeContainer::) Remove all the type visiting code, it is now
33585         replaced with the rootcontext.cs code
33586
33587         * rootcontext.cs (GetClassBases): Added support for structs. 
33588
33589 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33590
33591         * interface.cs, statement.cs, class.cs, parameter.cs,
33592         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33593         Drop use of TypeRefs, and use strings instead.
33594
33595 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33596
33597         * rootcontext.cs: 
33598
33599         * class.cs (Struct::Struct): set the SEALED flags after
33600         checking the modifiers.
33601         (TypeContainer::TypeAttr): new property, returns the
33602         TypeAttributes for a class.  
33603
33604         * cs-parser.jay (type_list): Oops, list production was creating a
33605         new list of base types.
33606
33607         * rootcontext.cs (StdLib): New property.
33608         (GetInterfaceTypeByName): returns an interface by type name, and
33609         encapsulates error handling here.
33610         (GetInterfaces): simplified.
33611         (ResolveTree): Encapsulated all the tree resolution here.
33612         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33613         types. 
33614
33615         * driver.cs: Add support for --nostdlib, to avoid loading the
33616         default assemblies.
33617         (Main): Do not put tree resolution here. 
33618
33619         * rootcontext.cs: Beginning of the class resolution.
33620
33621 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33622
33623         * rootcontext.cs: Provide better error reporting. 
33624
33625         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33626
33627         * rootcontext.cs (CreateInterface): Handle the case where there
33628         are no parent interfaces.
33629
33630         (CloseTypes): Routine to flush types at the end.
33631         (CreateInterface): Track types.
33632         (GetInterfaces): Returns an array of Types from the list of
33633         defined interfaces.
33634
33635         * typemanager.c (AddUserType): Mechanism to track user types (puts
33636         the type on the global type hash, and allows us to close it at the
33637         end). 
33638
33639 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33640
33641         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33642         RecordInterface instead.
33643
33644         * cs-parser.jay: Updated to reflect changes above.
33645
33646         * decl.cs (Definition): Keep track of the TypeBuilder type that
33647         represents this type here.  Not sure we will use it in the long
33648         run, but wont hurt for now.
33649
33650         * driver.cs: Smaller changes to accomodate the new code.
33651
33652         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33653         when done. 
33654
33655         * rootcontext.cs (CreateInterface):  New method, used to create
33656         the System.TypeBuilder type for interfaces.
33657         (ResolveInterfaces): new entry point to resolve the interface
33658         hierarchy. 
33659         (CodeGen): Property, used to keep track of the code generator.
33660
33661 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33662
33663         * cs-parser.jay: Add a second production for delegate_declaration
33664         with `VOID'.
33665
33666         (enum_body): Put an opt_comma here instead of putting it on
33667         enum_body or enum_member_declarations so we can handle trailing
33668         commas on enumeration members.  Gets rid of a shift/reduce.
33669
33670         (type_list): Need a COMMA in the middle.
33671
33672         (indexer_declaration): Tell tokenizer to recognize get/set
33673
33674         * Remove old targets.
33675
33676         * Re-add the parser target.
33677
33678 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33679
33680         * cs-parser.jay: Add precendence rules for a number of operators
33681         ot reduce the number of shift/reduce conflicts in the grammar.
33682
33683 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33684
33685         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33686         and put it here.
33687
33688         Get rid of old crufty code.
33689
33690         * rootcontext.cs: Use this to keep track of the parsed
33691         representation and the defined types available to the program. 
33692
33693         * gen-treedump.cs: adjust for new convention.
33694
33695         * type.cs: Split out the type manager, and the assembly builder
33696         from here. 
33697
33698         * typemanager.cs: the type manager will live here now.
33699
33700         * cil-codegen.cs: And the code generator here. 
33701
33702 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33703
33704         * makefile: Fixed up for easy making.
33705
33706 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33707
33708         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33709         the 
33710
33711         (unary_expression): Expand pre_increment_expression and
33712         post_decrement_expression to reduce a shift/reduce.
33713
33714 2001-07-11  Simon Cozens
33715
33716         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33717
33718         Improve allow_keyword_as_indent name.
33719
33720 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33721
33722         * Adjustments for Beta2. 
33723
33724 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33725
33726         * decl.cs: Added `Define' abstract method.
33727         (InTransit): new property, used to catch recursive definitions. 
33728
33729         * interface.cs: Implement `Define'. 
33730
33731         * modifiers.cs: Map Modifiers.constants to
33732         System.Reflection.TypeAttribute flags.
33733
33734         * class.cs: Keep track of types and user-defined types.
33735         (BuilderInit): New method for creating an assembly
33736         (ResolveType): New function to launch the resolution process, only
33737         used by interfaces for now.
33738
33739         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33740         that are inserted into the name space. 
33741
33742 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33743
33744         * ARGH.  I have screwed up my tree so many times due to the use of
33745         rsync rather than using CVS.  Going to fix this at once. 
33746
33747         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33748         load types.
33749
33750 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33751
33752         * Experiment successful: Use System.Type rather that our own
33753         version of Type.  
33754
33755 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33756
33757         * cs-parser.jay: Removed nsAliases from here.
33758
33759         Use new namespaces, handle `using XXX;' 
33760
33761         * namespace.cs: Reimplemented namespace handling, use a recursive
33762         definition of the class.  Now we can keep track of using clauses
33763         and catch invalid using clauses.
33764
33765 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33766
33767         * gen-treedump.cs: Adapted for all the renaming.
33768
33769         * expression.cs (Expression): this class now has a Type property
33770         which returns an expression Type.
33771
33772         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33773         `Type', as this has a different meaning now in the base
33774
33775 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33776
33777         * interface.cs, class.cs: Removed from all the sources the
33778         references to signature computation, as we can not do method
33779         signature computation during the parsing time, as we are not
33780         trying to solve at that point distinguishing:
33781
33782         class X {
33783                 void a (Blah x) {}
33784                 void a (NS.Blah x) {}
33785         }
33786
33787         Which depending on the context might be valid or not, as we do not
33788         know if Blah is the same thing as NS.Blah at that point.
33789
33790         * Redid everything so the code uses TypeRefs now instead of
33791         Types.  TypeRefs are just temporary type placeholders, that need
33792         to be resolved.  They initially have a pointer to a string and the
33793         current scope in which they are used.  This is used later by the
33794         compiler to resolve the reference to an actual Type. 
33795
33796         * DeclSpace is no longer a CIR.Type, and neither are
33797         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33798         are all DeclSpaces, but no Types. 
33799
33800         * type.cs (TypeRefManager): This implements the TypeRef manager,
33801         which keeps track of all the types that need to be resolved after
33802         the parsing has finished. 
33803
33804 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33805
33806         * ARGH.  We are going to have to store `foreach' as a class rather
33807         than resolving it, as we need to verify error 1579 after name
33808         resolution.   *OR* we could keep a flag that says `This request to
33809         IEnumerator comes from a foreach statement' which we can then use
33810         to generate the error.
33811
33812 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
33813
33814         * class.cs (TypeContainer.AddMethod): we now add methods to the
33815         MethodGroup instead of the method hashtable.  
33816
33817         * expression.cs: Add MethodGroup abstraction, which gets us one
33818         step closer to the specification in the way we handle method
33819         declarations.  
33820
33821         * cs-parser.jay (primary_expression): qualified_identifier now
33822         tried to match up an identifier to a local variable reference or
33823         to a parameter reference.
33824
33825         current_local_parameters is now a parser global variable that
33826         points to the current parameters for the block, used during name
33827         lookup.
33828
33829         (property_declaration): Now creates an implicit `value' argument to
33830         the set accessor.
33831
33832 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
33833
33834         * parameter.cs: Do not use `param' arguments as part of the
33835         signature, per the spec.
33836
33837 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
33838
33839         * decl.cs: Base class for classes, structs and interfaces.  This
33840         is the "Declaration Space" 
33841
33842         * cs-parser.jay: Use CheckDef for checking declaration errors
33843         instead of having one on each function.
33844
33845         * class.cs: Factor out some code for handling error handling in
33846         accordance to the "Declarations" section in the "Basic Concepts"
33847         chapter in the ECMA C# spec.
33848
33849         * interface.cs: Make all interface member classes derive from
33850         InterfaceMemberBase.
33851
33852 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
33853
33854         * Many things: all interfaces are parsed and generated in
33855         gen-treedump.  Support for member variables, constructors,
33856         destructors, properties, constants is there.
33857
33858         Beginning of the IL backend, but very little done, just there for
33859         testing purposes. 
33860
33861 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
33862
33863         * cs-parser.jay: Fix labeled statement.
33864
33865         * cs-tokenizer.cs (escape): Escape " and ' always.
33866         ref_line, ref_name: keep track of the line/filename as instructed
33867         by #line by the compiler.
33868         Parse #line.
33869
33870 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
33871
33872         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
33873         to match the values in System.CodeDOM.
33874
33875         Divid renamed to Divide.
33876
33877         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
33878         statements. 
33879         (Statements.set): remove.
33880
33881         * System.CodeDOM/CodeCatchClause.cs: always have a valid
33882         statements. 
33883
33884         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
33885         falseStatements always have valid values. 
33886
33887         * cs-parser.jay: Use System.CodeDOM now.
33888