2010-05-19 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / ChangeLog
1 2010-05-19  Marek Safar  <marek.safar@gmail.com>
2
3         A fix for bug #424064
4         * generic.cs: Replace original with inflated type parameter on
5         failure.
6
7 2010-05-19  Marek Safar  <marek.safar@gmail.com>
8
9         A fix for bug #359733
10         * parameter.cs: Extension attribute can be defined in each assembly.
11
12 2010-05-18  Marek Safar  <marek.safar@gmail.com>
13
14         A fix for bug #446507
15         * method.cs: Only one method can implement an interface.
16
17 2010-05-18  Marek Safar  <marek.safar@gmail.com>
18
19         A fix for bug #594905
20         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
21         Typed null can be used as a source for expression methods.
22
23 2010-05-18  Marek Safar  <marek.safar@gmail.com>
24
25         A fix for bug #606551
26         * namespace.cs: Using directive imports only types and not nested
27         namespaces.
28
29 2010-05-17  Marek Safar  <marek.safar@gmail.com>
30
31         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
32         delegate.cs: Member instance is resolved after member overload
33         definitely resolves static/instance property of member expression.
34         Fixes #545047, #358848, #456605, #460016, #603299
35
36 2010-05-12  Marek Safar  <marek.safar@gmail.com>
37
38         A fix for bug #604981
39         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
40         details for nested anonymous methods stories.
41
42 2010-05-11  Marek Safar  <marek.safar@gmail.com>
43
44         A fix for bug #604735
45         * namespace.cs: Don't report namespace collision.
46
47 2010-05-11  Marek Safar  <marek.safar@gmail.com>
48
49         A fix for bug #604748
50         * class.cs, typespec.cs: Search full imported attribute hierarchy
51         for AttributeUsage.
52
53 2010-05-11  Marek Safar  <marek.safar@gmail.com>
54
55         * namespace.cs: Ignore missing dependencies failure at
56         initialization.
57
58 2010-05-11  Marek Safar  <marek.safar@gmail.com>
59
60         A fix for bug #604640
61         * namespace.cs: Don't resolve using constraints too early.
62
63 2010-05-11  Marek Safar  <marek.safar@gmail.com>
64
65         A fix for bug #604239
66         * generic.cs: Copy partial type constraints to partial container.
67
68 2010-05-10  Marek Safar  <marek.safar@gmail.com>
69
70         A fix for bug #557210
71         * import.cs: Relax underlying enum field rules.
72
73 2010-05-10  Marek Safar  <marek.safar@gmail.com>
74
75         A fix for bug #603476
76         * property.cs: Implement IParametersMember for indexer accessors.
77
78 2010-05-07  Marek Safar  <marek.safar@gmail.com>
79
80         A fix for bug #601141
81         * class.cs: Update all partial modifiers.
82
83 2010-05-06  Marek Safar  <marek.safar@gmail.com>
84
85         A fix for bug #601708
86         * method.cs, membercache.cs: Destructors cannot be hidden.
87
88 2010-05-06  Marek Safar  <marek.safar@gmail.com>
89
90         A fix for bug #602551
91         * class.cs: Resursive reference of type definition is allowed.
92
93 2010-05-06  Marek Safar  <marek.safar@gmail.com>
94
95         * anonymous.cs: Mutate cached storey instance types too.
96
97 2010-05-06  Marek Safar  <marek.safar@gmail.com>
98
99         A fix for bug #602443
100         * convert.cs: Explicit enum conversion cannot involve user operators
101
102 2010-05-05  Miguel de Icaza  <miguel@novell.com>
103
104         * class.cs (TypeContainer.DefineBaseTypes)
105         (TypeContainer.CheckRecursiveDefinition): check for the iface not
106         being null, as we could have failed resolution and crashed;
107         Fixes #442144
108
109         * cs-parser.jay: Productions to catch common mistakes when other
110         punctuation operators are used instead of comma.   Fixes 571702 
111
112 2010-05-05  Marek Safar  <marek.safar@gmail.com>
113
114         * anonymous.cs: Mutate correct set of constraints.
115
116 2010-05-05  Marek Safar  <marek.safar@gmail.com>
117
118         A fix for bug #602842
119         * expression.cs: Resolve all array bound arguments.
120
121 2010-05-05  Marek Safar  <marek.safar@gmail.com>
122
123         * import.cs: Don't import private fields.
124
125 2010-04-30  Marek Safar  <marek.safar@gmail.com>
126
127         Partially based on patch by <sami.lamti@gmail.com>
128
129         * eval.cs, ecore.cs: Fixed eval show methods.
130
131 2010-04-30  Marek Safar  <marek.safar@gmail.com>
132
133         * generic.cs, delegate.cs: Implement output type inference of
134         methodgroup now when the specification was cleared at least little
135         bit.
136
137 2010-04-29  Marek Safar  <marek.safar@gmail.com>
138
139         A fix for bug #575611
140         * class.cs: Fix recursive unmanaged recursice sruct check.
141         
142 2010-04-29  Marek Safar  <marek.safar@gmail.com>
143
144         A fix for bug #479776
145         * expression.cs: Implement typeof unbounded nested generic types.
146
147 2010-04-29  Marek Safar  <marek.safar@gmail.com>
148
149         A fix for bug #474953
150         * class.cs: Fix valid recursive base type definition.
151
152 2010-04-29  Marek Safar  <marek.safar@gmail.com>
153
154         A fix for bug #421737
155         * convert.cs, expression.cs: A boxing conversion exists from a
156         nullable-type to a reference type, if a boxing conversion exists
157         from the underlying non-nullable-value-type to the reference type.
158
159 2010-04-29  Marek Safar  <marek.safar@gmail.com>
160
161         A fix for bug #376875
162         * import.cs: Import volatile modifier.
163
164 2010-04-29  Marek Safar  <marek.safar@gmail.com>
165
166         A fix for bug #372412
167         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
168         generic arrays.
169
170 2010-04-29  Marek Safar  <marek.safar@gmail.com>
171
172         A fix for bug #568955
173         * statements.cs: Handle recursive scope initializers.
174
175 2010-04-28  Marek Safar  <marek.safar@gmail.com>
176
177         A fix for bug #566511
178         * anonymous.cs: Always get inflated version of hoisted variable
179         on generic type definition.
180
181 2010-04-28  Marek Safar  <marek.safar@gmail.com>
182
183         * import.cs, membercache.cs: Relax rules for valid properties.
184
185 2010-04-28  Marek Safar  <marek.safar@gmail.com>
186
187         * import.cs: Intern arrays used in generic arguments.
188
189 2010-04-28  Marek Safar  <marek.safar@gmail.com>
190
191         A fix for bug #600398
192         * convert.cs: Actually use effective base type for the comparison.
193
194 2010-04-28  Marek Safar  <marek.safar@gmail.com>
195
196         A fix for bug #600326
197         * ecore.cs: Pass arity to base member lookup.
198
199 2010-04-28  Marek Safar  <marek.safar@gmail.com>
200
201         A fix for bug #573385
202         * expression.cs: MemberAccess is of generic type based on right
203         arity length only.
204
205 2010-05-28  Marek Safar  <marek.safar@gmail.com>
206
207         * cs-tokenizer.cs: Made tab size configurable.
208
209 2010-05-27  Marek Safar  <marek.safar@gmail.com>
210
211         * attribute.cs: Ensure Obsolete members are defined before doing
212         ctor look-up.
213
214 2010-05-27  Marek Safar  <marek.safar@gmail.com>
215
216         * visit.cs: Add DOM visitor skeleton.
217         
218         * *.cs: Updated.
219
220 2010-05-27  Marek Safar  <marek.safar@gmail.com>
221
222         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
223         
224 2010-05-27  Marek Safar  <marek.safar@gmail.com>
225
226         * *.cs: Major rewrite of compiler internals to better work with
227         unmodified System.Reflection.Emit. Some of the key changes are
228         - TypeSpec replaces reflection specific System.Type.
229         - All Type(TypeSpec) operations are now done in compiler therefore
230         no dependency on SRE to inflate generic members and types or to
231         query unclosed types.
232         - MemberCache is now the only and full hierarchical topology.
233         - Generic constraints are implemented properly.
234         - And as a bonus compilation is on average 30% faster.
235
236 2010-04-15  Jb Evain  <jbevain@novell.com>
237
238         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
239
240 2010-04-12  Marek Safar  <marek.safar@gmail.com>
241
242         * expression.cs, attribute.cs, parameter.cs: More attribute type
243         checks.
244
245 2010-04-12  Marek Safar  <marek.safar@gmail.com>
246
247         A fix for bug #593342
248
249         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
250         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
251         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
252         codegen.cs: Add custom attribute encoder to deal with unfinished
253         types and easier corlib bootstrap from its own types.
254
255 2010-03-26  Marek Safar  <marek.safar@gmail.com>
256
257         * cs-parser.jay: Report invalid constraint types.
258
259 2010-03-16  Jb Evain  <jbevain@novell.com>
260
261         * Makefile: rename the net_2_1 profile to moonlight.
262
263 2010-03-11  Marek Safar  <marek.safar@gmail.com>
264
265         * statement.cs, cs-parser.jay: Use correct location for empty
266         statements.
267
268 2010-03-11  Marek Safar  <marek.safar@gmail.com>
269
270         * cs-parser.jay: Disable Location from expression.
271         
272         * generic.cs: Check constraints for overrides in the parser.
273
274 2010-03-09  Marek Safar  <marek.safar@gmail.com>
275
276         * cs-parser.jay (GetLocation): Use an expression when available.
277
278 2010-03-04  Marek Safar  <marek.safar@gmail.com>
279
280         A fix for bug #582579
281         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
282
283 2010-03-04  Marek Safar  <marek.safar@gmail.com>
284
285         A patch by kornelpal@gmail.com
286         
287         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
288         compiler generated classes sealed by default. Emit and close top
289         level compiler generated classes as well. 
290         
291         * support.cs: Use RuntimeHelpers.GetHashCode.
292
293 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
294
295         * Makefile: We need to use the internal bootstrapping gmcs for
296         net_2_1_bootstrap too now.
297
298 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
299
300         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
301
302 2010-03-02  Marek Safar  <marek.safar@gmail.com>
303
304         * cs-tokenizer.cs: Missed few locations in previous fix.
305
306 2010-03-02  Marek Safar  <marek.safar@gmail.com>
307
308         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
309         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
310         Report correct location for operator errors.
311
312 2010-03-02  Marek Safar  <marek.safar@gmail.com>
313
314         * typemanager.cs (IsDynamicType): Don't check external types when
315         the attribute is not external.
316
317 2010-02-24  Marek Safar  <marek.safar@gmail.com>
318
319         A fix for bug #582579
320         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
321         modifiers.
322
323 2010-02-24  Marek Safar  <marek.safar@gmail.com>
324
325         A fix for bug #581804
326         * ecore.cs: Fixed type comparison.
327
328 2010-02-08  Miguel de Icaza  <miguel@novell.com>
329
330         * namespace.cs (CompletionGetTypesStartingWith): Do not include
331         private types in the completion results.
332
333         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
334         ... let ?"
335
336 2010-02-17  Marek Safar  <marek.safar@gmail.com>
337
338         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
339         constraint parsing.
340
341 2010-02-14  Miguel de Icaza  <miguel@novell.com>
342
343         * eval.cs: Do not do the report printer dance unless the user has
344         set the DescribeTypes feature.
345
346 2010-02-10  Marek Safar  <marek.safar@gmail.com>
347
348         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
349
350 2010-02-08  Marek Safar  <marek.safar@gmail.com>
351
352         A fix for bug #577029
353         * anonymous.cs: Fixed TypeBuilder* check.
354
355 2010-02-06  Miguel de Icaza  <miguel@novell.com>
356
357         * eval.cs (CompileBlock): Also undo if there are problems during
358         semantic analysis, fixes various cases where invalid C# code would
359         be reported, but the internal changes would not be undone.
360
361 2010-02-03  Miguel de Icaza  <miguel@novell.com>
362
363         * driver.cs: Change the --fatal flag to allow a number to be
364         passed, this ignores the first N fatal errors.   Useful to debug
365         errors that do not happen on the first hit.
366
367         * cs-parser.jay (invocation_expression): accept both the
368         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
369         inside an invocation.
370
371         * driver.cs: Expose FatalErrors.
372
373         * eval.cs: Initialize the printer's Fatal property from the
374         Driver's FatalError flag, this allows csharp --fatal to work
375         again. 
376
377         Add support for calling Describe (typeof (TYPE)) if the expression
378         entered is a TYPE.
379         
380 2010-02-02  Marek Safar  <marek.safar@gmail.com>
381
382         A fix for bug #574991
383         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
384         --lint.
385
386 2010-02-02  Marek Safar  <marek.safar@gmail.com>
387
388         A fix for bug #575986
389         * expression.cs: Don't mutate typeof type definitions.
390
391 2010-01-28  Marek Safar  <marek.safar@gmail.com>
392
393         * decl.cs: Use only one set of modifiers.
394
395 2010-01-26  Marek Safar  <marek.safar@gmail.com>
396
397         A fix for bug #573329
398         * eval.cs: Don't disable error reporting completely on silent mode.
399         
400 2010-01-25  Marek Safar  <marek.safar@gmail.com>
401
402         A fix for bug #573312
403         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
404         pointer index of unknown size types greater than 2.
405
406 2010-01-15  Marek Safar  <marek.safar@gmail.com>
407
408         * *.cs: Use only 1 member kind enum.
409
410 2010-01-15  Marek Safar  <marek.safar@gmail.com>
411
412         * *.cs: Add event specification.
413
414 2010-01-14  Marek Safar  <marek.safar@gmail.com>
415
416         * membercache.cs: Extracted from decl.cs.
417         
418         * *.cs: Put more infrastructure in place.
419
420 2010-01-13  Marek Safar  <marek.safar@gmail.com>
421
422         * *.cs: Add property specification, unused yet.
423
424 2010-01-13  Marek Safar  <marek.safar@gmail.com>
425
426         * property.cs: Move all property based declarations into a new file.
427
428 2010-01-13  Marek Safar  <marek.safar at gmail.com>
429
430         * expression.cs (Conditional): Resolve reduced expression.
431
432 2010-01-13  Marek Safar  <marek.safar at gmail.com>
433
434         * *.cs: Introduced non-generic method specification.
435
436 2010-01-07  Marek Safar  <marek.safar@gmail.com>
437
438         * method.cs: Move all method based declarations into a new file.
439
440 2010-01-07  Marek Safar  <marek.safar@gmail.com>
441
442         * *.cs: Extract field specification.
443
444 2009-12-17  Marek Safar  <marek.safar@gmail.com>
445
446         * field.cs: Extracted from class.cs
447
448 2009-12-15  Marek Safar  <marek.safar@gmail.com>
449
450         * attribute.cs (GetFixedBuffer): Work on field definition only.
451
452 2009-12-15  Marek Safar  <marek.safar@gmail.com>
453
454         * *.cs: Clean up NET_4_0 conditional where possible.
455
456 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
457
458         support.cs (DynamicType): Assembly property returns the assembly builder.
459         This is required due to how compiler context works in corlib.
460
461 2009-12-14  Marek Safar  <marek.safar@gmail.com>
462
463         A fix for bug #564376
464         * assign.cs (LocalTemporary): Removed no longer needed special
465         by-ref handling.
466
467 2009-12-11  Marek Safar  <marek.safar@gmail.com>
468
469         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
470         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
471         enum for easier debugging.
472
473 2009-12-10  Marek Safar  <marek.safar@gmail.com>
474
475         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
476         point.
477         
478         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
479         directly.
480
481 2009-12-10  Marek Safar  <marek.safar@gmail.com>
482
483         * cs-parser.jay, statement.cs: Handle parser error in code
484         completition.
485
486 2009-12-10  Marek Safar  <marek.safar@gmail.com>
487
488         * ecore.cs: Ignore base imported methods when they are already
489         in method bag.
490         
491         * eval.cs: Handle non-existent keys.
492         
493         * report.cs, driver.cs: Make fatal work with console printer only.
494
495 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
496
497         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
498
499 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
500
501         * typemanager.cs: Add MakeGenericMethod that checks if the method
502         is really the generic method definition.
503
504         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
505         to inflate generic methods.
506
507 2009-12-08  Marek Safar  <marek.safar@gmail.com>
508
509         A fix for bug #561149
510         * anonymous.cs: Use actual type parameters when checking for generic
511         method host.
512
513 2009-12-08  Marek Safar  <marek.safar@gmail.com>
514
515         A fix for bug #561369
516         * expression.cs (DoNumericPromotion): Fixed typo.
517
518 2009-12-08  Marek Safar  <marek.safar@gmail.com>
519
520         *.cs: Moving to generics world.
521
522         cs-parser.jay: Removed current_array_type.
523
524 2009-12-07  Marek Safar  <marek.safar@gmail.com>
525
526         *.cs: Moving to generics world.
527
528 2009-12-04  Marek Safar  <marek.safar@gmail.com>
529
530         *.cs: Moving to generics world (day 2).
531
532 2009-12-03  Marek Safar  <marek.safar@gmail.com>
533
534         *.cs: Moving to generics world.
535
536 2009-12-02  Marek Safar  <marek.safar@gmail.com>
537
538         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
539         Encode dynamic type attribute for elements where attributes cannot
540         be used.
541
542 2009-12-01  Marek Safar  <marek.safar@gmail.com>
543
544          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
545          arguments by ref.
546
547 2009-12-01  Marek Safar  <marek.safar@gmail.com>
548
549         A fix for bug #360455
550         * class.cs: Never report a unused warning for generic events to
551         workaround wrong expression type.
552
553 2009-11-30  Marek Safar  <marek.safar@gmail.com>
554
555         A fix for bug #558305
556         * decl.cs, class.cs: Check partial method definitions using correct
557         flag.
558
559 2009-11-30  Marek Safar  <marek.safar@gmail.com>
560
561         * argument.cs: Don't cache rarely used dynamic flag.
562
563 2009-11-27  Marek Safar  <marek.safar@gmail.com>
564
565         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
566
567 2009-11-27  Marek Safar  <marek.safar@gmail.com>
568
569         * ecore.cs (SimpleName): Removed no longer needed in_transit as
570         Resolve is now non-reentrant (saves ~0.6MB for corlib).
571
572 2009-11-26  Marek Safar  <marek.safar@gmail.com>
573
574         A fix for bug #545081
575         * decl.cs: Check private nested types of nested types recursively.
576
577 2009-11-26  Marek Safar  <marek.safar@gmail.com>
578
579         A fix for bug #558305
580         * location.cs: Ignore self referencing #line directive
581
582 2009-11-26  Marek Safar  <marek.safar@gmail.com>
583
584         A fix for bug #558292
585         * class.cs: Allow single unsafe fixed buffer fields.
586
587 2009-11-26  Marek Safar  <marek.safar@gmail.com>
588
589         * expression: Optimize few more zero-based operations.
590
591 2009-11-26  Marek Safar  <marek.safar@gmail.com>
592
593         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
594         avoids boxing of literal values.
595
596 2009-11-26  Marek Safar  <marek.safar@gmail.com>
597
598         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
599         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
600         codegen.cs: LocatedToken redesing to avoid excessive allocation and
601         boxing (saves ~7MB for corlib). Also fixes presise token location.
602
603 2009-11-25  Marek Safar  <marek.safar@gmail.com>
604
605         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
606         common data buckers.
607
608 2009-11-24  Marek Safar  <marek.safar@gmail.com>
609
610         * expression.cs: Lower static array initializer barrier.
611         
612         * support.cs, driver.cs: Share reader buffer.
613
614 2009-11-23  Marek Safar  <marek.safar@gmail.com>
615
616         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
617
618 2009-11-23  Marek Safar  <marek.safar@gmail.com>
619
620         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
621         cleanup some obsolete code.
622
623 2009-11-20  Marek Safar  <marek.safar@gmail.com>
624
625         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
626         Expression.Resolve.
627
628 2009-11-20  Marek Safar  <marek.safar@gmail.com>
629
630         * *.cs: Resolved expressions are never resolved again, this helps to
631         uncover some not easy to find bugs and improve the performance.
632
633 2009-11-19  Marek Safar  <marek.safar@gmail.com>
634
635         * *.cs: Made constant expressions fully compatible with any other
636         expression.
637
638 2009-11-19  Marek Safar  <marek.safar@gmail.com>
639
640         * *.cs: DoResolve is a worker method and has to be protected.
641
642 2009-11-18  Marek Safar  <marek.safar@gmail.com>
643
644         * *.cs: More context specific handling.
645
646 2009-11-17  Marek Safar  <marek.safar@gmail.com>
647
648         * *.cs: More context specific handling.
649
650 2009-11-16  Marek Safar  <marek.safar@gmail.com>
651
652         * dynamic.cs, class.cs: Removed few fixed user types conversions.
653         
654         * symbolwriter.cs: Uses public ILOffset.
655
656 2009-11-13  Marek Safar  <marek.safar@gmail.com>
657
658         A fix for bug #553650
659         * generic.cs: Another missing TypeToCoreType, still too many to fix.
660
661 2009-11-13  Marek Safar  <marek.safar@gmail.com>
662
663         A fix for bug #555170
664
665         * class.cs, delegate.cs, enum.cs: Constants have to be available
666         for parameters resolve.
667
668 2009-11-12  Marek Safar  <marek.safar@gmail.com>
669
670         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
671         arrays.
672
673 2009-11-12  Marek Safar  <marek.safar@gmail.com>
674
675         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
676         with a statically known candidate set.
677
678 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
679
680         * generic.cs: Made type inflation for generic constraint checks
681         recursive. This fixes BGO #553655.
682
683 2009-11-11  Marek Safar  <marek.safar@gmail.com>
684
685         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
686         checks.
687
688 2009-11-10  Marek Safar  <marek.safar@gmail.com>
689
690         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
691         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
692         attribute.cs: Add some dynamic error checking.
693
694 2009-11-07  Marek Safar  <marek.safar@gmail.com>
695
696         A fix for bug #553465
697
698         * expression.cs: Fixed mixed version of expression tree anonymous
699         type.
700
701 2009-11-06  Marek Safar  <marek.safar@gmail.com>
702
703         A fix for bug #553031
704
705         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
706         expression tree version of anonymous type with members declaration.
707
708 2009-11-05  Marek Safar  <marek.safar@gmail.com>
709
710         * parameter.cs: Handle nullable parameter default expression.
711         
712         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
713         class.cs, attribute.cs: Check for wrong dynamic arguments.
714
715 2009-11-05  Marek Safar  <marek.safar@gmail.com>
716
717         * statement.cs: Dynamic statements.
718
719 2009-11-04  Marek Safar  <marek.safar@gmail.com>
720
721         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
722         Compound assignments over dynamic type.
723
724 2009-11-03  Marek Safar  <marek.safar@gmail.com>
725
726         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
727         constructor arguments.
728
729 2009-10-30  Marek Safar  <marek.safar@gmail.com>
730
731         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
732         codegen.cs: Unary mutator on dynamic member access expression.
733
734 2009-10-29  Marek Safar  <marek.safar@gmail.com>
735
736         A fix for bug #550580   
737         * convert.cs: Don't eliminate explicit precission casts.
738
739 2009-10-28  Marek Safar  <marek.safar@gmail.com>
740
741         A fix for bug #550404
742         
743         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
744         expression.cs, statement.cs, ecore.cs: Quote any nested expression
745         tree.
746
747 2009-10-27  Marek Safar  <marek.safar@gmail.com>
748
749         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
750         constant.
751         
752         * class.cs: Allow nullable binary user operators.
753
754 2009-10-26  Marek Safar  <marek.safar@gmail.com>
755
756         * expression.cs: Move binary expression optimization at the end of
757         resolve.
758
759 2009-10-23  Marek Safar  <marek.safar@gmail.com>
760
761         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
762         Separate NullConstant from NullLiteral.
763
764 2009-10-23  Marek Safar  <marek.safar@gmail.com>
765
766         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
767         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
768         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
769         ModuleContainer. Add common unclosed member check routine.
770
771 2009-10-22  Marek Safar  <marek.safar@gmail.com>
772
773         * argument.cs: Use literal flag for real literals only.
774
775         * dynamic.cs: Use correct return type for custom delegates.
776
777 2009-10-22  Marek Safar  <marek.safar@gmail.com>
778
779         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
780         resolver.
781
782 2009-10-22  Marek Safar  <marek.safar@gmail.com>
783
784         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
785
786 2009-10-21  Marek Safar  <marek.safar@gmail.com>
787
788         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
789         conversion.
790
791 2009-10-21  Marek Safar  <marek.safar@gmail.com>
792
793         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
794         binder flags.
795
796 2009-10-20  Marek Safar  <marek.safar@gmail.com>
797
798         * argument.cs, dynamic.cs, expression.cs: Latest API update.
799
800 2009-10-19  Marek Safar  <marek.safar@gmail.com>
801
802         * typemanager.cs, expression.cs: Dynamic array initializer.
803
804 2009-10-16  Marek Safar  <marek.safar@gmail.com>
805
806         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
807         is imported.
808
809 2009-10-16  Marek Safar  <marek.safar@gmail.com>
810
811         A fix for bug #493523, #507067
812         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
813         standard nullable conversion using underlying standard conversion
814         and not full conversion.
815
816 2009-10-15  Marek Safar  <marek.safar@gmail.com>
817
818         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
819         type in VerifyArgumentsCompat.
820
821 2009-10-15  Marek Safar  <marek.safar@gmail.com>
822
823         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
824         Reject variable used with type arguments.
825
826 2009-10-14  Marek Safar  <marek.safar@gmail.com>
827
828         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
829         Implement dynamic expressions assignment.
830
831 2009-10-14  Marek Safar  <marek.safar@gmail.com>
832
833         * expression.cs: Build underlying expression when resolving unary
834         mutators.
835
836 2009-10-14  Marek Safar  <marek.safar@gmail.com>
837
838         * expression.cs: Emit enum array initializer using binary blob.
839
840 2009-10-08  Marek Safar  <marek.safar@gmail.com>
841
842         * typemanager.cs, constant.cs: Optimize decimal constants which fit
843         to long range.
844
845 2009-10-07  Marek Safar  <marek.safar@gmail.com>
846
847         * typemanager.cs: Reset object_type.
848         
849         * assign: Made SimpleAssign public.
850
851 2009-10-06  Marek Safar  <marek.safar@gmail.com>
852
853         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
854         invocation assembly to IsThisOrFriendAssembly.
855
856 2009-10-05  Marek Safar  <marek.safar@gmail.com>
857
858         * expression.cs: Equality comparison of generic parameter with
859         class constraint.
860
861 2009-10-05  Marek Safar  <marek.safar@gmail.com>
862
863         A fix for bug #543570
864         * generic.cs: Import predefined constraints correctly.
865
866 2009-10-02  Marek Safar  <marek.safar@gmail.com>
867
868         * ecore.cs: Don't crash on overloads with optional paremeters where
869         arguments count overflows.
870         
871         * parameter.cs: Import optional parameter constants using optional
872         value type.
873
874 2009-10-01  Marek Safar  <marek.safar@gmail.com>
875
876         * Makefile: Default is gmcs compiler.
877
878 2009-10-01  Marek Safar  <marek.safar@gmail.com>
879
880         * cs-parser.jay: Fixed few NRE.
881
882 2009-10-01  Marek Safar  <marek.safar@gmail.com>
883
884         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
885
886 2009-09-30  Marek Safar  <marek.safar@gmail.com>
887
888         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
889         ShimExpression, ImplicitCast.
890
891 2009-09-30  Marek Safar  <marek.safar@gmail.com>
892
893         A fix for bug #542959
894         * delegate.cs: Emit correct delegate instance variable when there
895         are static and non-static overloads.
896
897 2009-09-29  Marek Safar  <marek.safar@gmail.com>
898
899         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
900         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
901
902 2009-09-28  Marek Safar  <marek.safar@gmail.com>
903
904         A fix for bug #542487
905         * ecore.cs: Resolve extension methods hidden by properties.
906
907 2009-09-25  Marek Safar  <marek.safar@gmail.com>
908
909         * expression.cs, ecore.cs: More dynamic binary expressions.
910
911 2009-09-22  Marek Safar  <marek.safar@gmail.com>
912
913         * nullable.cs, expression.cs: Fixed null lifted conversion for
914         bitwise enum operations.
915
916 2009-09-22  Marek Safar  <marek.safar@gmail.com>
917
918         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
919         values in checked context.
920
921 2009-09-22  Marek Safar  <marek.safar@gmail.com>
922
923         * expression.cs, ecore.cs: Fixed array index constant conversion.
924
925 2009-09-20  Miguel de Icaza  <miguel@novell.com>
926
927         * expression.cs: Do not crash when MemberLookup returns something
928         that is not a MemberExpr here.   Report error 582 instead. 
929
930         Fixes #499988.
931
932 2009-09-18  Marek Safar  <marek.safar@gmail.com>
933
934         * decl.cs, class.cs: Check protected property accessors.
935
936 2009-09-18  Marek Safar  <marek.safar@gmail.com>
937
938         * dynamic.cs, assign.cs: Dynamic compound assignment.
939
940 2009-09-17  Marek Safar  <marek.safar@gmail.com>
941
942         * expression.cs: Fixed compound assignment explicit conversion.
943
944 2009-09-17  Marek Safar  <marek.safar@gmail.com>
945
946         * expression.cs, ecore.cs: Cannot infer variables from method group.
947
948 2009-09-16  Marek Safar  <marek.safar@gmail.com>
949
950         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
951         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
952         codegen.cs: Dynamic binary operations scaffolding.
953
954 2009-09-15  Marek Safar  <marek.safar@gmail.com>
955
956         * expression.cs: Fixes nullable promotion for enum type variables.
957
958 2009-09-11  Marek Safar  <marek.safar@gmail.com>
959
960         * driver.cs, dynamic.cs: Reset more static variables.
961
962 2009-09-11  Marek Safar  <marek.safar@gmail.com>
963
964         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
965         driver.cs: Introduced Expression::MakeExpression.
966
967 2009-09-11  Marek Safar  <marek.safar@gmail.com>
968
969         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
970
971 2009-09-09  Marek Safar  <marek.safar@gmail.com>
972
973         * eval.cs, report.cs: Use Console.Out for all eval error or warning
974         output.
975
976 2009-09-09  Marek Safar  <marek.safar@gmail.com>
977
978         A fix for bug #518707
979         * expression.cs (Is): Optimize only generic parameter type
980         expression probing value type generic parameter.
981
982 2009-09-09  Marek Safar  <marek.safar@gmail.com>
983
984         A fix for bug #532571
985         * ecore.cs: Check for simple name type arguments used with
986         non-generic type.
987
988 2009-09-08  Marek Safar  <marek.safar@gmail.com>
989
990         A fix for bug #497421
991         * generic.cs (CheckConstraint): Don't use buildin types to check for
992         parameterless constructor.
993
994 2009-09-08  Marek Safar  <marek.safar@gmail.com>
995
996         A fix for bug #537402
997         * generic.cs (CheckConstraint): Correctly inflate generic type
998         arguments when checking generic method. 
999
1000 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1001
1002         A fix for bug #536463
1003         * decl.cs (AddToContainer): Don't report collision between explicit
1004         and parameterless non-explicit members.
1005
1006 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1007
1008         * eval.cs: Reset more static stuff.
1009
1010 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1011
1012         A fix for bug #324625
1013         * expression.cs, ecore.cs: Create nested generic type expression
1014         using declaring and not current type.
1015
1016 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1017
1018         * *.cs: Changed Report class to accept various output printers and
1019         be an instance class. An expression resolver can now use different
1020         message reporter for each call and Report.Error can safely throw
1021         an exception. Part of ongoing work to turn mcs into proper library.
1022
1023 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1024
1025         * statement.cs, ecore.cs: Removed error reporting from emit code.
1026
1027 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1028
1029         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1030
1031 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1032
1033         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1034         parser checks out of constructors.
1035
1036 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1037
1038         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1039
1040 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1041
1042         A fix for bug #535448
1043         * anonymous.cs, class.cs: Copy return label between all contexts.
1044
1045 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1046
1047         A fix for bug #535395
1048         * namespace.cs: Resolve context can be null.
1049
1050 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1051
1052         A fix for bug #533912
1053         * generic.cs: Use correct context for constraints resolving.
1054
1055 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1056
1057         A fix for bug #532630
1058         * driver.cs: Trim conditional symbols.
1059
1060 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1061
1062         * context.cs: New file.
1063         
1064         * *.exe.sources, *.csproj: Updated.
1065
1066 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1067
1068         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1069         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1070         IMembercontext, some small cleanups.
1071
1072 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1073
1074         * *.cs: Split ResolveContext and EmitContext.
1075
1076 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1077
1078         * *.cs: Only ResolveContext implements IMemberContext.
1079
1080 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1081
1082         * *.cs: Renamed IResolveContext to IMemberContext.
1083
1084 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1085
1086         * *.cs: Detached ResolveContext from EmitContext.
1087
1088 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1089
1090         * codegen.cs: Moved flow-analysis to BlockContext.
1091
1092 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1093
1094         * *.cs: Detached BlockContext from EmitContext.
1095
1096 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1097
1098         * statement.cs: avoid nullref when the return value of GetEnumerator()
1099         does not contain any MoveNext() method.
1100
1101 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1102
1103         * *.cs: Removed IResolveContext::GenericDeclContainer.
1104
1105 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1106
1107         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1108
1109 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1110
1111         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1112         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1113
1114 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1115
1116         * *.cs: Removed boolean fields from EmitContext.
1117
1118 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1119
1120         * *.cs: Add IResolveContext::IsStatic.
1121
1122 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1123
1124         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1125
1126 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1127
1128         * *.cs: Removed DeclContainer from EmitContext.
1129
1130 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1131
1132         * *.cs: Add IResolveContext::CurrentTypeParameters.
1133
1134 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1135
1136         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1137
1138 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1139
1140         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1141         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1142
1143 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1144
1145         * decl.cs: Look in PartialContainer for parent type parameters.
1146
1147 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1148
1149         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1150         codegen.cs: Add IResolveContext::LookupTypeParameter.
1151
1152 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1153
1154         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1155         Moved resolved logic from Emit to Resolve.
1156
1157 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1158
1159         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1160         codegen.cs: Reworked atttributes handling of ResolveContext.
1161
1162 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1163
1164         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1165         LookupNamespaceOrType to ResolveContext.
1166
1167 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1168
1169         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1170         class.cs: Removed unused parameters and methods.
1171
1172 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1173
1174         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1175         codegen.cs: Finding the best common type of a set of expressions for
1176         lambda statements.
1177
1178 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1179
1180         * dynamic.cs, expression.cs: More dynamic conversions.
1181
1182 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1183
1184         * generic.cs: This loop was incorrect, it was increment ii, but
1185         checking for `i'.  This was a change introduced to fix #327497,
1186         now we fix #424012.
1187  
1188         * class.cs: Catch another case for cs0533 error, fixes #324782.
1189
1190 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1191
1192         * typemanager.cs (GetGenericArguments): SRE returns null for
1193         generic methods on type builder instances if they are not generic
1194         themselves. For example, for Foo<int>::Bar() it returns null, but
1195         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1196
1197 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1198
1199         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1200         delegate.cs: Work on dynamic binding.
1201
1202 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1203
1204         A second fix for bug #525342
1205         * class.cs: Attach partial method attributes to method
1206         implementation.
1207
1208 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1209
1210         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1211         restrictions.
1212         
1213         * rootcontext.cs: Default to langversion v4.
1214
1215 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1216
1217         * pending.cs: Check return type before member info is set.
1218
1219 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1220
1221         * anonymous.cs: Fully initialize generic hoisted field expression.
1222
1223 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1224
1225         * cs-parser.jay: Flag variables declared on the interactive shell
1226         as used to prevent the 168 warning about local variable not being
1227         used. 
1228
1229 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1230
1231         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1232         attribute.cs: Emit dynamic export attribute.
1233
1234 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1235
1236         * expression.cs: More verifier work.
1237
1238 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1239
1240         * nullable.cs: Fixed SRE crash during corlib compilation.
1241
1242 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1243
1244         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1245         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1246         More TypeManager.TypeToCoreType needed.
1247
1248 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1249
1250         * anonymous.cs: Update after recent SRE fixes.
1251
1252 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1253
1254         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1255         version of GetFieldHandle for fields of generic types.
1256
1257 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1258
1259         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1260         ecore.cs: Add TypeManager.IsDynamicType,
1261         PredefinedAttributes.Dynamic.
1262
1263 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1264
1265         A fix for bug #415375
1266         * expression.cs: Fixed object and reference type parameter
1267         comparison.
1268
1269 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1270
1271         A fix for bug #525342
1272         * class.cs: Attach partial method attributes to method
1273         implementation.
1274
1275 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1276
1277         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1278         Dynamic arguments.
1279
1280 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1281
1282         * anonymous.cs (MutateField): Add imported types handling.
1283
1284 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1285
1286         * expression.cs, delegate.cs: Moved arguments resolve into their
1287         counterparts expressions. Removed argument resolve from
1288         CollectionElementInitializer.
1289
1290 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1291
1292         A fix for bug #523683
1293         * convert.cs, delegate.cs: Use common overload mechanism for method
1294         group conversion check.
1295
1296 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1297
1298         A fix for bug #523899
1299         * generics.cs: Exact type inference with other bound types.
1300
1301 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1302
1303         Don't complain when the same type is implemented by the output
1304         assembly as well as multiple referenced assemblies
1305         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1306         'must_be_unique' flag.
1307         (GlobalRootNamespace): Update to changes.
1308         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1309         already have a type in hand.
1310
1311 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1312
1313         * expression.cs: More verifier instrumentation.
1314         
1315         * statement.cs: Do proper throw expression conversion.
1316
1317 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1318
1319         A fix for bug #522789
1320         * expression.cs: Mutate invocation return type.
1321
1322 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1323
1324         * anonymous.cs: Split assignable and readonly generated variable
1325         references.
1326
1327 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1328
1329         A fix for bug #521671
1330         * statement.cs: Fixed crash when checking missing type.
1331
1332 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1333
1334         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1335         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1336         class.cs, driver.cs: Work on dynamic binding.
1337
1338         * dynamic.cs: New file.
1339
1340         * *.sources, *.proj: Updated.
1341
1342 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1343
1344         * expression.cs (Conditional): Avoid double Resolve.
1345
1346 2009-07-13  Marcus Griep  <marcus@griep.us>
1347
1348         * ecore.cs: Fix obscure bug with resolving members of interfaces
1349         that hide parent interface members. Fixes bug #444388 and corrects
1350         bug #323096
1351
1352 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1353
1354         * expression.cs (LocalVariableReference): Bounce resolve.
1355
1356 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1357
1358         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1359         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1360         types to new class.
1361         
1362         * support.cs: New dynamic type wrapper.
1363
1364 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1365
1366         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1367         typed local variable.
1368
1369 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1370
1371         A fix for bug #519005
1372         * anonymous.cs: Use null_type as no return type placeholder.
1373
1374 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1375
1376         * generic.cs: Handle type inference of identical type parameters
1377         with different bounds.
1378
1379 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1380
1381         * expression.cs, class.cs: Events variance.
1382         
1383         * cs-parser.jay: Interface events error messages.
1384
1385 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1386
1387         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1388
1389 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1390
1391         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1392         parameter expression can be value-type New.
1393
1394         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1395
1396 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1397
1398         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1399         Implemented C# 4.0 named arguments.
1400
1401 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1402
1403         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1404         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1405         parameter modifier. Also fixes bug #515497.
1406
1407 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1408
1409         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1410         arguments expression to be implemented.
1411         
1412         *.sources: Add argument.cs
1413
1414 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1415
1416         * parameter.cs: Moved GetParameterIndexByName to base class.
1417         
1418         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1419         unused AType. Use argument's version of GetExpressionTree.
1420
1421 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1422
1423         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1424         arguments grammar.
1425
1426 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1427
1428         A fix for bug #514096
1429         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1430
1431 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1432
1433         * expression.cs: The first multi-dimensional array nested array
1434         initializers was not checked.
1435         
1436         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1437
1438 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1439
1440         A fix for bug #513400
1441         * nullable.cs (EmitEquality): Operands emit could be simplified for
1442         built-in types when we now emit user operators differently.
1443
1444 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1445
1446         * ecore.cs: Report inaccessible delegate methods correctly.
1447
1448 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1449
1450         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1451         cs-parser.jay: Implemented C# 4.0 optional parameters.
1452
1453 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1454
1455         * driver.cs: Removed broken DefineManifestResource.
1456
1457 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1458
1459         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1460         Use $(BOOTSTRAP_PROFILE) instead.
1461
1462 2009-06-12  Jb Evain  <jbevain@novell.com>
1463
1464         * rootcontext.cs: add a Platform field.
1465         * driver.cs: handle /platform.
1466         * codegen.cs: pass the proper flags according to
1467         the platform when saving the assembly.
1468
1469 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1470
1471         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1472         Add optional parameters grammar.
1473
1474 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1475
1476         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1477         driver.cs: Split lang version and metadata version.
1478
1479 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1480
1481         * decl.cs: Better overload ctor collision error message.
1482
1483 2009-06-05  Jb Evain  <jbevain@novell.com>
1484
1485         * driver.cs (EmbededResource): avoid using an internal method
1486         in gmcs to embed manifest resources.
1487
1488 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1489
1490         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1491         the compiler from older mono versions (like moon's bots)
1492
1493 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1494
1495         * namespace.cs (LookupTypeReflection): Ignore collisions between
1496         forwarded types.
1497
1498 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1499
1500         * codegen.cs: Enabled generic type forwarders.
1501
1502 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1503
1504         * dmcs.*: Add another version of SRE compiler.
1505
1506 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1507
1508         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1509         generic-mcs.cs: Fixed variant type conversions.
1510
1511 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1512
1513         A fix for bug #507863
1514         * codegen.cs: Fixes a crash on invalid string value attribute.
1515
1516 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1517
1518         A fix for bug #508334
1519         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1520         cs-parser.jay: Fully import __arglist modifier.
1521
1522 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1523
1524         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1525         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1526         actually work with closed generic types.
1527
1528 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1529
1530         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1531         Fix the build by replacing the use of 'var' with the actual type.
1532
1533 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1534
1535         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1536     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1537         declarations.
1538           
1539         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1540         filter.
1541
1542 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1543                         Marek Safar  <marek.safar@gmail.com>
1544
1545         A fix for bug #377509
1546         * parameter.cs: Use predefined and not empty name for implicit
1547         setters.
1548
1549 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1550
1551         * class.cs: Don't report wrong warnings for event fields.
1552
1553 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1554
1555         A fix for bug #504667
1556         * class.cs: Check for static class using parent container instead of
1557         parent type.
1558
1559 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1560
1561         A fix for bug #496922
1562         * expression.cs: Always use temporary variable when using object
1563         initializer.
1564
1565 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1566
1567         A fix for bug #495112
1568         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1569         local cache.
1570
1571 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1572
1573         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1574
1575 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1576
1577         * complete.cs: No idea how gonzalo got a null in the list, but
1578         avoid crashing.
1579
1580 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1581
1582         * complete.cs (CompletionElementInitializer): New completion class
1583         to support completing inside a C# 3 element initializer, so this
1584         allows completion for Silverlight situations where it is very
1585         common to do:
1586
1587         new TextBlock () { Fo<TAB>
1588
1589         (CompletionSimpleName): Expose the prefix that was
1590         passed to the simple name.
1591
1592         * cs-parser.jay (object_or_collection_initializer): Add support
1593         for element_initializers.
1594
1595         * expression.cs (CollectionOrObjectInitializers.DoResolve):
1596         special case completion expressions as this method aggressively
1597         collects data before it operates, and errors were being thrown
1598         earlier than we were able to complete.
1599
1600 2009-04-23  Miguel de Icaza  <miguel@novell.com>
1601
1602         * eval.cs: Make getcompletions silent and enable debugging output
1603         if the -v option is passed.
1604
1605         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
1606         Consider looking up the namespace that matches the prefix being
1607         used. 
1608
1609         This is part of the support for allowing completions like:
1610         `System.Co<TAB>' to complete to System.Console.
1611
1612         * complete.cs (CompletionSimpleName.AppendResults): Make this
1613         routine reusable.
1614
1615 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
1616
1617         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
1618         COMPLETE_COMPLETION as internal.
1619
1620 2009-04-17  Miguel de Icaza  <miguel@novell.com>
1621
1622         * complete.cs: Include namespace resolution in simple names as
1623         well as global types and types in the using scope in the
1624         resolution. 
1625
1626         * namespace.cs: Supporting infrastrcture to provide completions
1627         based on the current using scope. 
1628
1629         * eval.cs: Introduce an entry point that allows for initialization
1630         to return a list of the files passed on the command line.
1631
1632 2009-04-14  Marek Safar  <marek.safar@gmail.com>
1633
1634         A fix for bug #494243
1635         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
1636
1637 2009-04-13  Marek Safar  <marek.safar@gmail.com>
1638
1639         A fix for bug #493887
1640         * statement.cs: Don't skip string multi-section with default or
1641         null label when populating string hashtable.
1642
1643 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1644
1645         A fix for bug #492329
1646         * expression.cs (New): Load variable when assigning type parameter
1647         to ref variable.
1648
1649 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1650
1651         A fix for bug #488960
1652         * decl.cs: Compare MVAR types using non-null values.
1653
1654 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1655
1656         * typemanager.cs, expression.cs: Removed unused nullable checks.
1657
1658 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1659
1660         * *.cs: Removed some gmcs conditionals.
1661
1662 2009-03-26  Marek Safar  <marek.safar@gmail.com>
1663
1664         * generic.cs, support.cs: Moved generics stuff out of support.cs
1665
1666 2009-03-24  Marek Safar  <marek.safar@gmail.com>
1667
1668         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
1669         DeclaringType.
1670
1671 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1672
1673         * attribute.cs: Consider all members for error reporting when
1674         checking named arguments.
1675
1676 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1677
1678         A fix for bug #487625
1679         * namespace.cs: Use a warning for all predefined type conflicts.
1680
1681 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1682
1683         A fix for bug #485706
1684         * statement.cs: Explicitly type catch type argument to pass verifier
1685         check.
1686
1687 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1688
1689         Initial support to provide code completion facilities to consumers
1690         of the evaluator API.
1691         
1692         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
1693         support the completion engine.   When we reach the end of the
1694         input stream instead of returning EOF, when this flag is true the
1695         tokenizer instead produces:
1696
1697                 One GENERATE_COMPLETION token: this token then must be
1698                 handled in the grammar at every point where the user
1699                 would likely request a completion.
1700
1701                 As many COMPLETE_COMPLETION tokens as necessary.   These
1702                 tokens are generated to assist the parser in unwinding and
1703                 producing a valid parse tree.    
1704
1705         The parser rules do not have to be perfect, the parser needs to be
1706         augmented with judicious use of GENERATE_COMPLETION tokens to
1707         improve the areas where we can provide completion and the parser
1708         needs to add support for COMPLETE_COMPLETION tokens in productions
1709         to make them work.
1710
1711         It is common to not have enough support for COMPLETE_COMPLETION
1712         under certain rules and that even if we generated the
1713         GENERATE_COMPLETION token that the resulting tree will be invalid
1714         due to the missing rules that support COMPLETE_COMPLETION.
1715
1716         The final EOF token is produced by having the parser notify the
1717         tokenizer when it reaches the root production that the next token
1718         should be EOF.
1719
1720         * support.cs (CompletionResult): New Exception.   This exception
1721         is thrown to return the completion results when one of the special
1722         completion expressions is reached.
1723
1724         This exception is thrown by the completing ExpressionStatements
1725         classes that live in complete.cs
1726
1727         * complete.cs (CompletingExpression): a new base class for
1728         completing expressions.   This derives from the
1729         ExpressionStatement class and not from Expression as it allows
1730         completion to happen not only where expressions are expected in
1731         the grammar, but also where statements are expected.
1732
1733         (CompletionSimpleName): A new class used to provide completions
1734         for SimpleNames.     This currently only resolves to local
1735         variables from the evaluator context (GetVars call).
1736
1737         (CompletionMemberAccess): Implements support for completing member
1738         access patterns. 
1739
1740         * cs-parser.jay: Add support for completion in a few places. 
1741
1742         * eval.cs (GetCompletions): New public API for the evaluator that
1743         returns a list of possible completions given the input.   The
1744         return value is an array of completions 
1745
1746         * anonymous.cs (Compatible): If the exception thrown from the
1747         resolved expression is a CompletionResult exception let that one
1748         through instead of printing a diagnostic error in the try/catch. 
1749 <       
1750 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1751
1752         * 
1753
1754         * driver.cs (Main): Use Environment.Exit to quit quickly and
1755         prevent the compiler from doing the usual wait for helper thread
1756         to terminate.  
1757
1758         This is to prevent a slowdown that was reported by Gonzalo on
1759         ASP.NET 
1760
1761 2009-03-19  Marek Safar  <marek.safar@gmail.com>
1762
1763         * ecore.cs: Load build-in types directly instead of accessing
1764         an internal field.
1765
1766 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1767
1768         * ecore.cs: Always use unbox.any when available.
1769
1770 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1771
1772         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
1773
1774 2009-03-17  Marek Safar  <marek.safar@gmail.com>
1775
1776         * generic.cs: Removed obsolete version of type inference.
1777
1778 2009-03-16  Marek Safar  <marek.safar@gmail.com>
1779
1780         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
1781         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
1782         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
1783         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
1784
1785 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1786
1787         A fix for bug #482996
1788         * anonymous.cs: Make sure we are not infering return type when
1789         checking type compatibility.
1790
1791 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1792
1793         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
1794         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
1795         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
1796         attributes in their own structure. Needed when accessing their
1797         properties before they are resolved.
1798
1799 2009-03-09  Marek Safar  <marek.safar@gmail.com>
1800
1801         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
1802         hashtable (~10x faster).
1803         
1804         * driver.cs: Removed wrong Reset.
1805
1806 2009-03-08  Marek Safar  <marek.safar@gmail.com>
1807
1808         * class.cs: Use correct common base type for unmanaged delayed
1809         check.
1810
1811         * rootcontext.cs: Wrap unhandled exception.
1812
1813 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
1814
1815         Make SeekableStreamReader self-tuning and arbitrarily seekable
1816         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
1817         the buffer.
1818         (SeekableStreamReader.Position.set): Use it.  Simplify logic
1819         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
1820         buffer size when the stream needs to be re-read from the beginning.
1821
1822 2009-03-05  Marek Safar  <marek.safar@gmail.com>
1823
1824         A fix for bug #480100
1825         * parameter.cs: A parameter is not hoisted when used directly as ET.
1826
1827 2009-03-04  Marek Safar  <marek.safar@gmail.com>
1828
1829         * statement.cs: Fixed an issue when using variable is of interface
1830         type.
1831
1832 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1833
1834         A fix for bug #480319
1835         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
1836
1837 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1838
1839         A fix for bug #480867
1840         * typemanager.cs, expression.cs, ecore.cs: Changed method group
1841         expression to have no valid type.
1842
1843 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1844
1845         A fix for bug #481258
1846         * class.cs: Set extension method flag in partial container.
1847
1848 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1849
1850         * statement.cs, typemanager.cs: Use expression for StringEmitter.
1851         
1852         * attribute.cs: Add sanity check.
1853
1854 2009-02-27  Marek Safar  <marek.safar@gmail.com>
1855
1856         * class.cs: Add external constructor error.
1857
1858 2009-02-26  Marek Safar  <marek.safar@gmail.com>
1859
1860         A fix for bug #475354
1861         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
1862         correctly user defined nullable equality operators.
1863
1864 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1865
1866         A fix for bug #479532
1867         * expression.cs: Implement NewInitialize::AddressOf.
1868
1869 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1870
1871         A fix for bug #413633
1872         * expression.cs: Iterate all base class-constraint types.
1873
1874 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1875
1876         A fix for bug #479209
1877         * literal.cs: Mutate null underlying type.
1878
1879 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1880
1881         A fix for bug #476295
1882         * convert.cs: Avoid wrapping implicitly convertible reference type.
1883
1884 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1885
1886         * iterators.cs: Create MemberName correctly.
1887
1888 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1889
1890         A fix for bug #478655
1891         * literal.cs: Check also underlying null type conversion.
1892
1893 2009-02-21  Marek Safar  <marek.safar@gmail.com>
1894
1895         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
1896
1897 2009-02-20  Marek Safar  <marek.safar@gmail.com>
1898
1899         A fix for bug #477447
1900         * statement.cs: Add reference to correct parent storey when this
1901         is accessible from deep children storey (more than 1 level).
1902
1903 2009-02-19  Marek Safar  <marek.safar@gmail.com>
1904
1905         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
1906         * class.cs: Define base type members before setting up member cache.
1907
1908 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1909
1910         A fix for bug #477378
1911         * nullable.cs, expression.cs, statement.cs: More precise null type
1912         sanity checks.
1913
1914 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1915
1916         A fix for bug #472805
1917         * typemanager.cs, namespace.cs: Import only visible extension method
1918         types.
1919
1920 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1921
1922         A fix for bug #476895
1923         * attribute.cs: Use correct resolve context for attribute type.
1924
1925 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1926
1927         A fix for bug #476266
1928         * anonymous.cs: Mutate multi-dimensional arrays.
1929
1930 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1931
1932         A fix for bug #476400
1933         * statement.cs, expression.cs: Removed wrong Dispose optimization.
1934
1935 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1936
1937         A fix for bug #476811
1938         * generics.cs: Fixed null-literal check.
1939
1940 2009-02-17  Marek Safar  <marek.safar@gmail.com>
1941
1942         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
1943         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
1944         messing with static variables.
1945
1946 2009-02-16  Marek Safar  <marek.safar@gmail.com>
1947
1948         A fix for bug #475965
1949         * generics.cs: Check generic parameter type after extracting from
1950         Expression<T>.
1951
1952 2009-02-16  Marek Safar  <marek.safar@gmail.com>
1953
1954         A fix for bug #475823
1955         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
1956         typed-null support.
1957
1958 2009-02-14  Marek Safar  <marek.safar@gmail.com>
1959
1960         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
1961         Simplified event field definition using backing field and not
1962         field builder directly.
1963
1964         * expression.cs (EmitLdArg): Optimize fast paths.
1965
1966 2009-02-13  Marek Safar  <marek.safar@gmail.com>
1967
1968         A fix for bug #475327
1969         * expression.cs (ArrayCreation): Don't mutate values optimized away.
1970
1971 2009-02-13  Marek Safar  <marek.safar@gmail.com>
1972
1973         A fix for bug #475342
1974         * cs-parser.jay: Using 'super' instead of 'base' to call base
1975         constructor crashes compiler.
1976
1977 2009-02-13  Marek Safar  <marek.safar@gmail.com>
1978
1979         A fix for bug #475354
1980         * expression.cs (Constantify): Add nullable types.
1981         
1982         * const.cs (EmitDecimalConstant): Avoid explicit cast.
1983
1984 2009-02-12  Marek Safar  <marek.safar@gmail.com>
1985
1986         A fix for bug #475246
1987         * expression.cs: More broken flowanalysis hacking needed.
1988
1989 2009-02-12  Marek Safar  <marek.safar@gmail.com>
1990
1991         * attribute.cs: Compare only ref/out array modifiers. 
1992
1993 2009-02-11  Marek Safar  <marek.safar@gmail.com>
1994
1995         * statement.cs: Use member cache when looking for foreach members.
1996
1997 2009-02-11  Marek Safar  <marek.safar@gmail.com>
1998
1999         * expression.cs: Don't expose internal initializer types.
2000         
2001         * statement.cs: Check also explicit conversions for goto case.
2002
2003 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2004
2005         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2006
2007 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2008
2009         * *.cs: Replace null-type with NullLiteral where appropriate.
2010
2011 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2012
2013         * expression.cs: Initializer of reference argument use temporary
2014         variable to be verifiable.
2015         
2016         * parameter.cs: Share EmitLdArg.
2017
2018 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2019
2020         A fix for bug #473559
2021         * class.cs: Fixed: Not reporting error about nested class with the
2022         same name.
2023
2024 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2025
2026         Contributed under the MIT/X11 license.
2027
2028         * generic.cs: Added VerifyVariantTypeParameters which performs new
2029         variance verification logic. The old logic, based on the spec, was
2030         wrong because the spec is full of LIES!
2031
2032         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2033
2034         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2035
2036         * class.cs:
2037         * ecore.cs: Added calls to the new variance verification logic.
2038
2039         * parameter.cs:
2040         * delegate.cs: Removed calls to the old variance verification logic.
2041
2042 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2043
2044         * delegate.cs: Use cached Invoke method directly.
2045
2046 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2047
2048         * expression.cs: Emit expression tree for hoisted variable access.
2049
2050 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2051
2052         * namespace.cs: Add better extension class check.
2053
2054 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2055
2056         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2057
2058 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2059
2060         This patch adds initial generic variance support to the compiler.
2061         It is contributed under the MIT/X11 license.
2062
2063         * typemanager.cs: Modified ImplementsInterface to check variance.
2064         Added VerifyVariantTypeParameters which checks the specified type to see
2065         if it uses a variant type parameter as a type argument (which is not
2066         allowed). Added IsVariantOf which determins if the first type is a
2067         variant of the second. NOTE: This only supports reference types at
2068         the moment to conform with the current level of VM support. When the
2069         VM supports value types, this will follow step.
2070
2071         * generic.cs: Added the Variance enum. Added a Variance property to
2072         TypeParameter and added variance support to definition phase. Added a
2073         Variance property to TypeParameterName. Also check to make sure that
2074         no variant types appear in generic method parameters.
2075
2076         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2077         keywords if the langversion supports it.
2078
2079         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2080         that variant types are only used in legal positions. Also added
2081         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2082         parameters.
2083
2084         * decl.cs: Construct TypeParameter with the variance information.
2085
2086         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2087         and ImplicitConversionStandard.
2088
2089         * rootcontext.cs: Added new "Future" language version.
2090
2091         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2092         type parameters are not used as type arguments in interface inheritance.
2093         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2094         parameters are not used as method return types. In MemberBase.
2095         ResolveMemberType, ensure that variant type parameters are not used
2096         as type arguments. Also call VerifyNoVariantTypeParameters on every
2097         set of parameters which are resolved.
2098
2099         * delegate.cs: Modified Delegate.Define to ensure that variant
2100         parameters are not used as type arguments and that a contravariant
2101         parameter is not used as the return type. Also call
2102         VerifyNoVariantTypeParameters on the delegate parameters.
2103
2104         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2105         to specify generic variance.
2106
2107         * driver.cs: Added support for LanguageVersion.Future in the form of
2108         "-langversion:future".
2109
2110         * generic-mcs.cs: Stubbed out new members in generic.cs.
2111
2112 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2113
2114         * class.cs, generic.cs: Emit type parameter constraints for nested
2115         types.
2116
2117 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2118
2119         A fix for bug #471213
2120         * class.cs: Avoid emitting backing field for abstract event fields.
2121
2122 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2123
2124         A fix for bug #359731
2125         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2126         expressions.
2127
2128 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2129
2130         A fix for bug #470767
2131         * statement.cs: Introduced BlockScopeExpression, needed when 
2132         expression tree conversion has to emit scope variables.
2133
2134 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2135
2136         * class.cs: Remove duplicate CallingConvention.
2137
2138 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2139
2140         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2141         when I finally found the right naming convention.
2142
2143 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2144
2145         * cs-tokenizer.cs: Put back different open parens optimization.
2146
2147 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2148
2149         A fix for bug #470227
2150         * cs-tokenizer.cs: Remove too agressive parser optimization.
2151
2152 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2153
2154         A fix for bug #324319
2155         * class.cs: Remove too early base type resolve.
2156
2157 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2158
2159         A fix for bug #324319
2160         * ecore.cs: Explicitly type null when assigning to type argument to
2161         make pass verifier check.
2162
2163 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2164
2165         * anonymous.cs: Fixed recent regression when initializing captured 
2166         this.
2167
2168 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2169
2170         A fix for bug #469019
2171         * anonymous.cs: Use all parent type parameters when instantiating
2172         nested generic storey.
2173
2174 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2175
2176         * expression.cs: Check for null instance methodgroup expression.
2177
2178 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2179
2180         A fix for bug #469244
2181         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2182         instance inside a conditional expression.
2183
2184 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2185
2186         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2187         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2188         GetElementType and HasElementType. IsValueType clean up.
2189
2190 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2191
2192         * nullable.cs: Use common EmitCall.
2193         
2194         * expression.cs: Emit constraint. for virtual calls only.
2195
2196 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2197
2198         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2199         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2200         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2201         checks.
2202
2203 2009-01-22  Jb Evain  <jbevain@novell.com>
2204
2205         * anonymous.cs: make anonymous types' ToString implementation
2206         match what csc outputs.
2207
2208 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2209
2210         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2211         up.
2212
2213 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2214
2215         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2216         verifier checks.
2217
2218 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2219
2220         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2221         expressions.
2222
2223 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2224
2225         A fix for bug #466634
2226         * statement.cs: Add reference for nested storey when only this
2227         is captured.
2228
2229 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2230
2231         A fix for bug #466474
2232         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2233         was specified.
2234
2235 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2236
2237         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2238         Fixed nested stories parent referencing process. Also fixes #463985.
2239
2240 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2241
2242         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2243         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2244         implementation. Also fixes #463108.
2245
2246 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2247
2248         A fix for bug #416109
2249         * decl.cs: Issue correct CLSAttribute warning location.
2250
2251 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2252
2253         A fix for bug #456775
2254         * attribute.cs: Use attribute owner scope when resolving attribute
2255         arguments.
2256
2257 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2258
2259         A fix for bug #457257
2260         * decl.cs: Fixed incorrect member declaring type comparison.
2261
2262 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2263
2264         A fix for bug #460896
2265         * driver.cs: Handle /RES resources as embeddable.
2266
2267 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2268
2269         A fix for bug #462515
2270         * ecore.cs: Report inacessible members upwards.
2271
2272 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2273
2274         A fix for bug #463190, #463192
2275         * decl.cs, namespace.cs: Also import internal extension classes.
2276
2277 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2278
2279         A fix for bug #463415
2280         * generic.cs: Use right index for RemoveDependentTypes.
2281
2282 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2283
2284         A fix for bug #463196
2285         * expression.cs: Fixed enum to null comparison.
2286
2287 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2288
2289         A fix for bug #463121
2290         * nullable.cs: Fixed nullable user equality operator comparison.
2291
2292 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2293
2294         A fix for bug #462950
2295         * class.cs, decl.cs: Use full explicit name when defining automatic
2296         property backing field.
2297
2298 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2299
2300         A fix for bug #462592
2301         * pending.cs: Emit type arguments for generic proxy method.
2302
2303 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2304
2305         * expression.cs (As): Mutate all type arguments.
2306
2307 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2308
2309         A fix for bug #462622
2310         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2311         context.
2312
2313 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2314
2315         A fix for bug #450782
2316         * ecore.cs: Consider more variables of form V.I to be fixed.
2317
2318 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2319
2320         A fix for bug #460712
2321         * typemanager.cs: Core types could be imported.
2322
2323 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2324
2325         A fix for bugs #460847, #460772, #458049, #457339, #447807
2326         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2327         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2328         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2329         user lambdas used inside query clauses.
2330
2331 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2332
2333         A fix for bug #460229
2334         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2335
2336 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2337
2338         A fix for bug #459952
2339         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2340
2341 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2342
2343         A fix for bug #459630
2344         * convert.cs: Enum to valuetype conversion is not allowed.
2345
2346 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2347
2348         A fix for bug #457087
2349         * generic.cs: Don't crash when constraint comes from type
2350         declaration.
2351
2352 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2353
2354         A fix for bug #459221
2355         * anonymous.cs, statement.cs: Delay only captured this
2356         initialization.
2357
2358 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2359
2360         A fix for bug #457489
2361         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2362         and initialization to capture scope initializers correctly.
2363
2364 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2365
2366         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2367         ParameterReference refactoring.
2368
2369 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2370
2371         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2372         to be imported from any assembly.
2373
2374 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2375
2376         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2377         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2378         from anonymous method and lambda expression.
2379
2380 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2381
2382         A fix for bug #448560
2383         * expression.cs (As): Box any generic type arguments to be
2384         verifiable.
2385
2386 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2387
2388         Add tripwire for implicit conversion bugs
2389         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2390         for CS1501 error.
2391         (MethodGroupExpr.OverloadResolve): Add sanity check between
2392         IsApplicable and VerifyArgumentsCompat.
2393         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2394
2395 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2396
2397         Fix build break in System.Data_test
2398         * convert.cs (ImplicitConversionExists): Move NullLiteral
2399         conversions ...
2400         (ImplicitStandardConversionExists): ... here.
2401
2402 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2403
2404         * literal.cs: Emit correctly explicit null to nullable cast.
2405
2406 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2407
2408         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2409         resolve.
2410
2411 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2412
2413         A fix for bug #449005
2414         * convert.cs, nullable.cs: Use only one implicit nullable
2415         conversion.
2416
2417 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2418
2419         * convert.cs, literal.cs: More Convert cleanup is needed.
2420
2421 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2422
2423         * decl.cs, class.cs: Fixed misleading error message.
2424
2425 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2426
2427         A fix for bug #449005
2428         * nullable.cs (EmitEquality): Disable optimization for user operator
2429         operands.
2430
2431 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2432
2433         A fix for bug #447027
2434         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2435         with context variables stored as expression instances.
2436
2437 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2438
2439         A fix for bug #447027
2440         * delegate.cs: Fixed delegate VerifyMethod logic.
2441
2442 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2443
2444         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2445         but not verifiable.
2446
2447 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2448
2449         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2450         member type resolve to follow normal flow, instead of random
2451         property access.
2452
2453 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2454
2455         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2456         type.
2457
2458 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2459
2460         * const.cs: Emit decimal array constant as literal.
2461
2462 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2463
2464         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2465
2466 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2467
2468         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2469         into real property (saves 8 MB for corlib compilation).
2470
2471 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2472
2473         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2474         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2475         generic-mcs.cs: Small cleanup of TypeArguments.
2476
2477 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2478
2479         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2480         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2481         of ConstructedType expression, renamed to GenericTypeExpr.
2482
2483 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2484
2485         A fix for bug #445303
2486         * location.cs (IsConditionalDefined): Handle undefined global
2487         defines.
2488
2489 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2490
2491         A fix for bug #444678
2492         * expression.cs (TryReduceConstant): Always create new constant
2493         instance.
2494
2495 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2496
2497         A fix for bug #444673
2498         * ecore.cs: Ignore open generic types when used as generic type
2499         instance fields.
2500
2501 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2502
2503         A fix for bug #445458
2504         * expression.cs, cs-parser.jay: Don't crash when an expression
2505         statement is null.
2506
2507 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2508
2509         A fix for bug #445464
2510         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2511         inside unbound type.
2512
2513 2008-11-14  Jb Evain  <jbevain@novell.com>
2514
2515         * driver.cs: ignore empty -nowarn argument such as
2516         the one in -nowarn:12,13,,.
2517
2518 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2519
2520         A fix for bug #444271
2521         * anonymous.cs: Rescan parent storeys when best candidate was
2522         undone.
2523
2524 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2525
2526         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2527         useless UnboundTypeExpression.
2528         
2529         * attribute.cs: Do check obsolete attribute on generic types.
2530
2531 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2532
2533         A fix for bugs #425680, #400139
2534         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2535         refactoring.
2536
2537 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2538
2539         A fix for bug #435747
2540         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2541         compound value types assignment. Few micro optimizations added.
2542
2543 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2544
2545         A fix for bug #442610
2546         * anonymous.cs (MutateConstructor): More SRE hacking.
2547
2548 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2549
2550         A fix for bug #442579
2551         * ecore.cs: Also initialize expanded form of a method with 1 params
2552         parameter.
2553
2554 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2555
2556         * expression.cs (UnaryMutator): Do early l-side check.
2557
2558 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2559
2560         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2561         Init, otherwise we would crash later on when checking for friend
2562         assemblies. 
2563
2564         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2565         Otherwise we never get any meaningful information as to what
2566         failed. 
2567
2568 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2569
2570         A fix for bug #436318
2571         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2572
2573 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2574
2575         * namespace.cs: Turns out that it was a really bad idea to hide
2576         the errors for namespaces not found here in eval mode.    
2577
2578         * eval.cs: When we process using clauses, only enter those into
2579         the list of valid using clauses after they have been validated.   
2580
2581         The above change gives the proper semantics: it does not
2582         senselessly report the same errors with broken using statements by
2583         never storing them in the first place when they are invalid.
2584
2585 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2586
2587         A fix for bug #421839
2588         * cs-parser.jay: Remove expression from coalesce rule to force lower
2589         priority than the assignment operator.
2590
2591 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2592
2593         A fix for bug #437875
2594         * nullable.cs: Compile correctly method group operand used with null
2595         coalescing operator.
2596
2597 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2598
2599         A fix for bug #434589
2600         * expression.cs (Binary): Ignore lifted conversions when at least
2601         one operand is of reference type.
2602
2603 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2604
2605         * cs-parser.jay: Better syntax error report.
2606
2607 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2608
2609         A fix for bug #436792
2610         * cs-parser.jay: Use GetLocation to access location.
2611
2612 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2613
2614         A fix for bug #440774
2615         * cs-parser.jay: Also set current_array_type when parsing local
2616         variables types.
2617
2618 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2619
2620         A fix for bug #440785
2621         * expression.cs (As): Don't resolve self modifing expression
2622         multiple times.
2623
2624 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2625
2626         A fix for bug #439447
2627         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
2628
2629 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2630
2631         A fix for bug #437571
2632         * cs-parser.jay: Fixes internal error for invalid expression
2633         statements.
2634
2635 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2636
2637         * ecore.cs: Resolve correctly ambiguous params delegate methods.
2638
2639 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2640
2641         * generic.cs, anonymous.cs: Simplified GetDeclarations.
2642
2643 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2644
2645         * cs-tokenizer.cs: More precise cast parsing.
2646
2647 2008-10-16  Martin Baulig  <martin@ximian.com>
2648
2649         * anonymous.cs (AnonymousMethodStorey): Put back the
2650         `hoisted_locals' hashtable and use it in EmitType().
2651
2652 2008-10-15  Marek Safar  <marek.safar@gmail.com>
2653
2654         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
2655         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
2656         ~5MB for corlib.
2657
2658 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2659
2660         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
2661
2662 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2663
2664         * statement.cs: Mutate scope initializers.
2665
2666 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2667
2668         * expression.cs: Use typeless value for This constant.
2669         
2670         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
2671
2672 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2673
2674         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
2675         tokenizer.
2676
2677 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2678
2679         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
2680         type to type cast.
2681
2682 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2683
2684         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
2685         parser and tokenizer. Fixes many ambiguities including #433258.
2686
2687 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2688
2689         * cs-parser.jay: Fixed missing accessor recovery.
2690
2691 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2692
2693         A fix for bug #433701
2694         * expression.cs: Better error message.
2695
2696 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2697
2698         * cs-parser.jay, expression.cs: Start reporting real parser errors.
2699         
2700         * Makefile: Disabled unused debug symbols.
2701
2702         Also fixes: #320556, #321097, #321656, #321876, #351316
2703
2704 2008-10-09  Miguel de Icaza  <miguel@novell.com>
2705
2706         * eval.cs: rename "<interactive>" to "{interactive}", to work
2707         around a requirement in the compiler that this be a valid
2708         filename, and in Windows it is not (433886).
2709
2710 2008-10-09  Marek Safar  <marek.safar@gmail.com>
2711
2712         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
2713
2714 2008-10-08  Marek Safar  <marek.safar@gmail.com>
2715
2716         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
2717         cs-parser.jay: Generic type declaration and type arguments cleanup.
2718
2719 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2720
2721         * cs-parser.jay: Allow parsing weird array creation construct.
2722
2723 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2724
2725         * cs-parser.jay: Conflicts reduction.
2726
2727 2008-10-04  Marek Safar  <marek.safar@gmail.com>
2728
2729         * cs-parser.jay: Conflicts reduction.
2730
2731 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
2732
2733         Fix #398325
2734         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
2735         property.  Add a 'count' hint about the use of the shared vector.
2736         Ensure that we don't leak out dirty bits.
2737         (UsageVector.MergeChild): Throw away information about variables
2738         in child vectors.
2739         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
2740
2741 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2742
2743         A fix for bug #431746
2744         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
2745         parameters when iterator is created.
2746
2747 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2748
2749         A fix for bug #431827
2750         * expression.cs: Fixed right based pointer arithmetic operations
2751         emit.
2752
2753 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2754
2755         A fix for bug #353779
2756         * assign.cs, expression.cs: Fixed compound assignment conversions.
2757
2758 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2759
2760         A fix for bug #375262
2761         * statement.cs: Refactor ArrayForeach to be usable with string
2762         indexer. Optimized single dimentional arrays foreach.
2763
2764 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2765
2766         A fix for bug #431255
2767         * anonymous.cs, expression.cs: Removed broken optimization.
2768
2769 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2770
2771         * anonymous.cs: Use full type parameters of parent generic
2772         containers. Removed unnecessary AddParentStoreyReference call.
2773
2774 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2775
2776         A fix for bug #324702
2777         * class.cs: Use better shorter names for explicit interface member
2778         implementations.
2779
2780         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
2781
2782 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2783         
2784         * expression.cs: Use new interface to check fixed expression.
2785
2786 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2787
2788         A fix for bug #421101
2789         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
2790         interface to check for fixed fixed-buffers.
2791
2792 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2793
2794         A fix for bug #429264
2795         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
2796         
2797         * delegate.cs: Removed unnecessary casts.
2798
2799 2008-09-30  Marek Safar  <marek.safar@gmail.com>
2800
2801         A fix for bug #352151
2802         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
2803         class.cs: Fixed already defined explicit interface members check.
2804
2805 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
2806
2807         cs-tokenizer.cs: Fix typo.
2808
2809 2008-09-28  Miguel de Icaza  <miguel@novell.com>
2810
2811         * eval.cs (InteractiveBase): The quit command now just sets a
2812         flag, instead of calling Environment.Exit(), it is milder on
2813         embedded hosts. 
2814
2815         CompiledMethod is now in Mono.CSharp, not nested inside
2816         the Evaluator, it was inconvenient to use.
2817
2818 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2819
2820         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
2821         code to be invoked without having to reparse.
2822
2823 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2824
2825         * ecore.cs: The recent changes to FieldExpr broke this as well.
2826         Fixes LINQ queries in the interactive shell.
2827
2828         * Multiple files: indentation fixing for the Mono coding
2829         guidelines for the switch statement.
2830
2831         * eval.cs: Make the Evaluator API thread safe.
2832
2833 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2834
2835         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
2836         constructor parsing.
2837
2838 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2839
2840         A fix for bug #325326
2841         * statement.cs: Check possible mistaken empty statement using
2842         explicit blocks only.
2843
2844 2008-09-25  Miguel de Icaza  <miguel@novell.com>
2845
2846         * eval.cs (LoadAssembly, ReferenceAssembly): Call
2847         RootNamespace.ComputeNamespaces to update the internal list of
2848         namespaces, this is no longer done for us.
2849
2850         (InteractiveBase): Use the Evaluator APIs instead of calling into
2851         Driver directly
2852
2853 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2854
2855         A fix for bug #429264
2856         * expression.cs: Missing mutator for access to multidimensional
2857         arrays.
2858
2859 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2860
2861         * class.cs, statement: Emit DebuggerHidden attribute for iterator
2862         entry wrapper.
2863         
2864         * driver.cs: Missing input argument check.
2865
2866 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2867
2868         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
2869         expression.cs, statement.cs, rootcontext.cs, class.cs, 
2870         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
2871         DefineMembers.
2872
2873 2008-09-24  Miguel de Icaza  <miguel@novell.com>
2874
2875         * ecore.cs (FieldExpr): Only initialize eclass when we return a
2876         fully constructed FieldExpr, fixes the regression introduced in
2877         the last commit.
2878         
2879         * ecore.cs, expression.cs: Plug back the eclass initialization as
2880         otherwise it regresses `csharp'. 
2881
2882 2008-09-24  Marek Safar  <marek.safar@gmail.com>
2883
2884         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
2885         ecore.cs, attribute.cs: Moved obsolete method checks from emit
2886         phase to resolve phase. It resolves problems with expression trees
2887         and fixes bugs #323796, #325156.
2888
2889 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2890
2891         * codegen.cs: Report better error when symbol writer is missing.
2892
2893 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2894
2895         * codegen.cs: Set .NET symbol writer.
2896         
2897         * decl.cs: Guard against null generic arguments.
2898         
2899         * report.cs: Don't report exactly same additional details.
2900
2901 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2902
2903         A fix for bug #324917
2904         * cs-parser.jay: Add missing multidimensional non-expression type
2905         ranks.
2906         
2907 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2908
2909         A fix for bug #428191
2910         * anonymous.cs: Create an outer generic fields also for non-storey
2911         anonymous methods.
2912
2913 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2914
2915         A fix for bug #378294
2916         * class.cs: Make fixed size buffers gmcs feature only.
2917
2918 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2919
2920         A fix for bug #355622, #324993
2921         * assign.cs, const.cs, class.cs: Create new EmitContext for each
2922         field initializer.
2923
2924 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2925
2926         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
2927         error reporting.
2928
2929 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2930
2931         A fix for bug #416110
2932         * generic.cs: Struct constraint results in default ctor and
2933         ValueType base type constraint to be set.
2934
2935 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2936
2937         A fix for bug #423791
2938         * generic.cs: Fixed params output type type-inference.
2939
2940 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2941
2942         * cs-parser.jay, expression.cs: Fixed few expression crashes.
2943         
2944 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2945
2946         * cs-tokenizer.cs: Don't break on extra partial modifier.
2947
2948 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2949
2950         A fix for bug #427592
2951         * generic.cs: Use common parameter resolve method.
2952
2953 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2954
2955         A fix for bug #414758
2956         * expression.cs, ecore.cs: Fixed crash when accessing non-static
2957         property.
2958
2959 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2960
2961         * driver.cs, namespace.cs: Read types and namespaces after all
2962         requested assemblies are loaded, fixes issues with System.Core
2963         auto-reference, and #419888.
2964
2965 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2966
2967         A fix for bug #417705
2968         * cs-parser.jay: Fixed as/is operator expression split.
2969
2970 2008-09-18  Marek Safar  <marek.safar@gmail.com>
2971
2972         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
2973         Fixed expression tree representation of empty new expression and
2974         new initializer expression.
2975
2976 2008-09-18  Miguel de Icaza  <miguel@novell.com>
2977
2978         * eval.cs: Remove warning, keep reference to driver around.
2979
2980         * Hide fields that do not need to be public.
2981
2982 2008-09-17  Marek Safar  <marek.safar@gmail.com>
2983
2984         A fix for bug #426385
2985         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
2986         conversion for array elements.
2987
2988 2008-09-17  Marek Safar  <marek.safar@gmail.com>
2989
2990         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
2991         void parsing conflicts.
2992
2993 2008-09-15  Marek Safar  <marek.safar@gmail.com>
2994
2995         A fix for bug #425601
2996         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
2997         System.Core only when there is no custom ExtensionAttribute
2998         implementation.
2999
3000 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3001
3002         * namespace.cs: Do not report CS0246 (name
3003
3004 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3005
3006         A fix for bug #425669
3007         * generic.cs: Don't cache generic static anonymous method 
3008         containers.
3009
3010 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3011
3012         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3013         conflicting constraints.
3014
3015 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3016
3017         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3018         mcs too.
3019
3020 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3021
3022         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3023         to null pointer conversion fixes.
3024
3025 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3026
3027         * cs-parser.jay, expression.cs: An implicitly typed local variable
3028         declarator cannot use an array initializer.
3029
3030 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3031
3032         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3033
3034 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3035
3036         * generic.cs (InflatedConstraints): Don't crash when constraints
3037         are different.
3038         
3039         * cs-parser.jay: const_declarator is a block.
3040
3041         * constant.cs: Check for not allowed NaN conversions.
3042
3043 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3044
3045         * driver.cs: Drop --shell argument, the compiler is no longer a
3046         REPL. 
3047
3048         * eval.cs: Move most of the code that deals with evaluation into
3049         this file and document the public API from repl.cs
3050
3051         * repl.cs: Remove from here.
3052         
3053 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3054
3055         A fix for bug #424684
3056         * generic.cs: Generic class constraints must come first.
3057
3058 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3059
3060         * cs-parser.jay: Improve error reporting for syntax errors in
3061         statements and expressions, we now report the expected tokens
3062         instead of reporting the useless "; expected".
3063
3064         Drop the strings from the token declaration, it turns out that
3065         they did not do what I thought they did.  Instead they were adding
3066         two sets of tokens to the tables.
3067
3068 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3069
3070         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3071         delegate.cs: Share special type check.
3072
3073 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3074
3075         A fix for bug #423981
3076         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3077
3078 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3079
3080         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3081         ConvertImplicitly.
3082
3083 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3084
3085         A fix for bugs: #324750, #335946
3086         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3087         lookup rule to determine ?-based tokens.
3088
3089 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3090
3091         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3092         expressions (like event adding or removing) end up here, so we
3093         need to treat those as statements.
3094
3095         Add LoadAssembly method.
3096
3097 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3098
3099         * repl.cs: Add Time method.
3100
3101 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3102
3103         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3104
3105 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3106
3107         * repl.cs: Add workaround for old compilers.
3108
3109 2008-09-04  Jb Evain  <jbevain@novell.com>
3110
3111         * repl.cs (PrettyPrint): pretty print everything that
3112         implements IDictionary, as well as IEnumerables. Also,
3113         add a quit helper property.
3114
3115 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3116
3117         * constant.cs: Better error reporting for decimal literals.
3118         
3119         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3120         field attributes.
3121         
3122 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3123                         Miguel de Icaza  <miguel@novell.com>
3124
3125         A fix for bug #422951
3126         * assign.cs (Assign.DoResolve): Perform the type conversions
3127         checks before we attempt to initialize `New' initializers. 
3128
3129 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3130
3131         A fix for bug #422853
3132         * delegate.cs (DelegateCreation): Add special handling for
3133         EmptyExpression.Null instance expression which is just another
3134         hack for undecided member instance exression.
3135
3136 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3137
3138         * expression.cs, ecore.cs: Emit full expression tree for reduced
3139         binary expressions.
3140
3141 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3142
3143         * expression.cs (This): Guard against multi-resolving.
3144         
3145         * ecore.cs, statement.cs (Throw): Simplified.
3146         
3147         * flowanalysis.cs: Also verify event fields.
3148
3149 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3150
3151         * assign.cs (Assign.DoResolve): Perform the type conversions
3152         checks before we attempt to initialize `New' initializers. 
3153
3154         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3155
3156         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3157         public. 
3158
3159         * repl.cs: Update help.
3160
3161 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3162
3163         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3164         handling of the default config handling, including the special
3165         treatment of System.Core assembly. 
3166
3167         Fixes the REPL processing for LINQ.
3168
3169 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3170
3171         A fix for bug #422507
3172         * expression.cs (UnboxCast): Add missing child expression mutator.
3173
3174 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3175
3176         * driver.cs: Don't self reference System.Core assembly.
3177
3178 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3179
3180         A fix for bug #422507
3181         * expression.cs (StringConcat): Add missing type mutator.
3182
3183 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3184
3185         * generic.cs (TypeInferenceContext): Follow equality rule for
3186         constructed type lower bound type inference.
3187
3188 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3189
3190         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3191         <dblank@cs.brynmawr.edu> which updates the cursor position on
3192         refresh.
3193         
3194 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3195
3196         A fix for bug #367145
3197         * driver.cs: Fixed import of extension methods when using -noconfig
3198         option.
3199
3200 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3201
3202         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3203         version from non-generic implementation instead.
3204
3205 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3206
3207         A fix for bug #418908
3208         * class.cs: Use AddScopeStatement for field initializers.
3209
3210 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3211
3212         A fix for bug #415385
3213         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3214
3215 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3216
3217         A fix for bug #421736
3218         * iterators.cs: Don't crash on unreachable iterators.
3219
3220 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3221
3222         A fix for bug #421628
3223         * parameter.cs, attribute.cs: Clone also parameter attributes.
3224
3225 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3226
3227         * namespace.cs (LookupType): In EvalMode, try to replace
3228         the TypeBuilder from our cache with a Type as Reflection.Emit does
3229         not  like to mix code from older assemblies emitted and new
3230         assemblies emitted. 
3231
3232         This sounds like a serious Mono bug that prevents multiple
3233         assemblies to be generated and consumed at the same time.
3234
3235         * cs-parser.jay (push_current_class): Do not make interactive
3236         classes internal or private, make them public as we currently
3237         generate each new class in a new assembly.   
3238
3239 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3240
3241         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3242         remove types that are entered into the global namespace during
3243         parsing so that we can remove them on failure.
3244  
3245         * cs-parser.jay: Parsing: we now keep track of types that are
3246         entered into global variables and queue those in case the parsing
3247         or resolution fail.
3248  
3249         This happens in a few situations: during partial-input, we invoke
3250         the parser repeatedly for example with the string "class X", this
3251         would cause X to be registed, and we need to remove this
3252         registration so that another parse attempt later with say "class X {"
3253         would actually work.
3254  
3255         Additionally, if there is an error in the resolution phase, for
3256         example: "class X : NonExistant {}" th
3257         
3258         * cs-parser.jay: Be more precise with the errors being raised,
3259         instead of flagging all exceptions during parsing to be attributed
3260         to the parsing process, distinguish those from errors happening in
3261         the actions and hint that using -v would produce the actual
3262         exception. 
3263
3264         * repl.cs: Do not load all compiler references on each reset,
3265         doing the partial reset takes care of this.
3266         
3267 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3268
3269         * repl.cs: Add support for loading all the files from
3270         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3271         as shell libraries.
3272
3273         Introduce a micro-parser that is able to deambiguate on its input
3274         whether we are dealing with a compilation unit (namespace, class,
3275         interface, struct, delegate) declaration or a statement.   This
3276         allows both declarations and statements to be entered. 
3277
3278         Set history size by default to 300 lines.
3279
3280         Instead of distinguishing based on the parser.InteractiveResult,
3281         have only two cases: statements were parsed, or a compilation unit
3282         was.   Always pull the Using statement additions from the
3283         compilation unit parse.
3284         
3285         * cs-tokenizer.cs: Rename tokens to better describe their intent
3286         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3287         
3288         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3289         EvalMode is used to trigger the lookup of global variables while
3290         StatementMode is used turn variable declarations into static
3291         fields.
3292
3293         * getline.cs: Allow history size to be set.
3294         
3295 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3296
3297         A fix for bug #360755
3298         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3299
3300 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3301
3302         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3303         
3304         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3305         member name, it is too confusing
3306         
3307         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3308         
3309         * rootcontext.cs: Finally default to warning level 4.
3310
3311 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3312
3313         * class.cs (CheckBase): Ignore overloaded operators.
3314
3315 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3316
3317         A fix for bug #420830
3318         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3319
3320 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3321
3322         A fix for bug #420832
3323         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3324
3325 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3326
3327         A fix for bug #420386
3328         * nullables.cs: Fixed logic of nullable user comparison operators involving
3329         null values.
3330
3331 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3332         
3333         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3334
3335 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3336
3337         * repl.cs: Add support for aborting the running code with C-c. 
3338
3339 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3340
3341         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3342
3343 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3344
3345         * cs-parser.jay (interactive_statement_list): A new set of rules
3346         for hosting statements that uses the "interactive_" prefix.   
3347
3348         * repl.cs: Add support for parsing `using' as a statement or as a
3349         directive.  Deambiguating before passing this to the parser.
3350
3351         We need to distinguish statement_expressions that occur at the
3352         toplevel vs those that occur embedded into expressions.
3353
3354         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3355         that fixes the cursor key handling, and a history bug.
3356         
3357 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3358
3359         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3360         limitations in Console, instead the 2.0 bootstrap libraries now
3361         include the Console bits.
3362
3363         Also, remove the use of Nullables from getline.cs
3364
3365         ------------
3366         
3367         Interactive support for the C# compiler.   Use gmcs --shell to
3368         enter a read-eval-print loop shell.
3369
3370         Docs: http://www.mono-project.com/CsharpRepl
3371         
3372         * sources: include repl.cs here and getline.cs for gmcs.exe,
3373         everything else is getline.cs impaired.
3374
3375         * Makefile: when bootstrapping pass a special flag
3376         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3377         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3378         This distinguishes those two cases.
3379
3380         * repl.cs: Support for a read-eval-print loop.   Will be soon
3381         refactored into eval support and then REPL on top of it.
3382
3383         * ecore.cs: If a simplename lookup fails, before erroring out,
3384         if we are in EvalMode to resolve the name to a declaration in the
3385         Eval-land.    
3386
3387         This means that variable declarations that happened in previous
3388         classes (as repl puts every statement in a separate class) are
3389         made visible in this way.
3390
3391         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3392         triggered an error due to the end of file being reached.   This is
3393         used to do multi-line input, and notify the caller that the user
3394         needs to provide more text before a successful parse.
3395
3396         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3397         to drive the evaluation with a custom wrapper. 
3398
3399         * driver.cs: Add support for --shell, and refactor some code to be
3400         reused from repl.cs
3401         
3402         * namespace.cs: Add support for serializing the contents of the
3403         namespaces and reloading them.  
3404
3405         * getline.cs: A managed implementation of ReadLine under
3406         X11/Apache2 license terms.  Easy to embed in other applications as
3407         well.
3408
3409         * namespace.cs: Add some functions to save and restore the
3410         namespace state.
3411
3412         * rootcontext.cs: New public field.
3413
3414         * cs-tokenizer.cs: Add support for one of the possible characters
3415         we introduce into the token stream.  
3416
3417         This patch does not affect the regular tokenization process, the
3418         only performance hit would happen if there is an invalid character
3419         on the input string.
3420
3421         * support.cs: Move isatty helper routine here.
3422
3423         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3424         code generator for in-memory assemblies.
3425
3426 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3427
3428         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3429         parameter cannot be always used as a type.
3430
3431 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3432
3433         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3434
3435 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3436
3437         * convert.cs: Implement explicit array to IList<T> conversion.
3438
3439 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3440
3441         A fix for bug #362740
3442         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3443
3444 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3445         
3446         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3447         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3448         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3449         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3450         handling to use just one type of infrastructure and deal with generics
3451         more effectivelly.
3452
3453 2008-07-23  Martin Baulig  <martin@ximian.com>
3454
3455         *** Merged this from trunk revision 108527 ***
3456
3457         * statement.cs
3458         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3459         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3460         scope variable.
3461
3462 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3463         
3464         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3465         error checks.
3466
3467 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3468         
3469         * delegate.cs: Fixed compiler crash when creating delegate using partial
3470         method.
3471         
3472         * typemanager.cs: MulticastDelegate is not a delegate.
3473
3474 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3475         
3476         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3477         checks.
3478
3479 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3480
3481         * cs-parser.jay (type): Allow 'var' in mcs too.
3482         (local_variable_type): Likewise.
3483
3484 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3485         
3486         * driver.cs: Removed broken -noconfig variants.
3487
3488 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3489         
3490         A fix for bug #417078
3491         * expression.cs: Emit correctly left side pointer operators.
3492
3493 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3494
3495         * generic.cs, lambda.cs: Inflate method generic arguments only.
3496
3497 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3498
3499         * class.cs: Fixed struct layout check regression.
3500
3501 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3502
3503         * cs-parser.jay, enum.cs: Simplified enum parsing.
3504         
3505         * decl.cs: Check all type parameters conflicts.
3506         
3507         * expression.cs, statement.cs, attribute.cs: More expression checks.
3508
3509 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3510
3511         * generic.cs: Add type inference types restriction.
3512         
3513         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3514         anonymous.cs, expression.cs: Allocate less accessor parameters.
3515
3516 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3517
3518         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3519         classes.
3520
3521 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3522
3523         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3524
3525 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3526
3527         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3528         Also fixes #362146 and #381592.
3529
3530 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3531
3532         * ecore.cs: Reduced constant cannot be used as an attribute value.
3533         
3534         * cs-parser.jay: Base expression has to be a type.
3535         
3536         * expression.cs (Conditional): Uses ReducedExpression.
3537
3538 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3539
3540         A fix for bug #376826
3541         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3542         address of hoisted local variable or parameter cannot be taken.
3543
3544 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3545
3546         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3547         anonymous method inside checked/unchecked expression.
3548
3549 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3550
3551         * typemanager.cs (IsEqual): Guard against null.
3552         
3553         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3554         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3555         routine. Fixed few misleading conversion errors.
3556
3557 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3558
3559         * class.cs: Consider generics when checking cycles in struct layout.
3560
3561 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3562
3563         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3564
3565 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3566
3567         A fix for bug #414165
3568         * anonymous.cs: Use same anonymous implementation method for all anonymous
3569         method emits.
3570
3571 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3572
3573         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3574         constraints.
3575
3576 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3577
3578         * cs-parser.jay: Typeof argument has to be a type expression.
3579         
3580         * namespace.cs: Check alias and namespace definitions collisions.
3581         
3582         * class.cs, pending.cs: Moved explicit interface accessor implementation
3583         check.
3584         
3585         * delegate.cs, expression.cs: Verify special name invocations.
3586         
3587 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3588
3589         * cs-parser.jay: Don't choke on empty generic type arguments.
3590         
3591         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3592         
3593         * expression.cs, ecore.cs: Minor expressions bugs.
3594
3595 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3596
3597         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
3598         and added more error handling.
3599         
3600         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
3601         
3602         *  modifiers.cs, enum.cs: Fixed.
3603
3604 2008-07-31  Jb Evain  <jbevain@novell.com>
3605
3606         * driver.cs: remove -pkg ability of smcs.
3607
3608 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3609
3610         * statement.cs (Switch): Correctly set empty default target for single
3611         blocks.
3612
3613 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3614
3615         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
3616         string switch statement implementation to use string dictionary which
3617         significantly (2-8x) improves performance of generated code.
3618
3619 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3620
3621         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
3622         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
3623         
3624 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3625
3626         A fix for bug #412595
3627         * typemanager.cs, convert.cs, expression.cs: Some types are never
3628         convertible to each other.
3629
3630 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3631
3632         * nullable.cs (CreateNullConstant): An error messages update.
3633
3634 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3635
3636         A fix for bug #412595
3637         * cfold.cs: Don't cast undefined bool constant.
3638
3639 2008-07-29  Martin Baulig  <martin@ximian.com>
3640
3641         * symbolwriter.cs
3642         (SymbolWriter.Reset): New public static method.
3643
3644         * driver.cs
3645         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
3646
3647 2008-07-28  Marek Safar  <marek.safar@gmail.com>
3648
3649         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
3650         
3651         * expression.cs (ElementAccess): Exact size allocation.
3652
3653 2008-07-26  Marek Safar  <marek.safar@gmail.com>
3654
3655         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
3656
3657 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3658
3659         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
3660         
3661         * class.cs: Removed $PRIVATE$ field hack which caused problems during
3662         flow analysis.
3663
3664 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3665
3666         A fix for bug #412217
3667         * assign.cs: Mutate also assignment type.
3668
3669 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3670
3671         A fix for bug #323644
3672         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
3673         indexers.
3674
3675 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3676
3677         A fix for bug #412134
3678         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
3679         non-enumerable operands when overloading equality or bitwise operators.
3680
3681 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3682
3683         * anonymous.cs: Cache closed generic anonymous method delegates.
3684
3685 2008-07-24  Marek Safar  <marek.safar@gmail.com>
3686
3687         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
3688         anonymous.cs, statement.cs: Always emit anonymous method as static method
3689         when is instance free. Use nesting for nested anynomous methods blocks.
3690         
3691 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3692
3693         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
3694         types.
3695
3696 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3697
3698         * expression.cs: Removed MakeSimpleCall.
3699
3700 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3701
3702         A fix for bug #323012
3703         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
3704         Base method implementing interface has to be public.
3705
3706 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3707
3708         * cs-parser.jay: Don't break on missing argument.
3709
3710 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3711
3712         A fix for bug #320993
3713         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
3714           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
3715
3716 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3717
3718         A fix for bug #320748
3719         * convert.cs: Implicit user operators cannot convert to interfaces
3720
3721 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3722
3723         A fix for bug #312686
3724         * driver.cs: Ignore empty assembly references.
3725
3726 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3727
3728         A fix for bug #387040
3729         * ecore.cs: Skip constrains check for an explicit implementation.
3730
3731 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3732
3733         A fix for bug #409045
3734         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
3735           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
3736           identifiers are file specific unless passed as input arguments.
3737
3738 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3739
3740          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
3741          to emit UnmanagedMarshal data under 2.0 profile.
3742
3743 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3744
3745         A fix for bug #410369
3746         * parameter.cs: Clone correctly ParamsParameter.
3747
3748 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3749
3750         * expression.cs (Argument): Always report type for type based expressions
3751         errors.
3752
3753 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3754
3755         A fix for bug #410666
3756         * anonymous.cs: Correctly initialize generic storey reference.
3757
3758 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3759
3760         * convert.cs: Don't box same type arguments.
3761
3762 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3763
3764         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
3765         Finished missing generic type mutators.
3766
3767 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3768
3769         * iterators.cs, statement.cs: Finished statements CloneTo.
3770
3771 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3772
3773         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
3774         
3775         * expression.cs: Emit optimized default value expressions in expression tree
3776         array initializer.
3777
3778 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3779
3780         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
3781
3782 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3783
3784         A fix for bug #367536
3785         * cs-parser.jay: Check static constructor of generic types for an access
3786         modifier.
3787
3788 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3789
3790         A fix for bug #353800
3791         * lambda.cs: Emit ret for contextual statements.
3792         
3793         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
3794         up emitting redundant ret for all anonymous methods with return.
3795
3796 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3797
3798         A fix for bug #365188
3799         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
3800         create anonymous method storey in unreachable block.
3801
3802 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3803
3804         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
3805         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
3806         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
3807         statement.cs: Fixed relevant defects found by Gendarme.
3808
3809 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3810
3811         A fix for bug #325291
3812         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
3813         statement.cs: Replaced IAnonymousHost with top level block flag.
3814
3815 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3816
3817         * cs-parser.jay: Clean up unused open_parens.
3818
3819 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3820
3821         * ecore.cs: Custom error message for a range variable assignment.
3822
3823 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3824
3825         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
3826         load.
3827
3828 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3829
3830         * literal.cs: Null literal is of object type.
3831
3832 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3833
3834         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
3835         expression of nullable equality comparison.
3836
3837 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3838
3839         * expression.cs(PointerArithmetic): Removed redundant assignment.
3840
3841 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3842
3843         * decl.cs (GetSignatureForError): Report full namespace name for containers.
3844
3845 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3846
3847         A fix for bug #408361
3848         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
3849         they are replaced by GetMethod.
3850
3851 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3852
3853         A fix for bug #408721 by jeremie.laval@gmail.com
3854         * expression.cs (Indirection): Implemented CloneTo.
3855
3856 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3857
3858         * statement.cs (AssignableSlots): Temporary disabled variable initialization
3859         assert check.
3860
3861 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3862
3863         * report.cs (EnableReporting): Don't reinitialize 0-based values.
3864
3865 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3866
3867         * linq.cs: Reset tranparent parameter counter in probing mode.
3868
3869 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3870
3871         * anonymous.cs: Mutate anonymous method type.
3872
3873 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3874
3875         * ecore.cs, anonymous.cs: Mutate field expressions.
3876
3877 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3878
3879         A fix for bug #369670
3880         * linq.cs, statement.cs: Use explicit block for query expressions variables.
3881
3882 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3883
3884         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
3885
3886 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
3887
3888         Fix bug #314902
3889         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
3890         only one '>', and finds a '>>', abort the generic lookahead.
3891
3892 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3893
3894         A fix for bug #319902
3895         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
3896
3897 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3898
3899         A fix for bug #406371
3900         * statement.cs: Moved EmitSymbolInfo to Block.
3901
3902 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3903
3904         * ecore.cs: Report better error for extension method overload failures.
3905
3906 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3907
3908         * expression.cs (Is): No need to box reference values.
3909
3910 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3911
3912         * class.cs: Use event resolve context when initializing CreateEmitContext.
3913
3914 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3915
3916         A fix for bug #394436
3917         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
3918         method used inside expression trees. Added more LINQ to expression tree
3919         conversions.
3920
3921 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3922
3923         A fix for bug #378189, #370577
3924         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
3925         from expression.
3926
3927 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3928
3929         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
3930         hierarchically.
3931
3932 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3933
3934         A fix for bug #406702
3935         * anonymous.cs: Always park anonymous method in the nearest parent storey.
3936
3937 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3938
3939         A fix for bug #406648
3940         * cs-parser.jay: Report nullable use in mcs for some cases.
3941
3942 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3943
3944         * ecore.cs: Improved argument mismatch error messages.
3945
3946 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3947
3948         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
3949
3950 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3951
3952         * expression.cs (TypeOf): Mutate type argument.
3953
3954 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3955
3956         * class.cs: Report missing partial modifier for correct type.
3957
3958 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3959
3960         * ecore.cs, expression.cs (VariableReference): Variable property is 
3961         protected.
3962
3963 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3964
3965         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
3966         
3967 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3968
3969         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
3970         method delegates.
3971
3972 2008-07-04  Marek Safar  <marek.safar@gmail.com>
3973
3974         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
3975         anonymous method storey to an instance method when only "this" is hoisted.
3976
3977 2008-07-03  Marek Safar  <marek.safar@gmail.com>
3978
3979         A fix for bug #321615
3980         * expression.cs: Pointer comparisons use unsigned operator.
3981
3982 2008-07-03  Marek Safar  <marek.safar@gmail.com>
3983
3984         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
3985
3986 2008-07-02  Marek Safar  <marek.safar@gmail.com>
3987
3988         A fix for bug #404905
3989         * class.cs: Always initialize local unsafe variables.
3990
3991 2008-06-30  Marek Safar  <marek.safar@gmail.com>
3992
3993         A fix for bug #396987
3994         * expression.cs (NewInitialize): Clear local temporary variable for next run
3995
3996 2008-06-27  Marek Safar  <marek.safar@gmail.com>
3997
3998         A fix for bug #401020
3999         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4000
4001 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4002
4003         A fix for bug #398319
4004         * cs-parser.jay: Implemented undocumented base access expression inside
4005         anonymous types.
4006
4007 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4008
4009         A fix for bug #404227
4010         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4011
4012 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4013
4014         A fix for bug #404227
4015         * convert.cs: Fixed explicit array to interface cast.
4016
4017 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4018
4019         A fix for bug #403894
4020         * delegate.cs: Mutate DelegateInvocation type.
4021
4022 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4023
4024         A fix for bug #379348
4025         * delegate.cs: Box a load of generic parameters.
4026
4027 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4028
4029         * expression.cs: Add an array creation arguments mutate.
4030
4031 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4032
4033         A fix for bug #386068
4034         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4035         parameter.
4036
4037 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4038
4039         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4040         CloneTo.
4041
4042 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4043
4044         A fix for bug #403518
4045         * delegate.cs: Type correctly anonymous method new invocation.
4046
4047 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4048
4049         A fix for bug #394826
4050         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4051         calls.
4052
4053 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4054
4055         A fix for bug #394826
4056         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4057         needed.
4058
4059 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4060
4061         * class.cs: Clone indexer parameters for localized capturing.
4062
4063 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4064
4065         A fix for bug #402379
4066         * expression.cs: Don't crash when an object initializer resolve fails.
4067
4068 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4069
4070         A fix for bug #402888
4071         * expression.cs: Mutate conditional expression.
4072
4073 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4074
4075         A fix for bug #401012
4076         * class.cs: Keep StructLayout in shared container.
4077
4078 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4079
4080         A fix for bug #400438
4081         * decl.cs, class.cs: Only properties can be automatically implemented.
4082
4083 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4084
4085         * statement.cs (ChangeToIterator): Copy also labels.
4086
4087 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4088
4089         * ecore.cs: Pass type argument details to parent extension method.
4090
4091 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4092
4093         A fix for bug #375966
4094         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4095
4096 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4097
4098         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4099
4100 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4101
4102         A fix for bug #394347
4103         * anonymous.cs: Cache compatible delegates as compatibility check produces
4104         a new method every time.
4105
4106 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4107
4108         * anonymous.cs: Propagate storey reference for single references.
4109
4110 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4111
4112         A fix for bug #387615
4113         * assign.cs, expression.cs: Correctly clone compound assignment.
4114
4115 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4116
4117         A fix for bug #359611, #359604
4118         * anonymous.cs: Mutate all types of hoisted parameters.
4119
4120 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4121
4122         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4123         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4124         expression.cs, codegen.cs, statement.cs
4125         
4126         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4127         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4128         
4129         ** Anonymous methods, lambda expressions rewrite **
4130         
4131         Anonymous expressions are now resolved when an explicit block is resolved 
4132         and they don't require any registration procedure anymore. Further,
4133         anonymous methods are defined when explicit block is emitted which allows
4134         better control of whole process and opens possibilities for more
4135         optimizations as well as alternative to reverse whole process.
4136         
4137         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4138         process consistent and to correctly emit hoisted generic methods when they
4139         have at least 1 hoisted variable.
4140         
4141 2008-06-17  Martin Baulig  <martin@ximian.com>
4142
4143         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4144         iterator method.
4145         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4146         virtual property; check it in Emit().
4147         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4148         an iterator.
4149         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4150         an iterator.
4151         (Indexer.Define): Likewise.
4152
4153 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4154
4155         * convert.cs: Don't use IsInterface on type arguments.
4156         
4157         * delegate.cs: DelegateInvocation uses MethodInfo.
4158         
4159         * parameter.cs: Removed IsTypeParameter.
4160         
4161         * generic-mcs.cs: More missing stuff.
4162
4163 2008-06-16  Martin Baulig  <martin@ximian.com>
4164
4165         * modifiers.cs
4166         (Modifiers.DEBUGGER_HIDDEN): New public const.
4167
4168         * typemanager.cs
4169         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4170
4171         * class.cs
4172         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4173         (AbstractPropertyEventMethod): Likewise.
4174         (Constructor.Emit): Likewise.
4175         (SourceMethod.SetCompilerGenerated): Removed.
4176
4177         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4178         on MoveNext().
4179
4180         * anonymous.cs
4181         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4182         if we're an `IteratorHost'.
4183         (AnonymousMethodMethod..ctor): Don't set
4184         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4185         not on the method.
4186
4187 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4188
4189         * statement.cs: Clean-up foreach statements.
4190
4191 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4192
4193         * class.cs: Stop using public method which should not exist
4194         (MethodBuilder.SetGenericMethodSignature).
4195
4196 2008-06-11  Martin Baulig  <martin@ximian.com>
4197
4198         * location.cs
4199         (Location.LookupFile): Add `CompilationUnit' argument; when given
4200         a relative file name, make it relative to the directory the .cs
4201         file is located in instead of using the current directory.
4202
4203 2008-06-11  Martin Baulig  <martin@ximian.com>
4204
4205         * class.cs
4206         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4207         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4208         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4209         (SourceMethod.SetCompilerGenerated): Likewise.
4210
4211 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4212
4213         * codegen.cs, driver: Only write symbol file when it's asked for.
4214
4215 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4216
4217         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4218
4219 2008-06-10  Martin Baulig  <martin@ximian.com>
4220
4221         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4222
4223 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4224
4225         A fix for bug #316290
4226         * expression.cs: Include decimal operators in predefined table.
4227         
4228         * parameters.cs: More readonlyness.
4229
4230 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4231
4232         A fix for bug #397213
4233         * cs-parser.jay: One more missing current_local_parameters reset.
4234
4235 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4236
4237         A fix for bug #396633
4238         * class.cs: Host backing field in partial container.
4239
4240 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4241
4242         A fix for bug #397068
4243         * expression.cs: Check both operand types when predefined operator is used.
4244
4245 2008-06-05  Martin Baulig  <martin@ximian.com>
4246
4247         Merged the `debugger-kahalo' branch.
4248
4249         * class.cs
4250         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4251         we're an iterator method.
4252         (SourceMethod): Reflect latest symbol writer changes;
4253         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4254         now `start_row' and `end_row'.
4255         (Constructor.Emit): Fix the logic whether to emit symbol information.
4256
4257         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4258         generated methods.
4259
4260         * location.cs
4261         (CompilationUnit): New public class; derives from `SourceFile'.
4262         (SourceFileEntry.DefineSymbolInfo): New public method.
4263         (SourceFileEntry.SetChecksum): New public method.
4264         (Location): Encode hidden line numbers by using `column == 255';
4265         the .ctor now accepts `column == -1' to mark a hidden line number.
4266         (Location.Hidden): New public property.
4267         (Location.CheckPoint): Add `CompilationUnit'.
4268         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4269         (Location.Push): Add `CompilationUnit compile_unit' argument.
4270         (Location.CompilationUnit): New public property.
4271
4272         * statement.cs
4273         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4274
4275         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4276
4277         * driver.cs: `SourceFile' -> `CompilationUnit'.
4278
4279         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4280
4281         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4282
4283         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4284         `#line hidden'.
4285
4286         * symbolwriter.cs
4287         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4288         new symbol writer API to also pass the file.
4289
4290 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4291
4292         * statement.cs: Emit catch variable assignment using variable expression.
4293         
4294 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4295
4296         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4297         with other variable types.
4298
4299 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4300
4301         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4302         GetLength method emit, it breaks resolve rules.
4303         
4304 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4305             Marek Safar  <marek.safar@gmail.com>
4306                         
4307         A fix for bug #395542
4308         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4309         declaration.
4310         
4311 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4312
4313         A fix for bug #395287
4314         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4315
4316 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4317
4318         A fix for bug #395845
4319         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4320         non-nullable parameter type.
4321         
4322 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4323
4324         * class.cs: Handle contructor initializer as a statement in top-level block.
4325
4326 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4327
4328         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4329         security attributes.
4330
4331 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4332
4333         * ecore.cs, expression.cs: Small IVariable refactoring.
4334
4335 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4336
4337         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4338
4339 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4340
4341         * cs-parser.jay: Removed redundant catch type check.
4342
4343 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4344
4345         A fix for bug #390372
4346         * nullable.cs: Set correct return type.
4347
4348 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4349
4350         A fix for bug #391062
4351         * typemanager.cs: Fixed crash when comparing null types.
4352
4353 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4354
4355         A fix for bug #391871
4356         * cs-parser.jay: Better error handling for invalid catch type.
4357
4358 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4359
4360         A fix for bug #392155
4361         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4362
4363 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4364
4365         A fix for bug #390666
4366         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4367         expressions.
4368
4369 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4370
4371         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4372         in getter.
4373
4374 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4375
4376         A fix for bug #389625
4377         * delegate.cs, generic.cs: Some progress on method group return type
4378         inference.
4379
4380 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4381
4382         A fix for bug #378419
4383         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4384
4385 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4386
4387         * class.cs (Constructor): Added IsCompilerGenerated.
4388
4389 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4390
4391         * expression.cs: Enum binary operators can accept non-enum operand only when
4392         is implicitly convertible to underlying type.
4393
4394 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4395
4396         A fix for bug #389272
4397         * support.cs: Workaround System.InvalidOperationException for enums.
4398
4399 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4400
4401         A fix for bug #389073
4402         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4403
4404 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4405
4406         * driver.cs: Split Parse.
4407         
4408         * location.cs (LookupFile): Uses string.Empty.
4409
4410 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4411
4412         * expression.cs, parameter.cs: Small ParameterReference clean up.
4413
4414 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4415
4416         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4417         hack. Fixes #387502.
4418
4419 2008-05-06  Martin Baulig  <martin@ximian.com>
4420
4421         * class.cs (Constructor.Emit): Fix the logic whether to emit
4422         symbol information.
4423
4424 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4425
4426         Fix #385503
4427         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4428         InvalidOperationException when the iterator is before the start or
4429         after the end.
4430
4431 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4432
4433         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4434         when left is nullable type.
4435
4436 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4437
4438         A fix for bug #386628
4439         * expression.cs (LocalVariableReference): Continue in resolving when
4440         variable is not assigned.
4441
4442 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4443
4444         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4445         nullable operations.
4446
4447 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4448
4449         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4450         it saves many redundant temporary variables for nullable operations.
4451
4452 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4453
4454         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4455         
4456         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4457         method.
4458         
4459         * nullable.cs: Constant coalescing operator optimizations.
4460
4461 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4462
4463         * constant.cs: Use unsigned conversion for values which are unsigned only.
4464
4465 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4466
4467         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4468         coalescing operator as it should be.
4469
4470 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4471
4472         A fix for bug #371016
4473         * expression.cs: All predefined delegate operators require implicit method
4474         group conversion.
4475         
4476 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4477
4478         * constant.cs: Emit long constant as uint when fits the range.
4479         
4480         * convert.cs, expression.cs: Fixed few unsafe conversions.
4481
4482 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4483
4484         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4485
4486 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4487
4488         Fix #385758
4489         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4490         'expr'.
4491         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4492
4493 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4494
4495         * constant.cs, literal.cs: IsLiteral property for error reporting.
4496         
4497         * ecore.cs, expression.cs: Implemented Property expression.
4498
4499 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4500
4501         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4502         
4503         * nullable.cs: Implemented nullable coalescing null operator.
4504
4505         * ecore.cs, expression.cs: Expression trees work.
4506
4507 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4508
4509         * ecore.cs: CreateExpressionTree is finally abstract.
4510
4511         * expression.cs, linq.cs: Updated.
4512
4513 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4514
4515         * expression.cs, ecore.cs: Block base access expression inside expression
4516         tree.
4517
4518 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4519
4520         A fix for bug #385058
4521         * expression.cs: User-defined operator implementations always take
4522         precedence over predefined operator implementations.
4523
4524 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4525
4526         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4527         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4528         expression tree conversions.
4529         
4530 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4531
4532         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4533         operators method details to Operator class.
4534
4535 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4536
4537         * anonymous.cs: Pass unsafe flags to anonymous container.
4538         
4539         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4540         inside expression tree.
4541
4542 2008-04-29  Martin Baulig  <martin@ximian.com>
4543
4544         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4545         (Tokenizer.PopPosition): Also restore the `line'.
4546
4547 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4548
4549         * delegate.cs: Implemented Invoke expression.
4550
4551 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4552
4553         * expression.cs: Fixed equality reference comparison regression.
4554
4555 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4556
4557         * ecore.cs: Clean up EmptyCast hack.
4558         
4559         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4560         using correct conversion rules. Also fixes #383993.
4561
4562 2008-04-28  Martin Baulig  <martin@ximian.com>
4563
4564         * class.cs (Constructor.Emit): Don't emit debugging information
4565         for generated default .ctor's.
4566
4567 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4568
4569         * convert.cs: Empty-cast ushort to int conversion.
4570
4571 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4572
4573         A fix for bug #384191
4574         * ecore.cs, expression.cs: Fixed expression cloning.
4575
4576 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4577
4578         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4579
4580 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4581
4582         Fix #381559, test-638.cs, test-639.cs
4583         * assign.cs (CompoundAssign.Helper): New wrapper.
4584         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4585         access.
4586         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4587         Pass unconverted expressions to the params array creation expression.
4588         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4589         (PropertyExpr.EmitAssign): Likewise.
4590         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4591         element if it is of kind CompoundAssign.Helper.
4592         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
4593         first before anything else.
4594         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
4595         (ArrayAccess.LoadArrayAndArguments): Simplify.
4596
4597 2008-04-27  Marek Safar  <marek.safar@gmail.com>
4598
4599         * expression.cs: Fixed cloning of typeof(void).
4600
4601 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
4602
4603         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
4604         (Assign.Emit): Likewise.  Move it to ...
4605         (CompoundAssign.DoResolve): ... here and ...
4606         (CompoundAssign.Emit): ... here.
4607         (EventAddOrRemove): New helper to handle += and -= on events, and
4608         avoid the use of BinaryDelegates.
4609         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
4610         (EventExpr.EmitAddOrRemove): Improve.
4611         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
4612
4613         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
4614         create VarExprs for 'foo.bar.var'.
4615         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
4616         is a highly inappropriate name for its functionality.
4617
4618 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4619
4620         Simplify handling of multiple assignments
4621         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
4622         inheritable-only.
4623         (SimpleAssign): New.  Class to be used for normal assignments.
4624         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
4625         * expression.cs, parameter.cs, statement.cs: Likewise.
4626
4627 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4628
4629         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
4630         for incompatible underlying types, more to come, uff.
4631
4632 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4633
4634         Fix gtest-388.cs
4635         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
4636         Handle 'leave_copy'.
4637
4638 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4639
4640         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
4641
4642 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
4643
4644         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
4645         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
4646         * statement.cs (While, Do, For): Allow test to have side effects.
4647         (For.DoEmit): Always emit InitStatement.
4648
4649         Fix test-635.cs
4650         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
4651         Always create SideEffectConstant.
4652         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
4653         of type EnumConstant.
4654
4655         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4656         Handle 'right' being SideEffectConstant of type 'bool'.
4657
4658         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4659         Use left.EmitBranchable instead of open coding it, so as to
4660         improve optimization opportunities.
4661
4662         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
4663
4664         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
4665         assumptions.
4666         (Expression.EmitSideEffect): Document.
4667
4668 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4669
4670         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
4671
4672 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4673
4674         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
4675
4676 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4677
4678         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
4679         conversion to expression tree.
4680
4681 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4682
4683         * ecore.cs: Removed unused expression.
4684
4685 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4686
4687         * expression.cs: Implemented NegateChecked and New expressions.
4688
4689 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4690
4691         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
4692
4693 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
4694
4695         Fix #351102
4696         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
4697         needing final 'ret' instruction.
4698
4699 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4700
4701         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
4702
4703 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4704
4705         * expression.cs: Emit ldnull and not null expression as an instance argument
4706          of static method expression calls.
4707
4708 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4709
4710         A fix for bug #378200
4711         * expression.cs: Fixed crash when creating parameterless expression tree
4712         method call.
4713
4714 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4715
4716         A fix for bug #375297
4717         * anonymous.cs: Fixed crash when inferring from null argument anonymous
4718         method.
4719
4720 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4721
4722         A fix for bug #377596
4723         * decl.cs, class.cs: Emit delegate type argument attributes.
4724
4725 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4726
4727         A fix for bug #365314
4728         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
4729         
4730 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4731
4732         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
4733         only.
4734
4735 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4736
4737         * generic.cs (TypeParameter): Removed redundant location.
4738
4739 2008-04-19  Marek Safar  <marek.safar@gmail.com>
4740
4741         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
4742         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
4743         FullNamedExpression in all declaration type expression, statements will come
4744         later.
4745
4746 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4747
4748         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
4749         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
4750
4751 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4752
4753         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
4754         code.
4755
4756 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4757
4758         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
4759         constraints.
4760
4761 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4762
4763         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
4764         name expressions.
4765         Also fixes #340463.
4766
4767 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
4768
4769         Hook up 'EmitSideEffect'
4770         * constant.cs (Constant.EmitSideEffect): New.
4771         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
4772         (SideEffectConstant.EmitSideEffect): New.
4773         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
4774         unconditional branch in EmitBranchable.
4775         (FieldExpr.EmitBranchable): New.
4776         * expression.cs (Unary.EmitSideEffect): New.
4777         (Binary.EmitSideEffect): New.
4778         (VariableReference.EmitSideEffect): New.  Do nothing.
4779
4780 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4781
4782         Introduce 'EmitSideEffect'
4783         * ecore.cs (Expression.EmitSideEffect): New.
4784         (TypeCast): Rename from EmptyCast.
4785         (EmptyCast): New.
4786         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
4787         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
4788         * convert.cs, nullable.cs: Update to changes.
4789
4790 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4791
4792         * class.cs, cs-parser.jay: Early check for base types expression.
4793
4794 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4795
4796         * decl.cs (MemberName): Declare PrettyName as obsolete.
4797
4798 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4799
4800         * namespace.cs: Use MemberName comparison.
4801
4802 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4803
4804         Fix build break
4805         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
4806         FullName.
4807         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
4808         (MemberName.FullyQualifiedName): New.  Provides the functionality
4809         that users assume FullName would have.
4810         * ecore.cs, namespace.cs: Update to changes.
4811
4812         * statement.cs (Using.assign): Make into ExpressionStatement.
4813         (Using.EmitPreTryBody): Simplify.
4814
4815 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4816
4817         * report.cs: ColorFormat is protected.
4818         
4819         * rootcontext.cs: Unused fields clean-up.
4820         
4821         * namespace.cs: Made UsingEntry name private.
4822
4823 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4824
4825         * cs-tokenizer.cs, location.cs: Removed unused field.
4826
4827 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
4828             Raja R Harinath  <harinath@hurrynot.org>
4829
4830         Fix #379822
4831         * constant.cs (SideEffectConstant.value): Rename from 'left'.
4832         (SideEffectConstant.side_effect): Rename from 'right'.
4833         (SideEffectConstant..ctor): Normalize 'side_effect'.
4834         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
4835         value of this constant.
4836         * cfold.cs: Update to changes.
4837
4838 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4839
4840         * cs-paser.jay: Removed unused variable.
4841         
4842         * driver.cs: Made Compile instance method.
4843
4844 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
4845
4846         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
4847
4848 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4849
4850         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
4851
4852 2008-04-13  Jb Evain  <jbevain@novell.com>
4853
4854         * namespace.cs: update the System.Core fullname for 2.1
4855         * driver.cs: update the list of required assemblies for 2.1.
4856         Merged from the Moonlight 2 branch.
4857
4858 2008-04-11  Marek Safar  <marek.safar@gmail.com>
4859
4860         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
4861         types and user defined operators. User operators arguments has to be checked
4862         for null value before invocation, which also means no operator is called
4863         when any argument is not convertible to unwrapped nullable type.
4864         
4865 2008-04-09  Marek Safar  <marek.safar@gmail.com>
4866
4867         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
4868         of Unary expressions to follow operator overloading rules precisely.
4869         Also fixes #321794, #323794
4870         
4871 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4872
4873         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
4874         expression.
4875         
4876 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4877
4878         * expression.cs, ecore.cs: Implemented MemberInit expression.
4879         
4880 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
4881
4882         Fix mono/tests/exception4.cs
4883         * statement.cs (ExceptionStatement, TryCatch): Revert to using
4884         ec.NeedReturnLabel () rather emitting a 'nop'.
4885
4886         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
4887         simple heuristic.
4888         (TryCatch.SomeCodeFollows): Likewise.
4889         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
4890         for 'break', 'continue' and 'return' statements inside a try.
4891         We're fairly sure that the generated IL stream will have more
4892         instructions textually following the try.
4893         (FlowBranchingTryCatch): Likewise.
4894
4895         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
4896         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
4897         overrides.
4898
4899         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
4900         wrapper -- forward everything to CollectionForeach.
4901         (CollectionForeach.NonDisposableWrapper): New.
4902         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
4903         instead of a pop + branch to end.
4904
4905 2008-04-07  Marek Safar  <marek.safar@gmail.com>
4906
4907         A fix for bug #377485
4908         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
4909         Propagate location for extension method groups. Report conversion failure at
4910         right place.
4911
4912 2008-04-07  Marek Safar  <marek.safar@gmail.com>
4913
4914         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
4915         ListInit and Field expressions.
4916
4917 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
4918
4919         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
4920         Since $PC is always -1 inside the body of MoveNext, the fault
4921         handler is a no-op.
4922         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
4923         * statement.cs (ExceptionStatement.emit_finally): Likewise.
4924         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
4925
4926         The denouement!  Fix #324708
4927         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
4928         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
4929         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
4930         'finally' inside the finally clause.
4931
4932         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
4933         inside an iterator.  Don't emit the body of the 'finally' inside
4934         the finally clause yet.
4935
4936         Use the ResumableStatement infrastructure for MoveNext ()
4937         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
4938         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
4939         'old_resume_points'.  Move dispatcher upfront.
4940         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
4941         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
4942         in an enumerator.  This encodes the main fix in this patch series
4943         -- we can only jump into the first instruction of a try from the
4944         outside, but we want to emit try/finally regions in iterators and
4945         resume in the middle of them.
4946
4947 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
4948
4949         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
4950         of NeedReturnLabel here.
4951
4952         Introduce a common point for emitting try/finally to IL
4953         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
4954         features of the various subclasses, which are now driven by ...
4955         (ExceptionStatement.EmitPreTryBody): ... this and ...
4956         (ExceptionStatement.EmitTryBody): ... this and the original
4957         EmitFinallyBody.
4958         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
4959         Remove DoEmit and update to follow above protocol.
4960
4961         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
4962         of the dispatcher are the same, skip emitting the 'switch'.
4963         * iterator.cs (Iterator.EmitDispose): Update to changes.
4964
4965         Clean up handling of 'using' statement
4966         * statement.cs (UsingTemporary): New.  Carved out of ...
4967         (Using): ... this.  Simplify drastically.  Handle exactly
4968         one variable.
4969         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
4970         or Using as appropriate.  If there are multiple variable declared,
4971         create nested Using statements.
4972         (resource_acquisition): Kill.
4973
4974         * statement.cs (ExceptionStatement.EmitForDispose): Use
4975         EmitFinallyBody, not EmitFinally.
4976
4977         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
4978         * iterator.cs: Update to changes.
4979
4980         Start using the ResumableStatement infrastructure
4981         * statement.cs (ResumeableStatement.PrepareForDispose): New.
4982         (ResumableStatement.EmitForDispose): New.
4983         (ExceptionStatement): Override them.
4984         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
4985         EmitForDispose to create the body of the Dispose method.  Don't
4986         use OldResumePoint.
4987
4988         * iterator.cs (Iterator.AddResumePoint): Move here from ...
4989         * statement.cs (Toplevel.AddResumePoint): ... here.
4990         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
4991         * flowanalysis.cs (FlowBranchingIterator): New.
4992         * codegen.cs (EmitContext): Update to changes.
4993
4994         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
4995         (Iterator.old_resume_points): Rename from 'resume_points'.
4996         (Iterator.MoveNextStatement): Remove unused class.
4997
4998         New infrastructure for try/finally in iterators (still unused)
4999         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5000         (FlowBranchingToplevel.AddResumePoint): Hook into
5001         ToplevelBlock.AddResumePoint.
5002         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5003         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5004         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5005         resume points and assign program-counter values.
5006         (ExceptionBlock.AddResumePoint): Collect resume points for
5007         de-muxer at the top of try block.
5008         * iterators.cs (Yield.CheckContext): Simplify.
5009         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5010
5011 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5012
5013         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5014         argument to an ExitStatement.
5015         (FlowBranchingException): Refactor saved origins code.
5016         * statement.cs (ExitStatement): Update to cahges.
5017         * iterator.cs (YieldBreak): Likewise.
5018
5019         * statement.cs (ResumableStatement): New.  Common base class for
5020         YieldReturn and ExceptionStatement.
5021         (ExitStatement): New.  Common base class for Return and YieldBreak.
5022         (Return): Update to changes.
5023         * iterator.cs (YieldBreak): Likewise.
5024         * lambda.cs (ContextualReturn): Likewise.
5025
5026         Fix #377028
5027         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5028         emit a meaningful error message.
5029
5030         Fix #324765, #319508
5031         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5032         (VariableInfo.SetAssigned): Set it.
5033         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5034         determine if CS0219 or CS0168 is appropriate.  Don't use
5035         flow-analysis information.
5036         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5037         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5038         (EmitContext.EndFlowBranching): ... this.
5039
5040 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5041
5042         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5043
5044 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5045
5046         A fix for bug #376508
5047         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5048         ImplicitConversionExists.
5049
5050 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5051
5052         * expression.cs (Binary): Added remaining binary operators to expression
5053         tree builder.
5054
5055         * nullable.cs: Optimize shift with null argument.
5056
5057 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5058
5059         Fix minor IL regression
5060         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5061         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5062         * cs-parser.jay (try_statement): Update to changes.
5063
5064         * statement.cs (TryFinally.need_exc_block): Delete.
5065         (TryFinally): Update to changes.
5066
5067         Now all ExceptionStatements are unconditional
5068         * statement.cs (CollectionForeach.DisposableWrapper): New.
5069         Extract out the try/finally code into a new wrapper.
5070         (CollectionForeach.Resolve): Use it to simplify the code.
5071
5072 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5073
5074         Start at simplifying ExceptionStatement semantics a bit
5075         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5076         * cs-parser.jay (try_statement): Update to changes.
5077         (opt_catch_clauses): Remove.
5078         * flowanalysis.cs: Update to changes.
5079         (FlowBranching.BranchingType.TryCatch): New.
5080         (FlowBranchingTryCatch): New.
5081
5082         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5083         (FlowBranching.CreateBranching): Update to changes.
5084         (FlowBranchingBlock.AddSibling): Add sanity check.
5085         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5086         Update to changes.
5087
5088         * iterators.cs (Iterator.MarkFinally): Remove.
5089         * statement.cs (ExceptionStatement): Update to changes.
5090
5091         Add support for skipping over finally blocks at runtime.  First
5092         in a series to fix #324708
5093         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5094         (Iterator.EmitMoveNext): Initialize it.
5095         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5096         branch over the body of the 'finally' clause.
5097
5098 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5099
5100         Avoid lopsided use of Foo/DoFoo names
5101         * statement.cs (ExpressionStatement.EmitFinallyBody):
5102         Rename from EmitFinally.
5103         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5104         * iterator.cs: Update to changes.
5105
5106 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5107
5108         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5109         based on UserOperatorCall. More binary nullable operators clean up.
5110
5111 2008-04-02  Martin Baulig  <martin@ximian.com>
5112
5113         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5114
5115 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5116
5117         * nullable.cs: Merge user and empty conversions when lifting expression
5118         trees.
5119         
5120         * expression.cs (StringConcat): Implemented expression tree representation.
5121
5122 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5123
5124         * nullable.cs: When lifting null literal and a user operator exists, no call 
5125         is made.
5126         
5127 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5128
5129         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5130         null.
5131
5132 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5133
5134         * nullable.cs, expression.cs: Use namespace instead heavily nested
5135         monster abstract class.
5136
5137 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5138
5139         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5140         lifting of null literal and user operators. Clean up of some temporary
5141         nullable hacks.
5142
5143 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5144
5145         Fix #368224, test-629.cs
5146         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5147         if it crossed an unwind-protect boundary.
5148         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5149         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5150         inside an unwind-protected region.
5151         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5152         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5153         'leave' instead of a 'br' if unwind-protected.
5154         (Iterator.EmitYieldBreak): Likewise.
5155
5156 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5157
5158         * driver.cs: Only define versioninfo resources if no win32 resource
5159         file was specified.
5160
5161 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5162
5163         A fix for bug #372375
5164         * convert.cs: Fixed boxing of nullable types.
5165
5166 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5167
5168         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5169         type.
5170
5171 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5172
5173         A fix for bug #374619
5174         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5175         
5176 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5177
5178         * lambda.cs: Check return type only for invocation.
5179         
5180 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5181
5182         A fix for bug #374214
5183         * ecore.cs: Correctly report argument type mismatch.
5184
5185 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5186
5187         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5188         and not rely on broken IsEnum.
5189
5190 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5191
5192         * nullable.cs: New file, extracted from generic.cs.
5193         
5194         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5195
5196 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5197
5198         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5199         predefined comparison operators and null literals.
5200         
5201         * report.cs: New warning ID.
5202         
5203 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5204
5205         A fix for bug #370577
5206         * lambda.cs: Check return type too.
5207
5208 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5209
5210         A fix for bug #372846
5211         * class.cs: Automatic properties can be declared as unsafe.
5212
5213 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5214
5215         * location.cs: Use string based concatenation.
5216         
5217         * expression.cs: LiftedBinaryOperator is gmcs only.
5218         
5219 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5220
5221         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5222         conversions rules and expression trees.
5223
5224 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5225
5226         * delegate.cs: Use extension method source as delegate target.
5227
5228 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5229
5230         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5231         binary operations to be purely based on binary operations and optimized
5232         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5233         and other ET refactoring.
5234         
5235         * typemanager.cs: Fixed warning.
5236         
5237 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5238
5239         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5240         
5241         * symbolwriter.cs: Fixed.
5242
5243 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5244
5245         * anonymous.cs, driver.cs: Reset anonymous types counters.
5246
5247 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5248
5249         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5250         
5251         * class.cs: Use fullname for all type member definitions.
5252         
5253 2008-02-19  Martin Baulig  <martin@ximian.com>
5254
5255         * class.cs
5256         (IMethodData.EmitExtraSymbolInfo): New interface method.
5257         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5258         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5259         interface method here as an empty public virtual method.
5260
5261         * anonymous.cs
5262         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5263         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5264         CodeGen.SymbolWriter.SetRealMethodName().       
5265
5266 2008-02-18  Martin Baulig  <martin@ximian.com>
5267
5268         * anonymous.cs
5269         (ScopeInfo.EmitType): Override this and emit debugging
5270         information for captured variables.
5271         (RootScopeInfo.EmitType): Override this and emit symbol
5272         information for a captured `this'.
5273
5274 2008-02-15  Martin Baulig  <martin@ximian.com>
5275
5276         * iterators.cs: Emit debugging info.
5277
5278         * codegen.cs
5279         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5280         (EmitContext.OmitDebuggingInfo): New public property.
5281
5282         * statement.cs
5283         (While): Override Emit() and don't emit symbol info there; do it
5284         inside DoEmit() instead.
5285         (Block.Emit): Omit symbol information while emitting the scope
5286         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5287         block logic.
5288         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5289         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5290         .ctor to make `IsIterator' work.
5291
5292 2008-03-14  Martin Baulig  <martin@ximian.com>
5293
5294         * symbolwriter.cs: Added the new symbol writer function from the
5295         debugger's `terrania' branch; temporarily enclose them inside
5296         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5297         my vacations.
5298
5299 2008-03-14  Martin Baulig  <martin@ximian.com>
5300
5301         * symbolwriter.cs
5302         (SymbolWriter): Make this a public static class.
5303
5304         * codegen.cs
5305         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5306         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5307
5308 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5309
5310         A fix for bug #370577
5311         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5312         return type.
5313         
5314 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5315
5316         * typemanager.cs (CSharpName): Made 250 times faster.
5317
5318 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5319
5320         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5321         
5322 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5323
5324         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5325         crash when predefined field does not exist.
5326         
5327 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5328
5329         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5330         
5331 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5332
5333         * class.cs (FixedField): Don't crash when contructors are missing.
5334
5335 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5336
5337         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5338         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5339         check internal types accessibility for internal and external types.
5340         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5341
5342 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5343
5344         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5345         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5346         attribute.cs, statement: Use corect instance of predefined types (work
5347         related to #364674).
5348
5349 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5350
5351         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5352         
5353 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5354
5355         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5356         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5357         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5358         predefined types clean up, delayed predefined types members initialization
5359         (work related to #364674).
5360
5361 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5362
5363         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5364         
5365 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5366
5367         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5368         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5369         predefined types clean up (work related to #364674).
5370
5371 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5372
5373         * ecore.cs: Print an error message instead of throwing exception.
5374         
5375 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5376
5377         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5378         expression.cs, statement.cs: Unififed null literal representation.
5379
5380 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5381
5382         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5383         expression.cs: Refactored binary operators resolve phase and improved speed.
5384         The nullable code is still missing and won't work correctly, more fixes
5385         required.
5386
5387         It also fixes #323726, #324312, #324248, and many other unreported issues.
5388
5389 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5390
5391         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5392         instead of 'gmcs'.
5393
5394 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5395
5396         * ecore.cs: Clean-up and split BetterConversion.
5397         
5398 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5399
5400         Fix #363791
5401         * enum.cs (EnumMember.Value): Only access 'value' if
5402         ResolveValue says it's ok.
5403         (EnumMember.DoResolveValue): Don't set prev_member.value.
5404         (Enum.GetDefinition): Reverse arguments of Equals --
5405         EnumMember.Value can return 'null'.
5406
5407         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5408
5409 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5410
5411         * generic.cs, expression.cs: More ongoing work on expression trees.
5412         
5413 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5414
5415         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5416         handle missing matches when mutiple operators exist.
5417         
5418 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5419
5420         A fix for bug #363218
5421         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5422         initializers.
5423         
5424 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5425
5426         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5427         update. This time to deal correctly with SideEffectConstant expression used
5428         as an argument for another constant folding.
5429
5430 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5431
5432         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5433         MethodBuilder.
5434
5435 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5436
5437         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5438
5439 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5440
5441         A fix for bug #328136
5442         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5443         side is a false constant, because we still need to evaluate the right-hand
5444         side.
5445
5446         * statement.cs (If): Emit two types of boolean constants (simple constant,
5447         side-effect constant).
5448
5449 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5450
5451         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5452
5453         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5454         constants.
5455
5456 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5457
5458         A fix for bug #361457
5459         * ecore.cs (IsApplicable): Params methods have lower priority.
5460
5461         * support.cs: Return correct parameter modifier for params types.
5462
5463 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5464
5465         * generic.cs (TypeParameter): Cache attribute target name.
5466
5467         * support.cs: Removed unused variable.
5468
5469         * typemanager.cs: Removed debugging leftover.
5470
5471         * ecore.cs: Use local type instead of a property;
5472
5473         * class.cs (VerifyMembers): Consider also parent to test whether type member
5474         is local or public.
5475
5476         * expression.cs (FullMethodDesc): Removed.
5477
5478         * attribute.cs (IsValidArgumentType): Made static.
5479
5480 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5481
5482         Cleanup to be more readable.
5483         * Makefile (GMCS_PROFILE): Remove.
5484         (COMPILER_NAME): New helper.
5485
5486 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5487
5488         * cs-tokenizer.cs: if a conditional expression happens inside a
5489         (...) this also means that we do not need to de-ambiguate between
5490         an parenthesized expression and a cast.
5491
5492         Fixes 346484.
5493
5494         * constant.cs (SideEffectConstant): a constant value that happens
5495         to have a side effect.
5496
5497         Fixes the build regressions introduced by the fix for #359789
5498
5499 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5500
5501         * expression.cs (Conditional.Emit): when emitting the ternary
5502         operator, use local variables to generate code verifiable code.
5503
5504         The verifier cannot infer that the type on stack before the
5505         stloc.0 is executed is of type ParentB. This happens because the
5506         stack merge algorithm uses only parent types when deciding which
5507         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5508         335.
5509
5510         This code compiled with mcs is not verifiable under MS. The MS
5511         verifier picks the first common interface of Foo and Bar, which is
5512         wrong, but doesn't use a full join type of the 2 interfaces.
5513
5514         CSC uses a clever hack to compile such code in a verifiable
5515         way. It stores the intermediate values in a local variable with
5516         the expected type.
5517
5518         Fixes: #358102
5519
5520 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5521
5522         * expression.cs: Do not fold BitwiseAnd operators when the left
5523         side is a false constant, because we still need to evaluate the
5524         right-hand side.
5525
5526         Fixes #359789
5527
5528         * support.cs: Instead of throwing an InternalErrorException when
5529         the position of the stream is outside the boundary of our buffer,
5530         reset the state of the reader, and restart the reading from the
5531         beginning of the file.
5532
5533 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5534
5535         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5536
5537 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5538
5539         A fix for bug #361686
5540         * decl.cs: A protected types used inside a private class which parents
5541         derives from the protected class are accessible.
5542
5543 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5544
5545         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5546         the parameterless constructor.
5547
5548 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5549
5550         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5551         lookup methods to use standard member cache when doing member lookup.
5552
5553 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5554
5555         * driver.cs: Don't report full path for referenced module as assembly error.
5556
5557 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5558
5559         * Makefile: Fixed `qh' target to work on all machines.
5560
5561         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5562         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5563         and HasElementType with TypeManager implementation.
5564
5565 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5566
5567         A fix for bugs #325134, #359749
5568         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5569         first binds point to non-method member expression.
5570
5571 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5572
5573         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5574
5575 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5576
5577         A fix for bugs #321394, #323028
5578         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5579         Reworked naive IsAccessibleAs implementation to handle nested types.
5580
5581 2008-02-05  Jb Evain  <jbevain@novell.com>
5582
5583         * class.cs: use generic type comparison for parameters
5584         as well.
5585
5586 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5587
5588         A fix for bug #325372
5589         * class.cs: Use generic type comparison when testing method signatures.
5590
5591 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5592
5593         A fix for bug #357047
5594         * ecore.cs: Applied C# 3.0 changes to better conversion.
5595
5596 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5597
5598         A fix for bug #358374
5599         * cs-parser.jay: Correctly set modifiers for all constructor types.
5600
5601 2008-02-04  Marek Safar  <marek.safar@gmail.com>
5602
5603         A fix for bug #355251
5604         * generic.cs: Added base class constraint based type inference.
5605
5606 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5607
5608         A fix for bug #357255
5609         * decl.cs: One more missing visibility check.
5610
5611 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5612
5613         * support.cs: Fixed broken return.
5614
5615 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5616
5617         * report.cs: Correctly reset warnings count after probing.
5618
5619 2008-01-25  Martin Baulig  <martin@ximian.com>
5620
5621         * namespace.cs
5622         (NamespaceEntry.SymbolFileID): Make this work again after
5623         MemberName.ToString() is gone.
5624
5625 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5626
5627         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
5628         expressions.
5629
5630 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5631
5632         * generic.cs: Use full implicit conversion for type inference fixing.
5633
5634 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5635
5636         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
5637         Fixed user operator conversions.
5638
5639 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5640
5641         * generic.cs: Do nullable type to null comparison optimization during
5642         resolve phase.
5643
5644 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5645
5646         A fix for bug #355163
5647         * generic.cs: Enabled l-value resolve on nullable expressions.
5648
5649 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5650
5651         A fix for bug #353986
5652         * class.cs: Ingore static ctors with parameters for any further checks.
5653
5654 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5655
5656         A fix for bug #354310
5657         * namespace.cs: Removed redundant check.
5658
5659 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5660
5661         A fix for bug #354928
5662         * expression.cs: ElementInitializers can be resolved only once.
5663
5664 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5665
5666         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
5667         Condition expressions.
5668
5669 2008-01-23  Marek Safar  <marek.safar@gmail.com>
5670
5671         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
5672
5673 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5674
5675         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
5676         not allowed.
5677
5678         * generic.cs: Implemented coalesce expression.
5679
5680 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5681
5682         A fix for bug #355145
5683         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
5684         expression tree type inference.
5685
5686 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
5687
5688         Fix #354663
5689         * expression.cs (Binary.IsUnsignedType): Fix typo.
5690
5691 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5692
5693         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
5694
5695 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5696
5697         A fix for bug #355161
5698         * ecore.cs, expression.cs: Wider range of extension method supported
5699         expressions.
5700
5701 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
5702
5703         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
5704         AssemblyBuilder to operate in compiler context. Fixes mcs part of
5705         bug #354970.
5706
5707 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5708
5709         A fix for bug #355148
5710         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
5711
5712 2008-01-22  Miguel de Icaza  <miguel@novell.com>
5713
5714         * expression.cs (CreateExpressionTree): Add support for or and
5715         logical or, and indent following the coding conventions.
5716
5717         * typemanager.cs (LinqExpression): renamed from
5718         ExpressionTreeManager, for a shorter name.
5719
5720         Use TypeManager.CoreLookupType to lookup types from our core
5721         assemblies and turn those into "Type" variables.
5722
5723         Consumers that previously used "Namespace" and "Type" from this
5724         class should instead use the TypeExpression which is a type that
5725         is fully resolved (without involving the regular C# resolution
5726         rules). 
5727
5728         This typically looks like this:
5729
5730         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
5731         new MemberAccess (texpr, name, type_arguments, loc)
5732
5733         This avoids the problem in: #355178
5734
5735 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5736
5737         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
5738         feature in parser only as we do in other cases.
5739         
5740 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5741
5742         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
5743         typemanager.cs: A refactoring of params arguments to reuse existing
5744         expressions (params -> array initializer) to emit params argument instead
5745         of specialized handling.
5746         It was required by expression tree implementation and it has other benefits
5747         as well, we now apply same optimization for params arguments as we do for
5748         array initializers.
5749         
5750 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5751
5752         A fix for bug #353526
5753         * generic.cs: A type inference of params arguments may not required any
5754         temporary array creation.
5755         
5756 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5757
5758         A fix for bug #353534
5759         * generic.cs, ecore.cs, expression.cs: A method group type inference is
5760         supported for delegates only.
5761         
5762 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5763
5764         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
5765         type for more than 1 candidates.
5766         
5767 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5768
5769         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
5770         expressions.
5771         
5772 2008-01-16  Marek Safar  <marek.safar@gmail.com>
5773
5774         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
5775         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
5776         operator) expressions. 
5777                 
5778 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5779
5780         * statement.cs: Avoid declaring an IL variable for this_variable since it is
5781         not accessed from the generated IL.
5782
5783 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5784
5785         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
5786         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
5787         statement.cs: The first expression tree implementation drop, mostly
5788         infrastructure work.
5789
5790 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5791
5792         * ecore.cs (IsNestedChild): Refactored.
5793
5794 2008-01-11  Marek Safar  <marek.safar@gmail.com>
5795
5796         * lambda.cs: Don't use a cast on unknown expression statement.
5797
5798 2008-01-10  Geoff Norton  <gnorton@novell.com>
5799
5800         * cs-tokenizer.cs: One more token to distinguish between method and lambda
5801         arguments
5802
5803 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5804
5805         * doc.cs: Report better /doc crash details.
5806         
5807 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5808
5809         A fix for bug #352536
5810         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
5811
5812 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5813
5814         A fix for bug #352287
5815         * ecore.cs, expression.cs: Do `this' access checking in all member access
5816         expressions.
5817         
5818 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5819
5820         * rootcontext.cs, driver.cs: Switch to linq mode by default.
5821         
5822         * report.cs: Reset message stacks.
5823         
5824 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5825
5826         * generic.cs (InferInPhases): Correctly calculate params position.
5827         
5828 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5829
5830         * cs-tokenizer.cs: No need to parse full string when parsing lambda
5831         arguments.
5832
5833 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5834
5835         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
5836         
5837         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
5838         
5839         * driver.cs: Updated --help option.
5840         
5841 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5842
5843         * generic.cs (InferParamsTypeArguments): Removed.
5844         (InferInPhases): Add params type inference.
5845         (LowerBoundInference): Fixed scoring mechanism.
5846         
5847         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
5848         
5849 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
5850
5851         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
5852         byte array for unsigned "baked" assemblies.
5853
5854 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
5855
5856         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
5857         array for assemblies that are not strongnamed.
5858
5859 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5860
5861         A fix for bug #351481
5862         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
5863         declaring type for nested generic types.
5864         
5865 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5866
5867         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
5868         instead of ToString.
5869         
5870 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5871
5872         A fix for bug #351047
5873         * expression.cs (Binary.ResolveOperator): Allow equality operators between
5874         null and structs only when equality and inequality operators are defined
5875         either as an user-operators or predefined operators.
5876         
5877 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5878
5879         A fix for bug #351047
5880         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
5881         
5882 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5883
5884         A fix for bug #351257
5885         * cs-tokenizer.cs: Advance line number for '\r' correctly.
5886         
5887 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5888
5889         A fix for bug #351157
5890         * class.cs (Using): Fixed yet another broken cloning.
5891         
5892         (Block): Put back more sensible default value for statements.
5893         
5894 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
5895
5896         * codegen.cs: Allow AssemblyVersion with only major version component.
5897         Fixes bug #351055.
5898
5899 2007-12-29  Marek Safar  <marek.safar@gmail.com>
5900
5901         A fix for bug #324654
5902         * class.cs: Use FullName property as member name.
5903
5904 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5905
5906         A fix for bug #342117
5907         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
5908         constructor constraint.
5909
5910 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5911
5912         A fix for bug #338273
5913         * class.cs (ProbertyBase): Access modifier checks are required for overrides
5914         only.
5915
5916 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5917
5918         A fix for bug #350839
5919         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
5920
5921 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
5922
5923         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
5924         GHOP:
5925         
5926         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
5927
5928         * statement.cs: Changed some Hashtables to use HybridDictionaries
5929         instead. It was observed that some HashTables only contained a few
5930         items in the vast majority of cases. Since HybridDictionary is
5931         more efficient on small sets (<10 elements), "known_variables"
5932         from class ExplicitBlock as well as "labels" and "constants " from
5933         class Block were changed to HybridDictionaries. 
5934
5935         Atsai results: (56216kb->54987kb)
5936
5937         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
5938
5939
5940 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
5941
5942         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
5943         GHOP:
5944         
5945         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
5946         
5947         * expression.cs: foreach loop to for loop, saved on allocation of
5948         enumerator (59333kb->59141kb)
5949
5950         * statement.cs. Changed foreach loops to for loops, saved on
5951         allocation of enumerator (59141kb->59006kb)
5952
5953         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
5954         when constructed with no specified capacity. This was causing a
5955         few ArrayLists to allocate more memory than they would potentially
5956         need in the Block class and MemberCache class. Setting the
5957         ArrayLists to construct with a capacity of 1 saves some
5958         memory. (56216kb->55585kb)
5959
5960 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5961
5962         A fix for bug #347189 (2nd issue)
5963         * expression.cs (MemberAccess): Nested type can be found in base non-generic
5964         type.
5965
5966 2007-12-27  Miguel de Icaza  <miguel@novell.com>
5967         
5968         * report.cs: Do not use colors if stdout and stderr are not a
5969         terminal.
5970
5971 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5972
5973         A fix for bug #346998
5974         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
5975         overloads.
5976
5977 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5978
5979         A fix for bug #343465
5980         * class.cs: Explicit method name for nested types uses dots only.
5981
5982 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5983
5984         A fix for bug #343707
5985         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
5986
5987 2007-12-27  Marek Safar  <marek.safar@gmail.com>
5988
5989         * ecore.cs: Report type inference errors only when arguments count matches
5990         parameter count.
5991         
5992         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
5993         
5994         * expression.cs, report.cs: New warning.
5995         
5996         * typemanager.cs: Catch anonymous method type too.
5997
5998 2007-12-23  Marek Safar  <marek.safar@gmail.com>
5999
6000         A fix for bug #346379
6001         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6002
6003 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6004
6005         A fix for bug #347359
6006         * expression.cs (Invocation): Don't resolve already resolved expression.
6007
6008 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6009
6010         A fix for bug #347189
6011         * class.cs (FixedField): Use non-dependent code only in the define phase.
6012
6013 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6014
6015         A fix for bug #348076
6016         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6017
6018 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6019
6020         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6021         discovered extension methods.
6022
6023 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6024
6025         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6026         method.
6027
6028 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6029
6030         * report.cs (ErrorMessage): Add support for using colors on
6031         terminals that support it. 
6032
6033 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6034
6035         * ecore.cs: Use information about expanded params for error reporting.
6036
6037 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6038
6039         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6040         and logic for params overloads.
6041         
6042 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6043
6044         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6045         as this is also created from the parser.  Fixes #349034
6046
6047 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6048
6049         * statement.cs (Throw.CloneTo): it is valid to have empty
6050         expressions for throw. 
6051
6052 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6053
6054         * cs-parser.jay: Set delegate constraint parsing region correctly.
6055
6056 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6057
6058         A fix for bug #345467
6059         * typemanager.cs (IsEqual): Compare generic parameters position only.
6060         
6061 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6062
6063         * expression.cs (BaseAccess): Type arguments can be null.
6064
6065 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6066
6067         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6068         consistent even when an error has occured.
6069         (Switch.Resolve): Likewise.
6070
6071 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6072
6073         A fix for bug #334505
6074         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6075         overrides.
6076         
6077 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6078
6079         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6080         refactorings required to resolve extension methods correctly when mixing
6081         generics and non-generics members.
6082         
6083 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6084
6085         A fix for bug #342584
6086         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6087         conversion.
6088         
6089 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6090
6091         A fix for bug #342512
6092         * delegate.cs: Use delegate argument expression when is available. Don't
6093         emit virtual call when class is sealed.
6094         
6095 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6096
6097         A fix for bug #325423
6098         * assign.cs (FieldInitializer): Use resolved expression for emit.
6099         
6100         * class.cs: Print less confusing error message.
6101         
6102 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6103
6104         * cs-tokenizer.cs: Removed GMCS ifdefs.
6105         
6106         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6107         mcs.
6108         
6109         * cs-parser.jay: Disabled nullable check.
6110         
6111         * generic-mcs: Copied more generic stuff.
6112                 
6113 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6114
6115         * gcs-parser.jay: Merged to cs-parser.jay.
6116         
6117         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6118         * *.csproj, *.sources: Updated to use only jay parser file.
6119
6120 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6121
6122         * gcs-parser.jay: Added nullable and default expression feature checks.
6123         
6124 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6125
6126         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6127         it fixes many TODOs and hidden bugs.
6128         
6129         * expression: Removed duplicate error check.
6130
6131 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6132
6133         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6134         implicitly type local variable only when it is used in a declaration.
6135
6136 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6137
6138         * attribute.cs: Use CS0612 for empty strings.
6139
6140 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6141
6142         * lambda.cs, statement.cs: Contextual return may act as a statement.
6143
6144 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6145
6146         A fix for a regression cause by #324222
6147         * class.cs: Don't report unused even when it implements an interface.
6148         
6149 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6150
6151         A fix for bug #341205
6152         * ecore.cs, expression.cs: Method group expression cannot do static
6153         method access with an instance reference check before overloading takes
6154         a place.
6155         
6156 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6157
6158         A fix for bug #325359
6159         * class.cs: Use predictable name for automatically generated property.
6160         
6161 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6162
6163         A fix for bug #324996
6164         * expression.cs (Is): Handle case where D is nullable and T is not
6165         correctly.
6166         
6167         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6168         
6169 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6170
6171         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6172         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6173         Flush small error reporting changes.
6174         
6175 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6176
6177         A fix for bug #324996
6178         * expression.cs: Rewrote Is expression implementation to work with
6179         generics, nullable types, anonymous method. A const result expression 
6180         uses existing infrastructure instead of custom not fully-featured one.
6181         
6182 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6183
6184         A fix for bug #340202
6185         * class.cs: Consider generics for volatile field.
6186
6187 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6188
6189         A fix for bug #335594
6190         * expression.cs: Use conversion rules when handling string addition.
6191         
6192 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6193
6194         A fix for bug #336651
6195         * expression.cs: Fixed a crash when probing is on.
6196         
6197 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6198
6199         A fix for bug #324242
6200         * covert.cs: Added a conversion from any nullable-type with an 
6201         underlying enum-type to the type System.Enum.
6202         
6203 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6204
6205         A fix for bug #324222
6206         * class.cs: Report all non-used event fields.
6207         
6208 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6209
6210         A fix for bug #325161
6211         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6212         qualifier for generic types.
6213         
6214 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6215
6216         A fix for bug #322971
6217         * expression.cs, ecore.cs: Added intermediate result value check for
6218         indexers. 
6219         
6220 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6221
6222         A fix for bug #324754
6223         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6224         when it was requested.
6225
6226 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6227
6228         A fix for bug #325101
6229         * expression.cs: Do type not value comparison for `is' expression.
6230
6231 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6232
6233         A fix for bug #320236
6234         * convert.cs: Don't apply user conversion on underlying target type.
6235
6236 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6237
6238         * expression.cs: Don't use unresolved expression for error reporting.
6239  
6240 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6241
6242         A fix for bugs #337712, #324490
6243         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6244         overloading resolution too.
6245         
6246         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6247         the process consistent and more robust.
6248         
6249         * expression.cs, linq.cs, report.cs: Update.
6250
6251 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6252
6253         A fix for bug #332909
6254         * attribute.cs: Resolve attributes in correct context using error
6255         handling procedure.
6256         
6257         * rootcontext.cs: Define Obsolete attribute members as core members.
6258         
6259 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6260
6261         * statement.cs: Removed unused methods.
6262         
6263 2007-10-31  Wade Berrier  <wberrier@novell.com>
6264
6265         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6266         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6267         during 'make dist')
6268
6269 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6270
6271         A fix for bug #338102
6272         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6273         methods registered as non-generics.
6274         
6275 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6276
6277         A fix for bugs #337712, #324490
6278         * delegate.cs: Delegate covariance and contravariance is not allowed for
6279         value types.
6280         
6281 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6282
6283         A fix for bug #337719 
6284         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6285         `from' keyword.
6286         
6287 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6288  
6289         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6290
6291 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6292  
6293         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6294         query expressions.
6295
6296 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6297
6298         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6299
6300 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6301  
6302         A fix for bug #334652
6303         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6304         extension methods when we have not found the best candidate in normal
6305         container.
6306
6307 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6308
6309         * AssemblyInfo.cs: Keep up-to-date.
6310
6311 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6312
6313         * Makefile: Fixed generics compiler name.
6314         
6315 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6316
6317         * lambda.test: removed, lambda parsing is done differently.
6318         
6319         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6320
6321 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6322
6323         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6324
6325 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6326
6327         * Makefile, *.sources : All C# compilers are in mcs folder.
6328         
6329         * *.cs: Use existing 2_1 define for smcs.
6330
6331 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6332
6333         A fix for bug #335847
6334         * assign.cs, expression.cs: Couple of changes to avoid creating a
6335         temporary variable for each object initializer assignment statement. It
6336         simplifies struct initialization too, otherwise two temporary variables
6337         would be required.
6338         Implemented optimization of redundant default element initializers.
6339         
6340 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6341
6342         A fix for bug #336766
6343         * expression.cs (Class.CheckBase): Use generic name when method is
6344         generic.
6345         
6346 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6347
6348         A fix for bug #334737
6349         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6350         variable and not variable argument for prepared copies.
6351
6352 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6353
6354         A fix for bug #325110
6355         * class.cs, expression.cs, attribute.cs: Use open generic method when
6356         checking conditional attribute.
6357         
6358 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6359
6360         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6361         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6362         FeatureIsNotAvailable.
6363
6364 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6365
6366         ** C# 3.0 Partial methods
6367         
6368         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6369         methods support. Because of member cache issue with generics only
6370         non-generics partial methods are fully supported.
6371         
6372 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6373         
6374         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6375         generics and to use member cache for member checking. It also improves
6376         performance and fixes remaining overloads issues.
6377         
6378 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6379         
6380         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6381         roottypes.cs, typemanager.cs:
6382                 
6383         A member cache creation logic changed to add members immediately and
6384         not rely on fallback. The member cache is now only prefered way
6385         how to access and find type declaration members. It saves 5 MB of memory
6386         during MWF compilation and makes code ready for more optimizations and
6387         clean-ups, it's also a pre-requirement for partial methods.
6388         
6389 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6390
6391         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6392         handling for generic parameters.
6393
6394 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6395         
6396         * class.cs (FixedField): Removed redundant volatile check.
6397         
6398 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6399         
6400         * class.cs, decl.cs: Fixed overload members verification to do only one
6401         check per possible collision.
6402         
6403 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6404         
6405         A fix for bug #325478
6406         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6407         and create only one disposable flags container.
6408         
6409 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6410         
6411         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6412         * statement.cs (Fixed): Fixed variables cloning.
6413         
6414 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6415         
6416         A fix for bug #333342
6417         * class.cs (EventField): Don't mark value type event as synchronized. 
6418         
6419 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6420         
6421         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6422         inference to identify best candidate method correctly.
6423         (ProperyExpr): A range variable is read only and cannot be modified.
6424         
6425 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6426         
6427         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6428         logic to identify best candidate method correctly.
6429         
6430 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6431         
6432         * location.cs (Equals, GetHashCode): Removed.
6433         
6434 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6435         
6436         * report.cs: Implemented message recorder. It is used mainly for lambda
6437         expressions to capture otherwise swallowed error messages.
6438         
6439         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6440
6441         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6442         and not at the top.
6443         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6444                 
6445         * expression.cs (MemberAccess): Always report lookup failure.
6446         
6447         * location.cs: Implemented Equals, GetHashCode.
6448         
6449         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6450         
6451 2007-10-10  Jb Evain  <jbevain@novell.com>
6452
6453         * codegen.cs: re-enable assembly version check.
6454
6455 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6456         
6457         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6458         checks.
6459         
6460         * namespace.cs (UsingAlias): Do correct version check.
6461         
6462 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6463         
6464         * expresison.cs, ecore.cs: Issue extension method error message when
6465         appropriate.
6466         
6467         * rootcontext.cs: Added ISO_2 compiler mode option.
6468
6469 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6470         
6471         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6472          message.
6473         
6474 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6475         
6476         * attribute.cs (GetString, GetBoolean): Work with both literal and
6477         constant.
6478         
6479         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6480         Moved method overload specific methods to MethodGroupExpr.
6481         
6482         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6483         it should be less memory consuming.
6484         
6485 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6486
6487         * codegen.cs: remove the assembly version check until the buildbot is
6488         fixed.
6489
6490 2007-10-07  Jb Evain  <jbevain@novell.com>
6491
6492         * attribute.cs (Attribute.GetString): if the value
6493         expression is a StringConstant, return its string value.
6494
6495 2007-10-07  Jb Evain  <jbevain@novell.com>
6496
6497         * typemanager.cs: add `assembly_version_attribute_type`.
6498         * codegen.cs: on attribute emission, check that the
6499         AssemblyVersionAttribute doesn't overflow.
6500
6501 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6502         
6503         A fix for bug #324677
6504         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6505         parent container of a scope container with currently resolved one. 
6506         
6507 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6508         
6509         A fix for bug #325534
6510         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6511         only.
6512         
6513 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6514         
6515         A fix for bug #327504
6516         * class.cs (Operator.Define): Refactored implicit and explicit user
6517         operator conversion rules.
6518         
6519 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6520         
6521         A fix for bug #327520
6522         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6523         
6524 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6525         
6526         A fix for bug #328022
6527         * class.cs (MethodData.Define): Use correct method to check whether
6528         a method implementents an accessor.
6529         
6530 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6531         
6532         A fix for bug #330069
6533         * statement.cs (Fixed.Resolve): Read the first array element only when
6534         an array is instantiated. 
6535         
6536 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6537         
6538         * expression.cs, assign.cs, generics.cs: Print correct operator when
6539         compound assignment is used.
6540         
6541 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6542         
6543         A fix for bug #325841
6544         * expression.cs (ArrayAccess): Use full argument cloning only for
6545         string compound concatenation.
6546         
6547 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6548         
6549         A fix for bug #328774
6550         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6551         assignment.
6552         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6553         assignment.
6554
6555 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6556
6557         Fix #328490
6558         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6559         Event accessibility checks here.  Remove some bogus code that
6560         accidently made GenericMethods work.
6561         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6562
6563 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6564         
6565         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6566         
6567         * statement.cs (Block): Refactored AddVariable to allow error handling
6568         customization.
6569         
6570         * generic.cs: New stub.
6571         
6572 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6573         
6574         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6575         flag.
6576         
6577 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6578
6579         * class.cs: Use partial container to record whether any partial part
6580         contains static field initializer and therefore default contructor has
6581         to be defined.
6582         
6583 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6584
6585         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6586         mono-list when only one of two partial parts has defined accessibility
6587         modifier.
6588         
6589 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6590
6591         A fix for bug #82845
6592         
6593         * class.cs (TypeContainer): Set correct resolve context for all field
6594         initializers.
6595         
6596 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6597
6598         * assign.cs: Fixed a crash when field is resolved twice with an error.
6599         
6600         * codegen.cs: Changed InFieldInitializer to be flag.
6601         
6602         * anonymous.cs, ecore.cs, expression.cs: Update after
6603         IsInFieldInitializer rename.
6604         
6605         * const.cs: Removed unused parameter.
6606         
6607         * class.cs: Changed the way how we resolve and emit field initializers.
6608         The field initilizers have to have access to contructor block to emit
6609         compiler generated code.
6610
6611 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6612
6613         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
6614         generics use TypeContainer instead.
6615         
6616 2007-09-12  Marek Safar  <marek.safar@gmail.com>
6617         
6618         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
6619
6620         * lambda.cs (ResolveParameters): Use more powerful
6621         InflateGenericArgument.
6622         
6623         * parameters.cs: Better exception message.
6624                 
6625 2007-09-10  Marek Safar  <marek.safar@gmail.com>
6626
6627         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
6628         correct expression block type. 
6629         
6630         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
6631         
6632         * expression.cs (Invocation): Extracted method group resolve to
6633         DoResolveOverload.
6634         
6635 2007-09-07  Marek Safar  <marek.safar@gmail.com>
6636
6637         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
6638         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
6639         
6640         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
6641         generic extension methods.
6642
6643 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6644
6645         A fix for bug #82676 (Do I get it right now?)
6646         * convert.cs (Binary.ResolveOperator): An interface is converted to the
6647         object before a standard conversion is applied.
6648         
6649 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6650
6651         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
6652         #82676.
6653         
6654 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6655
6656         A fix for bug #82676
6657         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
6658         non-generic interface types.
6659         
6660 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6661
6662         A fix for bug #82690
6663         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
6664         
6665 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6666
6667         A fix for bug #82571
6668         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
6669         modifier for container based methods.
6670         
6671 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6672
6673         A fix for bug #82676
6674         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
6675         any interface-type T means to any of interface type T.
6676
6677 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6678
6679         * namespace.cs: We have 2 versions of System.Core assembly.
6680
6681 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6682
6683         A fix for bug #82652
6684         * class.cs (Class.GetClassBases): Compare types and not expressions.
6685
6686 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6687
6688         A fix for bug #82620
6689         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
6690         actually never worked before.
6691         (IndexerAccess): Emit prepared arguments before they are modified.
6692         
6693 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6694
6695         A fix for bug #82563
6696         * assign.cs: Revert wrong fix.
6697         
6698         * expression.cs (VariableReference.EmitAssign): Handle ref reference
6699         correctly.
6700         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
6701         Instead of ldelema/stdind we have to use temporary variables to handle
6702         cases like String.Concat (params string[]).
6703         
6704 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6705
6706         * class.cs: EmitAttributes to Emit rename.
6707         
6708         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
6709         null.
6710         (MemberCore.HasClsCompliantAttribute): Don't depend on 
6711         GetClsCompliantAttributeValue execution.
6712         
6713 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6714
6715         * anonymous.cs: Use shorter type prefix.
6716         
6717         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
6718         when exist.
6719         
6720         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
6721         variables when probing is on.
6722         
6723         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
6724         unresolved variables.
6725         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
6726         handle transparent identifiers.
6727         
6728 2007-08-26  Marek Safar  <marek.safar@gmail.com>
6729
6730         * attribute.cs (IsClsCompliant): Add nullable types test.
6731         
6732 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
6733
6734         * doc.cs : catch other types of exception than XmlException to
6735           report CS1570. Fixed bug #82565.
6736
6737 2007-08-23  Marek Safar  <marek.safar@gmail.com>
6738
6739         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
6740         The number of delegate parameters has to match.
6741         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
6742         arrays.
6743
6744 2007-08-21  Marek Safar  <marek.safar@gmail.com>
6745
6746         * anonymous.cs (AnonymousMethod): Generate private anonymous method
6747         to fix problem with private arguments.
6748
6749 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6750
6751         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
6752         
6753         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
6754         
6755         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
6756         empty. Add cloning suport.
6757         
6758         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
6759
6760 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6761
6762         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
6763         to create EmptyCast. It handles EmptyConstantCast specialization for
6764         constants.
6765         
6766 2007-08-18  Marek Safar  <marek.safar@gmail.com>
6767
6768         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
6769         (EmitArrayArgument): One routine for array arguments.
6770         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
6771         
6772 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6773
6774         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
6775
6776 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6777
6778         * anonymous.cs: MemberLookupFinal update.
6779
6780         * class.cs (ConstructorInitializer): Is expression based.
6781         
6782         * delegate.cs: MethodGroupExpr update.
6783         
6784         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
6785         messages.
6786         (Error_MemberLookupFailed): Customizable error override.
6787         (MethodGroupExpr): Keep queried type for later usage.
6788         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
6789         resolve.
6790         
6791         * expression.cs: Error_MemberLookupFailed refactoring.
6792         (New.DoResolve): Resolve as much as possible.
6793         (ElementInitializer.Error_MemberLookupFailed): Object initializer
6794         customization for invalid member types.
6795
6796         * statement.cs: MethodGroupExpr update.
6797         
6798 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6799
6800         * modifier.cs (Check): Check all modifiers and not only accessibility
6801         ones.
6802
6803 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6804
6805         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
6806         type and not an expression.
6807
6808 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6809
6810         * statement.cs (Catch.Clone): Type and variable can be null.
6811
6812 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6813
6814         A fix for bug #81979
6815         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
6816         I am really not sure whether this is the best fix.
6817         
6818         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
6819         only once.
6820         
6821 2007-08-14  Marek Safar  <marek.safar@gmail.com>
6822
6823         ** C# 3.0 Object and collection initializers (major re-write)
6824         
6825         * assign.cs (DoResolve): Initializers are not assign related.
6826         
6827         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
6828         used during collection or object initialization.
6829         
6830         * expression.cs (Error_InvalidArguments): Add initializers specific
6831         messages. More will come later because it requires some general
6832         refactoring.
6833         (New.DoResolve): Better error handling for unsafe types.
6834         (EmptyExpressionStatement): New class.
6835         (ElementInitializer): An object initializer expression.
6836         (CollectionElementInitializer): A collection initializer expression.
6837         (CollectionOrObjectInitializers): A block of object or collection
6838         initializers.
6839         (NewInitialize): New expression with element/object initializers.
6840         
6841         * statement.cs: Reverted object/collection initializer hacks.
6842         
6843         * typemanager.cs (CSharpName): Filter __arglist type.
6844         
6845 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6846
6847         ** C# 3.0 Anonymous Types (update to the latest standard)
6848         
6849         * expression.cs (Binary.ResolveOperator): Threat all null based types
6850         same.
6851         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
6852         (AnonymousTypeParameter): Updated.
6853         
6854         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
6855         (AnonymousTypeClass): New anonymous type container.
6856         
6857         * class.cs (AddField): Return operation result.
6858         
6859         * generic.cs: Another empty TypeArguments overload.
6860         
6861         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
6862         are stored at top of normal hierarchy.
6863         
6864         * typemanager.cs (CSharpName): Filter anonymous types.
6865         
6866 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6867
6868         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
6869         as single Concat call. How could we miss that :-(
6870         
6871 2007-08-08  Marek Safar  <marek.safar@gmail.com>
6872
6873         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
6874         
6875 2007-08-07  Miguel de Icaza  <miguel@novell.com>
6876
6877         * expression.cs: Fix the previous commit, the creation of the
6878         arguments array list needs also to be conditional on the arguments
6879         not being null.
6880
6881         * class.cs: Add a little bit of help to help narrow down problems.
6882
6883         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
6884         not try to copy in that case. 
6885
6886         * driver.cs: When building SMCS, include a new different set of
6887         default assemblies here.   Do this here so we can control whether
6888         to include the default assemblies with /noconfig.
6889
6890 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6891
6892         A fix for bug #81979
6893         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
6894         only.
6895
6896 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6897
6898         A fix for bug #82300
6899
6900         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
6901         we are in probing scope.
6902
6903 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6904
6905         A fix for bug #82301
6906
6907         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
6908         (Statement.CloneTo): Clone and not map children blocks.
6909
6910 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6911
6912         A fix for bug #82299
6913
6914         * expression.cs (LocalVariableReference.CloneTo): Remap local info
6915         variable too.
6916         
6917         * statement.cs (Statement.CloneTo): Clone variables before statements
6918         to allow remaping of local variables.
6919
6920 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6921
6922         A fix for bug #82296
6923
6924         * anonymous.cs,
6925         * report.cs: Log crash details for future clone problems.
6926         
6927         * statement.cs (Return.Clone): Don't clone non-existent expression.
6928
6929 2007-08-03  Raja R Harinath  <harinath@gmail.com>
6930
6931         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
6932         (Class.AddBasesForPart): Move CS0537 check here from ...
6933         * cs-parser.jay (class_declaration): ... here.  Move calling of
6934         'AddBasesForPart' to ...
6935         (class_bases): ... here.
6936         (struct_declaration, interface_declaration): Update to changes.
6937
6938 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6939
6940         A fix for bug #81923
6941
6942         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
6943         conversion is allowed.
6944
6945 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6946
6947         A fix for bug #81564
6948
6949         * ecore.cs (EventExpr): Add IsBase handling.
6950
6951         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
6952         too.    
6953         
6954 2007-08-02  Raja R Harinath  <harinath@gmail.com>
6955
6956         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
6957         * cs-parser.jay: Some whitespace cleanups.
6958         (current_delegate): New.
6959         (type_name): New.
6960         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
6961         a dummy code block, and use 'type_name' instead of 'member_name'.
6962         (interface_declaration, class_declaration): Likewise.
6963         (delegate_declaration): Likewise.  Rearrange slightly and use
6964         'current_delegate'.
6965         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
6966         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
6967
6968 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6969
6970         A fix for bug #82039
6971
6972         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
6973         available.
6974
6975         * typemanager.cs (CSharpName): Split to string overload.
6976
6977 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6978
6979         * expression.cs,
6980         * report.cs: Updated warning CS0472.
6981
6982 2007-08-01  Marek Safar  <marek.safar@gmail.com>
6983
6984         A fix for bug #82181
6985         * cs-parser.jay,
6986         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
6987
6988 2007-08-01  Marek Safar  <marek.safar@gmail.com>
6989
6990         A fix for bug #82277
6991         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
6992
6993 2007-08-01  Marek Safar  <marek.safar@gmail.com>
6994
6995         ** C# 3.0 Type Inference (major bits are working)
6996         
6997         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
6998         (.ImplicitStandardConversionExists): Uses compatible.
6999         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7000         (.InferReturnType): New method.
7001         (.Compatible): Refactored.
7002         (.ResolveParameters): Uses factory to create resolved parameters.
7003         (.CompatibleMethod): Add probing mode support.
7004         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7005         clearly distinguish between 2 different operations.
7006         (LambdaMethod): Moved to lambda.cs.
7007         (AnonymousMethod): Removed unused fields and methods.
7008         (AnonymousDelegate): Simplified.
7009         
7010         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7011         
7012         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7013         
7014         * delegate.cs (Delegate): New mehods to reduce code duplication.
7015         (.GetConstructor): New method.
7016         (.GetInvokeMethod): New method.
7017         (DelegateCreation): Updated.
7018         
7019         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7020         does not exist.
7021         (OverloadResolve): Made probing little bit faster.
7022         
7023         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7024         when probing is on.
7025         
7026         * generic.cs (TypeInferenceContext): Dummy implementation.
7027         
7028         * iterators.cs: Updated after Resolve/Define rename.
7029         
7030         * lambda.cs (LambdaExpression)
7031         (.ResolveParameters): Handles both type of arguments and type inference too.
7032         
7033         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7034         (InflateTypes): Updated.
7035         
7036         * support.cs (InflateTypes): Changed signature and updated.
7037         
7038         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7039         (MemberLookup_FindMembers): More MS tricks.
7040         (GetParameterData): Ditto.
7041         (GetDelegateParameters): Uses quick path for dynamic types.
7042         
7043 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7044
7045         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7046         only.
7047
7048 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7049
7050         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7051         syntax.
7052         
7053 2007-07-26  Jb Evain  <jbevain@novell.com>
7054
7055         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7056         which takes a boolean 'report_errors', similar to the GetMethod.
7057         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7058         in .net 2.1, do not report errors here.
7059
7060         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7061         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7062         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7063         in .net 2.1.
7064
7065         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7066         of the type InternalsVisibleToAttribute before the first call
7067         to CoreLookupType which is allowed to fail (third boolean parameter
7068         to true). Because, during the resolution for a type that is not
7069         immediately found, we try to check if the type is not defined in
7070         a friend assembly, and to do so, we need the
7071         InternalVisibleToAttribute.
7072
7073 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7074
7075         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7076         feature that allows structs to be compared against null and inline
7077         the result as true or false.
7078
7079         Notice that the same code is not permitted inside a generic block
7080         of code that would do:
7081
7082         class Foo<T> where T : struct {
7083             bool Eval (T x)
7084             {
7085                  return x == null;
7086             }
7087         }
7088
7089         It is only allowed if the type of T is not bound (no where
7090         clause).   In my opinion, this CSC 2 behavior is broken but people
7091         seem to be using it (IronRuby does, a few bug reports on bugzilla
7092         have it and some people have complained about it).
7093
7094         All of the users that depend on this behavior have code that is
7095         very likely broken. 
7096         
7097         * report.cs (Warning, Error): make these take object arguments,
7098         not strings, as that allows us to take advantage of Format.
7099
7100 2007-07-20  William Holmes  <billholmes54@gmail.com>
7101
7102         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7103           Left member variable for the Count.
7104         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7105           MemberName.CountTypeArguments to avoid a NRE. 
7106
7107         This code is contributed under the MIT X11 license
7108
7109 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7110
7111         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7112
7113 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7114
7115         * doc.cs : generic method arguments are written as ``x while generic
7116           type arguments are `x. Combined with the previous change, fixed bug
7117           #79706.
7118
7119 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7120
7121         Fix #82120
7122         * expression.cs (Binary.ResolveOperator): When converting
7123         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7124
7125 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7126
7127         * doc.cs : when T: or whatever x: is specified, it does not really
7128           check the doc comment's syntax correctness. Fixed bug #82006.
7129
7130 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7131
7132         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7133         LambdaExpression better.
7134         
7135         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7136         
7137         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7138         
7139         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7140         as it can be generated.
7141         
7142         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7143         modifiers.
7144         
7145         * lambda.cs (LambdaExpression): Refactored to share same code with
7146         AnonymousMethodExpression.
7147         
7148 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7149
7150         * anonymous.cs (MakeName): Include host name for easier debugging.
7151         (LambdaMethod): New class for lambda spcecific stuff.
7152         
7153         * attribute.cs: Set EmitContext return type.
7154
7155         * class.cs: Set EmitContext return type.
7156         
7157         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7158         with null/void meaning.
7159         
7160         * iterators.cs (ContainerType): Implemented.
7161         
7162         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7163         
7164         * statement.cs (Return): Updated to lambda expressions.
7165         (Block.CloneTo): Parent can be null.
7166                 
7167 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7168
7169         A fix for bug #81917
7170         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7171         
7172         * class.cs (FixedField): Check whether field is in unsafe scope.
7173
7174         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7175         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7176
7177         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7178         FieldExpr.
7179         
7180         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7181                 
7182 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7183
7184         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7185         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7186         from Report class.
7187
7188 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7189
7190         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7191         
7192 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7193
7194         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7195         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7196         
7197         * codegen.cs(EmitContext): Add ProbingMode flag.
7198         
7199         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7200         
7201         * driver.cs: For now set both warning values.
7202         
7203         * ecore.cs (SimpleName): Name is readonly.
7204         (MethodGroup.OverloadResolve): One quick path for probing.
7205         
7206         * expression.cs (Unary): Set Oper r/o.
7207         (Binary): Set Oper r/o.
7208         (ParameterReference): Set few instance variables as r/o.
7209         (ParameterReference.DoResolveBase): Don't capture aruments when 
7210         the probing is on.
7211         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7212         (Arglist): arguments are private.
7213         (SizeOf): type is private and r/o.
7214         (MemberAccess): arguments are private.
7215
7216         * report.cs: Enhanced reporting on/off capabilities.
7217         
7218         * lambda.cs: Uses ec.IsInProbingMode.
7219         (ContextualReturn): Derives from return.
7220         
7221         * rootcontext.cs: For now set both warning values.
7222         
7223         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7224         copy if one exists.
7225         (Return.Resolve): Don't die immediately.
7226         (Block.Resolve): Speed-up probing.
7227         (Block.CloneTo): Clone only child blocks.
7228
7229 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7230
7231         * iterators.cs: reverted Miguel's latest change (r81925) as it
7232         breaks the build in System.
7233
7234 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7235
7236         * iterators.cs (Yield.CheckContext): Check for the iterator type
7237         also here as we can call into Yield even in codepaths that are not
7238         directly checked by
7239         (MethodOrOperator is the only path that was checked).
7240
7241         In addition to the standard check, use a more specific check for
7242         constructors to report a more verbose error. 
7243
7244 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7245
7246         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7247         report the warning and continue 
7248
7249         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7250         values on the stack on the call to Emit.   Use EmitStatement if
7251         possible, or using Emit + Pop if not possible.   Fixes #82064
7252
7253 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7254
7255         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7256         avoid try...finally in some cases.
7257
7258 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7259
7260         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7261         
7262         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7263         instead of method. Re-use standard error handling.
7264         (ConstructorInitializer.Emit): Simplified.
7265         
7266         * delegate.cs: Updated after Invocation.EmitCall change.
7267         
7268         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7269         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7270         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7271         method and don't permanently changing input arguments.
7272         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7273         is resolved it has one of the candidates is the best one which is later
7274         used to emit. Removed a few unused method.
7275         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7276
7277         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7278         (Binary.ResolveOperator): Ditto.
7279         (ConditionalLogicalOperator.DoResolve): Ditto.
7280         (Invocation): Uses method group.
7281         (Invocation.DoResolve): Simplified.
7282         (Invocation.EmitCall): Removed useless is_static.
7283         (Invocation.Emit): Delegate to method group.
7284         (Invocation.EmitStatement): Simplified.
7285         (New): Uses method group.
7286         (MemberAccess.DoResolve): Don't destroy original expression.
7287         
7288         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7289         
7290 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7291
7292         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7293         
7294         * anonymous.cs,
7295         * lambda.cs: Add custom error message type.
7296
7297 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7298
7299         * lambda.cs: Simplified little bit.
7300         
7301         * parameter.cs: Introduced ImplicitLambdaParameter.
7302         (Parameters.CreateFullyResolved): New factory instead of ctor.
7303         
7304         * anonymous.cs,
7305         * class.cs,
7306         * delegate.cs: Updated parameter creation.
7307         
7308 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7309
7310         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7311         arguments.
7312         
7313         * generic.cs: Synchronized with gmcs.
7314         
7315 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7316
7317         * class.cs (Indexer): Check return type as soon as possible.
7318         
7319         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7320         members too.
7321         
7322         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7323         
7324         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7325         
7326         * parameter.cs (Parameter): Use expression type when it is available.
7327         
7328         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7329         method modifier for the first parameter only.
7330
7331 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7332
7333         A fix for bug #81938
7334         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7335         
7336         * constant.cs: Tide up an exception message.
7337
7338 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7339
7340         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7341         an uninitialized variable is used.
7342         
7343         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7344
7345 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7346
7347         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7348         not found error handling.
7349
7350         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7351         simplified.
7352         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7353         (ArrayCreation.DoResolve): Simplified.
7354         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7355         its own resolve process.
7356         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7357
7358 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7359
7360         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7361         more error details.
7362         
7363 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7364
7365         * cs-tokenizer.cs: Removed var related stuff.
7366         
7367         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7368         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7369         a type and a keyword at same time.
7370         
7371         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7372         matches to "var".
7373         
7374         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7375         implicitly typed arrays, more changes will follow.
7376         
7377         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7378         
7379 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7380
7381         * ecore.cs (VarExpr): Removed Handled field.
7382         
7383         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7384         build-in assign functionality.
7385         (ForEach.Resolve): Removed all implicitly typed local variable code and
7386         simplified.
7387         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7388         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7389
7390 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7391
7392         * assign.cs: Removed implicitly typed local variable check.
7393         
7394         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7395         referencing implicitly typed local variable.
7396         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7397         variable here.
7398         
7399         * statement.cs (Fixed): Removed unsupported implicitly typed local
7400         variable code.
7401
7402 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7403
7404         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7405
7406 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7407
7408         A fix for bugs #81855 and #76274
7409         * attribute.cs (AttachTo): Always set owner for global attributes to
7410         prefined owner.
7411         
7412         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7413         usefull too.
7414         
7415         * cs-parser.jay: Assembly and module attributes must precede all other
7416         elements except using clauses and extern alias declarations.
7417
7418 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7419
7420         A fix for bug #81748
7421         * cs-tokenizer.cs,
7422         * expression.cs: More checks for non ISO-1 features.
7423
7424 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7425
7426         A fix for bug #81807
7427         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7428         present inside switch statement and it is required by nullable check.
7429
7430 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7431
7432         A fix for bug #81840
7433         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7434         when type matching fails.
7435         
7436         * namespace.cs: Tiny error message change.
7437
7438 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7439
7440         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7441         reporting. Added automatic property check.
7442         
7443         * class.cs: Updated after CheckAbstractAndExtern relocation.
7444         (AEventPropertyAccessor.GetSignatureForError): Customized.
7445         
7446 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7447
7448         * class.cs (DefineBaseTypes): Base type can be undefined.
7449         
7450         * ecore.cs (TypeLookup): Minor refactoring.
7451         (DoResolveAsTypeStep): Removed redundant check.
7452
7453         * namespace.cs (Lookup): Removed redundant check.
7454                 
7455         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7456         ResolveAsTypeTerminal step.
7457         (BootstrapCorlib_*): Simplified.
7458         (PopulateCoreType): Core types can be now external.
7459
7460 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7461
7462         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7463          verification only.
7464          (InferTypeArguments): Infers anonymous expression type arguments.
7465          (Compatible): Split to Compatible and InferTypeArguments. 
7466         
7467         * lambda.cs: Updated.
7468
7469 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7470
7471         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7472
7473 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7474
7475         Fix #80477, cs0135-2.cs, cs0135-3.cs
7476         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7477         names to the "known" variables list.
7478         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7479         parameter names are also "known".
7480         (Block.CheckError136): Remove.
7481         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7482         null.
7483
7484 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7485
7486         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7487
7488 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7489
7490         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7491         internal error not an user error.
7492          
7493         * expression.cs (IsApplicable): Refactored to make debugging easier.
7494
7495         * support.cs: More tricks for non-mono runtimes.
7496         
7497         * typemanager.cs (CoreLookupType): Made public.
7498         (InitSystemCore): All linq specific stuff moved to linq.cs
7499
7500 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7501
7502         * typemanager.cs (CSharpSignature): One more missing build-in types
7503         replacement.
7504         More tricks for non-mono runtime.
7505
7506 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7507
7508         * statement.cs (Block.CheckError136_InParents): Remove.
7509         (Block.AddVariable): Use GetParameterInfo instead.
7510         (ToplevelBlock.ProcessArguments): Likewise.
7511
7512 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7513
7514         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7515         information too.
7516         (ToplevelBlock.GetParameterInfo): Split out of ...
7517         (ToplevelBlock.GetParameterRefernce): ... this.
7518         (ToplevelBlock.ParameterMap): Remove.
7519         * expression.cs (ParameterReference): Update to use
7520         ToplevelParameterInfo.
7521
7522         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7523         regression.
7524
7525         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7526         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7527
7528         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7529         (ToplevelBlock.ProcessParameters) ... here.
7530         (ToplevelBlock..ctor): Invoke it.
7531
7532         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7533         new parameters.
7534
7535         * statement.cs (IKnownVariable): New interface.
7536         (LocalInfo): Implement it.
7537         (ToplevelParameterInfo): New class.
7538         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7539         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7540         GetKnownVariableInfo.
7541
7542 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7543
7544         Partly speed up CS0136 error checks.
7545         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7546         'recurse' parameter.
7547         (Block.DoCheckError136): Only check errors in parameters.  Move
7548         local variable checks ...
7549         (Block.AddVariable): ... here, and ...
7550         (ToplevelBlock.ResolveMeta): ... here.
7551
7552 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7553
7554         * statement.cs (Block.IsChildOf): Remove.
7555
7556         * statement.cs (Statement.Clone): Move special case code ...
7557         (Block.CloneTo): ... here.
7558
7559 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7560
7561         * statement.cs (ToplevelBlock.container): Remove field.  It's
7562         redundant with 'Parent'.
7563         (ToplevelBlock.ContainerBlock): Remove accessor.
7564         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7565         child with parent here, ...
7566         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7567         current_block.
7568         (start_anonymous): Don't save current_block.
7569         (top_current_block): Remove.
7570
7571         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7572         (Block.Resolve): Update to changes.
7573         (Block..ctor): Move setting of "correct" 'Toplevel'
7574         and 'Explicit' fields to ...
7575         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7576
7577 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7578
7579         Kill Block.Implicit
7580         * statement.cs (Block.Implicit): Remove.
7581         (Block): Update to changes.
7582         * flowanalysis.cs: Likewise.
7583
7584         Mildly speed up CheckInvariantMeaningInBlock
7585         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7586         Recursively call AddKnownVariable to all enclosing blocks.
7587         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7588         Remove recursive calls.
7589         (Block): Update to changes.
7590
7591         New ExplicitBlock invariants
7592         * statement.cs (Block.Explicit): New field.  It points to the
7593         immediately enclosing non-implicit block.
7594         (Block..ctor): Maintain the invariant.
7595         * cs-parser.jay: Take advantage of invariant.
7596
7597         Introduce ExplicitBlock
7598         * statement.cs (ExplicitBlock): New.
7599         (ToplevelBlock): Derive from it.
7600         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
7601         sense of flag.
7602         (Block.Implicit): Update to changes.
7603         * cs-parser.jay: Update to changes.
7604
7605         Remove unused field
7606         * codegen.cs (EmitContext.IsLastStatement): Remove.
7607         * statement.cs (Block.DoEmit): Update to changes.
7608
7609 2007-05-25  Raja R Harinath  <rharinath@novell.com>
7610
7611         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
7612         modifying current_block directly.
7613
7614 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
7615         
7616         * class.cs: Implemented automatic properties (C# 3.0)
7617           Thanks to Marek for the help.
7618
7619 2007-05-23  Raja R Harinath  <rharinath@novell.com>
7620
7621         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
7622         variable as assigned, note also that all its components are
7623         assigned too.
7624         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
7625
7626 2007-05-19  Marek Safar  <marek.safar@gmail.com>
7627
7628         * anonymous.cs, class.cs: Emit Compiler generated attribute when
7629         member is marked as compiler generated.
7630         
7631         * decl.cs (MemberCore): Refactored ModFlags into property.
7632
7633         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
7634         (Check): Check only accessibility modifiers.
7635
7636 2007-05-18  Raja R Harinath  <rharinath@novell.com>
7637
7638         Track all assignable slots in one bit array
7639         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
7640         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
7641         logic from VariableMap constructor here.  Use the same 'offset'
7642         variable that's later used for computing offsets of local
7643         variables.
7644         * flowanalysis.cs (UsageVector.parameters): Remove.
7645         (UsageVector): Update to changes.
7646         (VariableMap): Remove.
7647
7648         Avoid creating ParameterMap in every block
7649         * statement.cs (Block.ParameterMap): Move ...
7650         (ToplevelBlock.ParameterMap): ... here.
7651         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
7652         only once.
7653         * flowanalysis.cs (FlowBranching.param_map): Remove.
7654         (FlowBranching.UsageVector): Update to changes.
7655         (FlowBranchingToplevel.CheckOutParameters): Likewise.
7656
7657         * statement.cs (Block.CloneTo): Clone Toplevel field too.
7658
7659         * expression.cs (ParameterReference): Distinguish between block
7660         where parameter was referenced and declared.
7661
7662 2007-05-18  Marek Safar  <marek.safar@gmail.com>
7663
7664         * flowanalysis.cs, statement.cs: Put back improved error handling.
7665
7666 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
7667         
7668         * assign.cs:
7669         * expression.cs:
7670           Imporved object and collection initialization (C# 3.0).
7671
7672 2007-05-15  Marek Safar  <marek.safar@gmail.com>
7673
7674         A fix for bug #81380
7675         * expression.cs (Is.DoResolve): Only value types have constant `is'
7676         behaviour.
7677
7678 2007-05-15  Raja R Harinath  <rharinath@novell.com>
7679
7680         * statement.cs (ToplevelBlock.child): Remove.
7681
7682 2007-05-15  Raja R Harinath  <harinath@gmail.com>
7683
7684         Rationalize ResolveMeta: refactoring
7685         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
7686         out constant handling code into ...
7687         (Block.DoResolveConstants): ... this.
7688
7689         Rationalize ResolveMeta: kill local_map
7690         * statement.cs (Block.local_map, Block.LocalMap): Remove.
7691         (Block.AssignableSlots): New.
7692         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
7693         for locals -- move code from VariableMap here.  Avoid unnecessary
7694         allocations.
7695         * flowanalysis.cs (FlowBranching.local_map): Remove.
7696         (FlowBranching..ctor): Use Block.AssignableSlots.
7697         (VariableMap): Remove unused constructors.
7698
7699 2007-05-11  Raja R Harinath  <rharinath@novell.com>
7700
7701         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
7702
7703 2007-05-11  Marek Safar  <marek.safar@gmail.com>
7704
7705         * typemanager.cs (IsFriendAssembly): Should not be called for building
7706         assembly.
7707
7708 2007-05-09  Marek Safar  <marek.safar@gmail.com>
7709
7710         * literal.cs (NullConstant): Print null in all cases.
7711         
7712         * expression.cs (Binary.ResolveOperator): Implemented delegate
7713          comparison based on C# 2.0 changes.
7714
7715 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
7716
7717         This code is contributed under the MIT X11 license
7718         
7719         The following enables support for several C# 3.0 language features:
7720         
7721         * cs-tokenizer.cs: Added support for the "var" keyword.
7722         
7723         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
7724           Added VarExpr class to facilitate type inferencing.
7725         
7726         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
7727           to support anonymous types.
7728         
7729         * assign.cs: Added support for type inferencing and initialization.
7730         
7731         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
7732         
7733         * expression.cs: Added implicit array support to ArrayCreation.
7734           Added 5 types and 1 interface:
7735           
7736           IInitializable                Implementing classes can inject initializing
7737                                         statements after object instantiation.
7738           
7739           Initializer                   Stores data for object initialization.
7740           
7741           AnonymousType                 An expression for anonymous types.
7742           
7743           AnonymousTypeParameter        Stores data about an anonymous type's field.
7744           
7745           NewInitialize                 An expression for object initialization.
7746           
7747           CollectionInitialize          An expression for collection initialization.
7748         
7749         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
7750           statements.
7751
7752 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7753
7754         A fix for bug #81500
7755         * cs-tokenizer.cs: Add special handling for coalescing operator.
7756
7757 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7758
7759         A fix for bug #81529
7760         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
7761         its value from base class until it is redefined.
7762
7763 2007-05-02  Raja R Harinath  <rharinath@novell.com>
7764
7765         Fix regression in cs0631-3.cs
7766         * cs-parser.jay (operator_declarator): Add opt_attributes to error
7767         fallback.  Make error fallback catch more cases.
7768
7769 2007-05-01  Miguel de Icaza  <miguel@novell.com>
7770
7771         * cs-parser.jay: Allow parameters in operator declarations to have
7772         attributes. 
7773
7774 2007-04-27  Miguel de Icaza  <miguel@novell.com>
7775
7776         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
7777         exists. 
7778
7779         * lambda.cs (ContextualReturn.Resolve): An expression is valid
7780         inside the ContextualReturn, it does not have to be an
7781         ExpressionStatement. 
7782
7783 2007-04-24  Miguel de Icaza  <miguel@novell.com>
7784
7785         * lambda.cs (ContextualReturn.Resolve): if the return type is not
7786         set, set it.
7787
7788 2007-04-23  Miguel de Icaza  <miguel@novell.com>
7789
7790         * anonymous.cs (AnonymousContainer): split the virtual Resolve
7791         method in two methods: ResolveNoDefine and Resolve.
7792
7793         ResolveNoDefine will stop just after ResolveTopBlock has been
7794         called.   
7795
7796         Resolve will then continue by creating a method and issuing the
7797         call to method.Define ().
7798
7799         (AnonymousMethod): Split and implement the new Resolve and
7800         ResolveNoDefine as well.
7801
7802         * lambda.cs (LambdaExpression): Split the anonymous method
7803         resolution code into a separate routine (CoreCompatibilityTest)
7804         from DoCompatibleTest.
7805
7806         (LambdaExpression.TryBuild): New method, this method tries to
7807         build the LambdaExpression with the given set of types to be used
7808         as the types for the various parameters of the lambda expression. 
7809
7810         If the compilation succeed with the given types, the infered type
7811         of the Anonymous method is returned, otherwise null is returned.
7812
7813 2007-04-23  Marek Safar  <marek.safar@gmail.com>
7814
7815         A fix for bug #81414
7816         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
7817
7818 2007-04-22  Miguel de Icaza  <miguel@novell.com>
7819
7820         * cs-tokenizer.cs: Change various identifiers here from the
7821         camelCasing to the recommended Linux-like style for instance
7822         variables from the Coding Guidelines. 
7823
7824 2007-04-19  Martin Baulig  <martin@ximian.com>
7825
7826         * convert.cs
7827         (Convert.ImplicitReferenceConversionCore): Allow conversions from
7828         System.Enum to System.ValueType.
7829
7830 2007-04-13  Martin Baulig  <martin@ximian.com>
7831
7832         Rewrote implicit reference conversions.  We need to distinguish
7833         between implicit reference conversions (13.1.4) and implicit
7834         boxing conversions (13.1.5).
7835
7836         According to the spec, there's an an implicit conversion
7837         "From a one-dimensional array-type S[] to IList<T> and base
7838         interfaces of this interface, provided there is an implicit
7839         reference conversion from S to T."  Note that this does not
7840         include boxing conversions.
7841
7842         * convert.cs
7843         (Convert.ImplicitTypeParameterBoxingConversion): New method.
7844         (Convert.ImplicitReferenceConversion): Split into
7845         ImplicitReferenceConversionCore() and
7846         ImplicitBoxingConversionExist().
7847         (Convert.ImplicitReferenceConversionExists): Use the new
7848         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
7849
7850 2007-04-12  Martin Baulig  <martin@ximian.com>
7851
7852         * convert.cs (Convert.ImplicitReferenceConversion): Move the
7853         `TypeManager.null_type' checks up to the top of the method.
7854
7855 2007-04-11  Marek Safar  <marek.safar@gmail.com>
7856
7857         A fix for bug #81350
7858         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
7859         extension methods.
7860
7861 2007-04-11  Martin Baulig  <martin@ximian.com>
7862
7863         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
7864         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
7865         to make this work for generic classes; fixes #79561.
7866
7867 2007-04-11  Martin Baulig  <martin@ximian.com>
7868
7869         * expression.cs (As): Add support for nullable types; fixes #79371.
7870
7871 2007-04-11  Martin Baulig  <martin@ximian.com>
7872
7873         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
7874         `type.FullName' is null; fixes #80243.
7875
7876 2007-04-11  Martin Baulig  <martin@ximian.com>
7877
7878         * expression.cs (Invocation.IsApplicable): Don't modify the method
7879         if type inference succeeded, but the method was not applicable.
7880         Fixes #81250.
7881
7882 2007-04-10  Marek Safar  <marek.safar@gmail.com>
7883
7884         A fix for bug #81324
7885         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
7886         internal and external namespaces containers.
7887
7888 2007-04-10  Martin Baulig  <martin@ximian.com>
7889
7890         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
7891         TypeManager.DropGenericMethodArguments() so we also call
7892         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
7893
7894 2007-04-10  Martin Baulig  <martin@ximian.com>
7895
7896         * iterators.cs (Iterator.CreateIterator): Don't crash if
7897         `method.ReturnType' is null.  This happens if something went wrong
7898         while resolving that typ (we already reported an error in this case).
7899
7900 2007-04-10  Martin Baulig  <martin@ximian.com>
7901
7902         * expression.cs (New.DoResolve): Don't call CheckComImport() on
7903         generic interfaces; report the CS0144 directly.
7904
7905 2007-04-10  Martin Baulig  <martin@ximian.com>
7906
7907         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
7908         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
7909
7910 2007-04-10  Martin Baulig  <martin@ximian.com>
7911
7912         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
7913
7914 2007-04-09  Raja R Harinath  <rharinath@novell.com>
7915
7916         A better fix
7917         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
7918         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
7919
7920         Fix #81338
7921         * statement.cs (For.Resolve): If resolution fails, use
7922         KillFlowBranching.
7923
7924 2007-04-08  Marek Safar  <marek.safar@gmail.com>
7925
7926         * anonymous.cs (MakeName): Make faster and zero-based.
7927         (VerifyExplicitParameterCompatibility): Back to mode where generic
7928         parameter is ignored.
7929         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
7930
7931         * class.cs (EmitType): Method can emit another new method.
7932
7933         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
7934
7935         * driver.cs: Updated.
7936
7937         * lambda.cs: Reuse predefined empty parameters.
7938
7939         * parameter.cs: Updated
7940
7941         * support.cs: Implemented InflateTypes.
7942
7943         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
7944         (InitSystemCore): Introduced to isolate 3.0 dependencies.
7945
7946 2007-04-03  Martin Baulig  <martin@ximian.com>
7947
7948         Fix #80632.
7949
7950         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
7951         version of TypeManager.IsOverride() which also works with generic
7952         types.  
7953
7954 2007-04-03  Martin Baulig  <martin@ximian.com>
7955
7956         Fix #81044.
7957
7958         * convert.cs
7959         (Convert.ExplicitReferenceConversion): We need to cast when
7960         converting from IList<T> to S[].
7961
7962 2007-04-01  Marek Safar  <marek.safar@gmail.com>
7963
7964         * decl.cs (FindExtensionMethods): Consider all candidates with same name
7965         at this level.
7966         
7967         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
7968
7969 2007-03-31  Marek Safar  <marek.safar@gmail.com>
7970
7971         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
7972         argument and return type inferring.
7973
7974         * codegen.cs (InferReturnType): Flag whether return can be inferred.
7975         (ReturnType): Turned to property.
7976
7977         * statement.cs (Return): Implemented return type inferring.
7978
7979         * support.cs (ReflectionParameters): Use local types if possible.
7980
7981 2007-03-30  Raja R Harinath  <rharinath@novell.com>
7982
7983         * flowanalysis.cs (FlowBranching.Reachability): Remove.
7984         (FlowBranching.UsageVector): Update to changes.
7985
7986         Prepare to kill 'Reachability'
7987         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
7988         argument of constructor.
7989
7990 2007-03-29  Raja R Harinath  <rharinath@novell.com>
7991
7992         Prepare to kill 'Reachability'
7993         * flowanalysis.cs (UsageVector.is_unreachable): New.
7994         (UsageVector): Update to maintain 'is_unreachable' in parallel to
7995         'reachability', and verify they're consistent.
7996
7997         Fix #81121
7998         * expression.cs (New.EmitStatement): Handle type parameters here too.
7999
8000 2007-03-29  Martin Baulig  <martin@ximian.com>
8001
8002         Fix #79148.
8003
8004         * anonymous.cs
8005         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8006         CompilerGeneratedClass.
8007         (ScopeInfo.EmitScopeInstance): Make this protected.
8008         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8009         `ec.CurrentAnonymousMethod.Scope == Scope'.
8010
8011         * statement.cs (Block.ScopeInfo): Make this a property.
8012
8013 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8014
8015         Prepare to kill 'Reachability'
8016         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8017         (FlowBranching.UsageVector.Reachability): Remove property.
8018         (FlowBranching.UsageVector.IsUnreachable): New property.
8019         (FlowBranching.UsageVector.ResetBarrier): New.
8020         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8021         * codegen.cs, statement.cs: Update to changes.
8022
8023 2007-03-27  Martin Baulig  <martin@ximian.com>
8024
8025         Fix #81209.
8026
8027         * decl.cs
8028         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8029         generic types.
8030
8031 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8032
8033         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8034         instead of TriState.  Remove all mention of TriState.
8035
8036         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8037         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8038         and maintain invariants.
8039
8040 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8041
8042         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8043
8044 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8045
8046         * expression.cs: Stop using obsolete 2.0 opcodes.
8047
8048 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8049
8050         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8051         one of the latests Martin's fixes.
8052
8053 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8054
8055         * expression.cs: On BigEndian systems, swap the bytes, temporary
8056         solution until we get a new bitconverter class.
8057
8058 2007-03-23  Martin Baulig  <martin@ximian.com>
8059
8060         Fix #81158.
8061
8062         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8063         "Method" and "Method`1".  Normally, a cache lookup is done on the
8064         "Method" form (ie. without the generic arity), but this one makes
8065         lookups on the full form work as well.
8066
8067 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8068
8069         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8070         unused properties.
8071
8072 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8073         * class.cs: 
8074         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8075         ordered_member_list, to TypeBuilder to store members to be defined
8076         in the order they were parsed in.
8077         - ordered_explicit_member_list contains all properties indexers
8078           and methods that are defined as explicit implementation of an
8079           interface or base class.
8080         - ordered_member_list contains all properties indexers and methods
8081           that are not defined as explicit implementation of an interface
8082           or base class.
8083
8084         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8085         functionality in these removed classes has been replaced with 
8086         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8087         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8088
8089         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8090         to CheckForDuplications inside GetMethod and SetMethod Define Method
8091         to handle method property and indexer name conflicts.
8092
8093         Fixes #79434
8094
8095         All code is contributed under the MIT/X11 license.
8096
8097 2007-03-20  Martin Baulig  <martin@ximian.com>
8098
8099         * class.cs (TypeContainer.Interfaces): Removed; they're now
8100         included in `TypeContainer.Types'.
8101
8102 2007-03-20  Martin Baulig  <martin@ximian.com>
8103
8104         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8105
8106         * class.cs (TypeContainer.CreateType): New public method.  This is
8107         now called before DefineType() to create the TypeBuilders.
8108         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8109         has already been created by CreateType().
8110         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8111         don't resolve our base classes here; this has been moved into
8112         DefineBaseTypes().  We're now called from CreateType().
8113         (TypeContainer.DefineBaseTypes): New private method; resolve our
8114         base classes here.  We're now called from DefineType().
8115
8116         * rootcontext.cs
8117         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8118         our types first to create all the TypeBuilders.  After that, call
8119         TypeContainer.DefineType() on all the types which'll resolve their
8120         base classes and setup the resolve order.
8121
8122 2007-03-20  Martin Baulig  <martin@ximian.com>
8123
8124         * class.cs (TypeContainer.Enums): Removed; they're now included in
8125         `TypeContainer.Types'.  
8126
8127 2007-03-20  Martin Baulig  <martin@ximian.com>
8128
8129         * class.cs
8130         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8131         (TypeContainer.DoResolveMembers): Call DefineType() on our
8132         `compiler_generated' classes; moved here from DefineNestedTypes().
8133
8134         * rootcontext.cs
8135         (RootContext.ResolveTree): Call ResolveMembers() on all
8136         TypeContainer's in the `type_container_resolve_order'.
8137
8138 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8139
8140         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8141
8142 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8143
8144         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8145         implementation flags.
8146
8147 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8148
8149         * class.cs: More optimizations for type parameters.
8150
8151 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8152
8153         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8154
8155         * ecore.cs, parameter.cs: More common code for both corlibs.
8156
8157         * typemanager.cs (IsGenericMethod): Simplified.
8158
8159 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8160
8161         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8162         'returns'.
8163         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8164
8165         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8166         unconditionally.  Simplify explanation.
8167         (Try.Resolve, Using.Resolve): Likewise.
8168
8169 2007-03-15  Martin Baulig  <martin@ximian.com>
8170
8171         Fix #80731.
8172
8173         * decl.cs (DeclSpace): If we're a partial class, use our
8174         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8175
8176 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8177
8178         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8179         'throws'.
8180         (FlowBranching.UsageVector): Update to changes.
8181         (FlowBranching.MergeSiblings): Likewise.
8182         * statement.cs: Likewise.
8183
8184 2007-03-15  Martin Baulig  <martin@ximian.com>
8185
8186         Fix #79302.
8187
8188         * decl.cs
8189         (MemberCache): Added a special .ctor for type parameters.
8190
8191         * typemanager.cs
8192         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8193         `MemberCache'.  
8194
8195 2007-03-09  Martin Baulig  <martin@ximian.com>
8196
8197         * enum.cs (Enum): Make this a TypeContainer.
8198         (EnumMember): Derive from `Const'.
8199
8200         * const.cs
8201         (Const.DoResolveValue): New protected virtual method; move most of
8202         the functionality of ResolveValue() here so we can override it in
8203         `EnumMember'.
8204         (Const.CreateConstantReference): Make this virtual.
8205
8206         * class.cs (Kind): Add `Kind.Enum'.
8207         (TypeContainer.Emit): Don't emit the enums here; they're already
8208         in the `RootContext.typecontainer_resolve_order'.
8209
8210         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8211         here; they're already in the `typecontainer_resolve_order'.
8212
8213         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8214         TypeManager.DropGenericTypeArguments().
8215
8216         * typemanager.cs
8217         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8218         (TypeManager.IsEnumType): Likewise.
8219         (TypeManager.EnumToUnderlying): Likewise.
8220         (TypeManager.IsEqual): Add support for enums.
8221
8222 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8223
8224         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8225         DefaultParameterValueAttribute to be undefined, say if System.dll
8226         is not referenced.
8227
8228 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8229
8230         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8231         any mscorlib.
8232
8233 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8234
8235         * class.cs, parameter.cs: Unified parameters verification.
8236
8237 2007-03-08  Martin Baulig  <martin@ximian.com>
8238
8239         * cs-parser.jay (constructor_header): Pass the location to the
8240         newly created TopLevelBlock.
8241
8242 2007-03-07  Martin Baulig  <martin@ximian.com>
8243
8244         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8245
8246 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8247
8248         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8249         with the changes from David, fixes the build.
8250
8251 2007-03-05  David Mitchell  <dmitchell@logos.com>
8252
8253         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8254         and its base interfaces to a one-dimensional array type S[],
8255         provided there is an implicit or explicit reference conversion
8256         from S to T.
8257
8258 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8259
8260         * cs-tokenizer.cs: Implemented basic linq grammar.
8261
8262         * driver.cs: Set linq lang version on demand.
8263
8264 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8265
8266         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8267
8268 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8269
8270         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8271         (Fixes #80455)
8272
8273         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8274         here.
8275         Check property and event extern attributes.
8276
8277         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8278         charset.
8279
8280 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8281
8282         A fix for bug #80407
8283         * ecore.cs: Don't report ambiguity error when methods have same parent.
8284
8285 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8286
8287         A fix for bug #80878
8288         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8289
8290 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8291
8292         * attribute.cs: Enable ExtensionAttribute presence test.
8293
8294 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8295
8296         * class.cs: Warn about missing GetHashCode only when Equals is override.
8297
8298         * decl.cs: Check accessibility of type arguments.
8299
8300         * typemanager.cs: Correctly report nullable array.
8301
8302 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8303
8304         * class.cs, report.cs: Capture more details when things go wrong.
8305
8306 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8307
8308         A fix for bug #80650
8309         * cs-parser.jay: Anonymous container starts at constructor declaration
8310         and not at block beginning because it has to be usable in constructor
8311         initializer.
8312
8313         * statement.cs: Use context location and not block one for error reporting.
8314
8315 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8316
8317         A fix for bug #78712
8318         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8319         too.
8320
8321 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8322
8323         A fix for bug #80493 by Atsushi Enomoto
8324         * cs-parser.jay: Ignore invalid attribute target.
8325
8326 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8327  
8328         * cs-tokenizer.cs: Ignore '\0' as white space character.
8329
8330 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8331
8332         * cs-parser.jay: Add support for lambda expressions to the mcs
8333         compiler as well.
8334
8335         * lambda.cs: Only clone when we are probing, not on the final call
8336         (Compatible is the final call). 
8337
8338         * statement.cs (CloneContext): Introduce class to provide block
8339         remapping during clone.
8340
8341         All statements Clone themselves now.
8342
8343         (Clone): special handling for blocks, when we clone a block, we
8344         register the block inside this routine, as children of the block
8345         might trigger a lookup. 
8346         
8347         * expression.cs: Add support for CloneContext in all expressions. 
8348         
8349 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8350  
8351         A fix for bug #80493
8352         * statement.cs: Report ambiguous warning when interfaces are not related.
8353
8354 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8355
8356         C# 3.0 extension methods.
8357
8358         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8359         cannot be used directly.
8360
8361         * class.cs (Class.Emit): Emit extension attribute if any class method
8362         is extension method.
8363         (Method.Define): Add basic extension method validation conditions.
8364         (Method.Emit): Emit extension attribute for method.
8365
8366         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8367         extension method exists. Currently we follow same approach as Microsoft
8368         does, emit even if a method or a class are private but this can change
8369         later.
8370
8371         * cs-parser.jay: Add handling of `this' keyword in method parameters
8372         context.
8373
8374         * decl.cs (DeclSpace.IsStaticClass): New property.
8375         (MemberCache.FindExtensionMethods): Looks for extension methods with
8376         defined name and extension type.
8377
8378         * doc.cs: Updated after OverloadResolve changes.
8379
8380         * driver.cs: Add new soft reference to System.Core.dll.
8381
8382         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8383         (ExtensionMethodGroupExpr): Represents group of extension methods.
8384
8385         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8386         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8387         to MethodGroupExpr and made non-static for easier customization.
8388         (Invocation.DoResolve): Add extension method lookup when no standard
8389         method was found.
8390         (MemberAccess.DoResolve): Try extension methods if no member exists.
8391
8392         * modifiers.cs: Add METHOD_EXTENSION modifier.
8393
8394         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8395         as well as candidate extension type.
8396         (ComputeNamespaces): When assembly constains extension methods registers
8397         them.
8398         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8399         extension method lookup.
8400         (Namespace.LookupExtensionMethod): Looks for extension method in this
8401         namespace.
8402         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8403         find a method which matches name and extensionType.
8404
8405         * parameter.cs (Parameter): Add This modifer.
8406         (HasExtensionMethodModifier): New property.
8407         (Resolve): Add extension parameter check.
8408         (ModFlags): turned to property to exclude this modifier as it is not real
8409         parameter modifier.
8410         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8411
8412         * support.cs (ParameterData): Add ExtensionMethodType.
8413         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8414
8415         * typemanager.cs: Add type and ctor extension attribute type.
8416
8417 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8418
8419         * report.cs (DisableErrors, EnableErrors): used to prevent error
8420         output when we are "trying" to compile various methods with
8421         different types. 
8422
8423         * ecore.cs (Expression): Add Clone method that calls the virtual
8424         CloneTo method.  The current CloneTo method in Expression throws
8425         an exception so we can track down all the places where this must
8426         be implemented (not using abstract, because that would be a lot of
8427         up-front-work before we can start testing the implementation
8428         idea). 
8429
8430         Important: we only need Clone capabilities for expressions created
8431         by the parser, as the expressions we will be cloning are
8432         expressions in the pre-resolved state.   This vastly simplifies
8433         the work required. 
8434         
8435         (SimpleName): Add CloneTo that does nothing.
8436         (EmptyCast): Add CloneTo.
8437         
8438         * expression.cs (Binary): Implement CloneTo.
8439         (Invocation.IsApplicable): Store the current ec in
8440         EmitContext.TempEc and restore it on return.  This is used so we
8441         do not have to sprinkle hundres of methods with an extra
8442         EmitContext, we know that the only user is the lambda expression
8443         ImplicitConversionExists code. 
8444         
8445         (Argument): Add Cloning capabilities.
8446         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8447         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8448         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8449         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8450         IndexerAccess): Add Clone capability.
8451
8452         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8453
8454         (Argument): Add cloning capability.
8455
8456         * assign.cs (Assign): Implement CloneTo.
8457
8458         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8459         
8460         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8461         version by calling Convert with the EmitContext (that we are
8462         currently storing in ec, this is not great, but will do for now,
8463         to avoid passing EmitContext parameters to hundreds of functions
8464         that do not need them now).
8465
8466         (SetExpression): Remove, it is not needed.
8467         
8468         (ContextualReturn): Implement CloneTo.
8469
8470         * statement.cs (Statement): Implement cloning infrastructure,
8471         similar to expressions.
8472
8473         (Block): Partial implementation of Clone for statements.
8474
8475         (Return): Implement clone.
8476         
8477         * constant.cs (Constant.CloneTo): New method, does nothing.
8478
8479         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8480         solution, until we decide how to exactly do this.  
8481         
8482 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8483  
8484         A fix for bug #80493
8485         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8486         a property is override we need to use second accessor.
8487
8488 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8489  
8490         A fix for bug #80418
8491         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8492         methods.
8493
8494 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8495
8496         Another fix for bug #80749
8497         * pending.cs: Abstract class has priority over interfaces.
8498
8499 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8500
8501         Another fix for bug #80749
8502         * pending.cs: Abstract class has priority over interfaces.
8503
8504 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8505
8506         Another fix for bug #80749
8507         * pending.cs: Abstract class has priority over interfaces.
8508
8509 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8510
8511         Another fix for bug #80749
8512         * pending.cs: Abstract class has priority over interfaces.
8513
8514 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8515
8516         * class.cs Better error message.
8517
8518         * driver.cs: Add shorter versions of -optimize option.
8519
8520 2007-02-13  Martin Baulig  <martin@ximian.com>
8521
8522         * class.cs (Constructor.Emit): Check the return value of
8523         ec.ResolveTopBlock() and return on error.
8524
8525 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8526
8527         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8528         message to fix error message regression.
8529
8530 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8531
8532         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8533
8534 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8535
8536         A fix for bug #80749
8537         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8538         its parent container.
8539
8540         * class.cs (DefineFieldInitializers): Each initializer can has different
8541         resolve context.
8542
8543         * const.cs: Updated.
8544
8545 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8546
8547         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8548         now all the heavy lifting to check that embedded statements or
8549         expressions have the right form is done in the ContextualReturn.
8550
8551         (ContextualReturn): New class.  
8552
8553         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8554         method that can be invoked to report 201, so we do not replicate
8555         this everywhere.
8556
8557         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8558         
8559         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8560         treating tabs as spaces. 
8561
8562 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8563
8564         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8565         * assign.cs: Use full implicit conversion for right side check.
8566
8567 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8568
8569         * statement.cs (Switch): Switch over boolean type is not standardized.
8570
8571 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8572
8573         A fix for bug #80755
8574         * decl.cs (FindBaseEvent): Don't use method cache for events.
8575
8576 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8577
8578         * cs-parser.jay: Better syntax error handling.
8579
8580         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8581         instead of underlying type value.
8582
8583 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8584
8585         * driver.cs: Check define identifier before is registered.
8586
8587         * namespace.cs: Use existing error message.
8588
8589         * report.cs: New warning.
8590
8591 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8592
8593         A fix for bug #80742
8594         * expression.cs: Delegate Invoke method can be called directly.
8595
8596 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8597
8598         A fix for bug #80676
8599         * class.cs (IsEntryPoint): The Main method can have params modifier.
8600
8601 2007-02-04  Miguel de Icaza  <miguel@novell.com>
8602
8603         * parameter.cs (Parameter, Parameters): Add Clone method.
8604
8605         * anonymous.cs (Compatible): Turn method into virtual method, so
8606         LambdaExpression can implement a different behavior.
8607
8608         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
8609         out the basic checking here, so it can be used by
8610         LambdaExpressions.
8611         
8612         * lambda.cs: Introduce "Compatible" function that will do the
8613         heavy lifting.
8614
8615 2007-02-02  Marek Safar  <marek.safar@gmail.com>
8616
8617         * attribute.cs: Unified one error message.
8618
8619         * class.cs (Class): Use type attributes and not properties to test static
8620         class.
8621         (IsEntryPoint): Don's pass local variable.
8622
8623         * convert.cs: Removed duplicate check.
8624
8625         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
8626
8627         * driver.cs: Don't crash when soft reference does not exist.
8628
8629         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
8630         (UsingEntry): Removed redundant allocation.
8631
8632         * parameter.cs: Add fast path for type parameters.
8633
8634         * support.cs: Don't allocate attribute when it's not used.
8635
8636 2007-01-30  Miguel de Icaza  <miguel@novell.com>
8637
8638         * anonymous.cs
8639         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
8640         this into a virtual method, so we can override it in LambdaExpression.
8641
8642         * driver.cs: Improve diagnostics in case of failure. 
8643
8644         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
8645         write a function that is slightly more complex and that parses:
8646
8647         type identifier [, type identifier]* )
8648
8649         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
8650         this expression:
8651
8652                 (canEmpty ? i >= 0 : i > 0)
8653
8654 2007-01-30  Raja R Harinath  <rharinath@novell.com>
8655
8656         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
8657         exception on possibly valid code.
8658
8659 2007-01-29  Raja R Harinath  <rharinath@novell.com>
8660
8661         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
8662         Push/PopPosition.
8663         (parse_opt_type_arguments): Remove.  It's almost the same as
8664         parse_less_than.
8665         (parse_namespace_or_typename): Use parse_less_than.
8666
8667 2007-01-28  Miguel de Icaza  <miguel@novell.com>
8668
8669         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
8670         this bug took a few hours to find, because the state saved and
8671         restored by PushPosition and PopPosition was ignoring the state of
8672         parse_generic_less_than.
8673
8674         I can also now remove the handling of OP_LT and OP_GT, this solves
8675         the big mistery.
8676         
8677         * cs-tokenizer.cs: store the location for the ARROW token, we use
8678         that in the parser.
8679
8680         (PushPosition, PopPosition): save/restore also `current_token',
8681         restore `parse_generic_less_than' (was missing).
8682
8683         (parse_opt_type_arguments): use parse_type, not
8684         parse_namespace_or_typename to parse types.
8685
8686         * lambda.cs: Empty new file, will eventually have the lambda
8687         expression implementation.
8688
8689         * lambda.test: used to test the internal tokenizer. 
8690
8691         * report.cs (FeatureIsNotISO1): Rename from
8692         FeatureIsNotStandardized, because it was about the language level
8693         (1 vs 2) it was not about standarization.
8694
8695         (FeatureRequiresLINQ): New.
8696
8697         * support.cs (SeekableStreamReader): Only require that the reader
8698         is a TextReader, not a StreamReader, so we can plug StringReader. 
8699
8700         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
8701         given position in the input stream the following tokens can be
8702         parsed as a type followed by an identifier.
8703
8704         (is_punct): after a '(' if parse_type_and_parameter returns true,
8705         then return a special token OPEN_PARENS_LAMBDA which is used to
8706         avoid reduce/reduce errors in the grammar for the
8707         lambda_expression rules.
8708
8709         (parse_type): implement a type parser inside the
8710         tokenizer, the parser only returns true or false depending on
8711         whether the input at a given position can be parsed as a type.
8712
8713         (peek_token): new method used during type parsing.
8714
8715 2007-01-28  Raja R Harinath  <rharinath@novell.com>
8716
8717         Fix #80531
8718         * anonymous.cs (ScopeInfo.InflateParameters): New.
8719         (AnonymousContainer.Resolve): Use it to redirect types of
8720         delegate parameters.
8721
8722 2007-01-27  Raja R Harinath  <rharinath@novell.com>
8723
8724         Fix #80530
8725         * expression.cs (Error_InvalidArguments): Don't use two different
8726         messages for CS1503.  Use ExtraInformation and
8727         SymbolRelatedToPreviousError instead.
8728
8729         Fix #80358
8730         * decl.cs (DeclSpace.initialize_type_params): Don't access
8731         'type_params' of a partial class directly.
8732
8733 2007-01-26  Miguel de Icaza  <miguel@novell.com>
8734
8735         * constant.cs: Removed a handful of out-of-range checks that were
8736         not necessary. 
8737
8738 2007-01-25  Marek Safar  <marek.safar@gmail.com>
8739
8740         * expression.cs (CheckUselessComparison): Add additional check for char
8741         constants.
8742
8743         * namespace.cs: Fixed typo.
8744
8745 2007-01-23  Miguel de Icaza  <miguel@novell.com>
8746
8747         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
8748         gone, instead we inline the test, preventing the needless casts to
8749         longs, ulongs and doubles for the parameters, avoiding calls to
8750         methods that overchecked stuff, and instead inlined things
8751         nicely. 
8752
8753 2007-01-20  Marek Safar  <marek.safar@gmail.com>
8754
8755         * cs-parser.jay: Better parameter error handling.
8756
8757 2007-01-17  Marek Safar  <marek.safar@gmail.com>
8758
8759         A fix for bug #80368, #80522
8760         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
8761         whether array initializer contains constants only.
8762         (ArrayCreation.Emit): Use better formula to decide when
8763         are array initializers for static initialization.
8764         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
8765         have to emit even constants otherwise they are pre-initialized.
8766
8767 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
8768             Raja R Harinath  <rharinath@novell.com>
8769
8770         Fix emit order of 'get' vs. 'set'.
8771         * support.cs (Accessors): New.
8772         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
8773         Note the order in which accessors are declared in the source.
8774         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
8775         Refactored from Property.Define and Indexer.Define.
8776         (PropertyBase.DefineAccessors): New helper that calls the above in
8777         appropriate order as noted by the parser.
8778         (Property.Define, Indexer.Define): Update to changes.
8779         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
8780
8781 2007-01-17  Raja R Harinath  <rharinath@novell.com>
8782
8783         Fix cs0029-6.cs and gcs0029-2.cs (regression)
8784         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
8785         there's an implicit conversion from the current type to the target
8786         type before converting the underlying constant.
8787
8788 2007-01-16  Marek Safar  <marek.safar@gmail.com>
8789
8790         * const.cs (ResolveValue): Updated after constant conversion was made more
8791         generic.
8792
8793         * constant.cs (GetAttributableValue): constant to object conversion is
8794         used for attributes only.
8795         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
8796         constant conversions.
8797         (LongConstant.ConvertImplicitly): Ditto.
8798
8799         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
8800         (ImplicitConversionStandard): Handle constant conversion as extra step.
8801         It solves the issue when constant conversion was called indirectly like
8802         inside array initializer and constant folding was skipped.
8803
8804         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
8805         this change.
8806
8807         * statement.cs(ImplicitConversionStandard): Updated after constant
8808         conversion was made more generic.
8809
8810 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
8811
8812         * expression.cs (As.DoResolve): Use GenericConstraints instead of
8813         Constraints, solves the problem where the compiler incorrectly
8814         reported that a type parameter was not constrained to a class (Bug
8815         80518)
8816
8817 2007-01-14  Marek Habersack  <grendello@gmail.com>
8818
8819         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
8820
8821 2007-01-14  Marek Safar  <marek.safar@gmail.com>
8822
8823         A fix for bug #80368
8824         * assign.cs (FieldInitializer): New class implements field
8825         initializer statement.
8826
8827         * attribute.cs: Update after FieldMember rename.
8828
8829         * class.cs (PropertyBasedMember): New common class for property based
8830         types.
8831         (InterfaceMemberBase): New base class for all members which can be used as
8832         an interface members.
8833         (MethodCore): Moved really common code to InterfaceMemberBase.
8834         (Method.Define): Equal and GetHasCode detection is relevant for methods
8835         only.
8836         (MethodData.Define): Don't assume that public event implements an
8837         interface automatically.
8838         (MethodData.DefineMethodBuilder): Issue an error even if only extern
8839         modifier is used.
8840         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
8841         (FieldMember): Merged with FieldBase.
8842         (EventProperty.AEventPropertyAccessor): New specialization to check whether
8843         event extern modifier can be used.
8844         (EventField.EventFieldAccessor): Moved event field specific code here.
8845         (Event.AllowedModifiers): Even event can be extern.
8846         (Event.FindOutBaseMethod): New override specific to events.
8847         (Indexer.parameters): Reintroduce parameters because base class holds
8848         only properties common data.
8849         (Indexer.CheckForDuplications): Indexers are threated as methods so we
8850         need do extra parameters check.
8851
8852         * const.cs: Update after FieldMember rename.
8853
8854         * decl.cs (MemberCache.FindBaseEvent): New method.
8855
8856         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
8857         to reflect that indexer is now derived from PropertyBased.
8858
8859         * ecore.cs (GetMemberType): Made public.
8860         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
8861         obsolete event.
8862
8863         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
8864         
8865         * typemanager.cs (CSharpSignature): Correctly print event accessors.
8866         (RegisterEvent): Removed.
8867         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
8868         (GetPrivateFieldOfEvent): Renamed to GetEventField.
8869
8870 2007-01-11  Raja R Harinath  <rharinath@novell.com>
8871
8872         Fix #80249
8873         * statement.cs (CollectionForeach.TryType): Prefer generic
8874         GetEnumerator over non-generic variant.  Fix code to follow comments.
8875
8876 2007-01-09  Raja R Harinath  <rharinath@novell.com>
8877
8878         Fix #80446
8879         * support.cs (ReflectionParameter): Don't use an invalid index on
8880         the generic parameter data.
8881
8882 2007-01-08  Miguel de Icaza  <miguel@novell.com>
8883
8884         * driver.cs: Just add a tiny bit of infrastructure.
8885
8886 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8887
8888         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
8889         where field type is struct from current assembly.
8890         
8891         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
8892         it is possible.
8893
8894 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8895
8896         A fix for bug #80381
8897         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
8898         the core types.
8899
8900         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
8901         messages.
8902         (Namespace.LookupType): Always use core types from corlib when speficied.
8903
8904         * report.cs: A new warning.
8905
8906         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
8907         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
8908         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
8909
8910         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
8911         (InitCoreTypes): Set expression type of object_type and value_type
8912         immediately after lookup.
8913
8914 2007-01-01  Miguel de Icaza  <miguel@novell.com>
8915
8916         * cs-tokenizer.cs: Accept Pc class characters (Connector
8917         Punctuation) as valid identifiers.  Fixes #78259
8918
8919         * expression.cs (Invocation.DoResolve): Moved the check for the
8920         use of `this' for doing method calls to the Invocation resolution
8921         step, after overload resolution has taken place instead of doing
8922         the check at the low-level `This.DoResolve' level.
8923
8924         The `This.DoResolve'(appens before overload resolution, so it has
8925         no way of knowing if the method that will be called will be
8926         instace or static, triggering an erroneous report for cs0188 (Bug
8927         78113).
8928
8929         We now do the check for instance method invocations after we know
8930         what method will be called.
8931
8932         (This.CheckThisUsage): Move the actual use of this structure
8933         checking into its own method and expose it. 
8934
8935         * Everywhere that called Error_ValueCannotBeConverted: pass a new
8936         EmitContext.
8937
8938         Exceptions: Null.ConvertImplicitly,
8939         Constant.ImplicitConversionRequired as there are too many call
8940         sites for passing the ec. 
8941
8942         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
8943         EmitContext, if the value is null, then we do not try to provide
8944         the extra information from the error (If a userdefined conversion
8945         exists, as UserDefinedConversion requires a non null-EmitContext).
8946
8947         Fixes: #80347
8948
8949 2006-12-30  Raja R Harinath  <rharinath@novell.com>
8950
8951         * flowanalysis.cs (MyBitVector): Document some invariants.
8952         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
8953         introduced below, and add a couple of others, 
8954
8955 2006-12-30  Marek Safar  <marek.safar@gmail.com>
8956
8957         * attribute.cs (GetMethodObsoleteAttribute): Uses new
8958         GetPropertyFromAccessor and GetEventFromAccessor.
8959         
8960         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
8961         overrides non-obsolete one.
8962         (Indexer.Define): Error message has been moved to the parser.
8963
8964         * cs-parser.jay: Better syntax errors handling.
8965
8966         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
8967         when an invocation has no arguments.
8968
8969         * ecore.cs: Removed not used caching.
8970
8971         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
8972         implementation.
8973
8974         * report.cs: Add a new warning.
8975
8976         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
8977
8978         * typemanager.cs (enumeration_type): Removed.
8979         (CSharpSignature): Reuses IsSpecialMethod.
8980         (IsEqual): Hack for MS BCL.
8981         (GetPropertyFromAccessor): New method.
8982         (GetEventFromAccessor): New method.
8983         (IsSpecialMethod): Fixed to handle more cases.
8984
8985 2006-12-30  Marek Safar  <marek.safar@gmail.com>
8986
8987         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
8988         Made white spaces array static.
8989
8990         * ecore.cs (RemoveGenericArity): Optimized.
8991
8992         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
8993         10 times faster).
8994         (MyBitVector.initialize_vector): Simplified.
8995
8996 2006-12-22  Miguel de Icaza  <miguel@novell.com>
8997
8998         * ecore.cs: Am not entirely happy with this hack, but it seems to
8999         address the issue in 80257 (a small test case for
9000         CreativeDocs.NET). 
9001
9002         I set the MethodGroupExpr.Type to an internal compiler type
9003         (itself in this case) to force the resolution to take place.   Why
9004         it does not take place with a null is beyond me.
9005
9006 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9007
9008         A fix for bug #80288
9009         * expression.cs (ResolveOperator): Consider user defined conversion for
9010         logical and operator too.
9011         (EmitBranchable): Optimization for logical and when full constant folding
9012         could not be applied but one operand is constant.
9013
9014 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9015
9016         * class.cs (GetClassBases): Write 5 times every day, will never use
9017         FullName for error reporting.
9018
9019         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9020
9021 2006-12-19  Martin Baulig  <martin@ximian.com>
9022
9023         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9024         the symbol file info here.
9025
9026 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9027
9028         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9029         of `elseif' is taking then following sections are not taking.
9030         Fixes an issue reported on mono mailing list.
9031
9032 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9033
9034         A fix for bug #80300
9035         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9036         a caller is not taking.
9037
9038 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9039
9040         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9041         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9042         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9043         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9044         * class.cs: Update to changes.
9045
9046 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9047
9048         A fix for bug #79934
9049         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9050         partial container.
9051
9052         * class.cs (ResolveMembers): Register an iterator in current container and
9053         not in shared one.
9054
9055 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9056
9057         Fix test-543.cs
9058         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9059         satisfy a params annotated parameter.
9060
9061 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9062
9063         A fix for bug #77014
9064         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9065         paramters correctly and not rely on hacks in Parameters class.
9066         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9067         at any possition.
9068         (Invocation.VerifyArgumentsCompat): Ditto.
9069         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9070         any possition.
9071
9072         * parameter.cs (HasParams): Don't assume that params is the last one.
9073
9074         * support.cs (ReflectionParameters.ctor): Look for params attribute
9075         correctly.
9076         (ReflectionParameters.ParameterType): Removed hack when we returned last
9077         parameter for out of range parameters.
9078         (ParameterName, ParameterModifier): Ditto.
9079
9080 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9081
9082         A fix for bug #79987
9083         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9084         when assembly is not CLS compliant but type is. I have no idea why is this
9085         allowed.
9086
9087         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9088
9089 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9090
9091         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9092         in struct constructors, they are basically no-ops.
9093
9094 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9095
9096         * cs-tokenizer.cs (Position): Save preprocessor status too.
9097
9098 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9099
9100         A fix for bug #77794
9101         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9102
9103 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9104
9105         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9106         Fixes #69299.
9107         (pp_expr): Report error for an invalid expression.
9108         (handle_preprocessing_directive): Simplified; add more error checking.
9109
9110 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9111
9112         A fix for bug #74939
9113         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9114         directives handling.
9115
9116 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9117
9118         A fix for bugs #80093, and #75984
9119         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9120         logic, it seems to me as it worked before "by coincidence".
9121         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9122         (cleanup): Enabled endif check.
9123
9124 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9125
9126         A fix for bug #80162
9127         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9128         enumerators are never ambiguous.
9129
9130 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9131
9132         Fix #80060
9133         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9134
9135 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9136
9137         A fix for bug #80144
9138         * class.cs (EventProperty.Define): Explicit implementation means
9139         that an even is used.
9140
9141 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9142
9143         Fixes the operators implementation (part II)
9144
9145         * cfold.cs (DoConstantNumericPromotions): Renamed to
9146         DoBinaryNumericPromotions and simplified.
9147         (BinaryFold): Couple of conversion fixes; simplified.
9148
9149         * constant.cs, ecore.cs, literal.cs
9150         (ToType): Renamed to ConvertImplicitly.
9151         (Reduce): Renamed to ConvertExplicitly.
9152
9153         * class.cs, convert.cs: Updated.
9154
9155         * expression.cs: TryReduce doesn't throw an exception.
9156
9157 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9158
9159         A fix for bug #80108
9160         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9161         compatible.
9162
9163 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9164
9165         Fixes unary operators implementation (part I)
9166         Also fixes #80026
9167
9168         * cfold.cs (Error_CompileTimeOverflow): Made internal
9169
9170         * const.cs (IConstant): Changed to use reference to constant and
9171         not constant itself.
9172         Updated IConstant implementations.
9173
9174         * constant.cs (CreateConstant): New factory method.
9175         Updated IConstant implementation.
9176
9177         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9178
9179         * ecore.cs: Updated to use CreateConstantReference.
9180
9181         * enum.cs: Reflects IConstant changes.
9182
9183         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9184
9185         * literal.cs (NullConstant): Change to be independently usable.
9186
9187 2006-11-29  Martin Baulig  <martin@ximian.com>
9188
9189         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9190         we need to emit the scope initializer before calling the base .ctor.
9191
9192         * anonymous.cs: Merged back from the new anonymous methods branch.
9193         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9194
9195         * expression.cs (ParameterReference.DoResolveBase): Create a
9196         "normal" ScopeInfo when capturing parameters rather than using the
9197         root scope; this makes things work with anonymous methods having
9198         parameters.
9199
9200         * statement.cs
9201         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9202
9203 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9204
9205         A fix for bug #79987
9206         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9207         check to a base class.
9208         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9209         only when assembly has missing attribute.
9210         * report.cs: Update.
9211
9212 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9213
9214         * cs-tokenizer.cs: Merged with gmcs version.
9215
9216 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9217
9218         * cs-tokenizer.cs,
9219         * cs-parser.jay: Better error message when partial keyword is misplaced.
9220
9221 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9222
9223         A fix for bug #79810
9224         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9225         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9226         a RuntimeWrappedException by default.
9227
9228 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9229
9230         A fix for bug #79843
9231         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9232         implementation.
9233         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9234
9235 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9236
9237         * driver.cs, namespace.cs: Uses faster IndexOf version.
9238
9239 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9240
9241         A fix for bug #79941
9242         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9243         operators.
9244         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9245         even if internal name is different.
9246         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9247         (UserDefinedConversion): Simplified as the operators cannot be internal.
9248         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9249         conversions.
9250         (MethodLookup): Replaced EmitContext with parentType.
9251         * expression.cs: Updated.
9252
9253 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9254
9255         * driver.cs (BadAssembly): Handle all the ugliness of
9256         DefineDynamicAssembly.
9257
9258 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9259
9260         Address parts of #58244 -- most of what's left is in the runtime
9261         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9262         CS1509 error checks, and handle them for all assembly loads, not
9263         just the first invocation.
9264         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9265         * codegen.cs (AssemblyClass.AddModule): ... here.
9266
9267 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9268
9269         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9270         IEnumerable<T> is ambiguous.
9271
9272 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9273
9274         A fix for bug #67689
9275         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9276         GetEnumerator is ambiguous.
9277
9278         * report.cs: Add new warning.
9279
9280 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9281
9282         A fix for bug #78602
9283         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9284         to protected member can be nested type.
9285
9286 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9287
9288         A fix for bug #78965
9289         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9290         to protected member must derive from current type.
9291
9292 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9293
9294         assign.cs: Reuses error method.
9295
9296         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9297         instead of type for constants.
9298         (Expression.Error_ValueAssignment): Common error method.
9299
9300         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9301         for any assignment.
9302
9303 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9304
9305         A fix for bug #79081
9306         * expression.cs (MemberAccess.DoResolve): Check nested type
9307         accessibility.
9308
9309 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9310
9311         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9312
9313 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9314
9315         A fix for bug #76591
9316         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9317
9318 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9319
9320         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9321         type forwarder of the same type multiple times.
9322
9323 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9324
9325         Fix #78820
9326         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9327         instance as an rvalue, even when we later resolve as an lvalue.
9328
9329 2006-10-25  Martin Baulig  <martin@ximian.com>
9330
9331         * anonymous.cs: Fix #79673.
9332
9333 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9334
9335         A fix for bug #79666
9336         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9337         ignored when is optimized (= default value) as its value is already set.
9338
9339 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9340
9341         A fix for bug #79724
9342         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9343         TypeContainer for type lookup.
9344
9345 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9346
9347         A fix for bug #79231
9348         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9349         * expression.cs (OverloadResolve): Always convert type name for
9350         an error message.
9351         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9352         other member.
9353
9354 2006-10-18  Martin Baulig <martin@ximian.com>
9355
9356         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9357
9358 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9359
9360         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9361         an int32, but requesting an int64 from the conversion
9362
9363 2006-10-12  Martin Baulig  <martin@ximian.com>
9364
9365         * anonymous.cs
9366         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9367         
9368 2006-10-12  Martin Baulig  <martin@ximian.com>
9369
9370         * statement.cs
9371         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9372
9373 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9374
9375         * convert.cs: Remove broken code: I was doing the "Existance"
9376         tests for Implicit conversions.
9377
9378 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9379
9380         * convert.cs: Added one missing case in
9381         ImplicitStandardConversionExists uint64 to intptr.
9382
9383         Fixes #59800
9384         
9385         * typemanager.cs (uintptr_type): another core known type.   
9386
9387         * ecore.cs (OperatorCast): routine used to do cast operations that
9388         depend on op_Explicit.  We could change some of the Decimal
9389         conversions to use this.
9390
9391         This one has a probe mechanism that checks both types for an op_
9392         which it coudl be used to eliminate two classes: CastToDecimal
9393         and CastFromDecimal.
9394
9395         * convert.cs: Implement the conversions documented in #59800
9396         
9397 2006-10-10  Martin Baulig  <martin@ximian.com>
9398
9399         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9400         before RootScope.ResolveMembers().
9401
9402         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9403         `CurrentType' if appropriate.
9404
9405 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9406
9407         A fix for bug #78568
9408         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9409         when contains binary operators.
9410         * cs-parser.jay: Updated.
9411
9412 2006-10-09  Martin Baulig  <martin@ximian.com>
9413
9414         * delegate.cs
9415         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9416         moved that into Define() and also do the other type parameter
9417         checks there.  Fixes #79094.  Added gtest-292.cs.
9418
9419         * expression.cs
9420         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9421         since that doesn't include type parameters; don't use `Ldelema'
9422         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9423
9424 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9425
9426         A fix for #77796
9427         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9428         conversion is allowed.
9429
9430 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9431
9432         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9433         error reporting when no error occurs.
9434
9435 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9436
9437         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9438         does not exist.
9439
9440 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9441
9442         Fix #79584
9443         * class.cs (DefineTypeBuilder): Check circular dependencies before
9444         setting the parent of the TypeBuilder.
9445         (CheckRecursiveDefinition): Don't use 'BaseType', since
9446         it may not be valid until after DefineTypeBuilder.  Use
9447         'base_type' instead.
9448
9449 2006-10-04  Martin Baulig  <martin@ximian.com>
9450
9451         Merged the Anonymous Methods patch.
9452
9453         * anonymous.cs, iterators.cs: The new anonymous methods code.
9454
9455         * statement.cs (Variable): New public abstract class.
9456         (LocalInfo.Variable): New public property.
9457         (LocalInfo.ResolveVariable): New public method.
9458         (Block.Flags): Add `IsIterator'.
9459         (Block.AddVariable): Improved the CS0136 check.
9460         (Block.AnonymousChildren): New public property.
9461         (Block.AddAnonymousChild): New public method.
9462         (ToplevelBlock): Update to use the new anonymous method framework.
9463         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9464         `ToplevelBlock'; this is required to correctly implement the
9465         CS0136 check.
9466         (Fixed, Using): Use `TemporaryVariable' instead of directly
9467         creating the `LocalBuilder'.
9468
9469         * parameter.cs (Parameter.ResolveVariable): New public method.
9470         (Parameters.ResolveVariable): Likewise.
9471
9472         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9473
9474         * class.cs (TypeContainer): Replaced the `iterators' list and
9475         corresponding methods with a list of `CompilerGeneratedClass'es.
9476         (TypeContainer.ResolveMembers): New public method.
9477         (Method): `IIteratorContainer' has been replaced by
9478         `IAnonymousHost'.
9479
9480         * expression.cs (VariableReference): New public abstract base
9481         class for `LocalVariableReference', `ParameterReference' and
9482         `This'.
9483
9484         * codegen.cs (EmitContext): Removed `capture_context',
9485         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9486         (EmitContext.EmitThis): Removed.
9487
9488         * cs-parser.jay: Replace `iterator_container' with
9489         `anonymous_host'.       
9490
9491 2006-10-04  Martin Baulig  <martin@ximian.com>
9492
9493         * generic.cs (GenericMethod): Don't make this abstract.
9494         (Constraints.Clone): Added dummy implementation.
9495
9496 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9497
9498         Fix #79577
9499         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9500         'declspaces'.  Avoid allocating arrays willy-nilly.
9501
9502         Fix #79553
9503         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9504         cases out of the switch.
9505
9506 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9507
9508         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9509         message when non-generic type is used with the type arguments.
9510         * expression.cs: Updated.
9511
9512 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9513
9514         Fix #79013
9515         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9516         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9517         Change semantics slightly.  Don't insist on having only one
9518         temporary EmptyExpression -- just throttle the creation of new ones.
9519
9520         Fix #79451
9521         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9522         non-interfaces too.  If no methods are found, don't try to create
9523         a MethodGroupExpr.
9524
9525 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9526
9527         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9528         generic type.
9529
9530         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9531         us produce better error message.
9532
9533 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9534
9535         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9536         of the `|' operator.
9537
9538         * report.cs: A new warning added.
9539
9540 2006-09-27  Martin Baulig  <martin@ximian.com>
9541
9542         * generic.cs (GenericMethod): Don't make this abstract.
9543
9544 2006-09-27  Martin Baulig  <martin@ximian.com>
9545
9546         * report.cs
9547         (InternalErrorException): Added overloaded ctor taking a params array.
9548
9549 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9550
9551         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9552         Fixed the cases when same error was reported twice.
9553
9554         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9555         now report symbol information.
9556
9557 2006-09-25  Martin Baulig  <martin@ximian.com>
9558
9559         * class.cs: Completely unified with the gmcs version.
9560
9561 2006-09-25  Martin Baulig  <martin@ximian.com>
9562
9563         * typemanager.cs (TypeManager.IsNullableType): New public function.
9564         (TypeManager.IsNullableTypeOf): Likewise.
9565         (TypeManager.IsNullableValueType): Likewise.
9566
9567         * class.cs (MethodCore): Added the `GenericMethod' argument from
9568         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9569
9570 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9571
9572         * convert.cs: Unify with gmcs version.
9573
9574 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9575
9576         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9577         verify them as well.
9578
9579         * report.cs: New warning.
9580
9581 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9582
9583         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9584         for anonymous block with out argument.
9585
9586 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9587
9588         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9589         not used private events only.
9590
9591 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9592
9593         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
9594
9595         * const.cs (Const.Define): Check for constant type.
9596         (Const.IsConstantTypeValid): Looks for valid constant types.
9597
9598         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
9599
9600         * ecore.cs (EmptyConstantCast): New common class for all constant based
9601         EmptyCast(s).
9602
9603         * expression.cs (Is.DoResolve): Handle null constant especially.
9604         (New.DoResolve): Check for new void().
9605         (MemberAccess.DoResolve): Cope with all kind of nulls.
9606
9607         * literal.cs (NullConstant): Uses EmptyConstantCast.
9608         (NullDefault): Based on EmptyConstantCast.
9609         (NullLiteral): Uses EmptyConstantCast.
9610
9611         * statement.cs (Block.ResolveMeta): Check for constant type.
9612
9613 2006-09-22  Martin Baulig  <martin@ximian.com>
9614
9615         * delegate.cs, attribute.cs: Merged with the gmcs versions.
9616
9617 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9618
9619         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
9620         not the null type.
9621
9622         Fix part of #79451
9623         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
9624         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
9625         code slightly.
9626
9627 2006-09-22  Martin Baulig  <martin@ximian.com>
9628
9629         * ecore.cs: Merged with the gmcs version.
9630
9631         * generic.cs (ConstructedType): New dummy class.
9632         (TypeArguments): Don't make this abstract.
9633
9634         * typemanager.cs
9635         (TypeManager.IsGenericTypeDefinition): New method.
9636         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
9637
9638 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9639
9640         * expression.cs (ComposedCast): Check for arrays of TypedReference
9641         before creating the type, not after.
9642
9643 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
9644
9645         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
9646         after ToType change.
9647
9648         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
9649         when constant must be implicitly convertible.
9650
9651         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
9652
9653         * ecore.cs (NullCast): Derives from NullConstant.
9654
9655         * expression.cs (Is.DoResolve): Removed useless variables.
9656         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
9657         (New.Constantify): Add enum support.
9658         (MemberAccess.DoResolve): Add warning when accessing null constant or
9659         variable.
9660
9661         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
9662         property.
9663
9664         * literal.cs (NullConstant): New abstract class with common
9665         functionality for all null specializations.
9666         (NullDefault): Represents default(X) when result can be
9667         reduced to null.
9668         (NullLiteral): Updated.
9669
9670         * report.cs: Add new warning.
9671
9672 2006-09-21  Martin Baulig  <martin@ximian.com>
9673
9674         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
9675
9676 2006-09-21  Martin Baulig  <martin@ximian.com>
9677
9678         * generic.cs (GenericConstraints): New dummy class.
9679         (Constraints): Likewise.
9680         (TypeParameter): Likewise.
9681         (TypeParameterName): Likewise.
9682         (GenericMethod): Likewise.
9683
9684         * typemanager.cs (TypeManager.GetGenericArguments): New method.
9685
9686         * decl.cs: Merged with the gmcs version.
9687
9688 2006-09-21  Raja R Harinath  <rharinath@novell.com>
9689
9690         * generic.cs (TypeParameter): Implement IMemberContainer.
9691         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
9692
9693         * rootcontext.cs: Unify with gmcs version.
9694
9695         * report.cs: Unify with gmcs version.
9696         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
9697         from gmcs/generics.cs.
9698         * generics.cs (TypeParameter): New dummy class.
9699
9700         * support.cs: Unify with gmcs version.
9701
9702 2006-09-20  Raja R Harinath  <rharinath@novell.com>
9703
9704         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
9705         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
9706
9707         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
9708         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
9709         * mcs.exe.sources: Add generic.cs.
9710
9711         * codegen.cs: Unify with gmcs version.
9712
9713         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
9714         (EmitContext): Add GenericDeclContainer implementation.
9715         * decl.cs (MemberCore, DeclSpace): Likewise.
9716         * namespace.cs: Remove #ifdef GMCS_SOURCE.
9717
9718         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
9719         MCS TypeManager has a corresponding dummy method.
9720
9721 2006-09-19  Martin Baulig  <martin@ximian.com>
9722
9723         * expression.cs: Completely merged with the gmcs version.
9724
9725 2006-09-19  Martin Baulig  <martin@ximian.com>
9726
9727         * expression.cs (Invocation): Merged with the gmcs version.
9728         (ArrayAccess.GetStoreOpcode): Likewise.
9729
9730 2006-09-19  Martin Baulig  <martin@ximian.com>
9731
9732         * typemanager.cs
9733         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
9734         (TypeManager.IsGenericMethodDefinition): Likewise.
9735
9736 2006-09-19  Martin Baulig  <martin@ximian.com>
9737
9738         * typemanager.cs
9739         (TypeManager.IsEqual): Moved the gmcs implementation here.
9740         (TypeManager.DropGenericTypeArguments): Likewise.
9741         (TypeManager.DropGenericMethodArguments): Likewise.
9742         (TypeManager.GetTypeArguments): Moved here from gmcs.
9743         (TypeManager.HasGenericArguments): Likewise.
9744
9745 2006-09-19  Martin Baulig  <martin@ximian.com>
9746
9747         * expression.cs (Binary): Merged with the gmcs version.
9748
9749 2006-09-19  Martin Baulig  <martin@ximian.com>
9750
9751         * expression.cs (Probe, As, Is): Merged with the gmcs version.
9752
9753 2006-09-19  Martin Baulig  <martin@ximian.com>
9754
9755         * typemanager.cs: Merged with the gmcs version.
9756
9757 2006-09-16  Raja R Harinath  <rharinath@novell.com>
9758
9759         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
9760         * driver.cs: Likewise.
9761
9762 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
9763
9764         A fix for #79401
9765         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
9766         only if parent type is class.
9767         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
9768         update.
9769
9770 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
9771
9772         * cs-parser.jay,
9773         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
9774         keywords are used.
9775         * typemanager.cs(CSharpName): Converts NullType to null.
9776
9777 2006-09-15  Martin Baulig  <martin@ximian.com>
9778
9779         * typemanager.cs
9780         (TypeManager.GetMethodName): Added mcs implementation.
9781         (TypeManager.IsEqual): Likewise.
9782
9783         * ecore.cs
9784         (SimpleName.RemoveGenericArity): Added dummy implementation.
9785
9786         * pending.cs: Merged with the gmcs version.     
9787
9788 2006-09-15  Martin Baulig  <martin@ximian.com>
9789
9790         * statement.cs: Merge with the gmcs version.
9791
9792 2006-09-15  Martin Baulig  <martin@ximian.com>
9793
9794         * statement.cs (Switch): Merge with the gmcs implementation
9795         (without nullables), which is newer.
9796
9797 2006-09-15  Martin Baulig  <martin@ximian.com>
9798
9799         * statement.cs (Block.Variables): Make this public.
9800         (ToplevelBlock.Parameters): Make this a property.
9801         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
9802
9803 2006-09-15  Martin Baulig  <martin@ximian.com>
9804
9805         * namespace.cs: Merge with the gmcs version.
9806
9807 2006-09-15  Martin Baulig  <martin@ximian.com>
9808
9809         * decl.cs (MemberName): Minor code cleanups.
9810
9811 2006-09-15  Martin Baulig  <martin@ximian.com>
9812
9813         * parameter.cs: Merge with the gmcs version.
9814
9815 2006-09-15  Martin Baulig  <martin@ximian.com>
9816
9817         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
9818         and an error in mcs.
9819
9820 2006-09-15  Martin Baulig  <martin@ximian.com>
9821
9822         * flowanalysis.cs: Merged from GMCS; added the generics code into
9823         a `GMCS_SOURCE' conditional so we can share this file.
9824
9825 2006-09-08  Martin Baulig  <martin@ximian.com>
9826
9827         * typemanager.cs (TypeManager.interlocked_type): New public field.
9828         (TypeManager.int_interlocked_compare-exchange): New public field.
9829         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
9830         enumerator types here and call InitGenericCoreTypes().
9831         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
9832         after calling InitEnumUnderlyingTypes().
9833
9834         * rootcontext.cs
9835         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
9836         `classes_second_stage'. 
9837
9838 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
9839
9840         * assign.cs, ecore.cs, expression.cs: Share error message text.
9841         * class.cs (FieldMember.Define): Check for varible of static type.
9842         * driver.cs (LoadAssembly): Uses error output for errors.
9843         * statement.cs: Updated.
9844
9845 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
9846
9847         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
9848         type instance.
9849
9850 2006-09-07  Martin Baulig  <martin@ximian.com>
9851
9852         * driver.cs
9853         (MainDriver): Revert r62663 from Marek; see #70506 for details.
9854
9855 2006-08-29  Miguel de Icaza  <miguel@novell.com>
9856
9857         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
9858         
9859 2006-08-17  Miguel de Icaza  <miguel@novell.com>
9860
9861         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
9862         #52019 and #79064, the use of the \uXXXX sequence in source code
9863         to represent unicode characters.
9864
9865 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
9866
9867         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
9868         support.
9869         * class.cs, ecore.cs, statement.cs: Merged to one error message.
9870
9871 2006-08-13  Miguel de Icaza  <miguel@novell.com>
9872
9873         * assign.cs: Catch attempts to assign to a method groups in += and
9874         report as 1656
9875
9876 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
9877
9878         A fix for #79056
9879         * cs-parser.jay: Don't destroy current array type by typeof of array's.
9880
9881 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
9882
9883         * class.cs (Method.Define): Issue a warning when generic method looks like
9884         an entry point.
9885         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
9886         as well.
9887
9888 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
9889  
9890         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
9891         looking for ctor.
9892         * decl.cs (MemberCache.FindMembers): When container is interface we need to
9893         search all base interfaces as a member can be ambiguous.
9894         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
9895         Constructor member type filter. 
9896         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
9897         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
9898         reporting for returned memberinfos.
9899         * report.cs: Updated.
9900         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
9901         version to work on all runtimes.
9902         (TypeManager.RealMemberLookup): Removed members filtering.
9903
9904 2006-08-08  Raja R Harinath  <rharinath@novell.com>
9905
9906         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
9907         (PropertyExpr.EmitAssign): Likewise.
9908         * expression.cs (Indirection.EmitAssign): Likewise.
9909         (LocalVariableReference.EmitAssign): Likewise.
9910         (ParameterReference.EmitAssign): Likewise.
9911         (Invocation.EmitArguments): Likewise.
9912         (ArrayAccess.EmitAssign): Likewise.
9913         (IndexerAccess.EmitAssign): Likewise.
9914         (This.EmitAssign): Likewise.
9915         (ConditionalLogicalOperator.Emit): Likewise.
9916
9917         Fix #79026
9918         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
9919         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
9920         leave it in after returning it.
9921         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
9922
9923 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
9924
9925         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
9926         message.
9927
9928 2006-08-03  Raja R Harinath  <rharinath@novell.com>
9929
9930         Fix cs0146-3.cs and cs0146-4.cs.
9931         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
9932         enclosing types don't depend on the current type.
9933
9934 2006-08-02  Raja R Harinath  <rharinath@novell.com>
9935
9936         Fix #77963
9937         * class.cs (TypeContainer.DoDefineMembers): Use
9938         FindBaseMemberWithSameName on Parent, since we're interested in
9939         whether we hide inherited members or not.
9940         (FindBaseMemberWithSameName): Make slightly more robust.
9941
9942         Fix the non-generic testcase from #77396
9943         * decl.cs (DeclSpace.DeclContainer): Remove override.
9944
9945         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
9946         declspaces for doppelgangers too.
9947         (UsingEntry): Implement IResolveContext.
9948         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
9949         'this' as the resolve context.
9950         (LocalAliasEntry): Likewise.
9951
9952         Implement parts of #77403
9953         * roottypes.cs (RootDeclSpace): New.  Used to represent the
9954         toplevel declaration space.  Each namespace declaration introduces
9955         a "partial" root declaretion space.
9956         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
9957         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
9958         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
9959         from 'current_namespace.SlaveDeclSpace'.
9960         (namespace_declaration): Likewise.
9961         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
9962         check.  It can't happen now.
9963         * decl.cs (DeclSpace.LookupType): Likewise.
9964         * driver.cs (MainDriver): Sanity check.
9965
9966 2006-08-01  Raja R Harinath  <rharinath@novell.com>
9967
9968         * decl.cs (DeclSpace.FindNestedType): Remove.
9969         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
9970         LookupTypeContainer to get the container of the nested type.
9971         * class.cs (TypeContainer.FindNestedType): Make non-override.
9972
9973 2006-07-31  Raja R Harinath  <rharinath@novell.com>
9974
9975         * decl.cs (DeclSpace.PartialContainer): Move field from ...
9976         * class.cs (TypeContainer.PartialContainer): ... here.
9977         (TypeContainer.AddBasesForPart): New helper.
9978         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
9979         instead.
9980         * cs-parser.jay (current_class): Convert to DeclSpace.
9981         (struct_declaration, interface_declaration, class_declaration):
9982         Use AddBasesForPart instead of .Bases directly.
9983         * const.cs, iterators.cs: Update to changes.
9984
9985 2006-07-28  Raja R Harinath  <rharinath@novell.com>
9986
9987         * class.cs (TypeContainer.AddMemberType): Rename from
9988         AddToTypeContainer.
9989         (TypeContainer.AddMember): Rename from AddToMemberContainer.
9990         (AddTypeContainer): New.  Combine AddClassOrStruct and
9991         AddInterface.
9992         (AddPartial): Update.  Add 'is_partial' argument.
9993         * roottypes.cs: Update to changes.
9994         * cs-parser.jay (push_current_class): New helper for handling
9995         current_container and current_class.
9996         (struct_declaration, interface_declaration, class_declaration):
9997         Use it.
9998
9999 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10000
10001         * roottypes.cs: Rename from tree.cs.
10002
10003         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10004         * tree.cs (Tree, ITreeDump): Remove types.
10005         * rootcontext.cs (tree, Tree): Remove fields.
10006         (root, ToplevelTypes): New.
10007         * *.cs: Update to rename.
10008
10009         * tree.cs (Tree.RecordDecl): Remove.
10010         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10011         namespace here.
10012         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10013
10014 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10015
10016         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10017         DoFlowAnalysis and OmitStructFlowAnalysis here.
10018         (ec.With): Rename from WithUnsafe and generalize.
10019         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10020         (ec.WithFlowAnalyis): New.
10021         * ecore.cs, expression.cs, statement.cs: Update.
10022
10023 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10024
10025         * statement.cs (Block.ResolveMeta): Simplify slightly.
10026
10027         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10028         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10029         check_state to flags.
10030         (CheckState, ConstantCheckState): Update.
10031         (InUnsafe): New read-only property.
10032         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10033         arbitrary flags.
10034         (WithUnsafe): New helper similar to WithCheckState.
10035         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10036         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10037
10038 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10039
10040         Make comparisons use the same IL irrespective of whether they're
10041         in a 'checked' or 'unchecked' context: one of the issues in #78899
10042         * codegen.cs (EmitContext.CheckState): Make read-only property.
10043         (EmitContext.ConstantCheckState): Likewise.
10044         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10045         helper that implement a save/restore stack for CheckState
10046         values.  This is the only way to change check-state.
10047         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10048         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10049         (CheckedExpr.EmitBranchable): New forwarding method.
10050         (UnCheckedExpr): Likewise.
10051         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10052         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10053         (Checked.Resolve, checked.DoEmit): Likewise.
10054
10055 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10056
10057         * anonymous.cs: Cache the resolved anonymous delegate, and return
10058         this so that the ResolveTopBlock is only triggered once, not
10059         twice.
10060
10061         Currently we trigger ResolvetopBlock twice due to a first pass of
10062         argument check compatibility, and a second pass that does the
10063         actual resolution.   
10064         
10065 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10066
10067         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10068         modifiers.
10069         * rootcontext.cs (Reset): Add helper_classes.
10070
10071 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10072
10073         A fix for #78860
10074         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10075         correctly.
10076
10077 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10078
10079         * statement.cs (Lock): Handle expressions of type
10080         TypeManager.null_type specially.  Fixes #78770
10081
10082 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10083
10084         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10085         to an event.
10086
10087 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10088
10089         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10090         for accessors as well.
10091         * ecore.cs (EventExpr): Add AccessorTable.
10092
10093 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10094
10095         A fix for #78738
10096         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10097         for CS0122 where appropriate.
10098         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10099         level attributes.
10100         (Filter): Assembly can be null in the case of top level attributes.
10101
10102 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10103
10104         A fix for #78690
10105
10106         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10107         is done at global level.
10108
10109 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10110
10111         A fix for #77002, Implemented TypeForwarder support.
10112
10113         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10114         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10115         * typemanager.cs (): Add type_forwarder_attr_type.
10116
10117 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10118
10119         * report.cs: Add CS0469 warning.
10120
10121 2006-06-21  Martin Baulig  <martin@ximian.com>
10122
10123         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10124         the `try'-block, so we also report CS0016 etc. there.
10125
10126 2006-06-21  Martin Baulig  <martin@ximian.com>
10127
10128         * delegate.cs
10129         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10130
10131 2006-06-21  Martin Baulig  <martin@ximian.com>
10132
10133         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10134         also report CS1686 for parameters.
10135
10136 2006-06-21  Martin Baulig  <martin@ximian.com>
10137
10138         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10139         instead of an error if the value is not implicitly convertible to
10140         the switch types; fixes #77964.
10141
10142 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10143
10144         Fix #78673
10145         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10146         FieldBuilder is null.
10147
10148         Fix #78662
10149         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10150         'left' and 'right' before error-checking.
10151
10152 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10153
10154         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10155         Fixed bug #78601.
10156         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10157         (FieldExpr.DoResolve): likewise.
10158         (PropertyExpr.InstanceResolve): likewise.
10159         (EventExpr.InstanceResolve): likewise. 
10160
10161 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10162
10163         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10164         attribute applicable tests for attribute argument.
10165
10166 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10167
10168         Fix #78079
10169         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10170         (Binary.OverloadResolve_PredefinedIntegral): New.
10171         (Binary.OverloadResolve_PredefinedFloating): New.
10172         (Binary.OverloadResolve_PredefinedString): New.
10173         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10174         Follow the standard more closely, and treat numeric promotions in
10175         terms of overload resolution.
10176         (Binary.CheckShiftArguments): Simplify.
10177
10178 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10179
10180         * flowanalysis.cs (MyBitVector): Simplify representation.
10181         (MyBitVector.Clone): Avoid allocating BitArray.
10182         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10183         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10184         (*): Update.  Change all references to MyBitVector.And and
10185         MyBitVector.Or to &= and |=.
10186
10187 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10188
10189         Fix cs0231-[34].cs.
10190         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10191         to param arguments too.
10192
10193 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10194
10195         * cs-parser.jay: Catch another parsing form for arglist being
10196         followed by other arguments.  Fixes #78313.
10197
10198 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10199
10200         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10201         checking of out parameters to ...
10202         (FlowBranchingToplevel.Merge): ... here.
10203         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10204         set, propagate the origin upward, and only complain if there was
10205         no other error.
10206         (FlowBranchingException.AddContinueOrigin): Likewise.
10207         (FlowBranchingException.AddReturnOrigin): Likewise.
10208         (FlowBranchingException.AddGotoOrigin): Likewise.       
10209
10210 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10211
10212         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10213         unreachable, skip it.
10214         (FlowBranchingException.Merge): Always propagate jumps, even if
10215         the finally block renders subsequent code unreachable.
10216
10217 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10218
10219         Fix #77601
10220         * statement.cs (Goto.Resolve): Move responsibility for resolving
10221         'goto' to FlowBranching.AddGotoOrigin.
10222         (Goto.SetResolvedTarget): New.  Callback to set the
10223         LabeledStatement that's the target of the goto.
10224         (Goto.DoEmit): Use Leave instead of Br when crossing an
10225         unwind-protect boundary.
10226         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10227         LookupLabel and adjust to new semantics.
10228         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10229         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10230         Goto.SetResolvedTarget to update target.
10231         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10232         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10233         AddBreakOrigin & co.  Delay propagation until ...
10234         (FlowBranchingException.Merge): ... this.
10235
10236         * statement.cs (Block.Resolve): Always depend on flow-branching to
10237         determine unreachability.  Kill workaround that originally emitted
10238         only one statement after an "unreachable" label (see infloop in
10239         test-515.cs).
10240
10241         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10242         This is still "wrong", but anything better would probably need a
10243         multi-pass algorithm.
10244         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10245         usage vector.  Force current usage vector to be reachable, to
10246         optimistically signify backward jumps.
10247         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10248         detected.
10249         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10250         detected, return the original salted-away usage vector instead,
10251         updated with appropriate changes.  Print unreachable warning if
10252         necessary.
10253         * statement.cs (Block.Resolve): Don't print unreachable warning on
10254         a labeled statement.
10255
10256 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10257
10258         * driver.cs: Pass filename without path to AssemblyBuilder's 
10259         AddResourceFile. Fixes bug #78407.
10260
10261 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10262
10263         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10264         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10265         (FlowBranching.MergeChild): Overwrite
10266         reachability information from Labeled branchings too.
10267
10268 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10269
10270         * statement.cs (Goto.Resolve): Merge jump origins here ...
10271         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10272
10273         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10274         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10275         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10276         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10277         here, ...
10278         * statement.cs (Goto.Resolve): ... not here.
10279         (Goto.Emit): Remove CS1632 check.
10280
10281 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10282
10283         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10284         error message.
10285
10286 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10287
10288         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10289         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10290         (FlowBranchingException.Label): Likewise.
10291
10292         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10293         given value.
10294         (MyBitVector.Or): Use it to avoid losing information (Count).
10295         (FlowBranching.MergeOrigins): Likewise.
10296
10297         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10298         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10299         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10300         (UsageVector.ToString): Simplify.
10301         (UsageVector.MergeSiblings): Move here from ...
10302         (FlowBranching.Merge): ... here.
10303         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10304         not a MyBitVector.
10305
10306 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10307
10308         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10309         null bitvector is treated as all-true.
10310
10311         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10312         (MyBitVector): Rationalize invariants.  'vector != null' implies
10313         that we have our own copy of the bitvector.  Otherwise,
10314         'InheritsFrom == null' implies all inherited bits are true.
10315
10316 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10317
10318         * statement.cs (LocalInfo): Add IsConstant.
10319         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10320         local variable for constants.
10321
10322 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10323
10324         * flowanalysis.cs (MyBitVector.Empty): New.
10325         (MyBitVector): Don't allow InheritedFrom to be null.
10326         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10327         (UsageVector, FlowBranching): Update to changes.
10328
10329         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10330         recursion.  The 'Parent == null' condition isn't sufficient for
10331         anonymous methods.
10332         (FlowBranching.AddBreakOrigin): Likewise.
10333         (FlowBranching.AddContinueOrigin): Likewise.
10334         (FlowBranching.AddReturnOrigin): Likewise.
10335         (FlowBranching.StealFinallyClauses): Likewise.
10336         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10337         (FlowBranching.CheckOutParameters): Likewise.
10338         (FlowBranchingToplevel): Terminate all the above recursions here.
10339         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10340         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10341
10342         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10343         toplevel block.
10344         (FlowBranchingToplevel): New.  Empty for now.
10345         (FlowBranching.MergeTopBlock): Update.
10346         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10347         branching for the anonymous delegate.
10348         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10349
10350         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10351         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10352         information at the start of the merge.  Reorganize.
10353
10354 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10355
10356         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10357
10358 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10359
10360         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10361         to newly introduced ctor.
10362
10363         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10364         message to one place.
10365         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10366         global namespace.
10367
10368 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10369
10370         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10371
10372         * ecore.cs (Expression.ResolveAsConstant): Updated.
10373
10374         * statement.cs (ResolveMeta): Updated.
10375
10376 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10377
10378         * cs-parser.jay: __arglist cannot be used in initializer.
10379
10380 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10381
10382         A fix for #77879
10383         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10384         private types.
10385
10386 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10387
10388         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10389         (LabeledStatement): Add 'name' parameter.
10390         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10391         (Block.AddLabel): Update to changes.
10392         * cs-parser.jay (labeled_statement): Likewise.
10393
10394         * flowanalysis.cs (BranchingType.Labeled): New.
10395         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10396         (FlowBranchingLabeled): New.  Does nothing for now, but will
10397         eventually handle 'goto' flows.
10398         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10399         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10400         that's terminated ...
10401         (Block.Resolve): ... here.
10402
10403         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10404         (UsageVector.MergeFinallyOrigins): Likewise.
10405         (FlowBranching.InTryOrCatch): Likewise.
10406         (FlowBranching.AddFinallyVector): Likewise.
10407         (FlowBranchingException): Update to changes.
10408
10409         Fix #78290
10410         * statement.cs (Return.Resolve): Move error checking to ...
10411         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10412         (FlowBranchingException): Handle return origins like break and
10413         continue origins.
10414         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10415
10416 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10417
10418         A fix for #76122
10419         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10420         filter.
10421
10422 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10423
10424         A fix for #77543
10425         * class.cs (MethodData.Define): Do public accessor check only when method
10426         implements an interface.
10427
10428 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10429
10430         Remove special handling of 'break'
10431         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10432         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10433         (UsageVector.Break): Remove.
10434         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10435         reachability.
10436         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10437
10438         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10439         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10440
10441 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10442
10443         A fix for #75726
10444         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10445         be the interface member.
10446
10447 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10448
10449         A fix for #60069
10450         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10451         for emitting small (int) values.
10452
10453 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10454
10455         Fix #59427
10456         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10457         control-flow passes through the 'finally' after merging-in all the
10458         control-flows from 'try' and the 'catch' clauses.
10459
10460         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10461         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10462         always true at the only non-recursive entry point.
10463         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10464         FlowBranchingBreakable.
10465         (FlowBranchingLoop): Remove.
10466         * statement.cs (Return.DoResolve): Update to changes.
10467
10468         Fix #76471, #76665
10469         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10470         (FlowBranching.CreateBranching): Handle it: create a
10471         FlowBranchingContinuable.
10472         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10473         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10474         except that it handles the 'continue' command.
10475         (FlowBranching.UsageVector.MergeOrigins): Rename from
10476         MergeBreakOrigins.
10477         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10478         except that it overrides AddContinueOrigin.
10479         (FlowBranchingException): Override AddContinueOrigin, similar to
10480         AddBreakOrigin.
10481         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10482         Create a new branching around the embedded statement.
10483         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10484         control flow after the embedded statement.
10485         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10486
10487         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10488         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10489         FlowBranchingBreakable.
10490         (FlowBranchingSwitch): Remove.
10491
10492         Fix test-503.cs
10493         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10494         error reporting to ...
10495         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10496         Rename from 'AddBreakVector'.  Add new location argument.  Return
10497         a bool indicating whether the 'break' crosses an unwind-protect.
10498         (FlowBranchingException.AddBreakOrigin): Add.
10499         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10500         flowbranching after updating with the effects of the 'finally'
10501         clause.
10502         (FlowBranchingBreakable): New common base class for
10503         FlowBranchingLoop and FlowBranchingSwitch.
10504
10505         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10506         embedded statement.
10507         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10508
10509 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10510
10511         * statement.cs (Do.Resolve): If the loop is infinite, set the
10512         barrier.
10513         (While.Resolve, For.Resolve): Set a barrier after the embedded
10514         statement.  There's no direct control flow that goes from the end
10515         of the embedded statement to the end of the loop.
10516         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10517         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10518         above ensure that the reachability is correctly computed.
10519
10520         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10521         (UsageVector.MergeBreakOrigins): If the current path is
10522         unreachable, treat it as if all parameters/locals are initialized.
10523         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10524         infinite loops before merging-in break origins.
10525
10526         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10527         (Reachability.Reachable): Split part into ...
10528         (Reachability.Unreachable): ... this.  Simplify.
10529         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10530
10531         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10532         (Reachability.SetThrowsSometimes): Likewise.
10533         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10534         TriState.Always, use corresponding property.
10535         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10536         (Block.Resolve): Likewise.  Remove some redundant checks.
10537
10538 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10539
10540         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10541         (Reachability.Meet): Don't bother checking AlwaysThrows --
10542         barrier is always set.
10543         (FlowBranchingBlock.Merge): Likewise.
10544
10545 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10546
10547         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10548         checks for unreachable.
10549
10550 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10551
10552         A fix for #77980
10553         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10554
10555         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10556         whether field is really assigned.
10557
10558 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10559
10560         * flowanalysis.cs (Reachability): Make 4-argument constructor
10561         private.
10562         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10563         (Reachability.Always): Rename from the highly misleading
10564         'Reachability.Never'.
10565         (FlowBranching.Merge): Update to changes.  Mark an impossible
10566         situation with a 'throw'.
10567         (*): Update to changes.
10568
10569 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10570
10571         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10572         Remove 'Undefined'.
10573         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10574         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10575         (*): Update to changes.
10576         * statement.cs: Update to changes.
10577
10578 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10579
10580         A fix for #78049
10581         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10582
10583 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10584
10585         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10586         dummy UsageVector.
10587
10588         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10589         argument to two arguments: an usage-vector and a bool.  Move call
10590         to FlowBranching.Merge () ...
10591         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10592
10593         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
10594         handling of loop and switch reachability to ...
10595         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
10596
10597 2006-04-27  Raja R Harinath  <harinath@gmail.com>
10598
10599         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
10600         handling to FlowBranchingLoop.InLoop.
10601         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
10602
10603 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
10604
10605         A fix for #78115
10606         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
10607         anonymous method is allowed from AnonymousContainer here.
10608
10609         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
10610
10611 2006-04-24  Raja R Harinath  <rharinath@novell.com>
10612
10613         Fix #78156
10614         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
10615
10616 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
10617
10618         A fix for #49011.
10619         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
10620         (DoubleConstant.Reduce): Ditto.
10621
10622 2006-04-23  Raja R Harinath  <rharinath@novell.com>
10623
10624         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
10625         Remove 'lvalue_right_side' argument.  Move parts to ...
10626         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
10627         (LocalVariable.DoResolveLValue): ... these.
10628
10629 2006-04-21  Raja R Harinath  <rharinath@novell.com>
10630
10631         Fix cs1655.cs
10632         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
10633         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
10634         (LocalVariableReference.DoResolveBase): Use it to implement new
10635         CS1655 check.
10636         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
10637         (Argument.Resolve): Simplify.  Move CS1510 check ...
10638         * ecore.cs (Expression.ResolveLValue): ... here.
10639         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
10640         (PropertyExpr.DoResolveLValue): Likewise.
10641         (FieldExpr.Report_AssignToReadonly): Likewise.
10642         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
10643         LValueMemberAccess or LValueMemberOutAccess on instance depending
10644         on it.
10645         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
10646         DoResolve as appropriate.
10647
10648 2006-04-20  Raja R Harinath  <rharinath@novell.com>
10649
10650         Fix #75800
10651         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
10652         implicit conversions on 'out' and 'ref' arguments.
10653
10654         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
10655         improve clarity.  Remove dead code.
10656
10657         Fix #66031
10658         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
10659         (Catch.Resolve): Resolve VarBlock if it exists.
10660
10661 2006-04-19  Miguel de Icaza  <miguel@novell.com>
10662
10663         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
10664         twice, this was some residual code, the enumerator was emitted
10665         properly in the two branche of if later.
10666
10667 2006-04-19  Raja R Harinath  <rharinath@novell.com>
10668
10669         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
10670         cast is never an lvalue.
10671         (Cast.DoResolve, Cast.ResolveRest): Combine.
10672         (Argument.Emit): Simplify slightly.  Move 'Expr is
10673         IMemoryLocation' check ...
10674         (Argument.Resolve): ... here.
10675         (Argument.Error_LValueRequired): Remove.  Inline into only user.
10676
10677         Simplifications.  Fix cs0191-2.cs
10678         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
10679         CS1649 and CS1651 to ...
10680         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
10681         the actual selection of the error code and message to a lookup
10682         table.  Add a dummy return value to simplify callsites.
10683         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
10684         readonly fields of other instances of the same type.  Move CS0197
10685         warning from ...
10686         * expression.cs (Argument.Resolve): ... here.  Simplify code.
10687         Ensure that ec.InRefOutArgumentResolving is only set during LValue
10688         resolution of an out or ref argument.  The code simplification
10689         above uses this invariant.
10690
10691 2006-04-18  Raja R Harinath  <rharinath@novell.com>
10692
10693         Possibly fix #77752.  Fix cs1690-[4-7].cs.
10694         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
10695         CheckMarshallByRefAccess.  Drop parameter.
10696         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
10697         warning.
10698         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
10699         InstanceExpression.
10700         * report.cs (AllWarnings): Add CS1690.
10701         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
10702         for ref access too.
10703         (LocalVariableReference.DoResolveBase): Update.
10704
10705 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10706
10707         * class.cs (MethodOrOperator): Moved common parts from method class.
10708         detect obsolete attributes.
10709         (Method.Define): Simplified as it reuses code from base.
10710         (Constructor.ValidAttributeTargets): Fixed issue found during
10711         refactoring.
10712         (Destructor.ValidAttributeTargets): Fixed issue found during
10713         refactoring.
10714         (Operator): Finished refactoring set off by #78020. Operator class is now
10715         ordinary method class.
10716
10717         * anonymous.cs: Updated.
10718
10719         * decl.cs (DeclSpace): Add IsGeneric
10720
10721 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10722
10723         * class.cs (Constructor.Emit): Don't emit the attributes twice.
10724
10725 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10726
10727         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
10728         detect obsolete attributes.
10729         (Method.CreateEmitContext): Moved to MethodOrOperator.
10730
10731 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10732
10733         A fix for #78048.
10734         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
10735         customized exception to make crash detection easier.
10736         (MethodOrOperator): Started to work on new base class for methods and
10737         operators.
10738         (Method): Derives from MethodOrOperator.
10739         (Constructor.Emit): Emits its own attributes.
10740         (AbstractPropertyEventMethod.Emit): Ditto.
10741         (Operator): Derives from MethodOrOperator, will refactor fully in extra
10742         patch.
10743         (Operator.Emit): It's temporary more tricky than should be.
10744         
10745         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
10746
10747         * report.cs (InternalErrorException): Add ctor with inner exception.
10748
10749 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
10750
10751         A fix for #76744.
10752         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
10753         only not visible.
10754
10755 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
10756
10757         A fix for #77916.
10758         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
10759         array.
10760
10761 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10762
10763         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
10764         attribute is present and Guid not.
10765         (Interface.ApplyAttributeBuilder): Ditto.
10766
10767         * attribute.cs: Add error message.
10768
10769 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10770
10771         A fix for #78020.
10772
10773         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
10774         sources (it's composite) so hold them in extra array as they are used in
10775         Emit phase only. It worked in the previous versions by mistake.
10776         (Attribute.Emit): Emit attribute for more owners when exist.
10777
10778         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
10779         it has now different behaviour.
10780
10781 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
10782
10783         * constant.cs (Constant.IsDefaultInitializer): New method.
10784
10785         * class.cs: Updated.
10786
10787         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
10788         re-initialize default values. It saves KBs almost for every assembly.
10789         Thanks Zoltan for the idea.
10790         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
10791         (ArrayCreation.DoResolve): Resolve only once.
10792         (ArrayCreation.Emit): Emit static initializer only when it is faster.
10793         (ArrayCreation.GetAttributableValue): Cope with optimized values.
10794
10795 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10796
10797         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
10798         From #77961.
10799
10800 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10801
10802         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
10803         in an embedded statement too.
10804
10805 2006-04-01  Raja R Harinath  <rharinath@novell.com>
10806
10807         Fix #77958
10808         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
10809
10810 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10811
10812         A fix for #77966.
10813
10814         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
10815         was not specified.
10816
10817         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
10818
10819 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
10820
10821         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
10822         phase.
10823
10824         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
10825         LocalTemporary change.
10826
10827         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
10828         TypeContainer.
10829         (ClassOrStruct.DefineFieldInitializers): Implemented static field
10830         initializers optimization.
10831         (ClassOrStruct.TypeAttr): Moved from modifiers.
10832         (Constructor.CheckBase): Don't crash when static ctor has parameters.
10833         (FieldBase.ResolveInitializer): Resolves initializer.
10834         (FieldBase.HasDefaultInitializer): New property.
10835
10836         * cs-parser.jay: Removed message.
10837
10838         * expression.cs (CompilerGeneratedThis): New specialization.
10839
10840         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
10841
10842 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
10843
10844         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
10845
10846 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10847
10848         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
10849         be now EnumConstants only.
10850
10851 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10852
10853         * attribute.cs, driver.cs: Reset more caches.
10854
10855 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10856
10857         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
10858
10859 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10860
10861         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
10862         for easier reuse. Updated all overrides.
10863         (IntegralConstant): New base class for all integral constants.
10864         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
10865         of the constant range, report custom error.
10866         (UIntConstant.Reduce): Fixed uint conversion.
10867
10868         * ecore.cs, literal.cs: Reduce updates.
10869
10870 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10871
10872         A fix for #75813.
10873
10874         * class.cs (Constructor.Define): Removed extra if for default ctors.
10875         A patch from Atsushi Enomoto.
10876
10877 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10878
10879         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
10880         GetAttributableValue.
10881
10882         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
10883         when required.
10884
10885         * convert.cs (ImplicitConversionRequired): Error message moved to
10886         DoubleLiteral.
10887
10888         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
10889         automatic implicit conversion of an output value.
10890         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
10891
10892         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
10893         conversion.
10894         (TypeOf.GetAttributableValue): Add extra handling for object type.
10895
10896         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
10897         special error message.
10898
10899 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
10900
10901         * class.cs (Constructor.Emit): Don't crash when struct ctor is
10902         InternalCall.
10903         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
10904         compatible with MS runtime.
10905
10906 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
10907
10908         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
10909         attribute arguments here.
10910
10911         * class.cs (Indexer.Define): The check was moved to attribute class.
10912
10913 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
10914
10915         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
10916         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
10917         easier.
10918
10919 2006-03-22  Raja R Harinath  <rharinath@novell.com>
10920
10921         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
10922         mcs to keep code differences small.
10923         * attribute.cs (Attribute.GetParameterDefaultValue): New.
10924         * typemanager.cs (parameter_default_value_attribute_type): New.
10925         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
10926         CS1908 check.
10927
10928 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
10929
10930         * expression.cs (StringConcat.Append): Reverted back to no warning state.
10931
10932 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
10933
10934         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
10935
10936         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
10937         the blocks too.
10938
10939 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
10940
10941         * doc-bootstrap.cs : fix build.
10942
10943 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
10944
10945         * expression.cs (StringConcat.Append): Issue a warning when empty string
10946         is going to append.
10947
10948 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
10949
10950         * assign.cs (CompoundAssign.ResolveSource): Removed.
10951
10952         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
10953         clean up.
10954
10955         * class.cs (TypeContainer.FindMethods): Removed.
10956         (TypeContainer.CheckMemberUsage): Made static.
10957
10958         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
10959
10960         * constant.cs (CheckRange): Removed unused type argument.
10961         (CheckUnsigned): Removed unused type argument.
10962
10963         * cs-parser.jay: Updated after MemberAccess clean up.
10964         Uses Length for empty string test.
10965
10966         * cs-tokenizer.cs: Uses Length for empty string test.
10967         (IsCastToken): Made static.
10968         (is_hex): Made static.
10969         (real_type_suffix): Made static.
10970
10971         * decl.cs (SetupCache): Made static.
10972         (OnGenerateDocComment): Removed unused ds argument.
10973
10974         * delegate.cs (VerifyDelegate): Removed unused argument.
10975
10976         * doc.cs: Uses Length for empty string test.
10977
10978         * driver.cs: Uses Length for empty string test.
10979
10980         * enum.cs (IsValidEnumType): Made static
10981
10982         * expression.cs (EnumLiftUp): Removed unused argument.
10983         (ResolveMethodGroup): Ditto.
10984         (BetterConversion): Ditto.
10985         (GetVarargsTypes): Ditto.
10986         (UpdateIndices): Ditto.
10987         (ValidateInitializers): Ditto.
10988         (MemberAccess.ctor): Ditto.
10989         (GetIndexersForType): Ditto.
10990
10991         * flowanalysis.cs: (MergeFinally): Removed unused argument.
10992
10993         * iterators.cs: Updated after MemberAccess clean up.
10994
10995         * location.cs: Uses Length for empty string test.
10996
10997         * namespace.cs: Uses Length for empty string test.
10998
10999          * report.cs (CheckWarningCode): Made static.
11000
11001         * statement.cs (LabeledStatement): Removed unused argument.
11002
11003         * typemanager.cs (FilterNone): Removed.
11004
11005 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11006
11007         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11008         obsolete.
11009
11010         * class.cs: Updated.
11011
11012 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11013
11014         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11015
11016 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11017
11018         A fix for #77822.
11019
11020         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11021         reporting, it's more tricky than I thought.
11022
11023 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11024
11025         A fix for #77816.
11026
11027         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11028         host container.
11029         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11030         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11031         Add more error reporting; Fixed issue with params.
11032
11033         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11034
11035         * cs-parser.jay: AnonymousMethod requires host container.
11036
11037         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11038
11039 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11040
11041         * class.cs: Change 'TypeContainer ds' constructor argument to
11042         'DeclSpace parent'.  Some classes were missed below due to
11043         different naming convention.
11044
11045         * class.cs (MemberCore.Parent): Delete.  This makes the
11046         ParentContainer changes below enforceable by the compiler.
11047
11048         Treat pointers to enclosing declaration space as 'DeclSpace', not
11049         'TypeContainer'.
11050         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11051         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11052
11053         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11054         of TypeContainer.
11055         (Block.AddThisVariable): Likewise.
11056         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11057         (AbstractPropertyEventMethod.Emit): Likewise.
11058         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11059         (GetMethod.Define, SetMethod.Define): Likewise.
11060         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11061         (DelegateMethod.EmitMethod): Likewise.
11062
11063         Fix regression test-partial-13.cs.
11064         Rationalize use of PartialContainer.  Ensure that the partial
11065         class semantics can be tied to type-correctness, i.e., any
11066         violation will cause a compile error.
11067         * class.cs, const.cs: Access all fields that belong to class
11068         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11069         Resolve()-like functions still use 'Parent'.
11070
11071         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11072         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11073         (PropertyMethod.CheckModifiers): Remove unused argument.
11074         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11075         DeclSpace.
11076
11077 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11078
11079         Make semantics of PartialContainer simpler.
11080         * decl.cs (DeclSpace.IsPartial): Remove.
11081         * class.cs (TypeContainer.IsPartial): Likewise.
11082         (TypeContainer..ctor): Set PartialContainer to point to self.
11083         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11084         (TypeContainer.FindNestedType): Likewise.
11085         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11086
11087 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11088
11089         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11090
11091 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11092
11093         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11094         classes.
11095
11096 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11097
11098         * class.cs (Operator.Define): An error for base conversion was not
11099         reported correctly.
11100
11101 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11102
11103         * iterator.cs : yield break is allowed in try statement which has
11104           catch clauses. Fixed bug #77767.
11105
11106 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11107
11108         A fix for #77593, #77574.
11109
11110         * class.cs (MethodCore.CheckBase): Another if for operator.
11111
11112 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11113
11114         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11115         were not resolved
11116
11117         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11118         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11119         conversion test.
11120         
11121         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11122         not needed.
11123
11124         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11125         Updated after another emitcontext usage was clean up. It should help us to
11126         synchronize with gmcs easier.
11127
11128 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11129
11130         A fix for #77353.
11131
11132         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11133         (Event.Define): ditto
11134         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11135
11136         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11137         Removed redundant code and set NewSlot for Invoke method too.
11138
11139         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11140         (Parameters.MergeGenerated): New method. Use this method when you merge
11141         compiler generated argument with user arguments.
11142
11143 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11144
11145         * attribute.cs (ResolveAsTypeTerminal): Removed.
11146
11147         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11148         specialization for predefined types; 30% speed up.
11149         Finally placed obsolete check to right place.
11150         (Expression.ResolveType): Removed.
11151
11152         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11153         Updated after ResolveType was removed.
11154
11155         * expression.cs (Cast.ctor): Check void cast.
11156         (Binary.ResolveAsTypeTerminal): Is never type.
11157         (Conditional.ResolveAsTypeTerminal): Is never type.
11158
11159         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11160
11161 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11162
11163         Fix #77679.
11164         * expression.cs (ParameterReference.DoResolveBase): Change return
11165         type to bool.
11166         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11167         Update.
11168
11169         Fix #77628.
11170         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11171
11172         Fix #77642.
11173         * typemanager.cs (GetFullNameSignature): Don't nullref on
11174         protected accessors.
11175
11176 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11177
11178         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11179         these two separated members to simplify the code.
11180         (Attribute.Resolve): Refactored to use new fields and methods.
11181         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11182         implemented obsolete attribute checking.
11183         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11184         implemented obsolete checking again. It look line never ending quest ;-)
11185         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11186
11187         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11188
11189         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11190
11191         *class.cs (Property.Define): Add RegisterProperty call.
11192
11193         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11194         argument groups (only 2).
11195
11196         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11197         encoding expression to arguments.
11198         (Expression.ExprClassToResolveFlags): Just turned to property.
11199
11200         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11201         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11202         optimized as well as implemented support for zero-length attributes.
11203
11204         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11205         Add caching of PropertyInfo's.
11206
11207 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11208
11209         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11210         error multiple times.
11211
11212 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11213
11214         New partial class implementation.
11215         A fix for #77027, #77029, #77403
11216
11217         * attribute.cs (Attributable): Made attributes protected.
11218
11219         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11220         the replacements of ClassPart and PartialContainer.
11221         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11222         (TypeContainer.AddInterface): Ditto.
11223         (TypeContainer.AddPartial): The main method for partial classes. It checks
11224         for errors and merges ModFlags and attributes. At the end class is added to
11225         partial_parts list.
11226         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11227         required here.
11228         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11229         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11230         from the rest of partial classes.
11231         (TypeContainer.GetClassBases): Simplified.
11232         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11233         DefineType.
11234         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11235         (TypeContainer.HasExplicitLayout): Uses Flags now.
11236         (PartialContainer): Removed.
11237         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11238         (StaticClass): Was merged with Class.
11239         (Class.GetClassBases): class and static class bases are verified here.
11240         (Class.TypeAttr): Added static attributes when class is static.
11241         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11242         (MemberBase): In some cases we need to call parent container for partial
11243         class. It should be eliminated but it's not easy now.
11244
11245         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11246
11247         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11248         partial classed to accumulate class comments.
11249         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11250
11251         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11252
11253         * driver.cs (MainDriver): Tree.GetDecl was removed.
11254
11255         * modifiers.cs (Modifiers): Add partial modifier.
11256
11257         * tree.cs (Tree.decl): Removed.
11258         (RootTypes): Started to use this class more often for root types
11259         specializations.
11260
11261 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11262
11263         A fix for #77615
11264
11265         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11266         external interface does not have an attribute.
11267
11268 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11269
11270         Another prerequisites for new partial classs implementation.
11271         
11272         * attribute.cs (Attribute.Equal): Implemented.
11273         (Attribute.Emit): Changed as attributes can be applied more than twice.
11274         (Attributes.Emit): Check for duplicate attributes here.
11275
11276         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11277         as a parameter, clean-up.
11278
11279 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11280
11281         A fix for #77485
11282
11283         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11284         contains obsolete attribute check which can in some cases look for base
11285         type of current class which is not initialized yet.
11286         (TypeContainer.BaseType): Replacement of ptype.
11287
11288         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11289
11290 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11291
11292         First of prerequisites for new partial classs implemention.
11293         
11294         * attribute.cs (Attributable): Extended by ResolveContext;
11295         Attributes finally have correct context for resolving in all cases.
11296         (AttachTo): Attribute owner is assigned here.
11297
11298         * codegen.cs (IResolveContext): Introduce new interface to hold
11299         all information needed in resolving phase.
11300         (EmitContext): Implements IResolveContext; more clean-up needed here.
11301         
11302         * decl.cs (MemberCore): Implemented IResolveContext.
11303
11304         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11305         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11306         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11307         Refactored to use new IResolveContext instead of EmitContext; cleanup
11308
11309 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11310
11311         * codegen.cs (EmitScopeInitFromBlock): check here the
11312         capture_context, there is no need to make two calls to the
11313         EmitContext. 
11314
11315         * anonymous.cs: Add some debugging messages that might help me
11316         track other instances of this problem in the future (the
11317         regression of test 467).
11318
11319         * cs-parser.jay: track the variable block, as we need to initalize
11320         any captured variables declared in this block for the "catch"
11321         portion of the "Try" statement.
11322
11323         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11324         scope initialization for captured variables. 
11325
11326         Also, move the emit for the variables after the block location has
11327         been marked.
11328
11329 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11330
11331         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11332
11333 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11334
11335         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11336         commit yesterday, the initialization for the roots is necessary.
11337         What is not necessary is the scope activation.
11338
11339 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11340
11341         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11342         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11343         CS0206 checks.
11344         (Argument.Resolve): Remove CS0206 checks.
11345
11346 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11347
11348         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11349         scopes for all the roots, the scopes will now be emitted when the
11350         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11351
11352         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11353         code.  This reduces a lot of existing cruft.
11354         
11355         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11356         that the ScopeInfo is generated as we enter the scope, not at the
11357         time of use, which is what we used to do before.
11358
11359         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11360         every time a Block is about to be emitted if we have a
11361         CaptureContext. 
11362
11363 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11364
11365         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11366         (Reset): Update.
11367         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11368
11369         * typemanager.cs (cons_param_array_attribute): Make private.
11370         (Reset): Set it to null.
11371         (InitCoreHelpers): Don't initialize it.
11372         (ConsParamArrayAttribute): New.  Initialize it as needed.
11373         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11374
11375 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11376
11377         * expression.cs: There might be errors reported during the
11378         selection of applicable methods.  If there are errors, do not
11379         continue execution as it will lead the compiler to crash.
11380
11381 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11382
11383         * expression.cs: Member access is not allowed on anonymous
11384         methods.  Fixes #77402.
11385
11386 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11387
11388         Fix #77401
11389         * cs-parser.jay (VariableDeclaration): Don't set
11390         current_array_type to null.
11391         (field_declaration, event_declaration, declaration_statement):
11392         Set it to null here.
11393
11394 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11395
11396         * typemanager.cs (GenericParameterPosition): New.
11397         * doc.cs: Use it.
11398
11399 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11400
11401         * doc.cs : To process "include" elements, first we should create
11402           another list than XmlNodeList, because it could result in node
11403           removal, which could result in that the XmlNodeList gives up
11404           yielding next node.
11405
11406           (Also made code identical to gmcs again.)
11407
11408 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11409
11410         * ecore.cs: Introduce an error report that we were not catching
11411         before, if not silent, we must report the error.  Gonzalo ran into
11412         it.
11413
11414 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11415
11416         A fix for bug: #76957
11417         
11418         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11419         ComputeMethodHost before creating the method, this is a new
11420         requirement. 
11421
11422         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11423         that this method references (RegisterScope).  The actual scope
11424         where the method is hosted is computed with the ComputeMethodHost
11425         before we create the method.
11426
11427         Moved the Deepest routine here.
11428
11429         (AnonymousContainer.ComputeMethodHost): New routine used to
11430         compute the proper ScopeInfo that will host the anonymous method.
11431
11432         (ScopeInfo): Deal with multiple roots.  The problem was that we
11433         did not have a unique root where all ScopeInfos could be hanged
11434         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11435         of roots.  
11436
11437         Remove AdjustMethodScope which is now computed at the end.  Remove
11438         LinkScope which did a partial link, instead link all ScopeInfos
11439         before code generation from the new "LinkScopes" routine. 
11440
11441         Simplify all the Add* routines as they no longer need to maintain
11442         the tree, they just need to record that they are using variables
11443         from a ScopeInfo.
11444
11445         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11446         routines to produce the forest of ScopeInfo trees.
11447
11448         * class.cs (TypeContainer.AppendMethod): This is just like
11449         AddMethod, but ensures that an interface implementation method
11450         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11451         methods, but at the end.
11452
11453         We use this functionality to ensure that the generated MoveNext
11454         method in the iterator class is resolved/emitted before the
11455         enumerator methods created.   
11456
11457         This is required because the MoveNext method computes the right
11458         ScopeInfo for the method.  And the other methods will eventually
11459         need to resolve and fetch information computed from the anonymous
11460         method. 
11461
11462 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11463             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11464
11465         Fix rest of #76995.
11466         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11467         the 'aliases' hash.
11468         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11469         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11470
11471 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11472
11473         Fix #76656, cs0231-2.cs.
11474         * cs-parser.jay (formal_parameter_list): Make error case catch
11475         more issues.
11476         (parenthesized_expression_0): Add CS1026 check.
11477         (invocation_expression): Remove unused { $$ = lexer.Location }.
11478
11479 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11480
11481         Fix #76824.
11482         * cs-parser.jay (statement_expression): Don't list out the
11483         individual statement-expressions.  Convert syntax error into
11484         CS0201 check.
11485
11486 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11487
11488         Fix #76874.
11489         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11490         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11491         CheckIntermediateModification.
11492         (FieldExpr.DoResolve): Add new two-argument version that
11493         allows us to resolve the InstanceExpression as an lvalue.
11494         The one-argument variant is now just a wrapper.
11495         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11496         Resolve the lhs as an lvalue if the it has a value type.
11497         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11498         from Assign.DoResolve.
11499         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11500         resolved as an lvalue.
11501         (PropertyExpr.DoResolve): Update.
11502         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11503         has a value type.  Move CS1612 check here from
11504         CheckIntermediateModification.
11505         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11506         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11507         'right_side' of a ResolveLValue on an 'out' argument.
11508         (EmptyExpression.LValueMemberAccess): New.  Used as the
11509         'right_side' of a propagated ResolveLValue on a value type.
11510         (LocalVariableReference.DoResolveBase): Recognize
11511         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11512         Add CS1654 check.
11513         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11514         EmptyExpression.Null.
11515
11516 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11517
11518         * typemanager.cs : added IsGenericParameter(). In mcs it always
11519           return false.
11520         * doc.cs : for generic parameters, use GenericParameterPosition,
11521           not FullName.
11522
11523 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11524
11525         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11526
11527 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11528
11529         This fixes the problem where we used ldfld instead of ldflda to
11530         load the "THIS" pointer on captured parameters, when THIS is a
11531         value type.  See bug #77205.
11532         
11533         * iterators.cs (CapturedThisReference.Emit): Pass false to
11534         EmitThis (we do not need the address).
11535
11536         * codegen.cs (EmitThis): it needs to know whether we need the
11537         address of `this' or not.  This is used by value types.  
11538
11539         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11540         every other call passes false.
11541
11542 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11543
11544         Fix #77221.
11545         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11546         GetOverride.
11547         * expression.cs (Invocation.OverloadResolve): Update.
11548         (Invocation.DoResolve): Avoid double resolution of invocation.
11549
11550 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11551
11552         Fix #77180.
11553         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11554         unary negation of floating point types as 0-expr; negation cannot
11555         overflow in floating point types.
11556
11557         Fix #77204.
11558         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11559         on operands of 'void' type.
11560
11561         Fix #77200.
11562         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11563         and ExclusiveOr for boolean constants too.
11564
11565 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11566
11567         Fix #75636.
11568         * expression.cs (Invocation.OverloadResolve): Replace reflected
11569         override methods with their base virtual methods, rather than
11570         skipping over them.
11571         * typemanager.cs (TypeManager.GetOverride): New.
11572
11573 2006-01-05  Jb Evain  <jbevain@gmail.com>
11574
11575         * class.cs (Property.Define, Indexer.Define): do not tag the
11576         properties as SpecialName | RTSpecialName.
11577
11578 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11579
11580         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11581         doing a low-level comparission of parameter types.  It was lacking
11582         a check for __argslist. 
11583
11584 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11585
11586         * expression.cs (ParameterReference.DoResolveBase): Allow
11587         reference parameters if they are local to this block. 
11588
11589         This allows the ref and out parameters of a delegate to be used in
11590         an anonymous method, for example:
11591
11592         delegate void set (out int x);
11593
11594         set s = delegate (out int x){
11595                 x = 0;
11596         };
11597
11598         This is used by functionality introduced late in the C# language.
11599         
11600         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
11601         method that take ref and out parameters. 
11602
11603         Fixes #77119 which was a late change in the spec.
11604
11605 2005-12-23  Miguel de Icaza  <miguel@novell.com>
11606
11607         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
11608         parent if its the same scope.  Fixes #77060.
11609
11610 2005-12-21  Miguel de Icaza  <miguel@novell.com>
11611
11612         * driver.cs: Report the case of no source files and no -out:
11613         argument provided.
11614
11615 2005-12-20  Raja R Harinath  <rharinath@novell.com>
11616
11617         Fix #77035.
11618         * expression.cs (ComposedCast.GetSignatureForError): Define.
11619
11620 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11621
11622         Fix #76995
11623
11624         * namespace.cs (NamespaceEntry): Add extern_aliases as a
11625         ListDictionary, to contain the ExternAliasEntry entries (in
11626         addition to the NamespaceEntry.aliases hashtable). This field is
11627         shared between the original entry and its doppelganger (bodyless 
11628         copy of it).
11629         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
11630         extern_aliases field.
11631         (NamespaceEntry.Lookup): Move the IsImplicit check after the
11632         lookup in extern_aliases.
11633
11634 2005-12-16  Raja R Harinath  <rharinath@novell.com>
11635
11636         Fix #77006.
11637         * class.cs (TypeContainer.Mark_HasEquals): New.
11638         (TypeContainer.Mark_HasGetHashCode): New.
11639         (ClassPart): Override them.
11640         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
11641
11642         Fix #77008.
11643         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
11644         'parent' argument to the base constructor.
11645
11646         Remove all mention of TypeContainer from decl.cs.
11647         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
11648         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
11649         (DeclSpace.DeclSpace): Likewise.
11650         (DeclSpace.DefineMembers): Remove unused argument.
11651         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
11652         debugging check -- we don't care if the debug code throws an
11653         InvalidCastException instead of an InternalErrorException.
11654         * class.cs (TypeContainer.DefineMembers): Update to changes.
11655         (TypeContainer.DoDefineMembers): Likewise.
11656         (TypeContainer.GetMethods): Likewise.
11657         (PropertyMember.Define): Likewise.
11658         (MemberBase.Parent): New property that forwards to
11659         MemberCore.Parent, but ensures that we get a TypeContainer.
11660         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
11661         (RootContext.PopulateTypes): Likewise.  Remove special case code
11662         for !RootContext.StdLib: DefineMembers is idempotent.
11663
11664 2005-12-14  Miguel de Icaza  <miguel@novell.com>
11665
11666         * convert.cs (ExplicitConversionCore): Check the return value from
11667         ExplicitConversionCore which can return null on failure.  Fixes #76914
11668
11669 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
11670
11671         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
11672
11673 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
11674
11675         * doc.cs : The search for referenced namespace was insufficient to
11676           get global one as it used to do. Fixed bug #76965.
11677
11678 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
11679
11680         * doc.cs : check name in cref in the last phase that whether it is
11681           namespace or not.
11682
11683 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11684
11685         * cs-tokenizer.cs : reverted the latest change: it somehow broke
11686           Mono.C5.
11687
11688 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11689
11690         * doc.cs : so it turned out that we cannot skip override check for 
11691           interface members. Fixed bug #76954.
11692
11693 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11694
11695         * cs-tokenizer.cs : fixed bug #75984:
11696           - #warning and #error should not be handled when the source line
11697             is disabled.
11698           - #line is not checked strictly when the source line is disabled.
11699           - #define and #undef is on the other hand checked strictly at any
11700             state.
11701
11702 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
11703
11704         * cs-tokenizer.cs : missing Location (actually, filename) in one of
11705           CS1027 report.
11706
11707 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11708
11709         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
11710
11711         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
11712         event initializers.
11713         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
11714         (FieldBase.Initializer): Initializer is now optional.
11715         (EventField.Define): Only event field can have initializer.
11716
11717         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
11718
11719         * const.cs (Const): Reuse initializer.
11720
11721         * cs-parser.jay: Updated after FieldBase changes.
11722         Added current_array_type to simplify array initializers.
11723
11724         * ecore.cs (NullCast.IsDefaultValue): Implemented.
11725
11726         * expression.cs, iterators.cs: Updated.
11727
11728         * namespace.cs (NamespaceEntry): Made UsingFound private.
11729
11730 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11731
11732         * parameterCollection.cs: Obsolete, removed.
11733         * parser.cs: Obsolete, removed.
11734
11735 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11736
11737         Fix #76849.
11738         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
11739
11740         * enum.cs (Enum.Define): Set obsolete context here.
11741
11742 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11743
11744         * doc.cs :
11745           - FindDocumentedMember() now expects 1) paramList as null
11746             when "we don't have to check the number of parameters" and
11747             2) Type.EmptyTypes when "there is no arguments".
11748           - Introduced FoundMember struct to hold the exact type which was
11749             used to find the documented member (the above change broke
11750             test-xml-044; it might be better just to use DeclaringType than
11751             what MS does, like this change does, but it depends on usage.)
11752
11753 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11754
11755         * doc.cs : documented member might be from DeclaringType for nested
11756           types. Fixed bug #76782.
11757
11758 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
11759
11760         * anonymous.cs: Have the param code handle leaving copies on the
11761         stack etc. Allows anonymous params to take part in the assignment
11762         code (++, +=, etc). Fixes bug #76550
11763
11764         * expression.cs: Handle the prepare_for_load/leave_copy by passing
11765         it down to the anon code.
11766
11767         * iterators.cs: Use dummy var here
11768
11769         * codegen.cs: Handle new vars
11770
11771 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11772
11773         Fix #76849.
11774         * class.cs (MethodData.Define): Set proper Obsolete context.
11775
11776         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
11777         obsolete context.
11778         (FieldExpr.DoResolve): Ditto.
11779
11780 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11781
11782         Fix #76849.
11783         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
11784         parent is not obsolete.
11785
11786 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
11787
11788         * doc.cs : (FindDocumentedMember) find parameterless members first
11789           and get CS0419 in the early stage. Fixed first case of bug #76727.
11790
11791 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
11792
11793         Fix #76859.
11794         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
11795         no error was reported.
11796
11797         *expression.cs (Binary.DoResolve): left can be null.
11798
11799 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
11800
11801         Fix #76783.
11802         * class.cs (MethodData.Emit): Parameters should be labeled first.
11803
11804 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
11805
11806         Fix #76761.
11807         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
11808
11809 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
11810
11811         * attribute.cs (AreParametersCompliant): Moved to Parameter.
11812
11813         * class.cs (MethodCore): Parameter clean up.
11814         (IMethodData): Added ParameterInfo.
11815         (MethodData): Parameter clean up.
11816         (Indexer.Define): Parameter clean up.
11817
11818         * anonymous.cs,
11819         * codegen.cs,
11820         * cs-parser.jay,
11821         * decl.cs,
11822         * doc.cs,
11823         * ecore.cs,
11824         * flowanalysis.cs,
11825         * iterators.cs,
11826         * pending.cs,
11827         * statement.cs,
11828         * typemanager.cs: Parameter clean up.
11829
11830         * delegate.cs (Define): Get rid of duplicated code.
11831
11832         * expression.cs (ParameterReference): Removed useless parameters
11833         and simplified.
11834         (Invocation): Ditto.
11835
11836         * parameter.cs (ParamsParameter): New class, params specialization.
11837         (ArglistParameter): Attemp to separate arglist.
11838         (Parameter): Refactored to be reusable and faster.
11839         (Parameter.Modifier): Made understandable.
11840         (Parameters): Changed to be used as a class for `this' assembly
11841         parameters. Refactored to use new specialized classes.
11842
11843         * support.cs (ParameterData): Added Types property.
11844         (InternalParameters): Deleted.
11845
11846 2005-08-20  Martin Baulig  <martin@ximian.com>
11847
11848         Merging this patch from GMCS to fix #75867.
11849
11850         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
11851         scope if we don't already have it.
11852
11853 2005-11-17  Martin Baulig  <martin@ximian.com>
11854
11855         * anonymous.cs
11856         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
11857         inherit the scope from our parent.  Fixes #76653.
11858
11859 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11860
11861         * doc.cs : the previous patch does not actually fix the bug.
11862           PropertyInfo override check is now implemented and really fixed it.
11863         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
11864
11865 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11866
11867         * doc.cs : apply "override filter" also to properties.
11868           Fixed bug #76730.
11869
11870 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11871
11872         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
11873           no need to check overrides. For classes, omit those results from 
11874           interfaces since they must exist in the class. Fixed bug #76726.
11875
11876 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11877
11878         * typemanager.cs : (GetFullNameSignature) differentiate indexers
11879           with different parameters. Fixed the second problem in #76685.
11880
11881 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11882
11883         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
11884           get expected 'protected' access in CheckValidFamilyAccess()).
11885           Fixed bug #76692.
11886
11887 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11888
11889         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
11890           Fixed bug #76705.  CS1569 was incorrectly commented out.
11891
11892 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11893
11894         * doc.cs : use Invocation.IsOverride() to do real override check.
11895         * expression.cs : made Invocation.IsOverride() internal.
11896
11897 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11898
11899         * doc.cs : use TypeManager.FindMembers() instead of (possible)
11900           TypeBuilder.FindMembers() and filter overriden base members out.
11901           Fixed bug #76990.
11902
11903 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11904
11905         * doc.cs : ref/out parameters are represented as '@' (instead of
11906           '&' in type FullName). Fixed bug #76630 (additionally crefs).
11907
11908 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11909
11910         * doc.cs : when there was no '.' in cref to methods in doc comment,
11911           then parameters were missing in the output. Fixed bug #76691.
11912
11913 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11914
11915         * driver.cs : don't output docs when there is an error.
11916           Fixed bug #76693.
11917
11918 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11919
11920         * doc.cs :
11921           Now it should detect indexers. Fixed primary concern in bug #76685.
11922           Fixed CS0419 message to not show the identical member signature in
11923           the message.
11924
11925 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11926
11927         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
11928           instead of Type.FindMembers() since it does not handle events.
11929           Fixed bug #71604.
11930
11931 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
11932
11933         * codegen.cs: Fixed typo (speficied -> specified).
11934
11935 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
11936
11937         Fix #76369.
11938         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
11939
11940 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
11941
11942         * attribute.cs: Changed error message.
11943
11944         * cs-tokenizer.cs: One more check.
11945
11946 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
11947
11948         * statement.cs (Block.Resolve): Ignore empty statement.
11949
11950 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
11951
11952         * report.cs: Made error/warning methods more strict to avoid
11953         their misuse.
11954
11955         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
11956         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
11957         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
11958         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
11959
11960 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
11961
11962         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
11963         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
11964
11965         * class.cs (TypeContainer.IsComImport): New property.
11966         (Constructor.Define): Create proper ctor for ComImport types.
11967
11968         * expression.cs (New.CheckComImport): Fixed.
11969
11970 2005-11-07  Miguel de Icaza  <miguel@novell.com>
11971
11972         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
11973         that a parameter has been captured does not mean that we do not
11974         have to do the rest of the processing.  This fixes the second part
11975         of #76592.  If there was another anonymous method capturing
11976         values in the past, the Scope would never be set for the second
11977         method that captured the same parameter.
11978
11979         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
11980         properly manipulate the stack.   Second part of fix for #76592.
11981
11982         * expression.cs (New): Add support for invoking "new" on
11983         interfaces that have been flagged with the ComImport attribute and
11984         the CoClass.  Fixes #76637 
11985
11986         * statement.cs (Try.DoEmit): When a variable is captured, do not
11987         try to emit the vi.LocalBuilder variable as it has been captured.
11988         Create a temporary variable and store the results on the
11989         FieldBuilder.  Fixes #76642
11990
11991 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
11992
11993         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
11994
11995         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
11996
11997         * expression.cs (Binary.DoResolve): Added && optimalization.
11998     
11999         * typemanager.cs (AddUserType): Removed useless argument.
12000
12001 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12002
12003         * statement.cs (Block.variables): Uses ListDictionary.
12004
12005 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12006
12007         Fix #75969.
12008         * class.cs (PartialContainer.EmitType): Customized to emit
12009         security attributes.
12010         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12011         for partial classes.
12012
12013 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12014
12015         Fix #76599.
12016         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12017         access has to be fixed.
12018         
12019         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12020
12021 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12022
12023         Fix #76590.
12024         * ecore.cs (NullCast.Reduce): Implemented.
12025
12026         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12027         constant type.
12028         
12029         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12030         properly.
12031         (Foreach.Resolve): Catch null properly.
12032
12033 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12034  
12035         * cs-tokenizer.cs: Warning text fix.
12036
12037         * driver.cs: AllWarningNumbers exposed on public interface.
12038
12039         * report.cs (): Reviewed warning numbers.
12040         (IsValidWarning): Use binary search.
12041
12042 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12043  
12044         * driver.cs: Implemeted resource visibility.
12045         (Resources): New class for code sharing between /res: and
12046         /linkres:
12047  
12048 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12049
12050         Fix #76568.
12051         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12052         folding.
12053         
12054         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12055         contants only.
12056         
12057         * ecore.cs (NullCast): Child is contant only.
12058         
12059         * literal.cs (NullLiteral.Reduce): null can be converted to any
12060         reference type.
12061
12062 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12063
12064         * driver.cs: Use Encoding.Default as default code page instead
12065           of ISO-28591.
12066
12067 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12068
12069         Fix #76085.
12070         * expression.cs (Invocation.Error_InvalidArguments): Handle
12071         __arglist parameters.
12072         (Invocation.VerifyArgumentsCompat): Likewise.
12073         * support.cs (ReflectionParameters.GetSignatureForError): Print
12074         __arglist parameters.
12075         (InternalParamters.GetSignatureForError): Likewise.
12076         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12077
12078 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12079
12080         * attribute.cs (GetPropertyValue): Made public.
12081
12082         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12083         Resolve.
12084         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12085         attribute.
12086         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12087         is not defined.
12088         
12089         * driver.cs: Reflect method name change.
12090         
12091         * statement.cs (Try.Resolve): Warn when try has both general
12092         exception handlers.
12093         
12094         * typemanager.cs: runtime_compatibility_attr_type new predefined
12095         type.
12096
12097 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12098
12099         Fix #76419.
12100         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12101         treat it as an empty parameter list.
12102
12103 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12104
12105         Fix #76271.     
12106         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12107         ResolveAsTypeStep silent.
12108         * statement.cs (Block.AddConstant): Mark block as used.
12109         (Block.ResolveMeta): Avoid piling on error messages
12110         if a constant initializer resolution fails.
12111
12112 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12113
12114         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12115         Remove.
12116         (NamespaceEntry.VerifyAllUsing): New.
12117         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12118         behaviour.  Delegates actual resolution of alias to ...
12119         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12120         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12121         Update.
12122         * driver.cs (Driver.MainDriver): Update.
12123         
12124         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12125         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12126         property.
12127         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12128         Remove.
12129         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12130         RootNamespace.DefineNamespacesForAll.
12131
12132 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12133
12134         * typemanager.cs (assemblies, external_aliases, modules)
12135         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12136         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12137         overhead.  Move resposibility ...
12138         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12139         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12140
12141 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12142
12143         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12144         cached_namespaces.  Improve usage.
12145         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12146         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12147         Move from GlobalRootNamespace and simplify.
12148         (RootNamespace.Global): Make instance variable.
12149         (RootNamespace.RootNamespace): Add "alias name" parameter.
12150         (GlobalRootNamespace): Simplify drastically.
12151         (Namespace.Lookup): Don't use GetNamespace.
12152         * typemanager.cs (GetRootNamespace): Rename from
12153         ComputeNamespaceForAlias.
12154         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12155
12156 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12157
12158         * anonymous.cs (AnonymousContainer): Don't crash when container
12159         doesn't exist.
12160
12161 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12162
12163         * expression.cs (Binary.DoResolve): Warn when comparing same
12164         values.
12165
12166 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12167
12168         Fix #76486.
12169         * expression.cs (Binary.DoResolve): It looks like there are no
12170         convetsion rules in enum context.
12171
12172 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12173
12174         Add support for extern alias qualifiers.
12175         * typemanager.cs: Move some LookupTypeReflection code
12176         to namespace.cs, to have cleaner code. Added some methods
12177         to help us keep track of the extern aliased references.
12178         * driver.cs: Add suport for extern alias assemblies on command
12179         line and check for their warnings/errors. Also keep track of the
12180         extern aliased assemblies.
12181         * namespace.cs: Move the global functionality of Namespace
12182         to GlobalRootNamespace/RootNamespace. Now the global namespace
12183         is GlobalRootNamespace.Globa. Also the code moved from 
12184         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12185         Finally added LocalAliasEntry (AliasEntry before) and
12186         ExternAliasEntry, to handle alias statements.
12187         * cs-parser.jay: Add support in the grammar for extern alias
12188         statement.
12189         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12190         Update callings to Namespace (now in GlobalRootNamespace).
12191
12192 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12193
12194         Fix #76371.
12195         * class.cs (TypeContainer.DefineType): Move updating of
12196         topological sort earlier in the code.
12197         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12198
12199 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12200
12201         Fix #76273.
12202         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12203         
12204         * constant.cs (Constant.TryReduce): Moved from Cast class.
12205         (Reduce): Made little bit more OO and fixed missing conversions.
12206         
12207         * ecore.cs (Reduce): Implemented.
12208         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12209         
12210         * literal.cs (Reduce): Implemented.
12211         
12212         * class.cs: Reverted Miguel's wrong commit.
12213
12214 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12215
12216         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12217
12218 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12219
12220         * cs-parser.jay, expression.cs : CS0214 was missing error location
12221           for constants. Fixed bug #76404.
12222
12223 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12224
12225         Fix #76370.
12226         * convert.cs (ExplicitConversionCore): Fixed object->enum
12227         conversion.
12228
12229 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12230
12231         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12232         InstanceExpression.
12233         (PropertyExpr.EmitCall): Likewise.
12234         * expression.cs (Invocation.EmitArguments): Handle case where
12235         arguments == null.
12236         (Invocation.EmitCall): Avoid allocating temporary variable if
12237         there are no arguments.
12238
12239 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12240
12241         Fix #76323.
12242         * convert.cs (ImplicitConversionStandard): Move conversion of
12243         void* to arbitrary pointer types ...
12244         (ExplicitConversionStandard): .. here.
12245         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12246         error to always print typenames.
12247
12248 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12249
12250         * convert.cs (GetConversionOperator): Rename from
12251         GetConversionOperators.  Move operator selection code from ...
12252         (UserDefinedConversion): ... here.
12253
12254 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12255
12256         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12257         conversion.
12258
12259 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12260
12261         * assign.cs (Assign.DoResolve): Error method changed.
12262
12263         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12264         
12265         * const.cs (ResolveValue): Reset in_transit immediately.
12266         
12267         * constant.cs: Error method changed.
12268         
12269         * convert.cs: Removed useless location parameter.
12270         (ExplicitNumericConversion): Don't do double enum check.
12271         (ExplicitConversionCore): Renamed from ExplicitConversion.
12272         (ExplicitUnsafe): Extracted from ExplicitConversion.
12273         (ExplicitConversion): Uses for error reporting.
12274         
12275         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12276         error messages.
12277         (ResolveBoolean): Uses common error method.
12278         (CastToDecimal): Get rid of ec.
12279         (CastFromDecimal): Optimized.
12280         (ConvCast): Get rid of ec.
12281         
12282         * enum.cs (ResolveValue): Reset in_transit immediately.
12283         (Emit): Return after first error.
12284         
12285         * expression.cs: Convert changes.
12286         
12287         * literal.cs: Error method changed.
12288         
12289         * statement.cs: Error method changed.
12290
12291 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12292
12293         * support.cs (SeekableStreamReader.Position): Don't error out when
12294         the requested position is just beyond the end of the current
12295         buffered data.
12296
12297 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12298
12299         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12300         try to keep in sync with the byte count of the underlying Stream.
12301         However, this limits us to a window size of 2048 characters: i.e.,
12302         the maximum lookahead of our lexer/parser can be 2048 characters.
12303
12304 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12305
12306         Fix #76255.
12307         * driver.cs: Fix compilation files with full root path.
12308
12309 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12310
12311         * report.cs (SymbolRelatedToPreviousError): Format the output so
12312         it does not use an open parenthesis that is never closed. 
12313
12314         * driver.cs: Follow coding guidelines
12315
12316 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12317
12318         Fix #72930.
12319         * const.cs (Const.ResolveValue): Check for assigning non-null
12320         value to reference type.
12321
12322 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12323
12324         * anonymous.cs: Implemented ExprClassName.
12325         
12326         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12327         delegate.
12328         
12329         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12330         check.
12331         
12332         * class.cs (StaticClass.DefineContainerMembers): Report protected
12333         members as error.
12334         
12335         * codegen.cs: if(ed) PRODUCTION.
12336         
12337         * convert.cs (Error_CannotImplicitConversion): Better error
12338         distinction.
12339         
12340         * cs-parser.jay: More error checks.
12341         
12342         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12343         
12344         * driver.cs (CSCParseOption): Enabled wrong option check.
12345         
12346         * ecore.cs (Expression.ExprClassName): Turned to property.
12347         (MemberExpr.CheckIntermediateModification): For checking boxed
12348         value types     modification.
12349         
12350         * statement.cs (Fixed.Resolve): Expression type must be
12351         convertible to fixed type.
12352         (CollectionForeach.GetEnumeratorFilter,TryType):
12353         Small refactoring for easier error checking.
12354
12355 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12356
12357         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12358         attributes.
12359         
12360         * class.cs (GeneratedBaseInitializer): New class for customization
12361         compiler generated initializers.
12362         (MemberBase.DoDefine): Check Obsolete attribute here.
12363         (FieldMember.DoDefine): Ditto.
12364         
12365         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12366         constants.
12367         
12368         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12369         (MemberCore.GetObsoleteAttribute): Removed argument.
12370         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12371         (MemberCore.CheckObsoleteType): New helper.
12372         
12373         * delegate.cs,
12374         * enum.cs,
12375         * statement.cs: Updates after MemberCore changes.
12376         
12377         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12378         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12379         
12380         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12381         obsolete attribute for compiler construct.
12382         (As.DoResolve): Cache result.
12383         
12384         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12385
12386 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12387
12388         Fix #76133.
12389         * expression.cs (This.VerifyFixed): In a value type T, the type of
12390         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12391         value type R, 'this' is treated as a value parameter.
12392
12393 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12394
12395         * statement.cs (Lock): Use the TemporaryVariable class instead of
12396         manually using local variables as those do not work when variables
12397         are captured.
12398
12399         * ecore.cs: Moved the TemporaryVariable class from being a nested
12400         class inside Foreach to be a public class that can be employed in
12401         other places. 
12402
12403 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12404
12405         * cs-parser.jay: interface_accessors replaced by
12406         accessor_declarations.
12407
12408         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12409         location.
12410         
12411         * statement.cs (GotoCase.Resolve): Convert null constant to
12412         null case.
12413         (SwitchLabel.ResolveAndReduce): Ditto.
12414         (SwitchLabel.NullStringCase): Custom null stamp.
12415         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12416         
12417         typemanager.cs (CSharpSignature): Don't skip first argument
12418         for full names.
12419
12420 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12421
12422         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12423
12424         * location.cs (InEmacs): in this mode, do not report column
12425         location as it confuses Emacs.
12426
12427 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12428
12429         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12430         expression.cs, iterators.cs, literal.cs: Store constants and
12431         literals location.
12432         
12433         * class.cs (MemberBase.ShortName): Pass location.
12434         
12435         * cs-parser.jay: Some location fixes.
12436         
12437         * ecore.cs (Expression.Location): Made virtual.
12438
12439 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12440
12441         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12442         if the underlying types are the same, otherwise we need to produce
12443         code that will do the proper cast.
12444
12445         This was exposed by Marek's constant rewrite which produced
12446         invalid code for the call site:
12447
12448         enum X : long { a }
12449         void Method (X v) {}
12450
12451         Method ((X) 5)
12452
12453         This fixes test-49.cs
12454
12455 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12456
12457         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12458           Type/Object should be allowed as well. Fixed bug #75968.
12459
12460 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12461
12462         * expression.cs : (Binary.DoResolve): when one is enum constant and
12463           another is constant 0, then return enum one *as enum type*.
12464           Fixed bug 74846.
12465
12466 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12467
12468         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12469         internal.
12470
12471         Fix #75941.
12472         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12473         flow-branching for LocalVariableReferences in case we were invoked
12474         from a MemberAccess.
12475         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12476         Carved out of ...
12477         (LocalVariableReference.DoResolveBase): ... this.
12478         (MemberAccess.Resolve): Do the check that was disabled during
12479         SimpleNameResolve.
12480
12481 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12482
12483         * class.cs :
12484           (PartialContainer.Create): check abstract/sealed/static strictly
12485           but abstract/sealed can exist only at one side. Fixed bug #75883.
12486
12487 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12488
12489         Fix #75945.
12490         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12491         specified, don't default to UnmanagedType.I4.
12492
12493 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12494
12495         * expression.cs : conditional operator should check possibly
12496           incorrect assign expression. Fixed bug #75946.
12497
12498 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12499
12500         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12501           Reverting the change. gmcs is much complex than mcs on this matter.
12502
12503 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12504
12505         * cs-tokenizer.cs : To read another token ahead of the actual 
12506           consumption, use new SavedToken and cache token instead of moving
12507           back the stream with SeekableStreamReader (it seemed problematic).
12508         * cs-parser.jay,
12509           driver.cs : Thus use StreamReader directly.
12510         * support.cs : Thus removed SeekableStreamReader.
12511
12512 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12513
12514         Fix #75934.
12515         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12516         (ScopeInfo.EmitScopeType): Use it to construct field names from
12517         names of captured locals.
12518
12519         Fix #75929.
12520         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12521         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12522         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12523         (ExplicitConversion): Remove enum cases already handled by
12524         implicit conversion.  Move implicit conversion check to the beginning.
12525         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12526         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12527         Don't treat System.Enum as a struct.
12528
12529 2005-08-30  Jb Evain  <jbevain@gmail.com>
12530
12531         * attribute.cs: handles as expression in parameters.
12532
12533 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12534
12535         Fix #75802.
12536         * class.cs (TypeContainer.VerifyClsName): Don't use a
12537         PartialContainer when verifying CLS compliance.
12538         (AbstractPropertyEventMethod): Set Parent here, ...
12539         (PropertyMethod): ... not here.
12540
12541 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12542
12543         * attribute.cs : escaped attribute name should not be allowed to be
12544           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12545
12546 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12547
12548         Fix #75927.
12549         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12550         when converting a long constant to unsigned long.
12551         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12552         detect where IsApplicable and VerifyArgumentsCompat disagree.
12553
12554 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12555         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12556
12557         Fix #75848.
12558         * class.cs (TypeContainer.CanElideInitializer): New helper.
12559         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12560         can safely emitting the initializer of a field.
12561
12562 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12563
12564         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12565           allowed inside a switch (without loop). Fixed bug #75433.
12566
12567 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12568
12569         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12570         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12571
12572 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12573
12574         * driver.cs : kinda reverting the default encoding changes (not exact 
12575           revert since I noticed that "codepage:reset" might not work fine).
12576
12577 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12578
12579         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12580           Location. Now getter and setter store location correctly.
12581           (errors/cs0111-12.cs now reports the expected location.)
12582
12583 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12584
12585         * driver.cs : Use default encoding on the environment.
12586           Removed (now that) extra parameter for SeekableStreamReader.
12587         * support.cs : (SeekableStreamReader) third .ctor() argument for
12588           StreamReader is not required (always true). preamble size could
12589           be acquired in simpler and safe way.
12590
12591 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12592
12593         * cs-parser.jay: report CS0642 at warning level 3
12594           and report CS0642 for an if else statement also
12595           fixes bug #74745. Patch by John Luke (and a bit
12596           modified by me).
12597           Removed extra CS0642 warning check for "while",
12598           "for" and "fixed".
12599         * statement.cs: In Block.Resolve(), CS0642 check
12600           is reimplemented to check a sequence of an empty
12601           statement and a block.
12602
12603           Both fix bug #66777.
12604
12605 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
12606
12607         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
12608         detection until I fix it.
12609         
12610         * cs-tokenizer.cs: Changed error message.
12611         
12612         * cs-parser.jay: Fixed 2 error locations.
12613         
12614         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
12615         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
12616         properties.
12617         
12618         * enum.cs (GetSignatureForError): Fixed.
12619         
12620         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
12621         method detection.
12622         
12623         * class.cs,
12624         * typemanager.cs (RegisterProperty): Removed.
12625         
12626         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
12627
12628 2005-08-24  Raja R Harinath  <rharinath@novell.com>
12629
12630         Fix #75874.
12631         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
12632         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
12633
12634 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12635
12636         * expression.cs : tiny fix is required for not warning positive ulong.
12637           See test-441.cs.
12638
12639 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12640
12641         * expression.cs : add CS0652 check for constant and integral
12642           expression. Fixed bug #53974.
12643
12644 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12645
12646         * expression.cs : in DoNumericPromotions(), check if there is implicit
12647           conversion overload for string (to check CS0034). Fixed bug #52492.
12648
12649 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12650
12651         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
12652
12653 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12654
12655         * ecore.cs : report location when it is *not* Null.
12656
12657 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12658
12659         * codegen.cs,
12660           ecore.cs,
12661           flowanalysis.cs,
12662           expression.cs:
12663           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
12664           correctly. Fixed bug #75721.
12665
12666 2005-08-23  Raja R Harinath  <rharinath@novell.com>
12667
12668         * support.cs (SeekableStreamReader.Position): Avoid an expensive
12669         loop that performs 'min (pos, char_count)'.
12670
12671         Fix #75862.
12672         * expression.cs (Unary.ResolveOperator): Don't discard implicit
12673         converted value in Operator.OnesComplement.
12674
12675 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
12676
12677         * anonymous.cs: If the anon method is pulled into a helper class,
12678         it needs to be `internal' not `private'. Fixes runtime behavior on
12679         msft. bug #75704
12680
12681 2005-08-20  Martin Baulig  <martin@ximian.com>
12682
12683         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12684         scope if we don't already have it.
12685
12686         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
12687         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
12688         fixes #75867.
12689
12690 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
12691
12692         Fix #75803
12693         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
12694         is a partial class.
12695
12696 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
12697
12698         The big constants rewrite
12699         Fix #75746, #75685 and more
12700         As a side effect saved 1MB for MWF ;-)
12701         
12702         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
12703         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
12704         enum based for corlib compilation.
12705         
12706         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
12707         subtractions.
12708         
12709         * class.cs (FixedField.Define): Use ResolveAsConstant.
12710         
12711         * const.cs (IConstant): Interface constants and enums.
12712         (Const.ResolveValue): New method for constant resolvning.
12713         (ExternalConstant): Constants from imported assemblies.
12714         
12715         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
12716         conversion; like enums.
12717         (Constant.ToType): Converts this constant to different type.
12718         (Constant.Increment): Adds 1.
12719         
12720         * convert.cs (ImplicitConversionRequired): Simplified.
12721         
12722         * cs-parser.jay: Create EnumMember directly.
12723         
12724         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
12725         
12726         * doc.cs (GenerateEnumDocComment): Removed.
12727         
12728         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
12729         (ConvertIntLiteral): Removed.
12730         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
12731         
12732         * enum.cs (EnumMember): Implement IConstant.
12733         (Enum.IsValidEnumConstant): Removed.
12734         (Enum.GetNextDefaultValue): Removed.
12735         (Enum.FindMembers): Updated.
12736         (Enum.GenerateDocComment): Iterate enum members.
12737         
12738         * expression.cs (Cast.TryReduce): Handle enums correctly.
12739         (New.Constantify): Made public.
12740         (MemberAccess.DoResolve): Removed contant specific if(s).
12741         
12742         * literal.cs (NullLiteral): Implement new abstract methods.
12743         
12744         * statement.cs (GotoCase.Resolve): Use new constant methods.
12745         (SwitchLabel.ResolveAndReduce): Use new constant methods.
12746         
12747         * typemanager.cs (LookupEnum): Removed.
12748         (IsEnumType): Fixed to work with corlib.
12749         (RegisterConstant): Removed.
12750         (LookupConstant): Removed.
12751         (GetConstant): Changed to work with IConstant.
12752
12753 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
12754
12755         * location.cs : Fixed overflown (>255) column number.
12756
12757 2005-08-03  Raja R Harinath  <rharinath@novell.com>
12758
12759         First cut of the qualified-alias-member feature.
12760         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
12761         token.
12762         * cs-parser.jay (DOUBLE_COLON): New token.
12763         (namespace_or_type_name): Add rule for recognizing
12764         qualified-alias-members.
12765         (primary_expression): Likewise.
12766         (element_access): Allow QualifiedAliasMember as a possible
12767         type-bearing expression.
12768         (local_variable_type, local_variable_pointer_type): Likewise.
12769         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
12770         aliases in the current and enclosing namespace declarations.
12771         (NamespaceEntry.UsingAlias): Add CS0440 warning.
12772         * decl.cs (MemberName.is_double_colon): New.
12773         (MemberName.MemberName): Add new constructor for alias-member.
12774         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
12775         * expression.cs (QualifiedAliasMember): New expression type.
12776
12777 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12778
12779         * location.cs : it borked when no argument was specified.
12780
12781 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12782
12783         * location.cs : tiny ToString() format fix.
12784
12785 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12786
12787         * statement.cs : oops, it was missing.
12788
12789 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12790
12791         A set of fixes for precise line/column location.
12792
12793         * location.cs :
12794           "token" field now holds a file/line "delta", a line number offset 
12795           from the segment, and a column number. See also:
12796           http://lists.ximian.com/pipermail/mono-devel-list/2004-
12797           December/009508.html
12798           Removed static IsNull. Use instance IsNull property instead.
12799         * cs-tokenizer.cs :
12800           For some tokens it stores Location. For Identifier it stores
12801           LocatedToken which is a pair of string name and location.
12802           Column numbers are adjusted only at getChar().
12803         * report.cs :
12804           Use Location.ToString() for reporting (it now contains column).
12805         * cs-parser.jay :
12806           Largely modified to use LocatedToken instead of
12807           string (IDENTIFIER), and to acquire Location from some tokens.
12808         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
12809           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
12810           codegen.cs :
12811           Now MemberName holds Location. DeclSpace.ctor() receives Location
12812           as a parameter. Removed extra parameters to all derived classes.
12813           Replaced Location.IsNull() with instance property.
12814         * assign.cs, expression.cs :
12815           Added .ctor() overload that omits Location.
12816         * attribute.cs :
12817           Added "nameEscaped" flag that indicates the identifier was escaped
12818           in the source file. This fixes bug #57047.
12819
12820 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
12821
12822         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
12823         New method, looking for lo-case imported cls type.
12824
12825         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
12826         here.
12827
12828         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
12829
12830         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
12831
12832         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
12833         all_imported_types.
12834         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
12835
12836         Optimized to save 3.5 MB for SWF compilation.
12837
12838 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12839
12840         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
12841         (PartialContainer.Create): Moved logic AddToContainer.
12842         (PartialContainer.MarkForDuplicationCheck): Shares name.
12843         
12844         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
12845         place.
12846         
12847         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
12848         initialization.
12849         (Namespace.GetSignatureForError): New method.
12850         
12851         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
12852         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
12853
12854 2005-08-01  Raja R Harinath  <rharinath@novell.com>
12855
12856         Fix #75669.
12857         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
12858         member lookup rather than qualifier_type, since qualifier_type can
12859         be null.
12860
12861 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12862
12863         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
12864         enum member.
12865
12866 2005-07-31  Miguel de Icaza  <miguel@novell.com>
12867
12868         * statement.cs: Copy the local exception into the exception
12869         captured local.  Fixes 75674
12870
12871 2005-07-31  Raja R Harinath  <harinath@gmail.com>
12872
12873         Fix #75658.
12874         * expression.cs (Invocation.OverloadResolve): Don't report error
12875         CS1501 if error CS1502 has been reported.
12876         (New.DoResolve): Delegate CS1501 reporting to
12877         Invocation.OverloadResolve.
12878
12879         Fix #75656.
12880         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
12881         invariant-meaning-in-block property in an enclosing block if
12882         necessary.
12883
12884 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
12885
12886         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
12887         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
12888         (Switch.CheckSwitch): Just save 50kb for SWF.
12889
12890 2005-07-27  Martin Baulig  <martin@ximian.com>
12891
12892         * anonymous.cs (CaptureContext.AddField): Added
12893         `AnonymousContainer am' argument; compute its toplevel scope if
12894         it's not already computed.  Fixes #75649.
12895
12896 2005-07-26  Raja R Harinath  <rharinath@novell.com>
12897
12898         Fix #75628.
12899         * class.cs (Constructor.Emit): Reset block to null if the block
12900         resolve fails.
12901
12902 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
12903
12904         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
12905
12906 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
12907
12908         * class.cs (MethodData.Define): Check whether accessor implementing
12909         interface is public.
12910
12911         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
12912
12913 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
12914
12915         Fix #57245
12916         * namespace.cs (LookupType): Moved same type check to...
12917         
12918         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
12919         with the same name.
12920
12921 2005-07-21  Raja R Harinath  <rharinath@novell.com>
12922
12923         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
12924         already found a typebuilder.
12925         * class.cs (MethodCore.IsDuplicateImplementation): Compare
12926         MemberNames, not strings.
12927
12928         * const.cs (Error_ExpressionMustBeConst): 
12929         Rename from Error_EpressionMustBeConst.
12930         * const.cs, class.cs, statement.cd: Update.
12931
12932 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
12933
12934         Fix #65573
12935
12936         * const.cs (Const.LookupConstantValue): Report missing contant expression
12937         everytime.
12938         (Error_EpressionMustBeConstant): Only one error method.
12939
12940         * class.cs, statement.c: Updated.
12941
12942 2005-07-20  Raja R Harinath  <rharinath@novell.com>
12943
12944         * statement.cs (Block.Flags): Add back HasVarargs.
12945         (Block.flags): Make protected.
12946         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
12947
12948         * typemanager.cs (types, typecontainers, user_types): Remove.
12949         (UserTypes, TypeContainers): Likewise.
12950         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
12951         (CleanUp, Reset): Update.
12952         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
12953         (GetNestedType): Use Type.GetNestedType.
12954         (CoreLookupType): Take two arguments, the namespace and the
12955         basename of the type.  Update to use the Namespace.Lookup
12956         mechanism.
12957         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
12958         (RealMemberLookup): Use IsNestedChildOf instead of playing with
12959         string concatenation and substring matches.
12960         * class.cs, enum.cs, delegate.cs: Update to changes.
12961
12962 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
12963
12964         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
12965         Expression and made virtual.
12966
12967         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
12968         (ImplicitStandardConversionExists): Fixed `byte' typo ?
12969
12970         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
12971
12972         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
12973         error message.
12974
12975         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
12976         change.
12977
12978 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
12979
12980         Fix #57707
12981         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
12982         AssemblyCultureAttribute is not used on executable.
12983
12984         * rootcontext.cs,
12985         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
12986
12987 2005-07-16  Raja R Harinath  <rharinath@novell.com>
12988
12989         Fix #60638.
12990         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
12991         New.  Reports CS0252/CS0253.
12992         Mostly taken from preliminary patch by Duncak Mak.
12993         (Binary.DoResolveOperator): Store results of operator lookup.
12994         Use them to detect if we need to warn about unintended reference
12995         comparisons.
12996
12997 2005-07-15  Raja R Harinath  <rharinath@novell.com>
12998
12999         Fix #72969.
13000         * namespace.cs (Namespace.Lookup): Add back location parameter.
13001         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13002         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13003
13004         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13005         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13006         (Namespace.LookupType): ... this.
13007         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13008         of namespaces.
13009         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13010         purported to handle pointers.
13011         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13012         CoreLookupType.
13013
13014 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13015
13016         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13017         type as namespace.
13018
13019 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13020
13021         * namespace.cs (Namespace.Lookup): Drop location parameter.
13022         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13023         (NamespaceEntry.Lookup): ... this.
13024         (NamespaceEntry.Error_AmbiguousTypeReference):
13025         Move here from DeclSpace.
13026         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13027         names ...
13028         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13029         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13030         Move to NamespaceEntry.
13031         * delegate.cs, expression.cs: Update to changes.
13032
13033 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13034
13035         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13036         CheckAttributeType and refactored.
13037         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13038         ResolveAsTypeTerminal error handling.
13039         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13040         handling.
13041         (GetSignatureForError): Print errors in same way.
13042
13043         * class.cs,
13044         * codegen.cs: Reflect attribute GetSignatureForError change.
13045
13046         * ecore.cs,
13047         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13048
13049         * namespace.cs (UsingEntry): Refactored to make fields private.
13050
13051         * assign.cs,
13052         statement.cs: Error_UnexpectedKind has extra parameter.
13053
13054 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13055
13056         * ecore.cs (IAlias): Remove.
13057         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13058         that implement the interface.
13059         * namespace.cs (Namespace): Likewise.
13060         (Namespace.declspaces): Renamed from 'defined_names'.
13061         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13062         DeclSpace instead of an IAlias.
13063         * tree.cs (Tree.AddDecl): Update.
13064
13065 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13066
13067         * statement.cs (Block.Flags); Remove HasVarargs.
13068         (Block.HasVarargs): Move to ToplevelBlock.
13069         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13070         (Block.Variables): Make protected.  Initialize variable hashtable
13071         if necessary.
13072         (Block.AddVariable): Update.
13073         (Block.Resolve): Update to changes.
13074         (ToplevelBlock.HasVarargs): New boolean.
13075         (ToplevelBlock.ThisVariable): Move here from Block.
13076         (ToplevelBlock.AddThisVariable): Likewise.
13077         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13078         * expression.cs (This.ResolveBase): Update to changes.
13079         (ArglistAccess.DoResolve): Likewise.
13080
13081 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13082
13083         Fix #75321
13084         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13085
13086         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13087         not used and not used & assigned.
13088         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13089
13090 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13091
13092         Fix #75053
13093         * expression.cs (Is.DoResolve): null is never provided type.
13094
13095 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13096
13097         Fix #52496
13098         * cs-parser.jay: Less strict event error rule to catch more errors.
13099
13100 2005-07-08  Martin Baulig  <martin@ximian.com>
13101
13102         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13103         gettter (allowed) or setter (not allowed).
13104
13105         * class.cs (Accessor): Implement IIteratorContainer.
13106         (Accessor.Yields): New public field.
13107         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13108         per-accessor basis.
13109
13110         * cs-parser.jay
13111         (get_accessor_declaration, set_accessor_declaration): Set the
13112         `yields' flag on the accessor, not the property.
13113         (property_declaration): Do the iterators check on a per-accessor
13114         basis and not for the whole property.
13115
13116 2005-07-08  Martin Baulig  <martin@ximian.com>
13117
13118         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13119         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13120
13121 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13122
13123         Fix #74975
13124         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13125         (ExtractSecurityPermissionSet): Cope with self referencing security
13126         attributes properly.
13127
13128         * driver.cs (SetOutputFile): Made public property OutputFile.
13129
13130 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13131
13132         Fix #75486.
13133         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13134         has_nonstatic_fields.  Make into a FieldBase pointer.
13135         (TypeContainer.AddField): Add CS0282 check.
13136         (TypeContainer.EmitType): Update.
13137
13138 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13139
13140         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13141         compare if they start with __.
13142
13143 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13144
13145         * statement.cs (Switch.SwitchGoverningType): Only look at
13146         UserCasts that don't need implicit standard conversions to one of
13147         the allowed switch types (Fixes test-322.cs).
13148         (LocalInfo.Resolve): Re-enable sanity-test.
13149
13150 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13151
13152         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13153         
13154         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13155         
13156         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13157
13158 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13159
13160         Fix #75472.
13161         * ecore.cs (SimpleName.GetSignatureForError): Add.
13162         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13163         (MemberAccess.GetSignatureForError): Add.
13164
13165 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13166  
13167         The big error and warning messages review.
13168         
13169         * anonymous.cs,
13170         * assign.cs,
13171         * attribute.cs,
13172         * class.cs,
13173         * codegen.cs,
13174         * convert.cs,
13175         * cs-parser.jay,
13176         * cs-tokenizer.cs,
13177         * decl.cs,
13178         * delegate.cs,
13179         * doc.cs,
13180         * driver.cs,
13181         * ecore.cs,
13182         * enum.cs,
13183         * expression.cs,
13184         * flowanalysis.cs,
13185         * iterators.cs,
13186         * literal.cs,
13187         * location.cs,
13188         * modifiers.cs,
13189         * namespace.cs,
13190         * parameter.cs,
13191         * pending.cs,
13192         * report.cs,
13193         * rootcontext.cs,
13194         * statement.cs,
13195         * support.cs,
13196         * tree.cs,
13197         * typemanager.cs: Updated.
13198         
13199         * class.cs: (MethodCore.SetYields): Moved here to share.
13200         (PropertyMethod.Define): Moved iterator setup here.
13201         
13202         * iterators.cs: Add orig_method to have full access to parent
13203         container.
13204
13205 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13206
13207         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13208         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13209         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13210         variable of struct type.
13211         * expression.cs (Unary.ResolveOperator): Update to change.
13212         (Indirection.VerifyFixed): Likewise.
13213         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13214         (ParameterReference.VerifyFixed): Value parameters are fixed.
13215         (This.VerifyFixed): Treat 'this' as a value parameter.
13216         * statement.cs (LocalInfo.IsFixed): Remove.
13217
13218 2005-07-01  Martin Baulig  <martin@ximian.com>
13219
13220         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13221         `ec.EmitThis ()' to get the correct scope.
13222
13223 2005-07-01  Martin Baulig  <martin@ximian.com>
13224
13225         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13226         instance is a ParameterReference; fixes #75299.
13227
13228 2005-07-01  Martin Baulig  <martin@ximian.com>
13229
13230         Reverted Marek's latest patch (r46725):
13231         - it contains structural changes which are neither mentioned in
13232           the ChangeLog nor explained anywhere; for example the additional
13233           argument of EmitContext's and Iterator's .ctor's and the
13234           TypeContainer.DefineMembers() change.
13235         - structural changes like this should go in in seperate patches
13236           and not be hidden in a huge patch which just seems to affect
13237           warnings and errors.
13238           a big and hard to understand patch.
13239         - it breaks iterators and causes regressions, for instance in
13240           test-iter-03.cs.      
13241
13242 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13243
13244         Fix #75412.
13245         * expression.cs (Indexers.map): Remove.
13246         (Indexers.Append): Filter out inaccessible setters and getters.
13247         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13248
13249         Fix #75283.
13250         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13251         Refactored from ...
13252         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13253         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13254         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13255         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13256
13257 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13258
13259         Fix #75322
13260         * class.cs (FieldBase.GetInitializerExpression): One more field
13261         for backup.
13262
13263 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13264
13265         * pending.cs: Do not define a proxy if the base method is virtual,
13266         it will be picked up by the runtime (bug 75270).
13267
13268 2005-06-08  Martin Baulig  <martin@ximian.com>
13269
13270         The big Iterators rewrite :-)
13271
13272         * iterators.cs: Rewrite this to use the anonymous methods framework.
13273
13274         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13275         before the TypeContainers; see 2test-21.cs.
13276
13277         * class.cs
13278         (TypeContainer.DefineType): Don't create a new EmitContext if we
13279         already have one (this only happens if we're an Iterator).
13280         (TypeContainer.Define): Also call Define() on all our iterators.
13281         (Method.CreateEmitContext): Added support for iterators.
13282
13283         * anonymous.cs
13284         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13285         (AnonymousContainer.CreateMethodHost): Moved here from
13286         AnonymousMethod and made abstract.
13287         (AnonymousContainer.CreateScopeType): New abstract method.
13288         (AnonymousContainer.IsIterator): New public property.
13289         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13290         get the ScopeTypeBuilder rather than manually defining it here. 
13291         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13292         iterators here.
13293
13294         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13295         before RootContext.DefineTypes().
13296
13297         * codegen.cs (EmitContext.RemapToProxy): Removed.
13298         (EmitContext.CurrentAnonymousMethod): Changed type from
13299         AnonymousMethod -> AnonymousContainer.
13300         (EmitContext.ResolveTopBlock): Protect from being called twice.
13301         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13302         (EmitContext.EmitThis): Removed the iterators hacks; use the
13303         anonymous methods framework for that.
13304
13305         * statement.cs
13306         (ToplevelBlock.Container): Make this a property, not a field.
13307         (ToplevelBlock.ReParent): New public method; move the
13308         ToplevelBlock into a new container.
13309         (Foreach.TemporaryVariable): Simplify.
13310
13311 2005-06-05  Martin Baulig  <martin@ximian.com>
13312
13313         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13314         (Block.AddTemporaryVariable): New public method; creates a new
13315         `LocalInfo' for a temporary variable.
13316         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13317         variables here.
13318         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13319         non-iterator variables.
13320
13321 2005-06-05  Martin Baulig  <martin@ximian.com>
13322
13323         * statement.cs (Foreach.TemporaryVariable): Create the
13324         LocalBuilder in the Emit phase and not in Resolve since in some
13325         situations, we don't have an ILGenerator during Resolve; see
13326         2test-19.cs for an example.
13327
13328 2005-06-04  Martin Baulig  <martin@ximian.com>
13329
13330         **** Merged r45395 from GCS ****
13331
13332         The big Foreach rewrite - Part II.
13333
13334         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13335         with `PropertyInfo ienumerator_getcurrent'.
13336
13337         * codegen.cs (VariableStorage): Removed.
13338
13339         * statement.cs
13340         (Foreach): Derive from Statement, not ExceptionStatement.
13341         (Foreach.CollectionForeach): New nested class.  Moved all the code
13342         dealing with collection foreach here.
13343         (Foreach.ForeachHelperMethods): Removed.
13344         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13345
13346 2005-05-23  Martin Baulig  <martin@ximian.com>
13347
13348         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13349         don't need to.  Fix #75014.
13350
13351 2005-05-20  Martin Baulig  <martin@ximian.com>
13352
13353         Merged r44808 from GMCS.
13354
13355         * class.cs (TypeContainer.CircularDepException): Removed.
13356         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13357         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13358         (CS0146) and interface (CS0529) dependencies here.
13359
13360 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13361
13362         * expression.cs (Invocation.EmitCall): Fix initialization
13363         'this_call' to reflect current behaviour.  Fix indentation.
13364
13365         * convert.cs (FindMostEncompassedType): Add two trivial special
13366         cases (number_of_types == 0 || number_of_types == 1).
13367         (FindMostEncompasingType): Likewise.
13368
13369 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13370
13371         Some cleanups preparing for the fix of #75283.
13372         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13373         error testing.
13374         (EventExpr.InstanceResolve): Likewise.
13375         (EventExpr.DoResolve): Remove redundant checks.
13376
13377 2005-06-10  Duncan Mak  <duncan@novell.com>
13378
13379         * cs-tokenizer.cs (process_directives): New flag for controlling
13380         the processing of preprocessor directives.
13381         (x_token): After seeing a '#', return Token.NONE instead of going
13382         to handle_preprocessing_directive() when not processing
13383         directives. This avoids unnecessary processing during the token peek in
13384         is_punct().
13385
13386         This fixes #74939.
13387
13388         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13389         the existing error reporting methods instead of Report.Error.
13390
13391         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13392         after Raja's rewrite.
13393
13394 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13395
13396         * class.cs: Small fix.
13397
13398 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13399
13400         Fix #75160.
13401         * class.cs (GetPartialBases): Fix return value check of
13402         part.GetClassBases.
13403
13404 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13405
13406         Ensure that partial classes are registered in their enclosing
13407         namespace.  Initial part of fix of #75160.
13408         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13409         Register declspace with namespace here, not in
13410         DeclSpace.RecordDecl.
13411         * cs-parser.jay: Pass namespace to RecordDecl.
13412         * class.cs (PartialContainer.Create): Likewise.
13413         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13414         called.
13415         * decl.cs (Declspace.RecordDecl): Remove.
13416         * namespace.cs (NamespaceEntry.DefineName): Remove.
13417
13418 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13419
13420         * rootcontext.cs: Reset TargetExt as well.
13421
13422 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13423
13424         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13425         -langversion:ISO-1.
13426
13427 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13428
13429         Fix #75080, cs0119.cs.
13430         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13431         of ...
13432         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13433         allowing ExprClass.Type and ExprClass.Namespace for
13434         ResolveFlags.VariableOrValue.
13435         (Expression.Resolve) [1-argument variant]: Change default resolve
13436         flags based on language version.
13437         (Expression.Error_UnexpectedKind): Use a simple string array
13438         rather than an ArrayList.
13439         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13440         not ExprClass.Type.
13441         (TypeOfVoid.DoResolve): Likewise.
13442         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13443         flags argument -- it always has the same value.
13444
13445 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13446
13447         Fix #75081.
13448         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13449         Use it in the error message.
13450         * assign.cs, expression.cs, statement.cs: Update.
13451
13452 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13453
13454         Fix #75088.
13455         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13456         the "almostMatchedMember" case too.
13457         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13458         that failed the accessibility checks to 'almost_match'.
13459
13460 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13461
13462         * attribute.cs: Use internal MethodBuilder methods to set
13463         ExactSpelling and SetLastError on PInvoke methods, instead
13464         of passing them via charset.  Fixes #75060.
13465
13466 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13467
13468         * parameter.cs (Parameter): Remove TODO comment.
13469         (Parameter.DefineParameter): Remove Location parameter.
13470         (Parameters.LabelParameters): Likewise.
13471         * class.cs (Constructor.Emit): Update to change.
13472         (MethodData.Emit): Likewise.
13473         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13474         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13475
13476 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13477
13478         * parameter.cs,
13479           Removed Parameters.Location and added Parameter.Location instead.
13480           Removed Location parameter from Emit() and GetSignature().
13481         * anonymous.cs,
13482           class.cs,
13483           cs-parser.jay,
13484           delegate.cs,
13485           iterators.cs,
13486           statement.cs :
13487           Modified all related calls.
13488
13489 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13490
13491         Improve user-defined conversion handling.
13492         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13493         applicable operators.
13494         (AddConversionOperators): New.  Helper for GetConversionOperators.
13495         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13496         there is only one most encompassed/encompassing type.
13497         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13498         "applicable operator" handling.
13499         (UserConversion): Move cache here from GetConversionOperators.
13500         Directly cache the chosen operator, rather than the whole
13501         MethodGroup.
13502         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13503         case.  Allow conversion of decimal to sbyte and byte too.
13504         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13505         New static methods.  Used to avoid allocating EmptyExpressions in
13506         convert.cs.
13507
13508 2005-05-24  Duncan Mak  <duncan@novell.com>
13509
13510         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13511         another class, used in Convert.ExplicitNumericConversion.
13512         (CastToDecimal): New class, similar to above, but casts to
13513         System.Decimal, used in Convert.ImplicitNumericConversion and also
13514         in explicit convesion from double/float to decimal.
13515
13516         * convert.cs (ImplicitNumericConversion): Handle implicit
13517         conversions to System.Decimal.
13518         (ExplicitNumericConversion): handle explicit conversions to
13519         System.Decimal.
13520
13521         This fixes #68711.
13522         
13523 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13524
13525         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13526         know the type at this stage, just break through.   Fixes #75008 
13527
13528 2005-05-19  Martin Baulig  <martin@ximian.com>
13529
13530         * delegate.cs
13531         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13532         to disable error reporting.
13533
13534         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13535         here since we don't want to report an error; see the new test-336.cs.
13536
13537 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13538
13539         * statement.cs (ToplevelBlock.GetParameterReference)
13540         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13541         Move here from class Block.
13542         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13543         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13544
13545 2005-05-18  Martin Baulig  <martin@ximian.com>
13546
13547         Fix #74978.
13548
13549         * flowanalysis.cs
13550         (FlowBranching.Reachability): Add non-static public And() and Or()
13551         methods.
13552         (FlowBranchingSwitch): New class; do the `break_origins' thing
13553         like in FlowBranchingLoop.
13554         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13555         reachability, not just locals and parameters.
13556         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13557         switch; MergeBreakOrigins() now takes care of that.
13558
13559 2005-05-18  Martin Baulig  <martin@ximian.com>
13560
13561         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13562         a loop and may leave it, reset the barrier; fixes #74974.
13563
13564 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13565         
13566         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13567         is back.
13568         
13569         * cs-parser.jay: Catch more lexical errors.
13570         
13571         * report.cs: Add one more Error method.
13572         
13573         * rootcontext.cs,
13574         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13575
13576 2005-05-17  Martin Baulig  <martin@ximian.com>
13577
13578         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13579         #70970. 
13580
13581 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13582
13583         Fix test-382.cs.  Emit values of decimal constants.
13584         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13585         Carved out of ...
13586         (TypeContainer.AddField): ... this.
13587         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13588         with initializers to include 'Const's.
13589         (ClassPart.RegisterFieldForInitialization): Forward to
13590         PartialContainer.
13591         * const.cs (Const.Const): Pass initializer to base class.
13592         (Const.Define): In case of decimal constants, register them for
13593         initialization in a static constructor.
13594
13595 2005-05-14  Martin Baulig  <martin@ximian.com>
13596
13597         * statement.cs (Block.Resolve): Correctly handle unreachable code;
13598         do not call ResolveUnreachable() on unreachable statements in
13599         here, see the comment in the source code.
13600
13601 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13602
13603         Fix #74934.
13604         * expression.cs (BinaryResolveOperator): If one of the operands of
13605         an equality comparison is 'null' and the other is a pointer type,
13606         convert the null to a NullPointer.
13607         * convert.cs (ImplicitReferenceConversion): If the expression is a
13608         NullLiteral and the target type is a pointer type, return a
13609         NullPointer instead.
13610         (ImplicitConversionStandard): Likewise.
13611
13612 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
13613         
13614         * cs-parser.jay: Set readonly context based on special constructs.
13615         
13616         * expression.cs (LocalVariableReference.DoResolveBase): Improved
13617         readonly variable error handling.
13618         
13619         * rootcontext.cs (EmitCode): Don't verify members when error
13620         occurred.
13621         
13622         * statement.cs (LocalInfo): Add reaodnly context information.
13623         (SetReadOnlyContext, GetReadOnlyContext): New methods.
13624
13625 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13626
13627         * statement.cs (Block.Resolve): Revert change below.  Modify fix
13628         for #74041 to initialize 'resolved' to false only for explicit
13629         blocks.  Fixes #74873.
13630
13631 2005-05-12  Raja R Harinath  <harinath@gmail.com>
13632
13633         Fix #74920.
13634         * typemanager.cs (unmanaged_enclosing_types): New.
13635         (IsUnmanagedType): Avoid infloops by using
13636         'unmanaged_enclosing_types' to talk with recursive invocations.
13637
13638 2005-05-13  Martin Baulig  <martin@ximian.com>
13639
13640         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
13641         instance variable, not a local.  Fix #74873.
13642         (Block.ResolveUnreachable): Set it to true here.
13643
13644 2005-05-11  Duncan Mak  <duncan@novell.com>
13645
13646         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
13647         continuing to process for 'arg'.
13648         (handle_preprocessing_directive): Check the argument of the #endif
13649         directive and report error CS1025 if there are any trailing
13650         characters.
13651
13652         According to the C# spec, having even whitespace after the #endif
13653         directive is illegal; however, because we call arg.TrimEnd ()
13654         beforehand, we have the same behavior as csc, allowing whitespace
13655         after the directive.
13656
13657         Fixes #74892.
13658
13659 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
13660
13661         Fix #74863.
13662         
13663         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
13664         (Constructor.GetObsoleteAttribute): Implemented correctly.
13665
13666 2005-05-10  Martin Baulig  <martin@ximian.com>
13667
13668         * support.cs (ReflectionParameters.ParameterModifier): Use
13669         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
13670         and `ParameterAttributes.In'.  Fixes #74884.
13671
13672 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
13673
13674         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
13675         
13676         * expression.cs (Argument.GetParameterModifier): Turned to property.
13677         (Invocation.Error_InvalidArguments): Add more descriptive errors.
13678         
13679         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
13680         its C# equivalent.
13681         
13682 2005-05-09  Raja R Harinath  <rharinath@novell.com>
13683
13684         Fix #74852.
13685         * decl.cs (MemberCache.AddMethods): Register override methods,
13686         rather than non-override methods.
13687         * typemanager.cs (RegisterOverride): New.
13688         (IsOverride): Update.
13689
13690 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
13691
13692         Fix #73105.
13693         
13694         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
13695         recursive declaration.
13696         
13697         * statement.cs (Block.ResolveMeta): Report any error in resolving.
13698         
13699 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
13700
13701         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
13702         
13703         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
13704
13705 2005-05-05  Raja R Harinath  <rharinath@novell.com>
13706
13707         Fix #74797.
13708         * decl.cs (DeclSpace.FamilyAccessible): 
13709         Use TypeManager.IsNestedFamilyAccessible.
13710
13711         Fix reopened #64812.
13712         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
13713         internal'.
13714
13715 2005-05-04  Raja R Harinath  <rharinath@novell.com>
13716             Abin Thomas  <projectmonokochi@rediffmail.com>
13717             Anoob V E  <projectmonokochi@rediffmail.com>
13718             Harilal P R  <projectmonokochi@rediffmail.com>
13719
13720         Fix #64812.
13721         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
13722         allow access to all static members.
13723
13724 2005-05-04  Martin Baulig  <martin@ximian.com>
13725
13726         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
13727
13728 2005-05-04  Martin Baulig  <martin@ximian.com>
13729
13730         Fix #74655.
13731
13732         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
13733         section at the end; make things work if `default' is not the last
13734         section.        
13735
13736 2005-05-04  Martin Baulig  <martin@ximian.com>
13737
13738         Fix #70400.
13739
13740         * statement.cs (Switch): Replaced the `got_default' field with a
13741         `default_section' one.
13742         (Switch.CheckSwitch): Set `default_section' here.
13743         (Switch.Resolve): If we're a constant switch and the constant is
13744         not found, use the default section.
13745
13746 2005-05-03  Martin Baulig  <martin@ximian.com>
13747
13748         * expression.cs (ArrayAccess.EmitGetLength): New public method.
13749
13750         * statement.cs (Foreach.ArrayForeach): New nested class.
13751         (Foreach.TemporaryVariable): New nested class.
13752         (Foreach.EmitArrayForeach): Removed; this is now in the new
13753         ArrayForeach class.
13754
13755 2005-05-03  Raja R Harinath  <rharinath@novell.com>
13756
13757         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
13758         more conservative.
13759         (VerifyPendingMethods): Revert change below.
13760
13761         * typemanager.cs (IsOverride, RegisterNonOverride): New.
13762         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
13763         that used to trigger warning -28.  Remove warning -28.
13764         * expression.cs (Invocation.OverloadResolve): Use
13765         TypeManager.IsOverride to distinguish override methods.
13766
13767         Fix #74773.
13768         * pending.cs (VerifyPendingMethods): If a base type implements the
13769         requested interface, don't bother checking individual methods of
13770         the base type.  As a side-effect, this prevents the creation of
13771         unnecessary proxies.
13772
13773 2005-05-02  Martin Baulig  <martin@ximian.com>
13774
13775         Fix #70182.
13776
13777         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
13778         Also `And' the locals if the old vector is null.
13779         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
13780         null; in this case we basically reset all the variables.        
13781
13782 2005-05-02  Martin Baulig  <martin@ximian.com>
13783
13784         Fix #74529.
13785
13786         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
13787         Added `FlowBranching branching' argument; always `and' the
13788         variables instead of `or'ing them unless we're an infinite loop.
13789
13790         * statement.cs (While.Resolve): Create a new sibling unless we're
13791         infinite.       
13792
13793 2005-05-02  Martin Baulig  <martin@ximian.com>
13794
13795         Fix #70140.
13796
13797         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
13798         arguments; use it instead of creating a new TopLevelBlock.
13799         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
13800         our ConstructorInitializer.
13801
13802         * statement.cs
13803         (TopLevelBlock.TopLevelBranching): New public property.
13804         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
13805         and create our `TopLevelBranching'.
13806
13807         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
13808         anonymous method host, use `block.TopLevelBranching' rather than
13809         creating a new branching.
13810
13811 2005-04-20  Miguel de Icaza  <miguel@novell.com>
13812
13813         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
13814         a ScopeInfo, if any of the current children is a child of the new
13815         entry, move those children there.
13816
13817 2005-04-30  Martin Baulig  <martin@ximian.com>
13818
13819         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
13820         at the beginning of a SwitchSection.  Fix #73335.
13821
13822 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
13823
13824         Fix #74378
13825         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
13826         
13827         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
13828         (FieldExpr.DoResolve): Obsolete members are ignored for field
13829         initializers.
13830         
13831 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
13832
13833         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
13834         of arrays detection.
13835
13836         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
13837         verification.
13838         (Field.VerifyClsCompliance): Volatile fields are not compliant.
13839
13840         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
13841         arrays report.
13842
13843 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
13844
13845         * cs-parser.jay: Use the prefered version of -unsafe in error
13846         message.
13847
13848 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
13849
13850         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
13851         circumstances.
13852
13853 2005-04-20  John Luke  <john.luke@gmail.com>
13854
13855         * driver.cs: fix typo in error message, --outout to --output
13856
13857 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
13858
13859         * codegen.cs (InRefOutArgumentResolving): New field.
13860         
13861         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
13862         fields outside contructor.
13863         
13864         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
13865         
13866 2005-04-19  Miguel de Icaza  <miguel@novell.com>
13867
13868         * anonymous.cs (CaptureContext.EmitParameterInstance): The
13869         parameter code was not completed ever, so it was not as up-to-date
13870         as local variables.  Must finish it.
13871
13872         The bug fix was to compare the Toplevel of the block, not the
13873         current block.  Thanks for Ben for pointing this out. 
13874
13875 2005-04-19  Raja R Harinath  <rharinath@novell.com>
13876
13877         * decl.cs (AddMethods): Use the declaring type of the problem
13878         method to determine if we want to squash a warning.
13879
13880 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
13881
13882         * attribute.cs: Removed debug output.
13883
13884         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
13885         
13886         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
13887         Report.Stderr.
13888         
13889 2005-04-18  Raja R Harinath  <rharinath@novell.com>
13890
13891         Fix #74481.
13892         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
13893         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
13894         all null comparisons against reference types.
13895
13896 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
13897
13898         Fix# 74565
13899         * class.cs (TypeContainer.CircularDepException) New nested
13900         exception class.
13901         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
13902         (TypeContainer.DefineType): Removed error, reset InTransit before
13903         exit.
13904         (Class.DefineType): Throw exception when is in Transit.
13905         Catch exception and report error.
13906         (Struct.DefineType): Throw exception when is in Transit.
13907         Catch exception and report error.
13908         (Interface.DefineType): Throw exception when is in Transit.
13909         Catch exception and report error.
13910
13911         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
13912         handle nested exception handlers.
13913
13914         * flowanalysis.cs (InTryWithCatch): New method, search for try with
13915         a catch.
13916
13917         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
13918         InFinally and InCatch storage.
13919
13920         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
13921         (Catch.Resolve): Set and Restore ec.InCatch.
13922         (Try.Resolve): Set and Restore ec.InFinally.
13923         (Try.HasCatch): True when try has catch.
13924
13925 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
13926
13927         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
13928           for the same event member, so exclude such cases from warning 419.
13929           Fixed bug #74633.
13930
13931 2005-04-16  Miguel de Icaza  <miguel@novell.com>
13932
13933         * expression.cs (Binary.ResolveOperator): Apply patch from John
13934         Luke to fix bug 59864: operators &, | and ^ on enumerations
13935         require that the same enum type on both sides.
13936
13937         * driver.cs: Add warnings to old flag usage, this is to assist
13938         people who produce Makefiles and hope that the Makefiles will be
13939         used on Windows.
13940
13941         * class.cs (TypeContainer.EmitType): Moved the definition of the
13942         special $PRIVATE$ field from the resolve phase to the Emit phase.
13943         During resolve we do not know if we are a struct with
13944         HasExplicitLayout, we know this only after the attributes for the
13945         type are emitted.
13946
13947         Set the FieldOffset to zero on the dummy field that we create for
13948         the class.   Fixes 74590.
13949
13950 2005-04-16  Raja R Harinath  <rharinath@novell.com>
13951
13952         Fix #73834.
13953         * ecore.cs (PropertyExpr.resolved): New.
13954         (DoResolve): Use it to handle a case of double resolution here.
13955         Handle a case of identical-name-and-type-name.
13956         * expression.cs (ArrayCreation.CheckIndices): Avoid double
13957         resolution by storing the results of expression resolution back
13958         into the "probes" array.
13959
13960 2005-04-15  Raja R Harinath  <rharinath@novell.com>
13961
13962         Fix cs0208-7.cs and cs0208-8.cs.
13963         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
13964         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
13965         error reporting to point out the reason a struct is not unmanaged.
13966
13967 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
13968
13969         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
13970           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
13971
13972 2005-04-13  Raja R Harinath  <rharinath@novell.com>
13973
13974         Fix #74528.
13975         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
13976         IdenticalNameAndTypeName here.
13977         (EventExpr.InstanceResolve): Likewise.
13978
13979 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
13980
13981         C# 2.0 DefaultCharSetAttribute implementation
13982         
13983         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
13984         which allows us to set GlobalNamespace for every resolve.
13985         (Attribute.ResolveArguments): Cut from Resolve.
13986         (Attribute.GetCharSetValue): Returns CharSet named argument.
13987         (Attribute.DefinePInvokeMethod): Gets default charset from
13988         module settings.
13989         (GlobalAttribute.ResolveAsTypeStep): Override.
13990         (GlobalAttribute.ResolveArguments): Override.
13991         
13992         * class.cs (TypeAttr): Is protected.
13993         
13994         * codegen.cs (ModuleClass.DefaultCharSet): New member.
13995         (ModuleClass.DefaultCharSetType): New memeber.
13996         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
13997         
13998         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
13999         charset from module.
14000         
14001         * delegate.cs (TypeAttr): Override.
14002         (Delegate.DefineType): Use this TypeAttr.
14003         
14004         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14005         at very early stage (before types are defined) to resolve model
14006         module attributes. It will probably not work with corlib but it
14007         should be ok.
14008         
14009         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14010         charset from module.
14011         
14012         * typemanager.cs (default_charset_type): New type.
14013
14014 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14015
14016         * decl.cs (MemberCache.AddMethods): Don't warn if
14017         System.Object.Finalize has buggy MethodAttributes.
14018
14019         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14020         removed below.
14021
14022 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14023
14024         * doc.cs : detect ambiguous reference to overloaded members.
14025           Fixed bug #71603. MS 1.1 csc does not detect it.
14026
14027 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14028
14029         * doc.cs : delegates must not be referenced with parameters.
14030           Fixed bug #71605.
14031
14032 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14033
14034         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14035
14036 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14037
14038         * driver.cs (MainDriver): Stop processing if the CLS stage found
14039         errors. 
14040
14041         (CompilerCallableEntryPoint.InvokeCompiler): Always
14042         reset after execution;   Take a TextWriter argument for the
14043         output.
14044
14045         * report.cs: Use the error stream instead of hardcoding stderr. 
14046
14047 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14048
14049         * class.cs: Reduce code paths to test, too small of an
14050         optimization to make it worth the extra testing.  Always perform
14051         it. 
14052
14053 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14054
14055         Fix #74510.
14056         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14057         operators that had errors reported on them.
14058
14059 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14060
14061         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14062         argument types.
14063         (Attribute.Resolve): Add named argument type checking.
14064         
14065         * class.cs (FixedField.Define): Use IsPrimitiveType
14066         
14067         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14068         
14069         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14070         unsafe parameter types.
14071         
14072         * statement.cs (Using.ResolveExpression): Add better error description.
14073         
14074         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14075         
14076 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14077
14078         Fix #74484.
14079         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14080         AttributeUsageAttribute in the emitcontext of the attribute class,
14081         not in the emitcontext of the attributable entity it was attached to.
14082         * cs-parser.jay: Use 'current_class', not 'current_container',
14083         when creating a GlobalAttribute.
14084
14085 2005-04-08  Alp Toker  <alp@atoker.com>
14086
14087         * pending.cs: The fix to #58413 failed to compile methods implementing
14088         interfaces with/without params modifiers and vice versa, even though
14089         params modifiers aren't part of the signature. Make the modifier check
14090         less strict as in csc.
14091
14092 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14093             Anoob V E  <projectmonokochi@rediffmail.com>
14094             Harilal P R  <projectmonokochi@rediffmail.com>
14095
14096         Fix #58413.
14097         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14098         modifiers of pending methods.
14099         (PendingImplementation.PendingImplementation): Initialize it.
14100         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14101         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14102         with ParameterData.  Add check for modifiers.
14103         * class.cs (MethodData.Define): Update to changes.
14104
14105 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14106
14107         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14108
14109 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14110
14111         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14112         property.
14113         
14114         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14115         
14116         * rootcontext.cs,
14117         * typemanager.cs: Registered RequiredAttributeAttribute.
14118         
14119 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14120
14121         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14122         Warning CS0169 is back at level 3.
14123         (IMethodData.SetMemberIsUsed): New method.
14124         
14125         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14126         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14127         
14128         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14129
14130         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14131         contants.
14132         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14133         is used.
14134         
14135         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14136         is used.
14137         
14138         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14139         to avoid the problems with nested types.
14140
14141 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14142             Anoob V.E  <projectmonokochi@rediffmail.com>
14143             Harilal P.R  <projectmonokochi@rediffmail.com>
14144             Raja R Harinath  <rharinath@novell.com>
14145
14146         Fix #73820.
14147         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14148         attribute.
14149         * typemanager (GetConstructor): Make public.
14150
14151 2005-04-05  John Luke  <john.luke@gmail.com>
14152             Raja R Harinath  <rharinath@novell.com>
14153
14154         Fix #62232.
14155         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14156         struct too.  Return false quicker in a few cases.
14157         (VerifyUnManaged): Use it.
14158
14159 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14160
14161         Fix #74041.
14162         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14163         not 'unreachable_seen'.
14164
14165 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14166
14167         * attribute.cs (Attribute.GetValue): Removed unused.
14168         
14169         * codegen.cs (CodeGen.TrimExt): Removed unused.
14170         
14171         * cs-parser.jay (output): Removed unused.
14172         
14173         * cs-tokenizer.cs (hex_digits): Removed unused.
14174         
14175         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14176         
14177         * expression.cs (Indirection.LoadExprValue): Removed unused.
14178         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14179         
14180         * iterators.cs (Iterator.param_types): Removed unused.
14181         
14182         * statement.cs (Goto.block): Removed unused.
14183         (ToplevelBlock.did): Removed unused.
14184         (Switch.ResolveConstantSwitch): Removed unused.
14185
14186 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14187
14188         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14189         resetting thingy.
14190
14191 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14192
14193         Fix #74232 and cs0208-3.cs.
14194         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14195         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14196         unmanaged type.  Don't use FieldBuilders when 't' is a
14197         TypeBuilder.  Use ModFlags and MemberType fields.
14198         * class.cs (MemberBase.member_type): Rename from MemberType.
14199         (MemberBase.MemberType): New property.  Determines member_type on
14200         demand.
14201         (MemberBase.DoDefine): Don't initialize MemberType here.
14202         (FieldMember.Define): Likewise.
14203
14204 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14205
14206         Fix #74241
14207         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14208         Attributes are emitted there.
14209         
14210 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14211
14212         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14213         keyword in 'partial enum' too.
14214         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14215         is not allowed).
14216         Report from Kamil Skalski <nazgul@omega.pl>.
14217
14218         Fix #74309.
14219         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14220         have partial containers too.
14221
14222         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14223         in block' checks to Block.CheckInvariantMeaningInBlock.
14224         * statement.cs (Block.GetKnownVariableInfo): Make private.
14225         (Block.IsVariableUsedInChildBlock): Remove.
14226         (Block.IsVariableUsedInBlock): Likewise.
14227         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14228         conflicting declaration.
14229         (Block.AddVariable): Make error messages less long-winded and more
14230         specific.  Show location of conflicting declaration.
14231         * parameter.cs (Parameters.Location): New readonly property.
14232
14233 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14234
14235         Clean up semantics of invoking ResolveMemberAccess.
14236         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14237         can have an instance, ensure that we pass in a non-TypeExpression
14238         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14239         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14240         argument.  Update to changes and simplify.
14241         (FieldExpr.Emitinstance): Remove CS0120 check.
14242         (PropertyExpr.EmitInstance): Likewise.
14243         * expression.cs (Argument.Resolve): Likewise.
14244         (Invocation.DoResolve): Update to changes in semantics of
14245         InstanceExpression.
14246
14247 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14248
14249         Fix #74241
14250         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14251         customization.
14252         
14253         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14254
14255 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14256
14257         Fix difference in behaviour with commandline invocation.
14258         * driver.cs (Driver.Reset): New.
14259         (CompilerCallableEntryPoint): Call it.
14260
14261         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14262         variable" warnings if the boolean expression failed to resolve.
14263
14264 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14265
14266         * attribute.cs: Fix the union of several permissions when some of them
14267         are unrestricted (so the result isn't an unrestricted permission set).
14268         Fix #74036.
14269
14270 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14271
14272         * ecore.cs (MemberExpr): New class.  Convert from interface
14273         IMemberExpr.
14274         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14275         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14276         error checks.
14277         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14278         (MethodGroupExpr.IsExplicitImpl): Remove.
14279         (Expression.GetFieldFromEvent): Remove.
14280         (SimpleName.MemberStaticCheck): Remove.
14281         (SimpleName.DoSimpleNameResolve): Update to changes.
14282         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14283         (MemberAccess.IdenticalNameAndTypeName): Remove.
14284         (MemberAccess.error176): Move to MemberExpr.
14285         (MemberAccess.DoResolve): Update to changes.
14286         (BaseAccess.DoResolve): Likewise.
14287
14288 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14289
14290         C# 2.0 Conditional attribute class implementation
14291         
14292         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14293         Analyzes class whether it has attribute which has ConditionalAttribute
14294         and its condition is not defined.
14295         
14296         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14297         (Class.IsExcluded): New method. Search for at least one defined
14298         condition in ConditionalAttribute of attribute class.
14299
14300 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14301
14302         * ecore.cs (PropertyExpr): Derive from Expression, not
14303         ExpressionStatement.
14304         (PropertyExpr.EmitStatement): Remove.
14305
14306 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14307
14308         Fix #74060.
14309         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14310         internal field "value__" of an enum be private.  The examples for
14311         "value__" that I found on MSDN all used FieldAttributes.Private.
14312
14313         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14314         Don't mention IL method attribute names.
14315
14316         Fix #47991.  Remove a TODO.
14317         * statement.cs (Block.Toplevel): Make into a field.
14318         (Block.Parameters): Move into ToplevelBlock.
14319         (Block.known_variables): Rename from child_variable_names.
14320         (Block.Block): Remove variants that take Parameters.  Initialize
14321         'Toplevel' with the immediately surrounding toplevel block.
14322         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14323         LocalInfo parameter.
14324         (Block.GetKnownVariableInfo): New.
14325         (Block.IsVariableNameUsedInChildBlock): Update.
14326         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14327         the block, even though it may not be in scope.
14328         (Block.AddVariable): Remove Parameters parameter.  Use
14329         Toplevel.Parameters instead.
14330         (Block.AddConstant): Remove Parameters parameter.
14331         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14332         (Block.IsParamaterReference): Likewise.
14333         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14334         (ToplevelBlock.Parameters): New.  Moved from Block.
14335         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14336         initialize Parameters to a non-null value.
14337         * cs-parser.jay: Update to changes.
14338         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14339         simple names that mean different things in the same block.  Use
14340         Block.IsVariableNameUsedInBlock.
14341
14342 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14343
14344         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14345         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14346         GetTypeHandle.  It is possible for a reflected type to derive from
14347         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14348         System.Array during mscorlib compilation).
14349         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14350         contain a method_hash, don't create one either.  Don't create a
14351         deep copy of the base cache's method_hash.
14352         (MemberCache.SetupCache): Rename back from DeepCopy.
14353         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14354         already initialized.  If we see an override function, add its
14355         underlying base virtual function to the member_hash too.
14356
14357         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14358
14359 2005-03-26  Raja R Harinath  <harinath@acm.org>
14360
14361         Fix #73038.
14362         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14363         fails to resolve, ensure that the LHS is still resolved as an
14364         lvalue.
14365
14366 2005-03-25  Raja R Harinath  <harinath@acm.org>
14367
14368         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14369         ec.ContainerType.
14370         (Enum.current_ec): Remove.
14371         (Enum.LookupEnumValue): Remove EmitContext argument.
14372         Just uses the one created during DefineType.
14373         (Enum.FindMembers): Update.
14374         * expression.cs (MemberAccess.DoResolve): Update.
14375
14376 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14377
14378         * assign.cs (Assign.DoResolve): Check for CS1717 when
14379         source and target are same (uses Equals).
14380
14381         * expression.cs (LocalVariableReference, ParameterReference,
14382         This): Implemented Equals, GetHashCode.
14383
14384         * statement.cs (Block.GetParameterReference): Removed useless
14385         local variable.
14386
14387 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14388
14389         Fix cs0128.cs
14390         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14391         blocks before deciding whether the error is cs0136 or cs0128.
14392
14393         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14394         (using_alias_directive, using_namespace_directive): Pass
14395         MemberName, not an expression to Namespace.UsingAlias and
14396         Namespace.Using.
14397         (MakeName): Use the MemberName of the namespace.
14398         * namespace.cs (Namespace.MemberName): New.
14399         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14400         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14401         Likewise.
14402         * decl.cs (MemberName.Name): Make readonly.
14403         (MemberName.FromDotted): New "constructor".
14404         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14405         (MemberCore.Name): Compute from MemberName on demand.
14406         (MemberCore.SetMemberName): Provide a way to change the
14407         MemberName.
14408         (MemberCore.AddToContainer): Don't take a fullname parameter.
14409         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14410         fully qualified name of the container to the member name.
14411         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14412         only if the type is a member of the root container.
14413         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14414         MemberName.Left rather than searching for an embedded ".".
14415         (PartialContainer.CreatePart): Update to changes in RootContext.
14416         (MemberBase.ShortName): Turn into a property.  Use
14417         MemberCore.SetMemberName.
14418         (MemberBase.ExplicitInterfaceName): Remove.
14419         (MemberBase.UpdateMemberName): Remove.
14420         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14421         (PropertyBase.SetMemberName): New override.
14422         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14423         (Tree.GetDecl): New.
14424         (Tree.AllDecls): Rename from Decls.
14425         * attribute.cs, enum.cs, report.cs: Update to changes.
14426         * driver.cs (MainDriver): Use MemberName.FromDotted on
14427         RootContext.MainClass.
14428
14429 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14430
14431         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14432         checks.
14433
14434         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14435
14436 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14437
14438         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14439         property accessor modifiers.
14440
14441         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14442         fixed buffer attribute (CS1716).
14443         (PropertyMethod.HasCustomAccessModifier): When property accessor
14444         has custom modifier.
14445
14446         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14447         modifiers.
14448         (PropertyExpr.DoResolveLValue): Add CS0272.
14449
14450 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14451
14452         * convert.cs: When converting to a pointer, use the proper Conv.U
14453         or Conv.I depending on the source data type.
14454
14455         * cs-tokenizer.cs: Make the size for large decimal constants,
14456         fixes #72957.
14457
14458 2005-03-17  Martin Baulig  <martin@ximian.com>
14459
14460         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14461         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14462
14463 2005-03-17  Martin Baulig  <martin@ximian.com>
14464
14465         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14466         to bool so we can return an error condition.
14467         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14468         returned an error.
14469
14470 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14471
14472         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14473         attributes.
14474
14475 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14476
14477         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14478         Refactor to avoid traversing the list of assemblies, and to avoid
14479         string concatenation.
14480         * typemanager.cs (guid_attr_type): Remove.
14481         (negative_hits, pointers, references): Remove hashes.
14482         (type_hash): New.
14483         (GetConstructedType): New.  Uses type_hash to handle constructed
14484         types (arrays, references, pointers).
14485         (GetReferenceType, GetPointerType): Use it.
14486         (GetNestedType): New.  Uses type_hash to handle nested types of
14487         reflected types.
14488         (LookupType, LookupTypeDirect): Remove.
14489         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14490         'types' hash and LookupTypeReflection directly.
14491         (params_string, params_object): Use GetConstructedType.
14492         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14493         top-level types.
14494         (Namespace.Lookup): Use cached_types.
14495         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14496         provided by old TypeManager.LookupType.
14497         * rootcontext.cs (MakeFQN): Remove.
14498         * decl.cs (DeclSpace.MakeFQN): Likewise.
14499         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14500         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14501         TypeManager.GetConstructedType.
14502         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14503
14504 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14505
14506         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14507         indexers.
14508
14509         * cs-parser.jay: Reports CS1527 for any namespace element.
14510
14511         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14512         Added CS0407.
14513
14514         * expression.cs (ParameterReference.IsAssigned): Changed error to
14515         CS0269.
14516         (Error_WrongNumArguments): Moved CS0245 detection here.
14517
14518         * statement.cs (Return.Resolve): Add CS1622 report.
14519
14520 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14521
14522         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14523
14524 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14525
14526         * attribute.cs expression.cs: Get rid of some allocations.
14527
14528 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14529
14530         * doc.cs : just eliminate the latest change.
14531
14532 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14533
14534         * doc.cs : commented out the latest change. It breaks xml-030.cs
14535
14536 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14537
14538         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14539           fail. So invoke CreateType() in FindDocumentedType().
14540
14541 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14542
14543         * cs-tokenizer.cs : added IsKeyword().
14544         * doc.cs : Detect keyword incorrectly used as identifier.
14545           Allow identifiers prefixed by @.
14546
14547 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14548
14549         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14550         It caused exception in namespace resolving (again!).
14551         
14552         * class.cs (Class.ctor): Removed exit.
14553         (PropertyMethod.ctor): ditto.
14554         
14555         * codegen.cs (Codegen.Reset): Reset static data.
14556         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14557         
14558         * cs-tokenizer.cs (Cleanup): Removed.
14559         
14560         * driver.cs (GetSystemDir): Rewrote to one line command.
14561         It caused problem with unloaded dynamic modules.
14562         (UnixParseOption): Removed Exit.
14563         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14564         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14565         Now can be mcs used as library.
14566         
14567         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14568         empty location.
14569         
14570         * location.cs (Reset): Reset static data.
14571         
14572         * namespace.cs (Reset): Reset static data.
14573         
14574         * report.cs (Report.Reset): Reset static data.
14575         
14576         * rootcontext.cs (RootContext.Reset): Reset static data.
14577         
14578         * tree.cs (RootTypes.ctor): Use Location.Null
14579         
14580         * typemanager.cs (TypeManager.Reset): Reset static data.
14581         (CoreLookupType): Removed Exit.
14582         (TypeHandle.Reset): Reset static data.
14583         
14584 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14585
14586         Fix #73516.
14587         * typemanager.cs (ComputeNamespaces): Import namespaces from
14588         referenced modules too.
14589
14590 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14591
14592         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
14593         than '.'.
14594
14595 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14596
14597         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
14598         enclosing DeclSpace.  This ensures that a name-lookup populates
14599         more caches and there are fewer 'TypeExpression's.  Carve out
14600         nested type lookup into ...
14601         (LookupNestedTypeInHierarchy): ... this.
14602
14603 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14604
14605         Clean up a few partial-class semantics.  
14606         Fixes test-357.cs and cs1618-2.cs.
14607         * cs-parser.jay (struct_declaration): Use 'current_class' as
14608         parent of newly-created struct.  Remove call to Register ().
14609         Use 'pop_current_class' to complete handing the current struct.
14610         (interface_declaration): Likewise.
14611         (class_declaration): Likewise.
14612         (enum_declaration): Use 'current_class' as parent of newly created
14613         enum.
14614         (delegate_declaration): Likewise.
14615         (pop_current_class): New function.  This is used to handle closing
14616         up the 'current_class' and 'current_container', and pointing them
14617         to the enclosing class/container.
14618         (CSharpParser): Initialize 'current_class' too.
14619         * decl.cs (MemberCore): Add check for invariant: a partial
14620         container is not a parsed entity, and thus does not enclose any
14621         parsed members.
14622         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
14623         (DeclSpace.BaseTypeExpr): Use it.
14624         (DeclSpace.LookupType): Add check for invariant.
14625         * class.cs (TypeContainer): Add check for invariant: a nested
14626         class should have the same NamespaceEntry as its enclosing class.
14627         (TypeContainer.EmitFieldInitializers): Make virtual.
14628         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
14629         MemberCore.
14630         (TypeContainer.Register): Remove.
14631         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
14632         null.  Use TypeResolveEmitContext for resolving base types and
14633         interfaces.  Move initialization of Parts.TypeBuilder here from
14634         ...
14635         (TypeContainer.DefineNestedTypes): ... here.
14636         (PartialContainer): Take a Namespace not a NamespaceEntry.
14637         (PartialContainer.Create): Don't use Register.  Call the
14638         appropriate Add... function directly.
14639         (ClassPart): Take both the PartialContainer and the enclosing
14640         class as constructor arguments.
14641         (ClassPart.EmitFieldInitializers): Override.
14642         (ClassPart.PartFindNestedTypes): Remove.
14643         (FieldBase.GetInitializerExpression): Resolve the initializer
14644         expression in the emit context of the enclosing class.
14645         * tree.cs (RootTypes): Remove Register ().
14646         
14647 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
14648
14649         * cs-parser.jay: Removed CS0134.
14650         
14651         * driver.cs: Removed CS1901.
14652         
14653         * expression.cs (SizeOf.DoResolve): Don't report CS0233
14654         for predefined types.
14655
14656 2005-03-07  Duncan Mak  <duncan@novell.com>
14657
14658         * codegen.cs (Save):  Catch UnauthorizedAccessException as
14659         well. Fixes bug #73454.
14660
14661 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
14662
14663         * cs-tokenizer.cs (xtoken): Add CS1035.
14664         
14665         * class.cs (MethodData.Define): Add CS0683.
14666         (FieldMember.ctor): Add CS0681.
14667
14668 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14669
14670         * ecore.cs (SimpleName.DoResolve): Rename from
14671         SimpleName.DoResolveAllowStatic.
14672         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
14673         Pass 'intermediate' flag to MemberStaticCheck.
14674         (SimpleName.MemberStaticCheck): Skip "static check" only in case
14675         of "intermediate" lookups via MemberAccess.
14676         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
14677         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
14678
14679 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14680
14681         Fix #73394.
14682         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
14683         slipped in because of variable names that are identical to a
14684         builtin type's BCL equivalent ('string String;', 'int Int32;').
14685         (PropertyExpr.EmitInstance): Likewise.
14686
14687 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
14688
14689         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
14690         
14691         * report.cs (warning_ignore_table): Made public.
14692
14693 2005-03-04  Raja R Harinath  <rharinath@novell.com>
14694
14695         Fix #73282.
14696         * class.cs (MethodData.Emit): Pass 'container' to
14697         container.GetObsoleteAttribute instead of 'container.Parent'.
14698
14699 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
14700
14701         * cs-parser.jay: Add 1534 error test.
14702
14703         * iterators.cs (Yield.CheckContext): Add error 1629.
14704         (Iterator.ctor): Save unsafe modifier.
14705         (MoveNextMethod.DoEmit): Restore unsafe context.
14706
14707         * namespace.cs (UsingAlias): Better error message.
14708
14709 2005-03-03  Dan Winship  <danw@novell.com>
14710
14711         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
14712         the warning message [#73219]
14713
14714 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14715
14716         Fix compile with MCS 1.0.0.0.
14717         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
14718         w_restore to not depend on string constant folding.
14719
14720 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14721
14722         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
14723         CS0246 check to users who passed 'silent = false'.
14724         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
14725         check.
14726         (SimpleName.SimpleNameResolve): Update.
14727         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
14728         (MemberAccess.IdenticalNameAndTypeName): Update.
14729         * doc.cs (FindDocumentedTypeNonArray): Update.
14730
14731 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
14732
14733         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
14734         * parameters.cs (ComputeAndDefineParameters): Remove.
14735         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
14736         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
14737         Use GetParameterInfo.
14738
14739 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
14740
14741         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
14742
14743 2005-03-02  Raja R Harinath  <rharinath@novell.com>
14744
14745         Unify DeclSpace.LookupType and DeclSpace.FindType.
14746         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
14747         is in charge of defining nested types on demand.
14748         (DeclSpace.LookupType): Use it when the current_type is a
14749         TypeBuilder.  Use LookupTypeDirect for reflected types.
14750         (DeclSpace.FindType): Remove.
14751         (DeclSpace.LookupInterfaceOrClass): Likewise.
14752         (DeclSpace.DefineTypeAndParents): Likewise.
14753         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
14754         DeclSpace.LookupType.
14755         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
14756         * typemanager.cs (LookupType): Simplify.
14757         (AddUserType): Remove type from negative_hits.
14758         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
14759         * class.cs (TypeContainer.FindMembers): Move handling of nested
14760         types ...
14761         (TypeContainer.FindMembers_NestedTypes): ... here.
14762         (TypeContainer.FindNestedType): Implement override.
14763         (ClassPart.FindNestedType): Delegate to PartialContainer.
14764         (ClassPart.PartFindNestedType): Looks up the nested types of the
14765         part alone.
14766
14767 2005-03-02  Martin Baulig  <martin@ximian.com>
14768
14769         * class.cs (TypeContainer.DoDefineMembers): We also need a default
14770         static constructor in static classes.
14771
14772 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
14773
14774         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
14775         sizeParamIndex is not specified.
14776
14777 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
14778
14779         Fix #73117
14780         * report.cs (WarningMessage.IsEnabled): Missing null check.
14781
14782 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14783
14784         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
14785         in the fields and not in the properties.
14786
14787 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
14788
14789         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
14790         fields as well.
14791
14792 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14793
14794         * attribute.cs: Small refactoring (improved robustness).
14795         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
14796         (ValidateGuid): Removed.
14797         (Resolve): Removed referenced to above mentioned.
14798         (GetAttributeUsage): Made private and changed to work without
14799         class assistance.
14800         (GetIndexerAttributeValue): Don't crash.
14801         (GetConditionalAttributeValue): Ditto.
14802         (GetClsCompliantAttributeValue): Ditto.
14803         (ExtractSecurityPermissionSet): All attributes exceptions are
14804         error 648.
14805         (GetPropertyValue): New helper.
14806         (GetMethodImplOptions): New method.
14807         (DefinePInvokeMethod): Reuse common code. Implemented handling of
14808         some missing properties.
14809         
14810         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
14811         (Method.ApplyAttributeBuilder): Updated.
14812         
14813         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
14814         exception.
14815
14816 2005-02-28  Raja R Harinath  <rharinath@novell.com>
14817
14818         Fix #73052.
14819         * report.cs (Report.SymbolRelatedToPreviousError): Handle
14820         non-simple types (array, pointer, reference).
14821
14822 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14823
14824         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
14825
14826         * class.cs (MethodCore.IsDuplicateImplementation): Special error
14827         for operators.
14828         (Method.CheckBase): Catch wrong destructor here.
14829         (MethodData.Define): Add errors 550, 668.
14830
14831         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
14832
14833         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
14834
14835         * pending.cs (VerifyPendingMethods): Add error 551.
14836
14837         * typemanager.cs (CSharpName): Next error report helper.
14838
14839 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
14840
14841         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
14842         attributes. Removed useless attribute double check.
14843         It saves almost 2MBs for corlib.
14844
14845 2005-02-25  Raja R Harinath  <rharinath@novell.com>
14846
14847         Fix #72924.
14848         * statement.cs (ExpressionStatement.Resolve): Make robust to being
14849         called twice in case of error.
14850
14851 2005-02-23  Chris Toshok  <toshok@ximian.com>
14852
14853         Fix compiler portions of #72827.
14854         * statement.cs (Block.Emit): call Begin/EndScope on the
14855         EmitContext instead of the ILGenerator.
14856
14857         * codegen.cs (EmitContext.BeginScope): new method, call
14858         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
14859         we have one.)
14860         (EmitContext.BeginScope): same, but EndScope and CloseScope
14861
14862         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
14863         offset and call the superclass's OpenScope(int) with it.
14864         (SymbolWriter.CloseScope): get the current il
14865         offset and call superclass's CloseScope(int) with it.
14866
14867 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
14868
14869         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
14870         CS1677 for out and ref as well.
14871
14872         * class.cs (Method.Define): Add error CS1599 detection.
14873         
14874         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
14875         
14876         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
14877         
14878         * delegate.cs (Delegate.Define): Add error CS1599 detection.
14879         
14880         * support.cs.cs (ModifierDesc): New helper method.
14881
14882 2005-02-23  Raja R Harinath  <rharinath@novell.com>
14883             Abin Thomas  <projectmonokochi@rediffmail.com>
14884             Anoob V E  <projectmonokochi@rediffmail.com>
14885             Harilal P R  <projectmonokochi@rediffmail.com>
14886
14887         Fix #57851, #72718.
14888         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
14889         MemberLookup (used for error reporting) actually returns a result.
14890         Fix error report number (122, not 112).
14891
14892 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
14893             Anoob V E  <projectmonokochi@rediffmail.com>
14894             Harilal P R  <projectmonokochi@rediffmail.com>
14895
14896         Fix #71134.
14897         * pending.cs (PendingImplementation.GetAbstractMethods):
14898         Find NonPublic members too.
14899
14900 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
14901
14902         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
14903         Fixed error 217.
14904         
14905         * class.cs (MethodCore.CheckMethodAgainstBase):
14906         Add error 239 report.
14907
14908 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14909
14910         Fix #68955.
14911         * expression.cs (Invocation.IsApplicable): Make public.
14912         (Invocation.IsParamsMethodApplicable): Likewise.
14913         * delegate.cs (Delegate.VerifyApplicability): Don't use
14914         Invocation.VerifyArgumentCompat for parameter applicability
14915         testing.  Use Invocation.IsApplicable and
14916         Invocation.IsParamsMethodApplicable.
14917
14918 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
14919
14920         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
14921         
14922         * class.cs (Operator.Define): Add error 217 report.
14923         
14924 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14925
14926         * namespace.cs (UsingEntry.Resolve): Undo change below.
14927
14928 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14929
14930         Fix #72756.
14931         * ecore.cs (Expression.MemberLookupFailed): Add argument to
14932         disable the error message when the extended MemberLookup also
14933         fails.
14934         (Expression.MemberLookupFinal): Update.
14935         (SimpleName.DoSimpleNameResolve): Update.
14936         * expression.cs (MemberAccess.ResolveNamespaceOrType):
14937         Don't use MemberLookupFinal.
14938         (New.DoResolve): Update.
14939         (BaseAccess.CommonResolve): Update.
14940
14941 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14942
14943         Fix #72732.
14944         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
14945         occured previously, don't resolve again.
14946
14947 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
14948
14949         Fix #69949
14950         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
14951         argument. Call ResolveAttributeUsage for unresolved.
14952         when types doesn't match ctor arguments.
14953         
14954         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
14955         for nested attribute classes.
14956         (Class.attribute_usage): Removed.
14957         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
14958         for attribute class.
14959         
14960         * ecore.cs (IsAttribute): Removed.
14961         
14962         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
14963         
14964         * rootcontext.cs (RegisterAttribute): Removed, attributes are
14965         now normal types.
14966         (attribute_types): Removed.
14967         (EmitCode): Global attributes are emited as the latest.
14968
14969 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
14970
14971         * class.cs (EmitFieldInitializers): Don't emit field initializer
14972         for default values when optimilization is on.
14973         
14974         * constant.cs (Constant.IsDefaultValue): New property.
14975         
14976         * driver.cs: Add /optimize handling.
14977         
14978         * constant.cs,
14979         * ecore.cs,
14980         * literal.cs: Implement new IsDefaultValue property.
14981         
14982         * rootcontext.cs (Optimize): New field, holds /optimize option.
14983
14984 2005-02-18  Raja R Harinath  <rharinath@novell.com>
14985
14986         Fix crasher in re-opened #72347.
14987         * namespace.cs (Namespace.Lookup): Return null if
14988         DeclSpace.DefineType returns null.
14989
14990         Fix #72678.
14991         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
14992
14993 2005-02-18  Raja R Harinath  <rharinath@novell.com>
14994
14995         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
14996         now returns null if it cannot resolve to an lvalue.
14997         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
14998         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
14999         returned null.  Remove check for SimpleName.
15000         (EventExpr.DoResolveLValue): New.
15001         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15002         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15003         error from ...
15004         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15005         avoid CS0131 error.
15006         (Unary.ResolveOperator): Move CS0211 check ...
15007         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15008         CS0131 error.
15009         (Unary.DoResolveLValue): Simplify.
15010         (AddressOf.DoResolveLValue): New.
15011         (ArrayAccess.DoResolveLValue): New.
15012
15013 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15014
15015         * attribute.cs (Attribute.Resolve): Add arguments casting for
15016         when types doesn't match ctor arguments.
15017
15018 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15019
15020         Fix parts of #63202.
15021         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15022         lookup of operator in base type.  Ensure that all checks happen
15023         when the operator resolves to an "op_..." method.
15024
15025 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15026
15027         Fix #71992.
15028         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15029         'ignore_cs0104' parameter.  Pass it to ...
15030         (NamespaceEntry.Lookup): ... this.
15031         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15032         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15033         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15034         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15035         Update.  Request that cs0104 errors be ignored.
15036         (ComposedCast.ResolveAsTypeStep): Update.
15037
15038 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15039
15040         Fix #59209.
15041         * expression.cs (Invocation.BetterFunction): Remove support for
15042         comparing virtual functions and their overrides.
15043         (Invocation.IsOverride): New.
15044         (Invocation.OverloadResolve): Don't consider 'override' functions
15045         during candidate selection.  Store them in a lookaside list.
15046         If the selected method is a 'virtual' function, use the list to
15047         find any overrides that are closer to the LHS type.
15048
15049 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15050
15051         * expression.cs (New.DoResolve): Add complex core type reduction.
15052         (New.Constantify): Converts complex core type syntax like 'new int ()'
15053         to simple constant.
15054         
15055 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15056
15057         * decl.cs (EntryType.EntryType): New constructor to create an
15058         updated copy of a cache entry.
15059         (MemberCache.AddMethods): Use it.
15060         (MemberCache.ClearDeclaredOnly): Remove.
15061         (MemberCache.MemberCache): Update.
15062
15063 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15064
15065         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15066         variable.  This one is represents the actual low-level declaration
15067         of the method, as opposed to the semantic level `IsStatic'.   
15068
15069         An anonymous method which is hosted into a static method might be
15070         actually an instance method.  IsStatic would reflect the
15071         container, while MethodIsStatic represents the actual code
15072         generated.
15073
15074         * expression.cs (ParameterReference): Use the new MethodIsStatic
15075         instead of IsStatic.
15076
15077         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15078         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15079         set on the current EmitContext. 
15080
15081         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15082         resolve our casted expression as an LValue.  This triggers the
15083         proper LValue processing that is later required by Assign.
15084
15085         This fixes 72347.
15086
15087         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15088
15089 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15090
15091         C# 2.0 Fixed buffer implementation
15092
15093         * anonymous.cs: Update after RegisterHelperClass renaming.
15094
15095         * attribute.cs (AttributeTester.fixed_buffer_cache):
15096         Cache of external fixed buffers.
15097         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15098         implementation if field is fixed buffer else null.
15099
15100         * class.cs
15101         (TypeContainer.AddField): Accept FieldMember instead of Field.
15102         (FieldBase.IsFieldClsCompliant): Extracted code from
15103         VerifyClsCompliance descendant customization.
15104         (FixedField): New class handles fixed buffer fields.
15105         (FixedFieldExternal): Keeps information about imported fixed
15106         buffer.
15107         (IFixedField): Make access to internal or external fixed buffer
15108         same.
15109
15110         * cs-parser.jay: Add fixed buffer parsing.
15111
15112         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15113         buffer.
15114
15115         * expression.cs (Indirection): Extended implementation to accept
15116         fixed buffer field.
15117         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15118         (ElementAccess.MakePointerAccess): Get type as parameter.
15119         (DoResolve): Add fixed buffer field expression conversion.
15120         (DoResolveLValue): Ditto.
15121         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15122         (ArrayPtr): Derives from FixedBufferPtr.
15123         (ArrayPtr.Emit): Add extra emit for array elements.
15124
15125         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15126
15127         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15128         for compiler generated types.
15129         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15130
15131         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15132         and consume less memory.
15133         (Fixed.Resolve): Add fixed buffer case.
15134
15135         * typemanager.cs (compiler_generated_attr_ctor,
15136         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15137         (HasElementType): Add our own implementation to work on every
15138         runtime.
15139
15140 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15141
15142         * anonymous.cs (CaptureContext): Track whether `this' has been
15143         referenced.   
15144
15145         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15146         only captured `this' if it was implicitly done (instance
15147         methods/variables were used). 
15148
15149         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15150         `this' must be captured.
15151
15152 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15153  
15154         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15155         is null it means that there has been no need to capture anything,
15156         so we just create a sibling.
15157
15158         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15159
15160         Just a partial fix.  The other half is fairly elusive.
15161         
15162 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15163
15164         Fix #52586, cs0121-4.cs.
15165         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15166         and return a hashtable.
15167         (MemberCache.ClearDeclaredOnly): New.
15168         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15169         the method_hash of a base type too.
15170         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15171         type methods.  Overwrite entries with the same MethodHandle so
15172         that the ReflectedType is correct.  The process leaves in base
15173         virtual functions and their overrides as distinct entries.
15174         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15175         matters since it was boxed in a ArrayList before.
15176         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15177         modifier.
15178         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15179         case of a virtual function and its override (choose the overload
15180         as better).
15181         (Invocation.OverloadResolve): Avoid 'override' members during
15182         'applicable_type' calculation.
15183
15184 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15185
15186         Combine two near-redundant caches.
15187         * typemanager.cs (method_params): Rename from method_internal_params.
15188         (TypeManager.GetParameterData): New.  Replace
15189         Invocation.GetParameterData.
15190         (TypeManager.LookupParametersByBuilder): Remove.
15191         * expression.cs (Invocation.method_parameter_cache): Remove.
15192         (Invocation.GetParameterData): Remove.
15193         Update to changes.
15194         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15195         Update to changes.
15196
15197 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15198
15199         Fix #72015.
15200         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15201         TypeManager.multicast_delegate_type is null, resolve it by looking
15202         up "System.MulticastDelegate".
15203         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15204
15205 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15206             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15207             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15208
15209         Fix cs0164.cs.
15210         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15211         (LabeledStatement.AddReference): New.  Set 'referenced'.
15212         (Goto.Resolve): Use it.
15213
15214 2005-02-05  John Luke  <john.luke@gmail.com>
15215
15216         * driver.cs: remove duplicate -doc line in Usage ()
15217
15218 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15219
15220         * location.cs (Location.AddFile): Fix CS2002 error report.
15221
15222 2005-02-02  Martin Baulig  <martin@ximian.com>
15223
15224         * delegate.cs (Delegate.DefineType): Report an internal error if
15225         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15226         details.        
15227
15228 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15229
15230         Fix a crasher in a variant of #31984.
15231         * const.cs (Constant.CheckBase): New override that defers the
15232         new-or-override check in case the base type hasn't been populated
15233         yet.
15234         (Constant.Define): Ensure the new-or-override check is performed.
15235
15236 2005-02-01  Duncan Mak  <duncan@ximian.com>
15237
15238         * const.cs (LookupConstantValue): Check that `ce' is not null
15239         before calling GetValue ().
15240
15241 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15242
15243         Fix test-334.cs (#69519).
15244         * cs-parser.jay (using_alias_directive): Pass in an expression to
15245         NamespaceEntry.UsingAlias.
15246         (using_namespace_directive): Pass in an expression to
15247         NamespaceEntry.Using.
15248         (namespace_name): Don't flatten to a string.
15249         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15250         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15251         ResolveAsTypeStep.
15252         (NamespaceEntry.UsingEntry): Likewise.
15253         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15254         changes.
15255         (NamespaceEntry.LookupForUsing): Remove.
15256         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15257         names.
15258         (NamespaceEntry.Lookup): Remove support for dotted names.
15259
15260 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15261
15262         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15263         split into two.
15264         (NamespaceEntry.ImplicitParent): Compute on demand.
15265         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15266         parallels the current.
15267         (NamespaceEntry.LookupForUsing): Use it.
15268         (NamespaceEntry.Lookup): If the current namespace-entry is
15269         implicit, don't search aliases and using tables.
15270
15271 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15272
15273         Fix #31984.
15274         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15275         BaseCache here.
15276         (TypeContainer.BaseCache): Compute on demand.
15277         (TypeContainer.FindMembers): Define constants and types if they're
15278         not already created.
15279         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15280         check.
15281         * const.cs (Constant.Define): Make idempotent.
15282
15283 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15284
15285         * pending.cs: Produce better code (no nops produced by using Ldarg
15286         + value).
15287         
15288         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15289         i - 1' it should be arg + 1.
15290
15291         Fixes bug #71819.
15292
15293 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15294
15295         * attribute.cs (Attribute.CheckAttributeType): Make private
15296         non-virtual.
15297         (Attribute.ResolveType): Make virtual.
15298         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15299         handling of RootContext.Tree.Types.
15300
15301 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15302
15303         Update attribute-handling to use the SimpleName/MemberAccess
15304         mechanisms.
15305         * cs-parser.jay (attribute): Pass in an expression to the
15306         constructors of Attribute and GlobalAttribute.
15307         * attribute.cs (Attribute): Take an expression for the name.
15308         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15309         passed in attribute name expression.
15310         (Attribute.CheckAttributeType): Use it.
15311         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15312         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15313         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15314         argument to prevent error messages if the lookup fails.
15315
15316 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15317
15318         * expression.cs (Indirection): Implemented IVariable interface
15319         to support indirection in AddressOf operator.
15320         (PointerArithmetic.Emit): Add optimalization for case where
15321         result can be precomputed.
15322
15323 2005-01-26  Martin Baulig  <martin@ximian.com>
15324
15325         * class.cs (TypeContainer.AttributeTargets): Return the correct
15326         AttributeTargets depending on our `Kind' instead of throwing an
15327         exception; fixes #71632.
15328
15329 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15330
15331         Fix #71257
15332         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15333         constant members.
15334
15335 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15336
15337         Fix #71602.
15338         * expression.cs (MemberAccess.DoResolve): Don't complain with
15339         cs0572 when the LHS of a member access has identical name and type
15340         name.
15341
15342 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15343
15344         Fix #71651, #71675
15345         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15346         CreatePermission.
15347         Create custom PermissionSet only for PermissionSetAttribute.
15348
15349 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15350
15351         Fix #71649
15352         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15353         delegates in static class.
15354
15355 2005-01-24  Martin Baulig  <martin@ximian.com>
15356
15357         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15358         merging an implicit block, just use its reachability.
15359
15360         * statement.cs (Block.Resolve): Make the unreachable code check
15361         work wrt. implicit blocks; see test-337 from #63842.
15362
15363 2005-01-21  Alp Toker  <alp@atoker.com>
15364  
15365         * cs-parser.jay: destructor_declaration's container is PartialContainer
15366         not Class when partial types are used, so use Kind prop instead of
15367         'is'.
15368         
15369 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15370
15371         * cs-parser.jay: Improve error reporting when an interface
15372         declares new types.
15373
15374 2005-01-20  Dick Porter  <dick@ximian.com>
15375
15376         * support.cs: SeekableStreamReader fix from Sandor Dobos
15377         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15378         chars are read.  Fixes bug 70369.
15379
15380 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15381
15382         * cs-parser.jay (catch_clause): Simplify current_block handling
15383         somewhat.
15384
15385 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15386
15387         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15388         code with ImplicitStandardConversion to handle the implicit
15389         conversion of method groups into valid delegate invocations. 
15390
15391         The problem is that in parameter handling we were using this code
15392         path.  Fixes bug #64698
15393
15394 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15395
15396         * cs-parser.jay: Fix several infelicities.
15397         - Avoid assigning to the parser value stack.  Code like 
15398           '$3 = null' is unclean.  Synthesize a value for the code block
15399           instead. 
15400         - Avoid using oob_stack for storing location information.  Use ...
15401         (_mark_): ... this.  New (empty) rule.  Saves the current location
15402         in $$.
15403         (foreach_statement): Avoid using oob_stack for current_block
15404         handling.  Use technique used in for_statement and
15405         using_statement.  Synthesize a value for the code block to store
15406         additional intermediate information.
15407
15408 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15409
15410         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15411         of a different type is only allowed to private fields of a
15412         containing type, not on fields of a base class.
15413
15414         See test-174.cs and error cs0122-9.cs
15415
15416 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15417
15418         Fix test-335.cs (bug #58126).
15419         * cs-parser.jay (argument): Split out non-expression parts of the
15420         rule into 'non_simple_argument'.
15421         (invocation_expression): Support parenthesized invocations with
15422         multiple arguments, and with single non-simple arguments.
15423
15424 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15425
15426         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15427         places.
15428
15429 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15430
15431         Fix cs0038-1.cs, cs1640-6.cs.
15432         * ecore.cs (Expression.Resolve): Remove special-case for
15433         SimpleName in error-handling.
15434         (Expression.almostMatchedMembers): Relax access permission to
15435         protected.
15436         (Expression.MemberLookupFailed): Handle duplicates in
15437         almostMatchedMembers list.
15438         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15439         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15440         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15441         overload if the passed in MemberInfo is a MethodBase.
15442
15443 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15444
15445         Fix #70749
15446         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15447         for non-CAS & merge permission sets properly.
15448
15449 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15450
15451         Improve standard-compliance of simple name and member access 
15452         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15453         * ecore.cs (FullNamedExpression): New abstract base class 
15454         for Namespaces and TypeExpressions.
15455         (ResolveFlags.SimpleName): Remove.
15456         (SimpleName): Remove support for dotted names.
15457         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15458         DeclSpace.FindType and DeclSpace.LookupType.
15459         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15460         (Expression.ExprClassName): Make member function.
15461         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15462         a namespace.  Remove creation of dotted "SimpleName"s.
15463         (MemberAccess.DoResolve): Likewise.
15464         * decl.cs (DeclSpace.Cache): Make private.
15465         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15466         (DeclSpace.FindType): Update.
15467         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15468         FullNamedExpression.
15469         * namespace.cs (Namespace): Derive from FullNamedExpression
15470         so that it can be part of expression resolution.
15471         (Namespace.Lookup): Return an FullNamedExpression.
15472         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15473         namespace.
15474         * rootcontext.cs (NamespaceLookup): Remove.
15475         (LookupType): Move to DeclSpace.
15476         * attribute.cs (CheckAttributeType): Update.
15477         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15478         (FindDocumentedTypeNonArray): Likewise.
15479
15480 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15481
15482         Fix cs0509.cs, cs1632.cs.
15483         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15484         is the same as IsInterface.
15485         (TypeContainer.GetClassBases): Likewise.
15486         * statement.cs (LabeledStatement.ig): New field.
15487         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15488         label.
15489         (LabeledStatement.DoEmit): Check that the label was created with
15490         the same ILGenerator.
15491
15492 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15493
15494         Fix #71058
15495         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15496         accessors to its properties.
15497
15498         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15499         from accessors to property.
15500         
15501 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15502
15503         Fix #70722
15504         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15505         only for overrides.
15506         
15507 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15508
15509         * attribute.cs: Check for null and empty strings.  
15510
15511         I have lost another battle to Paolo.
15512
15513 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15514
15515         Fix #70942
15516         * class.cs (PropertyMethod): Set Parent field in ctors.
15517         (SetMethod.InternalParameters): Add unsafe switch hack.
15518         Override MarkForDuplicationCheck where it is appropriate.
15519
15520         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15521         It says whether container allows members with the same name.
15522         Base default is no.
15523         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15524         Removed is_method parameter.
15525
15526 2005-01-06  Duncan Mak  <duncan@ximian.com>
15527
15528         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15529         because the previous change led to incorrect reporting of CS1032
15530         ("Cannot define/undefine preprocessor symbols after first token in
15531         file"). Instead of using `tokens_seen' as the only flag that
15532         triggers CS1040, introduce `comments_seen'. This new flag is used
15533         to signify having seen comments on the current line, so it is
15534         unset after a newline.
15535
15536 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15537
15538         * doc.cs : When searching for a type, find nested type too.
15539           This fixes bug #71040.
15540
15541 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15542
15543         * doc.cs :
15544           - Warn missing member comment on those classes which also does not
15545             have doc comments. Fixed bug #71041.
15546           - Don't warn missing doc comment on default constructor.
15547             Fixed bug #71042.
15548
15549 2005-01-06  Duncan Mak  <duncan@ximian.com>
15550
15551         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15552         comments, set `tokens_seen' to true. This allows us to detect
15553         misplaced preprocessor directives (i.e. not at the beginning of
15554         the a line, nor after whitespaces). In that case, report error
15555         CS1040. This fixes bug #56460.
15556
15557         * cs-parser.jay (interface_member_declaration): Add checks for
15558         IsExplicitImpl, and report CS0541 error if an interface member is
15559         defined as an explicit interface declaration.
15560
15561 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15562
15563         Fix #70817
15564         * class.cs (PropertyMethod): Set Parent field in ctors.
15565         (SetMethod.InternalParameters): Add unsafe switch hack.
15566         
15567         * decl.cs (MemberCore.Parent): Cannot be readonly.
15568
15569 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15570
15571         * decl.cs (DeclSpace.ResolveType): Remove.
15572         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15573         Merge in code from ...
15574         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15575         * class.cs, enum.cs: Update to changes.
15576
15577 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15578
15579         * anonymous.cs: Ensure that we init the scope of our parent if it
15580         has not been initialized yet.
15581
15582 2004-12-30  Duncan Mak  <duncan@ximian.com>
15583
15584         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15585         if field.FieldBuilder is null. Fixes #70758.
15586
15587         * convert.cs: Fixed some typos and updated some of the comments.
15588         (ImplicitStandardConversionExists):
15589         (TryImplicitIntConversion): If `target_type' is an interface and
15590         the type of `ic' implements this interface, return true or a new
15591         BoxedCast instead of null. This fixes #70468.
15592
15593 2004-12-29  Duncan Mak  <duncan@ximian.com>
15594
15595         * expression.cs (Argument.Emit): Check that Expr is
15596         IMemoryLocation before casting to it, and report CS1510 otherwise.
15597
15598         This fixes #70402.
15599
15600 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15601
15602         * statement.cs (Block.ThisVariable): remove the recursion here, to
15603         make the --profile more sane.
15604
15605 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
15606
15607         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
15608         assembly, by JB Evain.
15609
15610 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15611
15612         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
15613           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
15614         "parent" refers to enclosing type/class.  "base" refers to superclass.
15615
15616 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15617
15618         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15619         Ensure that we only have GlobalAttributes.
15620         * attribute.cs (Attribute.Emit): Make non-virtual.
15621         (GlobalAttribute.Emit): Remove.
15622         (Attribute.Resolve): Make virtual.
15623         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
15624         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
15625         the argument. Don't create one.
15626         (Attribute.GetObsoleteAttribute): Likewise.
15627         (Attribute.GetClsCompliantAttributeValue): Likewise.
15628         * class.cs, decl.cs: Update to changes.
15629
15630 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
15631
15632         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
15633         
15634         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
15635         
15636         * statement.cs (Foreach.Resolve): Add error 186 report.
15637
15638 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
15639
15640         * expression.cs (Conditional.DoResolve): Add warning 429.
15641         
15642         * statement.cs (If.Resolve): Add warning 665.
15643
15644 2004-12-16  Raja R Harinath  <rharinath@novell.com>
15645
15646         New invariant: RootContext.Tree.Types.NamespaceEntry == null
15647         except when in the parser, and in GlobalAttribute.
15648         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
15649         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
15650         RootContext.Tree.Types.NamespaceEntry once work is done.
15651         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
15652         and resets RootContext.Tree.Types.NamespaceEntry.
15653
15654 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
15655
15656         * cs-parser.jay: Don't create a block for every variable.
15657
15658 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
15659
15660         * location.cs: Provide extra information.
15661
15662         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
15663         variables from the captured environment, it is the ldarg_0.
15664
15665 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15666
15667         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
15668         find a conclusion.
15669         
15670         * class.cs: Changed warning level for 169 to avoid developer
15671         displeasure from warning flooding. It will be changed back when they
15672         fix most of current BCL warnings.
15673         
15674         * RootContext.cs: Pushed default WarningLevel to 3.
15675         
15676         * statement.cs: Removed unused variable.
15677
15678 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15679
15680         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
15681         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
15682         Add error 502 report.
15683         (StaticClass.DefineType): Add error 441 report.
15684         (Class.AllowedModifiersProp): New virtual property as temporary
15685         extension to AllowedModifiers.
15686         (Class.DefineType): Add error 418 report. Moved ModFlags check here
15687         to share implementation with StaticClass and don't call virtual
15688         methods from ctor.
15689         
15690         * driver.cs (MainDriver): Add error 1558 test.
15691
15692         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
15693         report. Moved error 36 test here.
15694
15695         * statement.cs (Throw.Resolve): Add error 724 report.
15696
15697         * typemanager.cs: Add out_attribute_type core type.
15698         
15699 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
15700
15701         * class.cs (TypeContainer.VerifyClsCompliance): Add error
15702         3018 report.
15703         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
15704
15705         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
15706         3017 report.
15707         
15708         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
15709
15710         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
15711         Add error 3023 report.
15712         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
15713
15714         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
15715         implementation.
15716
15717 2004-12-12  John Luke  <john.luke@gmail.com>
15718
15719         * driver.cs (AddArgs): take -- into account when
15720         adding arguments, fixes bug 65710 
15721
15722 2004-12-12  Martin Baulig  <martin@ximian.com>
15723
15724         * expression.cs (Unary.TryReduceNegative): Added support for
15725         SByteConstant and ByteConstant.
15726         (Unary.Reduce): Check error values from TryReduceNegative().
15727
15728 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
15729
15730         * attributes.cs (Attribute.Resolve): Avoid multiple error report
15731         and report exception as error 182.
15732
15733 2004-12-10  Raja R Harinath  <rharinath@novell.com>
15734
15735         * driver.cs (Main): Fix message when there are warnings.
15736
15737 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
15738
15739         * delegate.cs: Fixed my fix from yesterday, sorry about that.
15740
15741 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
15742
15743         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
15744         Reduced number of warnings.
15745         
15746         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
15747
15748 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
15749
15750         * driver.cs: Removed message.
15751
15752         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
15753
15754 2004-12-08    <vargaz@freemail.hu>
15755
15756         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
15757
15758 2004-12-08  Martin Baulig  <martin@ximian.com>
15759
15760         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
15761         instead of a CS3002 for properties and indexer.
15762
15763 2004-12-08  Martin Baulig  <martin@ximian.com>
15764
15765         * decl.cs (MemberName.ToString): Make this work again.
15766
15767 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
15768
15769         * attribute.cs (Resolve): Add error 591 detection.
15770
15771         * class.cs (FieldMember.Define): Add error 1547 detection.
15772         (Indexer.Define): Add error 620 detection.
15773         (Operator.Define): Add error 590 detection.
15774
15775         * ecore.cs: Missing argument for error 79.
15776
15777         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
15778         detection.
15779
15780 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
15781
15782         Fix #70106
15783         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
15784         only.
15785
15786 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
15787
15788         * cs-parser.jay : handle doc comments on implicit/explicit operators.
15789           Some operator comments were suppressed.
15790         * doc.cs : Implicit/explicit operator name in doc comments are like
15791           "op_Explicit(type)~returnType", so added suffix handling.
15792
15793 2004-12-07  Martin Baulig  <martin@ximian.com>
15794
15795         * decl.cs
15796         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
15797         (MemberCore.GetClsCompliantAttributeValue): Likewise.
15798         (DeclSpace.ec): New protected field; store the EmitContext here.
15799         (DeclSpace.EmitContext): New public property; moved here from
15800         `TypeContainer'.
15801         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
15802         EmitContext.
15803
15804         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
15805         (Enum.Emit): Don't create a new EmitContext.
15806
15807         * delegate.cs (Delegate.DefineType): Always create the
15808         EmitContext.
15809
15810         * iterators.cs (Iterators.DefineIterator): Create a new
15811         EmitContext and store it in `ec'.
15812
15813 2004-08-24  Martin Baulig  <martin@ximian.com>
15814
15815         * typemanager.cs
15816         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
15817         this for accessibility checks.
15818         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
15819         IsNestedFamilyAccessible.
15820         (TypeManager.IsSubclassOf): New method, do what the name actually
15821         says.   
15822
15823 2004-12-06  Raja R Harinath  <rharinath@novell.com>
15824
15825         Fix crash on cs0657-17.cs.
15826         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15827         Use RootContext.Tree.Types, not 'new RootTypes ()'.
15828         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
15829         the case where the NamespaceEntry gets overwritten.
15830
15831 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
15832
15833         Fixed #69195, #56821
15834         * ecore.cs (ResolveBoolean): Tiny refactoring.
15835
15836         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
15837         of right expression resolving when left is false constant and
15838         operator is LogicalAnd OR true constant and operator is LogicalOr.
15839
15840         * statement.cs (ResolveUnreachable): Always reports warning.
15841
15842 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
15843
15844         * class.cs: Distinguish between 1721 and 1722 (just a little help
15845         for the programmer).
15846
15847 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
15848
15849         * delegate.cs: Only allow this on new versions of the language. 
15850
15851 2004-12-02  Duncan Mak  <duncan@ximian.com>
15852
15853         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
15854         Expression class.
15855         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
15856         here as a static method. Take an additional bool out parameter
15857         `must_do_cs1540_check' for signaling to InstanceResolve.
15858         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
15859         member field from PropertyExpr class and made it an argument of
15860         the method instead.
15861         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
15862         check for MarshalByRefObject, and report CS0122 instead of CS1540.
15863         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
15864         and `remove_accessor' as well as InstanceResolve: report CS0122
15865         where applicable.
15866
15867         Fixes #70129.
15868
15869 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15870
15871         Fix test-327.cs, test-328.cs, and put in early infrastructure
15872         for eventually fixing #52697.
15873         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
15874         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
15875         from other methods.
15876         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
15877         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
15878         (VerifyUsing, error246): Update.
15879         * rootcontext.cs (RootContext.NamespaceLookup): Just use
15880         'NamespaceEntry.LookupNamespaceOrType'.
15881
15882 2004-12-03  Martin Baulig  <martin@ximian.com>
15883
15884         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15885         method as our child, call AnonymousMethod.Compatible() on it.
15886
15887 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15888
15889         Disable XML documentation support in 'basic' profile.
15890         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
15891         Redirect XmlElement to System.Object.
15892         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
15893         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
15894         * mcs.exe.sources: Add doc-bootstrap.cs.
15895         * doc-bootstrap.cs: New file.  Contains empty stub implementation
15896         of doc.cs.
15897
15898 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
15899
15900         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
15901           comments are allowed.
15902
15903 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15904
15905         * delegate.cs: Add checks for subtypes in paramaters and return values
15906         in VerifyMethod () to add support for Covariance/Contravariance
15907         in delegates.
15908         
15909 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
15910
15911         * report.cs: Remove extra closing parenthesis.
15912
15913         * convert.cs (Error_CannotImplicitConversion): If the name of the
15914         types are the same, provide some extra information.
15915
15916         * class.cs (FieldBase): Use an unused bit field from the field to
15917         encode the `has_offset' property from the FieldMember.  This saves
15918         a couple of Ks on bootstrap compilation.
15919
15920         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15921         method as our child, return the AnonymousMethod resolved
15922         expression.
15923
15924         * expression.cs (New.DoResolve): Allow return values from
15925         NewDelegate to also include AnonymousMethods.
15926
15927         Fixes #70150.
15928
15929 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
15930
15931         Fix bug #70102
15932         * attribute.cs (Resolve): Improved implementation of params
15933         attribute arguments.
15934
15935         * support.cs (ParameterData): Add HasParams to be faster.
15936
15937 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
15938
15939         all things are for /doc support:
15940
15941         * doc.cs: new file that supports XML documentation generation.
15942         * mcs.exe.sources: added doc.cs.
15943         * driver.cs:
15944           Handle /doc command line option.
15945           Report error 2006 instead of 5 for missing file name for /doc.
15946           Generate XML documentation when required, after type resolution.
15947         * cs-tokenizer.cs:
15948           Added support for picking up documentation (/// and /** ... */),
15949           including a new XmlCommentState enumeration.
15950         * cs-parser.jay:
15951           Added lines to fill Documentation element for field, constant,
15952           property, indexer, method, constructor, destructor, operator, event
15953           and class, struct, interface, delegate, enum.
15954           Added lines to warn incorrect comment.
15955         * rootcontext.cs :
15956           Added Documentation field (passed only when /doc was specified).
15957         * decl.cs:
15958           Added DocComment, DocCommentHeader, GenerateDocComment() and
15959           OnGenerateDocComment() and some supporting private members for
15960           /doc feature to MemberCore.
15961         * class.cs:
15962           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
15963         * delegate.cs:
15964           Added overriden DocCommentHeader.
15965         * enum.cs:
15966           Added overriden DocCommentHeader and GenerateDocComment().
15967
15968 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
15969
15970         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
15971         unwrapping the enumeration values, chain to
15972         DoConstantNumericPromotions again, so we can promote things to the
15973         fundamental types (takes care of enums that are bytes, sbytes).
15974
15975         Fixes bug #62054.
15976
15977 2004-12-01  Raja R Harinath  <rharinath@novell.com>
15978
15979         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
15980         Fix long-standing bug in type-lookup.  Use FindType instead of
15981         LookupType when ec.ResolvingTypeTree.
15982         (Attribute.ResolveType, Attribute.Resolve)
15983         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
15984         Update to changes.
15985         (Attributes.Search): Remove internal version.  Update.
15986         (Attributes.SearchMulti): Update.
15987         (Attributes.GetClsCompliantAttribute): Remove.
15988         (Attributes.GetIndexerNameAttribute): Remove.
15989         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
15990         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
15991         * class.cs (Indexer.Define): Likewise.
15992
15993 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
15994
15995         Fix bug #68790
15996         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
15997         MarshallByReference members access.
15998
15999         * expression.cs: Use CheckMarshallByRefAccess;
16000         Better error CS0197 message.
16001
16002         * report.cs: Print whole related error message.
16003
16004 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16005
16006         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16007         the current directory to help debugging.
16008
16009 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16010
16011         * class (GetClassBases): Better error 60 report.
16012         (EventProperty): Disabled warning 67 detection.
16013
16014 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16015
16016         Fix bug #60324
16017         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16018
16019         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16020         precise values.
16021
16022 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16023
16024         Fix bug #49488
16025         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16026
16027         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16028
16029 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16030
16031         * attribute.cs (Attribute.Resolve): Refine error reporting and
16032         report a cs0117 if the identifier does not exist, to distinguish
16033         from 0617 which is a miss-use of the actual identifier.
16034
16035         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16036         between cs0070 and cs0079.
16037
16038         * class.cs (MemberBase.DoDefine): When reporting a wrong
16039         accessibility level, we use MethodCore to compare instead of
16040         Method (this was a regression in some refactoring effort).
16041
16042         So now we correctly report cs0056 again.
16043
16044         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16045         testing the target_type (which was known to be object_type) and
16046         not the source type (which is anonymous_method).
16047
16048         Fixed reporting of error cs1660.
16049
16050         * expression.cs (UserCast.Source): Expose the underlying cast.
16051
16052         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16053         allowed types to find a match to int32 first (most common).
16054
16055         In addition, it ignores any ImplicitUserConversions that did an
16056         internal implicit conversion (as the switch statement allows only
16057         one integral conversion to exist).
16058
16059         * class.cs (PartialContainer.Create): rename `name' to
16060         `member_name' for clarity.  Then replace the string calls with a
16061         call to MemberName.GetPartialName, as now using
16062         MemberName.ToString is an error (this is due to the side effects
16063         it had, that were fixed in the past).
16064
16065         This will restore the error reporting on a number of partial class
16066         errors that were missusing this (and getting an exception as a
16067         results, which is now just a plain textual warning, because
16068         yyparse debug output would crash otherwise).
16069
16070 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16071
16072         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16073
16074 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16075
16076         * rootcontext.cs (LookupType): Make sure to cache lookups that
16077         don't give us a negative result. This saves about 5% of corlib
16078         compilation time.
16079
16080 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16081
16082         * report.cs (AbstractMessage.Print): messages are sent to stderr
16083
16084         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16085         non-interface in the list of interfaces (at this point, either
16086         parent was properly set, or a base class is being listed in the
16087         interfaces section).
16088
16089         This flags error 1722, and resolves the crash from bug 69259.
16090
16091 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16092
16093         * statement.cs (Using.EmitExpressionFinally): make this work right
16094         for valuetypes. Fixes 69926.
16095
16096 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16097
16098         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16099         converted to an enum" here, before we try to change the underlying
16100         type.  This code exists, but it is a different code path than the
16101         one used while encoding constants.
16102
16103         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16104         old bug: when converting from the null literal to a pointer,
16105         return an EmptyCast, not the NullLiteral.
16106
16107         This fixes #69921, the recent null_type changes probably made this
16108         bug more prominent.
16109
16110         (ImplicitReferenceConversionExists): In addition, resynchronized
16111         the code here, so it matches the same code in
16112         ImplicitReferenceConversionExists for the `from any class-type S
16113         to any interface-type T'.
16114         
16115
16116 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16117
16118         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16119
16120 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16121
16122         * cs-parser.jay: Use verbosity accordingly. 
16123
16124 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16125
16126         * expression.cs (Unary.ResolveOperator): Do not report warning;
16127         AddressOf reads from variable.
16128         
16129         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16130
16131 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16132
16133         Fix bug #69462
16134
16135         * attribute.cs (Attributable): Removed CheckTargets.
16136         (Attributes.Emit): Explicit attribute targets are tested here.
16137
16138         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16139         not enabled for interfaces.
16140
16141         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16142         (GetAssemblyName): Ouch next bug there.
16143
16144 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16145
16146         * expression.cs: Error 275 added.
16147         
16148 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16149
16150         Fix bug #69177 (Implemented decimal constant support)
16151
16152         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16153         (BinaryFold): Add DecimalConstant.
16154
16155         * const.cs (Define): Decimal constant 
16156         (is not constant.
16157         (ChangeType): Add decimal type handling.
16158         (LookupConstantValue): Don't set value for decimal type but
16159         emit DecimalConstantAttribute. Needed for constant optimization.
16160
16161         * constant.cs (ToDecimal): New method.
16162         (ConvertToDecimal): New method.
16163         (IntConstant): Implemented ConvertToDecimal.
16164         (DecimalConstant.Emit): Emit optimized version for decimals in
16165         int range.
16166
16167         * expression.cs (ResolveOperator): Changed order of constant
16168         reduction to work correctly with native types which have
16169         overloaded operators.
16170         (ResolveMemberAccess): Extract constant value from attribute
16171         for decimal type.
16172
16173         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16174
16175         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16176         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16177         (ChangeType): Decimal is special.
16178         (TypeToCoreType): Add decimal type.
16179
16180 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16181
16182         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16183         decimal types.
16184
16185 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16186
16187         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16188         test cs1667-5.cs.
16189
16190 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16191
16192         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16193
16194         * pending.cs (PendingImplementation): Grab only interfaces.
16195
16196 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16197
16198         * statement.cs (ForeachHelperMethods): Add location member and
16199         error 202 detection.
16200
16201 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16202
16203         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16204         automatically handled by executable.make.
16205         (PROGRAM): Make profile-specific.
16206
16207 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16208
16209         * expression.cs (DoResolveBase): Fixed wrong warning for out
16210         variables.
16211
16212 2004-11-18  Martin Baulig  <martin@ximian.com>
16213
16214         Merged latest changes into gmcs.  Please keep this comment in
16215         here, it makes it easier for me to see what changed in MCS since
16216         the last time I merged.
16217
16218 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16219
16220         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16221         (TypeHandle.GetMemberCache): New.
16222         (TypeHandle.TypeHandle): Update.
16223         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16224         (TypeManager.LookupParentInterfacesCache):
16225         Rename from LookupInterfaceCache.  Optimize slightly.
16226         (TypeManager.MemberLookup_FindMembers): Update.
16227         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16228         multi-type variant.
16229         (AddCacheContents): Rename from AddHashtable.
16230         * class.cs (TypeContainer.parent_container): Remove.
16231         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16232         (TypeContainer.DoDefineMembers): Don't initialize it.
16233         Update to name changes.
16234         
16235 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16236
16237         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16238         that factors the code to check access modifiers on override.  
16239
16240         (PropertyBase): Use the code here.
16241
16242         Patch from Lluis S'anchez, fixes bug #69361.
16243
16244 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16245
16246         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16247         routine that is used to report the use of a captured variable
16248         whose address has been taken.
16249
16250         There are two checks: one when variables are being captured and
16251         the other check is when the address of a variable is taken. 
16252         
16253         (because an anonymous methods might be resolved before *or* after
16254         the address has been taken) and 
16255
16256         * expression.cs (Conditional.DoResolve): Remove the special
16257         casing that Martin added to trueExpr and falseExpr being both
16258         NullLiteral.  We get the right behavior now just by introducing
16259         the null_type into the compiler. 
16260
16261         * convert.cs (ExplicitConversion): Change the code to use
16262         null_type instead of testing `expr is NullLiteral'.
16263         (ImplicitConversionStandard): use null_type too.
16264         (ImplicitReferenceConversionExists): use null_type too.
16265         (ImplicitReferenceConversion): use null_type too.
16266
16267         * literal.cs: The type of `NullLiteral' is now null_type instead
16268         of object_type. 
16269         (Resolve): Set the type here.
16270
16271         * typemanager.cs: Introduce null_type.
16272
16273 2004-11-17  Martin Baulig  <martin@ximian.com>
16274
16275         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16276         direction, like FindMembers() does.  Fixes #69546, testcase is in
16277         test-315.cs.    
16278
16279 2004-11-16  Martin Baulig  <martin@ximian.com>
16280
16281         This is based on a patch from Marek Safar, see bug #69082.
16282         Fixes bugs #63705 and #67130.
16283
16284         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16285         method; create a MemberCache for an interface type and cache the
16286         result.
16287
16288         * decl.cs (IMemberContainer.ParentContainer): Removed.
16289         (IMemberContainer.ParentCache): New property.
16290         (MemberCache.SetupCacheForInterface): Removed.
16291         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16292         to create a cache for an interface's "parent".
16293
16294         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16295         interfaces too.
16296
16297 2004-11-16  Martin Baulig  <martin@ximian.com>
16298
16299         Merged back from gmcs; these changes already went into gmcs a
16300         couple of weeks ago.
16301
16302         * typemanager.cs
16303         (TypeManager.AddUserType): Removed the `ifaces' argument.
16304         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16305         `TypeExpr []'.
16306         (TypeManager.AddUserInterface): Removed.
16307         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16308         `TypeExpr []'.
16309         (TypeManager.GetInterfaces): Likewise.
16310         (TypeManager.GetExplicitInterfaces): Likewise.
16311
16312         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16313
16314         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16315         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16316
16317 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16318
16319         * statement.cs: Avoid adding bools to a hashtable.
16320
16321 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16322
16323         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16324         calling an unsafe method from a safe location.
16325
16326 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16327
16328         Fix #69167
16329         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16330
16331 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16332
16333         * namespace.cs (VerifyUsing): use GetPartialName instead of
16334         ToString. 
16335
16336 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16337
16338         * statement.cs (Return.Resolve): Fix regression in typo: if
16339         `in_exc', we have to request a NeedReturnLabel, this was a typo
16340         introduced in the anonymous method check-in.  Fixes #69131.
16341
16342         * Indexers were using the ShortName when defining themselves,
16343         causing a regression in the compiler bootstrap when applying the
16344         patch from 2004-11-02 (first part), now they use their full name
16345         and the bug is gone.
16346
16347 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16348
16349         * driver.cs: Strip the path from the names of embedded resources. Fixes
16350         #68519.
16351
16352 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16353
16354         Fix error message regression: cs0104-2.cs.
16355         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16356         (AliasEntry.Resolve): Update.
16357         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16358         'silent' flag.
16359         (RootContext.LookupType): Update.
16360
16361 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16362
16363         * cs-parser.jay: Add support for handling accessor modifiers
16364         * class: Add support port accessor modifiers and error checking,
16365         define PropertyMethod.Define as virtual (not abstract anymore)
16366         * ecore.cs: Add checking for proeprties access with access modifiers
16367         * iterators.cs: Modify Accessor constructor call based in the modified
16368         constructor
16369 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16370
16371         * expression.cs (StringConcat): Handle being called twice,
16372         as when we have a concat in a field init with more than two
16373         ctors in the class
16374
16375 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16376
16377         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16378         special case explicit implementations, we should always produce
16379         the .property or .event declaration.
16380         
16381         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16382         since it will not return correct data if people use this
16383         unresolved in the presence of using statements (see test-313).
16384
16385         * class.cs (MethodData.Define): If we are an explicit interface
16386         implementation, set the method name to the full name of the
16387         interface plus the name of the method.  
16388
16389         Notice that using the method.MethodName.GetFullName() does not
16390         work, as it will only contain the name as declared on the source
16391         file (it can be a shorthand in the presence of using statements)
16392         and not the fully qualifed type name, for example:
16393
16394         using System;
16395
16396         class D : ICloneable {
16397                 object ICloneable.Clone ()  {
16398                 }
16399         }
16400
16401         Would produce a method called `ICloneable.Clone' instead of
16402         `System.ICloneable.Clone'.
16403
16404         * namespace.cs (Alias.Resolve): Use GetPartialName.
16405         
16406 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16407
16408         * cs-parser.jay: Add error 1055 report.
16409
16410 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16411
16412         * assign.cs (Assign.DoResolve): Only do the transform of
16413         assignment into a New if the types are compatible, if not, fall
16414         through and let the implicit code deal with the errors and with
16415         the necessary conversions. 
16416
16417 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16418
16419         * cs-parser.jay: Add error 1031 report.
16420
16421         * cs-tokenizer.cs: Add location for error 1038.
16422
16423 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16424
16425         * cs-parser.jay: Add error 1016 report.
16426
16427 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16428
16429         * cs-parser.jay: Add errors 1575,1611 report.
16430
16431 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16432
16433         * cs-parser.jay: Add error 1001 report.
16434
16435 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16436
16437         Fix #68850
16438         * attribute.cs (GetMarshal): Add method argument for
16439         caller identification.
16440
16441         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16442         agument for GetMarshal and RuntimeMissingSupport.
16443
16444 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16445
16446         * attribute.cs (ExtractSecurityPermissionSet): Removed
16447         TypeManager.code_access_permission_type.
16448
16449         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16450
16451 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16452
16453         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16454         for obsolete use of a variable here.   Fixes regression on errors
16455         cs0619-25 and cs0619-26.
16456
16457 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16458
16459         Fix #62358, implemented security attribute encoding.
16460
16461         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16462         Tests permitted SecurityAction for assembly or other types.
16463         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16464         data from SecurityPermissionAttribute to PermisionSet class.
16465
16466         * class.cs (ApplyAttributeBuilder): Added special handling
16467         for System.Security.Permissions.SecurityAttribute based types.
16468
16469         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16470         special handling for System.Security.Permissions.SecurityAttribute
16471         based types.
16472
16473         * enum.cs (ApplyAttributeBuilder): Added special handling
16474         for System.Security.Permissions.SecurityAttribute based types.
16475
16476         * parameter.cs (ApplyAttributeBuilder): Added special handling
16477         for System.Security.Permissions.SecurityAttribute based types.
16478
16479         * rootcontext.cs: Next 2 core types.
16480
16481         * typemanager.cs (TypeManager.security_permission_attr_type):
16482         Built in type for the SecurityPermission Attribute.
16483         (code_access_permission_type): Build in type.
16484
16485 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16486
16487         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16488         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16489         all of this information into
16490         EmitContext.EmitCapturedVariableInstance.
16491         
16492         * codegen.cs (EmitCapturedVariableInstance): move here the
16493         funcionality of emitting an ldarg.0 in the presence of a
16494         remapping.   This centralizes the instance emit code.
16495
16496         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16497         then emit a load of this: it means that we have reached the
16498         topmost ScopeInfo: the one that contains the pointer to the
16499         instance of the class hosting the anonymous method.
16500
16501         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16502         captures to the topmost CaptureContext.
16503
16504 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16505
16506         * expression.cs (LocalVariableReference): Move the knowledge about
16507         the iterators into codegen's EmitCapturedVariableInstance.
16508
16509 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16510
16511         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16512         all code paths return a value from an anonymous method (it is the
16513         same as the 161 error, but for anonymous methods).
16514
16515 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16516
16517         The introduction of anonymous methods in the compiler changed
16518         various ways of doing things in the compiler.  The most
16519         significant one is the hard split between the resolution phase
16520         and the emission phases of the compiler.
16521
16522         For instance, routines that referenced local variables no
16523         longer can safely create temporary variables during the
16524         resolution phase: they must do so from the emission phase,
16525         since the variable might have been "captured", hence access to
16526         it can not be done with the local-variable operations from the runtime.
16527         
16528         * statement.cs 
16529
16530         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16531         is a toplevel block.
16532
16533         (ToplevelBlock): A new kind of Block, these are the blocks that
16534         are created by the parser for all toplevel method bodies.  These
16535         include methods, accessors and anonymous methods.
16536
16537         These contain some extra information not found in regular blocks:
16538         A pointer to an optional CaptureContext (for tracking captured
16539         local variables and parameters).  A pointer to the parent
16540         ToplevelBlock.
16541         
16542         (Return.Resolve): Catch missmatches when returning a value from an
16543         anonymous method (error 1662).
16544         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16545         phase.
16546
16547         (Break.Resolve): ditto.
16548
16549         (SwitchLabel): instead of defining the labels during the
16550         resolution phase, we now turned the public ILLabel and ILLabelCode
16551         labels into methods called GetILLabelCode() and GetILLabel() that
16552         only define the label during the Emit phase.
16553
16554         (GotoCase): Track the SwitchLabel instead of the computed label
16555         (its contained therein).  Emit the code by using
16556         SwitchLabel.GetILLabelCode ().
16557
16558         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16559         whether the Local has been captured or not.
16560
16561         (LocalInfo.IsCaptured): New property, used to tell whether the
16562         local has been captured.
16563         
16564         * anonymous.cs: Vastly updated to contain the anonymous method
16565         support.
16566
16567         The main classes here are: CaptureContext which tracks any
16568         captured information for a toplevel block and ScopeInfo used to
16569         track the activation frames for various local variables.   
16570
16571         Each toplevel block has an optional capture context associated
16572         with it.  When a method contains an anonymous method both the
16573         toplevel method and the anonymous method will create a capture
16574         context.   When variables or parameters are captured, they are
16575         recorded on the CaptureContext that owns them, for example:
16576
16577         void Demo () {
16578              int a;
16579              MyDelegate d = delegate {
16580                  a = 1;
16581              }
16582         }
16583
16584         Here `a' will be recorded as captured on the toplevel
16585         CapturedContext, the inner captured context will not have anything
16586         (it will only have data if local variables or parameters from it
16587         are captured in a nested anonymous method.
16588
16589         The ScopeInfo is used to track the activation frames for local
16590         variables, for example:
16591
16592         for (int i = 0; i < 10; i++)
16593                 for (int j = 0; j < 10; j++){
16594                    MyDelegate d = delegate {
16595                         call (i, j);
16596                    }
16597                 }
16598
16599         At runtime this captures a single captured variable `i', but it
16600         captures 10 different versions of the variable `j'.  The variable
16601         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
16602         recorded on a child.  
16603
16604         The toplevel ScopeInfo will also track information like the `this'
16605         pointer if instance variables were referenced (this is necessary
16606         as the anonymous method lives inside a nested class in the host
16607         type of the method). 
16608
16609         (AnonymousMethod): Expanded to track the Toplevel, implement
16610         `AnonymousMethod.Compatible' to tell whether an anonymous method
16611         can be converted to a target delegate type. 
16612
16613         The routine now also produces the anonymous method content
16614
16615         (AnonymousDelegate): A helper class that derives from
16616         DelegateCreation, this is used to generate the code necessary to
16617         produce the delegate for the anonymous method that was created. 
16618
16619         * assign.cs: API adjustments for new changes in
16620         Convert.ImplicitStandardConversionExists.
16621
16622         * class.cs: Adjustments to cope with the fact that now toplevel
16623         blocks are of type `ToplevelBlock'. 
16624
16625         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
16626         insteda of standard blocks.
16627
16628         Flag errors if params arguments are passed to anonymous methods.
16629
16630         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
16631         `CurrentAnonymousMethod' which points to the current Anonymous
16632         Method.  The variable points to the AnonymousMethod class that
16633         holds the code being compiled.  It is set in the new EmitContext
16634         created for the anonymous method.
16635
16636         (EmitContext.Phase): Introduce a variable and an enumeration to
16637         assist in enforcing some rules about when and where we are allowed
16638         to invoke certain methods (EmitContext.NeedsReturnLabel is the
16639         only one that enfonces this right now).
16640
16641         (EmitContext.HaveCaptureInfo): new helper method that returns
16642         whether we have a CapturedContext initialized.
16643
16644         (EmitContext.CaptureVariable): New method used to register that a
16645         LocalInfo must be flagged for capturing. 
16646
16647         (EmitContext.CapturedParameter): New method used to register that a
16648         parameters must be flagged for capturing. 
16649         
16650         (EmitContext.CapturedField): New method used to register that a
16651         field must be flagged for capturing. 
16652
16653         (EmitContext.HaveCapturedVariables,
16654         EmitContext.HaveCapturedFields): Return whether there are captured
16655         variables or fields. 
16656
16657         (EmitContext.EmitMethodHostInstance): This is used to emit the
16658         instance for the anonymous method.  The instance might be null
16659         (static methods), this (for anonymous methods that capture nothing
16660         and happen to live side-by-side with the current method body) or a
16661         more complicated expression if the method has a CaptureContext.
16662
16663         (EmitContext.EmitTopBlock): Routine that drives the emission of
16664         code: it will first resolve the top block, then emit any metadata
16665         and then emit the code.  The split is done so that we can extract
16666         any anonymous methods and flag any captured variables/parameters.
16667         
16668         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
16669         during this phase, the ILGenerator should not be used as labels
16670         and local variables declared here might not be accessible to any
16671         code that is part of an anonymous method.  
16672
16673         Exceptions to this include the temporary variables that are
16674         created by some statements internally for holding temporary
16675         variables. 
16676         
16677         (EmitContext.EmitMeta): New routine, in charge of emitting all the
16678         metadata for a cb
16679
16680         (EmitContext.TemporaryReturn): This method is typically called
16681         from the Emit phase, and its the only place where we allow the
16682         ReturnLabel to be defined other than the EmitMeta.  The reason is
16683         that otherwise we would have to duplicate a lot of logic in the
16684         Resolve phases of various methods that today is on the Emit
16685         phase. 
16686
16687         (EmitContext.NeedReturnLabel): This no longer creates the label,
16688         as the ILGenerator is not valid during the resolve phase.
16689
16690         (EmitContext.EmitThis): Extended the knowledge in this class to
16691         work in anonymous methods in addition to iterators. 
16692
16693         (EmitContext.EmitCapturedVariableInstance): This emits whatever
16694         code is necessary on the stack to access the instance to a local
16695         variable (the variable will be accessed as a field).
16696
16697         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
16698         EmitContext.EmitAddressOfParameter): Routines to support
16699         parameters (not completed at this point). 
16700         
16701         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
16702         will also remove the parameters.
16703
16704         * convert.cs (Convert): Define a `ConstantEC' which points to a
16705         null.  This is just to prefity some code that uses
16706         ImplicitStandardConversion code and do not have an EmitContext
16707         handy.
16708
16709         The idea is to flag explicitly that at that point in time, it is
16710         known that the conversion will not trigger the delegate checking
16711         code in implicit conversions (which requires a valid
16712         EmitContext). 
16713
16714         Everywhere: pass new EmitContext parameter since
16715         ImplicitStandardConversionExists now requires it to check for
16716         anonymous method conversions. 
16717
16718         (Convert.ImplicitStandardConversionExists): If the type of an
16719         expression is the anonymous_method_type, and the type is a
16720         delegate, we invoke the AnonymousMethod.Compatible method to check
16721         whether an implicit conversion is possible. 
16722
16723         (Convert.ImplicitConversionStandard): Only do implicit method
16724         group conversions if the language level is not ISO_1.
16725
16726         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
16727         MethodInfo for the Invoke method.  used by Delegate and
16728         AnonymousDelegate.
16729
16730         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
16731         method conversions if the target type is a delegate.
16732
16733         Removed extra debugging nops.
16734
16735         (LocalVariableReference): Turn the `local_info' into a public
16736         field. 
16737
16738         Add `prepared' field, the same hack used for FieldExprs to cope
16739         with composed assignments, as Local variables do not necessarily
16740         operate purely on the stack as they used to: they can be captured
16741         fields. 
16742
16743         Add `temp' for a temporary result, like fields.
16744
16745         Refactor DoResolve and DoResolveLValue into DoResolveBase.
16746
16747         It now copes with Local variables that are captured and emits the
16748         proper instance variable to load it from a field in the captured
16749         case. 
16750
16751         (ParameterReference.DoResolveBase): During the resolve phase,
16752         capture parameters if we are in an anonymous method.
16753
16754         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
16755         anonymous method, use the EmitContext helper routines to emit the
16756         parameter reference.
16757
16758         * iterators.cs: Set RemapToProxy to true/false during the
16759         EmitDispose class.
16760
16761         * parameters.cs (GetParameterByName): New helper method. 
16762
16763         * typemanager.cs (anonymous_method_type) a new type that
16764         represents an anonyous method.  This is always an internal type,
16765         used as a fencepost to test against the anonymous-methodness of an
16766         expression. 
16767         
16768 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
16769
16770         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
16771         561 report.
16772         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
16773
16774 2004-10-18  Martin Baulig  <martin@ximian.com>
16775
16776         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
16777         `Type' directly, but call ResolveType() on it.
16778         (Catch.Resolve): Likewise.
16779         (Foreach.Resolve): Likewise.
16780
16781 2004-10-18  Martin Baulig  <martin@ximian.com>
16782
16783         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
16784         `Type' directly, but call ResolveType() on it.
16785         (Probe.DoResolve): Likewise.
16786         (ArrayCreation.LookupType): Likewise.
16787         (TypeOf.DoResolve): Likewise.
16788         (SizeOf.DoResolve): Likewise.
16789
16790 2004-10-18  Martin Baulig  <martin@ximian.com>
16791
16792         * expression.cs (Invocation.BetterFunction): Put back
16793         TypeManager.TypeToCoreType().
16794
16795 2004-10-18  Raja R Harinath  <rharinath@novell.com>
16796
16797         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
16798         the ResolveType.
16799
16800 2004-10-18  Martin Baulig  <martin@ximian.com>
16801
16802         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
16803         `Type' directly, but call ResolveType() on it.
16804
16805 2004-10-18  Martin Baulig  <martin@ximian.com>
16806
16807         * class.cs (FieldMember.Define): Don't access the TypeExpr's
16808         `Type' directly, but call ResolveType() on it.
16809         (MemberBase.DoDefine): Likewise.
16810
16811         * expression.cs (New.DoResolve): Don't access the TypeExpr's
16812         `Type' directly, but call ResolveType() on it.
16813         (ComposedCast.DoResolveAsTypeStep): Likewise.
16814
16815         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
16816         `Type' directly, but call ResolveType() on it.
16817
16818 2004-10-17  John Luke  <john.luke@gmail.com>
16819
16820         * class.cs (Operator.GetSignatureForError): use CSharpName
16821
16822         * parameter.cs (Parameter.GetSignatureForError): Returns
16823         correct name even if was not defined.
16824
16825 2004-10-13  Raja R Harinath  <rharinath@novell.com>
16826
16827         Fix #65816.
16828         * class.cs (TypeContainer.EmitContext): New property.
16829         (DefineNestedTypes): Create an emitcontext for each part.
16830         (MethodCore.DoDefineParameters): Use container's emitcontext.
16831         Pass type array to InternalParameters.
16832         (MemberBase.DoDefine): Use container's emitcontext.
16833         (FieldMember.Define): Likewise.
16834         (Event.Define): Likewise.
16835         (SetMethod.GetParameterInfo): Change argument to EmitContext.
16836         Pass type array to InternalParameters.
16837         (SetIndexerMethod.GetParameterInfo): Likewise.
16838         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
16839         * delegate.cs (Define): Pass emitcontext to
16840         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
16841         array to InternalParameters.
16842         * expression.cs (ParameterReference.DoResolveBase): Pass
16843         emitcontext to GetParameterInfo.
16844         (ComposedCast.DoResolveAsTypeStep): Remove check on
16845         ec.ResolvingTypeTree.
16846         * parameter.cs (Parameter.Resolve): Change argument to
16847         EmitContext.  Use ResolveAsTypeTerminal.
16848         (Parameter.GetSignature): Change argument to EmitContext.
16849         (Parameters.ComputeSignature): Likewise.
16850         (Parameters.ComputeParameterTypes): Likewise.
16851         (Parameters.GetParameterInfo): Likewise.
16852         (Parameters.ComputeAndDefineParameterTypes): Likewise.
16853         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
16854         * support.cs (InternalParameters..ctor): Remove variant that takes
16855         a DeclSpace.
16856         * typemanager.cs (system_intptr_expr): New.
16857         (InitExpressionTypes): Initialize it.
16858
16859 2004-10-12  Chris Toshok  <toshok@ximian.com>
16860
16861         * cs-parser.jay: fix location for try_statement and catch_clause.
16862
16863 2004-10-11  Martin Baulig  <martin@ximian.com>
16864
16865         * report.cs: Don't make --fatal abort on warnings, we have
16866         -warnaserror for that.
16867
16868 2004-10-07  Raja R Harinath  <rharinath@novell.com>
16869
16870         More DeclSpace.ResolveType avoidance.
16871         * decl.cs (MemberCore.InUnsafe): New property.
16872         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
16873         with newly created EmitContext.
16874         (FieldMember.Define): Likewise.
16875         * delegate.cs (Delegate.Define): Likewise.
16876         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
16877         only if normal name-lookup fails.
16878         (TypeExpr.DoResolve): Enable error-checking.
16879         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
16880         (SizeOf.DoResolve): Likewise.
16881         (ComposedCast.DoResolveAsTypeStep): Likewise.
16882         (StackAlloc.DoResolve): Likewise.
16883         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
16884         (Block.Unsafe): New property.
16885         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
16886         (Unsafe): Set 'unsafe' flag of contained block.
16887         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
16888         (Fixed.Resolve): Likewise.
16889         (Catch.Resolve): Likewise.
16890         (Using.ResolveLocalVariableDecls): Likewise.
16891         (Foreach.Resolve): Likewise.
16892
16893 2004-10-05  John Luke <john.luke@gmail.com>
16894
16895         * cs-parser.jay: add location to error CS0175
16896
16897 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
16898
16899         * ecore.cs (Expression.Constantity): Add support for turning null
16900         into a constant.
16901
16902         * const.cs (Const.Define): Allow constants to be reference types
16903         as long as the value is Null.
16904
16905 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
16906
16907         * namespace.cs (NamespaceEntry.Using): No matter which warning
16908         level is set, check if this namespace name has already been added.
16909
16910 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
16911
16912         * expression.cs: reftype [!=]= null should always use br[true,false].
16913         # 67410
16914
16915 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
16916
16917         Fix #67108
16918         * attribute.cs: Enum conversion moved to 
16919         GetAttributeArgumentExpression to be applied to the all
16920         expressions.
16921
16922 2004-10-01  Raja R Harinath  <rharinath@novell.com>
16923
16924         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
16925         * class.c (TypeContainer.DefineType): Flag error if
16926         base types aren't accessible due to access permissions.
16927         * decl.cs (DeclSpace.ResolveType): Move logic to
16928         Expression.ResolveAsTypeTerminal.
16929         (DeclSpace.ResolveTypeExpr): Thin layer over
16930         Expression.ResolveAsTypeTerminal.
16931         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
16932         Refactor code into NestedAccess.  Use it.
16933         (DeclSpace.NestedAccess): New.
16934         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
16935         argument to silence errors.  Check access permissions.
16936         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
16937         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
16938         (Cast.DoResolve): Likewise.
16939         (New.DoResolve): Likewise.
16940         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
16941         (TypeOf.DoResolve): Likewise.
16942
16943         * expression.cs (Invocation.BetterConversion): Return the Type of
16944         the better conversion.  Implement section 14.4.2.3 more faithfully.
16945         (Invocation.BetterFunction): Make boolean.  Make correspondence to
16946         section 14.4.2.2 explicit.
16947         (Invocation.OverloadResolve): Update.
16948         (Invocation): Remove is_base field.
16949         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
16950         (Invocation.Emit): Likewise.
16951
16952 2004-09-27  Raja R Harinath  <rharinath@novell.com>
16953
16954         * README: Update to changes.
16955
16956 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
16957
16958         * cs-parser.jay: Reverted 642 warning fix.
16959
16960 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16961
16962         Fix bug #66615
16963         * decl.cs (FindMemberWithSameName): Indexer can have more than
16964         1 argument.
16965
16966 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16967
16968         * expression.cs (LocalVariableReference.DoResolveLValue):
16969         Do not report warning 219 for out values.
16970         (EmptyExpression.Null): New member to avoid extra allocations.
16971
16972 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16973
16974         * cs-parser.jay: Fix wrong warning 642 report.
16975
16976         * cs-tokenizer.cs (CheckNextToken): New helper;
16977         Inspect next character if is same as expected.
16978
16979 2004-09-23  Martin Baulig  <martin@ximian.com>
16980
16981         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
16982         (Convert.ImplicitReferenceConversionExists): Likewise.
16983
16984 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
16985
16986         * class.cs (Operator.Define): Add error 448 and 559 report.
16987
16988 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
16989
16990         * class.cs (MemberBase.IsTypePermitted): New protected
16991         method for checking error CS0610.
16992
16993 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
16994
16995         * class.cs (TypeContainer.HasExplicitLayout): New property
16996         Returns whether container has StructLayout attribute set Explicit.
16997         (FieldMember): New abstract class for consts and fields.
16998         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
16999         (Field): Reuse FieldMember.
17000
17001         * const.cs (Const): Reuse FieldMember.
17002
17003         * rootcontext.cs: EmitConstants call moved to class.
17004
17005 2004-09-22  Martin Baulig  <martin@ximian.com>
17006
17007         Thanks to Peter Sestoft for this bug report.
17008
17009         * expression.cs (Conditional): If both the `trueExpr' and the
17010         `falseExpr' is a NullLiteral, return a NullLiteral.
17011
17012 2004-09-22  Martin Baulig  <martin@ximian.com>
17013
17014         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17015         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17016         for the "get_Current" call.
17017
17018 2004-09-22  Martin Baulig  <martin@ximian.com>
17019
17020         Marek and me just fixed one of our oldest bugs: #28562 :-)
17021
17022         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17023
17024         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17025         we're an EnumConstant, just return that.
17026         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17027         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17028         to get the value which'll actually be written into the attribute.
17029         However, we have to use GetValue() to access the attribute's value
17030         in the compiler.        
17031
17032 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17033
17034         * constant.cs (Constant.IsNegative): New abstract property
17035         IsNegative.
17036
17037         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17038         (StackAlloc.DoResolve): Reused IsNegative.
17039
17040 2004-09-21  Martin Baulig  <martin@ximian.com>
17041
17042         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17043         if we're used in an iterator, we may be called from different
17044         methods.
17045
17046         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17047         we actually have an exception block.
17048
17049 2004-09-20  John Luke <jluke@cfl.rr.com>
17050
17051         * class.cs, cs-parser.jay: Improve the error report for 1520:
17052         report the actual line where the error happens, not where the
17053         class was declared.
17054
17055         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17056         Pass location information that was available elsewhere.
17057
17058 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17059
17060         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17061         runtime to delay sign assemblies.
17062
17063 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17064
17065         * cs-parser.jay: Do not report the stack trace, this is barely
17066         used nowadays.
17067
17068 2004-08-22  John Luke  <john.luke@gmail.com>
17069  
17070         * driver.cs : check that a resource id is not already used
17071         before adding it, report CS1508 if it is, bug #63637
17072
17073 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17074
17075         * ecore.cs: Removed dead code.
17076
17077 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17078
17079         * class.cs: Do not report warning CS0067 on the interfaces.
17080
17081 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17082
17083         * cs-parser.jay: Add error 504 report.
17084
17085 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17086
17087         * rootcontext.cs: WarningLevel is 4 by default now.
17088
17089         * statement.cs (Fixed.Resolve): Do not null
17090         VariableInfo.
17091
17092 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17093
17094         Fixed bug #55780
17095         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17096         deep search when property is not virtual.
17097         (PropertyExpr.ResolveAccessors): Make one call for both
17098         accessors.
17099
17100 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17101
17102         Fixed bug #65766
17103         * statement.cs: Error 152 report constains also location.
17104
17105 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17106
17107         Fixed bug #65766
17108         * const.cs: Explicitly set constant as static.
17109
17110 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17111
17112         Fixed bug #64226
17113         * cs-parser.jay: Add error 1017 report.
17114
17115 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17116
17117         Fixed bug #59980, #64224
17118         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17119
17120         * typemanager.cs (IsSpecialMethod): Simplified
17121
17122 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17123
17124         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17125         condition with better params.
17126
17127 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17128
17129         Fixed bug #65238
17130         * attribute.cs (Resolve): Property has to have both
17131         accessors.
17132
17133 2004-09-14  Martin Baulig  <martin@ximian.com>
17134
17135         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17136
17137 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17138
17139         Fixed bug #61902
17140         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17141         called and is obsolete then this member suppress message
17142         when call is inside next [Obsolete] method or type.
17143
17144         * expression.cs: Use TestObsoleteMethodUsage member.
17145
17146 2004-09-14  Martin Baulig  <martin@ximian.com>
17147
17148         * cs-parser.jay: Sync a bit with the GMCS version.
17149
17150 2004-09-14  Martin Baulig  <martin@ximian.com>
17151
17152         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17153         (CSharpParser.yacc_verbose_flag): New public field.
17154
17155         * genericparser.cs: Removed.
17156
17157 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17158
17159         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17160
17161 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17162
17163         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17164
17165 2004-09-10  Martin Baulig  <martin@ximian.com>
17166
17167         Backported my MemberName changes from GMCS into MCS.
17168
17169         - we are now using a special `MemberName' class instead of using
17170         strings; in GMCS, the `MemberName' also contains the type
17171         arguments.
17172
17173         - changed the grammar rules a bit:
17174           * the old `member_name' is now a `namespace_or_type_name':
17175             The rule is that we use `namespace_or_type_name' everywhere
17176             where we expect either a "member name" (GetEnumerator) or a
17177             "member name" with an explicit interface name
17178             (IEnumerable.GetEnumerator).
17179             In GMCS, the explicit interface name may include type arguments
17180             (IEnumerable<T>.GetEnumerator).
17181           * we use `member_name' instead of just `IDENTIFIER' for
17182             "member names":
17183             The rule is that we use `member_name' wherever a member may
17184             have type parameters in GMCS.       
17185
17186         * decl.cs (MemberName): New public class.
17187         (MemberCore.MemberName): New public readonly field.
17188         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17189         (DeclSpace): Likewise.
17190
17191         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17192         * enum.cs (Enum.ctor): Likewise.
17193
17194         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17195         MemberName.     
17196         (AliasEntry.ctor): Take a MemberName, not an Expression.
17197         (AliasEntry.UsingAlias): Likewise.
17198
17199         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17200         (IMethodData.MemberName): Changed type from string to MemberName.
17201         (MemberBase.ExplicitInterfaceName): Likewise.
17202         (AbstractPropertyEventMethod.SetupName): Make this private.
17203         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17204         argument; compute the member name here.
17205         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17206         on the `member.MemberName' and the `prefix'.
17207
17208         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17209         not `type_name'.
17210         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17211         thus, we get a `MemberName' instead of a `string'.  These
17212         declarations may have type parameters in GMCS.
17213         (interface_method_declaration, delegate_declaration): Likewise.
17214         (class_declaration, interface_declaration): Likewise.
17215         (method_header): Use `namespace_or_type_name' instead of
17216         `member_name'.  We may be an explicit interface implementation.
17217         (property_declaration, event_declaration): Likewise.
17218         (member_name): This is now just an `IDENTIFIER', not a
17219         `namespace_or_type_name'.
17220         (type_name, interface_type): Removed.
17221         (namespace_or_type_name): Return a MemberName, not an Expression.
17222         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17223         call GetTypeExpression() on the MemberName to get an expression.
17224         (IndexerDeclaration.interface_type): Changed type from string to
17225         MemberName.
17226         (MakeName): Operate on MemberName's instead of string's.
17227
17228 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17229
17230         Fix bug #55770.
17231         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17232         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17233         lookup to avoid symbols introduced by 'using'.
17234         * rootcontext.cs (NamespaceLookup): Update.
17235
17236 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17237
17238         * class.cs (TypeContainer.DoDefineMembers): Do not call
17239         DefineDefaultConstructor for static classes.
17240
17241 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17242
17243         * attribute.cs (Attribute.Resolve): Add error 653 report.
17244
17245         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17246         report.
17247         (Method.ApplyAttributeBuilder): Add error 685 report.
17248         (Operator.Define): Add error 564 report.
17249
17250         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17251
17252         * expression.cs (Invocation.DoResolve): Add error
17253         245 and 250 report.
17254
17255         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17256         error 674 report.
17257
17258 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17259
17260         * class.cs (ConstructorInitializer.Resolve):
17261         Wrong error number (515->516).
17262
17263 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17264
17265         * class.cs (Indexer.Define): Add error 631 report.
17266
17267 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17268
17269         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17270
17271 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17272
17273         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17274
17275 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17276
17277         * cs-parser.jay: Added error CS0241 report.
17278
17279 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17280
17281         * cs-parser.jay (fixed_statement): Introduce a scope for the
17282         declaration in the 'fixed' statement.
17283
17284 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17285
17286         * cs-parser.jay: Added CS0230 error report.
17287
17288 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17289
17290         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17291
17292 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17293
17294         * expression.cs (Argument.Resolve): Added error CS0192 and
17295         CS0199 report.
17296
17297 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17298
17299         C# 2.0 #pragma warning feature
17300
17301         * cs-tokenizer.cs (PreProcessPragma): New method; 
17302         Handles #pragma directive.
17303
17304         * report.cs (WarningRegions): New class; Support
17305         class for #pragma warning directive. It tests whether
17306         warning is enabled for a given line.
17307
17308 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17309
17310         * const.cs: Add more descriptive error report, tahnks to
17311         Sebastien. 
17312
17313 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17314
17315         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17316
17317 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17318
17319         * expression.cs: Apply patch from Ben: Remove dead code from
17320         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17321         as that code just threw an exception anwyays.
17322
17323         * const.cs: Remove the call to the turnintoconstant, for details
17324         see bug: #63144
17325         
17326         * literal.cs: The type of the null-literal is the null type;  So
17327         we use a placeholder type (literal.cs:System.Null, defined here)
17328         for it.
17329
17330         * expression.cs (Conditional.DoResolve): Remove some old code that
17331         is no longer needed, conversions have been fixed.
17332
17333         (ArrayCreationExpression.DoResolve): Return false if we fail to
17334         resolve the inner expression.
17335
17336 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17337
17338         Fix test-290.cs.
17339         * cs-parser.jay (delegate_declaration): Record a delegate
17340         declaration as a type declaration.
17341         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17342
17343 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17344
17345         * parameter.cs: Do not crash if the type can not be resolved. 
17346
17347         * expression.cs: Report errors with unsafe pointers, fixes #64896
17348
17349 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17350
17351         * expression.cs: Pointer arith always needs to do a conv.i
17352         if the operand is a long. fix 65320
17353
17354 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17355
17356         Fixed cs0619-37.cs, cs0619-38.cs
17357
17358         * enum.cs (GetObsoleteAttribute): Removed.
17359
17360         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17361         on Enum member is double staged. The first is tested member
17362         and then enum.
17363
17364 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17365
17366         Fixed #56986, #63631, #65231
17367
17368         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17369         adds member to name container.
17370         (TypeContainer.AddToTypeContainer): New method, adds type to
17371         name container.
17372         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17373         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17374         AddOperator): Simplified by reusing AddToMemberContainer.
17375         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17376         instead of field.
17377         (Method.CheckForDuplications): Fixed implementation to test all
17378         possibilities.
17379         (MemberBase): Detection whether member is explicit interface
17380         implementation is now in constructor.
17381         (MemberBase.UpdateMemberName): Handles IndexerName.
17382         (Accessor): Changed to keep also location information.
17383         (AbstractPropertyEventMethod): Is derived from MemberCore.
17384         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17385         will be emited or not.
17386         (PropertyBase.AreAccessorsDuplicateImplementation):
17387         Tests whether accessors are not in collision with some method.
17388         (Operator): Is derived from MethodCore to simplify common
17389         operations.
17390
17391         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17392         must be performed.
17393         (DeclSpace.AddToContainer): Adds the member to defined_names
17394         table. It tests for duplications and enclosing name conflicts.
17395
17396         * enum.cs (EnumMember): Clean up to reuse the base structures
17397
17398 2004-09-03  Martin Baulig  <martin@ximian.com>
17399
17400         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17401         into TypeContainer, to make partial classes work again.
17402
17403 2004-09-03  Martin Baulig  <martin@ximian.com>
17404
17405         * rootcontext.cs (RootContext.V2): Removed.
17406
17407 2004-03-23  Martin Baulig  <martin@ximian.com>
17408
17409         * expression.cs (Invocation.OverloadResolve): Added `bool
17410         may_fail' argument and use it instead of the Location.IsNull() hack.
17411
17412 2004-09-03  Martin Baulig  <martin@ximian.com>
17413
17414         Merged latest changes into gmcs.  Please keep this comment in
17415         here, it makes it easier for me to see what changed in MCS since
17416         the last time I merged.
17417
17418 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17419
17420         Fix #61128.
17421         * expression.cs (BetterConversion): Don't allow either conversion 
17422         to be null.  Remove redundant implicit conversion test when 'q ==
17423         null' -- when this function is invoked, we already know that the
17424         implicit conversion exists.
17425         (BetterFunction): Assume that 'best' is non-null.  Remove
17426         redundant reimplementation of IsApplicable when 'best' is null.
17427         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17428         number of arguments.
17429         (IsAncestralType): Extract from OverloadResolve.
17430         (OverloadResolve): Make robust to the MethodGroupExpr being
17431         unsorted.  Implement all the logic of Section 14.5.5.1, and
17432         support overloading of methods from multiple applicable types.
17433         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17434
17435         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17436         (RealError, Warning): Append type of report to related symbol.
17437
17438 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17439
17440         * enum.cs: Fixed CLS-Compliance checks for enum members.
17441         Error tests cs3008-8.cs, cs3014-8.cs
17442
17443 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17444
17445         Fixed bug #62342, #63102
17446         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17447         like ImplementMethod.
17448
17449 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17450
17451         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17452         Fixed bug #65170.
17453
17454 2004-09-02  Martin Baulig  <martin@ximian.com>
17455
17456         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17457         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17458         on the MethodBase.
17459
17460 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17461
17462         C# 2.0 Static classes implemented
17463
17464         * class.cs (TypeContainer): instance_constructors,
17465         initialized_fields, initialized_static_fields,
17466         default_constructor, base_inteface_types are protected to be
17467         accessible from StaticClass.
17468         (TypeContainer.DefineDefaultConstructor): New virtual method
17469         for custom default constructor generating
17470         (StaticClass): New class to handle "Static classes" feature.
17471
17472         * cs-parser.jay: Handle static keyword on class like instance
17473         of StaticClass.
17474
17475         * driver.cs: Added "/langversion" command line switch with two
17476         options (iso-1, default).
17477
17478 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17479
17480         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17481
17482 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17483
17484         * delegate.cs: Style.
17485
17486 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17487
17488         * delegate.cs: Add seperate instance expr field for miguel.
17489
17490 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17491
17492         * PointerArithmetic (Resolve): make sure we are not doing
17493         pointer arith on void*. Also, make sure we are resolved
17494         by not setting eclass until resolve.
17495
17496         All callers: Make sure that PointerArithmetic gets resolved.
17497
17498 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17499
17500         * ArrayCreation (LookupType): If the type does not resolve 
17501         to an array, give an error.
17502
17503 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17504
17505         * statement.cs (Try.Resolve): Fixed bug #64222
17506
17507 2004-08-27  Martin Baulig  <martin@ximian.com>
17508
17509         * class.cs
17510         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17511         crash here.     
17512
17513 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17514
17515         * ecore.cs (Constantify): Get underlying type via
17516         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17517         Windows in special cases.
17518
17519 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17520
17521         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17522         for obtaining also private methods.
17523         (GetRemoveMethod): Used GetRemoveMethod (true)
17524         for obtaining also private methods.
17525
17526 2004-08-24  Martin Baulig  <martin@ximian.com>
17527
17528         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17529         MethodAttributes.HideBySig for operators.
17530
17531 2004-08-23  Martin Baulig  <martin@ximian.com>
17532
17533         Back to the old error reporting system :-)
17534
17535         * report.cs (Message): Removed.
17536         (Report.MessageData, ErrorData, WarningData): Removed.
17537         (Report.Error, Warning): Back to the old system.
17538
17539 2004-08-23  Martin Baulig  <martin@ximian.com>
17540
17541         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17542
17543         * class.cs (TypeContainer.ParentContainer): New public virtual
17544         method; replaces the explicit interface implementation.
17545         (ClassPart.ParentContainer): Override.
17546
17547 2004-08-23  Martin Baulig  <martin@ximian.com>
17548
17549         * statement.cs (Switch): Added support for constant switches; see
17550         #59428 or test-285.cs.
17551
17552 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17553
17554         Fixed bug #62740.
17555         * statement.cs (GetEnumeratorFilter): Removed useless
17556         logic because C# specs is strict. GetEnumerator must be
17557         public.
17558
17559 2004-08-22  Martin Baulig  <martin@ximian.com>
17560
17561         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17562         a switch and may break, reset the barrier.  Fixes #59867.
17563
17564 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17565
17566         CLS-Compliance speed up (~5% for corlib)
17567
17568         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17569         New method. Tests container for CLS-Compliant names
17570
17571         * class.cs (TypeContainer.VerifyClsName): New method.
17572         Checks whether container name is CLS Compliant.
17573         (Constructor): Implements IMethodData.
17574
17575         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17576         low-case table for CLS Compliance test.
17577         (MemberCache.VerifyClsParameterConflict): New method.
17578         Checks method parameters for CS3006 error.
17579
17580         * enum.cs (EnumMember): Is derived from MemberCore.
17581         (Enum.VerifyClsName): Optimized for better performance.
17582
17583 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17584
17585         * report.cs: Renamed Error_T to Error and changed all
17586         references.
17587
17588 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17589
17590         * class.cs (TypeContainer.IndexerArrayList): New inner class
17591         container for indexers.
17592         (TypeContainer.DefaultIndexerName): New constant for default
17593         indexer name. Replaced all "Item" with this constant.
17594         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
17595
17596         * typemanager.cs (TypeManager.default_member_ctor): Cache here
17597         DefaultMemberAttribute constructor.
17598
17599 2004-08-05  Martin Baulig  <martin@ximian.com>
17600
17601         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
17602         Fix bug #59429.
17603
17604 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
17605
17606         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
17607         multi platforms problem.
17608
17609         * compiler.csproj: Included shared files.
17610
17611 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17612
17613         Fix bug 60333, 55971 in the more general way
17614         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17615         Added arg_type argument for constant conversion.
17616         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
17617
17618 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17619
17620         Fix bug #59760
17621         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
17622         OperatorArrayList, MethodCoreArrayList for typecontainer
17623         containers. Changed class member types to these new types.
17624         (MethodArrayList.DefineMembers): Added test for CS0659.
17625
17626 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
17627
17628         * cfold.cs: Synchronize the folding with the code in expression.cs
17629         Binary.DoNumericPromotions for uint operands.
17630
17631         * attribute.cs: Revert patch from Raja, it introduced a regression
17632         while building Blam-1.2.1 (hard to isolate a test case).
17633
17634 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17635
17636         Fix for #55382
17637         * class.cs:
17638         (TypeContainer.Define): Renamed to DefineContainerMembers because of
17639         name collision.
17640         (MethodCore.parent_method): New member. The method we're overriding
17641         if this is an override method.
17642         (MethodCore.CheckBase): Moved from Method class and made common.
17643         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
17644         private.
17645         (MethodCore.CheckForDuplications): New abstract method. For custom
17646         member duplication search in a container
17647         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
17648         method and its return type.
17649         (Event.conflict_symbol): New member. Symbol with same name in the
17650         parent class.
17651
17652         * decl.cs:
17653         (MemberCache.FindMemberWithSameName): New method. The method
17654         is looking for conflict with inherited symbols.
17655
17656 2004-08-04  Martin Baulig  <martin@ximian.com>
17657
17658         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
17659
17660         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
17661
17662 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17663
17664         * report.cs (Message): New enum for better error, warning reference in
17665         the code.
17666         (MessageData): New inner abstract class. It generally handles printing of
17667         error and warning messages.
17668         Removed unused Error, Warning, Message methods.
17669
17670 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17671
17672         Fix for cs0592-8.cs test
17673         * attribute.cs
17674         (Attributable.ValidAttributeTargets): Made public.
17675         (Attribute.ExplicitTarget): New member for explicit target value.
17676         (Attribute.CheckTargets): Now we translate explicit attribute
17677         target to Target here.
17678
17679 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
17680
17681         * ecore.cs (MethodGroupExpr): new IsBase property.
17682
17683         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
17684
17685         * delegate.cs (DelegateCreation): store a MethodGroupExpr
17686         rather than an instance expr.
17687
17688         (DelegateCreation.Emit): Use the method group rather than
17689         the instance expression. Also, if you have base.Foo as the
17690         method for a delegate, make sure to emit ldftn, not ldftnvirt.
17691
17692         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
17693
17694         (NewDelegate.DoResolve): Only check for the existance of Invoke
17695         if the method is going to be needed. Use MethodGroupExpr.
17696
17697         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
17698
17699         * expression.cs: For pointer arith., make sure to use
17700         the size of the type, not the size of the pointer to
17701         the type.
17702
17703 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17704
17705         Fix for #60722
17706         * class.cs (Class): Added error CS0502 test.
17707
17708 2004-08-03  John Luke  <jluke@cfl.rr.com>
17709             Raja R Harinath  <rharinath@novell.com>
17710
17711         Fix for #60997.
17712         * attribute.cs (Attribute.complained_before): New flag.
17713         (Attribute.ResolveType, Attribute.Resolve),
17714         (Attribute.DefinePInvokeMethod): Set it.
17715         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
17716         
17717 2004-08-03  Martin Baulig  <martin@ximian.com>
17718
17719         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
17720         use a user-defined operator; we still need to do numeric
17721         promotions in case one argument is a builtin type and the other
17722         one has an implicit conversion to that type.  Fixes #62322.
17723
17724 2004-08-02  Martin Baulig  <martin@ximian.com>
17725
17726         * statement.cs (LocalInfo.Flags): Added `IsThis'.
17727         (LocalInfo.IsThis): New public property.
17728         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
17729
17730 2004-08-01  Martin Baulig  <martin@ximian.com>
17731
17732         * class.cs (TypeContainer.GetClassBases): Don't set the default
17733         here since we may get called from GetPartialBases().
17734         (TypeContainer.DefineType): If GetClassBases() didn't return a
17735         parent, use the default one.
17736
17737 2004-07-30  Duncan Mak  <duncan@ximian.com>
17738
17739         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
17740
17741 2004-07-30  Martin Baulig  <martin@ximian.com>
17742
17743         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
17744
17745         * class.cs (SourceMethod): New public class, derive from the
17746         symbol writer's ISourceMethod.
17747         (Method): Use the new symbol writer API.
17748
17749         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
17750         as argument and use the new symbol writer.
17751
17752         * location.cs
17753         (SourceFile): Implement the symbol writer's ISourceFile.
17754         (Location.SymbolDocument): Removed.
17755         (Location.SourceFile): New public property.
17756
17757         * symbolwriter.cs: Use the new symbol writer API.
17758
17759 2004-07-30  Raja R Harinath  <rharinath@novell.com>
17760
17761         * Makefile (install-local): Remove.  Functionality moved to
17762         executable.make.
17763
17764 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17765
17766         * Makefile: Install mcs.exe.config file together with mcs.exe.
17767         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
17768         correct runtime version.
17769         
17770 2004-07-25  Martin Baulig  <martin@ximian.com>
17771
17772         * class.cs
17773         (TypeContainer.RegisterOrder): Removed, this was unused.
17774         (TypeContainer, interface_order): Removed.
17775         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
17776         TypeContainer as argument since we can also be called with a
17777         `PartialContainer' for a partial class/struct/interface.
17778         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
17779         of checking whether we're an `Interface' - we could be a
17780         `PartialContainer'.
17781         (PartialContainer.Register): Override; call
17782         AddClass()/AddStruct()/AddInterface() on our parent.
17783
17784         * cs-parser.jay (interface_member_declaration): Add things to the
17785         `current_container', not the `current_class'.
17786
17787         * rootcontext.cs (RegisterOrder): The overloaded version which
17788         takes an `Interface' was unused, removed.
17789
17790         * typemanager.cs (TypeManager.LookupInterface): Return a
17791         `TypeContainer', not an `Interface'.
17792         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
17793         contain a `PartialContainer' for an interface, so check it's
17794         `Kind' to figure out what it is.
17795
17796 2004-07-25  Martin Baulig  <martin@ximian.com>
17797
17798         * class.cs (Class.DefaultTypeAttributes): New public constant.
17799         (Struct.DefaultTypeAttributes): Likewise.
17800         (Interface.DefaultTypeAttributes): Likewise.
17801         (PartialContainer.TypeAttr): Override this and add the
17802         DefaultTypeAttributes.
17803
17804 2004-07-25  Martin Baulig  <martin@ximian.com>
17805
17806         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
17807         we can just use the `Parent' field instead.
17808
17809 2004-07-25  Martin Baulig  <martin@ximian.com>
17810
17811         * class.cs (TypeContainer.Emit): Renamed to EmitType().
17812
17813 2004-07-25  Martin Baulig  <martin@ximian.com>
17814
17815         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
17816         our parts before defining any methods.
17817         (TypeContainer.VerifyImplements): Make this virtual.
17818         (ClassPart.VerifyImplements): Override and call VerifyImplements()
17819         on our PartialContainer.
17820
17821 2004-07-25  Martin Baulig  <martin@ximian.com>
17822
17823         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
17824
17825         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
17826         argument, we can just use the `Parent' field instead.
17827
17828         * class.cs
17829         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
17830         (MemberBase.DoDefine): Likewise.
17831
17832 2004-07-24  Martin Baulig  <martin@ximian.com>
17833
17834         * decl.cs (MemberCore.Parent): New public field.
17835         (DeclSpace.Parent): Moved to MemberCore.
17836
17837         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
17838         (MemberBase.ctor): Added TypeContainer argument, pass it to our
17839         parent's .ctor.
17840         (FieldBase, Field, Operator): Likewise.
17841         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
17842         (EventField, Event): Likewise.
17843
17844 2004-07-23  Martin Baulig  <martin@ximian.com>
17845
17846         * class.cs (PartialContainer): New public class.
17847         (ClassPart): New public class.
17848         (TypeContainer): Added support for partial classes.
17849         (TypeContainer.GetClassBases): Splitted some of the functionality
17850         out into GetNormalBases() and GetPartialBases().
17851
17852         * cs-tokenizer.cs (Token.PARTIAL): New token.
17853         (Tokenizer.consume_identifier): Added some hacks to recognize
17854         `partial', but only if it's immediately followed by `class',
17855         `struct' or `interface'.
17856
17857         * cs-parser.jay: Added support for partial clases.
17858
17859 2004-07-23  Martin Baulig  <martin@ximian.com>
17860
17861         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
17862         a `DeclSpace' and also made it readonly.
17863         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
17864         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
17865         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
17866
17867         * cs-parser.jay: Pass the `current_class', not the
17868         `current_container' (at the moment, this is still the same thing)
17869         to a new Method, Property, Event, Indexer or Constructor.
17870
17871 2004-07-23  Martin Baulig  <martin@ximian.com>
17872
17873         * cs-parser.jay (CSharpParser): Added a new `current_class' field
17874         and removed the `current_interface' one.
17875         (struct_declaration, class_declaration, interface_declaration):
17876         Set `current_class' to the newly created class/struct/interface;
17877         set their `Bases' and call Register() before parsing their body.
17878
17879 2004-07-23  Martin Baulig  <martin@ximian.com>
17880
17881         * class.cs (Kind): New public enum.
17882         (TypeContainer): Made this class abstract.
17883         (TypeContainer.Kind): New public readonly field.
17884         (TypeContainer.CheckDef): New public method; moved here from
17885         cs-parser.jay.
17886         (TypeContainer.Register): New public abstract method.
17887         (TypeContainer.GetPendingImplementations): New public abstract
17888         method.
17889         (TypeContainer.GetClassBases): Removed the `is_class' and
17890         `is_iface' parameters.
17891         (TypeContainer.DefineNestedTypes): Formerly known as
17892         DoDefineType().
17893         (ClassOrStruct): Made this class abstract.
17894
17895         * tree.cs (RootTypes): New public type. 
17896
17897 2004-07-20  Martin Baulig  <martin@ximian.com>
17898
17899         * tree.cs (Tree.RecordNamespace): Removed.
17900         (Tree.Namespaces): Removed.
17901
17902         * rootcontext.cs (RootContext.IsNamespace): Removed.
17903
17904         * cs-parser.jay (namespace_declaration): Just create a new
17905         NamespaceEntry here.
17906
17907 2004-07-20  Martin Baulig  <martin@ximian.com>
17908
17909         * statement.cs (ExceptionStatement): New abstract class.  This is
17910         now used as a base class for everyone who's using `finally'.
17911         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
17912         our local variables before using them.
17913
17914         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
17915         virtual method.  This is used by Yield.Resolve() to "steal" an
17916         outer block's `finally' clauses.
17917         (FlowBranchingException): The .ctor now takes an ExceptionStatement
17918         argument.
17919
17920         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
17921         version which takes an ExceptionStatement.  This version must be
17922         used to create exception branchings.
17923
17924         * iterator.cs
17925         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
17926         (Iterator.EmitMoveNext): Added exception support; protect the
17927         block with a `fault' clause, properly handle 'finally' clauses.
17928         (Iterator.EmitDispose): Run all the `finally' clauses here.
17929
17930 2004-07-20  Martin Baulig  <martin@ximian.com>
17931
17932         * iterator.cs: This is the first of a set of changes in the
17933         iterator code.  Match the spec more closely: if we're an
17934         IEnumerable, then GetEnumerator() must be called.  The first time
17935         GetEnumerator() is called, it returns the current instance; all
17936         subsequent invocations (if any) must create a copy.
17937
17938 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
17939
17940         * expression.cs: Resolve the constant expression before returning
17941         it. 
17942
17943 2004-07-19  Martin Baulig  <martin@ximian.com>
17944
17945         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
17946         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
17947         the return type of the new EmitContext.
17948
17949 2004-07-18  Martin Baulig  <martin@ximian.com>
17950
17951         * class.cs (Property.Define): Fix iterators.
17952
17953         * iterators.cs (Iterator.Define): Moved the
17954         `container.AddInterator (this)' call here from the .ctor; only do
17955         it if we resolved successfully.
17956
17957 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
17958
17959         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
17960         `true' for preprocessing directives that we parse.  The return
17961         value indicates whether we should return to regular tokenizing or
17962         not, not whether it was parsed successfully.
17963
17964         In the past if we were in: #if false ... #line #endif, we would
17965         resume parsing after `#line'.  See bug 61604.
17966
17967         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
17968         building: IsEnumType should return true only for enums, not for
17969         enums or System.Enum itself.  This fixes #61593.
17970
17971         Likely what happened is that corlib was wrong: mcs depended on
17972         this bug in some places.  The bug got fixed, we had to add the
17973         hack, which caused bug 61593.
17974
17975         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
17976         that was a workaround for the older conditions.
17977
17978 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
17979
17980         * assign.cs: IAssignMethod has a new interface, as documented
17981         inline. All assignment code now uses this new api.
17982
17983         * ecore.cs, expression.cs: All classes which implement
17984         IAssignMethod now use the new interface.
17985
17986         * expression.cs (Invocation): add a hack to EmitCall so that
17987         IndexerAccess can be the target of a compound assignment without
17988         evaluating its arguments twice.
17989
17990         * statement.cs: Handle changes in Invocation api.
17991
17992 2004-07-16  Martin Baulig  <martin@ximian.com>
17993
17994         * iterators.cs: Rewrote this.  We're now using one single Proxy
17995         class for both the IEnumerable and the IEnumerator interface and
17996         `Iterator' derives from Class so we can use the high-level API.
17997
17998         * class.cs (TypeContainer.AddIterator): New method.
17999         (TypeContainer.DoDefineType): New protected virtual method, which
18000         is called from DefineType().
18001         (TypeContainer.DoDefineMembers): Call DefineType() and
18002         DefineMembers() on all our iterators.
18003         (TypeContainer.Emit): Call Emit() on all our iterators.
18004         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18005
18006         * codegen.cs (EmitContext.CurrentIterator): New public field.
18007
18008 2004-07-15  Martin Baulig  <martin@ximian.com>
18009
18010         * typemanager.cs
18011         (TypeManager.not_supported_exception_type): New type.   
18012
18013 2004-07-14  Martin Baulig  <martin@ximian.com>
18014
18015         * iterators.cs: Use real error numbers.
18016
18017 2004-07-14  Martin Baulig  <martin@ximian.com>
18018
18019         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18020         requires this to be a System.Collection.IEnumerable and not a
18021         class implementing that interface.
18022         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18023
18024 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18025
18026         * class.cs: Fixed previous fix, it broke some error tests.
18027
18028 2004-07-12  Martin Baulig  <martin@ximian.com>
18029
18030         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18031         Fixes #61293.
18032
18033 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18034
18035         * assign.cs (LocalTemporary): Add new argument: is_address,If
18036         `is_address' is true, then the value that we store is the address
18037         to the real value, and not the value itself.
18038         
18039         * ecore.cs (PropertyExpr): use the new local temporary
18040         stuff to allow us to handle X.Y += z (where X is a struct)
18041
18042 2004-07-08  Martin Baulig  <martin@ximian.com>
18043
18044         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18045         not always return, just like we're doing in Using.Resolve().
18046
18047 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18048
18049         * cs-parser.jay (fixed_statement): flag this as Pinned.
18050
18051 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18052
18053         * typemanager.cs (TypeManager): Removed MakePinned method, this
18054         mechanism is replaced with the .NET 2.x compatible mechanism of
18055         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18056
18057         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18058         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18059         `IsFixed' property which has a different meaning.
18060
18061 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18062
18063         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18064         visible from inside a nested class, not just the names of the
18065         immediately enclosing class.
18066         Fix for bug #60730.
18067
18068 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18069
18070         * expression.cs (BetterConversion): Remove buggy special-case
18071         handling of "implicit constant expression conversions".  At this
18072         point, we already know that the conversion is possible -- we're
18073         only checking to see which is better.
18074
18075 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18076
18077         * cs-parser.jay: Added error CS0210 test.
18078
18079 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18080
18081         * cs-parser.jay: Added error CS0134 test.
18082
18083 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18084
18085         Fix bug #52507
18086         * cs-parser.jay: Added error CS0145 test.
18087
18088 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18089
18090         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18091
18092 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18093         
18094         * expression.cs (StackAlloc.Resolve): The argument may not
18095         be a constant; deal with this case.
18096         
18097 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18098
18099         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18100         GetIndexerAttributeValue.
18101         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18102
18103         * class.cs (Indexer.Define): Added error tests for CS0415,
18104         CS0609.
18105
18106 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18107
18108         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18109         property code.
18110
18111 2004-06-23  Martin Baulig  <martin@ximian.com>
18112
18113         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18114         neither return nor throw, reset the barrier as well.  Fixes #60457.
18115
18116 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18117
18118         * class.cs : EventAttributes is now set to None by default.
18119           This fixes bug #60459.
18120
18121 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18122
18123         Fix bug #60219
18124         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18125         Don't throw exception but return null (it's sufficient now).
18126
18127 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18128
18129         * typemanager.cs (GetArgumentTypes): Faster implementation.
18130
18131 2004-06-18  Martin Baulig  <martin@ximian.com>
18132
18133         * attribute.cs (Attribute.Resolve): Check whether we're an
18134         EmptyCast which a Constant child.  Fixes #60333.
18135
18136 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18137
18138         * statement.cs (EmitCollectionForeach): Account for the fact that
18139         not all valuetypes are in areas which we can take the address of.
18140         For these variables, we store to a temporary variable. Also, make
18141         sure that we dont emit a `callvirt' on a valuetype method.
18142
18143 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18144
18145         * expression.cs (StackAlloc.DoReSolve): Added test for
18146         negative parameter (CS0247).
18147
18148 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18149
18150         Fix bug #59792
18151         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18152
18153 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18154
18155         Fix bug #59781
18156         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18157         ulong.
18158
18159 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18160
18161         Fix bug #58254 & cs1555.cs, cs1556.cs
18162         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18163
18164 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18165
18166         * cs-parser.jay: Added error CS1669 test for indexers.
18167
18168 2004-06-11  Martin Baulig  <martin@ximian.com>
18169
18170         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18171         call this twice: for params and varargs methods.
18172
18173 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18174
18175         * class.cs:
18176         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18177
18178 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18179
18180         * attribute.cs (Attribute.GetValidTargets): Made public.
18181
18182         * class.cs: 
18183         (AbstractPropertyEventMethod): New class for better code sharing.
18184         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18185         CS1667 report.
18186         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18187
18188 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18189
18190         Fix bug #59477.
18191         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18192         that the call to Resolve is part of a MemberAccess.
18193         (Expression.Resolve): Use it for SimpleName resolution.
18194         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18195         Add 'intermediate' boolean argument.
18196         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18197         error message when the SimpleName can be resolved ambiguously
18198         between an expression and a type.
18199         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18200         public.
18201         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18202         call on the left-side.
18203
18204 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18205
18206         * class.cs:
18207         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18208
18209 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18210
18211         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18212
18213 2004-06-11  Martin Baulig  <martin@ximian.com>
18214
18215         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18216         varargs methods if applicable.
18217
18218 2004-06-11  Martin Baulig  <martin@ximian.com>
18219
18220         * expression.cs (Invocation.EmitCall): Don't use
18221         `method.CallingConvention == CallingConventions.VarArgs' since the
18222         method could also have `CallingConventions.HasThis'.
18223
18224 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18225
18226         * class.cs (Event.GetSignatureForError): Implemented.
18227         Fixed crash in error test cs3010.cs
18228
18229 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18230
18231         * cs-tokenizer.cs: Change the way we track __arglist to be
18232         consistent with the other keywords.
18233
18234 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18235
18236         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18237         tomorrow.
18238
18239 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18240
18241         * codegen.cs: Check that all referenced assemblies have a strongname
18242         before strongnaming the compiled assembly. If not report error CS1577.
18243         Fix bug #56563. Patch by Jackson Harper.
18244         * typemanager.cs: Added a method to return all referenced assemblies.
18245         Fix bug #56563. Patch by Jackson Harper.
18246
18247 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18248
18249         * class.cs:
18250         (Method.ApplyAttributeBuilder): Moved and added conditional
18251         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18252
18253         * delegate.cs:
18254         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18255
18256 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18257
18258         Fixed #59640
18259         * class.cs: (EventField.attribute_targets): Changed default target.
18260
18261 2004-06-08  Martin Baulig  <martin@ximian.com>
18262
18263         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18264
18265 2004-06-08  Martin Baulig  <martin@ximian.com>
18266
18267         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18268
18269 2004-06-07  Martin Baulig  <martin@ximian.com>
18270
18271         Added support for varargs methods.
18272
18273         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18274         keyword.
18275
18276         * cs-parser.jay: Added support for `__arglist'.
18277
18278         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18279
18280         * expression.cs (Argument.AType): Added `ArgList'.
18281         (Invocation): Added support for varargs methods.
18282         (ArglistAccess): New public class.
18283         (Arglist): New public class.
18284
18285         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18286
18287         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18288         a method's top-level block if the method has varargs.
18289
18290         * support.cs (ReflectionParameters, InternalParameters): Added
18291         support for varargs methods.    
18292
18293 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18294
18295         * class.cs: Provide location in indexer error report.
18296
18297         * driver.cs: Use standard names.
18298
18299         * namespace.cs: Catch the use of using after a namespace has been
18300         declared also on using aliases.
18301
18302 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18303
18304         Bug #50820.
18305         * typemanager.cs (closure_private_ok, closure_invocation_type)
18306         (closure_qualifier_type, closure_invocation_assembly)
18307         (FilterWithClosure): Move to ...
18308         (Closure): New internal nested class.
18309         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18310         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18311         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18312         (MemberLookup, MemberLookupFailed): Use it.
18313         * expression.cs (New.DoResolve): Treat the lookup for the
18314         constructor as being qualified by the 'new'ed type.
18315         (Indexers.GetIndexersForTypeOrInterface): Update.
18316
18317 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18318
18319         * attribute.cs
18320         (GetConditionalAttributeValue): New method. Returns
18321         condition of ConditionalAttribute.
18322         (SearchMulti): New method.  Returns all attributes of type 't'.
18323         Use it when attribute is AllowMultiple = true.
18324         (IsConditionalMethodExcluded): New method.
18325
18326         * class.cs
18327         (Method.IsExcluded): Implemented. Returns true if method has conditional
18328         attribute and the conditions is not defined (method is excluded).
18329         (IMethodData): Extended interface for ConditionalAttribute support.
18330         (PropertyMethod.IsExcluded): Implemented.
18331
18332         * decl.cs
18333         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18334
18335         * expression.cs
18336         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18337         on the method.
18338
18339 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18340
18341         * expression.cs (ArrayCreationExpression): Make this just an
18342         `expression'. It can't be a statement, so the code here was
18343         dead.
18344
18345 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18346
18347         Fixed #59072
18348         * typemanager.cs (GetFullNameSignature): New method for
18349         MethodBase types.
18350
18351 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18352
18353         Fixed #56452
18354         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18355         Use this method when MethodBuilder is null.
18356         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18357         Added test for error CS0626 (MONO reports error for this situation).
18358         (IMethodData.GetSignatureForError): Extended interface.
18359
18360 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18361
18362         * attribute.cs
18363         (AttributeTester.GetObsoleteAttribute): Returns instance of
18364         ObsoleteAttribute when type is obsolete.
18365
18366         * class.cs
18367         (TypeContainer.VerifyObsoleteAttribute): Override.
18368         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18369         (MethodCode.VerifyObsoleteAttribute): Override.
18370         (MemberBase.VerifyObsoleteAttribute): Override.
18371
18372         * decl.cs
18373         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18374         and report proper error.
18375
18376         *delegate.cs
18377         Delegate.VerifyObsoleteAttribute): Override.
18378
18379         * ecore.cs
18380         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18381         and report proper error.
18382         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18383
18384         * enum.cs
18385         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18386         and enum member.
18387
18388         * expression.cs
18389         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18390         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18391         Added test for ObsoleteAttribute.
18392
18393         * statement.cs
18394         (Catch): Derived from Statement.
18395
18396 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18397  
18398         Fixed bug #59071 & cs0160.cs
18399  
18400         * statement.cs (Try.Resolve): Check here whether order of catch
18401         clauses matches their dependencies.
18402
18403 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18404
18405         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18406         caused a regression: #59343.  Referencing nested classes from an
18407         assembly stopped working.
18408
18409 2004-05-31  Martin Baulig  <martin@ximian.com>
18410
18411         MCS is now frozen for beta 2.
18412
18413 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18414
18415         * convert.cs: add a trivial cache for overload operator resolution.
18416
18417 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18418
18419         * decl.cs: If possible, use lookuptypedirect here. We can only do
18420         this if there is no `.' after the namespace. Avoids using
18421         LookupType, which does lots of slow processing.
18422         (FindNestedType) New method, does what it says :-).
18423         * namespace.cs: use LookupTypeDirect.
18424         * rootcontext.cs: use membercache, if possible.
18425         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18426
18427 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18428
18429         * expression.cs:
18430         According to the spec, 
18431
18432         In a member access of the form E.I, if E is a single identifier,
18433         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18434         field, property, localvariable, or parameter with the same type as
18435         the meaning of E as a type-name (§3.8), then both possible
18436         meanings of E are permitted.
18437
18438         We did not check that E as a simple-name had the same type as E as
18439         a type name.
18440
18441         This trivial check gives us 5-7% on bootstrap time.
18442
18443 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18444
18445         * expression.cs (Invocation.OverloadResolve): Avoid the
18446         use of hashtables and boxing here by allocating on demand.
18447
18448 2004-05-30  Martin Baulig  <martin@ximian.com>
18449
18450         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18451         we're doing a silent lookup.  Don't try to lookup nested types in
18452         TypeManager.object_type (thanks to Ben Maurer).
18453
18454 2004-05-30  Martin Baulig  <martin@ximian.com>
18455
18456         Committing a patch from Ben Maurer.
18457
18458         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18459
18460 2004-05-29  Martin Baulig  <martin@ximian.com>
18461
18462         * class.cs (IMethodData.ShouldIgnore): New method.
18463
18464         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18465         `Location' argument, we don't need it anywhere.  Use
18466         `IMethodData.ShouldIgnore ()' instead of
18467         `MethodData.GetMethodFlags ()'.
18468         (TypeManager.AddMethod): Removed.
18469         (TypeManager.AddMethod2): Renamed to AddMethod.
18470
18471 2004-05-29  Martin Baulig  <martin@ximian.com>
18472
18473         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18474
18475         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18476         converting from a class type S to an interface type and we already
18477         have an object on the stack, don't box it again.  Fixes #52578.
18478
18479 2004-05-29  Martin Baulig  <martin@ximian.com>
18480
18481         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18482         Added support for `params' parameters.  Fixes #59267.
18483
18484 2004-05-29  Martin Baulig  <martin@ximian.com>
18485
18486         * literal.cs (NullPointer): Provide a private .ctor which sets
18487         `type' to TypeManager.object_type.  Fixes #59048.
18488
18489 2004-05-29  Martin Baulig  <martin@ximian.com>
18490
18491         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18492         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18493
18494         * ecore.cs (EventExpr.instance_expr): Make the field private.
18495
18496 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18497
18498         Fixed bug #50080 & cs0214-2.cs
18499         * expression.cs (Cast.DoResolve): Check unsafe context here.
18500         
18501         * statement.cs (Resolve.DoResolve): Likewise.
18502
18503 2004-05-26  Martin Baulig  <martin@ximian.com>
18504
18505         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18506
18507         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18508         (RootContext.LookupType): Pass down the `silent' flag.
18509
18510 2004-05-25  Martin Baulig  <martin@ximian.com>
18511
18512         * expression.cs
18513         (MethodGroupExpr.IdenticalTypeName): New public property.
18514         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18515         expression actually refers to a type.
18516
18517 2004-05-25  Martin Baulig  <martin@ximian.com>
18518
18519         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18520         for #56176 and made it actually work.
18521
18522 2004-05-25  Martin Baulig  <martin@ximian.com>
18523
18524         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18525         (FieldExpr, PropertyExpr): Override and implement
18526         CacheTemporaries.  Fixes #52279.
18527
18528 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18529
18530         * location.cs: In the new compiler listing a file twice is a
18531         warning, not an error.
18532
18533 2004-05-24  Martin Baulig  <martin@ximian.com>
18534
18535         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18536         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18537
18538 2004-05-24  Martin Baulig  <martin@ximian.com>
18539
18540         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18541         walking the `using' list.  Fixes #53921.
18542
18543 2004-05-24  Martin Baulig  <martin@ximian.com>
18544
18545         * const.cs (Const.LookupConstantValue): Added support for
18546         EmptyCast's; fixes #55251.
18547
18548 2004-05-24  Martin Baulig  <martin@ximian.com>
18549
18550         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18551         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18552         which does the CS0135 check.  The reason is that we first need to
18553         check whether the variable actually exists.
18554
18555 2004-05-24  Martin Baulig  <martin@ximian.com>
18556
18557         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18558         than RootContext.LookupType() to find the explicit interface
18559         type.  Fixes #58584.
18560
18561 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18562
18563         * Makefile: Simplify.  Use executable.make.
18564         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18565
18566 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18567
18568         * decl.cs:
18569         * enum.cs:
18570         Use the invariant culture when doing String.Compare for CLS case
18571         sensitivity.
18572         
18573 2004-05-23  Martin Baulig  <martin@ximian.com>
18574
18575         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18576         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18577
18578         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18579         
18580 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18581
18582         * class.cs (MemberBase.Define): Reuse MemberType member for 
18583         resolved type. Other methods can use it too.
18584
18585 2004-05-23  Martin Baulig  <martin@ximian.com>
18586
18587         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18588         the variable also exists in the current block (otherwise, we need
18589         to report a CS0103).  Fixes #58670.
18590
18591 2004-05-23  Martin Baulig  <martin@ximian.com>
18592
18593         * flowanalysis.cs (Reachability.Reachable): Compute this
18594         on-the-fly rather than storing it as a field.
18595
18596 2004-05-23  Martin Baulig  <martin@ximian.com>
18597
18598         * flowanalysis.cs (Reachability.And): Manually compute the
18599         resulting `barrier' from the reachability.      
18600        
18601 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18602
18603         Fix bug #57835
18604         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
18605         instance of ObsoleteAttribute when symbol is obsolete.
18606
18607         * class.cs
18608         (IMethodData): Extended interface for ObsoleteAttribute support.
18609
18610 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18611
18612         * attribute.cs: Fix bug #55970
18613
18614 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18615
18616         Fix bug #52705
18617         * attribute.cs
18618         (GetObsoleteAttribute): New method. Creates the instance of
18619         ObsoleteAttribute.
18620         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
18621         ObsoleteAttribute when member is obsolete.
18622         (AttributeTester.Report_ObsoleteMessage): Common method for
18623         Obsolete error/warning reporting.
18624
18625         * class.cs
18626         (TypeContainer.base_classs_type): New member for storing parent type.
18627
18628         * decl.cs
18629         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
18630         for this MemberCore.
18631
18632 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18633
18634         * attribute.cs, const.cs: Fix bug #58590
18635
18636 2004-05-21  Martin Baulig  <martin@ximian.com>
18637
18638         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
18639         out parameters if the end of the method is unreachable.  Fixes
18640         #58098. 
18641
18642 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18643
18644         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
18645         Hari was right, why extra method.
18646
18647 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18648
18649         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
18650
18651 2004-05-20  Martin Baulig  <martin@ximian.com>
18652
18653         Merged this back from gmcs to keep the differences to a minumum.
18654
18655         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
18656         instead of a Declspace.
18657         (Attribute.ResolveType): Likewise.
18658         (Attributes.Search): Likewise.
18659         (Attributes.Contains): Likewise.
18660         (Attributes.GetClsCompliantAttribute): Likewise.
18661
18662         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
18663         argument.
18664         (MethodData.ApplyAttributes): Take an EmitContext instead of a
18665         DeclSpace.
18666
18667 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
18668
18669         Fix bug #58688 (MCS does not report error when the same attribute
18670         is assigned twice)
18671
18672         * attribute.cs (Attribute.Emit): Distinction between null and default.
18673
18674 2004-05-19  Raja R Harinath  <rharinath@novell.com>
18675
18676         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
18677         of a top-level attribute without an attribute target.
18678         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
18679         Make non-static.
18680         (Attribute.Conditional_GetConditionName), 
18681         (Attribute.Obsolete_GetObsoleteMessage): Update.
18682         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
18683         part of ScanForIndexerName.
18684         (Attribute.CanIgnoreInvalidAttribute): New function.
18685         (Attribute.ScanForIndexerName): Move to ...
18686         (Attributes.ScanForIndexerName): ... here.
18687         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
18688         (Attributes.Search): New internal variant that can choose not to
18689         complain if types aren't resolved.  The original signature now
18690         complains.
18691         (Attributes.GetClsCompliantAttribute): Use internal variant, with
18692         complaints suppressed.
18693         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
18694         only if it not useful.
18695         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
18696         top-level for attributes that are shared between the assembly
18697         and a top-level class.
18698         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
18699         * class.cs: Update to reflect changes.
18700         (DefineIndexers): Fuse loops.
18701         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
18702         a couple more variants of attribute names.
18703
18704 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
18705
18706         Fix bug #52585 (Implemented explicit attribute declaration)
18707
18708         * attribute.cs:
18709         (Attributable.ValidAttributeTargets): New abstract method. It gets
18710         list of valid attribute targets for explicit target declaration.
18711         (Attribute.Target): It holds target itself.
18712         (AttributeSection): Removed.
18713         (Attribute.CheckTargets): New method. It checks whether attribute
18714         target is valid for the current element.
18715
18716         * class.cs:
18717         (EventProperty): New class. For events that are declared like
18718         property (with add and remove accessors).
18719         (EventField): New class. For events that are declared like field.
18720         class.cs
18721
18722         * cs-parser.jay: Implemented explicit attribute target declaration.
18723
18724         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
18725         Override ValidAttributeTargets.
18726
18727         * parameter.cs:
18728         (ReturnParameter): Class for applying custom attributes on 
18729         the return type.
18730         (ParameterAtribute): New class. Class for applying custom
18731         attributes on the parameter type.
18732
18733 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
18734
18735         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
18736         definitions. 
18737
18738         (Method): Allow UNSAFE here.
18739
18740         * modifiers.cs: Support unsafe reporting.
18741
18742 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
18743
18744         * decl.cs: Fix bug #58478.
18745
18746 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18747
18748         * statement.cs: When checking for unreachable code on an EmptyStatement,
18749         set the location. Fixes bug #58488.
18750
18751 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
18752
18753         * driver.cs: Add -pkg handling.
18754
18755         From Gonzalo: UseShelLExecute=false
18756
18757 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
18758
18759         * attribute.cs:
18760         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
18761         for attribute.
18762         (Attribute.IsClsCompliaceRequired): Moved to base for better
18763         accesibility.
18764         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
18765         when attribute is AttributeUsageAttribute.
18766         (Attribute.GetValidTargets): Simplified.
18767         (Attribute.GetAttributeUsage): New method returns AttributeUsage
18768         attribute for this type.
18769         (Attribute.ApplyAttributes): Method renamed to Emit and make
18770         non-static.
18771         (GlobalAttributeSection): New class for special handling of global
18772         attributes (assembly, module).
18773         (AttributeSection.Emit): New method.
18774
18775         * class.cs: Implemented Attributable abstract methods.
18776         (MethodCore.LabelParameters): Moved to Parameter class.
18777         (Accessor): Is back simple class.
18778         (PropertyMethod): Implemented Attributable abstract class.
18779         (DelegateMethod): Implemented Attributable abstract class.
18780         (Event): New constructor for disctintion between normal Event
18781         and Event with accessors.
18782
18783         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
18784
18785         * codegen.cs, const.cs, decl.cs, delegate.cs:
18786         (CommonAssemblyModulClass): Implemented Attributable abstract class
18787         and simplified.
18788
18789         * enum.cs: Implement IAttributeSupport interface.
18790         (EnumMember): New class for emum members. Implemented Attributable
18791         abstract class
18792
18793         * parameter.cs:
18794         (ParameterBase): Is abstract.
18795         (ReturnParameter): New class for easier [return:] attribute handling.
18796
18797         * typemanager.cs: Removed builder_to_attr.
18798
18799 2004-05-11  Raja R Harinath  <rharinath@novell.com>
18800
18801         Fix bug #57151.
18802         * attribute.cs (Attribute.GetPositionalValue): New function.
18803         * class.cs (TypeContainer.VerifyMembers): New function.
18804         (TypeContainer.Emit): Use it.
18805         (ClassOrStruct): New base class for Class and Struct.
18806         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
18807         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
18808         class.
18809         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
18810         then each non-static field should have a FieldOffset attribute.
18811         Otherwise, none of the fields should have a FieldOffset attribute.
18812         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
18813         and FieldOffset attributes.
18814         * typemanager.cs (TypeManager.struct_layout_attribute_type)
18815         (TypeManager.field_offset_attribute_type): New core types.
18816         (TypeManager.InitCoreTypes): Initialize them.
18817
18818 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
18819
18820         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
18821         Return correct type.
18822         From bug #58270.
18823
18824 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
18825
18826         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
18827         be implicitly converted to ulong.
18828         
18829         * expression.cs: The logic for allowing operator &, | and ^ worked
18830         was wrong, it worked before because we did not report an error in
18831         an else branch.  Fixes 57895.
18832
18833         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
18834         allow volatile fields to be reference types.
18835
18836 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
18837
18838         * driver.cs: Add support for /debug-
18839
18840 2004-05-07  Raja R Harinath  <rharinath@novell.com>
18841
18842         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
18843         Add a 'complain' parameter to silence errors.
18844         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
18845         silently overlooked type-resolutions.
18846         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
18847         to reflect changes.
18848         (Attributes.Search): New function.
18849         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
18850         (Attributes.GetAttributeFullName): Remove hack.
18851         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
18852         Update to reflect changes.
18853         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
18854         Use Attributes.Search instead of nested loops.
18855
18856 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
18857
18858         * decl.cs:
18859         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
18860         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
18861         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
18862
18863         * report.cs: (Report.Warning): Renamed to Warning_T because of
18864         parameter collision.
18865
18866 2004-05-05  Raja R Harinath  <rharinath@novell.com>
18867
18868         * expression.cs (MemberAccess.ResolveMemberAccess):
18869         Exit with non-zero status after Report.Error.
18870         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
18871         Likewise.
18872         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
18873
18874 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18875
18876         * support.cs: Don't hang when the file is empty.
18877
18878 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18879
18880         * support.cs: In SeekableStreamReader, compute the preamble size of the
18881           underlying stream. Position changes should take into account that initial
18882           count of bytes.
18883
18884 2004-05-03  Todd Berman  <tberman@sevenl.net>
18885
18886         * driver.cs: remove unused GetSysVersion function.
18887
18888 2004-05-03  Todd Berman  <tberman@sevenl.net>
18889
18890         * driver.cs: Remove the hack from saturday, as well as the hack
18891         from jackson (LoadAssemblyFromGac), also adds the CWD to the
18892         link_paths to get that bit proper.
18893
18894 2004-05-01  Todd Berman  <tberman@sevenl.net>
18895
18896         * driver.cs: Try a LoadFrom before a Load, this checks the current
18897         path. This is currently a bug in mono that is be fixed, however, this
18898         provides a workaround for now. This will be removed when the bug
18899         is fixed.
18900
18901 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
18902
18903         * CryptoConvert.cs: Updated to latest version. Fix issue with 
18904         incomplete key pairs (#57941).
18905
18906 2004-05-01  Todd Berman  <tberman@sevenl.net>
18907
18908         * driver.cs: Remove '.' from path_chars, now System.* loads properly
18909         from the GAC
18910
18911 2004-04-30  Jackson Harper  <jackson@ximian.com>
18912
18913         * codegen.cs: Open keys readonly.
18914         
18915 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18916
18917         * typemanager.cs: don't report cyclic struct layout when a struct
18918         contains 2 or more fields of the same type. Failed for Pango.AttrShape
18919         which has 2 Pango.Rectangle fields.
18920
18921 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
18922
18923         * expression.cs: Handle IntPtr comparisons with IL code
18924         rather than a method call.
18925
18926 2004-04-29  Martin Baulig  <martin@ximian.com>
18927
18928         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
18929         the list of PropertyInfo's in class hierarchy and find the
18930         accessor.  Fixes #56013.
18931
18932 2004-04-29  Martin Baulig  <martin@ximian.com>
18933
18934         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
18935
18936 2004-04-29  Martin Baulig  <martin@ximian.com>
18937
18938         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
18939
18940         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
18941
18942 2004-04-29  Martin Baulig  <martin@ximian.com>
18943
18944         * class.cs (ConstructorInitializer.Resolve): Check whether the
18945         parent .ctor is accessible.  Fixes #52146.
18946
18947 2004-04-29  Martin Baulig  <martin@ximian.com>
18948
18949         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
18950
18951         * statement.cs (Using.EmitLocalVariableDecls): Use
18952         TypeManager.idisposable_type, not typeof (IDisposable).
18953         (Foreach.EmitCollectionForeach): Added support for valuetypes.
18954
18955 2004-04-29  Martin Baulig  <martin@ximian.com>
18956
18957         * class.cs (Event.Define): Don't emit the field and don't set
18958         RTSpecialName and SpecialName for events on interfaces.  Fixes
18959         #57703. 
18960
18961 2004-04-29  Raja R Harinath  <rharinath@novell.com>
18962
18963         Refactor Attribute.ApplyAttributes.
18964         * attribute.cs (Attributable): New base class for objects that can
18965         have Attributes applied on them.
18966         (Attribute): Make AttributeUsage fields public.
18967         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
18968         (Attribute.IsInternalCall): New property.
18969         (Attribute.UsageAttr): Convert to a public read-only property.
18970         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
18971         (Attribute.ResolveType, Attribute.Resolve)
18972         (Attribute.ScanForIndexerName): Update to reflect changes.
18973         (Attribute.CheckAttributeTarget): Re-format.
18974         (Attribute.ApplyAttributes): Refactor, to various
18975         Attributable.ApplyAttributeBuilder methods.
18976         * decl.cs (MemberCore): Make Attributable.
18977         * class.cs (Accessor): Make Attributable.
18978         (MethodData.ApplyAttributes): Use proper attribute types, not
18979         attribute names.
18980         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
18981         (TypeContainer.ApplyAttributeBuilder)
18982         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
18983         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
18984         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
18985         (Operator.ApplyAttributeBuilder): New factored-out methods.
18986         * const.cs (Const.ApplyAttributeBuilder): Likewise.
18987         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
18988         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
18989         * parameter.cs (ParameterBase): New Attributable base class
18990         that can also represent Return types.
18991         (Parameter): Update to the changes.
18992
18993 2004-04-29  Jackson Harper  <jackson@ximian.com>
18994
18995         * driver.cs: Prefer the corlib system version when looking for
18996         assemblies in the GAC. This is still a hack, but its a better hack
18997         now.
18998         
18999 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19000
19001         * decl.cs, enum.cs: Improved error 3005 reporting.
19002   
19003         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19004         (related_symbols): New private member for list of symbols
19005         related to reported error/warning.
19006         
19007         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19008
19009 2004-04-29  Martin Baulig  <martin@ximian.com>
19010
19011         * ecore.cs (Expression.Constantify): If we're an enum and
19012         TypeManager.TypeToCoreType() doesn't give us another type, use
19013         t.UnderlyingSystemType.  Fixes #56178.  
19014
19015 2004-04-29  Martin Baulig  <martin@ximian.com>
19016
19017         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19018         interfaces and for each interface, only add members directly
19019         declared in that interface.  Fixes #53255.
19020
19021 2004-04-28  Martin Baulig  <martin@ximian.com>
19022
19023         * expression.cs (ConditionalLogicalOperator): Use a temporary
19024         variable for `left' to avoid that we evaluate it more than once;
19025         bug #52588.
19026
19027 2004-04-28  Martin Baulig  <martin@ximian.com>
19028
19029         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19030         `void[]' (CS1547).
19031
19032 2004-04-28  Martin Baulig  <martin@ximian.com>
19033
19034         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19035         void (CS1547).
19036
19037         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19038         whether the type is not void (CS1547).
19039
19040 2004-04-28  Martin Baulig  <martin@ximian.com>
19041
19042         * expression.cs (Unary.DoResolveLValue): Override this and report
19043         CS0131 for anything but Operator.Indirection.
19044
19045 2004-04-28  Martin Baulig  <martin@ximian.com>
19046
19047         Committing a patch from Ben Maurer; see bug #50820.
19048
19049         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19050         check for classes.
19051
19052         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19053         classes.        
19054
19055 2004-04-28  Martin Baulig  <martin@ximian.com>
19056
19057         Committing a patch from Ben Maurer; see bug #50820.
19058
19059         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19060         check for classes.
19061
19062         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19063         classes.        
19064
19065 2004-04-28  Martin Baulig  <martin@ximian.com>
19066
19067         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19068         (Block.AddLabel): Call DoLookupLabel() to only search in the
19069         current block.
19070
19071 2004-04-28  Martin Baulig  <martin@ximian.com>
19072
19073         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19074         comparing StringConstants and NullLiterals in Equality and Inequality.
19075
19076 2004-04-28  Jackson Harper  <jackson@ximian.com>
19077
19078         * driver.cs: Attempt to load referenced assemblies from the
19079         GAC. This is the quick and dirty version of this method that
19080         doesnt take into account versions and just takes the first
19081         canidate found. Will be good enough for now as we will not have more
19082         then one version installed into the GAC until I update this method.
19083
19084 2004-04-28  Martin Baulig  <martin@ximian.com>
19085
19086         * typemanager.cs (TypeManager.CheckStructCycles): New public
19087         static method to check for cycles in the struct layout.
19088
19089         * rootcontext.cs (RootContext.PopulateTypes): Call
19090         TypeManager.CheckStructCycles() for each TypeContainer.
19091         [Note: We only need to visit each type once.]
19092
19093 2004-04-28  Martin Baulig  <martin@ximian.com>
19094
19095         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19096
19097         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19098         success and added `out object value'.  Use a `bool resolved' field
19099         to check whether we've already been called rather than
19100         `ConstantValue != null' since this breaks for NullLiterals.
19101
19102 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19103
19104         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19105         setting of this flag, since the 'set' method may be non-public.
19106
19107 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19108
19109         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19110         check on current_vector.Block.
19111
19112 2004-04-27  Martin Baulig  <martin@ximian.com>
19113
19114         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19115         a field initializer.  Fixes #56459.
19116
19117 2004-04-27  Martin Baulig  <martin@ximian.com>
19118
19119         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19120         we're not attempting to use an indexer.  Fixes #52154.
19121
19122 2004-04-27  Martin Baulig  <martin@ximian.com>
19123
19124         * statement.cs (Return): Don't create a return label if we don't
19125         need it; reverts my change from January 20th.  Thanks to Ben
19126         Maurer for this.
19127
19128 2004-04-27  Martin Baulig  <martin@ximian.com>
19129
19130         According to the spec, `goto' can only leave a nested scope, but
19131         never enter it.
19132
19133         * statement.cs (Block.LookupLabel): Only lookup in the current
19134         block, don't recurse into parent or child blocks.
19135         (Block.AddLabel): Check in parent and child blocks, report
19136         CS0140/CS0158 if we find a duplicate.
19137         (Block): Removed this indexer for label lookups.
19138         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19139         this already does the error reporting for us.
19140
19141         * flowanalysis.cs
19142         (FlowBranching.UsageVector.Block): New public variable; may be null.
19143         (FlowBranching.CreateSibling): Added `Block' argument.
19144         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19145         label for the target of a `goto' and check whether we're not
19146         leaving a `finally'.
19147
19148 2004-04-27  Martin Baulig  <martin@ximian.com>
19149
19150         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19151         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19152         just for returns).
19153
19154 2004-04-27  Martin Baulig  <martin@ximian.com>
19155
19156         * statement.cs (Block.AddLabel): Also check for implicit blocks
19157         and added a CS0158 check.
19158
19159 2004-04-27  Martin Baulig  <martin@ximian.com>
19160
19161         * flowanalysis.cs (FlowBranchingLoop): New class.
19162         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19163         UsageVector's instead of an ArrayList.
19164         (FlowBranching.Label): Likewise.
19165         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19166         (FlowBranching.AddBreakVector): New method.
19167
19168 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19169
19170         * attribute.cs: Small regression fix: only convert the type if we
19171         the type is different, fixes System.Drawing build.
19172
19173 2004-04-27  Martin Baulig  <martin@ximian.com>
19174
19175         * attribute.cs (Attribute.Resolve): If we have a constant value
19176         for a named field or property, implicity convert it to the correct
19177         type.
19178
19179 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19180
19181         * statement.cs (Block.Block): Implicit blocks share
19182         'child_variable_names' fields with parent blocks.
19183         (Block.AddChildVariableNames): Remove.
19184         (Block.AddVariable): Mark variable as "used by a child block" in
19185         every surrounding block.
19186         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19187         been used in a child block, complain about violation of "Invariant
19188         meaning in blocks" rule.
19189         * cs-parser.jay (declare_local_variables): Don't use
19190         AddChildVariableNames.
19191         (foreach_statement): Don't create an implicit block: 'foreach'
19192         introduces a scope.
19193
19194 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19195
19196         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19197         converting from 0L to ulong.  Fixes 57522.
19198
19199 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19200
19201         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19202         derived class hides via 'new' keyword field from base class (test-242.cs).
19203         TODO: Handle this in the more general way.
19204         
19205         * class.cs (CheckBase): Ditto.
19206
19207 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19208
19209         * decl.cs (caching_flags): New member for storing cached values
19210         as bit flags.
19211         (MemberCore.Flags): New enum where bit flags for caching_flags
19212         are defined.
19213         (MemberCore.cls_compliance): Moved to caching_flags.
19214         (DeclSpace.Created): Moved to caching_flags.
19215
19216         * class.cs: Use caching_flags instead of DeclSpace.Created
19217         
19218 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19219
19220         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19221         if we are only a derived class, not a nested class.
19222
19223         * typemanager.cs: Same as above, but do this at the MemberLookup
19224         level (used by field and methods, properties are handled in
19225         PropertyExpr).   Allow for the qualified access if we are a nested
19226         method. 
19227
19228 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19229
19230         * class.cs: Refactoring.
19231         (IMethodData): New inteface; Holds links to parent members
19232         to avoid member duplication (reduced memory allocation).
19233         (Method): Implemented IMethodData interface.
19234         (PropertyBase): New inner classes for get/set methods.
19235         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19236         (Event): New inner classes for add/remove methods.
19237         (Event.DelegateMethod): Implemented IMethodData interface.
19238
19239         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19240         EmitContext (related to class.cs refactoring).
19241
19242 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19243
19244         * delegate.cs (Delegate.VerifyApplicability): If the number of
19245         arguments are the same as the number of parameters, first try to
19246         verify applicability ignoring  any 'params' modifier on the last
19247         parameter.
19248         Fixes #56442.
19249
19250 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19251
19252         * class.cs (TypeContainer.AddIndexer): Use
19253         'ExplicitInterfaceName' to determine if interface name was
19254         explicitly specified.  'InterfaceType' is not initialized at this time.
19255         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19256         Indexers array is already in the required order.  Initialize
19257         'IndexerName' only if there are normal indexers.
19258         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19259         (TypeContainer.Emit): Emit DefaultMember attribute only if
19260         IndexerName is initialized.
19261         Fixes #56300.
19262
19263 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19264
19265         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19266         Fixes #57007
19267
19268 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19269
19270         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19271         attributes.
19272         Fix for #56456.
19273
19274         * attribute.cs (Attribute.Resolve): Check for duplicate named
19275         attributes.
19276         Fix for #56463.
19277
19278 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19279
19280         * iterators.cs (MarkYield): track whether we are in an exception,
19281         and generate code accordingly.  Use a temporary value to store the
19282         result for our state.
19283
19284         I had ignored a bit the interaction of try/catch with iterators
19285         since their behavior was not entirely obvious, but now it is
19286         possible to verify that our behavior is the same as MS .NET 2.0
19287
19288         Fixes 54814
19289
19290 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19291
19292         * iterators.cs: Avoid creating temporaries if there is no work to
19293         do. 
19294
19295         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19296         Enumerations, use TypeManager.EnumToUnderlying and call
19297         recursively. 
19298
19299         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19300         bug #57013
19301
19302         (This.Emit): Use EmitContext.EmitThis to emit our
19303         instance variable.
19304
19305         (This.EmitAssign): Ditto.
19306
19307         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19308         codepaths, we will move all the functionality into
19309         Mono.CSharp.This 
19310
19311         (FieldExpr.EmitAssign): Ditto.
19312
19313         This fixes several hidden bugs that I uncovered while doing a code
19314         review of this today.
19315
19316         * codegen.cs (EmitThis): reworked so the semantics are more clear
19317         and also support value types "this" instances.
19318
19319         * iterators.cs: Changed so that for iterators in value types, we
19320         do not pass the value type as a parameter.  
19321
19322         Initialization of the enumerator helpers is now done in the caller
19323         instead of passing the parameters to the constructors and having
19324         the constructor set the fields.
19325
19326         The fields have now `assembly' visibility instead of private.
19327
19328 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19329
19330         * expression.cs (Argument.Resolve): Check if fields passed as ref
19331         or out are contained in a MarshalByRefObject.
19332
19333         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19334         another compiler type.
19335
19336 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19337
19338         * class.cs (Indexer.Define): use the new name checking method.
19339         Also, return false on an error.
19340         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19341         (is_identifier_[start/part]_character): make static.
19342
19343 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19344
19345         * expression.cs (Binary.ResolveOperator): Do no append strings
19346         twice: since we can be invoked more than once (array evaluation)
19347         on the same concatenation, take care of this here.  Based on a fix
19348         from Ben (bug #56454)
19349
19350 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19351
19352         * codegen.cs: Fix another case where CS1548 must be reported (when 
19353         delay-sign isn't specified and no private is available #56564). Fix
19354         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19355         error when MCS is used on the MS runtime and we need to delay-sign 
19356         (which seems unsupported by AssemblyBuilder - see #56621).
19357
19358 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19359
19360         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19361         (TypeManager.ComputeNamespaces): Faster implementation for
19362         Microsoft runtime.
19363
19364         * compiler.csproj: Updated AssemblyName to mcs.
19365
19366 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19367
19368         * rootcontext.cs: Add new types to the boot resolution.
19369
19370         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19371         MulticastDelegate is not allowed.
19372
19373         * typemanager.cs: Add new types to lookup: System.TypedReference
19374         and ArgIterator.
19375
19376         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19377         check for TypedReference or ArgIterator, they are not allowed. 
19378
19379         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19380         makes us properly catch 1510 in some conditions (see bug 56016 for
19381         details). 
19382
19383 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19384
19385         * CryptoConvert.cs: update from corlib version
19386         with endian fixes.
19387
19388 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19389
19390         * class.cs (Indexer.Define): Check indexername declaration
19391
19392 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19393
19394         * attribute.cs (IsClsCompliant): Fixed problem with handling
19395         all three states (compliant, not-compliant, undetected).
19396
19397 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19398
19399         * attribute.cs (Attribute): Location is now public.
19400         (Resolve): Store resolved arguments (pos_values) in attribute class.
19401         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19402         (GetClsCompliantAttributeValue): New method that gets
19403         CLSCompliantAttribute value.
19404         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19405         if exists else null.
19406         (AttributeTester): New class for CLS-Compliant verification routines.
19407
19408         * class.cs (Emit): Add CLS-Compliant verification.
19409         (Method.GetSignatureForError): Implemented.
19410         (Constructor.GetSignatureForError): Implemented
19411         (Constructor.HasCompliantArgs): Returns if constructor has
19412         CLS-Compliant arguments.
19413         (Constructor.Emit): Override.
19414         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19415         is needed to test only parameters.
19416         (FieldBase.GetSignatureForError): Implemented.
19417         (TypeContainer): New member for storing base interfaces.
19418         (TypeContainer.FindMembers): Search in base interfaces too.
19419
19420         * codegen.cs (GetClsComplianceAttribute): New method that gets
19421         assembly or module CLSCompliantAttribute value.
19422         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19423         for assembly.
19424         (ModuleClass.Emit): Add error 3012 test.
19425
19426         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19427
19428         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19429         state for all decl types.
19430         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19431         if CLS-Compliant tests are required.
19432         (IsClsCompliaceRequired): New method. Analyze whether code
19433         must be CLS-Compliant.
19434         (IsExposedFromAssembly): New method. Returns true when MemberCore
19435         is exposed from assembly.
19436         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19437         value or gets cached value.
19438         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19439         is explicitly marked with CLSCompliantAttribute.
19440         (IsIdentifierClsCompliant): New abstract method. This method is
19441         used to testing error 3005.
19442         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19443         for identifier and parameters CLS-Compliant testing.
19444         (VerifyClsCompliance): New method. The main virtual method for
19445         CLS-Compliant verifications.
19446         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19447         null. I don't know why is null (too many public members !).
19448         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19449         and get value of first CLSCompliantAttribute that found.
19450
19451         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19452         (VerifyClsCompliance): Override and add extra tests.
19453
19454         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19455         clscheck- disable CLS-Compliant verification event if assembly is has
19456         CLSCompliantAttribute(true).
19457
19458         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19459         ApllyAttribute is now called in emit section as in the other cases.
19460         Possible future Emit integration.
19461         (IsIdentifierClsCompliant): New override.
19462         (VerifyClsCompliance): New override.
19463         (GetEnumeratorName): Returns full enum name.
19464
19465         * parameter.cs (GetSignatureForError): Implemented.
19466
19467         * report.cs (WarningData): New struct for Warning message information.
19468         (LocationOfPreviousError): New method.
19469         (Warning): New method. Reports warning based on the warning table.
19470         (Error_T): New method. Reports error based on the error table.
19471
19472         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19473         verifications are done here.
19474
19475         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19476
19477         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19478         CLSCompliantAttribute.
19479         (all_imported_types): New member holds all imported types from other
19480         assemblies.
19481         (LoadAllImportedTypes): New method fills static table with exported types
19482         from all referenced assemblies.
19483         (Modules): New property returns all assembly modules.
19484
19485 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19486
19487         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19488         throwing a parser error.
19489
19490         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19491         which removes the hardcoded get_/set_ prefixes for properties, as
19492         IL allows for the properties to be named something else.  
19493
19494         Bug #56013
19495
19496         * expression.cs: Do not override operand before we know if it is
19497         non-null.  Fix 56207
19498
19499 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19500
19501         * typemanager.cs: support for pinned variables.
19502
19503 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19504
19505         * decl.cs, typemanager.cs: Avoid using an arraylist
19506         as a buffer if there is only one result set.
19507
19508 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19509
19510         * expression.cs: Make sure you cant call a static method
19511         with an instance expression, bug #56174.
19512
19513 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19514
19515         * class.cs (IsDuplicateImplementation): Improve error reporting to
19516         flag 663 (method only differs in parameter modifier).
19517
19518         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19519         in preprocessor directives.
19520
19521         * location.cs (LookupFile): Allow for the empty path.
19522
19523         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19524         better approach for some of that patch, but its failing with the
19525         CharSet enumeration.  For now try/catch will do.
19526
19527         * typemanager.cs: Do not crash if a struct does not have fields.
19528         Fixes 56150.
19529
19530 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19531
19532         * expression.cs: cs0213, cant fix a fixed expression.
19533         fixes 50231.
19534
19535 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19536
19537         * cs-parser.jay: detect invalid embeded statements gracefully.
19538         bug #51113.
19539
19540 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19541
19542         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19543         As a regex:
19544         s/
19545         the invocation type may not be a subclass of the tye of the item/
19546         The type of the item must be a subclass of the invocation item.
19547         /g
19548
19549         Fixes bug #50820.
19550
19551 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19552
19553         * attribute.cs: Added methods to get a string and a bool from an
19554         attribute. Required to information from AssemblyKeyFileAttribute,
19555         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19556         * codegen.cs: Modified AssemblyName creation to include support for
19557         strongnames. Catch additional exceptions to report them as CS1548.
19558         * compiler.csproj: Updated include CryptoConvert.cs.
19559         * compiler.csproj.user: Removed file - user specific configuration.
19560         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19561         Mono.Security assembly. The original class is maintained and tested in
19562         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19563         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19564         like CSC 8.0 (C# v2) supports.
19565         * Makefile: Added CryptoConvert.cs to mcs sources.
19566         * rootcontext.cs: Added new options for strongnames.
19567
19568 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19569
19570         * driver.cs: For --expect-error, report error code `2'
19571         if the program compiled with no errors, error code `1' if
19572         it compiled with an error other than the one expected.
19573
19574 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19575
19576         * compiler.csproj: Updated for Visual Studio .NET 2003.
19577         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19578         * compiler.sln: Updated for Visual Studio .NET 2003.
19579
19580 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19581
19582         * expression.cs: Fix bug #47234. We basically need to apply the
19583         rule that we prefer the conversion of null to a reference type
19584         when faced with a conversion to 'object' (csc behaviour).
19585
19586 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19587
19588         * statement.cs: Shorter form for foreach, eliminates
19589         a local variable. r=Martin.
19590
19591 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19592
19593         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
19594         checks if we can use brtrue/brfalse to test for 0.
19595         * expression.cs: use the above in the test for using brtrue/brfalse.
19596         cleanup code a bit.
19597
19598 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19599
19600         * expression.cs: Rewrite string concat stuff. Benefits:
19601
19602         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
19603         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
19604         rather than a concat chain.
19605
19606         * typemanager.cs: Add lookups for more concat overloads.
19607
19608 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19609
19610         * expression.cs: Emit shorter il code for array init.
19611
19612         newarr
19613         dup
19614         // set 1
19615
19616         // set 2
19617
19618         newarr
19619         stloc.x
19620
19621         ldloc.x
19622         // set 1
19623
19624         ldloc.x
19625         // set 2
19626
19627 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
19628
19629         * statement.cs: Before, two switch blocks would be merged if the
19630         total size of the blocks (end_item - begin_item + 1) was less than
19631         two times the combined sizes of the blocks.
19632
19633         Now, it will only merge if after the merge at least half of the
19634         slots are filled.
19635
19636         fixes 55885.
19637
19638 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
19639
19640         * class.cs : csc build fix for GetMethods(). See bug #52503.
19641
19642 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19643
19644         * expression.cs: Make sure fp comparisons work with NaN.
19645         This fixes bug #54303. Mig approved this patch a long
19646         time ago, but we were not able to test b/c the runtime
19647         had a related bug.
19648
19649 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
19650
19651         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
19652
19653 2004-03-19  Martin Baulig  <martin@ximian.com>
19654
19655         * class.cs (MemberCore.IsDuplicateImplementation): Report the
19656         error here and not in our caller.
19657
19658 2004-03-19  Martin Baulig  <martin@ximian.com>
19659
19660         * interface.cs: Completely killed this file.
19661         (Interface): We're now a TypeContainer and live in class.cs.
19662
19663         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
19664         argument; we're now also called for interfaces.
19665         (TypeContainer.DefineMembers): Allow this method being called
19666         multiple times.
19667         (TypeContainer.GetMethods): New public method; formerly known as
19668         Interface.GetMethod().  This is used by PendingImplementation.
19669         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
19670         it's now private and non-static.
19671         (Interface): Moved this here; it's now implemented similar to
19672         Class and Struct.
19673         (Method, Property, Event, Indexer): Added `bool is_interface'
19674         argument to their .ctor's.
19675         (MemberBase.IsInterface): New public field.
19676
19677         * cs-parser.jay: Create normal Method, Property, Event, Indexer
19678         instances instead of InterfaceMethod, InterfaceProperty, etc.
19679         (opt_interface_base): Removed; we now use `opt_class_base' instead.
19680         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
19681
19682 2004-03-19  Martin Baulig  <martin@ximian.com>
19683
19684         * class.cs (MethodCore.IsDuplicateImplementation): New private
19685         method which does the CS0111 checking.
19686         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
19687         Use IsDuplicateImplementation().
19688
19689 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19690
19691         * decl.cs (FindMemberToOverride): New method to find the correct
19692         method or property to override in the base class.
19693         * class.cs
19694             - Make Method/Property use the above method to find the
19695               version in the base class.
19696             - Remove the InheritableMemberSignatureCompare as it is now
19697               dead code.
19698
19699         This patch makes large code bases much faster to compile, as it is
19700         O(n) rather than O(n^2) to do this validation.
19701
19702         Also, it fixes bug 52458 which is that nested classes are not
19703         taken into account when finding the base class member.
19704
19705         Reviewed/Approved by Martin.
19706
19707 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
19708
19709         * interface.cs: In all interface classes removed redundant
19710         member initialization.
19711
19712 2004-03-16  Martin Baulig  <martin@ximian.com>
19713
19714         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
19715
19716 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
19717
19718         * decl.cs (DefineTypeAndParents): New helper method to define a
19719         type's containers before the type itself is defined;  This is a
19720         bug exposed by the recent changes to Windows.Forms when an
19721         implemented interface was defined inside a class that had not been
19722         built yet.   
19723
19724         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
19725
19726         (Check): Loop correctly to report errors modifiers
19727         (UNSAFE was not in the loop, since it was the same as TOP).
19728
19729         * interface.cs: Every interface member now takes a ModFlags,
19730         instead of a "is_new" bool, which we set on the base MemberCore. 
19731
19732         Every place where we called "UnsafeOk" in the interface, now we
19733         call the proper member (InterfaceMethod.UnsafeOK) instead to get
19734         the unsafe settings from the member declaration instead of the
19735         container interface. 
19736
19737         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
19738
19739         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
19740         `set_indexer_name' to the pending bits (one per type).
19741
19742         We fixed a bug today that was picking the wrong method to
19743         override, since for properties the existing InterfaceMethod code
19744         basically ignored the method name.  Now we make sure that the
19745         method name is one of the valid indexer names.
19746
19747 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
19748  
19749         * support.cs (SeekableStreamReader): Keep track of stream byte
19750         positions and don't mix them with character offsets to the buffer.
19751
19752         Patch from Gustavo Giráldez
19753
19754 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
19755
19756         * interface.cs (InterfaceSetGetBase): Removed double member
19757         initialization, base class does it as well.
19758
19759 2004-03-13  Martin Baulig  <martin@ximian.com>
19760
19761         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
19762         when compiling corlib.
19763
19764 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
19765
19766         * convert.cs (ExplicitConversion): We were reporting an error on
19767         certain conversions (object_type source to a value type, when the
19768         expression was `null') before we had a chance to pass it through
19769         the user defined conversions.
19770
19771         * driver.cs: Replace / and \ in resource specifications to dots.
19772         Fixes 50752
19773
19774         * class.cs: Add check for duplicate operators.  Fixes 52477
19775
19776 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
19777
19778         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
19779         that are in the middle of the statements, not only at the end.
19780         Fixes #54987
19781
19782         * class.cs (TypeContainer.AddField): No longer set the
19783         `HaveStaticConstructor' flag, now we call it
19784         `UserDefineStaticConstructor' to diferentiate the slightly
19785         semantic difference.
19786
19787         The situation is that we were not adding BeforeFieldInit (from
19788         Modifiers.TypeAttr) to classes that could have it.
19789         BeforeFieldInit should be set to classes that have no static
19790         constructor. 
19791
19792         See:
19793
19794         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
19795
19796         And most importantly Zoltan's comment:
19797
19798         http://bugzilla.ximian.com/show_bug.cgi?id=44229
19799
19800         "I think beforefieldinit means 'it's ok to initialize the type sometime 
19801          before its static fields are used', i.e. initialization does not need
19802          to be triggered by the first access to the type. Setting this flag
19803          helps the JIT to compile better code, since it can run the static
19804          constructor at JIT time, and does not need to generate code to call it
19805          (possibly lots of times) at runtime. Unfortunately, mcs does not set
19806          this flag for lots of classes like String. 
19807          
19808          csc sets this flag if the type does not have an explicit static 
19809          constructor. The reasoning seems to be that if there are only static
19810          initalizers for a type, and no static constructor, then the programmer
19811          does not care when this initialization happens, so beforefieldinit
19812          can be used.
19813          
19814          This bug prevents the AOT compiler from being usable, since it 
19815          generates so many calls to mono_runtime_class_init that the AOT code
19816          is much slower than the JITted code. The JITted code is faster, 
19817          because it does not generate these calls if the vtable is type is
19818          already initialized, which is true in the majority of cases. But the
19819          AOT compiler can't do this."
19820
19821 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
19822
19823         * class.cs (MethodData.Emit): Refactor the code so symbolic
19824         information is generated for destructors;  For some reasons we
19825         were taking a code path that did not generate symbolic information
19826         before. 
19827
19828 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
19829
19830         * class.cs: Create a Constructor.CheckBase method that
19831         takes care of all validation type code. The method
19832         contains some code that was moved from Define.
19833
19834         It also includes new code that checks for duplicate ctors.
19835         This fixes bug #55148.
19836
19837 2004-03-09  Joshua Tauberer <tauberer@for.net>
19838
19839         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
19840         a { ... }-style array creation invokes EmitStaticInitializers
19841         which is not good for reference-type arrays.  String, decimal
19842         and now null constants (NullCast) are not counted toward
19843         static initializers.
19844
19845 2004-03-05  Martin Baulig  <martin@ximian.com>
19846
19847         * location.cs (SourceFile.HasLineDirective): New public field;
19848         specifies whether the file contains or is referenced by a "#line"
19849         directive.
19850         (Location.DefineSymbolDocuments): Ignore source files which
19851         either contain or are referenced by a "#line" directive.        
19852
19853 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
19854
19855         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
19856         direct access to our parent, so check the method inline there.
19857
19858 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19859
19860         * expression.cs (Invocation.EmitCall): Miguel's last commit
19861         caused a regression. If you had:
19862
19863             T t = null;
19864             t.Foo ();
19865
19866         In Foo the implict this would be null.
19867
19868 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
19869
19870         * expression.cs (Invocation.EmitCall): If the method is not
19871         virtual, do not emit a CallVirt to it, use Call.
19872
19873         * typemanager.cs (GetFullNameSignature): Improve the method to
19874         cope with ".ctor" and replace it with the type name.
19875
19876         * class.cs (ConstructorInitializer.Resolve): Now the method takes
19877         as an argument the ConstructorBuilder where it is being defined,
19878         to catch the recursive constructor invocations.
19879
19880 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
19881
19882         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
19883         routines to check if a type is an enumerable/enumerator allow
19884         classes that implement the IEnumerable or IEnumerator interfaces.
19885
19886         * class.cs (Property, Operator): Implement IIteratorContainer, and
19887         implement SetYields.
19888
19889         (Property.Define): Do the block swapping for get_methods in the
19890         context of iterators.   We need to check if Properties also
19891         include indexers or not.
19892
19893         (Operator): Assign the Block before invoking the
19894         OperatorMethod.Define, so we can trigger the Iterator code
19895         replacement. 
19896
19897         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
19898         Property and Operator classes are not created when we parse the
19899         declarator but until we have the block completed, so we use a
19900         singleton SimpleIteratorContainer.Simple to flag whether the
19901         SetYields has been invoked.
19902
19903         We propagate this setting then to the Property or the Operator to
19904         allow the `yield' to function.
19905
19906 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
19907
19908         * codegen.cs: Implemented attribute support for modules.
19909         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
19910         Assembly/Module functionality.
19911
19912         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
19913         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
19914         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
19915
19916 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
19917
19918         * interface.cs (FindMembers): The operation is performed on all base
19919         interfaces and not only on the first. It is required for future CLS Compliance patch.
19920
19921 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
19922
19923         * statement.cs, codegen.cs:
19924         This patch deals with patterns such as:
19925
19926         public class List : IEnumerable {
19927
19928                 public MyEnumerator GetEnumerator () {
19929                         return new MyEnumerator(this);
19930                 }
19931
19932                 IEnumerator IEnumerable.GetEnumerator () {
19933                         ...
19934                 }
19935                 
19936                 public struct MyEnumerator : IEnumerator {
19937                         ...
19938                 }
19939         }
19940
19941         Before, there were a few things we did wrong:
19942         1) we would emit callvirt on a struct, which is illegal
19943         2) we emited ldarg when we needed to emit ldarga
19944         3) we would mistakenly call the interface methods on an enumerator
19945         type that derived from IEnumerator and was in another assembly. For example:
19946
19947         public class MyEnumerator : IEnumerator
19948
19949         Would have the interface methods called, even if there were public impls of the
19950         method. In a struct, this lead to invalid IL code.
19951
19952 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
19953
19954         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
19955           renamed to Emit.
19956
19957         * delegate.cs (Define): Fixed crash when delegate type is undefined.
19958
19959 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
19960
19961         * cs-parser.jay: Fix small regression: we were not testing V2
19962         compiler features correctly.
19963
19964         * interface.cs: If the emit context is null, then create one
19965
19966 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
19967
19968         * decl.cs (GetSignatureForError): New virtual method to get full name
19969           for error messages.
19970
19971         * attribute.cs (IAttributeSupport): New interface for attribute setting.
19972           Now it is possible to rewrite ApplyAttributes method to be less if/else.
19973
19974         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
19975           Duplicated members and code in these classes has been removed.
19976           Better encapsulation in these classes.
19977
19978 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
19979
19980         * assign.cs (Assign.DoResolve): When dealing with compound
19981         assignments, there is a new rule in ECMA C# 2.4 (might have been
19982         there before, but it is documented here) that states that in:
19983
19984         a op= b;
19985
19986         If b is of type int, and the `op' is a shift-operator, then the
19987         above is evaluated as:
19988
19989         a = (int) a op b 
19990
19991         * expression.cs (Binary.ResolveOperator): Instead of testing for
19992         int/uint/long/ulong, try to implicitly convert to any of those
19993         types and use that in pointer arithmetic.
19994
19995         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
19996         method to print information for from the type, not from the
19997         null-method we were given.
19998
19999 2004-02-01  Duncan Mak  <duncan@ximian.com>
20000
20001         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20002         parsing for cmd, fixes bug #53694.
20003
20004 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20005
20006         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20007         in the member name duplication tests. Property and operator name duplication
20008         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20009
20010 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20011
20012         * interface.cs (PopulateMethod): Fixed crash when interface method
20013         returns not existing type (error test cs0246-3.cs).
20014
20015 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20016
20017         * cs-parser.jay (interface_accessors): Re-write actions to also
20018         store attributes attached to get and set methods. Fix spelling
20019         while at it.
20020
20021         (inteface_property_declaration): Modify accordingly.
20022
20023         (InterfaceAccessorInfo): New helper class to store information to pass
20024         around between rules that use interface_accessors.
20025
20026         * interface.cs (Emit): Apply attributes on the get and set
20027         accessors of properties and indexers too.
20028
20029         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20030         right MethodBuilder when applying attributes to the get and set accessors.
20031
20032 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20033
20034         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20035
20036 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20037
20038         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20039
20040 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20041
20042         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20043         changes that treat `yield' specially when present before `break'
20044         or `return' tokens.
20045
20046         * cs-tokenizer.cs: yield is no longer a keyword.
20047
20048 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20049
20050         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20051         setting for default constructors.
20052         For default constructors are almost every time set wrong Modifier. The
20053         generated IL code has been alright. But inside mcs this values was
20054         wrong and this was reason why several of my CLS Compliance tests
20055         failed.
20056
20057 2004-01-22  Martin Baulig  <martin@ximian.com>
20058
20059         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20060         not a QualifiedIdentifier.  This is what `type_name_expression'
20061         was previously doing.
20062         (type_name_expression): Removed; the code is now in
20063         `namespace_or_type_name'.
20064         (qualified_identifier): Removed, use `namespace_or_type_name'
20065         instead.
20066         (QualifiedIdentifier): Removed this class.      
20067
20068 2004-01-22  Martin Baulig  <martin@ximian.com>
20069
20070         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20071         not a string as alias name.
20072
20073 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20074
20075         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20076         #52730 bug, and instead compute correctly the need to use a
20077         temporary variable when requesting an address based on the
20078         static/instace modified of the field and the constructor.
20079  
20080 2004-01-21  Martin Baulig  <martin@ximian.com>
20081
20082         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20083         class and namespace before looking up aliases.  Fixes #52517.
20084
20085 2004-01-21  Martin Baulig  <martin@ximian.com>
20086
20087         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20088         assinged in a 'try'; fixes exception4.cs.
20089
20090 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20091         * class.cs : Implemented parameter-less constructor for TypeContainer
20092
20093         * decl.cs: Attributes are now stored here. New property OptAttributes
20094
20095         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20096
20097         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20098
20099 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20100
20101         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20102           (CSharpSignature): New method for indexer and property signature.
20103
20104 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20105
20106         * pending.cs (IsVirtualFilter): Faster implementation.
20107
20108 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20109
20110         * typemanager.cs: Avoid inclusion of same assembly more than once.
20111
20112 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20113
20114         * cs-parser.jay: Fixed problem where the last assembly attribute
20115           has been applied also to following declaration (class, struct, etc.)
20116           
20117 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20118
20119         * class.cs: Added error CS0538, CS0539 reporting.
20120         Fixed crash on Microsoft runtime when field type is void.
20121
20122         * cs-parser.jay: Added error CS0537 reporting.
20123
20124         * pending.cs: Added error CS0535 reporting.
20125         Improved error report for errors CS0536, CS0534.
20126
20127 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20128
20129         Merge a few bits from the Anonymous Method MCS tree.
20130
20131         * statement.cs (ToplevelBlock): New class for toplevel methods,
20132         will hold anonymous methods, lifted variables.
20133
20134         * cs-parser.jay: Create toplevel blocks for delegates and for
20135         regular blocks of code. 
20136
20137 2004-01-20  Martin Baulig  <martin@ximian.com>
20138
20139         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20140         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20141         and `NeedExplicitReturn'; added `IsLastStatement'.
20142         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20143         have a `ReturnLabel' or we're not unreachable.
20144
20145         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20146         child's reachability; don't just override ours with it.  Fixes
20147         #58058 (lluis's example).
20148         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20149         InFinally(), InLoop(), InSwitch() and
20150         BreakCrossesTryCatchBoundary() methods.
20151
20152         * statement.cs (Return): Do all error checking in Resolve().
20153         Unless we are the last statement in a top-level block, always
20154         create a return label and jump to it.
20155         (Break, Continue): Do all error checking in Resolve(); also make
20156         sure we aren't leaving a `finally'.
20157         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20158         statement in a top-level block.
20159         (Block.Flags): Added `IsDestructor'.
20160         (Block.IsDestructor): New public property.
20161
20162 2004-01-20  Martin Baulig  <martin@ximian.com>
20163
20164         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20165
20166 2004-01-20  Martin Baulig  <martin@ximian.com>
20167
20168         * statement.cs (Statement.ResolveUnreachable): New public method.
20169         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20170         (Block.Resolve): Resolve unreachable statements.
20171
20172 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20173
20174         * expression.cs: We need to fix the case where we do
20175         not have a temp variable here.
20176
20177         * assign.cs: Only expression compound assignments need
20178         temporary variables.
20179
20180 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20181
20182         * flowanalysis.cs: Reduce memory allocation in a few ways:
20183           - A block with no variables should not allocate a bit
20184             vector for itself.
20185           - A method with no out parameters does not need any tracking
20186             for assignment of the parameters, so we need not allocate
20187             any data for it.
20188           - The arrays:
20189                 public readonly Type[] VariableTypes;
20190                 public readonly string[] VariableNames;
20191             Are redundant. The data is already stored in the variable
20192             map, so we need not allocate another array for it.
20193           - We need to add alot of checks for if (params | locals) == null
20194             due to the first two changes.
20195
20196 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20197
20198         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20199         implement IMemoryLocation, we store a copy on a local variable and
20200         take the address of it.  Patch from Benjamin Jemlich
20201
20202         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20203         to use a special "type_name_expression" rule which reduces the
20204         number of "QualifiedIdentifier" classes created, and instead
20205         directly creates MemberAccess expressions.
20206
20207 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20208
20209         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20210         that fixes #52853.  Null literal assignment to ValueType
20211
20212         * class.cs (MethodData.Emit): Instead of checking the name of the
20213         method to determine if its a destructor, create a new derived
20214         class from Method called Destructor, and test for that.  
20215
20216         * cs-parser.jay: Create a Destructor object instead of a Method.  
20217
20218         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20219
20220         Fixes: 52933
20221
20222 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20223
20224         * expression.cs (Binary.ResolveOperator): Perform an implicit
20225         conversion from MethodGroups to their delegate types on the
20226         Addition operation.
20227
20228         * delegate.cs: Introduce a new class DelegateCreation that is the
20229         base class for `NewDelegate' and `ImplicitDelegateCreation',
20230         factor some code in here.
20231
20232         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20233         conversion from MethodGroups to compatible delegate types. 
20234
20235         * ecore.cs (Expression.Resolve): Do not flag error 654
20236         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20237         we allow conversions from MethodGroups to delegate types now.
20238
20239         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20240         assignments in v2 either.
20241
20242 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20243
20244         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20245         static read-only fields in ctors.
20246
20247         Applied patch from Benjamin Jemlich 
20248
20249         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20250
20251 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20252
20253         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20254         here to return true, as they can be used like this:
20255
20256                 (XXX) int.MEMBER ()
20257
20258         Fixed 49836 and all the other dups
20259
20260 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20261
20262         * driver.cs: Implement /win32res and /win32icon.
20263
20264 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20265
20266         * cs-parser.jay: Add a rule to improve error handling for the
20267         common mistake of placing modifiers after the type.
20268
20269 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20270
20271         * cs-parser.jay (interface_event_declaration): Catch
20272         initialization of events on interfaces, and report cs0068
20273
20274         * cs-parser.jay (interface_event_declaration): Catch
20275         initialization of events. 
20276
20277         * ecore.cs: Better report missing constructors.
20278
20279         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20280         the error reporting done in the wrong place.  Fix.
20281
20282         * expression.cs (Binary.ResolveOperator): Catch the 
20283         operator + (E x, E y) error earlier, and later allow for implicit
20284         conversions in operator +/- (E e, U x) from U to the underlying
20285         type of E.
20286
20287         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20288         52596, if the container class is abstract, the default constructor
20289         is protected otherwise its public (before, we were always public).
20290
20291         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20292         fixed statement.
20293
20294         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20295         Jemlich that fixes bug #52597, MCS was generating invalid code for
20296         idisposable structs.   Thanks to Ben for following up with this
20297         bug as well.
20298
20299 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20300
20301         * driver.cs: Allow assemblies without code to be generated, fixes
20302         52230.
20303
20304 2004-01-07  Nick Drochak <ndrochak@gol.com>
20305
20306         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20307
20308 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20309
20310         * cs-parser.jay: Add rules to improve error reporting if fields or
20311         methods are declared at the namespace level (error 116)
20312
20313         * Add rules to catch event add/remove
20314
20315 2004-01-04  David Sheldon <dave-mono@earth.li>
20316
20317   * expression.cs: Added matching ")" to error message for 
20318   CS0077
20319
20320 2004-01-03 Todd Berman <tberman@gentoo.org>
20321
20322         * ecore.cs, attribute.cs:
20323         Applying fix from #52429.
20324
20325 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20326
20327         * ecore.cs, expression.cs, statement.cs:
20328         Total rewrite of how we handle branching. We
20329         now handle complex boolean expressions with fewer
20330         jumps. As well if (x == 0) no longer emits a ceq.
20331
20332         if (x is Foo) is much faster now, because we generate
20333         better code.
20334
20335         Overall, we get a pretty big improvement on our benchmark
20336         tests. The code we generate is smaller and more readable.
20337
20338         I did a full two-stage bootstrap. The patch was reviewed
20339         by Martin and Miguel.
20340
20341 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20342
20343         * cs-parser.jay: Make primary_expression not take a QI.
20344         we dont need this because the member_access rule covers
20345         us here. So we replace the rule with just IDENTIFIER.
20346
20347         This has two good effects. First, we remove a s/r conflict.
20348         Second, we allocate many fewer QualifiedIdentifier objects.
20349
20350 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20351
20352         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20353         set the correct information via SRE. This prevents
20354         hanging on the MS runtime. Fixes #29374.
20355
20356 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20357
20358         * convert.cs: correctly handle conversions to value types
20359         from Enum and ValueType as unboxing conversions.
20360
20361         Fixes bug #52569. Patch by Benjamin Jemlich.
20362
20363 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20364
20365         * expression.cs (BetterConversion): Prefer int -> uint
20366         over int -> ulong (csc's behaviour). This fixed bug #52046.
20367
20368 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20369
20370         * decl.cs (MemberCache.FindMembers): now returns a
20371         MemberInfo [].
20372
20373         * typemanager.cs: In general, go with with ^^.
20374         (CopyNewMethods): take an IList.
20375         (RealMemberLookup): Only allocate an arraylist
20376         if we copy from two sets of methods.
20377
20378         This change basically does two things:
20379         1) Fewer array lists allocated due to CopyNewMethods.
20380         2) the explicit cast in MemberList costed ALOT.
20381
20382 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20383
20384         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20385         a hashtable to avoid needless string allocations when an identifier is
20386         used more than once (the common case).
20387
20388 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20389
20390         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20391         is broken, it will not return anything. So, we
20392         have to use the information we have in mcs to
20393         do the task.
20394
20395         * typemanager.cs: Add a cache for GetInterfaces,
20396         since this will now be used more often (due to ^^)
20397
20398         (GetExplicitInterfaces) New method that gets the
20399         declared, not effective, interfaces on a type
20400         builder (eg, if you have interface IFoo, interface
20401         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20402         { IBar }.
20403
20404         This patch makes MCS able to bootstrap itself on
20405         Windows again.
20406
20407 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20408
20409         * expression.cs: Remove the Nop's that Miguel put
20410         in by mistake.
20411
20412 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20413
20414         * report.cs, codegen.cs: Give the real stack trace to
20415         the error when an exception is thrown.
20416
20417 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20418
20419         * decl.cs: only allocate hashtables for ifaces if 
20420         it is an iface!
20421
20422 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20423
20424         * expression.cs: fix the error from cs0121-2.cs
20425         (a parent interface has two child interfaces that
20426         have a function with the same name and 0 params
20427         and the function is called through the parent).
20428
20429 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20430
20431         * class.cs, rootcontext.cs, typmanager.cs: do not
20432         leak pointers.
20433
20434 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20435
20436         * codegen.cs: remove stack for the ec flow branching.
20437         It is already a linked list, so no need.
20438
20439 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20440
20441         * Makefile: Allow custom profiler here.
20442
20443 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20444
20445         * typemanager.cs (LookupType):
20446           - Use a static char [], because split takes
20447             a param array for args, so it was allocating
20448             every time.
20449           - Do not store true in a hashtable, it boxes.
20450
20451 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20452
20453         * flowanalysis.cs: bytify common enums.
20454
20455 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20456
20457         * modifiers.cs: Add a new set of flags for the
20458         flags allowed on explicit interface impls.
20459         * cs-parser.jay: catch the use of modifiers in
20460         interfaces correctly.
20461         * class.cs: catch private void IFoo.Blah ().
20462
20463         All related to bug #50572.
20464
20465 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20466
20467         * decl.cs: Rewrite the consistant accessability checking.
20468         Accessability is not linear, it must be implemented in
20469         a tableish way. Fixes #49704.
20470
20471 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20472
20473         * expression.cs: Handle negation in a checked context.
20474         We must use subtraction from zero. Fixes #38674.
20475
20476 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20477
20478         * class.cs: Ignore static void main in DLLs.
20479         * rootcontext.cs: Handle the target type here,
20480         since we are have to access it from class.cs
20481         * driver.cs: account for the above.
20482
20483 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20484
20485         * report.cs: Give line numbers and files if available.
20486
20487 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20488
20489         * driver.cs: Implement /addmodule.
20490
20491         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20492         ModuleBuilders.
20493
20494 2003-12-20  Martin Baulig  <martin@ximian.com>
20495
20496         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20497         (FieldBase.IsAssigned): Removed this field.
20498         (FieldBase.SetAssigned): New public method.
20499         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20500
20501 2003-12-20  Martin Baulig  <martin@ximian.com>
20502
20503         * expression.cs (LocalVariableReference.DoResolve): Don't set
20504         `vi.Used' if we're called from DoResolveLValue().
20505
20506         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20507         returns the usage vector it just merged into the current one -
20508         pass this one to UsageWarning().
20509         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20510         of the `EmitContext', don't call this recursively on our children.
20511
20512 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20513
20514         * driver.cs: Implement /target:module.
20515
20516 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20517
20518         * support.cs (CharArrayHashtable): New helper class.
20519
20520         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20521         char arrays, not strings, so we can avoid creating a string in
20522         consume_identifier if the identifier is a keyword.
20523
20524 2003-12-16  Martin Baulig  <martin@ximian.com>
20525
20526         * statement.cs (LocalInfo.Assigned): Removed this property.
20527         (LocalInfo.Flags): Removed `Assigned'.
20528         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20529         and uses flow analysis.
20530         (Block.UsageWarning): Made this method private.
20531         (Block.Resolve): Call UsageWarning() if appropriate.
20532
20533         * expression.cs (LocalVariableReference.DoResolve): Always set
20534         LocalInfo.Used here.
20535
20536 2003-12-13  Martin Baulig  <martin@ximian.com>
20537
20538         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20539         any value here; we're now using flow analysis to figure out
20540         whether a statement/block returns a value.
20541
20542 2003-12-13  Martin Baulig  <martin@ximian.com>
20543
20544         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20545         working again.
20546         (FlowBranching.MergeFinally): Don't call
20547         `branching.CheckOutParameters()' here, this is called in
20548         MergeTopBlock().
20549         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20550         when adding the `finally' vector.       
20551
20552 2003-12-13  Martin Baulig  <martin@ximian.com>
20553
20554         * flowanalysis.cs
20555         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20556         actually work and also fix #48962.
20557
20558 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20559
20560         * decl.cs: Do not check System.Object for nested types,
20561         since we know it does not have any. Big bang for buck:
20562
20563         BEFORE:
20564            Run 1:   8.35 seconds
20565            Run 2:   8.32 seconds
20566            corlib:  17.99 seconds
20567         AFTER:
20568            Run 1:   8.17 seconds
20569            Run 2:   8.17 seconds
20570            corlib:  17.39 seconds
20571
20572 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20573
20574         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20575         time we are returning 0 members, so we save alot here.
20576
20577 2003-12-11  Martin Baulig  <martin@ximian.com>
20578
20579         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20580         `MergeChild()', also just take the `FlowBranching' as argument;
20581         call Merge() on it and return the result.
20582         (FlowBranching.Merge): We don't need to do anything if we just
20583         have one sibling.
20584
20585 2003-12-11  Martin Baulig  <martin@ximian.com>
20586
20587         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20588         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20589         Maurer for this idea.
20590
20591 2003-12-11  Martin Baulig  <martin@ximian.com>
20592
20593         * flowanalysis.cs (MergeResult): This class is now gone; we now
20594         use the `UsageVector' for this.  The reason for this is that if a
20595         branching just has one sibling, we don't need to "merge" them at
20596         all - that's the next step to do.
20597         (FlowBranching.Merge): We now return a `UsageVector' instead of a
20598         `MergeResult'.
20599
20600 2003-12-11  Martin Baulig  <martin@ximian.com>
20601
20602         Reworked flow analyis and made it more precise and bug-free.  The
20603         most important change is that we're now using a special `Reachability'
20604         class instead of having "magic" meanings of `FlowReturns'.  I'll
20605         do some more cleanups and optimizations and also add some more
20606         documentation this week.
20607
20608         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
20609         largely reworked this class.
20610         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
20611         the new `Reachability' class instead of having "magic" values here.
20612         (FlowBranching): We're now using an instance of `Reachability'
20613         instead of having separate `Returns', `Breaks' etc. fields.
20614
20615         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
20616         based on flow analysis; ignore the return value of block.Emit ().
20617
20618 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
20619
20620         * driver.cs typemanager.cs: Find the mono extensions to corlib even
20621         if they are private.
20622
20623 2003-12-09  Martin Baulig  <martin@ximian.com>
20624
20625         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
20626         call them directly on the UsageVector.
20627
20628 2003-12-09  Martin Baulig  <martin@ximian.com>
20629
20630         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
20631         Changed return type from `FlowReturns' to `Reachability'.
20632
20633 2003-12-09  Martin Baulig  <martin@ximian.com>
20634
20635         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
20636         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
20637         `Reachable' fields with a single `Reachability' one.
20638
20639 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20640
20641         * class.cs (FindMembers): Remove foreach's.
20642
20643         Bootstrap times:
20644
20645         BEFORE
20646                 Run 1:   8.74 seconds
20647                 Run 2:   8.71 seconds
20648
20649         AFTER
20650                 Run 1:   8.64 seconds
20651                 Run 2:   8.58 seconds
20652
20653
20654 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20655
20656         * cs-parser.jay:
20657         * gen-treedump.cs:
20658         * statement.cs:
20659         This patch does a few things:
20660                 1. EmptyStatement is now a singleton, so it is never reallocated.
20661                 2. All blah is EmptyStatement constructs have been changed to
20662                    blah == EmptyStatement.Value, which is much faster and valid
20663                    now that EmptyStatement is a singleton.
20664                 3. When resolving a block, rather than allocating a new array for
20665                    the non-empty statements, empty statements are replaced with
20666                    EmptyStatement.Value
20667                 4. Some recursive functions have been made non-recursive.
20668         Mainly the performance impact is from (3), however (1) and (2) are needed for
20669         this to work. (4) does not make a big difference in normal situations, however
20670         it makes the profile look saner.
20671
20672         Bootstrap times:
20673
20674         BEFORE
20675         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20676         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20677         Total memory allocated: 56397 KB
20678
20679         AFTER
20680         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
20681         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
20682         Total memory allocated: 55666 KB
20683
20684 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20685
20686         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
20687         than the hashtable in a hashtable version
20688
20689         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
20690         we always end up concating a string. This results in a huge perf
20691         loss, because many strings have to be tracked by the GC. In this
20692         patch, we first use a hashtable that works with two keys, so that
20693         the strings do not need to be concat'ed.
20694
20695         Bootstrap times:
20696         BEFORE
20697                 Run 1:   8.74 seconds
20698                 Run 2:   8.71 seconds
20699
20700         AFTER
20701                 Run 1:   8.65 seconds
20702                 Run 2:   8.56 seconds
20703
20704 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20705
20706         * Makefile: Add a new target `do-time' that does a quick and simple
20707         profile, leaving easy to parse output.
20708
20709 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20710
20711         * codegen.cs (Init): Create the dynamic assembly with 
20712         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
20713
20714 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20715
20716         * support.cs: Make the PtrHashtable use only one
20717         instance of its comparer.
20718
20719 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
20720
20721         * typemanager.cs: Fix lookup of GetNamespaces.
20722
20723 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
20724
20725         * expression.cs: Removed redundant line.
20726
20727         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
20728         ArrayLists, use for loops with bounds.  
20729
20730         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
20731         arraylist.
20732
20733         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
20734         arraylists, use for loop with bounds.
20735
20736         The above three changes give us a 0.071 second performance
20737         improvement out of 3.294 seconds down to 3.223.  On my machine
20738         the above changes reduced the memory usage by 1,387 KB during
20739         compiler bootstrap.
20740
20741         * cs-parser.jay (QualifiedIdentifier): New class used to represent
20742         QualifiedIdentifiers.  Before we created a new string through
20743         concatenation, and mostly later on, the result would be
20744         manipulated by DecomposeQI through string manipulation.
20745
20746         This reduced the compiler memory usage for bootstrapping from
20747         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
20748         compile times in 0.05 seconds.
20749
20750 2003-11-28  Dick Porter  <dick@ximian.com>
20751
20752         * support.cs: Do string compares with the Invariant culture.
20753
20754         * rootcontext.cs: 
20755         * gen-treedump.cs: 
20756         * expression.cs: 
20757         * driver.cs: 
20758         * decl.cs: 
20759         * codegen.cs: 
20760         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
20761         the comparison is done with the Invariant culture.
20762
20763 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
20764
20765         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
20766         GetEnumerator method.
20767
20768         (ProbeCollectionType): Iterate starting at the most specific type
20769         upwards looking for a GetEnumerator
20770
20771         * expression.cs: Shift count can be up to 31 for int/uint and 63
20772         for long/ulong.
20773
20774 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
20775
20776         * statement.cs (Block.LookupLabel): Also look for the label on the
20777         children blocks.  Use a hash table to keep track of visited
20778         nodes. 
20779
20780         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
20781         we actually did transform the other operand, otherwise fall back
20782         to the common codepath that casts to long.
20783
20784         * cs-tokenizer.cs: Use the same code pattern as the int case.
20785         Maybe I should do the parsing myself, and avoid depending on the
20786         Parse routines to get this done.
20787
20788 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
20789
20790         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20791         which fixes bug 51347.  This time test it.
20792
20793         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
20794         attributes for example can not tell the difference between these.
20795         The difference was only a syntax feature of the language. 
20796
20797         * attribute.cs: Apply attributes to delegates.
20798
20799         * delegate.cs: Call the apply attributes method.
20800
20801 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
20802
20803         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
20804         comparing 0 vs Byte.MinValue, not the value
20805
20806         (ImplicitConversionRequired): When reporting a conversion error,
20807         use error 31 to print out the constant error instead of the
20808         simpler 29.
20809
20810         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20811         which fixes bug 51347.
20812
20813 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
20814
20815         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
20816         which fixes the -warnaserror command line option.
20817
20818 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
20819
20820         * cfold.cs (DoNumericPromotions): During constant folding of
20821         additions on UIntConstant, special case intconstants with
20822         IntConstants like we do on the expression binary operator. 
20823
20824 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
20825
20826         * convert.cs (ImplicitReferenceConversion): We were missing a case
20827         (System.Enum are not value types or class types, so we need to
20828         classify them separatedly).
20829
20830         * driver.cs: We do not support error 2007.
20831
20832 2003-11-12 Jackson Harper <jackson@ximian.com>
20833
20834         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
20835         system directory. Also use the full file name so users can
20836         libraries names mscorlib-o-tron.dll in a non system dir.
20837
20838 2003-11-10  Martin Baulig  <martin@ximian.com>
20839
20840         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
20841         (TypeManager.InitCoreTypes): Initialize them here, but instead of
20842         calling `ResolveType()' on them, directly assign their `Type'.
20843
20844 2003-11-08  Martin Baulig  <martin@ximian.com>
20845
20846         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
20847         return value and the `out parent' parameter.
20848         (TypeContainer.DefineType): Moved the CS0644 check into
20849         GetClassBases().  Don't pass the interface types to the
20850         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
20851         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
20852
20853         * ecore.cs (TypeExpr.IsAttribute): New property.
20854         (TypeExpr.GetInterfaces): New method.
20855
20856         * interface.cs (Interface.GetInterfaceTypeByName): Return a
20857         TypeExpr instead of a Type.
20858         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
20859         (Interface.DefineType): Don't pass the interface types to the
20860         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
20861         them later and then call `TypeBulider.AddInterfaceImplementation()'.
20862
20863         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
20864         instead of a `Type[]'.
20865         (TypeManager.RegisterBuilder): Likewise.
20866         (TypeManager.AddUserInterface): Likewise.
20867         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
20868         `Type[]' and also return a `TypeExpr[]'.
20869         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
20870
20871 2003-11-08  Martin Baulig  <martin@ximian.com>
20872
20873         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
20874         Expression.     
20875
20876 2003-11-08  Martin Baulig  <martin@ximian.com>
20877
20878         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
20879         TypeManager.ResolveExpressionTypes().
20880
20881         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
20882         instead of an Expression.
20883         (TypeExpr): This is now an abstract base class for `TypeExpression'.
20884         (TypeExpression): New public class; formerly known as `TypeExpr'.
20885
20886         * expression.cs (ComposedCast): Derive from TypeExpr.
20887
20888         * typemanager.cs (TypeManager.system_*_expr): These are now
20889         TypExpr's instead of Expression's.
20890         (TypeManager.ResolveExpressionTypes): New public static function;
20891         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
20892         of them.        
20893
20894 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
20895
20896         * expression.cs (New.DoResolve): Do not dereference value that
20897         might be a null return.
20898
20899         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
20900         sure that the constant value has the right type.  Fixes an
20901         unreported bug, similar to 50425.
20902
20903         * const.cs (Const.LookupConstantValue): Call
20904         ImplicitStandardConversionExists before doing a conversion to
20905         avoid havng the TypeManager.ChangeType do conversions.
20906
20907         Reduced the number of casts used
20908
20909         (Const.ChangeType): New routine to enable reuse of the constant
20910         type changing code from statement.
20911
20912         * typemanager.cs (ChangeType): Move common initialization to
20913         static global variables.
20914
20915         Fixes #50425.
20916
20917         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
20918         every value type to go through, even if it was void.  Fix that. 
20919
20920         * cs-tokenizer.cs: Use is_identifier_start_character on the start
20921         character of the define, and the is_identifier_part_character for
20922         the rest of the string.
20923
20924 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
20925
20926         * expression.cs (UnaryMutator.EmitCode): When I updated
20927         LocalVariableReference.DoResolve, I overdid it, and dropped an
20928         optimization done on local variable references.
20929
20930 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
20931
20932         * ecore.cs: Convert the return from Ldlen into an int.
20933
20934 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
20935
20936         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
20937         the accessibility, this is a special case for toplevel non-public
20938         classes (internal for instance).
20939
20940 2003-10-20  Nick Drochak <ndrochak@gol.com>
20941
20942         * ecore.cs: Fix typo and build.  Needed another right paren.
20943
20944 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
20945
20946         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
20947         `internal' case regular and protected, but not allowing protected
20948         to be evaluated later.  Bug 49840
20949
20950 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
20951
20952         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
20953         to kb.Nlast, and not the kb.nFirst to isolate the switch
20954         statement.
20955
20956         Extract the underlying type, so enumerations of long/ulong are
20957         treated like long/ulong.
20958
20959 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
20960
20961         * expression.cs (New): Overload the meaning of RequestedType to
20962         track the possible creation of the NewDelegate type, since
20963         DoResolve is invoked more than once for new constructors on field
20964         initialization.
20965
20966         See bugs: #48800 and #37014
20967
20968         * cs-parser.jay (declare_local_constants): Take an arraylist
20969         instead of a single constant.
20970
20971         (local_constant_declaration): It should take a
20972         constant_declarators, not a constant_declarator.  Fixes 49487
20973
20974         * convert.cs: Fix error report.
20975
20976 2003-10-13 Jackson Harper <jackson@ximian.com>
20977
20978         * typemanager.cs (TypeToCoreType): Add float and double this fixes
20979         bug #49611
20980
20981 2003-10-09  Martin Baulig  <martin@ximian.com>
20982
20983         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
20984         to the .ctor.
20985         (MethodCore.DoDefineParameters): Removed the TypeContainer
20986         argument; use the DeclSpace which was passed to the .ctor instead.
20987         (MethodCore.CheckParameter): Take a DeclSpace instead of a
20988         TypeContainer; we only need a DeclSpace here.
20989
20990 2003-10-09  Martin Baulig  <martin@ximian.com>
20991
20992         * class.cs (MethodData): Added additional `DeclSpace ds' argument
20993         to the .ctor.
20994         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
20995         EmitContext's .ctor.    
20996
20997 2003-10-09  Martin Baulig  <martin@ximian.com>
20998
20999         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21000         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21001         AsAccessible(), moved them as well.
21002
21003         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21004
21005 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21006
21007         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21008
21009 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21010
21011         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21012         generation for >=, as spotted by Paolo, bug 48679.  
21013         Patch from David Waite.
21014
21015         * cs-tokenizer.cs: Add handling for #pragma.
21016
21017         * cs-parser.jay: Allow for both yield and yield return in the
21018         syntax.  The anti-cobolization of C# fight will go on!
21019
21020         * class.cs (TypeBuilder.DefineType): Catch error condition here
21021         (Parent.DefineType erroring out and returning null).
21022
21023         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21024         coping with enumerations variables, we were mistakenly processing
21025         them as a regular value type instead of built-in types.  Fixes the
21026         bug #48063
21027
21028         * typemanager.cs (IsBuiltinOrEnum): New method.
21029
21030 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21031
21032         * cs-parser.jay: Upgrade: yield now needs the return clause.
21033
21034 2003-09-19  Martin Baulig  <martin@ximian.com>
21035
21036         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21037         `MemberCache parent' argument.  Normally, an interface doesn't
21038         have a parent type except System.Object, but we use this in gmcs
21039         for generic type parameters.
21040
21041 2003-09-18  Martin Baulig  <martin@ximian.com>
21042
21043         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21044         on `type.IsInterface'; don't check whether the type has a parent
21045         to determine whether it's an interface.
21046
21047 2003-09-15  Martin Baulig  <martin@ximian.com>
21048
21049         * class.cs (TypeContainer.DefineType): Added an error flag to
21050         avoid reporting duplicate CS0146's ("class definition is
21051         circular.").
21052
21053         * driver.cs (Driver.MainDriver): Abort if
21054         RootContext.ResolveTree() reported any errors.
21055
21056 2003-09-07  Martin Baulig  <martin@ximian.com>
21057
21058         * report.cs (Error, Warning): Added overloaded versions which take
21059         a `params object[] args' and call String.Format().
21060
21061 2003-09-07  Martin Baulig  <martin@ximian.com>
21062
21063         * decl.cs (DeclSpace..ctor): Don't call
21064         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21065         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21066         (DeclSpace.RecordDecl): New method.
21067
21068         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21069
21070 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21071
21072         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21073         value attributes to be applied to ParameterBuilders.
21074
21075         * class.cs (MethodCore.LabelParameters): Make static and more
21076         generic so that it can be used from other places - like interface
21077         methods, for instance.
21078
21079         * interface.cs (Interface.Emit): Call LabelParameters before
21080         emitting attributes on the InterfaceMethod.
21081
21082 2003-08-26  Martin Baulig  <martin@ximian.com>
21083
21084         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21085         resolving aliases; fixes #47927.
21086
21087 2003-08-26  Martin Baulig  <martin@ximian.com>
21088
21089         * statement.cs (Using.DoResolve): This is internally emitting a
21090         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21091         do not always return.  Fixes #47681.
21092
21093 2003-08-26  Martin Baulig  <martin@ximian.com>
21094
21095         * decl.cs (MemberCore): Moved WarningNotHiding(),
21096         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21097         into MemberBase.
21098         (AdditionResult): Make this nested in DeclSpace.
21099         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21100         argument; call NamespaceEntry.Define() unless we're nested in a
21101         class or struct.
21102
21103         * namespace.cs (Namespace.DefineName): New public function.  This
21104         is called from DeclSpace's .ctor to add 
21105         (Namespace.Lookup): Include DeclSpaces in the lookup.
21106
21107         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21108
21109         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21110
21111 2003-08-25  Martin Baulig  <martin@ximian.com>
21112
21113         * convert.cs (Convert.ExplicitReferenceConversion): When
21114         converting from an interface type to a class, unbox if the target
21115         type is a struct type.  Fixes #47822.
21116
21117 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21118
21119         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21120         #47854.
21121
21122 2003-08-22  Martin Baulig  <martin@ximian.com>
21123
21124         * class.cs (TypeManager.DefineType): When defining a nested type,
21125         call DefineType() on our parent; fixes #47801.
21126
21127 2003-08-22  Martin Baulig  <martin@ximian.com>
21128
21129         * class.cs (MethodData.Define): While checking if a method is an
21130         interface implementation, improve the test a bit more to fix #47654.
21131
21132 2003-08-22  Martin Baulig  <martin@ximian.com>
21133
21134         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21135         correctly; fixes #47722.
21136
21137 2003-08-22  Martin Baulig  <martin@ximian.com>
21138
21139         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21140         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21141
21142         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21143
21144 2003-08-22  Martin Baulig  <martin@ximian.com>
21145
21146         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21147         can only be assigned in static constructors.  Fixes #47161.
21148
21149 2003-08-22  Martin Baulig  <martin@ximian.com>
21150
21151         Rewrote and improved the flow analysis code.
21152
21153         * flowbranching.cs (FlowBranching): Make this class abstract.
21154         (FlowBranching.CreateBranching): New static function to create a
21155         new flow branching.
21156         (FlowBranchingBlock, FlowBranchingException): New classes.
21157         (FlowBranching.UsageVector.Type): New public readonly field.
21158         (FlowBranching.UsageVector.Breaks): Removed the setter.
21159         (FlowBranching.UsageVector.Returns): Removed the setter.
21160         (FlowBranching.UsageVector): Added Break(), Return(),
21161         NeverReachable() and Throw() methods to modify the reachability.
21162         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21163         done by FlowBranching.Merge().
21164         (FlowBranching.UsageVector.MergeChild): New method; merges the
21165         merge result into the current vector.
21166         (FlowBranching.Merge): New abstract method to merge a branching.
21167
21168 2003-08-12  Martin Baulig  <martin@ximian.com>
21169
21170         * expression.cs (Indirection.CacheTemporaries): Create the
21171         LocalTemporary with the pointer type, not its element type.
21172
21173 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21174
21175         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21176         token was a keyword or not.
21177
21178         Add `error' options where an IDENTIFIER was expected;  Provide
21179         CheckToken and CheckIdentifierToken convenience error reporting
21180         functions. 
21181
21182         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21183
21184         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21185         NameSpaceEntry NameSpaceEntry.
21186
21187         (LookupInterfaceOrClass): Avoid creating a full qualified name
21188         from namespace and name: avoid doing lookups when we know the
21189         namespace is non-existant.   Use new Tree.LookupByNamespace which
21190         looks up DeclSpaces based on their namespace, name pair.
21191
21192         * driver.cs: Provide a new `parser verbose' to display the
21193         exception thrown during parsing.  This is turned off by default
21194         now, so the output of a failure from mcs is more graceful.
21195
21196         * namespace.cs: Track all the namespaces defined in a hashtable
21197         for quick lookup.
21198
21199         (IsNamespace): New method
21200
21201 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21202
21203         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21204         we know that we need to concatenate (full typename can never be
21205         null). 
21206
21207         * class.cs: ditto.
21208
21209         * statement.cs: Use a bitfield;  Do not initialize to null things
21210         which are done by the constructor by default.
21211
21212         * cs-parser.jay: bug fix, parameter was 4, not 3.
21213
21214         * expression.cs: Just use the property;
21215
21216         * statement.cs: No need for GetVariableInfo method.
21217
21218 2003-08-08  Martin Baulig  <martin@ximian.com>
21219
21220         * flowanalysis.cs (FlowReturns): This is now nested in the
21221         `FlowBranching' class.
21222         (MyBitVector): Moved this here from statement.cs.
21223         (FlowBranching.SiblingType): New enum type.
21224         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21225
21226 2003-08-07  Martin Baulig  <martin@ximian.com>
21227
21228         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21229         `FlowBranching' class and called `BranchingType'.
21230
21231 2003-08-07  Martin Baulig  <martin@ximian.com>
21232
21233         * flowanalysis.cs: Moved all the control flow analysis code into
21234         its own file.
21235
21236 2003-08-07  Martin Baulig  <martin@ximian.com>
21237
21238         * assign.cs (Assign.DoResolve): `target' must either be an
21239         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21240         #37319.
21241
21242 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21243
21244         * expression.cs (BinaryMethod): This kind of expression is created by the
21245         Binary class if it determines that the operator has to be handled
21246         by a method.
21247
21248         (BinaryDelegate): This kind of expression is created if we are
21249         dealing with a + or - operator on delegates.
21250
21251         (Binary): remove method, argumetns, and DelegateOperator: when
21252         dealing with methods, 
21253
21254         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21255
21256         * statement.cs (Block): use bitfields for the three extra booleans
21257         we had in use.   Remove unused topblock parameter.
21258
21259         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21260
21261         * assign.cs: Drop extra unneeded tests.
21262
21263 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21264
21265         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21266
21267         * statement.cs (Foreach): Use VariableStorage instead of
21268         LocalBuilders.   
21269
21270         * codegen.cs (VariableStorage): New class used by clients that
21271         require a variable stored: locals or fields for variables that
21272         need to live across yield.
21273
21274         Maybe provide a convenience api for EmitThis+EmitLoad?
21275
21276         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21277         these bad boys.
21278
21279 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21280
21281         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21282         RemapParameterLValue): New methods that are used to turn a
21283         precomputed FieldInfo into an expression like this:
21284
21285                 instance.FieldInfo
21286
21287         The idea is to use this instead of making LocalVariableReference
21288         have more than one meaning.
21289
21290         * cs-parser.jay: Add error production to BASE.
21291
21292         * ecore.cs: Deal with TypeManager.GetField returning null, which
21293         is now a valid return value.
21294
21295         (FieldExprNoAddress): New expression for Fields whose address can
21296         not be taken.
21297
21298         * expression.cs (LocalVariableReference): During the resolve
21299         phases, create new expressions if we are in a remapping context.
21300         Remove code that dealt with remapping here.
21301
21302         (ParameterReference): same.
21303
21304         (ProxyInstance): New expression, like the `This' expression, but
21305         it is born fully resolved.  We know what we are doing, so remove
21306         the errors that are targeted to user-provided uses of `this'.
21307
21308         * statement.cs (Foreach): our variable is now stored as an
21309         Expression;  During resolution, follow the protocol, dont just
21310         assume it will return this.
21311
21312 2003-08-06  Martin Baulig  <martin@ximian.com>
21313
21314         * support.cs (SeekableStreamReader.cs): New public class.
21315
21316         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21317         SeekableStreamReader instead of the normal StreamReader.
21318
21319 2003-08-04  Martin Baulig  <martin@ximian.com>
21320
21321         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21322         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21323         deambiguate casts and delegate invocations.
21324         (parenthesized_expression): Use the new tokens to ensure this is
21325         not a cast of method invocation.
21326
21327         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21328         when reading a `)' and Deambiguate_CloseParens () was previously
21329         called.
21330
21331         * expression.cs (ParenthesizedExpression): New class.  This is
21332         just used for the CS0075 test.
21333         (Binary.DoResolve): Check for CS0075.   
21334
21335 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21336
21337         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21338         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21339         reference comparison.
21340
21341         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21342         examine the ReturnType for equality - this is necessary in the
21343         cases of implicit and explicit operators whose signature also
21344         includes the return type.
21345
21346 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21347
21348         * namespace.cs: Cache the result of the namespace computation,
21349         instead of computing it every time.
21350
21351 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21352
21353         * decl.cs: Use a global arraylist that we reuse over invocations
21354         to avoid excesive memory consumption.  Reduces memory usage on an
21355         mcs compile by one meg (45 average).
21356
21357         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21358         private, work around that.
21359
21360 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21361
21362         * literal.cs (IntLiteral): Define Zero and One static literals. 
21363
21364         * cs-parser.jay (integer_literal): use static literals to reduce
21365         memory usage for the most used literals (0, 1 and -1).  211kb
21366         reduced in memory usage.
21367
21368         Replace all calls to `new ArrayList' with `new
21369         ArrayList(4)' which is a good average number for most allocations,
21370         and also requires only 16 bytes of memory for its buffer by
21371         default. 
21372
21373         This reduced MCS memory usage in seven megabytes for the RSS after
21374         bootstrapping.
21375
21376 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21377
21378         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21379         handle params methods the correct way by forming only one
21380         applicable set with params and normal methods in them. Earlier we
21381         were looking at params methods only if we found no normal methods
21382         which was not the correct thing to do.
21383
21384         (Invocation.BetterFunction): Take separate arguments indicating
21385         when candidate and the best method are params methods in their
21386         expanded form.
21387
21388         This fixes bugs #43367 and #46199.
21389
21390         * attribute.cs: Documentation updates.
21391
21392         (CheckAttribute): Rename to CheckAttributeTarget.
21393         (GetValidPlaces): Rename to GetValidTargets.
21394
21395         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21396         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21397
21398         Fixes bug #44468.
21399
21400 2003-07-28  Martin Baulig  <martin@ximian.com>
21401
21402         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21403         name when looking up the base class of a nested class.  Fixes #46977.
21404
21405 2003-07-26  Martin Baulig  <martin@ximian.com>
21406
21407         * expression.cs (Indexers.Indexer): New nested struct; contains
21408         getter, setter and the indexer's type.
21409         (Indexers.Properties): This is now an ArrayList of
21410         Indexers.Indexer's.
21411         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21412         indexer doesn't have any getters.
21413
21414         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21415         for embedded property and indexer assignments.
21416
21417 2003-07-26  Martin Baulig  <martin@ximian.com>
21418
21419         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21420         preprocessor directive is not the first non-whitespace character
21421         on a line.
21422
21423 2003-07-26  Martin Baulig  <martin@ximian.com>
21424
21425         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21426         namespace parsing, follow the spec more closely.
21427
21428         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21429         NamespaceEntry.Lookup().
21430
21431 2003-07-25  Martin Baulig  <martin@ximian.com>
21432
21433         * MethodCore.cs (OverridesSomething): New public field; it's set
21434         from TypeContainer.DefineMembers if this method overrides
21435         something (which doesn't need to be a method).  Fix #39462.
21436
21437 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21438
21439         * typemanager.cs (GetMembers): Ensure that the list of members is
21440         reversed. This keeps things in sync.
21441
21442         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21443         find an AttributeUsage attribute.
21444
21445         * expression.cs (Invocation.OverloadResolve): Perform the check
21446         which disallows Invoke to be directly called on a Delegate.
21447
21448         (Error_InvokeOnDelegate): Report error cs1533.
21449
21450 2003-07-25  Martin Baulig  <martin@ximian.com>
21451
21452         * expression.cs (Indexers.GetIndexersForType): Only look in the
21453         interface hierarchy if the requested type is already an
21454         interface.  Fixes #46788 while keeping #46502 fixed.
21455
21456 2003-07-25  Martin Baulig  <martin@ximian.com>
21457
21458         * class.cs (TypeContainer.DefineMembers): Check whether all
21459         readonly fields have been assigned and report warning CS0649 if
21460         not.
21461
21462         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21463         a valuetype.
21464
21465 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21466
21467         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21468         returned from GetMethods to make things consistent with the
21469         assumptions MCS makes about ordering of methods.
21470
21471         This should comprehensively fix bug #45127 and it does :-)
21472
21473         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21474         ordering is actually reverse.
21475
21476         * Clean up some debug messages I left lying around.
21477
21478         * interface.cs (Populate*): Get rid of code which emits attributes
21479         since the stage in which we emit attributes is the 'Emit' stage,
21480         not the define stage.
21481
21482         (Emit): Move attribute emission for interface members here.
21483
21484 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21485
21486         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21487         closely: we eliminate methods in base types when we have an
21488         applicable method in a top-level type.
21489
21490         Please see section 14.5.5.1 for an exact description of what goes
21491         on. 
21492
21493         This fixes bug #45127 and a host of other related to corlib compilation.
21494
21495         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21496         array is the method corresponding to the top-level type (this is
21497         because of the changes made to icall.c) so we change this
21498         accordingly.
21499
21500         (MethodGroupExpr.Name): This too.
21501
21502         * typemanager.cs (GetElementType): New method which does the right
21503         thing when compiling corlib. 
21504
21505         * everywhere: Make use of the above in the relevant places.
21506
21507 2003-07-22  Martin Baulig  <martin@ximian.com>
21508
21509         * cs-parser.jay (invocation_expression): Moved
21510         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21511         `cast_expression', but create a InvocationOrCast which later
21512         resolves to either an Invocation or a Cast.
21513
21514         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21515         method; call this before EmitStatement() to make sure that this
21516         expression can be used as a statement.
21517
21518         * expression.cs (InvocationOrCast): New class; resolves to either
21519         an Invocation or a Cast.
21520
21521         * statement.cs (StatementExpression): Call ResolveStatement() on
21522         the ExpressionStatement before emitting it.
21523
21524 2003-07-21  Martin Baulig  <martin@ximian.com>
21525
21526         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21527         `ref' and `out' attributes match; fixes #46220.
21528         (MemberAccess.ResolveMemberAccess): You can't reference a type
21529         through an expression; fixes #33180.
21530         (Indexers.GetIndexersForType): Don't return the indexers from
21531         interfaces the class implements; fixes #46502.
21532
21533 2003-07-21  Martin Baulig  <martin@ximian.com>
21534
21535         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21536         CS0661 checks; fixes bug #30442.
21537
21538 2003-07-21  Martin Baulig  <martin@ximian.com>
21539
21540         * decl.cs (AdditionResult): Added `Error'.
21541
21542         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21543
21544         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21545         makes cs0031.cs actually work.
21546
21547 2003-07-20  Martin Baulig  <martin@ximian.com>
21548
21549         * namespace.cs: Fixed that bug which caused a crash when compiling
21550         the debugger's GUI.
21551
21552 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21553
21554         * typemanager.cs (LookupTypeReflection): Never expose types which
21555         are NotPublic, NestedPrivate, NestedAssembly, or
21556         NestedFamANDAssem.  We used to return these, and later do a check
21557         that would report a meaningful error, but the problem is that we
21558         would not get the real match, if there was a name override.
21559
21560 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21561
21562         * namespace.cs (Namespace, Name): Do not compute the namespace
21563         name dynamically, compute it in the constructor.  This reduced
21564         memory usage by 1697 KB.
21565
21566         * driver.cs: Use --pause to pause at the end.
21567
21568 2003-07-17  Peter Williams  <peter@newton.cx>
21569
21570         * Makefile: Change the name of the test target so that it doesn't
21571         conflict with the recursive test target.
21572
21573 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21574
21575         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21576         AddressOf): Do not use EmitThis, that was wrong, use the actual
21577         this pointer.
21578
21579 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21580
21581         * class.cs (MethodData.Define): While checking if a method is an
21582         interface implementation, improve the test: If we are not public
21583         (use new test here: use the computed MethodAttributes directly,
21584         instead of the parsed modifier flags) check if the `implementing'
21585         method comes from an interface or not.
21586
21587         * pending.cs (VerifyPendingMethods): Slightly better error
21588         message.
21589
21590         * makefile: add test target that does the mcs bootstrap.
21591
21592 2003-07-16  Ravi Pratap  <ravi@ximian.com>
21593
21594         * interface.cs (Define): Do nothing here since there are no
21595         members to populate etc. Move the attribute emission out of here
21596         since this was just totally the wrong place to put it. Attribute
21597         application happens during the 'Emit' phase, not in the 'Define'
21598         phase.
21599
21600         (Emit): Add this method and move the attribute emission here
21601
21602         * rootcontext.cs (EmitCode): Call the Emit method on interface
21603         types too.
21604
21605 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21606
21607         * expression.cs (OverloadResolve): Report error only if Location
21608         is not 'Null' which means that there was a probe going on.
21609
21610 2003-07-14  Martin Baulig  <martin@ximian.com>
21611
21612         * expression.cs (ConditionalLogicalOperator): New public class to
21613         implement user defined conditional logical operators.
21614         This is section 14.11.2 in the spec and bug #40505.
21615
21616 2003-07-14  Martin Baulig  <martin@ximian.com>
21617
21618         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
21619
21620 2003-07-14  Martin Baulig  <martin@ximian.com>
21621
21622         * codegen.cs (EmitContext.InFixedInitializer): New public field.
21623
21624         * ecore.cs (IVariable.VerifyFixed): New interface method.
21625
21626         * expression.cs (Unary.ResolveOperator): When resolving the `&'
21627         operator, check whether the variable is actually fixed.  Fixes bug
21628         #36055.  Set a variable definitely assigned when taking its
21629         address as required by the spec.
21630
21631         * statement.cs (LocalInfo.IsFixed): New field.
21632         (LocalInfo.MakePinned): Set `IsFixed' to true.
21633
21634 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21635
21636         * attribute.cs (Attribute.Resolve): While doing a Member lookup
21637         for .ctors, ensure that we only ask for members declared in the
21638         attribute type (BindingFlags.DeclaredOnly).
21639
21640         Fixes bug #43632.
21641
21642         * expression.cs (Error_WrongNumArguments): Report error 1501
21643         correctly the way CSC does.
21644
21645 2003-07-13  Martin Baulig  <martin@ximian.com>
21646
21647         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
21648         lookup on the fully qualified name, to make things like "X.X" work
21649         where "X.X" is a fully qualified type name, but we also have a
21650         namespace "X" in the using list.  Fixes #41975.
21651
21652 2003-07-13  Martin Baulig  <martin@ximian.com>
21653
21654         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
21655         function. If we're a CompoundAssign, we need to create an embedded
21656         CompoundAssign, not an embedded Assign.
21657         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
21658         Fixes #45854.
21659
21660 2003-07-13  Martin Baulig  <martin@ximian.com>
21661
21662         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
21663         work to fix bug #46088.
21664
21665 2003-07-13  Ravi Pratap <ravi@ximian.com>
21666
21667         * class.cs (Operator.Emit): Do not emit attributes here - it is
21668         taken care of by the Method class that we delegate too. This takes
21669         care of bug #45876.
21670
21671 2003-07-10  Martin Baulig  <martin@ximian.com>
21672
21673         * expression.cs (TypeOfVoid): New class.
21674         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
21675
21676 2003-07-10  Martin Baulig  <martin@ximian.com>
21677
21678         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
21679         bug #35957.
21680
21681 2003-07-10  Martin Baulig  <martin@ximian.com>
21682
21683         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
21684         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
21685
21686         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
21687
21688         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
21689
21690 2003-07-10  Martin Baulig  <martin@ximian.com>
21691
21692         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
21693         of decimal.  Fixes #42850.
21694
21695         NOTE: I also fixed the created byte blob, but this doesn't work on
21696         the MS runtime and csc never produces any byte blobs for decimal
21697         arrays.
21698
21699 2003-07-10  Martin Baulig  <martin@ximian.com>
21700
21701         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
21702         structs; fixes #32068.
21703         (Block.AddChildVariableNames): Fixed #44302.
21704
21705 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21706
21707         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
21708
21709 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21710
21711         * attribute.cs: And this test is onger needed.
21712
21713 2003-07-08  Martin Baulig  <martin@ximian.com>
21714
21715         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
21716         inaccessible types.  Fixes #36313.
21717
21718         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
21719
21720         * namespace.cs (NamespaceEntry): Create implicit entries for all
21721         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
21722         implicit entries for N1.N2 and N1.
21723
21724 2003-07-08  Martin Baulig  <martin@ximian.com>
21725
21726         Rewrote the handling of namespaces to fix a lot of the issues
21727         wrt. `using' aliases etc.
21728
21729         * namespace.cs (Namespace): Splitted this class into a
21730         per-assembly `Namespace' and a per-file `NamespaceEntry'.
21731
21732         * typemanager.cs (TypeManager.IsNamespace): Removed.
21733         (TypeManager.ComputeNamespaces): Only compute namespaces from
21734         loaded assemblies here, not the namespaces from the assembly we're
21735         currently compiling.
21736
21737 2003-07-08  Martin Baulig  <martin@ximian.com>
21738
21739         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
21740
21741 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21742
21743         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
21744         already fixed it.  
21745
21746         I thought about the memory savings here, but LookupTypeReflection
21747         is used under already very constrained scenarios.  Compiling
21748         corlib or mcs only exposes one hit, so it would not really reduce
21749         any memory consumption.
21750
21751 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21752
21753         * typemanager.cs: fixes bug #45889 by only adding public types from
21754         other assemblies to the list of known types.
21755
21756 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21757
21758         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
21759         on the type we resolved.
21760
21761 2003-07-05  Martin Baulig  <martin@ximian.com>
21762
21763         * pending.cs (PendingImplementation.ParentImplements): Don't
21764         create the proxy if the parent is abstract.
21765
21766         * class.cs (TypeContainer.DefineIndexers): Process explicit
21767         interface implementations first.  Fixes #37714.
21768
21769 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
21770
21771         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
21772         defined recursively;  but since we modify the input parameters
21773         (left is set to `this' temporarily), we reset this value if the
21774         left_is_explicit is false, which gives the original semantics to
21775         the code.  
21776
21777         * literal.cs (NullPointer): new class used to represent a null
21778         literal in a pointer context.
21779
21780         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
21781         type is a pointer, use a NullPointer object instead of a
21782         NullLiteral.   Closes 43687
21783
21784         (ExplicitConversion): Convert pointer values using
21785         the conv opcode to the proper type.
21786
21787         * ecore.cs (New): change ValueTypeVariable property into a method,
21788         that returns whether the valuetype is suitable for being used.
21789
21790         * expression.cs (Binary.DoNumericPromotions): Only return if we
21791         the int constant was a valid uint, and we can return both left and
21792         right as uints.  If not, we continue processing, to trigger the
21793         type conversion.  This fixes 39018.
21794
21795         * statement.cs (Block.EmitMeta): During constant resolution, set
21796         the CurrentBlock property on the emitcontext, so that we resolve
21797         constants propertly.
21798
21799 2003-07-02  Martin Baulig  <martin@ximian.com>
21800
21801         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
21802         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
21803
21804         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
21805         than emitting it here.
21806
21807         * statement.cs: Fixed some more flow analysis bugs.
21808
21809 2003-07-02  Martin Baulig  <martin@ximian.com>
21810
21811         * class.cs (MethodData.Define): When implementing interface
21812         methods, set Final unless we're Virtual.
21813
21814         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
21815         check work for interface methods.
21816
21817 2003-07-01  Martin Baulig  <martin@ximian.com>
21818
21819         * ecore.cs (EmitContext.This): Replaced this property with a
21820         GetThis() method which takes a Location argument.  This ensures
21821         that we get the correct error location for a CS0188.
21822
21823 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
21824
21825         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
21826         ImplicitStandardConversion.
21827
21828         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
21829
21830 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
21831
21832         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
21833         optimization.
21834
21835 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
21836
21837         * class.cs (Constructor.Define): Turn off initlocals for unsafe
21838         constructors.
21839
21840         (MethodData.Define): Turn off initlocals for unsafe methods.
21841
21842 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
21843
21844         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
21845         complete;  Fixes #37521.
21846
21847         * delegate.cs: Use Modifiers.TypeAttr to compute the
21848         TypeAttributes, instead of rolling our own.  This makes the flags
21849         correct for the delegates.
21850
21851 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
21852
21853         * class.cs (Constructor.Define): Set the private flag for static
21854         constructors as well.
21855
21856         * cs-parser.jay (statement_expression): Set the return value to
21857         null, to avoid a crash when we catch an error.
21858
21859 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
21860
21861         * cs-parser.jay: Applied patch from Jackson that adds support for
21862         extern and unsafe modifiers to destructor declarations.
21863
21864         * expression.cs: Report error 21 if the user is trying to index a
21865         System.Array.
21866
21867         * driver.cs: Add an error message, suggested by the bug report.
21868
21869         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
21870         if we do not have a ": this ()" constructor initializer.  Fixes 45149
21871
21872 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
21873
21874         * namespace.cs: Add some information to reduce FAQs.
21875
21876 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
21877
21878         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
21879         underlying enumeration types.  Fixes #43915.
21880
21881         * expression.cs: Treat ushort/short as legal values to be used in
21882         bitwise operations.
21883
21884 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
21885
21886         * delegate.cs: transfer custom attributes for paramenters from
21887         the delegate declaration to Invoke and BeginInvoke.
21888
21889 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21890
21891         * attribute.cs: handle custom marshalers and emit marshal info
21892         for fields, too.
21893
21894 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
21895
21896         * makefile.gnu: Added anonymous.cs to the compiler sources.
21897
21898 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
21899
21900         * iterators.cs: Change the name of the proxy class to include two
21901         underscores.
21902
21903         * cs-parser.jay: Update grammar to include anonymous methods.
21904
21905         * anonymous.cs: new file.
21906
21907 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
21908
21909         * class.cs (Field.Define): Add missing test for pointers and
21910         safety. 
21911
21912 2003-05-27  Ravi Pratap  <ravi@ximian.com>
21913
21914         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
21915         we use the stobj opcode.
21916
21917         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
21918         since it wasn't the correct fix. 
21919
21920         It still is puzzling that we are required to use stobj for IntPtr
21921         which seems to be a ValueType.
21922
21923 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
21924
21925         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
21926         during regular simple name resolution.   Now, the trick is that
21927         instead of returning for processing the simplename, we do a
21928         TypeManager.LookupType (ie, a rooted lookup as opposed to a
21929         contextual lookup type).   If a match is found, return that, if
21930         not, return for further composition.
21931
21932         This fixes long-standing 30485.
21933
21934         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21935         using the address to initialize an object, do an Stobj instead of
21936         using the regular Stelem.
21937
21938         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
21939         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
21940         Because if we are a BaseIndexerAccess that value will be true.
21941         Fixes 43643.
21942
21943         * statement.cs (GotoCase.Resolve): Return after reporting an
21944         error, do not attempt to continue. 
21945
21946         * expression.cs (PointerArithmetic.Emit): If our operand is a
21947         long, convert our constants to match the operand before
21948         multiplying.  Convert to I type before adding.   Fixes 43670.
21949
21950 2003-05-14  Ravi Pratap  <ravi@ximian.com>
21951
21952         * enum.cs (ImplicitConversionExists) : Rename to
21953         ImplicitEnumConversionExists to remove ambiguity. 
21954
21955         * ecore.cs (NullCast): New type of cast expression class which
21956         basically is very similar to EmptyCast with the difference being
21957         it still is a constant since it is used only to cast a null to
21958         something else
21959         (eg. (string) null)
21960
21961         * convert.cs (ImplicitReferenceConversion): When casting a null
21962         literal, we return a NullCast.
21963
21964         * literal.cs (NullLiteralTyped): Remove - I don't see why this
21965         should be around anymore.
21966
21967         The renaming (reported was slightly wrong). Corrections:
21968
21969         ConvertImplicitStandard -> ImplicitConversionStandard
21970         ConvertExplicitStandard -> ExplicitConversionStandard
21971
21972         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
21973         before passing them in !
21974
21975         * convert.cs (ImplicitConversionStandard): When comparing for
21976         equal expr and target types, ensure that expr is not a
21977         NullLiteral.
21978
21979         In general, we must not be checking (expr_type ==
21980         target_type) in the top level conversion methods
21981         (ImplicitConversion, ExplicitConversion etc). This checking is
21982         done in the methods that they delegate to.
21983
21984 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
21985
21986         * convert.cs: Move Error_CannotConvertType,
21987         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
21988         ImplicitNumericConversion, ImplicitConversionExists,
21989         ImplicitUserConversionExists, StandardConversionExists,
21990         FindMostEncompassedType, FindMostSpecificSource,
21991         FindMostSpecificTarget, ImplicitUserConversion,
21992         ExplicitUserConversion, GetConversionOperators,
21993         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
21994         TryImplicitIntConversion, Error_CannotConvertImplicit,
21995         ConvertImplicitRequired, ConvertNumericExplicit,
21996         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
21997         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
21998         its own file.
21999
22000         Perform the following renames:
22001
22002         StandardConversionExists -> ImplicitStandardConversionExists
22003         ConvertImplicit -> ImplicitConversion
22004         ConvertImplicitStandard -> ImplicitStandardConversion
22005         TryImplicitIntConversion -> ImplicitIntConversion
22006         ConvertImplicitRequired -> ImplicitConversionRequired
22007         ConvertNumericExplicit -> ExplicitNumericConversion
22008         ConvertReferenceExplicit -> ExplicitReferenceConversion
22009         ConvertExplicit -> ExplicitConversion
22010         ConvertExplicitStandard -> ExplicitStandardConversion
22011
22012 2003-05-19  Martin Baulig  <martin@ximian.com>
22013
22014         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22015         (TypeInfo): Added support for structs having structs as fields.
22016
22017         * ecore.cs (FieldExpr): Implement IVariable.
22018         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22019         VariableInfo for the field.
22020
22021 2003-05-18  Martin Baulig  <martin@ximian.com>
22022
22023         * expression.cs (This.DoResolve): Report a CS0027 if we're
22024         emitting a field initializer.
22025
22026 2003-05-18  Martin Baulig  <martin@ximian.com>
22027
22028         * expression.cs (This.ResolveBase): New public function.
22029         (This.DoResolve): Check for CS0188.
22030
22031         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22032         This.Resolve().
22033
22034         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22035         `instance_expression' to null if we don't have any non-static
22036         methods.
22037
22038 2003-05-18  Martin Baulig  <martin@ximian.com>
22039
22040         Reworked the way how local variables and parameters are handled by
22041         the flow analysis code.
22042
22043         * statement.cs (TypeInfo, VariableMap): New public classes.
22044         (VariableInfo): New public class.  This is now responsible for
22045         checking whether a variable has been assigned.  It is used for
22046         parameters and local variables.
22047         (Block.EmitMeta): Take the InternalParameters as argument; compute
22048         the layout of the flow vectors here.
22049         (Block.LocalMap, Block.ParameterMap): New public properties.
22050         (FlowBranching): The .ctor doesn't get the InternalParameters
22051         anymore since Block.EmitMeta() now computes the layout of the flow
22052         vector.
22053         (MyStructInfo): This class is now known as `StructInfo' and nested
22054         in `TypeInfo'; we don't access this directly anymore.
22055
22056         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22057         property and removed IsAssigned(), IsFieldAssigned(),
22058         SetAssigned() and SetFieldAssigned(); we now call them on the
22059         VariableInfo so we don't need to duplicate this code everywhere.
22060
22061         * expression.cs (ParameterReference): Added `Block block' argument
22062         to the .ctor.
22063         (LocalVariableReference, ParameterReference, This): The new
22064         VariableInfo class is now responsible for all the definite
22065         assignment stuff.
22066
22067         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22068         IsParameterAssigned, SetParameterAssigned): Removed.
22069
22070 2003-05-18  Martin Baulig  <martin@ximian.com>
22071
22072         * typemanager.cs (InitCoreTypes): Try calling
22073         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22074         the 3-args-version.  Corlib now also needs our `void_type'.
22075         (GetMethod): Added overloaded version which takes an optional
22076         `bool report_errors' to allow lookups of optional methods.
22077
22078 2003-05-12  Martin Baulig  <martin@ximian.com>
22079
22080         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22081         only used for locals and not for parameters.
22082
22083 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22084
22085         * support.cs (InternalParameters.ParameterType): Return the
22086         ExternalType of the parameter.
22087
22088         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22089         they were unused.
22090
22091 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22092
22093         * class.cs (MethodData.Define): Do not set the `newslot' on
22094         interface members, if they are also flagged as "override".
22095
22096         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22097         better code for ++i and i++.  This only works for static fields
22098         and local variables.
22099
22100         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22101         want to pull the DeclSpace out of the builder_to_declspace instead
22102         of the TypeBuilder (like in TypeContainer.FindMembers).
22103
22104         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22105         instead of LookupTypeContainer.  Fixes the crash on .NET for
22106         looking up interface members.
22107
22108         * const.cs: Create our own emit context during the Definition
22109         stage, so that constants are evaluated in the proper context, when
22110         a recursive definition happens.
22111
22112 2003-05-11  Martin Baulig  <martin@ximian.com>
22113
22114         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22115         new block for a switch section.
22116         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22117         the adding/lookup in the switch block.  Fixes #39828.
22118
22119 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22120
22121         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22122         functionality: I needed to convert the data after I had performed
22123         the add/sub operation into the operands type size.
22124
22125         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22126         pass the type for the box operation, otherwise the resulting
22127         object would have been of type object.
22128
22129         (BoxedCast): Add constructor to specify the type to box as.
22130
22131 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22132
22133         * iterators.cs: I was reusing the `count' variable inadvertently,
22134         take steps to not allow this to happen.
22135
22136 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22137
22138         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22139         by creating an array at the point where the params starts and
22140         putting all those arguments there, then adjusting the size of the
22141         array.
22142
22143 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22144
22145         * expression.cs (New.AddressOf): Implement interface
22146         IMemoryLocation.  This is used when the `new' operator is used in
22147         the context of an invocation to a method on a value type.
22148
22149         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22150         example. 
22151
22152         * namespace.cs: Also check the using aliases here.
22153
22154         * driver.cs: Move the test for using validity after the types have
22155         been entered, so we do a single pass that also includes the using
22156         aliases. 
22157
22158         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22159         in the regular case.   CreateSiblingForFinally is doing extra
22160         error checking.
22161
22162         * attribute.cs (GetAttributeArgumentExpression): Store the result
22163         on an out value, and use the return value to indicate failure
22164         instead of using null (which is a valid return for Constant.GetValue).
22165
22166         * statement.cs: Perform the analysis flow for the increment
22167         portion after the statement, because this will be the real flow of
22168         execution.  Fixes #42385
22169
22170         * codegen.cs (EmitContext.EmitArgument,
22171         EmitContext.EmitStoreArgument): New helper functions when the
22172         RemapToProxy flag is set.
22173
22174         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22175         function.
22176
22177         Add support for remapping parameters. 
22178
22179         * iterators.cs: Propagate parameter values;  Store parameter
22180         values in the proxy classes.
22181
22182 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22183
22184         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22185         need a proxy reference;  I do not know what I was thinking
22186
22187         * cs-parser.jay (constructor_initializer): catch another error,
22188         and display nice message.
22189
22190         (field_declaration): catch void field declaration
22191         to flag a better error. 
22192
22193         * class.cs (MemberBase.CheckBase): Report an error instead of a
22194         warning if a new protected member is declared in a struct. 
22195         (Field.Define): catch the error of readonly/volatile.
22196
22197         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22198
22199         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22200         volatile variable is taken
22201
22202 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22203
22204         * statement.cs (Fixed.Resolve): Report an error if we are not in
22205         an unsafe context.
22206
22207 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22208
22209         * typemanager.cs: reuse the code that handles type clashes for
22210         delegates and enumerations.
22211
22212         * class.cs (Report28): Always report.
22213
22214         * expression.cs (EncodeAsAttribute): Allow nulls here.
22215
22216 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22217
22218         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22219         the functionality for testing whether an expression is valid for
22220         an attribute here.  Also handle the case of arrays of elements
22221         being stored. 
22222
22223         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22224         encoding a linear array into an array of objects that are suitable
22225         to be passed to an CustomAttributeBuilder.
22226
22227         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22228
22229         * ecore.cs: (FieldExpr): Handle field remapping here.
22230
22231         * iteratators.cs: Pass the instance variable (if the method is an
22232         instance method) to the constructors, so we can access the field
22233         variables on the class.
22234
22235         TODO: Test this with structs.  I think the THIS variable on
22236         structs might have to be a pointer, and not a refenrece
22237
22238 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22239
22240         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22241         local variables to fields in a proxy class.
22242
22243         * iterators.cs (PopulateProxy): Rename our internal fields to
22244         <XXX>.  
22245         Create a <THIS> field if we are an instance method, so we can
22246         reference our parent container variables.
22247         (MapVariable): Called back from the EmitContext code to enter a
22248         new variable to field mapping into the proxy class (we just create
22249         a FieldBuilder).
22250
22251         * expression.cs
22252         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22253         for using the remapped locals to fields.
22254
22255         I placed the code here, because that gives the same semantics to
22256         local variables, and only changes the Emit code.
22257
22258         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22259         statements inside iterators.
22260         (VariableInfo): Add a FieldBuilder for the cases when we are
22261         remapping local variables to fields in a proxy class
22262
22263         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22264         current_block != null.
22265
22266         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22267         not cope with strings, as it has been moved to the
22268         TableSwitchEmit.  Fixed bug in switch generation.
22269
22270         * expression.cs (New.DoResolve): Provide more context for the user
22271         when reporting an error.
22272
22273         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22274         pointers. 
22275
22276         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22277         check the permissions for it.  Note than in a type-resolution
22278         context the check was already present in DeclSpace.ResolveType,
22279         but was missing from the MemberAccess.
22280
22281         (ArrayCreation.CheckIndices): warn if the user has
22282         more nested levels of expressions, but there are no more
22283         dimensions specified.  Avoids crash on bug 41906.
22284
22285 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22286
22287         * statement.cs (Block): replace Implicit bool, for a generic
22288         flags.   
22289         New flag: `Unchecked'.  This is used during the EmitMeta phase
22290         (which is out-of-line with the regular Resolve/Emit process for a
22291         statement, as this is done ahead of time, but still gets a chance
22292         to call constant resolve).
22293
22294         (Block.Flags): new enum for adding a new flag.
22295
22296         (Block.EmitMeta): track the state of unchecked.
22297
22298         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22299         to enable constant resolution to work there as well.
22300
22301 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22302
22303         * typemanager.cs (ienumerable_type): Also look up
22304         System.Collections.IEnumerable. 
22305
22306 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22307
22308         TODO: Test more than one conditional per method.
22309
22310         * class.cs (Indexer.Define): Report the location where the user is
22311         referencing the unsupported feature.
22312
22313         (MethodData): Overload the use of `conditionals' to
22314         minimize the creation of needless ArrayLists.   This saves roughly
22315         212kb on my machine.
22316
22317         (Method): Implement the new IIteratorContainer interface.
22318         (Method.SetYields): Implement the method by setting the ModFlags
22319         to contain METHOD_YIELDS.
22320
22321         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22322         which just got set to null.
22323
22324         * iterators.cs: New file.
22325
22326         (Yield, YieldBreak): New statements.
22327
22328         * statement.cs (Return.Resolve): Flag an error if we are used in
22329         an iterator method.
22330
22331         * codegen.cs (InIterator): New flag set if the code is being
22332         compiled in an iterator method.
22333
22334         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22335         internal modifier, and we just use it to avoid adding extra
22336         fields, as this is seldom used.  
22337
22338         * cs-parser.jay: Add yield_statement (yield and yield break).
22339
22340         * driver.cs: New flag -v2 to turn on version 2 features. 
22341
22342         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22343         hashtable when v2 is enabled.
22344
22345 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22346
22347         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22348         there is already a namespace defined with this name.
22349
22350         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22351         people upgraded their corlibs.
22352
22353         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22354         always use fully qualified types, no need to use the compiler
22355         front end.
22356
22357         (TypeManager.IsNamespace): Use binarysearch.
22358
22359         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22360         AddDelegate): I did not quite use the new IsValid API properly: I
22361         have to pass the short-name and the fullname.  I was passing only
22362         the basename instead of the fullname sometimes. 
22363
22364         (TypeContainer.DefineType): call NamespaceClash.
22365
22366         * interface.cs (Interface.DefineType): use NamespaceClash before
22367         defining the type.
22368
22369         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22370         defining the type.
22371
22372         * enum.cs: (Enum.DefineType): use NamespaceClash before
22373         defining the type.
22374
22375         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22376         speed increase.  First, use the negative_hits cache when we get a
22377         negative.  Second, add the type with its full original name
22378         instead of the new . and + encoded name (reflection uses + to
22379         separate type from a nested type).  Use LookupTypeReflection
22380         directly which bypasses the type->name hashtable (that we already
22381         know does not contain the type.
22382
22383         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22384         location/container type. 
22385
22386         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22387
22388 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22389
22390         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22391
22392         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22393         method is being referenced in the method group from a static
22394         context, and report error 120 if so.
22395
22396         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22397         Error118. 
22398
22399         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22400         is created, we create the A namespace).
22401
22402         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22403         Fixes #41591
22404
22405 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22406
22407         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22408         invocation to ModuleBuilder.GetType with the same values will
22409         return a new type instance, so we need to cache its return
22410         values. 
22411
22412         * expression.cs (Binary.ResolveOperator): Only allow the compare
22413         operators on enums if they are of the same type.
22414
22415         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22416         types of ValueType on their own case.  Before we were giving them
22417         the same treatment as objects.
22418
22419         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22420         fullname.  Short name is used to compare against container name.
22421         Fullname is used to check against defined namespace names.
22422
22423         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22424         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22425
22426         (Method.CheckBase): Call parent.
22427         (MemberBase.CheckBase): Check for protected members on sealed
22428         classes.
22429         (PropertyBase.CheckBase): Call parent.
22430         (Field.Define): Call parent.
22431
22432         * report.cs: Negative error codes are now mapped to 8000 - code,
22433         so that the display is render more nicely.
22434
22435         * typemanager.cs: Do not use try/catch, instead report a regular
22436         error. 
22437
22438         (GetPointerType, GetReferenceType): These methods provide
22439         mechanisms to obtain the T* and T& from a T.  We had the code
22440         previously scattered around the code base, and it also used
22441         TypeManager.LookupType that would go through plenty of caches.
22442         This one goes directly to the type source.
22443
22444         In some places we did the Type.GetType followed by
22445         ModuleBuilder.GetType, but not in others, so this unifies the
22446         processing as well.
22447
22448         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22449         statements now that we have namespace information.
22450
22451         * typemanager.cs (IsNamespace): New method, returns whether the
22452         string presented is a namespace or not.
22453
22454         (ComputeNamespaces): New public entry point, computes the list of
22455         available namespaces, using the GetNamespaces API call in Mono, or
22456         the slower version in MS.NET.   
22457
22458         Now before we start the semantic analysis phase, we have a
22459         complete list of namespaces including everything that the user has
22460         provided.
22461
22462         Deleted old code to cache namespaces in .nsc files.
22463
22464 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22465
22466         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22467         class/struct location definition Location for the implicit
22468         constructor location.
22469
22470         (Operator.Define): Use the location of the operator for the
22471         implicit Method definition.
22472
22473         (Constructor.Emit): use the constructor location for the implicit
22474         base initializer constructor.
22475
22476         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22477         and the Expression class now contains two new methods:
22478
22479         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22480         isolate type lookup from the rest of the resolution process.
22481
22482         Since we use Expressions to hold type definitions due to the way
22483         we parse the input we have historically overloaded Resolve to
22484         perform the Type lookups if a special flag is passed.  Now this is
22485         eliminated and two methods take their place. 
22486
22487         The differences in the two methods between xStep and xTerminal is
22488         that xStep is involved in our current lookup system that uses
22489         SimpleNames to compose a name, while xTerminal is used just to
22490         catch the case where the simplename lookup failed.
22491
22492 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22493
22494         * expression.cs (ResolveMemberAccess): Remove redundant code.
22495         TypeExpr expressions are always born fully resolved.
22496
22497         * interface.cs (PopulateMethod): Do not lookup the types twice.
22498         We were doing it once during SemanticAnalysis and once during
22499         PopulateMethod.
22500
22501         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22502         in local variable type definitions, were being returned as a
22503         SimpleName (we decomposed everything into a string), that is
22504         because primary_expression was being used instead of a type in the
22505         grammar (reduce/reduce conflicts).
22506
22507         The part that was wrong is that we converted the expression into a
22508         string (an oversimplification in one hand, compounded with primary
22509         expressions doing string concatenation).
22510
22511         So things like:
22512
22513         A.B.C [] x;
22514
22515         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22516         using clauses from working on this particular context.  And a type
22517         was being matched directly against "A.B.C[]".
22518
22519         We now use the correct approach, and allow for ComposedCast to be
22520         part of the unary expression.  So the "A.B.C []" become a composed
22521         cast of "A.B.C" (as a nested group of MemberAccess with a
22522         SimpleName at the end) plus the rank composition "[]". 
22523
22524         Also fixes 35567
22525
22526 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22527
22528         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22529         for the access level checking.
22530
22531         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22532         `TypeContainer container', because I kept getting confused when I
22533         was debugging this code.
22534
22535         * expression.cs (Indexers): Instead of tracking getters/setters,
22536         we now track them in parallel.  We create one arraylist less, but
22537         most importantly it is possible now for the LValue code to find a
22538         matching get for a set.
22539
22540         (IndexerAccess.DoResolveLValue): Update the code.
22541         GetIndexersForType has been modified already to extract all the
22542         indexers from a type.  The code assumed it did not.
22543
22544         Also make the code set the correct return type for the indexer.
22545         This was fixed a long time ago for properties, but was missing for
22546         indexers.  It used to be void_type.
22547
22548         (Binary.Emit): Test first for doubles instead of
22549         floats, as they are more common.
22550
22551         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22552         when dealing with floats and the <=, >= operators.  This fixes bug
22553         #39314 
22554
22555         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22556         to load the array value by emitting a load on the foreach variable
22557         type.  This was incorrect.  
22558
22559         We now emit the code to load an element using the the array
22560         variable type, and then we emit the conversion operator.
22561
22562         Fixed #40176
22563
22564 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22565
22566         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22567
22568 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22569
22570         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22571         test for protection before we test for signatures. 
22572
22573         (MethodSignature.ToString): implement.
22574
22575         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22576         to the case where we reduced into a LongConstant.
22577
22578         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22579         depend on whether the information is acurrate, because the
22580         Microsoft runtime will always claim that the array type is public,
22581         regardless of the real state.
22582
22583         If the type is a pointer, another problem happens: the type is
22584         reported as non-public in Microsoft.  
22585
22586         In both cases we have to call CheckAccessLevel recursively with
22587         the underlying type as the argument to be tested.
22588
22589 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22590
22591         * assign.cs (Assign.Emit): If we are dealing with a compound
22592         assignment expression, we should use the code path that stores the
22593         intermediate result in a temporary value.  This fixes #40903.
22594
22595         *expression.cs (Indirection.ToString): Provide ToString method for
22596         debugging. 
22597
22598 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
22599
22600         * class.cs: Null out fields holding references to Block objects so
22601         they can be garbage collected.
22602
22603         * expression.cs (OverloadResolve): Remove unused local.
22604
22605 2003-04-07  Martin Baulig  <martin@ximian.com>
22606
22607         * codegen.cs (EmitContext.CurrentFile): New public field.
22608         (EmitContext.Mark): Use the CurrentFile to check whether the
22609         location is in the correct file.
22610         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
22611
22612 2003-04-07  Martin Baulig  <martin@ximian.com>
22613
22614         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
22615
22616         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
22617         location.  [FIXME: The location argument which gets passed to this
22618         method is sometimes wrong!]
22619
22620 2003-04-07  Nick Drochak <ndrochak@gol.com>
22621
22622         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
22623
22624 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
22625
22626         * expression.cs (Indirection.EmitAssign): We were using the
22627         temporary, but returning immediately instead of continuing the
22628         EmitAssing flow.
22629
22630 2003-04-06  Martin Baulig  <martin@ximian.com>
22631
22632         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
22633         if it's a nested child, but also deriving from the outer class.
22634         See test 190.cs.
22635
22636         * typemanager.cs (IsNestedChildOf): Make this work if it's a
22637         nested child, but also deriving from the outer class.  See
22638         test-190.cs.
22639         (FilterWithClosure): We may access private members of the outer
22640         class if we're a nested child and deriving from the outer class.
22641         (RealMemberLookup): Only set `closure_private_ok' if the
22642         `original_bf' contained BindingFlags.NonPublic.
22643
22644 2003-04-05  Martin Baulig  <martin@ximian.com>
22645
22646         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
22647
22648 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
22649
22650         * class.cs (Event.Define): Do not allow abstract events to have
22651         initializers. 
22652
22653 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
22654
22655         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
22656         block in event declarations.
22657
22658         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
22659         value type, get its address.
22660
22661         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
22662         leaving a class on the stack instead of a boolean value (int
22663         0/1).  Change the code so we compare against null, and then the
22664         result against zero.
22665
22666         * class.cs (TypeContainer.GetClassBases): We were checking for the
22667         parent class being sealed too late.
22668
22669         * expression.cs (Binary.Emit): For <= and >= when dealing with
22670         floating point values, use cgt.un and clt.un instead of cgt and
22671         clt alone.
22672
22673 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
22674
22675         * statement.cs: Apply the same optimization as MS: skip the 
22676         GetEnumerator returning an IEnumerator, and use the one returning a 
22677         CharEnumerator instead. This allows us to avoid the try-finally block 
22678         and the boxing.
22679
22680 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
22681
22682         * cs-parser.jay: Attributes cannot be applied to
22683                          namespaces. Fixes #40473
22684
22685 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22686
22687         * class.cs:
22688         (Add*): check if the name is valid using the full name for constants,
22689         fields, properties and events.
22690
22691 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
22692
22693         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
22694         char constants to be part of the enumeration.
22695
22696         * expression.cs (Conditional.DoResolve): Add support for operator
22697         true. Implements the missing functionality from 14.12
22698
22699         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
22700         operator true/false as required by the spec.
22701
22702         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
22703         implicit conversion to boolean.
22704
22705         * statement.cs (Statement.ResolveBoolean): A boolean expression is
22706         also one where the type implements `operator true'. 
22707
22708         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
22709         get an expression that will invoke operator true based on an
22710         expression.  
22711
22712         (GetConversionOperators): Removed the hack that called op_True
22713         here.  
22714
22715         (Expression.ResolveBoolean): Move this from Statement.
22716
22717 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
22718
22719         * ecore.cs (FieldExpr): do not allow initialization of initonly
22720         fields on derived classes
22721
22722 2003-03-13  Martin Baulig  <martin@ximian.com>
22723
22724         * statement.cs (Block.Emit): Call ig.BeginScope() and
22725         ig.EndScope() when compiling with debugging info; call
22726         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
22727
22728 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
22729
22730         * expression.cs (Indexers): Do not construct immediately, allow
22731         for new members to be appended as we go.  Fixes 38143
22732
22733 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22734
22735         * expression.cs: save/restore context when resolving an unchecked
22736         expression.
22737
22738 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
22739
22740         * cfold.cs: Catch division by zero in modulus operator during
22741         constant folding.
22742
22743 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
22744
22745         * interface.cs (Interface.DefineMembers): Avoid defining members
22746         twice. 
22747
22748 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
22749
22750         * driver.cs: handle the +/- options for -noconfig
22751
22752         * statement.cs (Unckeched.Resolve): Also track the state of
22753         unchecked in the Resolve phase.
22754
22755 2003-02-27  Martin Baulig  <martin@ximian.com>
22756
22757         * ecore.cs (Expression.MemberLookup): Don't create a
22758         MethodGroupExpr for something which is not a method.  Fixes #38291.
22759
22760 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
22761
22762         * class.cs (MemberBase.CheckParameters): Also check that the type
22763         is unmanaged if it is a pointer.
22764
22765         * expression.cs (SizeOf.Resolve): Add location information.
22766
22767         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
22768         a managed type is declared.
22769
22770         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
22771         parameter modifiers as well.  Fixes bug 38606
22772
22773         * class.cs: Very sad.  Am backing out the speed up changes
22774         introduced by the ArrayList -> Array in the TypeContainer, as they
22775         were not actually that much faster, and introduced a bug (no error
22776         reports on duplicated methods).
22777
22778         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
22779         source first, this will guarantee that we have a valid expression
22780         before calling in lower levels functions that will require a
22781         resolved object.  Then use this original_source in the
22782         target.ResolveLValue instead of the original source that was
22783         passed to us.
22784
22785         Another change.  Use target.Resolve instead of LValueResolve.
22786         Although we are resolving for LValues, we will let the Assign code
22787         take care of that (it will be called again from Resolve).  This
22788         basically allows code like this:
22789
22790         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
22791         class Y { void A (X x) { x [0] += o; }
22792
22793         The problem was that the indexer was trying to resolve for
22794         set_Item (idx, object o) and never finding one.  The real set_Item
22795         was set_Item (idx, X).  By delaying the process we get the right
22796         semantics. 
22797
22798         Fixes bug 36505
22799
22800 2003-02-23  Martin Baulig  <martin@ximian.com>
22801
22802         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
22803         while calling DoEmit ().
22804
22805         * codegen.cs (EmitContext.Mark): Don't mark locations in other
22806         source files; if you use the #line directive inside a method, the
22807         compiler stops emitting line numbers for the debugger until it
22808         reaches the end of the method or another #line directive which
22809         restores the original file.
22810
22811 2003-02-23  Martin Baulig  <martin@ximian.com>
22812
22813         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
22814
22815 2003-02-23  Martin Baulig  <martin@ximian.com>
22816
22817         * statement.cs (Block.AddChildVariableNames): We need to call this
22818         recursively, not just for our immediate children.
22819
22820 2003-02-23  Martin Baulig  <martin@ximian.com>
22821
22822         * class.cs (Event.Define): Always make the field private, like csc does.
22823
22824         * typemanager.cs (TypeManager.RealMemberLookup): Make events
22825         actually work, fixes bug #37521.
22826
22827 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
22828
22829         * delegate.cs: When creating the various temporary "Parameters"
22830         classes, make sure that we call the ComputeAndDefineParameterTypes
22831         on those new parameters (just like we do with the formal ones), to
22832         allow them to be resolved in the context of the DeclSpace.
22833
22834         This fixes the bug that Dick observed in Bugzilla #38530.
22835
22836 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
22837
22838         * expression.cs (ResolveMemberAccess): When resolving a constant,
22839         do not attempt to pull a constant if the value was not able to
22840         generate a valid constant.
22841
22842         * const.cs (LookupConstantValue): Do not report more errors than required.
22843
22844 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22845
22846         * expression.cs: fixes bug #38328.
22847
22848 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22849
22850         * class.cs: Changed all the various members that can be part of a
22851         class from being an ArrayList to be an Array of the right type.
22852         During the DefineType type_list, interface_list, delegate_list and
22853         enum_list are turned into types, interfaces, delegates and enums
22854         arrays.  
22855
22856         And during the member population, indexer_list, event_list,
22857         constant_list, field_list, instance_constructor_list, method_list,
22858         operator_list and property_list are turned into their real arrays.
22859
22860         Although we could probably perform this operation earlier, for
22861         good error reporting we need to keep the lists and remove the
22862         lists for longer than required.
22863
22864         This optimization was triggered by Paolo profiling the compiler
22865         speed on the output of `gen-sample-program.pl' perl script. 
22866
22867         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
22868         not crash in methods like MemberLookupFailed that use this field.  
22869
22870         This problem arises when the compiler fails to resolve a type
22871         during interface type definition for example.
22872
22873 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22874
22875         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
22876         inherit from System.Object, so we have to stop at null, not only
22877         when reaching System.Object.
22878
22879 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
22880
22881         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
22882         DeclaredOnly because the parent indexer might have had a different
22883         name, but did not loop until the top of the hierarchy was reached.
22884
22885         The problem this one fixes is 35492: when a class implemented an
22886         indexer from an interface, we were getting the interface method
22887         (which was abstract) and we were flagging an error (can not invoke
22888         abstract method).
22889
22890         This also keeps bug 33089 functioning, and test-148 functioning.
22891
22892         * typemanager.cs (IsSpecialMethod): The correct way of figuring
22893         out if a method is special is to see if it is declared in a
22894         property or event, or whether it is one of the predefined operator
22895         names.   This should fix correctly #36804.
22896
22897 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
22898
22899         The goal here is to remove the dependency on EmptyCast.Peel ().
22900         Killing it completely.
22901
22902         The problem is that currently in a number of places where
22903         constants are expected, we have to "probe" for an EmptyCast, and
22904         Peel, which is not the correct thing to do, as this will be
22905         repetitive and will likely lead to errors. 
22906
22907         The idea is to remove any EmptyCasts that are used in casts that
22908         can be reduced to constants, so we only have to cope with
22909         constants. 
22910
22911         This bug hunt was triggered by Bug 37363 and the desire to remove
22912         the duplicate pattern where we were "peeling" emptycasts to check
22913         whether they were constants.  Now constants will always be
22914         constants.
22915
22916         * ecore.cs: Use an enumconstant here instead of wrapping with
22917         EmptyCast.  
22918
22919         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
22920         throwing me off.  By handling this we can get rid of a few hacks.
22921
22922         * statement.cs (Switch): Removed Peel() code.
22923
22924 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
22925
22926         * class.cs: Location information for error 508
22927
22928         * expression.cs (New.DoResolve): Add a guard against double
22929         resolution of an expression.  
22930
22931         The New DoResolve might be called twice when initializing field
22932         expressions (see EmitFieldInitializers, the call to
22933         GetInitializerExpression will perform a resolve on the expression,
22934         and later the assign will trigger another resolution
22935
22936         This leads to bugs (#37014)
22937
22938         * delegate.cs: The signature for EndInvoke should contain any ref
22939         or out parameters as well.  We were not doing this in the past. 
22940
22941         * class.cs (Field.Define): Do not overwrite the type definition
22942         inside the `volatile' group.  Turns out that volatile enumerations
22943         were changing the type here to perform a validity test, which
22944         broke conversions. 
22945
22946 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
22947
22948         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
22949         and structs, we do not want to load the instance variable
22950
22951         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
22952         enum_type has to be handled like an object reference (implicit
22953         conversions exists from this to object), but the regular IsClass
22954         and IsValueType tests will never return true for this one.
22955
22956         Also we use TypeManager.IsValueType instead of type.IsValueType,
22957         just for consistency with the rest of the code (this is only
22958         needed if we ever use the construct exposed by test-180.cs inside
22959         corlib, which we dont today).
22960
22961 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
22962
22963         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
22964         just InternalCall.
22965
22966 2003-02-09  Martin Baulig  <martin@ximian.com>
22967
22968         * namespace.cs (Namespace..ctor): Added SourceFile argument.
22969         (Namespace.DefineNamespaces): New static public method; this is
22970         called when we're compiling with debugging to add all namespaces
22971         to the symbol file.
22972
22973         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
22974         pass it to the Namespace's .ctor.
22975
22976         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
22977         and MethodBase arguments; pass the namespace ID to the symwriter;
22978         pass the MethodBase instead of the token to the symwriter.
22979         (SymbolWriter.DefineNamespace): New method to add a namespace to
22980         the symbol file.
22981
22982 2003-02-09  Martin Baulig  <martin@ximian.com>
22983
22984         * symbolwriter.cs: New file.  This is a wrapper around
22985         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
22986         methods here in near future.
22987
22988 2003-02-09  Martin Baulig  <martin@ximian.com>
22989
22990         * codegen.cs (EmitContext.Mark): Just pass the arguments to
22991         ILGenerator.MarkSequencePoint() which are actually used by the
22992         symbol writer.
22993
22994 2003-02-09  Martin Baulig  <martin@ximian.com>
22995
22996         * location.cs (SourceFile): New public sealed class.  This
22997         contains the name and an index which is used in the location's token.
22998         (Location): Reserve an appropriate number of bits in the token for
22999         the source file instead of walking over that list, this gives us a
23000         really huge performance improvement when compiling with debugging.
23001
23002         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23003         `SourceFile' argument instead of a string.
23004         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23005         but don't parse/tokenize here, we need to generate the list of all
23006         source files before we do that.
23007         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23008         the files.
23009
23010         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23011         instead of a string.
23012
23013         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23014         of a string.
23015
23016 2003-02-09  Martin Baulig  <martin@ximian.com>
23017
23018         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23019         filename on `#line default'.
23020
23021 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23022
23023         * statement.cs: don't clear the pinned var when the fixed statement
23024         returns from the method (fixes bug#37752).
23025
23026 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23027
23028         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23029         to IsValueType.
23030
23031 2003-02-07  Martin Baulig  <martin@ximian.com>
23032
23033         * driver.cs: Removed the `--debug-args' command line argument.
23034
23035         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23036         automatically by the AsssemblyBuilder.
23037         (CodeGen.InitializeSymbolWriter): We don't need to call any
23038         initialization function on the symbol writer anymore.  This method
23039         doesn't take any arguments.
23040
23041 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23042
23043         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23044         from referenced assemblies as well.
23045
23046 2003-02-02  Martin Baulig  <martin@ximian.com>
23047
23048         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23049
23050 2003-02-02  Martin Baulig  <martin@ximian.com>
23051
23052         * class.cs (Constructor.Emit): Open the symbol writer before
23053         emitting the constructor initializer.
23054         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23055         single-stepping through constructor initializers.
23056
23057 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23058
23059         * class.cs: Handle error 549: do not allow virtual methods in
23060         sealed classes. 
23061
23062 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23063
23064         * decl.cs: Check access levels when resolving types
23065
23066 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23067
23068         * statement.cs: Add parameters and locals set in catch blocks that might 
23069         return to set vector
23070
23071 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23072
23073         * class.cs (Operator): Set the SpecialName flags for operators.
23074
23075         * expression.cs (Invocation.DoResolve): Only block calls to
23076         accessors and operators on SpecialName methods.
23077
23078         (Cast.TryReduce): Handle conversions from char constants.
23079
23080
23081 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23082
23083         * statement.cs: small memory and time optimization in FlowBranching.
23084
23085 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23086
23087         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23088         problem that the last fix but in the other sid (Set).
23089
23090         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23091         access when there is no indexer in the hierarchy.
23092
23093 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23094
23095         * class.cs: Combine some if statements.
23096
23097 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23098
23099         * driver.cs: fixed bug #37187.
23100
23101 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23102
23103         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23104         any indexer, it's needed to build a list with all the indexers in the
23105         hierarchy (AllGetters), else we have problems. Fixes #35653.
23106
23107 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23108
23109         * class.cs (MethodData.Define): It is wrong for an interface
23110         implementation to be static in both cases: explicit and implicit.
23111         We were only handling this in one case.
23112
23113         Improve the if situation there to not have negations.
23114
23115         * class.cs (Field.Define): Turns out that we do not need to check
23116         the unsafe bit on field definition, only on usage.  Remove the test.
23117
23118 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23119
23120         * driver.cs: use assembly.Location instead of Codebase (the latest
23121         patch made mcs fail when using MS assemblies).
23122
23123 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23124
23125         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23126         get the path to *corlib.dll.
23127
23128 2003-01-21  Nick Drochak <ndrochak@gol.com>
23129
23130         * cs-tokenizer.cs:
23131         * pending.cs:
23132         * typemanager.cs: Remove compiler warnings
23133
23134 2003-01-20  Duncan Mak  <duncan@ximian.com>
23135
23136         * AssemblyInfo.cs: Bump the version number to 0.19.
23137
23138 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23139
23140         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23141
23142 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23143
23144         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23145
23146 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23147
23148         * cs-parser.jay: Small fix: we were not comparing the constructor
23149         name correctly.   Thanks to Zoltan for the initial pointer.
23150
23151 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23152
23153         * cs-tokenizer.cs: Set file name when specified with #line
23154
23155 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23156
23157         * cs-parser.jay: Only perform the constructor checks here if we
23158         are named like the class;  This will help provider a better
23159         error.  The constructor path is taken when a type definition is
23160         not found, but most likely the user forgot to add the type, so
23161         report that rather than the constructor error.
23162
23163 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23164
23165         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23166         allocations.
23167
23168 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23169
23170         * cs-parser.jay: Add cleanup call.
23171
23172 2003-01-13  Duncan Mak  <duncan@ximian.com>
23173
23174         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23175         consistent with other methods.
23176
23177 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23178
23179         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23180
23181 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23182
23183         * attribute.cs: only set GuidAttr to true when we have a
23184         GuidAttribute.
23185
23186 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23187
23188         * ecore.cs:
23189         * expression.cs:
23190         * typemanager.cs: fixes to allow mcs compile corlib with the new
23191         Type.IsSubclassOf fix.
23192
23193 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23194
23195         * expression.cs (LocalVariableReference.DoResolve): Classify a
23196         constant as a value, not as a variable.   Also, set the type for
23197         the variable.
23198
23199         * cs-parser.jay (fixed_statement): take a type instead of a
23200         pointer_type, so we can produce a better error message later.
23201
23202         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23203         as an error.  
23204
23205         (For.DoEmit): Make inifinite loops have a
23206         non-conditional branch back.
23207
23208         (Fixed.DoEmit): First populate the pinned variables, then emit the
23209         statement, then clear the variables.  Before I was emitting the
23210         code once for each fixed piece.
23211
23212
23213 2003-01-08  Martin Baulig  <martin@ximian.com>
23214
23215         * statement.cs (FlowBranching.MergeChild): A break in a
23216         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23217
23218 2003-01-08  Martin Baulig  <martin@ximian.com>
23219
23220         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23221         lives in the same number space than `param_map'.  Fixes #36154.
23222
23223 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23224
23225         * cs-parser.jay (constructor_declaration): Set the
23226         Constructor.ModFlags before probing for it.  This makes the
23227         compiler report 514, 515 and 132 (the code was there, but got
23228         broken). 
23229
23230         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23231         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23232         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23233
23234 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23235
23236         * enum.cs: create the enum static fields using the enum type.
23237
23238 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23239
23240         * class.cs: don't try to create the ParamBuilder for the return
23241         type if it's not needed (and handle it breaking for the ms runtime
23242         anyway).
23243
23244 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23245
23246         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23247
23248 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23249
23250         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23251         the command.   This showed up while compiling the JANET source
23252         code, which used \r as its only newline separator.
23253
23254 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23255
23256         * class.cs (Method.Define): If we are an operator (because it
23257         reuses our code), then set the SpecialName and HideBySig.  #36128
23258
23259 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23260
23261         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23262         exception, report error 120 `object reference required'.
23263
23264         * driver.cs: Add --pause option, used during to measure the size
23265         of the process as it goes with --timestamp.
23266
23267         * expression.cs (Invocation.DoResolve): Do not allow methods with
23268         SpecialName to be invoked.
23269
23270 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23271
23272         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23273         number before adding it.
23274
23275 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23276
23277         * ecore.cs (StandardImplicitConversion): When in an unsafe
23278         context, we allow conversion between void * to any other pointer
23279         type. This fixes bug #35973.
23280
23281 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23282
23283         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23284         is not thrown when extensionless outputs are used 
23285
23286 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23287
23288         * rootcontext.cs: fixed compilation of corlib.
23289
23290 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23291
23292         * attribute.cs (Attributes.Contains): Add new method.
23293
23294         * class.cs (MethodCore.LabelParameters): if the parameter is an
23295         `out' parameter, check that no attribute `[In]' has been passed.
23296
23297         * enum.cs: Handle the `value__' name in an enumeration.
23298
23299 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23300
23301         * decl.cs: Added special case to allow overrides on "protected
23302         internal" methods
23303
23304 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23305
23306         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23307         since it makes much more sense.
23308
23309         (Attributes.ctor): Don't require a Location parameter.
23310
23311         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23312
23313         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23314         since we already have that information per attribute.
23315
23316         * everywhere : make appropriate changes.
23317
23318         * class.cs (LabelParameters): Write the code which actually
23319         applies attributes to the return type. We can't do this on the MS
23320         .NET runtime so we flag a warning in the case an exception is
23321         thrown.
23322
23323 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23324
23325         * const.cs: Handle implicit null conversions here too.
23326
23327 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23328
23329         * class.cs (MethodCore.LabelParameters): Remove the extra
23330         Type [] parameter since it is completely unnecessary. Instead
23331         pass in the method's attributes so that we can extract
23332         the "return" attribute.
23333
23334 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23335
23336         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23337         of ignoring it and letting the compile continue.
23338
23339         * typemanager.cs (ChangeType): use an extra argument to return an
23340         error condition instead of throwing an exception.
23341
23342 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23343
23344         * expression.cs (Unary.TryReduce): mimic the code for the regular
23345         code path.  Perform an implicit cast in the cases where we can
23346         implicitly convert to one of the integral types, and then reduce
23347         based on that constant.   This fixes bug #35483.
23348
23349 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23350
23351         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23352
23353 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23354
23355         * namespace.cs: fixed bug #35489.
23356
23357 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23358
23359         * class.cs: Remove some dead code.
23360
23361         * cs-parser.jay: Estimate the number of methods needed
23362         (RootContext.MethodCount);
23363
23364         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23365         numbers instead of StringBuilders.
23366
23367         * support.cs (PtrHashtable): Add constructor with initial size;
23368         We can now reduce reallocations of the method table.
23369
23370 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23371
23372         * attribute.cs (ApplyAttributes): Keep track of the emitted
23373         attributes on a per-target basis. This fixes bug #35413.
23374
23375 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23376
23377         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23378         default to the Windows 1252 encoding.
23379
23380         (UnixParseOption): Support version, thanks to Alp for the missing
23381         pointer. 
23382
23383         * AssemblyInfo.cs: Add nice assembly information.
23384
23385         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23386         (bug 35169).
23387
23388         * cs-parser.jay: Allow a trailing comma before the close bracked
23389         in the attribute_section production.
23390
23391         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23392         address of the instance was being taken, I will take this out,
23393         because we take the address of the object immediately here.
23394
23395 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23396
23397         * typemanager.cs (AreMultipleAllowed): Take care of the most
23398         obvious case where attribute type is not in the current assembly -
23399         stupid me ;-)
23400
23401 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23402
23403         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23404         definitions, instead of doing that afterwards.  
23405
23406         Also we use a nice little hack, depending on the constructor, we
23407         know if we are a "composed" name or a simple name.  Hence, we
23408         avoid the IndexOf test, and we avoid 
23409
23410         * codegen.cs: Add code to assist in a bug reporter to track down
23411         the source of a compiler crash. 
23412
23413 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23414
23415         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23416         types have been emitted for a given element and flag an error
23417         if something which does not have AllowMultiple set is used more
23418         than once.
23419
23420         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23421         attribute types and their corresponding AllowMultiple properties
23422
23423         (AreMultipleAllowed): Check the property for a given type.
23424
23425         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23426         property in the case we have a TypeContainer.
23427
23428         (Attributes.AddAttribute): Detect duplicates and just skip on
23429         adding them. This trivial fix catches a pretty gross error in our
23430         attribute emission - global attributes were being emitted twice!
23431
23432         Bugzilla bug #33187 is now fixed.
23433
23434 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23435
23436         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23437         instead of pp_and).
23438
23439         * expression.cs (Binary.ResolveOperator): I can only use the
23440         Concat (string, string, string) and Concat (string, string,
23441         string, string) if the child is actually a concatenation of
23442         strings. 
23443
23444 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23445
23446         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23447         context where we need a 2-character lookahead.
23448
23449         * pending.cs (PendingImplementation): Rework so we can keep track
23450         of interface types all the time, and flag those which were
23451         implemented by parents as optional.
23452
23453 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23454
23455         * expression.cs (Binary.ResolveOperator): Use
23456         String.Concat(string,string,string) or
23457         String.Concat(string,string,string,string) when possible. 
23458
23459         * typemanager: More helper methods.
23460
23461
23462 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23463
23464         * pending.cs: remove the bogus return from GetMissingInterfaces()
23465         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23466
23467 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23468
23469         * namespace.cs: avoid duplicated 'using xxx' being added to
23470         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23471         when we get more than one 'using' statement for the same namespace.
23472         Report a CS0105 warning for it.
23473
23474 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23475
23476         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23477         of calling getChar/putback, uses internal knowledge of it.    
23478
23479         (xtoken): Reorder tokenizer so most common patterns are checked
23480         first.  This reduces the compilation time in another 5% (from 8.11s
23481         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23482
23483         The parsing time is 22% of the compilation in mcs, and from that
23484         64% is spent on the tokenization process.  
23485
23486         I tried using a binary search for keywords, but this is slower
23487         than the hashtable.  Another option would be to do a couple of
23488         things:
23489
23490                 * Not use a StringBuilder, instead use an array of chars,
23491                   with a set value.  Notice that this way we could catch
23492                   the 645 error without having to do it *afterwards*.
23493
23494                 * We could write a hand-parser to avoid the hashtable
23495                   compares altogether.
23496
23497         The identifier consumption process takes 37% of the tokenization
23498         time.  Another 15% is spent on is_number.  56% of the time spent
23499         on is_number is spent on Int64.Parse:
23500
23501                 * We could probably choose based on the string length to
23502                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23503                   computations. 
23504
23505         Another 3% is spend on wrapping `xtoken' in the `token' function.
23506
23507         Handle 0xa0 as whitespace (#34752)
23508
23509 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23510
23511         * typemanager.cs (IsCLRType): New routine to tell whether a type
23512         is one of the builtin types.  
23513
23514         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23515         typecode in more places instead of doing pointer comparissions.
23516         We could leverage some knowledge about the way the typecodes are
23517         laid out.
23518
23519         New code to cache namespaces in assemblies, it is currently not
23520         invoked, to be used soon.
23521
23522         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23523
23524         * expression.cs (Binary.ResolveOperator): specially handle
23525         strings, and do not perform user-defined operator overloading for
23526         built-in types.
23527
23528 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23529
23530         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23531         internalcall as it is a pretty simple operation;  Avoid whenever
23532         possible to call Char.IsLetter.
23533
23534         (consume_identifier): Cut by half the number of
23535         hashtable calls by merging the is_keyword and GetKeyword behavior.
23536
23537         Do not short-circuit, because if we do, we
23538         report errors (ie, #if false && true would produce an invalid
23539         directive error);
23540
23541
23542 2002-11-24  Martin Baulig  <martin@ximian.com>
23543
23544         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23545         check constant ranges and report a CS0221.  Fixes #33186.
23546
23547 2002-11-24  Martin Baulig  <martin@ximian.com>
23548
23549         * cs-parser.jay: Make this work for uninitialized variable
23550         declarations in the `for' initializer.  Fixes #32416.
23551
23552 2002-11-24  Martin Baulig  <martin@ximian.com>
23553
23554         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23555         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23556
23557 2002-11-24  Martin Baulig  <martin@ximian.com>
23558
23559         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23560         argument; if true, we also check for user-defined conversions.
23561         This is only needed if both arguments are of a user-defined type.
23562         Fixes #30443, added test-175.cs.
23563         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23564
23565         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23566
23567 2002-11-24  Martin Baulig  <martin@ximian.com>
23568
23569         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23570         function to get the store opcode.
23571         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23572         only emit the Ldelema if the store opcode is Stobj.  You must run
23573         both test-34 and test-167 to test this.  Fixes #34529.
23574
23575 2002-11-23  Martin Baulig  <martin@ximian.com>
23576
23577         * ecore.cs (Expression.MemberLookup): Added additional
23578         `qualifier_type' argument which is used when we're being called
23579         from MemberAccess.DoResolve() and null if we're called from a
23580         SimpleName lookup.
23581         (Expression.MemberLookupFailed): New method to report errors; this
23582         does the CS1540 check and reports the correct error message.
23583
23584         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23585         argument for the CS1540 check and redone the way how we're dealing
23586         with private members.  See the comment in the source code for details.
23587         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23588         `closure_start_type' to `closure_qualifier_type' and check whether
23589         it's not null.  It was not this filter being broken, it was just
23590         being called with the wrong arguments.
23591
23592         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
23593         and pass it the correct `qualifier_type'; this also does the error
23594         handling for us.
23595
23596 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
23597
23598         * expression.cs (Invocation.EmitParams): If the we are dealing
23599         with a non-built-in value type, load its address as well.
23600
23601         (ArrayCreation): Use a a pretty constant instead
23602         of the hardcoded value 2.   Use 6 instead of 2 for the number of
23603         static initializers.  
23604
23605         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
23606         because they are not really value types, just glorified integers. 
23607
23608         * driver.cs: Do not append .exe, the CSC compiler does not do it.
23609
23610         * ecore.cs: Remove redundant code for enumerations, make them use
23611         the same code path as everything else, fixes the casting issue
23612         with enumerations in Windows.Forms.
23613
23614         * attribute.cs: Do only cast to string if it is a string, the
23615         validation happens later.
23616
23617         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
23618         people upgrade their corlibs.
23619
23620         * ecore.cs: Oops, enumerations were not following the entire code path
23621
23622 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
23623
23624         * typemanager.cs (FilterWithClosure): Commented out the test for
23625         1540 in typemanager.cs, as it has problems when accessing
23626         protected methods from a parent class (see test-174.cs). 
23627
23628         * attribute.cs (Attribute.ValidateGuid): new method.
23629         (Attribute.Resolve): Use above.
23630
23631 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
23632
23633         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
23634
23635         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
23636         handling for enumerations, as we only needed the TypeContainer
23637         functionality to begin with (this is required for the fix below to
23638         work for enums that reference constants in a container class for
23639         example). 
23640
23641         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
23642
23643         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
23644         a valid TypeBuilder to perform lookups on.o
23645
23646         * class.cs (InheritableMemberSignatureCompare): Use true in the
23647         call to GetGetMethod and GetSetMethod, because we are comparing
23648         the signature, and we need to get the methods *even* if they are
23649         private. 
23650
23651         (PropertyBase.CheckBase): ditto.
23652
23653         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
23654         GotoCase.Resolve): Use Peel on EmpytCasts.
23655
23656         * ecore.cs (EmptyCast): drop child, add Peel method.
23657
23658 2002-11-17  Martin Baulig  <martin@ximian.com>
23659
23660         * ecore.cs (EmptyCast.Child): New public property.
23661
23662         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
23663         label resolved to an EmptyCast.  Fixes #34162.
23664         (GotoCase.Resolve): Likewise.
23665         (Block.EmitMeta): Likewise.
23666
23667 2002-11-17  Martin Baulig  <martin@ximian.com>
23668
23669         * expression.cs (Invocation.BetterConversion): Prefer int over
23670         uint; short over ushort; long over ulong for integer literals.
23671         Use ImplicitConversionExists instead of StandardConversionExists
23672         since we also need to check for user-defined implicit conversions.
23673         Fixes #34165.  Added test-173.cs.
23674
23675 2002-11-16  Martin Baulig  <martin@ximian.com>
23676
23677         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
23678         with the `true' and `false' literals.  Fixes #33151.
23679
23680 2002-11-16  Martin Baulig  <martin@ximian.com>
23681
23682         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
23683         October 22nd; don't do the cs1540 check for static members.
23684
23685         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
23686         now using our own filter here and doing the cs1540 check again.
23687
23688 2002-11-16  Martin Baulig  <martin@ximian.com>
23689
23690         * support.cs (InternalParameters): Don't crash if we don't have
23691         any fixed parameters.  Fixes #33532.
23692
23693 2002-11-16  Martin Baulig  <martin@ximian.com>
23694
23695         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
23696         when looking up static methods to make this work on Windows.
23697         Fixes #33773.
23698
23699 2002-11-16  Martin Baulig  <martin@ximian.com>
23700
23701         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
23702         a setter rather than using PropertyInfo.CanWrite.
23703
23704 2002-11-15  Nick Drochak  <ndrochak@gol.com>
23705
23706         * class.cs: Allow acces to block member by subclasses. Fixes build
23707         breaker.
23708
23709 2002-11-14  Martin Baulig  <martin@ximian.com>
23710
23711         * class.cs (Constructor.Emit): Added the extern/block check.
23712         Fixes bug #33678.
23713
23714 2002-11-14  Martin Baulig  <martin@ximian.com>
23715
23716         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
23717         iteration while looking for indexers, this is needed because the
23718         indexer may have a different name in our base classes.  Fixed the
23719         error reporting (no indexers at all, not get accessor, no
23720         overloaded match).  Fixes bug #33089.
23721         (IndexerAccess.DoResolveLValue): Likewise.
23722
23723 2002-11-14  Martin Baulig  <martin@ximian.com>
23724
23725         * class.cs (PropertyBase.CheckBase): Make this work for multiple
23726         indexers.  Fixes the first part of bug #33089.
23727         (MethodSignature.InheritableMemberSignatureCompare): Added support
23728         for properties.
23729
23730 2002-11-13  Ravi Pratap  <ravi@ximian.com>
23731
23732         * attribute.cs (Attribute.Resolve): Catch the
23733         NullReferenceException and report it since it isn't supposed to
23734         happen. 
23735
23736 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
23737
23738         * expression.cs (Binary.EmitBranchable): Also handle the cases for
23739         LogicalOr and LogicalAnd that can benefit from recursively
23740         handling EmitBranchable.  The code now should be nice for Paolo.
23741
23742 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
23743
23744         * typemanager.cs (LookupType): Added a negative-hit hashtable for
23745         the Type lookups, as we perform quite a number of lookups on
23746         non-Types.  This can be removed once we can deterministically tell
23747         whether we have a type or a namespace in advance.
23748
23749         But this might require special hacks from our corlib.
23750
23751         * TODO: updated.
23752
23753         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
23754         and double which avoids a conversion from an integer to a double.
23755
23756         * expression.cs: tiny optimization, avoid calling IsConstant,
23757         because it effectively performs the lookup twice.
23758
23759 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
23760
23761         But a bogus return here to keep the semantics of the old code
23762         until the Mono runtime is fixed.
23763
23764         * pending.cs (GetMissingInterfaces): New method used to remove all
23765         the interfaces that are already implemented by our parent
23766         classes from the list of pending methods. 
23767
23768         * interface.cs: Add checks for calls after ResolveTypeExpr.
23769
23770 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
23771
23772         * class.cs (Class.Emit): Report warning 67: event not used if the
23773         warning level is beyond 3.
23774
23775         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
23776         being a NullLiteral.
23777
23778         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
23779         specifiers. 
23780
23781         * class.cs (TypeContainer.GetClassBases): Cover a missing code
23782         path that might fail if a type can not be resolved.
23783
23784         * expression.cs (Binary.Emit): Emit unsigned versions of the
23785         operators. 
23786
23787         * driver.cs: use error 5.
23788
23789 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23790
23791         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
23792
23793 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
23794
23795         * cs-parser.jay (switch_section): A beautiful patch from Martin
23796         Baulig that fixed 33094.
23797
23798 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
23799
23800         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
23801         Check whether the base is abstract and report an error if so.
23802
23803         * expression.cs (IndexerAccess.DoResolveLValue,
23804         IndexerAccess.DoResolve): ditto. 
23805
23806         (Invocation.DoResolve): ditto.
23807
23808         (Invocation.FullMethodDesc): Improve the report string.
23809
23810         * statement.cs (Block): Eliminate IsVariableDefined as it is
23811         basically just a wrapper for GetVariableInfo.
23812
23813         * ecore.cs (SimpleName): Use new 
23814
23815         * support.cs (ReflectionParamter.ParameterType): We unwrap the
23816         type, as we return the actual parameter ref/unref state on a
23817         different call.
23818
23819 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
23820
23821         * support.cs: Return proper flags REF/OUT fixing the previous
23822         commit.  
23823
23824         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
23825         not used to mean `ref' but `ref or out' in ParameterReference
23826
23827         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
23828         full type signature instead of calling TypeManger.CSharpName
23829         ourselves. 
23830
23831         * support.cs (InternalParameters.ParameterDesc): Do not compare
23832         directly to the modflags, because REF/OUT will actually be bitsets
23833         if set. 
23834
23835         * delegate.cs (VerifyMethod): Check also the modifiers.
23836
23837         * cs-tokenizer.cs: Fix bug where floating point values with an
23838         exponent where a sign was missing was ignored.
23839
23840         * driver.cs: Allow multiple assemblies to be specified in a single
23841         /r: argument
23842
23843 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
23844
23845         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
23846         because identifiers after a parenthesis would end up in this kind
23847         of production, and we needed to desamiguate it for having casts
23848         like:
23849
23850                 (UserDefinedType *) xxx
23851
23852 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
23853
23854         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
23855         we should set on the Bindingflags.NonPublic, but not turn on
23856         private_ok.  private_ok controls whether a Private member is
23857         returned (this is chekced on the filter routine), while the
23858         BindingFlags.NonPublic just controls whether private/protected
23859         will be allowed.   This fixes the problem part of the problem of
23860         private properties being allowed to be used in derived classes.
23861
23862         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
23863         so we can call the children DoResolveLValue method (this will
23864         properly signal errors on lvalue assignments to base properties)
23865
23866         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
23867         getter are null, and we have a property info, we know that this
23868         happened because the lookup failed, so we report an error 122 for
23869         protection level violation.
23870
23871         We also silently return if setter and getter are null in the
23872         resolve functions, this condition only happens if we have flagged
23873         the error before.  This is the other half of the problem. 
23874
23875         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
23876         not have accessibility information, that is why we were returning
23877         true in the filter function in typemanager.cs.
23878
23879         To properly report 122 (property is inaccessible because of its
23880         protection level) correctly, we report this error in ResolveAccess
23881         by failing if both the setter and the getter are lacking (ie, the
23882         lookup failed). 
23883
23884         DoResolve and DoLResolve have been modified to check for both
23885         setter/getter being null and returning silently, the reason being
23886         that I did not want to put the knowledge about this error in upper
23887         layers, like:
23888
23889         int old = Report.Errors;
23890         x = new PropertyExpr (...);
23891         if (old != Report.Errors)
23892                 return null;
23893         else
23894                 return x;
23895
23896         So the property expr is returned, but it is invalid, so the error
23897         will be flagged during the resolve process. 
23898
23899         * class.cs: Remove InheritablePropertySignatureCompare from the
23900         class, as we no longer depend on the property signature to compute
23901         whether it is possible to implement a method or not.
23902
23903         The reason is that calling PropertyInfo.GetGetMethod will return
23904         null (in .NET, in Mono it works, and we should change this), in
23905         cases where the Get Method does not exist in that particular
23906         class.
23907
23908         So this code:
23909
23910         class X { public virtual int A { get { return 1; } } }
23911         class Y : X { }
23912         class Z : Y { public override int A { get { return 2; } } }
23913
23914         Would fail in Z because the parent (Y) would not have the property
23915         defined.  So we avoid this completely now (because the alternative
23916         fix was ugly and slow), and we now depend exclusively on the
23917         method names.
23918
23919         (PropertyBase.CheckBase): Use a method-base mechanism to find our
23920         reference method, instead of using the property.
23921
23922         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
23923         routines are gone now.
23924
23925         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
23926         names, they were incorrectly named.
23927
23928         * cs-tokenizer.cs: Return are more gentle token on failure. 
23929
23930         * pending.cs (PendingImplementation.InterfaceMethod): This routine
23931         had an out-of-sync index variable, which caused it to remove from
23932         the list of pending methods the wrong method sometimes.
23933
23934 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
23935
23936         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
23937         CanWrite, because those refer to this particular instance of the
23938         property, and do not take into account the fact that we can
23939         override single members of a property.
23940
23941         Constructor requires an EmitContext.  The resolution process does
23942         not happen here, but we need to compute the accessors before,
23943         because the resolution does not always happen for properties.
23944
23945         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
23946         subclass, before we did not update this flag, but we did update
23947         bindingflags. 
23948
23949         (GetAccessors): Drop this routine, as it did not work in the
23950         presence of partially overwritten set/get methods. 
23951
23952         Notice that this broke the cs1540 detection, but that will require
23953         more thinking. 
23954
23955 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23956
23957         * class.cs:
23958         * codegen.cs:
23959         * driver.cs: issue a warning instead of an error if we don't support
23960         debugging for the platform. Also ignore a couple of errors that may
23961         arise when trying to write the symbols. Undo my previous patch.
23962
23963 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23964
23965         * driver.cs: ignore /debug switch except for Unix platforms.
23966
23967 2002-10-23  Nick Drochak  <ndrochak@gol.com>
23968
23969         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
23970
23971 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
23972
23973         * driver.cs: Do not make mcs-debug conditional, so we do not break
23974         builds that use it.
23975
23976         * statement.cs (UsageVector.MergeChildren): I would like Martin to
23977         review this patch.  But basically after all the children variables
23978         have been merged, the value of "Breaks" was not being set to
23979         new_breaks for Switch blocks.  I think that it should be set after
23980         it has executed.  Currently I set this to the value of new_breaks,
23981         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
23982         conservative, but I do not understand this code very well.
23983
23984         I did not break anything in the build, so that is good ;-)
23985
23986         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
23987
23988 2002-10-20  Mark Crichton  <crichton@gimp.org>
23989
23990         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
23991
23992 2002-10-20  Nick Drochak  <ndrochak@gol.com>
23993
23994         * cfold.cs: Fixed compile blocker.
23995
23996 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
23997
23998         * driver.cs: I was chekcing the key, not the file.
23999
24000 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24001
24002         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24003         message that we were generating - we just need to silently return
24004         a null.
24005
24006 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24007
24008         * class.cs (Event.Define): Change my previous commit, as this
24009         breaks the debugger.  This is a temporary hack, as it seems like
24010         the compiler is generating events incorrectly to begin with.
24011
24012         * expression.cs (Binary.ResolveOperator): Added support for 
24013         "U operator - (E x, E y)"
24014
24015         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24016         y)".
24017
24018         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24019         init-only variables, but this path did not take into account that
24020         there might be also instance readonly variables.  Correct this
24021         problem. 
24022
24023         This fixes bug 32253
24024
24025         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24026         delegates as well.
24027
24028         * driver.cs: Change the extension for modules to `netmodule'
24029
24030         * cs-parser.jay: Improved slightly the location tracking for
24031         the debugger symbols.
24032
24033         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24034         modifiers that were specified instead of the hardcoded value
24035         (FamAndAssem).  This was basically ignoring the static modifier,
24036         and others.  Fixes 32429.
24037
24038         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24039         fixed a bug in the process (32476)
24040
24041         * expression.cs (ArrayAccess.EmitAssign): Patch from
24042         hwang_rob@yahoo.ca that fixes bug 31834.3
24043
24044 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24045
24046         * driver.cs: Make the module extension .netmodule.
24047
24048 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24049
24050         * driver.cs: Report an error if the resource file is not found
24051         instead of crashing.
24052
24053         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24054         false, like Emit does.
24055
24056 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24057
24058         * typemanager.cs: Remove unused private member.  Also reported mcs
24059         bug to report this as a warning like csc.
24060
24061 2002-10-15  Martin Baulig  <martin@gnome.org>
24062
24063         * statement.cs (Statement.Emit): Made this a virtual method; emits
24064         the line number info and calls DoEmit().
24065         (Statement.DoEmit): New protected abstract method, formerly knows
24066         as Statement.Emit().
24067
24068         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24069
24070 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24071
24072         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24073         have fixed a remaining problem: not every AddXXXX was adding a
24074         fully qualified name.  
24075
24076         Now everyone registers a fully qualified name in the DeclSpace as
24077         being defined instead of the partial name.  
24078
24079         Downsides: we are slower than we need to be due to the excess
24080         copies and the names being registered this way.  
24081
24082         The reason for this is that we currently depend (on the corlib
24083         bootstrap for instance) that types are fully qualified, because
24084         we dump all the types in the namespace, and we should really have
24085         types inserted into the proper namespace, so we can only store the
24086         basenames in the defined_names array.
24087
24088 2002-10-10  Martin Baulig  <martin@gnome.org>
24089
24090         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24091         from bug #31834, see the bug report for a testcase which is
24092         miscompiled.
24093
24094 2002-10-10  Martin Baulig  <martin@gnome.org>
24095
24096         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24097         flow analysis code for this.
24098
24099         * statement.cs (Do, While, For): Tell the flow analysis code about
24100         infinite loops.
24101         (FlowBranching.UsageVector): Added support for infinite loops.
24102         (Block.Resolve): Moved the dead code elimination here and use flow
24103         analysis to do it.
24104
24105 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24106
24107         * class.cs (Field.Define): Catch cycles on struct type
24108         definitions. 
24109
24110         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24111         fields if the fields are static.  We only need to check instance
24112         fields. 
24113
24114         * expression.cs (As.DoResolve): Test for reference type.
24115
24116         * statement.cs (Using.ResolveExpression): Use
24117         ConvertImplicitRequired, not ConvertImplicit which reports an
24118         error on failture
24119         (Using.ResolveLocalVariableDecls): ditto.
24120
24121         * expression.cs (Binary.ResolveOperator): Report errors in a few
24122         places where we had to.
24123
24124         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24125
24126 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24127
24128         * expression.cs: Use StoreFromPtr instead of extracting the type
24129         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24130
24131         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24132         an enumeration value to a System.Enum, but System.Enum is not a
24133         value type, but an class type, so we need to box.
24134
24135         (Expression.ConvertExplicit): One codepath could return
24136         errors but not flag them.  Fix this.  Fixes #31853
24137
24138         * parameter.cs (Resolve): Do not allow void as a parameter type.
24139
24140 2002-10-06  Martin Baulig  <martin@gnome.org>
24141
24142         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24143         if it's a class type and not a struct.  Fixes #31815.
24144
24145 2002-10-06  Martin Baulig  <martin@gnome.org>
24146
24147         * statement.cs: Reworked the flow analysis code a bit to make it
24148         usable for dead code elimination.
24149
24150 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24151
24152         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24153
24154 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24155
24156         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24157         to fix the test 165, will investigate deeper.
24158
24159 2002-10-04  Martin Baulig  <martin@gnome.org>
24160
24161         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24162         finally blocks actually work.
24163         (Try.Resolve): We don't need to create a sibling for `finally' if
24164         there is no finally block.
24165
24166 2002-10-04  Martin Baulig  <martin@gnome.org>
24167
24168         * class.cs (Constructor.Define): The default accessibility for a
24169         non-default constructor is private, not public.
24170
24171 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24172
24173         * class.cs (Constructor): Make AllowedModifiers public, add
24174         EXTERN.
24175
24176         * cs-parser.jay: Perform the modifiers test here, as the
24177         constructor for the Constructor class usually receives a zero
24178         because of the way we create it (first we create, later we
24179         customize, and we were never checking the modifiers).
24180
24181         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24182         is a version of LookupTypeReflection that includes the type-name
24183         cache.  This can be used as a fast path for functions that know
24184         the fully qualified name and are only calling into *.GetType() to
24185         obtain a composed type.
24186
24187         This is also used by TypeManager.LookupType during its type
24188         composition.
24189
24190         (LookupType): We now also track the real type name, as sometimes
24191         we can get a quey for the real type name from things like
24192         ComposedCast.  This fixes bug 31422.
24193
24194         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24195         complete type fullname, it does not have to go through the type
24196         resolution system to obtain the composed version of the type (for
24197         obtaining arrays or pointers).
24198
24199         (Conditional.Emit): Use the EmitBoolExpression to
24200         generate nicer code, as requested by Paolo.
24201
24202         (ArrayCreation.CheckIndices): Use the patch from
24203         hwang_rob@yahoo.ca to validate the array initializers. 
24204
24205 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24206
24207         * class.cs (ConstructorInitializer.Emit): simplify code by using
24208         Invocation.EmitCall, and at the same time, fix the bugs in calling
24209         parent constructors that took variable arguments. 
24210
24211         * ecore.cs (Expression.ConvertNumericExplicit,
24212         Expression.ImplicitNumericConversion): Remove the code that
24213         manually wrapped decimal (InternalTypeConstructor call is now gone
24214         as well).
24215
24216         * expression.cs (Cast.TryReduce): Also handle decimal types when
24217         trying to perform a constant fold on the type.
24218
24219         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24220
24221         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24222         that only turned off an error report, and did nothing else. 
24223
24224 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24225
24226         * driver.cs: Handle and ignore /fullpaths
24227
24228 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24229
24230         * expression.cs (Binary.ResolveOperator): Catch the case where
24231         DoNumericPromotions returns true, 
24232
24233         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24234
24235 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24236
24237         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24238         report error 70.
24239
24240 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24241
24242         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24243         conversion exists, but it is also required that the conversion be
24244         performed.  This manifested in "(Type64Enum) 2".  
24245
24246         * class.cs (TypeManager.AddMethod): The fix is not to change
24247         AddEnum, because that one was using a fully qualified name (every
24248         DeclSpace derivative does), but to change the AddMethod routine
24249         that was using an un-namespaced name.  This now correctly reports
24250         the duplicated name.
24251
24252         Revert patch until I can properly fix it.  The issue
24253         is that we have a shared Type space across all namespaces
24254         currently, which is wrong.
24255
24256         Options include making the Namespace a DeclSpace, and merge
24257         current_namespace/current_container in the parser.
24258
24259 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24260
24261         * cs-parser.jay: Improve error reporting when we get a different
24262         kind of expression in local_variable_type and
24263         local_variable_pointer_type. 
24264
24265         Propagate this to avoid missleading errors being reported.
24266
24267         * ecore.cs (ImplicitReferenceConversion): treat
24268         TypeManager.value_type as a target just like object_type.   As
24269         code like this:
24270
24271         ValueType v = 1;
24272
24273         Is valid, and needs to result in the int 1 being boxed before it
24274         is assigned to the value type v.
24275
24276         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24277         to validate the enumeration name.
24278
24279         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24280         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24281         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24282
24283         * ecore.cs (TryImplicitIntConversion): When doing an
24284         implicit-enumeration-conversion, check if the type is 64-bits and
24285         perform a conversion before passing to EnumConstant.
24286
24287 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24288
24289         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24290         report ambiguous type references.  Unlike the MS version, we
24291         report what the ambiguity is.   Innovation at work ;-)
24292
24293         (DeclSpace.FindType): Require a location argument to
24294         display when we display an ambiguous error.
24295
24296         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24297
24298         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24299
24300         * expression.cs (EmitDynamicInitializers): Apply patch from
24301         hwang_rob@yahoo.ca that fixes the order in which we emit our
24302         initializers. 
24303
24304 2002-09-21  Martin Baulig  <martin@gnome.org>
24305
24306         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24307         delegate takes no arguments.
24308
24309 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24310
24311         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24312         from integers.
24313
24314         * expression.cs: Extract the underlying type.
24315
24316         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24317
24318         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24319
24320 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24321
24322         * class.cs (TypeContainer.DefineType): We can not use the nice
24323         PackingSize with the size set to 1 DefineType method, because it
24324         will not allow us to define the interfaces that the struct
24325         implements.
24326
24327         This completes the fixing of bug 27287
24328
24329         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24330         means also structs.  This fixes part of the problem. 
24331         (Expresion.ImplicitReferenceConversionExists): ditto.
24332
24333         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24334         error if there were no errors reported during the type lookup
24335         process, to avoid duplicates or redundant errors.  Without this
24336         you would get an ambiguous errors plus a type not found.  We have
24337         beaten the user enough with the first error.  
24338
24339         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24340         reference. 
24341
24342         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24343         during the resolution process, stop the lookup, this avoids
24344         repeated error reports (same error twice).
24345
24346         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24347
24348         * typemanager.cs (LookupType): Redo the type lookup code to match
24349         the needs of System.Reflection.  
24350
24351         The issue is that System.Reflection requires references to nested
24352         types to begin with a "+" sign instead of a dot.  So toplevel
24353         types look like: "NameSpace.TopLevelClass", and nested ones look
24354         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24355         levels. 
24356
24357 2002-09-19  Martin Baulig  <martin@gnome.org>
24358
24359         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24360         says that a method always returns or always throws an exception,
24361         don't report the CS0161.
24362
24363         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24364         set `Returns = new_returns'.
24365
24366 2002-09-19  Martin Baulig  <martin@gnome.org>
24367
24368         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24369         to an enum constant, check for a CS0176.
24370
24371 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24372
24373         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24374         for operators that must be in pairs and report errors.
24375
24376         * ecore.cs (SimpleName.DoResolveType): During the initial type
24377         resolution process, when we define types recursively, we must
24378         check first for types in our current scope before we perform
24379         lookups in the enclosing scopes.
24380
24381         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24382
24383         (Invocation.VerifyArgumentsCompat): Call
24384         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24385         I thought we were supposed to always call this, but there are a
24386         few places in the code where we dont do it.
24387
24388 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24389
24390         * driver.cs: Add support in -linkres and -resource to specify the
24391         name of the identifier.
24392
24393 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24394
24395         * ecore.cs (StandardConversionExists): Sync with the conversion
24396         code: allow anything-* to void* conversions.
24397
24398         (FindMostSpecificSource): Use an Expression argument
24399         instead of a Type, because we might be handed over a Literal which
24400         gets a few more implicit conversions that plain types do not.  So
24401         this information was being lost.
24402
24403         Also, we drop the temporary type-holder expression when not
24404         required.
24405
24406 2002-09-17  Martin Baulig  <martin@gnome.org>
24407
24408         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24409         this is an explicit interface implementation.
24410
24411 2002-09-17  Martin Baulig  <martin@gnome.org>
24412
24413         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24414         different `IndexerName' attributes.
24415
24416         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24417         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24418         virtual CommonResolve().
24419
24420 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24421
24422         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24423         and convert that to the UnderlyingType.
24424
24425         * statement.cs (Foreach.Resolve): Indexers are just like variables
24426         or PropertyAccesses.
24427
24428         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24429         inside quoted strings, we were not doing this before.
24430
24431 2002-09-16  Martin Baulig  <martin@gnome.org>
24432
24433         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24434         resolve it.  This is needed for the definite assignment check of the
24435         instance expression, fixes bug #29846.
24436         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24437
24438 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24439
24440         * parameter.cs: Fix compile error.  Cannot reference static member
24441         from an instance object.  Is this an mcs bug?
24442
24443 2002-09-14  Martin Baulig  <martin@gnome.org>
24444
24445         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24446         multiple times.  Fixes bug #30295, added test-166.cs.
24447
24448 2002-09-14  Martin Baulig  <martin@gnome.org>
24449
24450         * statement.cs (Block.Emit): Don't emit unreachable code.
24451         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24452         `break' statements.
24453         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24454
24455 2002-09-14  Martin Baulig  <martin@gnome.org>
24456
24457         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24458         is set.
24459
24460 2002-09-14  Martin Baulig  <martin@gnome.org>
24461
24462         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24463         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24464         be false on the ms runtime.
24465
24466 2002-09-13  Martin Baulig  <martin@gnome.org>
24467
24468         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24469         the CS0038 error message.
24470
24471 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24472
24473         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24474         constant inside, return it.
24475
24476 2002-09-12  Martin Baulig  <martin@gnome.org>
24477
24478         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24479         implicit conversion can be done between enum types.
24480
24481         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24482         check whether an implicit conversion to the current enum's UnderlyingType
24483         exists and report an error if not.
24484
24485         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24486         without debugging support.
24487
24488         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24489         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24490
24491 2002-09-12  Martin Baulig  <martin@gnome.org>
24492
24493         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24494
24495         * ecore.cs (IMemberExpr.DeclaringType): New property.
24496         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24497         nonstatic member of an outer type (CS0038).
24498
24499 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24500
24501         * driver.cs: Activate the using-error detector at warning level
24502         4 (at least for MS-compatible APIs).
24503
24504         * namespace.cs (VerifyUsing): Small buglett fix.
24505
24506         * pending.cs (PendingImplementation): pass the container pointer. 
24507
24508         * interface.cs (GetMethods): Allow for recursive definition.  Long
24509         term, I would like to move every type to support recursive
24510         definitions, not the current ordering mechanism that we have right
24511         now.
24512
24513         The situation is this: Attributes are handled before interfaces,
24514         so we can apply attributes to interfaces.  But some attributes
24515         implement interfaces, we will now handle the simple cases
24516         (recursive definitions will just get an error).  
24517
24518         * parameter.cs: Only invalidate types at the end if we fail to
24519         lookup all types.  
24520
24521 2002-09-09  Martin Baulig  <martin@gnome.org>
24522
24523         * ecore.cs (PropertyExpr.Emit): Also check for
24524         TypeManager.system_int_array_get_length so this'll also work when
24525         compiling corlib.  Fixes #30003.
24526
24527 2002-09-09  Martin Baulig  <martin@gnome.org>
24528
24529         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24530         and throw an exception if we can't get the type's size.  Fixed #30040,
24531         added test-165.cs.
24532
24533 2002-09-09  Martin Baulig  <martin@gnome.org>
24534
24535         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24536
24537         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24538         context.  Fixes bug #30027.
24539
24540         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24541         virtual functions.  Fixes bug #30043, added test-164.cs.
24542
24543 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24544
24545         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24546
24547 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24548
24549         * driver.cs: Use an object to get the windows codepage since it's not a
24550         static property.
24551
24552 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24553
24554         * statement.cs (For.Emit): for infinite loops (test == null)
24555         return whether there is a break inside, not always "true".
24556
24557         * namespace.cs (UsingEntry): New struct to hold the name of the
24558         using definition, the location where it is defined, and whether it
24559         has been used in a successful type lookup.
24560
24561         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24562         strings.
24563
24564         * decl.cs: ditto.
24565
24566 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24567
24568         * attribute.cs : Fix incorrect code which relied on catching
24569         a NullReferenceException to detect a null being passed in
24570         where an object was expected.
24571
24572 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24573
24574         * statement.cs (Try): flag the catch variable as assigned
24575
24576         * expression.cs (Cast): Simplified by using ResolveType instead of
24577         manually resolving.
24578
24579         * statement.cs (Catch): Fix bug by using ResolveType.
24580
24581 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24582
24583         * expression.cs (BetterConversion): Special case for when we have
24584         a NullLiteral as the argument and we have to choose between string
24585         and object types - we choose string the way csc does.
24586
24587         * attribute.cs (Attribute.Resolve): Catch the
24588         NullReferenceException and report error #182 since the Mono
24589         runtime no more has the bug and having this exception raised means
24590         we tried to select a constructor which takes an object and is
24591         passed a null.
24592
24593 2002-09-05  Ravi Pratap  <ravi@ximian.com>
24594
24595         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
24596         message (1502, 1503) when we can't locate a method after overload
24597         resolution. This is much more informative and closes the bug
24598         Miguel reported.
24599
24600         * interface.cs (PopulateMethod): Return if there are no argument
24601         types. Fixes a NullReferenceException bug.
24602
24603         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
24604         expressions too. Previously we were checking only in one place for
24605         positional arguments leaving out named arguments.
24606
24607         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
24608         type to the enum type is not allowed. Remove code corresponding to
24609         that.
24610
24611         (ConvertNumericExplicit): Allow explicit conversions from
24612         the underlying type to enum type. This precisely follows the spec
24613         and closes a bug filed by Gonzalo.
24614
24615 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24616
24617         * compiler.csproj:
24618         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
24619
24620 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
24621
24622         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
24623         it was important that we stored the right value after the
24624         reduction in `converted'.
24625
24626 2002-09-04  Martin Baulig  <martin@gnome.org>
24627
24628         * location.cs (Location.SymbolDocument): Use full pathnames for the
24629         source files.
24630
24631 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
24632
24633         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
24634         of the expression resolve mechanism, because that will catch the
24635         SimpleName error failures.
24636
24637         (Conditional): If we can not resolve the
24638         expression, return, do not crash.
24639
24640 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24641
24642         * cs-tokenizer.cs:
24643         (location): display token name instead of its number.
24644
24645 2002-08-28  Martin Baulig  <martin@gnome.org>
24646
24647         * expression.cs (Binary.ResolveOperator): Don't silently return
24648         but return an error if an operator cannot be applied between two
24649         enum types.
24650
24651 2002-08-28  Martin Baulig  <martin@gnome.org>
24652
24653         * class.cs (Constructor.Define): Set the permission attributes
24654         correctly instead of making all constructors public.
24655
24656 2002-08-28  Martin Baulig  <martin@gnome.org>
24657
24658         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
24659         for private members before reporting a CS0103; if we find anything,
24660         it's a CS0122.
24661
24662 2002-08-28  Martin Baulig  <martin@gnome.org>
24663
24664         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
24665         to check whether `closure_start_type == closure_invocation_type',
24666         we also need to check whether `m.DeclaringType == closure_invocation_type'
24667         before bypassing the permission checks.  We might be accessing
24668         protected/private members from the base class.
24669         (TypeManager.RealMemberLookup): Only set private_ok if private
24670         members were requested via BindingFlags.NonPublic.
24671
24672         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
24673
24674         * expression.cs (MemberAccess.ResolveMemberAccess): Set
24675         MethodGroupExpr.IsExplicitImpl if appropriate.
24676         (Invocation.DoResolve): Don't report the CS0120 for explicit
24677         interface implementations.
24678
24679 2002-08-27  Martin Baulig  <martin@gnome.org>
24680
24681         * expression.cs (Invocation.DoResolve): If this is a static
24682         method and we don't have an InstanceExpression, we must report
24683         a CS0120.
24684
24685 2002-08-25  Martin Baulig  <martin@gnome.org>
24686
24687         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
24688         `==' between a valuetype and an object.
24689
24690 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
24691
24692         * ecore.cs (TypeExpr): Provide a ToString method.
24693
24694 2002-08-24  Martin Baulig  <martin@gnome.org>
24695
24696         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
24697         now called proggie.dbg and it's a binary file.
24698
24699 2002-08-23  Martin Baulig  <martin@gnome.org>
24700
24701         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
24702
24703 2002-08-23  Martin Baulig  <martin@gnome.org>
24704
24705         * struct.cs (MyStructInfo.ctor): Make this work with empty
24706         structs; it's not allowed to use foreach() on null.
24707
24708 2002-08-23  Martin Baulig  <martin@gnome.org>
24709
24710         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
24711         writer the full pathname of the generated assembly.
24712
24713 2002-08-23  Martin Baulig  <martin@gnome.org>
24714
24715         * statements.cs (FlowBranching.UsageVector.MergeChildren):
24716         A `finally' block never returns or breaks; improved handling of
24717         unreachable code.
24718
24719 2002-08-23  Martin Baulig  <martin@gnome.org>
24720
24721         * statement.cs (Throw.Resolve): Allow `throw null'.
24722
24723 2002-08-23  Martin Baulig  <martin@gnome.org>
24724
24725         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
24726         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
24727         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
24728         MemberLookup would return a wrong event if this is an explicit
24729         interface implementation and the class has an event with the same
24730         name.
24731
24732 2002-08-23  Martin Baulig  <martin@gnome.org>
24733
24734         * statement.cs (Block.AddChildVariableNames): New public method.
24735         (Block.AddChildVariableName): Likewise.
24736         (Block.IsVariableNameUsedInChildBlock): Likewise.
24737         (Block.AddVariable): Check whether a variable name has already
24738         been used in a child block.
24739
24740         * cs-parser.jay (declare_local_variables): Mark all variable names
24741         from the current block as being used in a child block in the
24742         implicit block.
24743
24744 2002-08-23  Martin Baulig  <martin@gnome.org>
24745
24746         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
24747         find the symbol writer.
24748
24749         * driver.cs: csc also allows the arguments to /define being
24750         separated by commas, not only by semicolons.
24751
24752 2002-08-23  Martin Baulig  <martin@gnome.org>
24753
24754         * interface.cs (Interface.GetMembers): Added static check for events.
24755
24756 2002-08-15  Martin Baulig  <martin@gnome.org>
24757
24758         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
24759         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
24760
24761         * ecore.cs (Expression.MemberLookup): Added documentation and explained
24762         why the MethodData.EmitDestructor() change was necessary.
24763
24764 2002-08-20  Martin Baulig  <martin@gnome.org>
24765
24766         * class.cs (TypeContainer.FindMembers): Added static check for events.
24767
24768         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
24769
24770         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
24771         use Type.GetEvents(), not Type.FindMembers().
24772
24773 2002-08-20  Martin Baulig  <martin@gnome.org>
24774
24775         * decl.cs (MemberCache): Added a special method cache which will
24776         be used for method-only searched.  This ensures that a method
24777         search will return a MethodInfo with the correct ReflectedType for
24778         inherited methods.      
24779
24780 2002-08-20  Martin Baulig  <martin@gnome.org>
24781
24782         * decl.cs (DeclSpace.FindMembers): Made this public.
24783
24784 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24785
24786         * delegate.cs: fixed build on windows.
24787         [FIXME:  Filed as bug #29150: MCS must report these errors.]
24788
24789 2002-08-19  Ravi Pratap  <ravi@ximian.com>
24790
24791         * ecore.cs (StandardConversionExists): Return a false
24792         if we are trying to convert the void type to anything else
24793         since that is not allowed.
24794
24795         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
24796         we flag error 70 in the event an event is trying to be accessed
24797         directly from outside the declaring type.
24798
24799 2002-08-20  Martin Baulig  <martin@gnome.org>
24800
24801         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
24802         MemberCache from typemanager.cs to decl.cs.
24803
24804 2002-08-19  Martin Baulig  <martin@gnome.org>
24805
24806         * class.cs (TypeContainer): Implement IMemberContainer.
24807         (TypeContainer.DefineMembers): Create the MemberCache.
24808         (TypeContainer.FindMembers): Do better BindingFlags checking; only
24809         return public members if BindingFlags.Public was given, check
24810         whether members are static.
24811
24812 2002-08-16  Martin Baulig  <martin@gnome.org>
24813
24814         * decl.cs (DeclSpace.Define): Splitted this in Define and
24815         DefineMembers.  DefineMembers is called first and initializes the
24816         MemberCache.
24817
24818         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
24819         DefineMembers() on all our DeclSpaces.
24820
24821         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
24822         but call DefineMembers() on all nested interfaces.  We call their
24823         Define() in our new Define() function.
24824
24825         * interface.cs (Interface): Implement IMemberContainer.
24826         (Interface.Define): Moved all code except the attribute stuf to
24827         DefineMembers().
24828         (Interface.DefineMembers): Initialize the member cache.
24829
24830         * typemanager.cs (IMemberFinder): Removed this interface, we don't
24831         need this anymore since we can use MemberCache.FindMembers directly.
24832
24833 2002-08-19  Martin Baulig  <martin@gnome.org>
24834
24835         * typemanager.cs (MemberCache): When creating the cache for an
24836         interface type, add all inherited members.
24837         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
24838         to `out bool used_cache' and documented it.
24839         (TypeManager.MemberLookup): If we already used the cache in the first
24840         iteration, we don't need to do the interfaces check.
24841
24842 2002-08-19  Martin Baulig  <martin@gnome.org>
24843
24844         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
24845         here from IMemberFinder and don't implement this interface anymore.
24846         (DeclSpace.MemberCache): Moved here from IMemberFinder.
24847
24848         * typemanager.cs (IMemberFinder): This interface is now only used by
24849         classes which actually support the member cache.
24850         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
24851         since we only put DeclSpaces into this Hashtable.
24852         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
24853         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
24854
24855 2002-08-16  Martin Baulig  <martin@gnome.org>
24856
24857         * typemanager.cs (ICachingMemberFinder): Removed.
24858         (IMemberFinder.MemberCache): New property.
24859         (TypeManager.FindMembers): Merged this with RealFindMembers().
24860         This function will never be called from TypeManager.MemberLookup()
24861         so we can't use the cache here, just the IMemberFinder.
24862         (TypeManager.MemberLookup_FindMembers): Check whether the
24863         IMemberFinder has a MemberCache and call the cache's FindMembers
24864         function.
24865         (MemberCache): Rewrote larger parts of this yet another time and
24866         cleaned it up a bit.
24867
24868 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
24869
24870         * driver.cs (LoadArgs): Support quoting.
24871
24872         (Usage): Show the CSC-like command line arguments.
24873
24874         Improved a few error messages.
24875
24876 2002-08-15  Martin Baulig  <martin@gnome.org>
24877
24878         * typemanager.cs (IMemberContainer.Type): New property.
24879         (IMemberContainer.IsInterface): New property.
24880
24881         The following changes are conditional to BROKEN_RUNTIME, which is
24882         defined at the top of the file.
24883
24884         * typemanager.cs (MemberCache.MemberCache): Don't add the base
24885         class'es members, but add all members from TypeHandle.ObjectType
24886         if we're an interface.
24887         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
24888         is the current type.
24889         (MemberCache.CacheEntry.Container): Removed this field.
24890         (TypeHandle.GetMembers): Include inherited members.
24891
24892 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24893
24894         * typemanager.cs: fixed compilation and added a comment on a field that
24895         is never used.
24896
24897 2002-08-15  Martin Baulig  <martin@gnome.org>
24898
24899         * class.cs (ConstructorInitializer.Resolve): In the
24900         Expression.MemberLookup call, use the queried_type as
24901         invocation_type.
24902
24903         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
24904         declared' attribute, it's always true.
24905         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
24906         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
24907         temporary wrapper for FindMembers which tells MemberLookup whether
24908         members from the base classes are included in the return value.
24909         This will go away soon.
24910         (TypeManager.MemberLookup): Use this temporary hack here; once the
24911         new MemberCache is completed, we don't need to do the DeclaredOnly
24912         looping here anymore since the MemberCache will take care of this.
24913         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
24914         (MemberCache): When creating the MemberCache for a class, get
24915         members from the current class and all its base classes.
24916         (MemberCache.CacheEntry.Container): New field.  This is a
24917         temporary hack until the Mono runtime is fixed to distinguish
24918         between ReflectedType and DeclaringType.  It allows us to use MCS
24919         with both the MS runtime and the unfixed Mono runtime without
24920         problems and without accecting performance.
24921         (MemberCache.SearchMembers): The DeclaredOnly looping from
24922         TypeManager.MemberLookup is now done here.      
24923
24924 2002-08-14  Martin Baulig  <martin@gnome.org>
24925
24926         * statement.cs (MyStructInfo.MyStructInfo): Don't call
24927         Type.GetFields on dynamic types but get the fields from the
24928         corresponding TypeContainer.
24929         (MyStructInfo.GetStructInfo): Added check for enum types.
24930
24931         * typemanager.cs (MemberList.IsSynchronized): Implemented.
24932         (MemberList.SyncRoot): Implemented.
24933         (TypeManager.FilterWithClosure): No need to check permissions if
24934         closure_start_type == closure_invocation_type, don't crash if
24935         closure_invocation_type is null.
24936
24937 2002-08-13  Martin Baulig  <martin@gnome.org>
24938
24939         Rewrote TypeContainer.FindMembers to use a member cache.  This
24940         gives us a speed increase of about 35% for the self-hosting MCS
24941         build and of about 15-20% for the class libs (both on GNU/Linux).
24942
24943         * report.cs (Timer): New class to get enhanced profiling.  This
24944         whole class is "TIMER" conditional since it remarkably slows down
24945         compilation speed.
24946
24947         * class.cs (MemberList): New class.  This is an IList wrapper
24948         which we're now using instead of passing MemberInfo[]'s around to
24949         avoid copying this array unnecessarily.
24950         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
24951         (ICachingMemberFinder, IMemberContainer): New interface.
24952         (TypeManager.FilterWithClosure): If `criteria' is null, the name
24953         has already been checked, otherwise use it for the name comparision.
24954         (TypeManager.FindMembers): Renamed to RealMemberFinder and
24955         provided wrapper which tries to use ICachingMemberFinder.FindMembers
24956         if possible.  Returns a MemberList, not a MemberInfo [].
24957         (TypeHandle): New class, implements IMemberContainer.  We create
24958         one instance of this class per type, it contains a MemberCache
24959         which is used to do the member lookups.
24960         (MemberCache): New class.  Each instance of this class contains
24961         all members of a type and a name-based hash table.
24962         (MemberCache.FindMembers): This is our new member lookup
24963         function.  First, it looks up all members of the requested name in
24964         the hash table.  Then, it walks this list and sorts out all
24965         applicable members and returns them.
24966
24967 2002-08-13  Martin Baulig  <martin@gnome.org>
24968
24969         In addition to a nice code cleanup, this gives us a performance
24970         increase of about 1.4% on GNU/Linux - not much, but it's already
24971         half a second for the self-hosting MCS compilation.
24972
24973         * typemanager.cs (IMemberFinder): New interface.  It is used by
24974         TypeManager.FindMembers to call FindMembers on a TypeContainer,
24975         Enum, Delegate or Interface.
24976         (TypeManager.finder_to_member_finder): New PtrHashtable.
24977         (TypeManager.finder_to_container): Removed.
24978         (TypeManager.finder_to_delegate): Removed.
24979         (TypeManager.finder_to_interface): Removed.
24980         (TypeManager.finder_to_enum): Removed.
24981
24982         * interface.cs (Interface): Implement IMemberFinder.
24983
24984         * delegate.cs (Delegate): Implement IMemberFinder.
24985
24986         * enum.cs (Enum): Implement IMemberFinder.
24987
24988         * class.cs (TypeContainer): Implement IMemberFinder.
24989
24990 2002-08-12  Martin Baulig  <martin@gnome.org>
24991
24992         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
24993
24994 2002-08-12  Martin Baulig  <martin@gnome.org>
24995
24996         * ecore.cs (ITypeExpression): New interface for expressions which
24997         resolve to a type.
24998         (TypeExpression): Renamed to TypeLookupExpression.
24999         (Expression.DoResolve): If we're doing a types-only lookup, the
25000         expression must implement the ITypeExpression interface and we
25001         call DoResolveType() on it.
25002         (SimpleName): Implement the new ITypeExpression interface.
25003         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25004         hack, the situation that we're only looking up types can't happen
25005         anymore when this method is called.  Moved the type lookup code to
25006         DoResolveType() and call it.
25007         (SimpleName.DoResolveType): This ITypeExpression interface method
25008         is now doing the types-only lookup.
25009         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25010         (ResolveFlags): Added MaskExprClass.
25011
25012         * expression.cs (MemberAccess): Implement the ITypeExpression
25013         interface.
25014         (MemberAccess.DoResolve): Added support for a types-only lookup
25015         when we're called via ITypeExpression.DoResolveType().
25016         (ComposedCast): Implement the ITypeExpression interface.
25017
25018         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25019         Expression.Resolve() with ResolveFlags.Type instead.
25020
25021 2002-08-12  Martin Baulig  <martin@gnome.org>
25022
25023         * interface.cs (Interface.Define): Apply attributes.
25024
25025         * attribute.cs (Attribute.ApplyAttributes): Added support for
25026         interface attributes.
25027
25028 2002-08-11  Martin Baulig  <martin@gnome.org>
25029
25030         * statement.cs (Block.Emit): Only check the "this" variable if we
25031         do not always throw an exception.
25032
25033         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25034         whether the property has a set accessor.
25035
25036 2002-08-11  Martin Baulig  <martin@gnome.org>
25037
25038         Added control flow analysis support for structs.
25039
25040         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25041         with control flow analysis turned off.
25042         (IVariable): New interface.
25043         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25044         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25045         (FieldExpr.DoResolve): Resolve the instance expression with flow
25046         analysis turned off and do the definite assignment check after the
25047         resolving when we know what the expression will resolve to.
25048
25049         * expression.cs (LocalVariableReference, ParameterReference):
25050         Implement the new IVariable interface, only call the flow analysis
25051         code if ec.DoFlowAnalysis is true.
25052         (This): Added constructor which takes a Block argument.  Implement
25053         the new IVariable interface.
25054         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25055         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25056         This does the definite assignment checks for struct members.
25057
25058         * class.cs (Constructor.Emit): If this is a non-static `struct'
25059         constructor which doesn't have any initializer, call
25060         Block.AddThisVariable() to tell the flow analysis code that all
25061         struct elements must be initialized before control returns from
25062         the constructor.
25063
25064         * statement.cs (MyStructInfo): New public class.
25065         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25066         argument to this indexer.  If non-zero, check an individual struct
25067         member, not the whole struct.
25068         (FlowBranching.CheckOutParameters): Check struct members.
25069         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25070         overloaded versions of these methods which take an additional
25071         `int field_idx' argument to check struct members.
25072         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25073         overloaded versions of these methods which take an additional
25074         `string field_name' argument to check struct member.s
25075         (VariableInfo): Implement the IVariable interface.
25076         (VariableInfo.StructInfo): New public property.  Returns the
25077         MyStructInfo instance of the variable if it's a struct or null.
25078         (Block.AddThisVariable): New public method.  This is called from
25079         Constructor.Emit() for non-static `struct' constructor which do
25080         not have any initializer.  It creates a special variable for the
25081         "this" instance variable which will be checked by the flow
25082         analysis code to ensure that all of the struct's fields are
25083         initialized before control returns from the constructor.
25084         (UsageVector): Added support for struct members.  If a
25085         variable/parameter is a struct with N members, we reserve a slot
25086         in the usage vector for each member.  A struct is considered fully
25087         initialized if either the struct itself (slot 0) or all its
25088         members are initialized.
25089
25090 2002-08-08  Martin Baulig  <martin@gnome.org>
25091
25092         * driver.cs (Driver.MainDriver): Only report an error CS5001
25093         if there were no compilation errors.
25094
25095         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25096         `UnsafeContext' property to determine whether the parent is in
25097         unsafe context rather than checking the parent's ModFlags:
25098         classes nested in an unsafe class are unsafe as well.
25099
25100 2002-08-08  Martin Baulig  <martin@gnome.org>
25101
25102         * statement.cs (UsageVector.MergeChildren): Distinguish between
25103         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25104         we return.  Added test17() and test18() to test-154.cs.
25105
25106 2002-08-08  Martin Baulig  <martin@gnome.org>
25107
25108         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25109         Family access, make sure the invoking type isn't a subclass of the
25110         queried type (that'd be a CS1540).
25111
25112         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25113         this method which takes an additional `Type invocation_type'.
25114
25115         * expression.cs (BaseAccess.DoResolve): Use the base type as
25116         invocation and query type.
25117         (MemberAccess.DoResolve): If the lookup failed and we're about to
25118         report a CS0122, try a lookup with the ec.ContainerType - if this
25119         succeeds, we must report a CS1540.
25120
25121 2002-08-08  Martin Baulig  <martin@gnome.org>
25122
25123         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25124         (MethodGroupExpr): Implement the IMemberExpr interface.
25125
25126         * expression (MemberAccess.ResolveMemberAccess): No need to have
25127         any special code for MethodGroupExprs anymore, they're now
25128         IMemberExprs.   
25129
25130 2002-08-08  Martin Baulig  <martin@gnome.org>
25131
25132         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25133         Family, FamANDAssem and FamORAssem permissions.
25134         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25135
25136 2002-08-08  Martin Baulig  <martin@gnome.org>
25137
25138         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25139         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25140         or loop block.
25141
25142 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25143
25144         * driver.cs: implemented /resource option to embed managed resources.
25145
25146 2002-08-07  Martin Baulig  <martin@gnome.org>
25147
25148         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25149         (FieldBase.HasFieldInitializer): New public property.
25150         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25151         returns the field initializer and makes sure it is only resolved once.
25152         (TypeContainer.EmitFieldInitializers): Call
25153         FieldBase.GetInitializerExpression to get the initializer, this ensures
25154         that it isn't resolved multiple times.
25155
25156         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25157         the resolving process (SimpleName/MemberLookup) that we're currently
25158         emitting a field initializer (which must not access any instance members,
25159         this is an error CS0236).
25160
25161         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25162         argument, if the `IsFieldInitializer' flag is set, we must report and
25163         error CS0236 and not an error CS0120.   
25164
25165 2002-08-07  Martin Baulig  <martin@gnome.org>
25166
25167         * ecore.cs (IMemberExpr): New public interface.
25168         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25169         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25170         if the expression is an IMemberExpr.
25171
25172         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25173         to be null, implicitly default to `this' if we're non-static in
25174         this case.  Simplified the code a lot by using the new IMemberExpr
25175         interface.  Also fixed bug #28176 here.
25176
25177 2002-08-06  Martin Baulig  <martin@gnome.org>
25178
25179         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25180         ParameterReferences during semantic analysis so that we can do a
25181         type-only search when resolving Cast, TypeOf and SizeOf.
25182         (block): Pass the `current_local_parameters' to the Block's
25183         constructor.
25184
25185         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25186         argument to the constructor.
25187         (ConstructorInitializer.Resolve): Create a temporary implicit
25188         block with the parameters.
25189
25190         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25191         references here if we aren't doing a type-only search.
25192
25193         * statement.cs (Block): Added constructor which takes a
25194         `Parameters parameters' argument.
25195         (Block.Parameters): New public property.
25196
25197         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25198         to `Parameters' and made it public readonly.
25199
25200 2002-08-06  Martin Baulig  <martin@gnome.org>
25201
25202         * ecore.cs (Expression.Warning): Made this public as well.
25203
25204         * report.cs (Report.Debug): Print the contents of collections.
25205
25206 2002-08-06  Martin Baulig  <martin@gnome.org>
25207
25208         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25209         used to tell Resolve() which kinds of expressions it may return.
25210         (Expression.Resolve): Added overloaded version of this method which
25211         takes a `ResolveFlags flags' argument.  This can be used to tell
25212         Resolve() which kinds of expressions it may return.  Reports a
25213         CS0118 on error.
25214         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25215         ResolveFlags.SimpleName.
25216         (Expression.Error118): Added overloaded version of this method which
25217         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25218         which kinds of expressions are allowed.
25219
25220         * expression.cs (Argument.ResolveMethodGroup): New public method.
25221         Resolves an argument, but allows a MethodGroup to be returned.
25222         This is used when invoking a delegate.
25223
25224         * TODO: Updated a bit.
25225
25226 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25227
25228         Fixed compilation with csc.
25229
25230         * ecore.cs: Expression.Error made public. Is this correct? Should
25231         Warning be made public too?
25232
25233         * expression.cs: use ea.Location instead of ea.loc.
25234         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25235
25236 2002-08-06  Martin Baulig  <martin@gnome.org>
25237
25238         * ecore.cs (Expression.loc): Moved the location here instead of
25239         duplicating it in all derived classes.
25240         (Expression.Location): New public property.
25241         (Expression.Error, Expression.Warning): Made them non-static and
25242         removed the location argument.
25243         (Expression.Warning): Added overloaded version which takes an
25244         `int level' argument.
25245         (Expression.Error118): Make this non-static and removed the
25246         expression and location arguments.
25247         (TypeExpr): Added location argument to the constructor.
25248
25249         * expression.cs (StaticCallExpr): Added location argument to
25250         the constructor.
25251         (Indirection, PointerArithmetic): Likewise.
25252         (CheckedExpr, UnCheckedExpr): Likewise.
25253         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25254         (StringPtr): Likewise.
25255
25256
25257 2002-08-05  Martin Baulig  <martin@gnome.org>
25258
25259         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25260
25261         * assign.cs (Assign.DoResolve): Check whether the source
25262         expression is a value or variable.
25263
25264         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25265         while resolving the corresponding blocks.
25266
25267         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25268         an error, don't silently return null.
25269
25270         * statement.cs (Block.AddVariable): Do the error reporting here
25271         and distinguish between CS0128 and CS0136.
25272         (Block.DoResolve): Report all unused labels (warning CS0164).
25273         (LabeledStatement): Pass the location to the constructor.
25274         (LabeledStatement.HasBeenReferenced): New property.
25275         (LabeledStatement.Resolve): Set it to true here.
25276
25277         * statement.cs (Return.Emit): Return success even after reporting
25278         a type mismatch error (CS0126 or CS0127), this is what csc does and
25279         it avoids confusing the users with any consecutive errors.
25280
25281 2002-08-05  Martin Baulig  <martin@gnome.org>
25282
25283         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25284
25285         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25286
25287         * expression.cs (MemberAccess.DoResolve): Silently return if an
25288         error has already been reported.
25289
25290         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25291         error has already been reported.
25292
25293 2002-08-05  Martin Baulig  <martin@gnome.org>
25294
25295         * statement.cs (UsageVector): Only initialize the `parameters'
25296         vector if we actually have any "out" parameters.
25297
25298 2002-08-05  Martin Baulig  <martin@gnome.org>
25299
25300         * expression.cs (Binary.ResolveOperator): When combining delegates,
25301         they must have the same type.
25302
25303 2002-08-05  Martin Baulig  <martin@gnome.org>
25304
25305         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25306         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25307         work with the ms runtime and we also don't need it: if we're a
25308         PropertyBuilder and not in the `indexer_arguments' hash, then we
25309         are a property and not an indexer.
25310
25311         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25312         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25313         since the latter one doesn't work with the ms runtime.
25314
25315 2002-08-03  Martin Baulig  <martin@gnome.org>
25316
25317         Fixed bugs #27998 and #22735.
25318
25319         * class.cs (Method.IsOperator): New public field.
25320         (Method.CheckBase): Report CS0111 if there's already a method
25321         with the same parameters in the current class.  Report CS0508 when
25322         attempting to change the return type of an inherited method.
25323         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25324         and it's not marked abstract or extern.
25325         (PropertyBase): New abstract base class for Property and Indexer.
25326         (PropertyBase.CheckBase): Moved here from Property and made it work
25327         for indexers.
25328         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25329         the same so we can reuse it there.
25330         (Property, Indexer): Derive from PropertyBase.
25331         (MethodSignature.inheritable_property_signature_filter): New delegate
25332         to find properties and indexers.
25333
25334         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25335         argument and improved error reporting.
25336
25337         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25338         EmptyReadOnlyParameters and made it a property.
25339
25340         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25341         version of this method which takes a `PropertyInfo indexer'.
25342         (TypeManager.RegisterIndexer): New method.
25343
25344         * class.cs: Added myself as author of this file :-)
25345
25346 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25347
25348         * class.cs: fixed compilation on windoze.
25349
25350 2002-08-03  Martin Baulig  <martin@gnome.org>
25351
25352         * interface.cs (Interface.GetInterfaceBases): Check whether all
25353         base interfaces are at least as accessible than the current one.
25354
25355         * class.cs (TypeContainer.GetClassBases): Check whether base types
25356         are at least as accessible than the current type.
25357         (TypeContainer.AsAccessible): Implemented and made non-static.
25358         (MemberBase.CheckParameters): Report errors if the accessibility
25359         checks fail.
25360
25361         * delegate.cs (Delegate.Delegate): The default visibility is
25362         internal for top-level types and private for nested types.
25363         (Delegate.Define): Report errors if the accessibility checks fail.
25364
25365         * enum.cs (Enum.Enum): The default visibility is internal for
25366         top-level types and private for nested types.
25367         (Enum.DefineType): Compute the correct visibility.
25368
25369         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25370         function which takes a `bool is_toplevel' instead of a TypeContainer.
25371
25372         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25373         builtin type.
25374
25375 2002-08-02  Martin Baulig  <martin@gnome.org>
25376
25377         * expression.cs (LocalVariableReferenc): Added constructor which
25378         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25379         (LocalVariableReference.IsReadOnly): New property.
25380         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25381         variable is readonly, use our own readonly flag to do this; you can
25382         use the new constructor to get a writable reference to a read-only
25383         variable.
25384
25385         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25386         reference to the local variable.
25387
25388 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25389
25390         * rootcontext.cs (ResolveCore): Also include System.Exception
25391
25392         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25393         we reach an EmptyStatement.
25394
25395         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25396         is also fine.
25397
25398         * expression.cs (Binary.ResolveOperator): Check error result in
25399         two places.
25400
25401         use brtrue/brfalse directly and avoid compares to null.
25402
25403 2002-08-02  Martin Baulig  <martin@gnome.org>
25404
25405         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25406         Fixes bug #28407, added test-155.cs.
25407
25408 2002-08-01  Martin Baulig  <martin@gnome.org>
25409
25410         * class.cs (Event.EmitDefaultMethod): Make this work with static
25411         events.  Fixes #28311, added verify-3.cs.
25412
25413 2002-08-01  Martin Baulig  <martin@gnome.org>
25414
25415         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25416         `is_disposable' fields.
25417         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25418         `hm.is_disposable' if we're using the collection pattern.
25419         (Foreach.EmitCollectionForeach): Use the correct type for the
25420         enumerator's local variable, only emit the try/finally block if
25421         necessary (fixes #27713).
25422
25423 2002-08-01  Martin Baulig  <martin@gnome.org>
25424
25425         * ecore.cs (Expression.report118): Renamed to Error118 and made
25426         it public static.
25427
25428         * statement.cs (Throw.Resolve): Check whether the expression is of
25429         the correct type (CS0118) and whether the type derives from
25430         System.Exception (CS0155).
25431         (Catch.Resolve): New method.  Do the type lookup here and check
25432         whether it derives from System.Exception (CS0155).
25433         (Catch.CatchType, Catch.IsGeneral): New public properties.
25434
25435         * typemanager.cs (TypeManager.exception_type): Added.
25436
25437 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25438
25439         * driver.cs: Updated About function.
25440
25441 2002-07-31  Martin Baulig  <martin@gnome.org>
25442
25443         Implemented Control Flow Analysis.
25444
25445         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25446         (EmitContext.CurrentBranching): Added.
25447         (EmitContext.StartFlowBranching): Added.
25448         (EmitContext.EndFlowBranching): Added.
25449         (EmitContext.KillFlowBranching): Added.
25450         (EmitContext.IsVariableAssigned): Added.
25451         (EmitContext.SetVariableAssigned): Added.
25452         (EmitContext.IsParameterAssigned): Added.
25453         (EmitContext.SetParameterAssigned): Added.
25454         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25455         Added control flow analysis stuff here.
25456
25457         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25458         resolve the expression as lvalue.
25459         (LocalVariableReference.DoResolve): Check whether the variable has
25460         already been assigned.
25461         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25462         the parameter as assigned here.
25463         (ParameterReference.DoResolve): Check whether the parameter has already
25464         been assigned.
25465         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25466         expression as lvalue.
25467
25468         * statement.cs (FlowBranching): New class for the flow analysis code.
25469         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25470         (LabeledStatement.IsDefined): New public property.
25471         (LabeledStatement.AddUsageVector): New public method to tell flow
25472         analyis that the label may be reached via a forward jump.
25473         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25474         flow analysis.
25475         (VariableInfo.Number): New public field.  This is used by flow analysis
25476         to number all locals of a block.
25477         (Block.CountVariables): New public property.  This is the number of
25478         local variables in this block (including the locals from all parent
25479         blocks).
25480         (Block.EmitMeta): Number all the variables.
25481
25482         * statement.cs: Added flow analysis support to all classes.
25483
25484 2002-07-31  Martin Baulig  <martin@gnome.org>
25485
25486         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25487         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25488         then use this argument.
25489
25490         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25491
25492         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25493         use this to specify /define options.
25494
25495 2002-07-29  Martin Baulig  <martin@gnome.org>
25496
25497         * statement.cs (Fixed): Moved all code that does variable lookups
25498         and resolvings from Emit to Resolve.
25499
25500         * statement.cs (For): Moved all code that does variable lookups
25501         and resolvings from Emit to Resolve.
25502
25503         * statement.cs (Using): Moved all code that does variable lookups
25504         and resolvings from Emit to Resolve.
25505
25506 2002-07-29  Martin Baulig  <martin@gnome.org>
25507
25508         * attribute.cs (Attribute.Resolve): Explicitly catch a
25509         System.NullReferenceException when creating the
25510         CustromAttributeBuilder and report a different warning message.
25511
25512 2002-07-29  Martin Baulig  <martin@gnome.org>
25513
25514         * support.cs (ParameterData.ParameterName): Added method to
25515         get the name of a parameter.
25516
25517         * typemanager.cs (TypeManager.IsValueType): New public method.
25518
25519 2002-07-29  Martin Baulig  <martin@gnome.org>
25520
25521         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25522         is a flag which specifies that it's either ref or out.
25523         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25524         the out parameter to `out Parameter.Modifier mod', also set the
25525         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25526
25527         * support.cs (InternalParameters.ParameterModifier): Distinguish
25528         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25529         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25530
25531         * expression.cs (Argument.GetParameterModifier): Distinguish
25532         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25533         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25534
25535 2002-07-29  Martin Baulig  <martin@gnome.org>
25536
25537         * expression.cs (ParameterReference.ParameterReference): Added
25538         `Location loc' argument to the constructor.
25539
25540         * cs-parser.jay: Pass location to ParameterReference.
25541
25542 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25543
25544         * statement.cs (Try): Initialize the location.
25545
25546         * cs-parser.jay: pass location to Try.
25547
25548         * expression.cs (Unary.Reduce): Change the prototype to return
25549         whether a constant fold could be performed or not.  The result is
25550         returned in an out parameters.  In the case of Indirection and
25551         AddressOf, we want to perform the full tests.
25552
25553 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25554
25555         * statement.cs (Statement.Emit): Flag dead code.
25556
25557 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25558
25559         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25560
25561 2002-07-27  Martin Baulig  <martin@gnome.org>
25562
25563         * class.cs (MethodData.Define): Put back call to
25564         TypeManager.AddMethod(), accidentally commented this out.
25565
25566         * report.cs (Debug): New public method to print debugging information,
25567         this is `[Conditional ("DEBUG")]'.
25568
25569 2002-07-26  Martin Baulig  <martin@gnome.org>
25570
25571         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25572         (switch_statement): Push the current_block to the switch_stack and
25573         pop it again when we're done with the switch.
25574         (switch_section): The new block is a child of the current_block.
25575         Fixes bug #24007, added test-152.cs.
25576
25577 2002-07-27  Martin Baulig  <martin@gnome.org>
25578
25579         * expression.cs (Invocation.EmitArguments): When calling a varargs
25580         function with only its fixed arguments, we need to pass an empty
25581         array.
25582
25583 2002-07-27  Martin Baulig  <martin@gnome.org>
25584
25585         Mono 0.13 has been released.
25586
25587 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25588
25589         * driver.cs: Rename --resource to --linkres, because that is what
25590         we do currently, we dont support --resource yet.
25591
25592         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
25593
25594 2002-07-25  Martin Baulig  <martin@gnome.org>
25595
25596         * class.cs (MethodData): New public class.  This is a `method builder'
25597         class for a method or one accessor of a Property/Indexer/Event.
25598         (MethodData.GetMethodFlags): Moved here from MemberBase.
25599         (MethodData.ApplyAttributes): Likewise.
25600         (MethodData.ApplyObsoleteAttribute): Likewise.
25601         (MethodData.ApplyConditionalAttribute): Likewise.
25602         (MethodData.ApplyDllImportAttribute): Likewise.
25603         (MethodData.CheckAbstractAndExternal): Likewise.
25604         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
25605         (MethodData.Emit): Formerly known as Method.Emit().
25606         (MemberBase): Moved everything which was specific to a single
25607         accessor/method to MethodData.
25608         (Method): Create a new MethodData and call Define() and Emit() on it.
25609         (Property, Indexer, Event): Create a new MethodData objects for each
25610         accessor and call Define() and Emit() on them.
25611
25612 2002-07-25  Martin Baulig  <martin@gnome.org>
25613
25614         Made MethodCore derive from MemberBase to reuse the code from there.
25615         MemberBase now also checks for attributes.
25616
25617         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
25618         (MemberBase.GetMethodFlags): Moved here from class Method and marked
25619         as virtual.
25620         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
25621         `CallingConventions cc' and `Attributes opt_attrs' arguments.
25622         (MemberBase.ApplyAttributes): New virtual method; applies the
25623         attributes to a method or accessor.
25624         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
25625         (MemberBase.ApplyConditionalAttribute): Likewise.
25626         (MemberBase.ApplyDllImportAttribute): Likewise.
25627         (MemberBase.CheckAbstractAndExternal): Likewise.
25628         (MethodCore.ParameterTypes): This is now a property instead of a
25629         method, it's initialized from DoDefineParameters().
25630         (MethodCore.ParameterInfo): Removed the set accessor.
25631         (MethodCore.DoDefineParameters): New protected virtual method to
25632         initialize ParameterTypes and ParameterInfo.
25633         (Method.GetReturnType): We can now simply return the MemberType.
25634         (Method.GetMethodFlags): Override the MemberBase version and add
25635         the conditional flags.
25636         (Method.CheckBase): Moved some code from Define() here, call
25637         DoDefineParameters() here.
25638         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
25639         here to avoid some larger code duplication.
25640         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
25641         ensure that abstract and external accessors don't declare a body.
25642
25643         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
25644         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
25645         lookup in the attribute's parent classes, so we need to abort as soon
25646         as we found the first match.
25647         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
25648         the attribute has no arguments.
25649
25650         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
25651         of a Method.
25652
25653 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25654
25655         * cs-parser.jay: reverted previous patch.
25656
25657 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25658
25659         * cs-parser.jay: fixed bug #22119.
25660
25661 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25662
25663         * attribute.cs: fixed compilation. The error was:
25664         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
25665         be assigned to before control leaves the current method."
25666         [FIXME:  Filed as bug #28186: MCS must report this error.]
25667
25668 2002-07-25  Martin Baulig  <martin@gnome.org>
25669
25670         * attribute.cs (Attribute.Conditional_GetConditionName): New static
25671         method to pull the condition name ouf of a Conditional attribute.
25672         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
25673         the obsolete message and error flag out of an Obsolete attribute.
25674
25675         * class.cs (Method.GetMethodFlags): New public method to get the
25676         TypeManager.MethodFlags for this method.
25677         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
25678         private methods.
25679         (Method.Define): Get and apply the Obsolete and Conditional attributes;
25680         if we're overriding a virtual function, set the new private variable
25681         `parent_method'; call the new TypeManager.AddMethod().
25682
25683         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
25684         the MethodBuilder and the Method in a PtrHashtable.
25685         (TypeManager.builder_to_method): Added for this purpose.
25686         (TypeManager.MethodFlags): Added IsObsoleteError.
25687         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
25688         Obsolete and Conditional arguments in MethodBuilders.  If we discover
25689         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
25690         the message from the attribute.
25691
25692 2002-07-24  Martin Baulig  <martin@gnome.org>
25693
25694         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
25695         preprocessor directives, ensure that the argument to #define/#undef is
25696         exactly one identifier and that it's actually an identifier.
25697
25698         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
25699         did not work ....
25700
25701 2002-07-24  Martin Baulig  <martin@gnome.org>
25702
25703         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
25704         initialize it to TypeManager.object_type in the constructor.
25705         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
25706         of the `hm.get_current' method if we're using the collection pattern.
25707         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
25708         for the explicit conversion to make it work when we're using the collection
25709         pattern and the `Current' property has a different return type than `object'.
25710         Fixes #27713.
25711
25712 2002-07-24  Martin Baulig  <martin@gnome.org>
25713
25714         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
25715         does not match, but don't report any errors.  This method is called in
25716         order for all methods in a MethodGroupExpr until a matching method is
25717         found, so we don't want to bail out if the first method doesn't match.
25718         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
25719         matches, report the 123.  Fixes #28070.
25720
25721 2002-07-24  Martin Baulig  <martin@gnome.org>
25722
25723         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
25724         TypeManager.TypeToCoreType() to the top of the method so the
25725         following equality checks will work.  Fixes #28107.
25726
25727 2002-07-24  Martin Baulig  <martin@gnome.org>
25728
25729         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
25730         operand is of type uint, and the other operand is of type sbyte,
25731         short or int, the operands are converted to type long." -
25732         Actually do what this comment already told us.  Fixes bug #28106,
25733         added test-150.cs.
25734
25735 2002-07-24  Martin Baulig  <martin@gnome.org>
25736
25737         * class.cs (MethodBase): New abstract class.  This is now a base
25738         class for Property, Indexer and Event to avoid some code duplication
25739         in their Define() and DefineMethods() methods.
25740         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
25741         generic methods for Define() and DefineMethods().
25742         (FieldBase): Derive from MemberBase, not MemberCore.
25743         (Property): Derive from MemberBase, not MemberCore.
25744         (Property.DefineMethod): Moved all the code from this method to the
25745         new MethodBase.DefineAccessor(), just call it with appropriate
25746         argumetnts.
25747         (Property.Define): Call the new Property.DoDefine(), this does some
25748         sanity checks and we don't need to duplicate the code everywhere.
25749         (Event): Derive from MemberBase, not MemberCore.
25750         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
25751         accessors, this will also make them work with interface events.
25752         (Indexer): Derive from MemberBase, not MemberCore.
25753         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
25754         (Indexer.Define): Use the new MethodBase functions.
25755
25756         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
25757         argument to the constructor.
25758         (Interface.FindMembers): Added support for interface events.
25759         (Interface.PopluateEvent): Implemented.
25760
25761         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
25762
25763 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
25764
25765         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
25766         but this is required to check for a method name being the same as
25767         the containing class.  
25768
25769         Handle this now.
25770
25771 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25772
25773         * interface.cs: initialize variable.
25774
25775 2002-07-23  Martin Baulig  <martin@gnome.org>
25776
25777         Implemented the IndexerName attribute in interfaces.
25778
25779         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
25780         name if this is an explicit interface implementation.
25781         (Indexer.InterfaceIndexerName): New public variable.  If we're
25782         implementing an interface indexer, this is the IndexerName in that
25783         interface.  Otherwise, it's the IndexerName.
25784         (Indexer.DefineMethod): If we're implementing interface indexer,
25785         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
25786         and Pending.ImplementIndexer methods.
25787         (Indexer.Define): Also define the PropertyBuilder if we're
25788         implementing an interface indexer and this is neither an explicit
25789         interface implementation nor do the IndexerName match the one in
25790         the interface.
25791
25792         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
25793         If a method is defined here, then we always need to create a proxy
25794         for it.  This is used when implementing interface indexers.
25795         (Pending.IsInterfaceIndexer): New public method.
25796         (Pending.ImplementIndexer): New public method.
25797         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
25798         This is used when implementing interface indexers to define a proxy
25799         if necessary.
25800         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
25801         define a proxy if necessary.
25802
25803         * interface.cs (Interface.IndexerName): New public variable.
25804         (Interface.PopulateIndexer): Set the IndexerName.
25805         (Interface.DefineIndexers): New private method.  Populate all the
25806         indexers and make sure their IndexerNames match.
25807
25808         * typemanager.cs (IndexerPropertyName): Added support for interface
25809         indexers.
25810
25811 2002-07-22  Martin Baulig  <martin@gnome.org>
25812
25813         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
25814         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
25815         ret if HasReturnLabel.
25816         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
25817         variables.
25818
25819         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
25820         and set the ec.LoopBeginTryCatchLevel.
25821         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
25822         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
25823         the current ec.TryCatchLevel, the branch goes out of an exception
25824         block.  In this case, we need to use Leave and not Br.
25825
25826 2002-07-22  Martin Baulig  <martin@gnome.org>
25827
25828         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
25829         block unless the block does not always return or it is contained in
25830         another try { ... } catch { ... } block.  Fixes bug #26506.
25831         Added verify-1.cs to the test suite.
25832
25833 2002-07-22  Martin Baulig  <martin@gnome.org>
25834
25835         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
25836         then we do not always return.  Fixes bug #24985.
25837
25838 2002-07-22  Martin Baulig  <martin@gnome.org>
25839
25840         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
25841         lookup on a per-class level; ie. walk up the class hierarchy until we
25842         found at least one applicable method, then choose the best among them.
25843         Fixes bug #24463 and test-29.cs.
25844
25845 2002-07-22  Martin Baulig  <martin@gnome.org>
25846
25847         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
25848         return types of the methods.  The return type is not part of the
25849         signature and we must not check it to make the `new' modifier work.
25850         Fixes bug #27999, also added test-147.cs.
25851         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
25852
25853         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
25854         on the method's return type.
25855
25856 2002-07-21  Martin Baulig  <martin@gnome.org>
25857
25858         * assign.cs: Make this work if the rightmost source is a constant and
25859         we need to do an implicit type conversion.  Also adding a few more tests
25860         to test-38.cs which should have caught this.
25861
25862         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
25863         target in the makefile for this.  The makefile.gnu is primarily intended
25864         for end-users who don't want to debug the compiler.
25865
25866 2002-07-21  Martin Baulig  <martin@gnome.org>
25867
25868         * assign.cs: Improved the Assign class so it can now handle embedded
25869         assignments (X = Y = Z = something).  As a side-effect this'll now also
25870         consume less local variables.  test-38.cs now passes with MCS, added
25871         a few new test cases to that test.
25872
25873 2002-07-20  Martin Baulig  <martin@gnome.org>
25874
25875         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
25876         instructions.  Fixes bug #27977, also added test-146.cs.
25877
25878 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25879
25880         * cs-tokenizer.cs: fixed getHex ().
25881
25882 2002-07-19  Martin Baulig  <martin@gnome.org>
25883
25884         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
25885         not Type.GetType() to lookup the array type.  This is needed when
25886         we're constructing an array of a user-defined type.
25887         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
25888         single-dimensional arrays, but also for single-dimensial arrays of
25889         type decimal.
25890
25891 2002-07-19  Martin Baulig  <martin@gnome.org>
25892
25893         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
25894         this function is called, it's not allowed to share LocalBuilders
25895         among ILGenerators.
25896
25897 2002-07-19  Martin Baulig  <martin@gnome.org>
25898
25899         * expression.cs (Argument.Resolve): Report an error 118 when trying
25900         to pass a type as argument.
25901
25902 2002-07-18  Martin Baulig  <martin@gnome.org>
25903
25904         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
25905         Conv_R_Un for the signed `long' type.
25906
25907 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
25908
25909         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
25910         `expr' for the temporary result, as that will fail if we do
25911         multiple resolves on the same expression.
25912
25913 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
25914
25915         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
25916         ec.TypeContainer for looking up aliases. 
25917
25918         * class.cs (TypeContainer): Remove LookupAlias from here.
25919
25920         * decl.cs (DeclSpace); Move here.
25921
25922 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
25923
25924         * class.cs (FindMembers): Only call filter if the constructor
25925         bulider is not null.
25926
25927         Also handle delegates in `NestedTypes' now.  Now we will perform
25928         type lookups using the standard resolution process.  This also
25929         fixes a bug.
25930
25931         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
25932         This uses Expressions (the limited kind that can be parsed by the
25933         tree) instead of strings.
25934
25935         * expression.cs (ComposedCast.ToString): Implement, used to flag
25936         errors since now we have to render expressions.
25937
25938         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
25939         FormArrayType. 
25940
25941         * ecore.cs (SimpleName.ToString): ditto.
25942
25943         * cs-parser.jay: Instead of using strings to assemble types, use
25944         Expressions to assemble the type (using SimpleName, ComposedCast,
25945         MemberAccess).  This should fix the type lookups in declarations,
25946         because we were using a different code path for this.
25947
25948         * statement.cs (Block.Resolve): Continue processing statements
25949         even when there is an error.
25950
25951 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
25952
25953         * class.cs (Event.Define): Also remove the `remove' method from
25954         the list of pending items.
25955
25956         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
25957         generate more compact code. 
25958
25959 2002-07-17  Martin Baulig  <martin@gnome.org>
25960
25961         * const.cs (Const.LookupConstantValue): Add support for constant
25962         `unchecked' and `checked' expressions.
25963         Also adding test case test-140.cs for this.
25964
25965 2002-07-17  Martin Baulig  <martin@gnome.org>
25966
25967         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
25968         check whether mi.ReturnType implements the IEnumerator interface; the
25969         `==' and the IsAssignableFrom() will fail in this situation.
25970
25971 2002-07-16  Ravi Pratap  <ravi@ximian.com>
25972
25973         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
25974         here too.
25975
25976 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25977
25978         * expression.cs: fixed bug #27811.
25979
25980 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
25981
25982         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
25983         Molaro: when we are a ref, the value already contains a pointer
25984         value, do not take the address of it.
25985
25986 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
25987         * removed mb-parser.jay and mb-tokenizer.cs
25988
25989 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
25990
25991         * expression.cs: check against the building corlib void type.
25992
25993 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
25994
25995         * ecore.cs: fix for valuetype static readonly fields: when 
25996         initializing them, we need their address, not the address of a copy.
25997
25998 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
25999
26000         * typemanager.cs: register also enum_type in corlib.
26001
26002 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26003
26004         * class.cs: allow calling this (but not base) initializers in structs.
26005
26006 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26007
26008         * ecore.cs: make sure we compare against the building base types
26009         in GetTypeSize ().
26010
26011 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26012
26013         * typemanager.cs: fix TypeToCoreType() to handle void and object
26014         (corlib gets no more typerefs after this change).
26015
26016 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26017
26018         * expression.cs (ArrayCreation.EmitArrayArguments): use
26019         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26020
26021         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26022         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26023         array indexes, the runtime actually forbids them.
26024
26025         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26026         for array arguments here.
26027
26028         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26029         instead of the default for ValueTypes.
26030
26031         (New.DoEmit): Use IsValueType instead of
26032         IsSubclassOf (value_type)
26033         (New.DoResolve): ditto.
26034         (Invocation.EmitCall): ditto.
26035
26036         * assign.cs (Assign): ditto.
26037
26038         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26039         Statements *are* currently doing part of their resolution during
26040         Emit.  
26041
26042         Expressions do always resolve during resolve, but statements are
26043         only required to propagate resolution to their children.
26044
26045 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26046
26047         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26048
26049         (LoadAssembly): Do not add the dll if it is already specified
26050
26051         (MainDriver): Add the System directory to the link path at the end,
26052         after all the other -L arguments. 
26053
26054         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26055         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26056         ldelem.u1) and using the opposite for sbytes.
26057
26058         This fixes Digger, and we can finally run it.
26059
26060         * driver.cs (UnixParseOption): Move the option parsing here.  
26061         (CSCParseOption): Implement CSC-like parsing of options.
26062
26063         We now support both modes of operation, the old Unix way, and the
26064         new CSC-like way.  This should help those who wanted to make cross
26065         platform makefiles.
26066
26067         The only thing broken is that /r:, /reference: and /lib: are not
26068         implemented, because I want to make those have the same semantics
26069         as the CSC compiler has, and kill once and for all the confussion
26070         around this.   Will be doing this tomorrow.
26071
26072         * statement.cs (Unsafe.Resolve): The state is checked during
26073         resolve, not emit, so we have to set the flags for IsUnsfe here.
26074
26075 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26076
26077         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26078         not catch the Error_ObjectRefRequired in SimpleName (as it is
26079         possible to have a class/instance variable name that later gets
26080         deambiguated), we have to check this here.      
26081
26082 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26083
26084         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26085         make static and put into Expression.
26086
26087         (Event.Define): Register the private field of the event with the 
26088         TypeManager so that GetFieldFromEvent can get at it.
26089
26090         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26091         keep track of the private field associated with an event which
26092         has no accessors.
26093
26094         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26095         private field.
26096
26097         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26098
26099 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26100
26101         * expression.cs (Binary.EmitBranchable): this routine emits the
26102         Binary expression in a branchable context.  This basically means:
26103         we need to branch somewhere, not just get the value on the stack.
26104
26105         This works together with Statement.EmitBoolExpression.
26106
26107         * statement.cs (Statement.EmitBoolExpression): Use
26108         EmitBranchable. 
26109
26110 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26111
26112         * statement.cs (For): Reduce the number of jumps in loops.
26113
26114         (For): Implement loop inversion for the For statement.
26115
26116         (Break): We can be breaking out of a Try/Catch controlled section
26117         (foreach might have an implicit try/catch clause), so we need to
26118         use Leave instead of Br.
26119
26120         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26121         now).  If the instace expression supports IMemoryLocation, we use
26122         the AddressOf method from the IMemoryLocation to extract the
26123         address instead of emitting the instance.
26124
26125         This showed up with `This', as we were emitting the instance
26126         always (Emit) instead of the Address of This.  Particularly
26127         interesting when This is a value type, as we dont want the Emit
26128         effect (which was to load the object).
26129
26130 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26131
26132         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26133
26134         * statement.cs (Checked): Set the CheckedState during the resolve
26135         process too, as the ConvCast operations track the checked state on
26136         the resolve process, and not emit.
26137
26138         * cs-parser.jay (namespace_member_declaration): Flag that we have
26139         found a declaration when we do.  This is used to flag error 1529
26140
26141         * driver.cs: Report ok when we display the help only.
26142
26143 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26144
26145         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26146
26147 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26148
26149         * cs-tokenizer.cs (define): We also have to track locally the
26150         defines.  AllDefines is just used for the Conditional Attribute,
26151         but we also need the local defines for the current source code. 
26152
26153 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26154
26155         * statement.cs (While, For, Do): These loops can exit through a
26156         Break statement, use this information to tell whether the
26157         statement is the last piece of code.
26158
26159         (Break): Flag that we break.
26160
26161         * codegen.cs (EmitContexts): New `Breaks' state variable.
26162
26163 2002-07-03  Martin Baulig  <martin@gnome.org>
26164
26165         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26166         modifiers in method declarations in structs.  Otherwise, you won't
26167         be able to override things like Object.Equals().
26168
26169 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26170
26171         * class.cs (Method, Property, Indexer): Do not allow the public
26172         modifier to be used in explicit interface implementations.
26173
26174         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26175         override modifiers in method declarations in structs
26176
26177 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26178
26179         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26180         integer or real overflow, report an error
26181
26182 2002-07-02  Martin Baulig  <martin@gnome.org>
26183
26184         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26185         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26186         to tell the runtime about our newly created System.Object and
26187         System.ValueType types.
26188
26189 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26190
26191         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26192         struct instead of Ldarg/Starg.
26193
26194 2002-07-02  Martin Baulig  <martin@gnome.org>
26195
26196         * expression.cs (Indirection.Indirection): Call
26197         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26198
26199 2002-07-02  Martin Baulig  <martin@gnome.org>
26200
26201         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26202         ValueType, call TypeManager.TypeToCoreType() on it.
26203         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26204         the OpCodes.Newarr argument.
26205
26206 2002-07-02  Martin Baulig  <martin@gnome.org>
26207
26208         * expression.cs (Invocation.EmitCall): When compiling corlib,
26209         replace all calls to the system's System.Array type to calls to
26210         the newly created one.
26211
26212         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26213         System.Array methods.
26214         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26215         from the system's System.Array type which must be replaced.
26216
26217 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26218
26219         * typemanager.cs: load unverifiable_code_ctor so we can build
26220         corlib using the correct type. Avoid using GetTypeCode() with
26221         TypeBuilders.
26222         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26223         TypeManager.object_type to allow building corlib.
26224
26225 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26226
26227         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26228
26229 2002-07-01  Martin Baulig  <martin@gnome.org>
26230
26231         * class.cs: Make the last change actually work, we need to check
26232         whether `ifaces != null' to avoid a crash.
26233
26234 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26235
26236         * class.cs: when we build structs without fields that implement
26237         interfaces, we need to add the interfaces separately, since there is
26238         no API to both set the size and add the interfaces at type creation
26239         time.
26240
26241 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26242
26243         * expression.cs: the dimension arguments to the array constructors
26244         need to be converted if they are a long.
26245
26246 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26247
26248         * class.cs: don't emit ldarg.0 if there is no parent constructor
26249         (fixes showstopper for corlib).
26250
26251 2002-06-29  Martin Baulig  <martin@gnome.org>
26252
26253         MCS now compiles corlib on GNU/Linux :-)
26254
26255         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26256         ie. check for MethodImplOptions.InternalCall.
26257
26258         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26259         and TypeManager.attribute_type are null, so we must explicitly check
26260         whether parent is not null to find out whether it's an attribute type.
26261         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26262         and SetBuilder, not only if the property is neither abstract nor external.
26263         This is necessary to set the MethodImplOptions on the accessor methods.
26264         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26265         SetBuilder, see Property.Emit().
26266
26267         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26268         populate "System.Object", "System.ValueType" and "System.Attribute" since
26269         they've already been populated from BootCorlib_PopulateCoreTypes().
26270
26271 2002-06-29  Martin Baulig  <martin@gnome.org>
26272
26273         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26274         is the NullLiteral, we also need to make sure that target_type is not
26275         an enum type.   
26276
26277 2002-06-29  Martin Baulig  <martin@gnome.org>
26278
26279         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26280         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26281         before calling BootstrapCorlib_ResolveDelegate ().
26282
26283 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26284
26285         * statement.cs: fixed build-breaker. All tests passed ok.
26286
26287 2002-06-27  Martin Baulig  <martin@gnome.org>
26288
26289         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26290         for System.Decimal when compiling corlib.
26291
26292 2002-06-27  Martin Baulig  <martin@gnome.org>
26293
26294         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26295         switch blocks which contain nothing but a default clause.
26296
26297 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26298
26299        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26300
26301 2002-06-27  Martin Baulig  <martin@gnome.org>
26302
26303         * ecore.cs (PropertyExpr.PropertyExpr): Call
26304         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26305
26306         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26307         is already a TypeBuilder.
26308
26309 2002-06-27  Martin Baulig  <martin@gnome.org>
26310
26311         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26312         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26313         the "from an array-type to System.Array" case.  This makes it work
26314         when compiling corlib.
26315
26316 2002-06-27  Martin Baulig  <martin@gnome.org>
26317
26318         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26319         non-static PropertyExpr, set its InstanceExpression.  This makes
26320         the `ICollection.Count' property work in System/Array.cs.
26321
26322 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26323
26324         * driver.cs: Made error handling more consistent.  Errors now
26325         tracked by Report class, so many methods which used to return int
26326         now return void.  Main() now prints success/failure and 
26327         errors/warnings message.
26328
26329         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26330         the magic number return values (123 and 124).  Now, if the
26331         expected error occurs, the compiler exits with success (exit value
26332         0).  If the compilation completes without seeing that particular
26333         error, the compiler exits with failure (exit value 1).  The
26334         makefile in mcs/errors has been changed to handle the new behaviour.
26335
26336         * report.cs: Made 'expected error' number a property and renamed
26337         it from 'Probe' to 'ExpectedError'.
26338
26339         * genericparser.cs: Removed error handling support, since it is
26340         now all done by Report class.
26341
26342         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26343         class, so parse() no longer returns an int.
26344
26345         * namespace.cs: Use Report.Error instead of GenericParser.error
26346
26347 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26348
26349         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26350         TypeContainer.AddOperator): At the front of the list put the
26351         explicit implementations, so they get resolved/defined first. 
26352
26353 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26354
26355         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26356         interface type is implemented by this TypeContainer.  Used during
26357         explicit interface implementation.
26358
26359         (Property.Define, Indexer.Define, Method.Define): Validate that
26360         the given interface in the explicit implementation is one of the
26361         base classes for the containing type.
26362
26363         Also if we are explicitly implementing an interface, but there is
26364         no match in the pending implementation table, report an error.
26365
26366         (Property.Define): Only define the property if we are
26367         not explicitly implementing a property from an interface.  Use the
26368         correct name also for those properties (the same CSC uses,
26369         although that is really not needed).
26370
26371         (Property.Emit): Do not emit attributes for explicitly implemented
26372         properties, as there is no TypeBuilder.
26373
26374         (Indexer.Emit): ditto.
26375
26376         Hiding then means that we do not really *implement* a pending
26377         implementation, which makes code fail.
26378
26379 2002-06-22  Martin Baulig  <martin@gnome.org>
26380
26381         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26382         the return value of Object.GetType().  [FIXME: we need to do this whenever
26383         we get a type back from the reflection library].
26384
26385 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26386
26387         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26388
26389 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26390
26391         * attribute.cs: Return null if we can not look up the type.
26392
26393         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26394         the interface types found.
26395
26396         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26397         interface types found.
26398
26399         * typemanager.cs (GetInterfaces): Make this routine returns alll
26400         the interfaces and work around the lame differences between
26401         System.Type and System.Reflection.Emit.TypeBuilder in the results
26402         result for GetInterfaces.
26403
26404         (ExpandInterfaces): Given an array of interface types, expand and
26405         eliminate repeated ocurrences of an interface.  This expands in
26406         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26407         be IA, IB, IC.
26408
26409 2002-06-21  Martin Baulig  <martin@gnome.org>
26410
26411         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26412         on System.Enum.
26413
26414 2002-06-21  Martin Baulig  <martin@gnome.org>
26415
26416         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26417         and called with one of the core types, return the corresponding typebuilder for
26418         that type.
26419
26420         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26421         element type.
26422
26423 2002-06-21  Martin Baulig  <martin@gnome.org>
26424
26425         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26426         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26427         (Expression.ConvertReferenceExplicit): Likewise.
26428
26429         * expression.cs (ElementAccess.DoResolve): Likewise.
26430         (ElementAccess.DoResolveLValue): Likewise.
26431
26432 2002-06-10  Martin Baulig  <martin@gnome.org>
26433
26434         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26435         add the "value" parameter to the parameter list.
26436
26437         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26438         to our caller.
26439
26440 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26441
26442         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26443         the argument to an int, uint, long or ulong, per the spec.  Also
26444         catch negative constants in array creation.
26445
26446 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26447
26448         * class.cs: do not allow the same interface to appear twice in
26449         the definition list.
26450
26451 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26452
26453         * ecore.cs: don't use ldlen with System.Array.
26454
26455 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26456
26457         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26458
26459 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26460
26461         * modifiers.cs: produce correct field attributes for protected
26462         internal. Easy fix so miguel can work on ther harder stuff:-)
26463
26464 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26465
26466         * pending.cs: New file.  Move the code from class.cs here.
26467         Support clearning the pending flag for all methods (when not doing
26468         explicit interface implementation).
26469
26470 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26471
26472         * rootcontext.cs: added a couple more types needed to bootstrap.
26473
26474 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26475
26476         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26477         constructor in the type, instead of any constructor in the type
26478         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26479         a bug in the Mono runtime when applying the params attribute). 
26480
26481 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26482         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26483
26484 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26485
26486         * expression.cs (Unary.ResolveOperator): Use TypeManager
26487         to resolve the type.
26488
26489 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26490
26491         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26492         attached.
26493
26494         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26495         with each member too.
26496
26497         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26498         field builders too - this takes care of the enum member case.
26499
26500 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26501
26502         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26503         address-of operator on both value types and pointers.
26504
26505 2002-06-10  Martin Baulig  <martin@gnome.org>
26506
26507         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26508         PropertyBuilder to the `property_builders' list.
26509
26510         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26511         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26512         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26513         find any indexers which are inherited from an interface.
26514
26515 2002-06-09  Martin Baulig  <martin@gnome.org>
26516
26517         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26518         the same type as the constant if necessary.  There's also a test-130.cs
26519         for this.
26520
26521         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26522
26523         * typemanager.cs (TypeManager.ChangeType): Previously known as
26524         Enum.ChangeEnumType().
26525
26526 2002-06-09  Martin Baulig  <martin@gnome.org>
26527
26528         * expression.cs (Cast.TryReduce): Added support for consts.
26529
26530 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26531
26532         * class.cs (Accessor): Hold attributes information so we can pass
26533         it along.
26534
26535         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26536         Modify to pass in attributes attached to the methods.
26537
26538         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26539
26540         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26541         to handle the Accessor kind :-)
26542
26543         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26544
26545 2002-06-08  Martin Baulig  <martin@gnome.org>
26546
26547         * expression.cs (Unary.TryReduceNegative): Added support for
26548         ULongConstants.
26549
26550 2002-06-08  Martin Baulig  <martin@gnome.org>
26551
26552         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26553         name can't be found in the `defined_names' - the caller will do a
26554         MemberLookup in this case and thus find methods in System.Enum
26555         such as Enum.IsDefined().
26556
26557 2002-06-08  Martin Baulig  <martin@gnome.org>
26558
26559         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26560         Convert.ChangeType() which works with TypeBuilder created types.
26561         (Enum.LookupEnumValue, Enum.Define): Use it here.
26562
26563         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26564         `TypeBuilder.BaseType != null' check.
26565         (TypeContainer.FindMembers): Only lookup parent members if we
26566         actually have a parent.
26567         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26568         (ConstructorInitializer.Resolve): Likewise.
26569
26570         * interface.cs (Interface.FindMembers): Added
26571         `TypeBuilder.BaseType != null' check.
26572
26573         * rootcontext.cs (RootContext.ResolveCore): Added
26574         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26575         classes_second_stage.
26576
26577         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26578         debug_type and trace_type when compiling with --nostdlib.       
26579
26580 2002-06-07  Martin Baulig  <martin@gnome.org>
26581
26582         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26583         (AddField): Set it to true when adding a non-static field.
26584         (DefineType): Use `have_nonstatic_fields' to find out whether we
26585         have non-static fields, not `Fields != null'.
26586
26587 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26588
26589         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26590         dereferencing a null on the static-field code path)
26591
26592 2002-05-30  Martin Baulig  <martin@gnome.org>
26593
26594         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
26595         to take command line arguments.  Use reflection to call the new
26596         custom `Initialize' function on the symbol writer and pass it the
26597         command line arguments.
26598
26599         * driver.cs (--debug-args): New command line argument to pass command
26600         line arguments to the symbol writer.
26601
26602 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
26603
26604         * assign.cs (DoResolve): Forgot to do the implicit conversion to
26605         the target type for indexers and properties.  Thanks to Joe for
26606         catching this.
26607
26608 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
26609
26610         * typemanager.cs (MethodFlags): returns the method flags
26611         (Obsolete/ShouldIgnore) that control warning emission and whether
26612         the invocation should be made, or ignored. 
26613
26614         * expression.cs (Invocation.Emit): Remove previous hack, we should
26615         not do this on matching a base type, we should do this based on an attribute
26616
26617         Only emit calls to System.Diagnostics.Debug and
26618         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
26619         on the command line.
26620
26621         * rootcontext.cs: Global settings for tracing and debugging.
26622
26623         * cs-tokenizer.cs (define): New utility function to track
26624         defines.   Set the global settings for TRACE and DEBUG if found.
26625
26626 2002-05-25  Ravi Pratap  <ravi@ximian.com>
26627
26628         * interface.cs (Populate*): Pass in the TypeContainer as well as
26629         the DeclSpace as parameters so that we can create EmitContexts and
26630         then use that to apply attributes etc.
26631
26632         (PopulateMethod, PopulateEvent, PopulateProperty)
26633         (PopulateIndexer): Apply attributes everywhere.
26634
26635         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
26636         etc.
26637
26638         (ApplyAttributes): Update accordingly.
26639
26640         We now apply interface attributes for all members too.
26641
26642 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
26643
26644         * class.cs (Indexer.Define); Correctly check if we are explicit
26645         implementation (instead of checking the Name for a ".", we
26646         directly look up if the InterfaceType was specified).
26647
26648         Delay the creation of the PropertyBuilder.
26649
26650         Only create the PropertyBuilder if we are not an explicit
26651         interface implementation.   This means that explicit interface
26652         implementation members do not participate in regular function
26653         lookups, and hence fixes another major ambiguity problem in
26654         overload resolution (that was the visible effect).
26655
26656         (DefineMethod): Return whether we are doing an interface
26657         implementation. 
26658
26659         * typemanager.cs: Temporary hack until we get attributes in
26660         interfaces (Ravi is working on that) and we get IndexerName
26661         support in interfaces.
26662
26663         * interface.cs: Register the indexers as properties.
26664
26665         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
26666         warning, I have verified that this is a bug in the .NET runtime
26667         (JavaScript suffers of the same problem).
26668
26669         * typemanager.cs (MemberLookup): When looking up members for
26670         interfaces, the parent of an interface is the implicit
26671         System.Object (so we succeed in searches of Object methods in an
26672         interface method invocation.  Example:  IEnumerable x;  x.ToString
26673         ()) 
26674
26675 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
26676
26677         * class.cs (Event): Events should also register if they do
26678         implement the methods that an interface requires.
26679
26680         * typemanager.cs (MemberLookup); use the new GetInterfaces
26681         method. 
26682
26683         (GetInterfaces): The code used to lookup interfaces for a type is
26684         used in more than one place, factor it here. 
26685
26686         * driver.cs: Track the errors at the bottom of the file, we kept
26687         on going.
26688
26689         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
26690         instance if the method we are calling is static!
26691
26692 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
26693
26694         * attribute.cs (ApplyAttributes): Make this function filter out
26695         the IndexerName attribute (as that attribute in reality is never
26696         applied) and return the string constant for the IndexerName
26697         attribute. 
26698
26699         * class.cs (TypeContainer.Emit): Validate that all the indexers
26700         have the same IndexerName attribute, and if so, set the
26701         DefaultName attribute on the class. 
26702
26703         * typemanager.cs: The return value might contain other stuff (not
26704         only methods).  For instance, consider a method with an "Item"
26705         property and an Item method.
26706
26707         * class.cs: If there is a problem with the parameter types,
26708         return. 
26709
26710 2002-05-24  Ravi Pratap  <ravi@ximian.com>
26711
26712         * ecore.cs (ImplicitConversionExists): Wrapper function which also
26713         looks at user defined conversion after making a call to 
26714         StandardConversionExists - we need this for overload resolution.
26715
26716         * expression.cs : Update accordingly the various method calls.
26717
26718         This fixes 2 bugs filed against implicit user defined conversions 
26719
26720 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
26721
26722         * statement.cs: Track the result of the assignment.
26723
26724 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
26725
26726         * expression.cs (MemberAccess): Improved error reporting for
26727         inaccessible members.
26728
26729 2002-05-22  Martin Baulig  <martin@gnome.org>
26730
26731         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
26732         itself with debugging support.
26733
26734 2002-05-22  Martin Baulig  <martin@gnome.org>
26735
26736         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
26737         Removed, this isn't needed anymore.
26738
26739 2002-05-20  Martin Baulig  <martin@gnome.org>
26740
26741         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
26742         be underlying type for an enum.
26743
26744 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
26745
26746         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
26747         that splits out the loading of just the core types.
26748
26749         * rootcontext.cs (ResolveCore): Split the struct resolution in
26750         two, so we can load the enumeration underlying types before any
26751         enums are used.
26752
26753         * expression.cs (Is): Bandaid until we fix properly Switch (see
26754         bug #24985 for details).
26755
26756         * typemanager.cs (ImplementsInterface): The hashtable will contain
26757         a null if there are no interfaces implemented.
26758
26759 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
26760
26761         * cs-parser.jay (indexer_declarator): It is fine to have array
26762         parameters
26763
26764 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26765
26766         * typemanager.cs: (RegisterBuilder): New function used to register
26767         TypeBuilders that implement interfaces.  Since
26768         TypeBuilder.GetInterfaces (as usual) does not work with lame
26769         Reflection.Emit. 
26770         (AddUserType): register interfaces.
26771
26772         (ImplementsInterface): Use the builder_to_ifaces hash if we are
26773         dealing with TypeBuilder.  Also, arrays are showing up as
26774         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
26775         methods can not be invoked on them!
26776
26777         * ecore.cs (ExplicitReferenceConversionExists): Made public.
26778         (ImplicitReferenceConversionExists): Split out from
26779         StandardConversionExists. 
26780
26781         * expression.cs (As): We were only implementing one of the three
26782         cases for the as operator.  We now implement them all.
26783         (Is): Implement the various other cases for Is as well.
26784
26785         * typemanager.cs (CACHE): New define used to control if we want or
26786         not the FindMembers cache.  Seems to have a negative impact on
26787         performance currently
26788
26789         (MemberLookup): Nested types have full acess to
26790         enclosing type members
26791
26792         Remove code that coped with instance/static returns for events, we
26793         now catch this in RealFindMembers.
26794
26795         (RealFindMembers): only perform static lookup if the instance
26796         lookup did not return a type or an event.  
26797
26798 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26799
26800         * assign.cs (CompoundAssign): We pass more semantic information
26801         now to Compound Assignments than we did before: now we have all
26802         the information at hand, and now we resolve the target *before* we
26803         do the expression expansion, which allows the "CacheValue" method
26804         to have the effect we intended (before, a [x] += 1 would generate
26805         two differen ArrayAccess expressions from the ElementAccess,
26806         during the resolution process).
26807
26808         (CompoundAssign.DoResolve): Resolve target and original_source here.
26809
26810 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
26811
26812         * expression.cs (ArrayAccess): dropped debugging information. 
26813
26814         * typemanager.cs: Small bug fix: I was always returning i_members,
26815         instead of one of i_members or s_members (depending on which had
26816         the content).
26817
26818         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
26819         method is invoked before any code generation takes place, and it
26820         is a mechanism to inform that the expression will be invoked more
26821         than once, and that the method should use temporary values to
26822         avoid having side effects
26823
26824         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
26825
26826         * ecore.cs (Expression.CacheTemporaries): Provide empty default
26827         implementation.
26828
26829         * expression.cs (Indirection, ArrayAccess): Add support for
26830         CacheTemporaries in these two bad boys. 
26831
26832         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
26833         ldobj or ldind_ref.  
26834         (StoreFromPtr): Handle stobj as well.
26835
26836         * expression.cs (UnaryMutator): Share more code.
26837
26838         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
26839         down: I was not tracking the Filter function as well, which
26840         was affecting the results of the cache.
26841
26842 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
26843
26844         * attribute.cs: Remove the hack to handle the CharSet property on
26845         StructLayouts. 
26846
26847 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
26848
26849         * attribute.cs (DoResolve): More uglyness, we now only try to
26850         resolve the attribute partially, to extract the CharSet
26851         information (only if we are a StructLayout attribute).  Otherwise 
26852
26853         (GetExtraTypeInfo): Add some code to conditionally kill in the
26854         future this.   I am more and more convinced that the .NET
26855         framework has special code to handle the attribute setting on
26856         certain elements.
26857
26858         * expression.cs (IsParamsMethodApplicable): Revert my previous
26859         foreach change here, it was wrong.
26860
26861 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
26862
26863         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
26864         (pp_expr): do not abort on unknown input, just return.
26865         (eval): abort if there are pending chars.
26866
26867         * attribute.cs (Attribute.Resolve): Positional parameters are
26868         optional.  Deal with that case.
26869
26870         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
26871         the Ansi/Unicode/Auto information for the type.
26872
26873         (TypeContainer.DefineType): instantiate the EmitContext here, as
26874         we will be using it during the type definition (to resolve
26875         attributes) and during the emit phase.
26876
26877         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
26878         to pull type information out of the attributes
26879
26880         (Attribute.Resolve): track the constructor builder, and allow for
26881         multiple invocations (structs and classes will use this).
26882
26883         * ecore.cs (MemberLookupFinal): new version with all the
26884         parameters customizable.
26885
26886         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
26887         constructors.  Return if the result value is null (as the error
26888         would have been flagged already by MemberLookupFinal)
26889
26890         Do not allow instances of abstract classes or interfaces to be
26891         created.
26892
26893         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
26894         We have to compare the assembly property here when dealing with
26895         FamANDAssem and Assembly access modifiers, because we might be
26896         creating an assembly from *modules* (that means that we are not
26897         getting TypeBuilders for types defined in other modules that are
26898         part of this assembly).
26899
26900         (Method.Emit): If the method is marked abstract and has a body,
26901         emit an error. 
26902
26903         (TypeContainer.DefineMembers): If both the defined member and the
26904         parent name match are methods, then do not emit any warnings: let
26905         the Method.Define routine take care of flagging warnings.  But if
26906         there is a mismatch (method overrides something else, or method is
26907         overriwritten by something, then emit warning).
26908
26909         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
26910         set to null, this means `do not check for the return type on the
26911         signature'. 
26912
26913         (Method.Define): set the return type for the method signature to
26914         null, so that we get methods with the same name and parameters and
26915         different return types.  This is used to flag warning 114 (you are
26916         hiding a method, and you probably want to use the new/override
26917         keywords instead).
26918
26919         * typemanager.cs (MemberLookup): Implemented proper access
26920         control, closing a long standing set of bug reports.  The problem
26921         was that the Framework only has two bits: Public and NonPublic,
26922         and NonPublic includes private and protected methods, but we need
26923         to enforce the FamANDAssem, FamOrAssem and Family. 
26924
26925 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
26926
26927         * statement.cs (GotoCase): Return true: Ammounts to giving up
26928         knowledge on whether we return or not, and letting the other case
26929         be responsible for it.
26930
26931 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
26932
26933         * driver.cs: Do not load directories for each file processed, only
26934         do it if there is a pattern.
26935
26936         * ecore.cs: Report readonly assigns here as well, as we might have
26937         been resolved only by MemberAccess.
26938
26939         (SimpleName.SimpleNameResolve): Also be useful for LValue
26940         resolution.   We need this to propagate assign to local readonly variables
26941
26942         * typemanager.cs: Use a ptrhashtable for the criteria, because we
26943         do not want to reuse potential criteria memory.
26944
26945         * class.cs (MyEventBuilder): Set reflected_type;
26946
26947         * ecore.cs (Constantify): Added support for constifying bools.
26948
26949         (RootContext.LookupType): Added a cache for values looked up in
26950         the declaration space.
26951
26952         * typemanager.cs (FindMembers): Now is a front-end to
26953         RealFindMembers, and provides a two-level hashtable-based cache to
26954         the request.  
26955
26956         15% performance improvement: from 22.5 to 19.2 seconds.
26957
26958         * expression.cs (IsParamsMethodApplicable): use foreach.
26959         (Invocation.DoResolve): ditto.
26960         (New.DoResolve): ditto.
26961         (ArrayCreation.DoResolve): ditto.
26962
26963         * ecore.cs (FindMostEncompassingType): use foreach.
26964
26965         * delegate.cs (NewDelegate.DoResolve): Use foreach
26966
26967         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
26968         (RemoveMethods): use foreach.
26969
26970         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
26971         nested foreach statements instead of for, and also break out of
26972         the inner loop once a match is found.
26973
26974         (Invocation.OverloadResolve): Use foreach, simplify the code. 
26975
26976 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
26977
26978         * cfold.cs (BinaryFold): During an enumeration evaluation context,
26979         we actually unwrap the expression to allow for extra information
26980         to be extracted. 
26981
26982         * expression.cs: Use Shr_Un on unsigned operations. 
26983
26984 2002-05-08  Ravi Pratap  <ravi@ximian.com>
26985
26986         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
26987         applicable operators was not being considered correctly. This closes
26988         the bug Miguel reported.
26989
26990 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
26991
26992         * attribute.cs: check that the type derives from System.Attribute
26993         and report the correct error in that case (moved the duplicate code to
26994         its own method, too).
26995
26996 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
26997
26998         * attribute.cs: lookup attribute type name as the spec says: first the
26999         bare attribute name and then name + "Attribute" (nant compiles with
27000         mcs after this fix).
27001
27002 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27003
27004         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27005         Because of the way we parse things, we should try to see if a
27006         UIntConstant can fit in an integer.
27007
27008 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27009
27010         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27011         when we are in an explicit context.
27012
27013         (ConvertReferenceExplicit): When converting from Iface type S to Class
27014         T make sure the rules are implemented as an OR.
27015
27016         * parameter.cs (ParameterType): Make it a property for now although the
27017         purpose really isn't anything immediate.
27018
27019         * expression.cs (Is*Applicable): Do better checking on the parameter type
27020         of a ref/out parameter. The ones from the system assemblies are already 
27021         marked with the correct type so we don't need to do any correction.
27022
27023         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27024         the object type is standard too so include that.
27025
27026 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27027
27028         * ecore.cs (StandardConversionExists): Augment with missing code:
27029         deal with IntConstant, LongConstants and Enumerations.
27030
27031         * assign.cs: Report the error, instead of failing silently
27032
27033         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27034         typecontainer that they are declared, because the
27035         typecontainer/namespace will have the list of using clauses that
27036         need to be applied.
27037
27038         Assembly Attributes were escaping the normal registration
27039         mechanism. 
27040
27041         (EmitCode): Apply attributes within an EmitContext that represents
27042         the container they were declared on.
27043
27044         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27045
27046 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27047
27048         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27049         Revamp completely - make much cleaner as we now operate only
27050         on a set of Types.
27051
27052         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27053         to implement the logic detailed in the spec more correctly.
27054
27055         (UserDefinedConversion): Update accordingly.
27056
27057 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27058
27059         * statement.cs: Return flow analysis information up.
27060
27061         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27062         and the default.
27063
27064         (token): Do not consume an extra character before calling
27065         decimal_digits.
27066
27067 2002-05-06  Piers Haken <piersh@friskit.com>
27068
27069         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27070
27071 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27072
27073         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27074         EmitContext during the instance constructor initializer
27075         resolution, to stop access to instance variables.
27076
27077         This is mandated by the spec, last paragraph of the `constructor
27078         initializers' section. 
27079
27080 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27081
27082         * cs-parser.jay, class.cs (Accessor): new class used to represent
27083         an accessor (get or set).  In the past we used `null' to represent
27084         a missing accessor.  But this is ambiguous because there was no
27085         way to tell in abstract indexers/properties if one of them was
27086         specified.
27087
27088         Now there is a way of addressing that.
27089
27090         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27091         instead of FindMembers.
27092
27093         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27094         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27095
27096         * attribute.cs: Treat indexers and properties as the same in terms
27097         of applying attributes
27098
27099         * ecore.cs (FindMostEncompassedType): Use statically initialized
27100         EmptyExpressions()s like we do elsewhere to avoid creating useless
27101         objects (and we take this out of the tight loop).
27102
27103         (GetConversionOperators): Move the code to extract the actual
27104         operators to a separate routine to clean things up.
27105
27106 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27107
27108         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27109         events are always registered FieldBuilders.
27110
27111         * class.cs (FieldBase): New class shared by Fields 
27112
27113         * delegate.cs: If we are a toplevel delegate, use our full name.
27114         If we are a nested delegate, then only use our tail name.
27115
27116 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27117
27118         * expression.cs (IsApplicable): Ensure that we add the "&" to
27119         ref/out types before comparing it with the type of the argument.
27120
27121         (IsParamsMethodApplicable): Ditto.
27122
27123         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27124         silly me ;-)
27125
27126         * delegate.cs : Handle the case when we have more than one applicable
27127         method. Flag an error only when we finish checking all.
27128
27129 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27130
27131         * expression.cs: Add support for boolean static initializers.
27132
27133 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27134
27135         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27136
27137         * parameter.cs (ComputeParameterTypes,
27138         ComputeAndDefineParameterTypes): Better error handling: now we
27139         clear the `types' cache if we fail during any of the type lookups.
27140         We also return the status code correctly to our caller
27141
27142         * delegate.cs: If we fail to define a delegate, abort the extra
27143         steps. 
27144
27145         * expression.cs (Binary.ResolveOperator): for
27146         operator==(object,object) and operator !=(object, object) we also
27147         have to verify that there is an implicit conversion from one to
27148         the other.
27149
27150         (ArrayAccess.DoResolve): Array Access can operate on
27151         non-variables. 
27152
27153 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27154
27155         * assign.cs (CompoundAssign): A new class used as a "flag" that
27156         the assignment actually is happening as part of a compound
27157         assignment operator.
27158
27159         During compound assignment, a few new rules exist to enable things
27160         like:
27161
27162         byte b |= 1 + 2
27163
27164         From the spec:
27165
27166         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27167         to the type of x) if y is implicitly convertible to the type of x,
27168         and the operator is a builtin operator and the return type of the
27169         operator is explicitly convertible to the type of x. 
27170
27171         * rootcontext.cs: Reset warning level to 2.  4 catches various
27172         "interesting" features in mcs, we must clean this up at some
27173         point, but currently am trying to kill other bugs ;-)
27174
27175         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27176         in container classes as well.  
27177
27178         * expression.cs (Binary.ResolveOperator): Handle string case
27179         before anything else (as operator overloading does emit an error
27180         before doing anything else).
27181
27182         This code could go away when we move to a table driven model, but
27183         i could not come up with a good plan last night.
27184
27185 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27186
27187         * typemanager.cs (CSharpName): reimplementation using regex.
27188         * class.cs: added null check for fields in Emit
27189         * rootcontext.cs: set warninglevel to 4
27190
27191 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27192
27193         * typemanager.cs (CSharpName): reimplemented with Lupus
27194         suggestion.
27195
27196 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27197
27198         * statement.cs (If): correclty implement Resolve, because we were
27199         not catching sem errors in there.  The same process is needed
27200         everywhere else. 
27201         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27202
27203
27204         (Statement.Warning_DeadCodeFound): Factorize code.
27205         (While): Report dead code here too.
27206
27207         (Statement): Added Resolve virtual method to allow
27208         for resolution split from the emit code.
27209
27210 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27211
27212         * statement.cs (EmitBoolExpression): No longer try to resolve the
27213         expression here.    
27214         (MakeBoolean): New utility function that resolve, implicitly
27215         converts to boolean and tags the expression. 
27216
27217
27218         (If, Do): Implement dead code elimination.
27219         (While): Implement loop inversion
27220
27221         (Do, While, For, If): Resolve the expression prior to calling our
27222         code generation.
27223
27224 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27225
27226         * class.cs:
27227           - added method Report28 (warning: program has more than one entry point)
27228           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27229           - modified method Method.Define, the part at the end of the method
27230
27231         * rootcontext.cs: added static public Location EntryPointLocation;
27232           
27233         * ../errors/cs0028.cs : Add test case for the above warning.              
27234
27235         * typemanager.cs:
27236           - modified method CSharpName to allow arrays of primitive type to
27237             be printed nicely (e.g. instead of System.Int32[][] it now prints
27238             int[][])
27239           - added method CSharpSignature: returns the signature of a method
27240             in string format to be used in reporting errors, warnings, etc.
27241
27242         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27243         with String.Empty.
27244
27245 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27246
27247         * delegate.cs (Define): Fix extremely silly bug where I was
27248         setting the type of the 'object' parameter of the BeginInvoke
27249         method to System.IAsyncResult instead of System.Object ;-)
27250
27251 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27252
27253         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27254         here. 
27255
27256         (Constructor.Emit): return if we fail to initialize the
27257         constructor.  Another door closed!  
27258
27259         * expression.cs (New.DoResolve): Improve error message (from -6 to
27260         1501).  Use DeclaredOnly lookup to find the exact constructor.
27261
27262         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27263         loop.  This is useful.
27264
27265         * cs-parser.jay: Adjust the default parameters so that destructors
27266         have the proper signature.
27267
27268 2002-04-26  Martin Baulig  <martin@gnome.org>
27269
27270         * driver.cs (LoadAssembly): If `assembly' contains any characters
27271         which are only valid in path names and not in assembly names
27272         (currently slash, backslash and point), use Assembly.LoadFrom ()
27273         instead of Assembly.Load () on the `assembly' (before iteration
27274         over the link_paths).
27275
27276 2002-04-26  Martin Baulig  <martin@gnome.org>
27277
27278         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27279
27280 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27281
27282         * class.cs (Property): use the new typemanager.MemberLookup
27283
27284         (TypeContainer.MemberLookup): Implement using the
27285         TypeManager.MemberLookup now. 
27286
27287         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27288         and return MemberInfos, so that these can be used without an
27289         EmitContext (what we had before).
27290
27291 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27292
27293         * expression.cs: Fix the case where the argument to params if the
27294         type of the params.  I omitted handling this before.   Fixed
27295
27296 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27297
27298         * driver.cs: Call BootCorlib_PopulateCoreType
27299
27300         * class.cs (Property.CheckBase): Check for properties only, not
27301         for all members. 
27302
27303         * interface.cs: Temporary hack: try/catch around the
27304         CustomAttributeBuilder, because I am getting an exception that I
27305         do not understand.
27306
27307         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27308         types whose definitions are required to be there (attributes are
27309         defined before standard types).
27310
27311         Compute definitions as we boot the various types, as they are used
27312         immediately (value_type class will need object_type, but if we do
27313         not initialize object_type, we will pass a null, which will let
27314         the runtime pick the System.Object from the existing corlib, which
27315         is not what we want).
27316
27317 2002-04-22  Patrik Torstensson <totte@labs2.com>
27318
27319         * cs-tokenizer.cs: fixed a number of trim() issues.
27320
27321 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27322
27323         * expression.cs (Argument.Type): Ensure that we return the correct
27324         type when we have out or ref parameters [in which case we 
27325         append a "&"].
27326
27327 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27328
27329         * class.cs (Property, Indexer): Allow extern modifier in there. 
27330
27331         * typemanager.cs (InitBaseTypes): Initializes object_type and
27332         value_type, since those will be used early on during the bootstrap
27333         process to compile corlib.
27334
27335         (InitCoreTypes): Move code from here to InitBaseTypes.
27336
27337 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27338
27339         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27340         single-dimension arrays as using the ldlen opcode.  
27341
27342         Daniel Lewis discovered this optimization.  
27343
27344         * typemanager.cs: Add signature for System.Array::get_Length
27345
27346 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27347
27348         * statement.cs: report the error when the foreach does not apply to an
27349         array nor a collection.
27350
27351 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27352
27353         * expression.cs: Add implicit conversions to the operator ~.
27354
27355         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27356
27357         * typemanager.cs: Locate the decimal constructor.
27358
27359 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27360
27361         * attribute.cs: use the new property of TypeOf.
27362         * expression.cs: added 'get' property around typearg.
27363
27364         These changes fix a build breaker reported by NickD. Is this the
27365         correct way to fix?  If not, please, revert my changes and make it
27366         work :-).
27367
27368 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27369
27370         * attribute.cs: Add support for typeof in attribute invocations.
27371         I am not sure that this is right though.
27372
27373 2002-04-14  Duncan Mak  <duncan@ximian.com>
27374
27375         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27376         Binary.Operator.Division case.
27377
27378 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27379
27380         * class.cs (DefineType): Ensure that we do a proper check on
27381         attribute types and also register it with the TypeManager.
27382
27383         (TypeContainer.Targets): The default for attribute types is
27384         AttributeTargets.All.
27385
27386         * attribute.cs (ApplyAttributes): Registering the attribute type
27387         is done elsewhere, not when we discover we have a Usage attribute.
27388
27389 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27390
27391         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27392         and get rid of is_delegate parameter.
27393
27394         * everywhere : update.
27395
27396 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27397
27398         * cs-parser.jay (compilation_unit): Revamp completely to use
27399         some new ideas that I got from Rhys' grammar to solve the problems
27400         with assembly level attributes.
27401
27402         (outer_declaration): New grammar production.
27403
27404         (attribute_sections): Add.
27405
27406         (opt_attributes): Base on attribute_sections
27407
27408         (namespace_declaration): Allow opt_attributes to tackle the case
27409         when we have assembly level attributes - we are clever in this
27410         regard now ;-)
27411
27412         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27413         attributes in the non-global context.
27414
27415         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27416         instead of SetGlobalAttributes.
27417
27418         * class.cs, rootcontext.cs : Ensure we define and generate 
27419         attribute types before anything else.
27420
27421         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27422         and flag the new error -20 for the case when the attribute type
27423         does not have valid targets specified. csc does not catch this.
27424
27425         * ../errors/errors.txt : update for error # -20
27426
27427 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27428
27429         * support.cs (InternalParameters.ParameterModifier): Do some null
27430         checking and return sane values.
27431
27432         * class.cs (Method.Define): If we are a PInvoke method, ensure
27433         that we are static and extern. Report error # 601
27434
27435         * ../errors/cs0601.cs : Add test case for the above error.
27436
27437 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27438
27439         * rootcontext.cs (attribute_types): We need to keep type of
27440         all attribute types separately and emit code for them first.
27441
27442         (RegisterAttribute) : Implement.
27443
27444         * class.cs (DefineType): Check if the current Type is a custom
27445         attribute type and register it accordingly.
27446
27447         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27448         adding the first attribute twice and rename to
27449
27450         (SetGlobalAttributes): this.
27451
27452         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27453         lookups.
27454
27455         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27456         if we are processing global arguments. Hmm, I am unsure of this.
27457
27458 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27459
27460         * expression.cs: added static array of strings to avoid calling
27461         Enum.ToString () for Operator in Binary. Significant recover of
27462         performance.
27463
27464 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27465
27466         * class.cs (FindMembers): Allow the Builders of the various
27467         members to be null.  If they are skip them.  This only happens
27468         during the PInvoke declaration.
27469
27470 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27471
27472         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27473         failure, so we do not keep going afterwards.
27474
27475         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27476         wanted to pass `false' as the `is_delegate' argument.  If this is
27477         the case, why not use delegate_type == null to mean `is_delegate =
27478         false' and anything else as is_delegate = true.
27479
27480 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27481
27482         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27483         code for the section, not the beginning of the tests.
27484
27485 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27486
27487         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27488
27489         * expression.cs (Binary): same.  Warn about errors where we have
27490         Enum/Enum in operator + as well.
27491
27492 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27493
27494         * statement.cs:
27495                 - added support for switch(bool)
27496                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27497                 - add TableSwitchEmit() to handle table-based switch statements
27498
27499 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27500
27501         * expression.cs (Invocation.OverloadResolve): Factor out code which
27502         does parameter compatibility checking with arguments so that we can 
27503         re-use the code even from Delegate.VerifyApplicability
27504
27505         (VerifyArgumentsCompat): Move above code here.
27506
27507         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27508         and instead make a call to the above method.
27509
27510 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27511
27512         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27513         We use it to keep track of classes which are attribute types.
27514
27515 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27516
27517         * delegate.cs (Delegate.Define): Correctly define the types in the
27518         presence of fixed and array parameters.
27519
27520         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27521         doing FindMembers.
27522
27523         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27524         include NonPublic after the first iteration.
27525
27526         * class.cs (Indexer.CheckBase): Only check if both parents are
27527         non-null. 
27528
27529         * cs-parser.jay (accessor_body): If empty, set to null.
27530
27531         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27532         same code path here to resolve constants names that we did have in
27533         MemberAccess.DoResolve.  There is too much code duplicated here.
27534
27535 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27536
27537         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27538
27539         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27540         to MakeUnionSet.
27541
27542         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27543         tokens, numbers and strings.
27544
27545         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27546         parenthesis.
27547
27548         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27549         asyncronous parameters and the regular parameters.  
27550
27551         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27552         specify the target directory.
27553
27554         * expression.cs: (This.DoResolve): Simplify
27555         (As.Emit): Optimize, do not generate IsInst if the expression is
27556         always of the given type.
27557
27558         (Is.DoResolve): Bug fix, we were reporting both always/never for
27559         the is expression.
27560
27561         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27562         creating too many unnecessary arrays.
27563
27564 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27565
27566         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27567         fields instead of rolling our own initializer.   Takes care of all
27568         implicit conversions, and drops unnecessary static checks/argument.
27569
27570 2002-03-31  Dick Porter  <dick@ximian.com>
27571
27572         * driver.cs: use the GetDirectories() return values properly, and
27573         use "/" as path separator.
27574
27575 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27576
27577         * expression.cs (Unary): Optimize - - expr into expr.
27578         (Binary): Optimize a + (-b) into a -b.
27579
27580         * codegen.cs (CodeGen): Made all methods static.
27581
27582 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27583
27584         * rootcontext.cs: 
27585
27586         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27587         TypeBuilder property.
27588
27589         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27590         instead. 
27591
27592         * tree.cs: Removed the various RecordXXXX, and replaced with a
27593         single RecordDecl.  Removed all the accessor methods, and just
27594         left a single access point Type 
27595
27596         * enum.cs: Rename DefineEnum to DefineType.
27597
27598         * decl.cs: New abstract method `DefineType' used to unify the
27599         Defines for Enumerations, Interfaces, TypeContainers and
27600         Delegates.
27601
27602         (FindType): Moved LookupInterfaceOrClass here.  Moved the
27603         LookupBaseClasses method that used to live in class.cs and
27604         interface.cs here, and renamed to FindType.
27605
27606         * delegate.cs: Implement DefineType.  Take advantage of the
27607         refactored pattern for locating the parent builder without taking
27608         the parent_builder argument (which we know does not work if we are
27609         nested, and triggering a toplevel definition).
27610
27611 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27612
27613         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
27614         accessibility of a member has changed during override and report
27615         an error if so.
27616
27617         * class.cs (Method.Define, Property.Define): Only complain on
27618         overrides if the method is private, any other accessibility is
27619         fine (and since we just checked the permission is the same, we are
27620         good to go).
27621
27622         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
27623         and elif are processed always.  The other pre-processing
27624         directives are only processed if we are "taking" the path
27625
27626 2002-03-29  Martin Baulig  <martin@gnome.org>
27627
27628         * class.cs (Method.Emit): Only emit symbolic debugging info if the
27629         current location is not Null.
27630
27631         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
27632         a separate method so we can profile it.
27633
27634         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
27635         `span.Seconds' are just seconds, but no minutes or hours.
27636         (MainDriver): Profile the CodeGen.SaveSymbols calls.
27637
27638 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27639
27640         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
27641         Remove the gratuitous set of Final:
27642
27643                                 // If an interface implementation, then we can set Final.
27644                                 if (((flags & MethodAttributes.Abstract) == 0) &&
27645                                     implementing.DeclaringType.IsInterface)
27646                                         flags |= MethodAttributes.Final;
27647
27648         I do not know what I was smoking when I used that.
27649
27650
27651         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
27652         step into fixing the name resolution issues for delegates and
27653         unifying the toplevel name resolution.
27654
27655 2002-03-28  Martin Baulig  <martin@gnome.org>
27656
27657         * class.cs (Method.Emit): If we have a symbol writer, call its
27658         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
27659         tell it about the current method.
27660
27661         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
27662         writer that we're going to emit the first byte of IL code for a new
27663         statement (a new source line).
27664         (EmitContext.EmitTopBlock): If we have a symbol writer, call
27665         EmitContext.Mark() before emitting any code.
27666
27667         * location.cs (SymbolDocument): Return null when we're Null.
27668
27669         * statement.cs (Statement): Moved the `Location loc' variable here.
27670         (Statement.EmitBoolExpression): If we have a symbol writer, call
27671         ec.Mark() before emitting any code to tell it that we're at the
27672         beginning of a new statement.
27673         (StatementExpression): Added `Location' argument to the constructor.
27674         (Block): Added public readonly variable `StartLocation' and public
27675         variable `EndLocation'.  The latter is to be set using SetEndLocation().
27676         (Block): Added constructor which takes a start and end location.
27677         (Block.SetEndLocation): New method. This sets the end location.
27678         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
27679         local variables we create.
27680         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
27681         each statement and do also mark the begin and end of the block.
27682
27683         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
27684         tell it the current lexer.Location, use Location.Null for the end of the
27685         block.
27686         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
27687         current block, set its end location using SetEndLocation().
27688         (statement_expression): StatementExpression constructor now takes the
27689         lexer.Location as additional argument.
27690         (for_statement, declare_local_variables): Likewise.
27691         (declare_local_variables): When creating a new implicit block, use the
27692         new Block constructor and pass it the lexer.Location.
27693
27694 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27695
27696         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
27697         members also on the parent interfaces recursively.
27698
27699 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
27700
27701         * report.cs: Use new formats, since Gonzalo finished the missing
27702         bits. 
27703
27704         * expression.cs (Binary.ResolveOperator): added missing operator|
27705         operator& and operator^ for bool/bool.
27706
27707         * cs-parser.jay: CheckDef now takes a Location argument that is
27708         used to report errors more precisly (instead of reporting the end
27709         of a definition, we try to track something which is a lot closer
27710         to the source of the problem).
27711
27712         * cs-tokenizer.cs: Track global token use, so we can properly flag
27713         the use of #define/#undef after the first token has been seen.
27714
27715         Also, rename the reportXXXX to Error_DescriptiveName
27716
27717         * decl.cs (DeclSpace.IsTopLevel): Move property here from
27718         TypeContainer, so that Enum and Interface can use this too.
27719
27720         * class.cs (TypeContainer.LookupInterfaceOrClass,
27721         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
27722         `builder' argument.  Typically this was used to pass the parent
27723         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
27724         the definition).  
27725
27726         The problem is that a nested class could trigger the definition of
27727         a toplevel class, and the builder would be obviously wrong in that
27728         case. 
27729
27730         So we drop this argument, and we compute dynamically the
27731         TypeBuilder/ModuleBuilder (the correct information was available
27732         to us anyways from DeclSpace.Parent)
27733
27734         * interface.cs (Interface.DefineInterface): Drop builder
27735         parameter cleanup like class.cs
27736
27737         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
27738         like class.cs
27739
27740         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
27741         values. 
27742
27743         (Try.Emit): Propagate the returns value from the statement.
27744
27745         (Return.Emit): Even if we are leavning 
27746
27747         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
27748
27749         * modifiers.cs: Fix the computation of MethodAttributes flags.
27750
27751 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
27752
27753         * driver.cs: allow compilation of files that start with '/'.
27754         Add a default case when checking the argument of --target.
27755
27756 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
27757
27758         * interface.cs: Implement the same search algorithm for types in
27759         the interface code.
27760
27761         * delegate.cs: Do not allow multiple definition.
27762
27763         * Recovered ChangeLog that got accidentally amputated
27764
27765         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
27766
27767         * rootcontext.cs: Load manually enum to allow core classes to
27768         contain enumerations.
27769
27770         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
27771         Update to new static methods in TypeManager.
27772
27773         * typemanager.cs (GetMethod, GetConstructor): Use our
27774         implementation of FindMembers to find the members, since during
27775         corlib compilation, the types are TypeBuilders and GetMethod and
27776         GetConstructor do not work.
27777
27778         Make all methods in TypeManager static.
27779
27780         (InitCodeHelpers): Split the functionality from
27781         the InitCodeTypes function.
27782
27783         * driver.cs: Call InitCodeHelpers after we have populated the
27784         types. 
27785
27786         * cs-parser.jay (delegate_declaration): we did not used to compute
27787         the delegate name correctly for void delegates.
27788
27789 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
27790
27791         * rootcontext.cs (RootContext): Init the interface_resolve_order
27792         and type_container_resolve_order always.
27793
27794         (ResolveCore, BootstrapCorlib_ResolveClass,
27795         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
27796         compiler when compiling with --nostdlib
27797
27798         * class.cs (TypeContainer.DefineType): Check that our parent is
27799         not null.  This test is most important when we are bootstraping
27800         the core types.
27801
27802         * codegen.cs: Split out the symbol writing code.
27803
27804 2002-03-25  Martin Baulig  <martin@gnome.org>
27805
27806         * driver.cs (-g): Made -g an alias for --debug.
27807
27808 2002-03-24  Martin Baulig  <martin@gnome.org>
27809
27810         * codegen.cs (SymbolWriter): New public variable. Returns the
27811         current symbol writer.
27812         (CodeGen): Added `bool want_debugging_support' argument to the
27813          constructor. If true, tell the ModuleBuild that we want debugging
27814         support and ask it for the ISymbolWriter.
27815         (Save): If we have a symbol writer, call it's Close() method after
27816         saving the assembly.
27817
27818         * driver.c (--debug): New command line argument to create a
27819         debugger information file.
27820
27821         * location.cs (SymbolDocument): New public property. Returns an
27822         ISymbolDocumentWriter object for the current source file or null
27823         if we don't have a symbol writer.
27824
27825 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
27826
27827         * driver.cs (LoadAssembly): Correctly return when all the paths
27828         have been tried and not before.
27829
27830         * statement.cs (Switch.Emit): return the actual coverage for this
27831         statement (returns/not-returns)
27832
27833         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
27834         switch of the statement if we are the last switch section.  That
27835         kills two problems: try/catch problems (we used to emit an empty
27836         nop at the end) and switch statements where all branches would
27837         return. 
27838
27839 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
27840
27841         * driver.cs: Add default assemblies (the equivalent to the
27842         Microsoft CSC.RSP file)
27843
27844         * cs-tokenizer.cs: When updating `cols and setting it to zero,
27845         also update tokens_seen and set it to false.
27846
27847         * driver.cs: Implement --recurse for Mike.
27848
27849         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
27850         correctly splitting out the paths.
27851
27852 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
27853
27854         * interface.cs (Interface.PopulateProperty): Instead of using
27855         `parent' as the declaration space for the set parameters, use
27856         `this' 
27857
27858         * support.cs (InternalParameters): InternalParameters constructor
27859         takes a DeclSpace instead of a TypeContainer.
27860
27861         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
27862         types are being initialized, load the address of it before calling
27863         the function.  
27864
27865         (New): Provide a mechanism to disable the generation of local
27866         value type temporaries when the caller will be providing us with
27867         an address to store it.
27868
27869         (ArrayCreation.EmitDynamicInitializers): Use it.
27870
27871 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
27872
27873         * expression.cs (Invocation.EmitArguments): Only probe for array
27874         property if there is more than one argument.  Sorry about that.
27875
27876         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
27877         empty param arrays.
27878
27879         * class.cs (Method.LabelParameters): Fix incorrect code path that
27880         prevented the `ParamArrayAttribute' from being applied to the
27881         params attribute.
27882
27883 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
27884
27885         * support.cs (ReflectionParameters): Correctly compute whether the
27886         last argument is a params array.  Fixes the problem with
27887         string.Split ('a')
27888
27889         * typemanager.cs: Make the assemblies array always be non-null
27890         (empty, but non-null)
27891
27892         * tree.cs (RecordDecl): New function that abstracts the recording
27893         of names.  This reports error 101, and provides a pointer to the
27894         previous declaration.  Fixes a crash in the compiler.
27895
27896         * cs-parser.jay (constructor_declaration): Update to new grammar,
27897         and provide a constructor_body that can be empty.
27898
27899 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
27900
27901         * driver.cs: Add support for --resources.
27902
27903         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
27904         Make all types for the various array helper methods be integer.
27905
27906         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
27907         CheckState to ConvCast.
27908
27909         (ConvCast): Now it takes a `checked' state argument, to avoid
27910         depending on the emit context for the conversion, and just using
27911         the resolve time setting.
27912
27913         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
27914         instead of Invocation.EmitArguments.  We do not emit the original
27915         arguments, instead we emit those which have been converted to
27916         unsigned int expressions.
27917
27918         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
27919
27920         * codegen.cs: ditto.
27921
27922         * expression.cs (LocalVariableReference): Drop the use of the
27923         Store function that depended on the variable index.
27924
27925         * statement.cs (VariableInfo): Drop the `Idx' property from this
27926         class, as this is not taking into account the indexes for
27927         temporaries tat we generate during the execution, getting the
27928         indexes wrong.
27929
27930         * class.cs: First emit class initializers, then call the parent
27931         constructor. 
27932
27933         * expression.cs (Binary): Fix opcode emision.
27934         (UnaryMutator.EmitCode): Support checked code generation
27935
27936         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
27937         matches for events for both the Static and Instance scans,
27938         pointing to the same element.   Fix that.
27939
27940 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
27941
27942         * rootcontext.cs (ResolveTree): Always set the
27943         interface_resolve_order, because nested interfaces will be calling
27944         into us.
27945
27946         * class.cs (GetInterfaceOrClass): Track the same resolution
27947         process used by TypeManager.LookupType.  This fixes the nested
27948         type lookups in class declarations (separate path from
27949         LookupType). 
27950
27951         (TypeContainer.DefineType): Also define nested interfaces.
27952         (TypeContainer.RegisterOrder): New public function used to
27953         register the order in which child interfaces need to be closed.
27954
27955         Nested interfaces need to be closed after their parents have been
27956         created. 
27957
27958         * interface.cs (InterfaceAttr): Put all the logic for computing
27959         the interface attribute here. 
27960
27961         (DefineInterface): Register our interface order with the
27962         RootContext or with the TypeContainer depending on the case.
27963
27964 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
27965
27966         * cs-parser.jay: rework foreach statement to work with the new
27967         changes to the policy on SimpleNames.
27968
27969         * report.cs: support Stacktrace on warnings as well.
27970
27971         * makefile: drop --unsafe and /unsafe from the compile.
27972
27973 2002-03-13  Ravi Pratap  <ravi@ximian.com>
27974
27975         * ecore.cs (StandardConversionExists): Modify to take an Expression
27976         as the first parameter. Ensure we do null -> reference type conversion
27977         checking.
27978
27979         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
27980         temporary Expression objects.
27981
27982 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
27983
27984         * interface.cs: workaround bug in method overloading resolution
27985         (there is already a bugzilla bug for it).
27986
27987 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
27988
27989         We could also solve this problem by having a separate path for
27990         performing type lookups, instead of DoResolve, we could have a
27991         ResolveType entry point, and only participating pieces of the
27992         production (simplename, deref, array) would implement this. 
27993
27994         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
27995         signal SimpleName to only resolve type names and not attempt to
27996         resolve anything else.
27997
27998         * expression.cs (Cast): Set the flag.
27999
28000         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28001
28002         * class.cs: Only report 108 if there is no `new' modifier.
28003
28004         * cs-parser.jay: rework foreach statement to work with the new
28005         changes to the policy on SimpleNames.
28006
28007         * report.cs: support Stacktrace on warnings as well.
28008
28009         * makefile: drop --unsafe and /unsafe from the compile.
28010
28011 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28012
28013         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28014         lookups here, instead of doing that at parse time.  This means
28015         that our grammar will not introduce `LocalVariableReferences' as
28016         expressions at this point.  That solves the problem of code like
28017         this:
28018
28019         class X {
28020            static void Main ()
28021            { int X = 1;
28022             { X x = null }}}
28023
28024         This is only half the fix.  The full fix requires parameters to
28025         also be handled in this way.
28026
28027         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28028         makes the use more obvious of the DeclSpace.  The
28029         ec.TypeContainer.TypeBuilder is now only used to pull the
28030         TypeBuilder for it.
28031
28032         My theory is that I can get rid of the TypeBuilder completely from
28033         the EmitContext, and have typecasts where it is used (from
28034         DeclSpace to where it matters).  
28035
28036         The only pending problem is that the code that implements Aliases
28037         is on TypeContainer, and probably should go in DeclSpace.
28038
28039         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28040         lookups here, instead of doing that at parse time.  This means
28041         that our grammar will not introduce `LocalVariableReferences' as
28042         expressions at this point.  That solves the problem of code like
28043         this:
28044
28045         class X {
28046            static void Main ()
28047            { int X = 1;
28048             { X x = null }}}
28049
28050         This is only half the fix.  The full fix requires parameters to
28051         also be handled in this way.
28052
28053         * class.cs (Property.DefineMethod): When implementing an interface
28054         method, set newslot, when implementing an abstract method, do not
28055         set the flag (before we tried never setting it, or always setting
28056         it, which is the difference).
28057         (Indexer.DefineMethod): same.
28058         (Method.DefineMethod): same.
28059
28060         * ecore.cs: Only set the status used flag if we get back a Field.
28061
28062         * attribute.cs: Temporary hack, so Paolo can keep working.
28063
28064 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28065
28066         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28067         the unmanaged type in the case we have a MarshalAs attribute.
28068
28069         (Resolve): Handle the case when we are parsing the special MarshalAs
28070         attribute [we need to store the unmanaged type to use later]
28071
28072         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28073         MarshalAs Attribute.
28074
28075         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28076         on parameters and accordingly set the marshalling info.
28077
28078 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28079
28080         * class.cs: Optimizing slightly by removing redundant code after
28081         we switched to the `NoTypes' return value.
28082         (Property.DefineMethod): use NoTypes here too.
28083
28084         This fixes the bug I introduced in my last batch of changes.
28085
28086 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28087
28088         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28089
28090         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28091         Enums since those are types too. 
28092
28093         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28094
28095         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28096         thanks to a call during the lookup process.
28097
28098 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28099
28100         * statement.cs (Foreach): Lots of work to accomodate a particular
28101         kind of foreach statement that I had not kept in mind.  It is
28102         possible to have foreachs on classes that provide a GetEnumerator
28103         method that return objects that implement the "pattern" for using
28104         a foreach, there is no need to support GetEnumerator
28105         specifically. 
28106
28107         This is needed to compile nant.
28108
28109         * decl.cs: Only report 114 if the member is not `Finalize' and if
28110         the warning level is at least 2.
28111
28112         * class.cs: Moved the compare function from Method to
28113         MethodSignature. 
28114
28115         (MethodSignature.InheritableMemberSignatureCompare): Add new
28116         filter function that is used to extract inheritable methods from a
28117         class. 
28118
28119         (Method.Define): Use the new `inheritable_method_signature_filter'
28120         delegate
28121
28122         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28123         command. 
28124
28125 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28126
28127         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28128
28129         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28130
28131         * expression.cs: Pass location information to
28132         ConvertImplicitStandard. 
28133
28134         * class.cs: Added debugging code to track return values from
28135         interfaces. 
28136
28137 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28138
28139         * expression.cs (Is.DoResolve): If either side of the `is' is an
28140         interface, do not flag the warning.
28141
28142         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28143         for interfaces
28144
28145         * report.cs: Allow for --fatal to be used with --probe.
28146
28147         * typemanager.cs (NoTypes): Move the definition for the empty Type
28148         array here. 
28149
28150         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28151         properties. 
28152         (TypeContainer.DefineProxy): New function used to proxy to parent
28153         implementations when implementing interfaces.
28154         (TypeContainer.ParentImplements): used to lookup if our parent
28155         implements a public function that is required by an interface.
28156         (TypeContainer.VerifyPendingMethods): Hook this up.
28157
28158         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28159         `modules' and `assemblies' arraylists into arrays.  We only grow
28160         these are the very early start up of the program, so this improves
28161         the speedof LookupType (nicely measured).
28162
28163         * expression.cs (MakeByteBlob): Replaced unsafe code with
28164         BitConverter, as suggested by Paolo.
28165
28166         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28167         folding of string concatenation, but if either side is a string,
28168         and the other is not, then return null, and let the runtime use
28169         the concatenation on the string plus the object (using
28170         `Object.ToString'). 
28171
28172 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28173
28174         Constant Folding has been implemented now.
28175
28176         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28177         the error instead on types that are not supported in one's
28178         complement. 
28179
28180         * constant.cs (Constant and all children): New set of functions to
28181         perform implict and explicit conversions.
28182
28183         * ecore.cs (EnumConstant): Implement the new functions to perform
28184         conversion by proxying to the child expression.
28185
28186         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28187         own separate setting that can not be turned off from the command
28188         line using --unchecked or --checked and is only controlled using
28189         the checked/unchecked statements and expressions.  This setting is
28190         used by the constant folder to flag errors.
28191
28192         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28193         ConstantCheckState as well.   
28194
28195         During Resolve, they also have to flag the state, because the
28196         constant folder runs completely in the Resolve phase.
28197
28198         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28199         well.
28200
28201 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28202
28203         * cfold.cs: New file, this file contains the constant folder.
28204
28205         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28206         argument to track whether we are using the resulting address to
28207         load or store a value and provide better error messages. 
28208
28209         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28210         new AddressOf arguments.
28211
28212         * statement.cs (Foreach.EmitCollectionForeach): Update
28213
28214         * expression.cs (Argument.Emit): Call AddressOf with proper
28215         arguments to track usage.
28216
28217         (New.DoEmit): Call AddressOf with new arguments.
28218
28219         (Unary.Emit): Adjust AddressOf call.
28220
28221 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28222
28223         * cs-parser.jay (member_access): Change the case for pre-defined types
28224         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28225         this suggestion.
28226
28227         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28228         a method body.
28229
28230         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28231         essentially like methods and apply attributes like MethodImplOptions to them too.
28232
28233         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28234         not being null.
28235
28236         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28237         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28238         is the DeclSpace.
28239
28240         * Update code everywhere accordingly.
28241
28242         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28243
28244         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28245
28246 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28247
28248         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28249         try performing lookups against those instead of jumping straight into using
28250         the 'using' clauses.
28251
28252         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28253
28254         (LookupType): Perform lookups in implicit parents too.
28255
28256         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28257         sequence as RootContext.LookupType. 
28258
28259         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28260         the various cases of namespace lookups into this method.
28261
28262 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28263
28264         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28265         in positional arguments)
28266
28267         * class.cs (Operator): Update the AllowedModifiers to contain
28268         extern. 
28269
28270         * cs-parser.jay: Update operator declaration to allow for the
28271         operator body to be empty.
28272
28273         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28274         values. 
28275
28276 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28277
28278         * class.cs (Method.Emit): Label parameters.
28279
28280         * driver.cs: Return 1 or 0 as the program exit code.
28281
28282 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28283
28284         * expression.cs: Special case the `null' object when trying to
28285         auto-compute the type, as anything can be explicitly converted to
28286         that. 
28287
28288         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28289         spotting this Paolo.
28290
28291         (Expression.ImplicitNumericConversion): Perform comparissions of
28292         the type using the underlying type in the case of an enumeration
28293         rather than using the enumeration type for the compare.
28294
28295         Cope with the underlying == type case, which is not possible to
28296         catch before. 
28297
28298         (Expression.ConvertNumericExplicit): Perform comparissions of
28299         the type using the underlying type in the case of an enumeration
28300         rather than using the enumeration type for the compare.
28301
28302         * driver.cs: If the user does not supply an extension, assume .exe
28303
28304         * cs-parser.jay (if_statement): Rewrote so that we can track the
28305         location for the if statement.
28306
28307         * expression.cs (Binary.ConstantFold): Only concat strings when
28308         the operation is "+", not everything ;-)
28309
28310         * statement.cs (Statement.EmitBoolExpression): Take a location
28311         argument. 
28312         (If, While, Do): Track location.
28313
28314         * expression.cs (Binary.ResolveOperator): In the object + string
28315         case, I was missing a call to ConvertImplicit
28316
28317 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28318
28319         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28320         Location arguments. Ensure we use RootContext.LookupType to do our work
28321         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28322
28323         * interface.cs (PopulateMethod): Handle the type of the parameter being
28324         null gracefully.
28325
28326         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28327         have a params method with no fixed arguments and a call is made with no
28328         arguments.
28329
28330 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28331
28332         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28333         the verbatim-string-literal
28334
28335         * support.cs (InternalParameters.ParameterModifier): handle null
28336         fixed parameters.
28337         (InternalParameters.ParameterType): ditto.
28338
28339         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28340         duplicating the name of the variable parameter.
28341         (GetParameterByName): Fix bug where we were not looking up array
28342         paramters if they were the only present (thanks Paolo!).
28343         (GetParameterInfo): We only have an empty set of types if both
28344         fixed and array are set to null.
28345         (GetParameterInfo-idx): Handle FixedParameter == null
28346
28347         * cs-parser.jay: Handle the case where there is no catch
28348         statements (missing null test).
28349
28350 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28351
28352         * driver.cs (MainDriver): Be conservative on our command line
28353         handling.
28354
28355         Catch DirectoryNotFoundException when calling GetFiles.
28356
28357         (SplitPathAndPattern): Used to split the input specification into
28358         a path and a pattern that we can feed to Directory.GetFiles.
28359
28360 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28361
28362         * statement.cs (Fixed): Implement the last case of the Fixed
28363         statement (string handling).
28364
28365         * expression.cs (StringPtr): New class used to return a char * to
28366         a string;  Used by the Fixed statement.
28367
28368         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28369
28370         * expression.cs (Binary.ResolveOperator): Remove redundant
28371         MemberLookup pn parent type.
28372         Optimize union call, we do not need a union if the types are the same.
28373         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28374         type.
28375
28376         Specialize the use of MemberLookup everywhere, instead of using
28377         the default settings. 
28378
28379         (StackAlloc): Implement stackalloc keyword.
28380
28381         * cs-parser.jay: Add rule to parse stackalloc.
28382
28383         * driver.cs: Handle /h, /help, /?
28384
28385         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28386         before we supported unsafe code.
28387
28388         * makefile: add --unsafe to the self compilation of mcs.
28389
28390 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28391
28392         * expression.cs (PointerArithmetic): New class that is used to
28393         perform pointer arithmetic.
28394         (Binary.Resolve): Handle pointer arithmetic
28395         Handle pointer comparission.
28396         (ArrayPtr): Utility expression class that is used to take the
28397         address of an array.
28398
28399         (ElementAccess): Implement array access for pointers
28400
28401         * statement.cs (Fixed): Implement fixed statement for arrays, we
28402         are missing one more case before we are done.
28403
28404         * expression.cs (Indirection): Implement EmitAssign and set the
28405         ExprClass to Variable.  This allows pointer dereferences to be
28406         treated as variables, and to have values assigned to them.
28407
28408         * ecore.cs (Expression.StoreFromPtr): New utility function to
28409         store values dereferencing.
28410
28411 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28412
28413         * expression.cs (Binary.ResolveOperator): Ensure that we are
28414         not trying to operate on a void type - this fixes the reported
28415         bug.
28416
28417         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28418         the parent implementation is sealed.
28419
28420         * ../errors/cs0239.cs : Add.
28421
28422         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28423
28424         * typemanager.cs (unverifiable_code_type): Corresponds to 
28425         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28426         which have unsafe code in them.
28427
28428         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28429         unsafe context.
28430
28431 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28432
28433         * cs-tokenizer.cs: Add support for @"litreal strings"
28434
28435         Make tokenizer accept pre-processor directives
28436         on any column (remove the old C-like limitation). 
28437
28438         * rootcontext.cs (EmitCode): Emit any global attributes.
28439         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28440
28441         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28442
28443         * cs-parser.jay: Add support for global attributes.  
28444
28445 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28446
28447         * expression.cs (Indirection): New helper class.  Unary will
28448         create Indirection classes to be able to implement the
28449         IMemoryLocation interface on it.
28450
28451 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28452
28453         * cs-parser.jay (fixed_statement): reference the right statement.
28454
28455         * statement.cs (Fixed.Emit): Finish implementing the fixed
28456         statement for the &x case.
28457
28458 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28459
28460         * class.cs (Property.Define, Method.Define): Remove newslot when
28461         `implementing'.  
28462
28463         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28464         wrong.  NewSlot should only be used if the `new' keyword is present.
28465
28466         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28467         locating our system dir.  Sorry about this.
28468
28469 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28470
28471         * driver.cs (GetSystemDir): Compute correctly the location of our
28472         system assemblies.  I was using the compiler directory instead of
28473         the library directory.
28474
28475 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28476
28477         * expression.cs (BetterFunction): Put back in what Miguel commented out
28478         since it is the correct fix. The problem is elsewhere ;-)
28479
28480         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28481         parameters of the parms method are themselves compatible or not !
28482
28483         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28484         to check that a class implements an interface before saying that an implicit
28485         conversion was allowed. Use ImplementsInterface to do the checking.
28486
28487 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28488
28489         * class.cs (Method.Define): Track whether we are an explicit
28490         implementation or not.  And only call DefineMethodOverride if we
28491         are an explicit implementation.
28492
28493         (Property.DefineMethod): Ditto.
28494
28495 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28496
28497         * expression.cs (BetterFunction): Catch hideous bug which was
28498          preventing us from detecting ambiguous calls due to implicit casts i.e
28499         cs0121.
28500
28501 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28502
28503         * support.cs (Pair): Remove un-needed method.  I figured why I was
28504         getting the error in cs-parser.jay, the variable in a foreach loop
28505         is readonly, and the compiler does not really treat this as a variable.
28506
28507         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28508         instead of EQUALS in grammar.  
28509
28510         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28511
28512         * expression.cs (Unary.DoResolve): Check whether the argument is
28513         managed or not.
28514
28515 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28516
28517         * support.cs: Api for Pair to set a value.  Despite the fact that
28518         the variables are public the MS C# compiler refuses to compile
28519         code that accesses the field if the variable is part of a foreach
28520         statement. 
28521
28522         * statement.cs (Fixed): Begin implementation of the fixed
28523         statement.
28524
28525         (Block.AddVariable): Return the VariableInfo on success and null
28526         on failure instead of true/false. 
28527
28528         * cs-parser.jay (foreach): Catch errors on variables already
28529         defined (we were ignoring this value before) and properly unwind
28530         the block hierarchy
28531
28532         (fixed_statement): grammar for the fixed statement.
28533
28534 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28535
28536         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28537         pointer types to be incretemented.
28538
28539         (SizeOf): Implement.
28540
28541         * cs-parser.jay (pointer_member_access): Implement
28542         expr->IDENTIFIER production.
28543
28544         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28545         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28546         on safe contexts.
28547
28548         (Unary): Implement indirection.
28549
28550         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28551         use in non-unsafe context).
28552
28553         (SimpleName.DoResolve): Check for pointers in field access on safe
28554         contexts. 
28555
28556         (Expression.LoadFromPtr): Factor the load-indirect code in this
28557         function.  This was duplicated in UnboxCast and ParameterReference
28558
28559 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28560
28561         * expression.cs (ComposedCast): report an error if a pointer cast
28562         is used in a safe region.
28563
28564         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28565         pointer type casts in unsafe context.
28566
28567         * codegen.cs (EmitContext): Set up IsUnsafe.
28568
28569         * cs-parser.jay (non_expression_type): Add productions for pointer
28570         casts. 
28571
28572         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28573         code.  We should not use force into static mode if the method is
28574         not virtual.  Fixes bug in MIS
28575
28576         * statement.cs (Do.Emit, While.Emit, For.Emit,
28577         Statement.EmitBoolExpression): Add support to Do and While to
28578         propagate infinite loop as `I do return' semantics.
28579
28580         Improve the For case to also test for boolean constants.
28581
28582         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28583         to the list of attributes we can add.
28584
28585         Remove `EmitContext' argument.
28586
28587         * class.cs (Method.Define): Apply parameter attributes.
28588         (Constructor.Define): Apply parameter attributes.
28589         (MethodCore.LabelParameters): Move here the core of labeling
28590         parameters. 
28591
28592         * support.cs (ReflectionParameters.ParameterModifier,
28593         InternalParameters.ParameterModifier): Use IsByRef on the type and
28594         only return the OUT bit for these parameters instead of in/out/ref
28595         flags.
28596
28597         This is because I miss-understood things.  The ParameterInfo.IsIn
28598         and IsOut represent whether the parameter has the [In] and [Out]
28599         attributes set.  
28600
28601 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
28602
28603         * ecore.cs (FieldExpr.Emit): Release temporaries.
28604
28605         * assign.cs (LocalTemporary.Release): new function.
28606
28607         * codegen.cs (EmitContext.GetTemporaryStorage,
28608         EmitContext.FreeTemporaryStorage): Rework the way we deal with
28609         temporary storage.  Now we can "put back" localbuilders when we
28610         are done with them
28611
28612 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
28613
28614         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
28615         need to make a copy of the variable to generate verifiable code.
28616
28617 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
28618
28619         * driver.cs: Compute dynamically the system directory.
28620
28621         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
28622         Slower, but more generally useful.  Used by the abstract
28623         registering implementation. 
28624
28625         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
28626         the rules for the special rule on Type/instances.  First check if
28627         we have the same name, and if so, try that special static path
28628         rather than the instance path.
28629
28630 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
28631
28632         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
28633         for, while and if.
28634
28635         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
28636         Enum, ValueType, Delegate or Array for non-corlib compiles.
28637
28638         * cs-tokenizer.cs: Catch long identifiers (645)
28639
28640         * typemanager.cs (IndexerPropetyName): Ravi never tested this
28641         piece of code.
28642
28643         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
28644         fix, we were returning too early, so we were not registering
28645         pending methods from abstract classes.
28646
28647         Do not register pending methods if the class is abstract.
28648
28649         * expression.cs (Conditional.DoResolve): Report circular implicit
28650         conversions when we neecd to compute it for conditional
28651         expressions. 
28652
28653         (Is.DoResolve): If the expression is always of the provided type,
28654         flag warning 183.  If the expression can not ever be of the
28655         provided type flag warning 184.
28656
28657         * class.cs: Catch 169 as well.
28658
28659         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
28660         read. 
28661
28662 2002-01-18  Nick Drochak  <ndrochak@gol.com>
28663
28664         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
28665
28666 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
28667
28668         * interface.cs: (PopulateMethod): Check for pointers being defined
28669         only if the unsafe context is active.
28670         (PopulateProperty): ditto.
28671         (PopulateIndexer): ditto.
28672
28673         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
28674         specified.  If pointers are present, make sure that they are
28675         present in an unsafe context.
28676         (Constructor, Constructor.Define): ditto.
28677         (Field, Field.Define): ditto.
28678         (Property, Property.Define): ditto.
28679         (Event, Event.Define): ditto.
28680
28681         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
28682         hashtable if there are classes or structs defined.
28683
28684         * expression.cs (LocalVariableReference.DoResolve): Simplify this
28685         code, as the constant resolution moved.
28686
28687         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
28688         the metadata, so we can flag error 133. 
28689
28690         * decl.cs (MemberCore.UnsafeOK): New function to test that a
28691         pointer is being declared in an unsafe context.
28692
28693 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
28694
28695         * modifiers.cs (Modifiers.Check): Require a Location argument.
28696         Report error 227 for Unsafe use.
28697
28698         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
28699
28700         * statement.cs (For.Emit): If the test is null, then report that
28701         we do `return', as we wont reach anything afterwards.
28702
28703         (Switch.SwitchGoverningType): Track the expression that matched
28704         the conversion.
28705
28706         * driver.cs: Allow negative numbers as an error code to flag.
28707
28708         * cs-parser.jay: Handle 1551.
28709
28710         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
28711
28712 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28713
28714         * cs-parser.jay: Report 1518 (type declaration can only contain
28715         class, struct, interface, enum or delegate)
28716
28717         (switch_label): Report 1523 (keywords `case' or `default' must
28718         preced code)
28719
28720         (opt_switch_sections): Report 1522 (empty switch)
28721
28722         * driver.cs: Report 1515 (response file specified multiple times)
28723         Report 1516 (Source file specified multiple times).
28724
28725         * expression.cs (Argument.Resolve): Signal 1510
28726
28727         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
28728         access not allowed in static code)
28729
28730 2002-01-11  Ravi Pratap  <ravi@ximian.com>
28731
28732         * typemanager.cs (IsPointerType): Utility method which we are going
28733         to need a lot.
28734
28735         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
28736         the object type, so we take care of that.
28737
28738         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
28739
28740         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
28741         added to non-params parameters :-)
28742
28743         * typemanager.cs (CSharpName): Include 'void' type too. 
28744
28745         (void_ptr_type): Include in the set of core types.
28746
28747         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
28748         duplicating code.
28749
28750         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
28751         an unsafe context.
28752
28753         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
28754         completely forgotten about it.
28755
28756 2002-01-10  Ravi Pratap  <ravi@ximian.com>
28757
28758         * cs-parser.jay (pointer_type): Add. This begins our implementation
28759         of parsing rules for unsafe code.
28760
28761         (unsafe_statement): Implement.
28762
28763         (embedded_statement): Modify to include the above.
28764
28765         * statement.cs (Unsafe): Implement new class for unsafe blocks.
28766
28767         * codegen.cs (EmitContext.InUnsafe): Add. This determines
28768         if the current context is an unsafe one.
28769
28770         * cs-parser.jay (local_variable_pointer_type): Since local variable types
28771         are handled differently, we need separate rules for them.
28772
28773         (local_variable_declaration): Update to use local_variable_pointer_type
28774         to allow variable declarations of unmanaged pointer types.
28775
28776         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
28777         in unsafe contexts.
28778
28779         * ../errors/cs0214.cs : Add.
28780
28781 2002-01-16  Nick Drochak  <ndrochak@gol.com>
28782
28783         * makefile: remove 'response' file when cleaning.
28784
28785 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28786
28787         * cs-parser.jay: Report 1524.
28788
28789 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
28790
28791         * typemanager.cs (RegisterMethod): drop checking if we have
28792         registered this from here
28793
28794 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
28795
28796         * class.cs (Method.EmitDestructor): Implement calling our base
28797         destructor. 
28798
28799         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
28800         value of InFinally.
28801
28802         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
28803         this routine and will wrap the call in a try/catch block.  Deal
28804         with the case.
28805
28806 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
28807
28808         * ecore.cs (Expression.MemberLookup): instead of taking a
28809         parameter `same_type' that was used to tell whether we could
28810         access private members we compute our containing type from the
28811         EmitContext.
28812
28813         (FieldExpr): Added partial support for volatile fields.  This does
28814         not work for volatile fields exposed from assemblies, as I can not
28815         figure out how to extract the modreq from it.
28816
28817         Updated all the source files to use this.
28818
28819         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
28820         because it is referenced by MemberLookup very often. 
28821
28822 2002-01-09  Ravi Pratap  <ravi@ximian.com>
28823
28824         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
28825         TypeBuilder.GetCustomAttributes to retrieve what we need.
28826
28827         Get rid of redundant default_member_attr_type as this is the same as
28828         default_member_type which already exists.
28829
28830         * interface.cs, attribute.cs : Update accordingly.
28831
28832 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
28833
28834         * typemanager.cs: Enable IndexerPropertyName again.  It does not
28835         work for TYpeBuilders though.  Ravi, can you please fix this?
28836
28837         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
28838
28839         * expression.cs (Argument.Emit): Handle the case of ref objects
28840         being passed to ref functions;  
28841
28842         (ParameterReference.EmitLoad): Loads the content of the pointer
28843         without dereferencing.
28844
28845 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28846
28847         * cs-tokenizer.cs: Implemented the pre-processing expressions.
28848
28849 2002-01-08  Ravi Pratap  <ravi@ximian.com>
28850
28851         * class.cs (Indexer.DefineMethod): Incorporate the interface
28852         type in the name of the method if we are doing explicit interface
28853         implementation.
28854
28855         * expression.cs (ConversionExists): Remove as it is completely obsolete.
28856
28857         (BetterConversion): Fix extremely trivial bug where we were referring to
28858         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
28859         again !
28860
28861         * ../errors/bug16.cs : Add although we have fixed it.
28862
28863 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28864
28865         * expression.cs (BaseIndexer): Begin implementation.
28866
28867         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
28868
28869         * cs-parser.jay (indexer_declarator): Use qualified_identifier
28870         production directly to remove a shift/reduce, and implement
28871         explicit interface implementation.
28872
28873         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
28874         after a floating point suffix.
28875
28876         * expression.cs (DoNumericPromotions): Improved the conversion for
28877         uint/uint.  If we have a constant, we avoid doing a typecast to a
28878         larger type.
28879
28880         * class.cs (Indexer): Implement explicit interface implementation
28881         for indexers.
28882
28883 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28884
28885         * class.cs: make the default instance constructor public and hidebysig.
28886
28887 2001-01-03  Ravi Pratap  <ravi@ximian.com>
28888
28889         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
28890         so we can call it from elsewhere.
28891
28892         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
28893         we emit it internally if the class has a defined indexer; otherwise the user
28894         emits it by decorating the class definition with the DefaultMemberAttribute.
28895
28896         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
28897         attribute is not used on a type which defines an indexer.
28898
28899         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
28900         character when we skip whitespace.
28901
28902         * ../errors/cs0646.cs : Add.
28903
28904 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
28905
28906         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
28907         again. 
28908
28909         * makefile: Add practical target `mcs3.exe' which builds the third
28910         generation compiler. 
28911
28912         * expression.cs (New): Fix structures constructor calling.
28913
28914         * class.cs (Property, Method, Indexer): Emit Final flag on the
28915         method if we are an interface implementation and we are not
28916         abstract. 
28917
28918         * ecore.cs (PropertyExpr): New public field `IsBase', tells
28919         whether this property is referencing a `base' method.
28920
28921         * expression.cs (Invocation.EmitCall): take an extra argument:
28922         is_base, this is used to determine whether the `call' or
28923         `callvirt' opcode should be used.
28924
28925
28926         * delegate.cs: update EmitCall.
28927
28928         * class.cs (Method.Define): Set NewSlot for the cases where we are
28929         not implementing an interface method.
28930
28931         (Property.Define): ditto.
28932
28933 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
28934
28935         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
28936         'r'.  Allows mcs to parse itself fully.
28937
28938 2002-01-02  Ravi Pratap  <ravi@ximian.com>
28939
28940         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
28941         of the number of initializers that require the InitializeArray method.
28942
28943         (CheckIndices): Store the Expression in all cases - not the plain value. Also
28944         update the above field where necessary.
28945
28946         (MakeByteBlob): Update accordingly.
28947
28948         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
28949         greater than 2.
28950
28951         (EmitDynamicInitializers): Update in accordance with the new optimization.
28952
28953         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
28954         same OpCode applies.
28955
28956         * cs-parser.jay : Fix some glaring errors I introduced.
28957
28958 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
28959
28960         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
28961         so that we can check for name clashes there too.
28962
28963         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
28964         for interface indexers.
28965
28966         * interfaces.cs (Define): Emit the default member attribute.
28967
28968         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
28969         variable was being referred to while setting the value ;-)
28970
28971 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
28972
28973         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
28974         byte-by-byte information when we know the data is zero.
28975
28976         Make the block always a multiple of 4, because
28977         DefineInitializedData has a bug.
28978
28979         * assign.cs: Fix, we should assign from the temporary, not from
28980         the source. 
28981
28982         * expression.cs (MakeByteBlob): Fix my incorrect code.
28983
28984 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
28985
28986         * typemanager.cs (EnumToUnderlying): This function is used to get
28987         the underlying type from an enumeration, because it does not
28988         always work. 
28989
28990         * constant.cs: Use the I4_S form for values between -128 and 127.
28991
28992         * statement.cs (Block.LookupLabel): Looks up a label.
28993         (Block): Drop support for labeled blocks.
28994
28995         (LabeledStatement): New kind of statement that represents a label
28996         only.
28997
28998         (Goto): Finally implement this bad boy.
28999
29000         * cs-parser.jay: Update to reflect new mechanism to implement
29001         labels.
29002
29003 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29004
29005         * codegen.cs (EmitContext.This): a codegen property that keeps the
29006         a single instance of this instead of creating many different this
29007         instances. 
29008
29009         * delegate.cs (Delegate.DoResolve): Update to use the property;
29010
29011         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29012
29013         * expression.cs (BaseAccess.DoResolve): Ditto.
29014
29015 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29016
29017         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29018         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29019
29020         (InitCoreTypes): Update accordingly.
29021
29022         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29023         so we can quickly store the state.
29024
29025         (ApplyAttributes): Set the correct implementation flags
29026         for InternalCall methods.
29027
29028 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29029
29030         * expression.cs (EmitCall): if a method is not virtual, then do
29031         not use callvirt on it.
29032
29033         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29034         user defined stuff) requires the use of stobj, which takes an
29035         address on the stack instead of an array and an index.  So emit
29036         the Ldelema operation for it.
29037
29038         (EmitStoreOpcode): Use stobj for valuetypes.
29039
29040         (UnaryMutator.EmitCode): Use the right 1 value depending on
29041         whether we are dealing with int64/uint64, float or doubles.
29042
29043         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29044         constructors that I implemented last night.
29045
29046         (Constructor.IsDefault): Fix to work properly for static
29047         constructors.
29048
29049         * cs-parser.jay (CheckDef): report method signature errors.
29050         Update error number 103 to be 132.
29051
29052         * decl.cs: New AdditionResult enumeration value: MethodExists.
29053         Although we do this check for methods later on in the semantic
29054         analysis, catching repeated default constructors is so easy that
29055         we catch these here. 
29056
29057         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29058         promotions code.
29059
29060         (ParameterReference.EmitAssign, Emit): handle
29061         bools as bytes.
29062
29063         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29064         (ArrayAccess.EmitStoreOpcode): ditto.
29065
29066         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29067
29068         * expression.cs (MakeByteBlob): Complete all the missing types
29069         (uint, short, ushort, byte, sbyte)
29070
29071         * class.cs: Only init instance field initializers on instance
29072         constructors. 
29073
29074         Rename `constructors' to instance_constructors. 
29075
29076         (TypeContainer.AddConstructor): Only add constructors to the list
29077         if it is not static.
29078
29079         Make sure that we handle default_static_constructor independently
29080         everywhere where we handle instance_constructors
29081
29082 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29083
29084         * class.cs: Do not lookup or create a base initializer for a
29085         static constructor.
29086
29087         (ConstructorInitializer.Resolve): use the proper type to lookup
29088         for constructors.
29089
29090         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29091
29092         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29093         in DeclSpace. 
29094
29095         * decl.cs: CloseType is now an virtual method, the default
29096         implementation just closes this type.
29097
29098 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29099
29100         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29101         to PreserveSig by default. Also emit HideBySig on such methods.
29102
29103         Basically, set the defaults to standard values.
29104
29105         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29106         argument, if candidate is better, it can't be worse than the best !
29107
29108         (Invocation): Re-write bits to differentiate between methods being
29109         applicable in their expanded form and their normal form - for params
29110         methods of course.
29111
29112         Get rid of use_standard everywhere as only standard conversions are allowed
29113         in overload resolution. 
29114
29115         More spec conformance.
29116
29117 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29118
29119         * driver.cs: Add --timestamp, to see where the compiler spends
29120         most of its time.
29121
29122         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29123         `this' in static code.
29124
29125         (SimpleName.DoResolve): Implement in terms of a helper function
29126         that allows static-references to be passed upstream to
29127         MemberAccess.
29128
29129         (Expression.ResolveWithSimpleName): Resolve specially simple
29130         names when called by MemberAccess to implement the special
29131         semantics. 
29132
29133         (Expression.ImplicitReferenceConversion): Handle conversions from
29134         Null to reference types before others, as Null's type is
29135         System.Object. 
29136
29137         * expression.cs (Invocation.EmitCall): Handle the special case of
29138         calling methods declared on a reference type from a ValueType
29139         (Base classes System.Object and System.Enum)
29140
29141         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29142         the left hand side is a TypeExpr, not on every enumeration. 
29143
29144         (Binary.Resolve): If types are reference types, then do a cast to
29145         object on operators != and == of both arguments.
29146
29147         * typemanager.cs (FindMembers): Extract instance and static
29148         members if requested.
29149
29150         * interface.cs (PopulateProperty): Use void_type instead of null
29151         as the return type for the setter method.
29152
29153         (PopulateIndexer): ditto.
29154
29155 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29156
29157         * support.cs (ReflectionParameters): Fix minor bug where we
29158         were examining the wrong parameter for the ParamArray attribute.
29159
29160         Cope with requests for the type of the parameter at position
29161         greater than the params parameter's. We now return the element
29162         type of the params array as that makes more sense.
29163
29164         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29165         accordingly as we no longer have to extract the element type
29166         ourselves.
29167
29168         (Invocation.OverloadResolve): Update.
29169
29170 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29171
29172         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29173         against IEnumerator, test whether the return value is a descendant
29174         of the IEnumerator interface.
29175
29176         * class.cs (Indexer.Define): Use an auxiliary method to implement
29177         the other bits of the method definition.  Begin support for
29178         explicit interface implementation.
29179
29180         (Property.DefineMethod): Use TypeManager.void_type instead of null
29181         for an empty return value.
29182
29183 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29184
29185         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29186         dealing with a FieldExpr which is composed of a FieldBuilder, in
29187         the code path we did extract the constant, but we should have
29188         obtained the underlying value to be able to cast it (otherwise we
29189         end up in an infinite loop, this is what Ravi was running into).
29190
29191         (ArrayCreation.UpdateIndices): Arrays might be empty.
29192
29193         (MemberAccess.ResolveMemberAccess): Add support for section
29194         14.5.4.1 that deals with the special case of E.I when E is a type
29195         and something else, that I can be a reference to a static member.
29196
29197         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29198         handle a particular array type to create byte blobs, it is just
29199         something we dont generate byteblobs for.
29200
29201         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29202         arguments. 
29203
29204         * location.cs (Push): remove the key from the hashtable that we
29205         are about to add.   This happens for empty files.
29206
29207         * driver.cs: Dispose files after we have parsed them.
29208
29209         (tokenize): new function that only runs the tokenizer on its
29210         input, for speed testing.
29211
29212 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29213
29214         * class.cs (Event.Define): Define the private field only if there
29215         are no accessors defined.
29216
29217         * expression.cs (ResolveMemberAccess): If there is no associated
29218         field with the event, that means we have an event defined with its
29219         own accessors and we should flag error cs0070 since transforming
29220         ourselves into a field is not valid in that case.
29221
29222         * ecore.cs (SimpleName.DoResolve): Same as above.
29223
29224         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29225         and charset to sane values.
29226
29227 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29228
29229         * assign.cs (DoResolve): Perform check on events only if they 
29230         are being accessed outside the declaring type.
29231
29232         * cs-parser.jay (event_declarations): Update rules to correctly
29233         set the type of the implicit parameter etc.
29234
29235         (add_accessor, remove_accessor): Set current local parameters.
29236
29237         * expression.cs (Binary): For delegate addition and subtraction,
29238         cast the return value from the method into the appropriate delegate
29239         type.
29240
29241 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29242
29243         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29244         of these as the workaround is unnecessary.
29245
29246         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29247         delegate data - none of that is needed at all.
29248
29249         Re-write bits to extract the instance expression and the delegate method
29250         correctly.
29251
29252         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29253         on delegates too.
29254
29255         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29256         of attaching attributes instead of duplicating code everywhere.
29257
29258         * everywhere : Update code to do attribute emission using the above method.
29259
29260 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29261
29262         * expression.cs (IsParamsMethodApplicable): if there are not
29263         parameters, return immediately.
29264
29265         * ecore.cs: The 0 literal can be implicity converted to an enum
29266         type. 
29267
29268         (SimpleName.DoResolve): First lookup the type, then lookup the
29269         members. 
29270
29271         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29272         want to get its address.  If the InstanceExpression is not
29273         addressable, store the result in a temporary variable, then get
29274         the address of it.
29275
29276         * codegen.cs: Only display 219 errors on warning level or above. 
29277
29278         * expression.cs (ArrayAccess): Make it implement the
29279         IMemoryLocation interface.
29280
29281         (Binary.DoResolve): handle the operator == (object a, object b)
29282         and operator != (object a, object b) without incurring into a
29283         BoxedCast (because 5 != o should never be performed).
29284
29285         Handle binary enumerator operators.
29286
29287         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29288         value type, otherwise use Ldelem_ref.
29289
29290         Use precomputed names;
29291
29292         (AddressOf): Implement address of
29293
29294         * cs-parser.jay (labeled_statement): Fix recursive block
29295         addition by reworking the production.
29296
29297         * expression.cs (New.DoEmit): New has a special case:
29298                 
29299                  If we are dealing with a ValueType, we have a few
29300                  situations to deal with:
29301                 
29302                     * The target of New is a ValueType variable, that is
29303                       easy, we just pass this as the variable reference
29304                 
29305                     * The target of New is being passed as an argument,
29306                       to a boxing operation or a function that takes a
29307                       ValueType.
29308                 
29309                       In this case, we need to create a temporary variable
29310                       that is the argument of New.
29311
29312
29313 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29314
29315         * rootcontext.cs (LookupType): Check that current_type is not null before
29316         going about looking at nested types.
29317
29318         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29319         not implement the IAssignMethod interface any more.
29320
29321         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29322         where we tranform them into FieldExprs if they are being resolved from within
29323         the declaring type.
29324
29325         * ecore.cs (SimpleName.DoResolve): Do the same here.
29326
29327         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29328
29329         * ../errors/bug10.cs : Add.
29330
29331         * ../errors/cs0070.cs : Add.
29332
29333         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29334
29335         * assign.cs : Get rid of EventIsLocal everywhere.
29336
29337 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29338
29339         * ecore.cs (ConvertIntLiteral): finished the implementation.
29340
29341         * statement.cs (SwitchLabel): Convert the value we are using as a
29342         key before looking up the table.
29343
29344 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29345
29346         * codegen.cs (EmitTopBlock): Require a Location argument now.
29347
29348         * cs-parser.jay (constructor_declarator): We need to setup
29349         current_local_parameters before we parse the
29350         opt_constructor_initializer, to allow the variables to be bound
29351         to the constructor arguments.
29352
29353         * rootcontext.cs (LookupType): First lookup nested classes in our
29354         class and our parents before we go looking outside our class.
29355
29356         * expression.cs (ConstantFold): Extract/debox the values at the
29357         beginnning. 
29358
29359         * rootcontext.cs (EmitCode): Resolve the constants first before we
29360         resolve the types.  This is not really needed, but it helps debugging.
29361
29362         * statement.cs: report location.
29363
29364         * cs-parser.jay: pass location to throw statement.
29365
29366         * driver.cs: Small bug fix.
29367
29368         * report.cs: Updated format to be 4-zero filled digits.
29369
29370 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29371
29372         * expression.cs (CheckIndices): Fix minor bug where the wrong
29373         variable was being referred to ;-)
29374
29375         (DoEmit): Do not call EmitStaticInitializers when the 
29376         underlying type is System.Object.
29377
29378 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29379
29380         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29381         and do the usual workaround for SRE.
29382
29383         * class.cs (MyEventBuilder.EventType): New member to get at the type
29384         of the event, quickly.
29385
29386         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29387
29388         * assign.cs (Assign.DoResolve): Handle the case when the target
29389         is an EventExpr and perform the necessary checks.
29390
29391         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29392         interface.
29393
29394         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29395
29396         (EventExpr): Set the type in the constructor itself since we 
29397         are meant to be born fully resolved.
29398
29399         (EventExpr.Define): Revert code I wrote earlier.
29400                 
29401         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29402         instance expression is null. The instance expression is a This in that case
29403         or a null, depending on whether it is a static method or not.
29404
29405         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29406         refers to more than one method.
29407
29408         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29409         and accordingly flag errors.
29410
29411 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29412
29413         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29414
29415 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29416
29417         * location.cs (ToString): Provide useful rutine.
29418
29419 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29420
29421         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29422         objects, return the actual integral boxed.
29423
29424         * statement.cs (SwitchLabel): define an ILLabel for each
29425         SwitchLabel. 
29426
29427         (Switch.CheckSwitch): If the value is a Literal, extract
29428         the underlying literal.
29429
29430         Also in the unused hashtable we had, add the SwitchLabel so we can
29431         quickly look this value up.
29432
29433         * constant.cs: Implement a bunch of new constants.  Rewrite
29434         Literal based on this.  Made changes everywhere to adapt to this.
29435
29436         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29437         dereferencing array only once, and also copes with enumrations.
29438
29439         bytes are two bytes wide, not one.
29440
29441         (Cast): Perform constant conversions.
29442
29443         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29444         wrappers to the literals here.
29445
29446         * expression.cs (DoNumericPromotions): long literals can converted
29447         to ulong implicity (this is taken care of elsewhere, but I was
29448         missing this spot).
29449
29450         * ecore.cs (Expression.Literalize): Make the return type Literal,
29451         to improve type checking.
29452
29453         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29454
29455 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29456
29457         * literal.cs: Revert code from ravi that checked the bounds.  The
29458         bounds are sane by the definition of the type itself. 
29459
29460         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29461         need to actually look up in our parent hierarchy for interfaces
29462         implemented. 
29463
29464         * const.cs: Use the underlying type for enumerations
29465
29466         * delegate.cs: Compute the basename for the delegate creation,
29467         that should fix the delegate test case, and restore the correct
29468         Type Lookup semantics in rootcontext
29469
29470         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29471         referencing a nested type with the Reflection API is using the "+"
29472         sign. 
29473
29474         * cs-parser.jay: Do not require EOF token at the end.
29475
29476 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29477
29478         * rootcontext.cs (LookupType): Concatenate type names with
29479         a '.' instead of a '+' The test suite passes again.
29480
29481         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29482         field of the enumeration.
29483
29484         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29485         the case when the member is an EventExpr.
29486
29487         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29488         static has an associated instance expression.
29489
29490         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29491
29492         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29493
29494         * class.cs (Event.Define): Register event and perform appropriate checks
29495         for error #111.
29496
29497         We define the Add and Remove methods even if the use provides none because
29498         in that case, we provide default implementations ourselves.
29499
29500         Define a private field of the type of the event. This is done by the CSC compiler
29501         and we should be doing it too ;-)
29502
29503         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29504         More methods we use in code we generate.
29505
29506         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29507         is important.
29508
29509         (InitCoreTypes): Update accordingly for the above.
29510
29511         * class.cs (Event.Emit): Generate code for default accessors that we provide
29512
29513         (EmitDefaultMethod): Do the job in the above.
29514
29515         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29516         appropriate place.
29517
29518 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29519
29520         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29521         builders even if we were missing one.
29522
29523         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29524         pass the Basename as our class name instead of the Name.  The
29525         basename will be correctly composed for us.
29526
29527         * parameter.cs (Paramters): Now takes a Location argument.
29528
29529         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29530         make all the code call directly LookupType in RootContext and take
29531         this chance to pass the Location information everywhere.
29532
29533         * Everywhere: pass Location information.
29534
29535 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29536
29537         * class.cs (Constructor.Define): Updated way of detecting the
29538         length of the parameters.
29539
29540         (TypeContainer.DefineType): Use basename as the type name for
29541         nested types.
29542
29543         (TypeContainer.Define): Do not recursively define types here, as
29544         definition is taken care in order by the RootContext.
29545
29546         * tree.cs: Keep track of namespaces in a per-file basis.
29547
29548         * parameter.cs (Parameter.ComputeSignature): Update to use
29549         DeclSpace. 
29550
29551         (Parameters.GetSignature): ditto.
29552
29553         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29554         instead of a TypeContainer.
29555
29556         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29557         resolve names.  Because we need to be resolve in our context, not
29558         our parents.
29559
29560         * driver.cs: Implement response files.
29561
29562         * class.cs (TypeContainer.DefineType): If we are defined, do not
29563         redefine ourselves.
29564
29565         (Event.Emit): Emit the code for add/remove handlers.
29566         (Event.Define): Save the MethodBuilders for add/remove.
29567
29568         * typemanager.cs: Use pair here too.
29569
29570         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29571         DictionaryEntry requires the first argument to be non-null.  
29572
29573         (enum_declaration): Compute full name for registering the
29574         enumeration.
29575
29576         (delegate_declaration): Instead of using
29577         formal_parameter_list, use opt_formal_parameter_list as the list
29578         can be empty.
29579
29580         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29581         (EventParsing): New property that controls whether `add' and
29582         `remove' are returned as tokens or identifiers (for events);
29583
29584 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29585
29586         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29587         use MyEventBuilder only and let it wrap the real builder for us.
29588
29589         (MyEventBuilder): Revamp constructor etc.
29590
29591         Implement all operations that we perform on EventBuilder in precisely the same
29592         way here too.
29593
29594         (FindMembers): Update to use the EventBuilder member.
29595
29596         (Event.Emit): Update accordingly.
29597
29598 2001-12-18  Ravi Pratap  <ravi@ximian.com>
29599
29600         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
29601         by calling the appropriate methods.
29602
29603         (GetCustomAttributes): Make stubs as they cannot possibly do anything
29604         useful.
29605
29606         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
29607
29608 2001-12-17  Ravi Pratap  <ravi@ximian.com>
29609
29610         * delegate.cs (Delegate.Populate): Check that the return type
29611         and various parameters types are indeed accessible.
29612
29613         * class.cs (Constructor.Define): Same here.
29614
29615         (Field.Define): Ditto.
29616
29617         (Event.Define): Ditto.
29618
29619         (Operator.Define): Check that the underlying Method defined itself
29620         correctly - so it's MethodBuilder should not be null.
29621
29622         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
29623         expression happens to be null.
29624
29625         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
29626         members but as of now we don't seem to be able to do anything really useful with it.
29627
29628         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
29629         not the EventBuilder.
29630
29631 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
29632
29633         * cs-tokenizer.cs: Add support for defines.
29634         Add support for #if, #elif, #else, #endif
29635
29636         (eval_var): evaluates a variable.
29637         (eval): stubbed for evaluating functions.
29638
29639         * cs-parser.jay: Pass the defines information
29640
29641         * driver.cs: Add --define command line option.
29642
29643         * decl.cs: Move MemberCore here.
29644
29645         Make it the base class for DeclSpace.  This allows us to catch and
29646         report 108 and 109 for everything now.
29647
29648         * class.cs (TypeContainer.Define): Extract all the members
29649         before populating and emit the warning 108 (new keyword required
29650         to override) instead of having each member implement this.
29651
29652         (MemberCore.Define): New abstract method, we will be using this in
29653         the warning reporting engine in Populate.
29654
29655         (Operator.Define): Adjust to new MemberCore protocol. 
29656
29657         * const.cs (Const): This does not derive from Expression, it is a
29658         temporary object we use to create fields, it is a MemberCore. 
29659
29660         * class.cs (Method.Define): Allow the entry point to be in a
29661         specific class.
29662
29663         * driver.cs: Rewrite the argument handler to clean it up a bit.
29664
29665         * rootcontext.cs: Made it just an auxiliary namespace feature by
29666         making everything static.
29667
29668         * driver.cs: Adapt code to use RootContext type name instead of
29669         instance variable.
29670
29671         * delegate.cs: Remove RootContext argument.
29672
29673         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
29674         argument. 
29675
29676         * class.cs (Event.Define): The lookup can fail.
29677
29678         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
29679
29680         * expression.cs: Resolve the this instance before invoking the code.
29681
29682 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
29683
29684         * cs-parser.jay: Add a production in element_access that allows
29685         the thing to become a "type" reference.  This way we can parse
29686         things like "(string [])" as a type.
29687
29688         Note that this still does not handle the more complex rules of
29689         casts. 
29690
29691
29692         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
29693
29694         * ecore.cs: (CopyNewMethods): new utility function used to
29695         assemble the list of methods from running FindMembers.
29696
29697         (MemberLookup): Rework FindMembers so that 
29698
29699 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
29700
29701         * class.cs (TypeContainer): Remove Delegates who fail to be
29702         defined.
29703
29704         * delegate.cs (Populate): Verify that we dont get null return
29705         values.   TODO: Check for AsAccessible.
29706
29707         * cs-parser.jay: Use basename to emit error 574 (destructor should
29708         have the same name as container class), not the full name.
29709
29710         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
29711         possible representation.  
29712
29713         Also implements integer type suffixes U and L.
29714
29715 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
29716
29717         * expression.cs (ArrayCreation.DoResolve): We need to do the
29718         argument resolution *always*.
29719
29720         * decl.cs: Make this hold the namespace.  Hold the root context as
29721         well.
29722         (LookupType): Move here.
29723
29724         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
29725
29726         * location.cs (Row, Name): Fixed the code, it was always returning
29727         references to the first file.
29728
29729         * interface.cs: Register properties defined through interfaces.
29730
29731         * driver.cs: Add support for globbing on the command line
29732
29733         * class.cs (Field): Make it derive from MemberCore as well.
29734         (Event): ditto.
29735
29736 2001-12-15  Ravi Pratap  <ravi@ximian.com>
29737
29738         * class.cs (Event::Define): Check that the type of the event is a delegate
29739         type else flag error #66.
29740
29741         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
29742         same.
29743
29744         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
29745         values of EntryPoint, CharSet etc etc.
29746
29747         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
29748
29749         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
29750         be null and we should ignore this. I am not sure if this is really clean. Apparently,
29751         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
29752         which needs this to do its work.
29753
29754         * ../errors/cs0066.cs : Add.
29755
29756 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
29757
29758         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
29759         helper functions.
29760
29761         * class.cs: (MethodSignature.MethodSignature): Removed hack that
29762         clears out the parameters field.
29763         (MemberSignatureCompare): Cleanup
29764
29765         (MemberCore): New base class used to share code between MethodCore
29766         and Property.
29767
29768         (RegisterRequiredImplementations) BindingFlags.Public requires
29769         either BindingFlags.Instace or Static.  Use instance here.
29770
29771         (Property): Refactored code to cope better with the full spec.
29772
29773         * parameter.cs (GetParameterInfo): Return an empty array instead
29774         of null on error.
29775
29776         * class.cs (Property): Abstract or extern properties have no bodies.
29777
29778         * parameter.cs (GetParameterInfo): return a zero-sized array.
29779
29780         * class.cs (TypeContainer.MethodModifiersValid): Move all the
29781         method modifier validation to the typecontainer so we can reuse
29782         this on properties.
29783
29784         (MethodCore.ParameterTypes): return an empty sized array of types.
29785
29786         (Property.Define): Test property modifier validity.
29787
29788         Add tests for sealed/override too.
29789
29790         (Method.Emit): abstract or extern methods have no bodies.
29791
29792 2001-12-14  Ravi Pratap  <ravi@ximian.com>
29793
29794         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
29795         thing.
29796
29797         (Method::Define, ::Emit): Modify accordingly.
29798
29799         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
29800
29801         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
29802
29803         * makefile: Pass in /unsafe.
29804
29805 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
29806
29807         * class.cs (MakeKey): Kill routine.
29808
29809         * class.cs (TypeContainer.Define): Correctly define explicit
29810         method implementations (they require the full interface name plus
29811         the method name).
29812
29813         * typemanager.cs: Deply the PtrHashtable here and stop using the
29814         lame keys.  Things work so much better.
29815
29816         This of course broke everyone who depended on `RegisterMethod' to
29817         do the `test for existance' test.  This has to be done elsewhere.
29818
29819         * support.cs (PtrHashtable): A hashtable that avoid comparing with
29820         the object stupid Equals method (because, that like fails all over
29821         the place).  We still do not use it.
29822
29823         * class.cs (TypeContainer.SetRequiredInterface,
29824         TypeContainer.RequireMethods): Killed these two routines and moved
29825         all the functionality to RegisterRequiredImplementations.
29826
29827         (TypeContainer.RegisterRequiredImplementations): This routine now
29828         registers all the implementations required in an array for the
29829         interfaces and abstract methods.  We use an array of structures
29830         which can be computed ahead of time to reduce memory usage and we
29831         also assume that lookups are cheap as most classes will not
29832         implement too many interfaces.
29833
29834         We also avoid creating too many MethodSignatures.
29835
29836         (TypeContainer.IsInterfaceMethod): Update and optionally does not
29837         clear the "pending" bit if we find that there are problems with
29838         the declaration.
29839
29840         (TypeContainer.VerifyPendingMethods): Update to report errors of
29841         methods that look like implementations but are not.
29842
29843         (TypeContainer.Define): Add support for explicit interface method
29844         implementation. 
29845
29846 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
29847
29848         * typemanager.cs: Keep track of the parameters here instead of
29849         being a feature of the TypeContainer.
29850
29851         * class.cs: Drop the registration of parameters here, as
29852         InterfaceMethods are also interface declarations.
29853
29854         * delegate.cs: Register methods with the TypeManager not only with
29855         the TypeContainer.  This code was buggy.
29856
29857         * interface.cs: Full registation here.
29858
29859 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
29860
29861         * expression.cs: Remove reducer for binary expressions, it can not
29862         be done this way.
29863
29864         * const.cs: Put here the code that used to go into constant.cs
29865
29866         * constant.cs: Put here the code for constants, this is a new base
29867         class for Literals.
29868
29869         * literal.cs: Make Literal derive from Constant.
29870
29871 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
29872
29873         * statement.cs (Return.Emit): Report error 157 if the user
29874         attempts to return from a finally block.
29875
29876         (Return.Emit): Instead of emitting a return, jump to the end of
29877         the function.
29878
29879         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
29880         LocalBuilder to store the result of the function.  ReturnLabel is
29881         the target where we jump.
29882
29883
29884 2001-12-09  Radek Doulik  <rodo@ximian.com>
29885
29886         * cs-parser.jay: remember alias in current namespace
29887
29888         * ecore.cs (SimpleName::DoResolve): use aliases for types or
29889         namespaces
29890
29891         * class.cs (LookupAlias): lookup alias in my_namespace
29892
29893         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
29894         aliases hashtable
29895         (LookupAlias): lookup alias in this and if needed in parent
29896         namespaces
29897
29898 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
29899
29900         * support.cs: 
29901
29902         * rootcontext.cs: (ModuleBuilder) Made static, first step into
29903         making things static.  I need this to avoid passing the
29904         TypeContainer when calling ParameterType.
29905
29906         * support.cs (InternalParameters.ParameterType): Remove ugly hack
29907         that did string manipulation to compute the type and then call
29908         GetType.  Use Parameter.ParameterType instead.
29909
29910         * cs-tokenizer.cs: Consume the suffix for floating values.
29911
29912         * expression.cs (ParameterReference): figure out whether this is a
29913         reference parameter or not.  Kill an extra variable by computing
29914         the arg_idx during emission.
29915
29916         * parameter.cs (Parameters.GetParameterInfo): New overloaded
29917         function that returns whether a parameter is an out/ref value or not.
29918
29919         (Parameter.ParameterType): The type of the parameter (base,
29920         without ref/out applied).
29921
29922         (Parameter.Resolve): Perform resolution here.
29923         (Parameter.ExternalType): The full type (with ref/out applied).
29924
29925         * statement.cs (Using.Emit, Using.EmitExpression): Implement
29926         support for expressions on the using statement.
29927
29928 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
29929
29930         * statement.cs (Using.EmitLocalVariableDecls): Split the
29931         localvariable handling of the using statement.
29932
29933         (Block.EmitMeta): Keep track of variable count across blocks.  We
29934         were reusing slots on separate branches of blocks.
29935
29936         (Try.Emit): Emit the general code block, we were not emitting it. 
29937
29938         Check the type of the declaration to be an IDisposable or
29939         something that can be implicity converted to it. 
29940
29941         Emit conversions if required.
29942
29943         * ecore.cs (EmptyExpression): New utility class.
29944         (Expression.ImplicitConversionExists): New utility function.
29945
29946 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
29947
29948         * statement.cs (Using): Implement.
29949
29950         * expression.cs (LocalVariableReference): Support read only variables.
29951
29952         * statement.cs: Remove the explicit emit for the Leave opcode.
29953         (VariableInfo): Add a readonly field.
29954
29955 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
29956
29957         * ecore.cs (ConvCast): new class used to encapsulate the various
29958         explicit integer conversions that works in both checked and
29959         unchecked contexts.
29960
29961         (Expression.ConvertNumericExplicit): Use new ConvCast class to
29962         properly generate the overflow opcodes.
29963
29964 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
29965
29966         * statement.cs: The correct type for the EmptyExpression is the
29967         element_type, not the variable type.  Ravi pointed this out.
29968
29969 2001-12-04  Ravi Pratap  <ravi@ximian.com>
29970
29971         * class.cs (Method::Define): Handle PInvoke methods specially
29972         by using DefinePInvokeMethod instead of the usual one.
29973
29974         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
29975         above to do the task of extracting information and defining the method.
29976
29977 2001-12-04  Ravi Pratap  <ravi@ximian.com>
29978
29979         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
29980         of the condition for string type.
29981
29982         (Emit): Move that here. 
29983
29984         (ArrayCreation::CheckIndices): Keep string literals in their expression
29985         form.
29986
29987         (EmitDynamicInitializers): Handle strings appropriately.
29988
29989 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
29990
29991         * codegen.cs (EmitContext): Replace multiple variables with a
29992         single pointer to the current Switch statement.
29993
29994         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
29995         EmitContext.
29996
29997 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
29998
29999         * statement.cs 
30000
30001         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30002         default'.
30003
30004         (Foreach.Emit): Foreach on arrays was not setting
30005         up the loop variables (for break/continue).
30006
30007         (GotoCase): Semi-implented.
30008
30009 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30010
30011         * attribute.cs (CheckAttribute): Handle system attributes by using
30012         Attribute.GetAttributes to examine information we need.
30013
30014         (GetValidPlaces): Same here.
30015
30016         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30017
30018         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30019
30020         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30021
30022         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30023
30024         (Method::Emit): Handle the case when we are a PInvoke method.
30025
30026 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30027
30028         * expression.cs: Use ResolveWithSimpleName on compound names.
30029
30030 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30031
30032         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30033         before trying to reduce it.
30034
30035         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30036
30037         * constant.cs (LookupConstantValue): Implement.
30038
30039         (EmitConstant): Use the above in emitting the constant.
30040
30041         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30042         that are user-defined by doing a LookupConstantValue on them.
30043
30044         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30045         too, like above.
30046
30047 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30048
30049         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30050
30051         (BaseAccess.DoResolve): Implement.
30052
30053         (MemberAccess.DoResolve): Split this routine into a
30054         ResolveMemberAccess routine that can be used independently
30055
30056 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30057
30058         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30059         As that share bits of the implementation.  Is returns a boolean,
30060         while As returns the Type that is being probed.
30061
30062 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30063
30064         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30065         instead of a Literal - much easier.
30066
30067         (EnumInTransit): Remove - utterly useless :-)
30068
30069         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30070
30071         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30072
30073         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30074         chain when we have no associated expression.
30075
30076 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30077
30078         * constant.cs (Define): Use Location while reporting the errror.
30079
30080         Also emit a warning when 'new' is used and there is no inherited
30081         member to hide.
30082
30083         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30084         populated.
30085
30086         (LookupEnumValue): Implement to lookup an enum member's value and define it
30087         if necessary.
30088
30089         (Populate): Re-write accordingly to use the above routine.
30090
30091 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30092
30093         * expression.cs (This): Fix prototype for DoResolveLValue to
30094         override the base class DoResolveLValue.
30095
30096         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30097         declarations) 
30098
30099         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30100         (we need to load the address of the field here).  This fixes
30101         test-22. 
30102
30103         (FieldExpr.DoResolveLValue): Call the DoResolve
30104         function to initialize the Instance expression.
30105
30106         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30107         correctly the GetEnumerator operation on a value type.
30108
30109         * cs-parser.jay: Add more simple parsing error catches.
30110
30111         * statement.cs (Switch): Add support for string switches.
30112         Handle null specially.
30113
30114         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30115
30116 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30117
30118         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30119
30120         (declare_local_constant): New helper function.
30121
30122         * statement.cs (AddConstant): Keep a separate record of constants
30123
30124         (IsConstant): Implement to determine if a variable is a constant.
30125
30126         (GetConstantExpression): Implement.
30127
30128         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30129
30130         * statement.cs (IsVariableDefined): Re-write.
30131
30132 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30133
30134         * class.cs (TypeContainer::FindMembers): Look for constants
30135         in the case when we are looking for MemberTypes.Field
30136
30137         * expression.cs (MemberAccess::DoResolve): Check that in the
30138         case we are a FieldExpr and a Literal, we are not being accessed
30139         by an instance reference.
30140
30141         * cs-parser.jay (local_constant_declaration): Implement.
30142
30143         (declaration_statement): Implement for constant declarations.
30144
30145 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30146
30147         * statement.cs (Switch): Catch double defaults.
30148
30149         (Switch): More work on the switch() statement
30150         implementation.  It works for integral values now, need to finish
30151         string support.
30152
30153
30154 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30155
30156         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30157         integer literals into other integer literals.  To be used by
30158         switch. 
30159
30160 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30161
30162         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30163         some memory.
30164
30165         (EmitDynamicInitializers): Cope with the above since we extract data
30166         directly from ArrayData now.
30167
30168         (ExpectInitializers): Keep track of whether initializers are mandatory
30169         or not.
30170
30171         (Bounds): Make it a hashtable to prevent the same dimension being 
30172         recorded for every element in that dimension.
30173
30174         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30175         from being found.
30176
30177         Also fix bug which was causing the indices to be emitted in the reverse
30178         order.
30179
30180 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30181
30182         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30183         unfinished.  They do not work, because the underlying code is
30184         sloppy.
30185
30186 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30187
30188         * cs-parser.jay: Remove bogus fixme.
30189
30190         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30191         on Switch statement.
30192
30193 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30194
30195         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30196         the same. 
30197
30198         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30199         parameter. Apparently, any expression is allowed. 
30200
30201         (ValidateInitializers): Update accordingly.
30202
30203         (CheckIndices): Fix some tricky bugs thanks to recursion.
30204
30205         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30206         I was being completely brain-dead.
30207
30208         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30209         and re-write acordingly.
30210
30211         (DelegateInvocation): Re-write accordingly.
30212
30213         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30214
30215         (MakeByteBlob): Handle types more correctly.
30216
30217         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30218         initialization from expressions but it is incomplete because I am a complete
30219         Dodo :-|
30220
30221 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30222
30223         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30224         on If.  Basically, we have to return `true' (ie, we do return to
30225         our caller) only if both branches of the if return.
30226
30227         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30228         short-circuit operators, handle them as short circuit operators. 
30229
30230         (Cast.DoResolve): Resolve type.
30231         (Cast.Cast): Take an expression as the target type.
30232
30233         * cs-parser.jay (cast_expression): Remove old hack that only
30234         allowed a limited set of types to be handled.  Now we take a
30235         unary_expression and we resolve to a type during semantic
30236         analysis.
30237
30238         Use the grammar productions from Rhys to handle casts (this is
30239         not complete like Rhys syntax yet, we fail to handle that corner
30240         case that C# has regarding (-x), but we will get there.
30241
30242 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30243
30244         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30245         field which is an array type.
30246
30247         * cs-parser.jay (declare_local_variables): Support array initialization too.
30248
30249         * typemanager.cs (MakeKey): Implement.
30250
30251         (everywhere): Use the above appropriately.
30252
30253         * cs-parser.jay (for_statement): Update for array initialization while
30254         declaring variables.
30255
30256         * ecore.cs : The error message was correct, it's the variable's names that
30257         were misleading ;-) Make the code more readable.
30258
30259         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30260         the correct type etc.
30261
30262         (ConvertExplicit): Handle Enum types by examining the underlying type.
30263
30264 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30265
30266         * parameter.cs (GetCallingConvention): Always return
30267         CallingConventions.Standard for now.
30268
30269 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30270
30271         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30272         and `r' after calling DoNumericPromotions.
30273
30274         * ecore.cs: Fix error message (the types were in the wrong order).
30275
30276         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30277         BindingFlags.Instance as well 
30278
30279         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30280         implicit int literal conversion in an empty cast so that we
30281         propagate the right type upstream.
30282
30283         (UnboxCast): new class used to unbox value types.
30284         (Expression.ConvertExplicit): Add explicit type conversions done
30285         by unboxing.
30286
30287         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30288         the target type before applying the implicit LongLiterals to ULong
30289         literal cast.
30290
30291 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30292
30293         * cs-parser.jay (for_statement): Reworked the way For works: now
30294         we declare manually any variables that are introduced in
30295         for_initializer to solve the problem of having out-of-band code
30296         emition (that is what got for broken).
30297
30298         (declaration_statement): Perform the actual variable declaration
30299         that used to be done in local_variable_declaration here.
30300
30301         (local_variable_declaration): Do not declare anything, just pass
30302         the information on a DictionaryEntry
30303
30304 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30305
30306         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30307         re-write of the logic to now make it recursive.
30308
30309         (UpdateIndices): Re-write accordingly.
30310
30311         Store element data in a separate ArrayData list in the above methods.
30312
30313         (MakeByteBlob): Implement to dump the array data into a byte array.
30314
30315 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30316
30317         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30318         into CheckIndices.
30319
30320         * constant.cs (Define): Implement.
30321
30322         (EmitConstant): Re-write fully.
30323
30324         Pass in location info.
30325
30326         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30327         respectively.
30328
30329         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30330         DictionaryEntry since we need location info too.
30331
30332         (constant_declaration): Update accordingly.
30333
30334         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30335         code into another method : UpdateIndices.
30336
30337 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30338
30339         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30340         some type checking etc.
30341
30342 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30343
30344         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30345         bits to provide dimension info if the user skips doing that.
30346
30347         Update second constructor to store the rank correctly.
30348
30349 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30350
30351         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30352         and try to implement.
30353
30354         * ../errors/cs0150.cs : Add.
30355
30356         * ../errors/cs0178.cs : Add.
30357
30358 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30359
30360         * statement.cs: Implement foreach on multi-dimensional arrays. 
30361
30362         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30363         name of the params argument.
30364
30365         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30366         initializing the array.
30367
30368         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30369         we can use this elsewhere.
30370
30371         * statement.cs: Finish implementation of foreach for single
30372         dimension arrays.
30373
30374         * cs-parser.jay: Use an out-of-band stack to pass information
30375         around, I wonder why I need this.
30376
30377         foreach_block: Make the new foreach_block the current_block.
30378
30379         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30380         function used to return a static Parameters structure.  Used for
30381         empty parameters, as those are created very frequently.
30382
30383         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30384
30385 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30386
30387         * interface.cs : Default modifier is private, not public. The
30388         make verify test passes again.
30389
30390 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30391
30392         * support.cs (ReflectionParameters): Fix logic to determine
30393         whether the last parameter is a params one. Test 9 passes again.
30394
30395         * delegate.cs (Populate): Register the builders we define with
30396         RegisterParameterForBuilder. Test 19 passes again.
30397
30398         * cs-parser.jay (property_declaration): Reference $6 instead
30399         of $$ to get at the location.
30400
30401         (indexer_declaration): Similar stuff.
30402
30403         (attribute): Ditto.
30404
30405         * class.cs (Property): Register parameters for the Get and Set methods
30406         if they exist. Test 23 passes again.
30407
30408         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30409         call to EmitArguments as we are sure there aren't any params arguments. 
30410         Test 32 passes again.
30411
30412         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30413         IndexOutOfRangeException. 
30414
30415         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30416         Test 33 now passes again.
30417
30418 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30419
30420         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30421         broke a bunch of things.  Will have to come up with a better way
30422         of tracking locations.
30423
30424         * statement.cs: Implemented foreach for single dimension arrays.
30425
30426 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30427
30428         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30429         an error.  This removes the lookup from the critical path.
30430
30431         * cs-parser.jay: Removed use of temporary_loc, which is completely
30432         broken. 
30433
30434 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30435
30436         * support.cs (ReflectionParameters.ParameterModifier): Report
30437         whether the argument is a PARAMS argument or not.
30438
30439         * class.cs: Set the attribute `ParamArrayAttribute' on the
30440         parameter argument.
30441
30442         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30443         and cons_param_array_attribute (ConstructorInfo for
30444         ParamArrayAttribute)., 
30445
30446         * codegen.cs: Emit the return using the `Return' statement, that
30447         way we can report the error correctly for missing return values. 
30448
30449         * class.cs (Method.Emit): Clean up.
30450
30451         * expression.cs (Argument.Resolve): Take another argument: the
30452         location where this argument is used.  Notice that this is not
30453         part of the "Argument" class as to reduce the size of the
30454         structure (we know the approximate location anyways).
30455
30456         Test if the argument is a variable-reference, if not, then
30457         complain with a 206.
30458
30459         (Argument.Emit): Emit addresses of variables.
30460
30461         (Argument.FullDesc): Simplify.
30462
30463         (Invocation.DoResolve): Update for Argument.Resolve.
30464
30465         (ElementAccess.DoResolve): ditto.
30466
30467         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30468         method should be virtual, as this method is always virtual.
30469
30470         (NewDelegate.DoResolve): Update for Argument.Resolve.
30471
30472         * class.cs (ConstructorInitializer.DoResolve): ditto.
30473
30474         * attribute.cs (Attribute.Resolve): ditto.
30475
30476 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30477
30478         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30479
30480         * expression.cs (ParameterReference): Drop IStackStorage and implement
30481         IAssignMethod instead. 
30482
30483         (LocalVariableReference): ditto.
30484
30485         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30486         IAssignMethod instead. 
30487
30488 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30489
30490         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30491         enumerations that are used in heavily used structures derive from
30492         byte in a laughable and pathetic attempt to reduce memory usage.
30493         This is the kind of pre-optimzations that you should not do at
30494         home without adult supervision.
30495
30496         * expression.cs (UnaryMutator): New class, used to handle ++ and
30497         -- separatedly from the other unary operators.  Cleans up the
30498         code, and kills the ExpressionStatement dependency in Unary.
30499
30500         (Unary): Removed `method' and `Arguments' from this class, making
30501         it smaller, and moving it all to SimpleCall, so I can reuse this
30502         code in other locations and avoid creating a lot of transient data
30503         strucutres when not required.
30504
30505         * cs-parser.jay: Adjust for new changes.
30506
30507 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30508
30509         * enum.cs (Enum.Populate): If there is a failure during
30510         definition, return
30511
30512         * cs-parser.jay (opt_enum_base): we used to catch type errors
30513         here, but this is really incorrect.  The type error should be
30514         catched during semantic analysis.
30515
30516 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30517
30518         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30519         current_local_parameters as expected since I, in my stupidity, had forgotten
30520         to do this :-)
30521
30522         * attribute.cs (GetValidPlaces): Fix stupid bug.
30523
30524         * class.cs (Method::Emit): Perform check on applicability of attributes.
30525
30526         (Constructor::Emit): Ditto.
30527
30528         (Field::Emit): Ditto.
30529
30530         (Field.Location): Store location information.
30531
30532         (Property, Event, Indexer, Operator): Ditto.
30533
30534         * cs-parser.jay (field_declaration): Pass in location for each field.
30535
30536         * ../errors/cs0592.cs : Add.
30537
30538 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30539
30540         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30541
30542         (InitCoreTypes): Update accordingly.
30543
30544         (RegisterAttrType, LookupAttr): Implement.
30545
30546         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30547         info about the same.
30548
30549         (Resolve): Update to populate the above as necessary.
30550
30551         (Error592): Helper.
30552
30553         (GetValidPlaces): Helper to the above.
30554
30555         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30556
30557         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30558
30559 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30560
30561         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30562
30563         * ../errors/cs0617.cs : Add.
30564
30565 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30566
30567         * enum.cs (Emit): Rename to Populate to be more consistent with what
30568         we expect it to do and when exactly it is called.
30569
30570         * class.cs, rootcontext.cs : Update accordingly.
30571
30572         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30573         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30574
30575         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30576
30577         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30578         of a fieldinfo using the above, when dealing with a FieldBuilder.
30579
30580 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30581
30582         * ../errors/cs0031.cs : Add.
30583
30584         * ../errors/cs1008.cs : Add.
30585
30586         * ../errrors/cs0543.cs : Add.
30587
30588         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30589         enum type.
30590
30591         (FindMembers): Implement.
30592
30593         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
30594         enums and delegates too.
30595
30596         (enum_types): Rename to builder_to_enum.
30597
30598         (delegate_types): Rename to builder_to_delegate.
30599
30600         * delegate.cs (FindMembers): Implement.
30601
30602 2001-11-09  Ravi Pratap  <ravi@ximian.com>
30603
30604         * typemanager.cs (IsEnumType): Implement.
30605
30606         * enum.cs (Emit): Re-write parts to account for the underlying type
30607         better and perform checking etc.
30608
30609         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
30610         of the underlying type.
30611
30612         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
30613         value
30614
30615         * enum.cs (error31): Helper to report error #31.
30616
30617         * cs-parser.jay (enum_declaration): Store location of each member too.
30618
30619         * enum.cs (member_to_location): New hashtable. 
30620
30621         (AddEnumMember): Update location hashtable.
30622
30623         (Emit): Use the location of each member while reporting errors.
30624
30625 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30626
30627         * cs-parser.jay: A for_initializer if is a
30628         local_variable_declaration really ammount to have an implicit
30629         block with the variable declaration and no initializer for for.
30630
30631         * statement.cs (For.Emit): Cope with null initializers.
30632
30633         This fixes the infinite loop on for initializers.
30634
30635 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
30636
30637         * enum.cs: More cleanup.
30638
30639         * ecore.cs: Remove dead code.
30640
30641         * class.cs (Property.Emit): More simplification.
30642         (Event.Emit): ditto.
30643
30644         Reworked to have less levels of indentation.
30645
30646 2001-11-08  Ravi Pratap  <ravi@ximian.com>
30647
30648         * class.cs (Property): Emit attributes.
30649
30650         (Field): Ditto.
30651
30652         (Event): Ditto.
30653
30654         (Indexer): Ditto.
30655
30656         (Operator): Ditto.
30657
30658         * enum.cs (Emit): Ditto.
30659
30660         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
30661         Enums too.
30662
30663         * class.cs (Field, Event, etc.): Move attribute generation into the
30664         Emit method everywhere.
30665
30666         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
30667         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
30668         as we had no way of defining nested enums !
30669
30670         * rootcontext.cs : Adjust code accordingly.
30671
30672         * typemanager.cs (AddEnumType): To keep track of enum types separately.
30673
30674 2001-11-07  Ravi Pratap  <ravi@ximian.com>
30675
30676         * expression.cs (EvalConstantExpression): Move into ecore.cs
30677
30678         * enum.cs (Enum): Rename some members and make them public and readonly
30679         according to our convention.
30680
30681         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
30682         nothing else.
30683
30684         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
30685
30686         (Enum::Emit): Write a simple version for now which doesn't try to compute
30687         expressions. I shall modify this to be more robust in just a while.
30688
30689         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
30690
30691         (TypeContainer::CloseType): Create the Enum types too.
30692
30693         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
30694
30695         * expression.cs (EvalConstantExpression): Get rid of completely.
30696
30697         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
30698         user-defined values and other cases.
30699
30700         (IsValidEnumLiteral): Helper function.
30701
30702         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
30703         out there in the case we had a literal FieldExpr.
30704
30705         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
30706
30707         (Literalize): Revamp a bit to take two arguments.
30708
30709         (EnumLiteral): New class which derives from Literal to wrap enum literals.
30710
30711 2001-11-06  Ravi Pratap  <ravi@ximian.com>
30712
30713         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
30714
30715         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
30716
30717         (Resolve): Use the above to ensure we have proper initializers.
30718
30719 2001-11-05  Ravi Pratap  <ravi@ximian.com>
30720
30721         * expression.cs (Expression::EvalConstantExpression): New method to 
30722         evaluate constant expressions.
30723
30724         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
30725
30726 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30727
30728         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
30729         in an array.
30730
30731         (Binary.ResolveOperator): Handle operator != (object a, object b)
30732         and operator == (object a, object b);
30733
30734         (Binary.DoNumericPromotions): Indicate whether the numeric
30735         promotion was possible.
30736
30737         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
30738         Implement.  
30739
30740         Made the ArrayAccess implement interface IAssignMethod instead of
30741         IStackStore as the order in which arguments are passed reflects
30742         this.
30743
30744         * assign.cs: Instead of using expr.ExprClass to select the way of
30745         assinging, probe for the IStackStore/IAssignMethod interfaces.
30746
30747         * typemanager.cs: Load InitializeArray definition.
30748
30749         * rootcontext.cs (RootContext.MakeStaticData): Used to define
30750         static data that can be used to initialize arrays. 
30751
30752 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
30753
30754         * expression.cs: Handle operator== and operator!= for booleans.
30755
30756         (Conditioal.Reduce): Implement reducer for the ?: operator.
30757
30758         (Conditional.Resolve): Implement dead code elimination.
30759
30760         (Binary.Resolve): Catch string literals and return a new
30761         concatenated string.
30762
30763         (Unary.Reduce): Implement reduction of unary expressions.
30764
30765         * ecore.cs: Split out the expression core handling here.
30766
30767         (Expression.Reduce): New method used to perform constant folding
30768         and CSE.  This is needed to support constant-expressions. 
30769
30770         * statement.cs (Statement.EmitBoolExpression): Pass true and false
30771         targets, and optimize for !x.
30772
30773 2001-11-04  Ravi Pratap  <ravi@ximian.com>
30774
30775         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
30776         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
30777         set custom atttributes.
30778
30779         * literal.cs (Literal::GetValue): New abstract method to return the actual
30780         value of the literal, cast as an object.
30781
30782         (*Literal): Implement GetValue method.
30783
30784         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
30785         expressions to the arraylist but objects of type Argument.
30786
30787         * class.cs (TypeContainer::Emit): Emit our attributes too.
30788
30789         (Method::Emit, Constructor::Emit): Ditto.
30790
30791         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
30792         to be ignoring earlier.
30793
30794 2001-11-03  Ravi Pratap  <ravi@ximian.com>
30795
30796         * attribute.cs (AttributeSection::Define): Implement to do the business
30797         of constructing a CustomAttributeBuilder.
30798
30799         (Attribute): New trivial class. Increases readability of code.  
30800
30801         * cs-parser.jay : Update accordingly.
30802
30803         (positional_argument_list, named_argument_list, named_argument): New rules
30804
30805         (attribute_arguments): Use the above so that we are more correct.
30806
30807 2001-11-02  Ravi Pratap  <ravi@ximian.com>
30808
30809         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
30810         to perform all checks for a method with a params parameter.
30811
30812         (Invocation::OverloadResolve): Update to use the above method and therefore
30813         cope correctly with params method invocations.
30814
30815         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
30816         params too.
30817
30818         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
30819         constructors in our parent too because we can't afford to miss out on 
30820         protected ones ;-)
30821
30822         * attribute.cs (AttributeSection): New name for the class Attribute
30823
30824         Other trivial changes to improve readability.
30825
30826         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
30827         use the new class names.
30828
30829 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30830
30831         * class.cs (Method::Define): Complete definition for params types too
30832
30833         (Indexer::Define): Ditto.
30834
30835         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
30836         Cope everywhere with a request for info about the array parameter.
30837
30838 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30839
30840         * tree.cs (RecordNamespace): Fix up to check for the correct key.
30841
30842         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
30843         local_variable_type to extract the string corresponding to the type.
30844
30845         (local_variable_type): Fixup the action to use the new helper method.
30846
30847         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
30848         go.
30849
30850         * expression.cs : Clean out code which uses the above.
30851
30852 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30853
30854         * typemanager.cs (RegisterMethod): Check if we already have an existing key
30855         and bale out if necessary by returning a false.
30856
30857         (RegisterProperty): Ditto.
30858
30859         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
30860         and print out appropriate error messages.
30861
30862         * interface.cs (everywhere): Ditto.
30863
30864         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
30865         location to constructor.
30866
30867         * class.cs (Property, Event, Indexer): Update accordingly.
30868
30869         * ../errors/cs111.cs : Added.
30870
30871         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
30872         of a method, as laid down by the spec.
30873
30874         (Invocation::OverloadResolve): Use the above method.
30875
30876 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30877
30878         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
30879         now take a TypeContainer and a Parameters object.
30880
30881         (ParameterData): Modify return type of ParameterModifier method to be 
30882         Parameter.Modifier and not a string.
30883
30884         (ReflectionParameters, InternalParameters): Update accordingly.
30885
30886         * expression.cs (Argument::GetParameterModifier): Same here.
30887
30888         * support.cs (InternalParameters::ParameterType): Find a better way of determining
30889         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
30890         symbol in it at all so maybe this is only for now.
30891
30892 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30893
30894         * support.cs (InternalParameters): Constructor now takes an extra argument 
30895         which is the actual Parameters class.
30896
30897         (ParameterDesc): Update to provide info on ref/out modifiers.
30898
30899         * class.cs (everywhere): Update call to InternalParameters to pass in
30900         the second argument too.
30901
30902         * support.cs (ParameterData): Add ParameterModifier, which is a method 
30903         to return the modifier info [ref/out etc]
30904
30905         (InternalParameters, ReflectionParameters): Implement the above.
30906
30907         * expression.cs (Argument::ParameterModifier): Similar function to return
30908         info about the argument's modifiers.
30909
30910         (Invocation::OverloadResolve): Update to take into account matching modifiers 
30911         too.
30912
30913         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
30914         a new SetFormalParameters object which we pass to InternalParameters.
30915
30916 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30917
30918         * expression.cs (NewArray): Merge into the ArrayCreation class.
30919
30920 2001-10-29  Ravi Pratap  <ravi@ximian.com>
30921
30922         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
30923         NewUserdefinedArray into one as there wasn't much of a use in having
30924         two separate ones.
30925
30926         * expression.cs (Argument): Change field's name to ArgType from Type.
30927
30928         (Type): New readonly property which returns the proper type, taking into 
30929         account ref/out modifiers.
30930
30931         (everywhere): Adjust code accordingly for the above.
30932
30933         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
30934         whether we are emitting for a ref or out parameter.
30935
30936         * expression.cs (Argument::Emit): Use the above field to set the state.
30937
30938         (LocalVariableReference::Emit): Update to honour the flag and emit the
30939         right stuff.
30940
30941         * parameter.cs (Attributes): Set the correct flags for ref parameters.
30942
30943         * expression.cs (Argument::FullDesc): New function to provide a full desc.
30944
30945         * support.cs (ParameterData): Add method ParameterDesc to the interface.
30946
30947         (ReflectionParameters, InternalParameters): Implement the above method.
30948
30949         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
30950         reporting errors.
30951
30952         (Invocation::FullMethodDesc): Ditto. 
30953
30954 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
30955
30956         * cs-parser.jay: Add extra production for the second form of array
30957         creation. 
30958
30959         * expression.cs (ArrayCreation): Update to reflect the above
30960         change. 
30961
30962         * Small changes to prepare for Array initialization.
30963
30964 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
30965
30966         * typemanager.cs (ImplementsInterface): interface might be null;
30967         Deal with this problem;
30968
30969         Also, we do store negative hits on the cache (null values), so use
30970         this instead of calling t.GetInterfaces on the type everytime.
30971
30972 2001-10-28  Ravi Pratap  <ravi@ximian.com>
30973
30974         * typemanager.cs (IsBuiltinType): New method to help determine the same.
30975
30976         * expression.cs (New::DoResolve): Get rid of array creation code and instead
30977         split functionality out into different classes.
30978
30979         (New::FormArrayType): Move into NewBuiltinArray.
30980
30981         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
30982         quite useless.
30983
30984         (NewBuiltinArray): New class to handle creation of built-in arrays.
30985
30986         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
30987         account creation of one-dimensional arrays.
30988
30989         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
30990
30991         (NewUserdefinedArray::DoResolve): Implement.
30992
30993         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
30994
30995         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
30996         we maintain inside the TypeManager. This is necessary to perform lookups on the
30997         module builder.
30998
30999         (LookupType): Update to perform GetType on the module builders too.     
31000
31001         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31002
31003         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31004
31005 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31006
31007         * expression.cs (New::DoResolve): Implement guts of array creation.
31008
31009         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31010
31011 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31012
31013         * expression.cs: Fix bug I introduced lsat night that broke
31014         Delegates. 
31015
31016         (Expression.Resolve): Report a 246 error (can not resolve name)
31017         if we find a SimpleName in the stream.
31018
31019         (Expression.ResolveLValue): Ditto.
31020
31021         (Expression.ResolveWithSimpleName): This function is a variant of
31022         ResolveName, this one allows SimpleNames to be returned without a
31023         warning.  The only consumer of SimpleNames is MemberAccess
31024
31025 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31026
31027         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31028         might arrive here.  I have my doubts that this is correct.
31029
31030         * statement.cs (Lock): Implement lock statement.
31031
31032         * cs-parser.jay: Small fixes to support `lock' and `using'
31033
31034         * cs-tokenizer.cs: Remove extra space
31035
31036         * driver.cs: New flag --checked, allows to turn on integer math
31037         checking. 
31038
31039         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31040         Threading.Monitor.Exit 
31041
31042 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31043
31044         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31045         Expression Class to be IndexerAccess.
31046
31047         Notice that Indexer::DoResolve sets the eclass to Value.
31048
31049 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31050
31051         * class.cs (TypeContainer::Emit): Emit code for indexers.
31052
31053         * assign.cs (IAssignMethod): New interface implemented by Indexers
31054         and Properties for handling assignment.
31055
31056         (Assign::Emit): Simplify and reuse code. 
31057
31058         * expression.cs (IndexerAccess, PropertyExpr): Implement
31059         IAssignMethod, clean up old code. 
31060
31061 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31062
31063         * typemanager.cs (ImplementsInterface): New method to determine if a type
31064         implements a given interface. Provides a nice cache too.
31065
31066         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31067         method.
31068
31069         (ConvertReferenceExplicit): Ditto.
31070
31071         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31072         various methods, with correct names etc.
31073
31074         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31075         Operator.UnaryNegation.
31076
31077         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31078         we have a unary plus or minus operator.
31079
31080         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31081         UnaryMinus.
31082
31083         * everywhere : update accordingly.
31084
31085         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31086         respectively.
31087
31088         * class.cs (Method::Define): For the case where we are implementing a method
31089         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31090         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31091
31092 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31093
31094         * interface.cs (FindMembers): Implement to work around S.R.E
31095         lameness.
31096
31097         * typemanager.cs (IsInterfaceType): Implement.
31098
31099         (FindMembers): Update to handle interface types too.
31100
31101         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31102         use IsAssignableFrom as that is not correct - it doesn't work.
31103
31104         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31105         and accordingly override EmitStatement.
31106
31107         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31108         using the correct logic :-)
31109
31110 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31111
31112         * ../errors/cs-11.cs : Add to demonstrate error -11 
31113
31114 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31115
31116         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31117         then pass this as a hint to ResolveLValue.
31118
31119         * expression.cs (FieldExpr): Add Location information
31120
31121         (FieldExpr::LValueResolve): Report assignment to readonly
31122         variable. 
31123
31124         (Expression::ExprClassFromMemberInfo): Pass location information.
31125
31126         (Expression::ResolveLValue): Add new method that resolves an
31127         LValue. 
31128
31129         (Expression::DoResolveLValue): Default invocation calls
31130         DoResolve. 
31131
31132         (Indexers): New class used to keep track of indexers in a given
31133         Type. 
31134
31135         (IStackStore): Renamed from LValue, as it did not really describe
31136         what this did.  Also ResolveLValue is gone from this interface and
31137         now is part of Expression.
31138
31139         (ElementAccess): Depending on the element access type
31140
31141         * typemanager.cs: Add `indexer_name_type' as a Core type
31142         (System.Runtime.CompilerServices.IndexerNameAttribute)
31143
31144         * statement.cs (Goto): Take a location.
31145
31146 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31147
31148         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31149         if two delegates are compatible.
31150
31151         (NewDelegate::DoResolve): Update to take care of the case when
31152         we instantiate a delegate from another delegate.
31153
31154         * typemanager.cs (FindMembers): Don't even try to look up members
31155         of Delegate types for now.
31156
31157 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31158
31159         * delegate.cs (NewDelegate): New class to take care of delegate
31160         instantiation.
31161
31162         * expression.cs (New): Split the delegate related code out into 
31163         the NewDelegate class.
31164
31165         * delegate.cs (DelegateInvocation): New class to handle delegate 
31166         invocation.
31167
31168         * expression.cs (Invocation): Split out delegate related code into
31169         the DelegateInvocation class.
31170
31171 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31172
31173         * expression.cs (New::DoResolve): Implement delegate creation fully
31174         and according to the spec.
31175
31176         (New::DoEmit): Update to handle delegates differently.
31177
31178         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31179         because of which we were printing out arguments in reverse order !
31180
31181         * delegate.cs (VerifyMethod): Implement to check if the given method
31182         matches the delegate.
31183
31184         (FullDelegateDesc): Implement.
31185
31186         (VerifyApplicability): Implement.
31187
31188         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31189         delegate invocations too.
31190
31191         (Invocation::Emit): Ditto.
31192
31193         * ../errors/cs1593.cs : Added.
31194
31195         * ../errors/cs1594.cs : Added.
31196
31197         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31198
31199 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31200
31201         * typemanager.cs (intptr_type): Core type for System.IntPtr
31202
31203         (InitCoreTypes): Update for the same.
31204
31205         (iasyncresult_type, asynccallback_type): Ditto.
31206
31207         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31208         correct.
31209
31210         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31211         too.
31212
31213         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31214         the builders for the 4 members of a delegate type :-)
31215
31216         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31217         type.
31218
31219         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31220
31221         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31222
31223 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31224
31225         * statement.cs (Break::Emit): Implement.   
31226         (Continue::Emit): Implement.
31227
31228         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31229         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31230         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31231         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31232         end loop
31233
31234         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31235         properties that track the label for the current loop (begin of the
31236         loop and end of the loop).
31237
31238 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31239
31240         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31241         use of emitting anything at all.
31242
31243         * class.cs, rootcontext.cs : Get rid of calls to the same.
31244
31245         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31246
31247         (Populate): Define the constructor correctly and set the implementation
31248         attributes.
31249
31250         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31251         have been defined.
31252
31253         (AddDelegateType): Implement.
31254
31255         (IsDelegateType): Implement helper method.
31256
31257         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31258
31259         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31260         and accordingly handle it.
31261
31262         * delegate.cs (Populate): Take TypeContainer argument.
31263         Implement bits to define the Invoke method. However, I still haven't figured out
31264         how to take care of the native int bit :-(
31265
31266         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31267         Qualify the name of the delegate, not its return type !
31268
31269         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31270         conversion.
31271
31272         (StandardConversionExists): Checking for array types turns out to be recursive.
31273
31274         (ConvertReferenceExplicit): Implement array conversion.
31275
31276         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31277
31278 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31279
31280         * cs-parser.jay (delegate_declaration): Store the fully qualified
31281         name as it is a type declaration.
31282
31283         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31284         readonly.
31285
31286         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31287         as TypeContainer::DefineType.
31288
31289         (Populate): Method in which all the definition of the various methods (Invoke)
31290         etc is done.
31291
31292         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31293         see.
31294
31295         (CloseDelegate): Finally creates the delegate.
31296
31297         * class.cs (TypeContainer::DefineType): Update to define delegates.
31298         (Populate, Emit and CloseType): Do the same thing here too.
31299
31300         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31301         delegates in all these operations.
31302
31303 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31304
31305         * expression.cs: LocalTemporary: a new expression used to
31306         reference a temporary that has been created.
31307
31308         * assign.cs: Handle PropertyAccess back here, so that we can
31309         provide the proper semantic access to properties.
31310
31311         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31312         a few more explicit conversions. 
31313
31314         * modifiers.cs: `NEW' modifier maps to HideBySig.
31315
31316         * expression.cs (PropertyExpr): Make this into an
31317         ExpressionStatement, and support the EmitStatement code path. 
31318
31319         Perform get/set error checking, clean up the interface.
31320
31321         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31322         them into toplevel access objects.
31323
31324 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31325
31326         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31327         SRE.
31328
31329         * typemanager.cs: Keep track here of our PropertyBuilders again to
31330         work around lameness in SRE.
31331
31332 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31333
31334         * expression.cs (LValue::LValueResolve): New method in the
31335         interface, used to perform a second resolution pass for LValues. 
31336
31337         (This::DoResolve): Catch the use of this in static methods.
31338
31339         (This::LValueResolve): Implement.
31340
31341         (This::Store): Remove warning, assigning to `this' in structures
31342         is 
31343
31344         (Invocation::Emit): Deal with invocation of
31345         methods on value types.  We need to pass the address to structure
31346         methods rather than the object itself.  (The equivalent code to
31347         emit "this" for structures leaves the entire structure on the
31348         stack instead of a pointer to it). 
31349
31350         (ParameterReference::DoResolve): Compute the real index for the
31351         argument based on whether the method takes or not a `this' pointer
31352         (ie, the method is static).
31353
31354         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31355         value types returned from functions when we need to invoke a
31356         method on the sturcture.
31357
31358
31359 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31360
31361         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31362         defining the type in the Modulebuilder or Typebuilder. This is to take
31363         care of nested types which need to be defined on the TypeBuilder using
31364         DefineNestedMethod.
31365
31366         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31367         methods in RootContext, only ported to be part of TypeContainer.
31368
31369         (TypeContainer::GetInterfaceOrClass): Ditto.
31370
31371         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31372
31373         * interface.cs (Interface::DefineInterface): New method. Does exactly
31374         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31375         too.
31376
31377         (Interface::GetInterfaces): Move from RootContext here and port.
31378
31379         (Interface::GetInterfaceByName): Same here.
31380
31381         * rootcontext.cs (ResolveTree): Re-write.
31382
31383         (PopulateTypes): Re-write.
31384
31385         * class.cs (TypeContainer::Populate): Populate nested types too.
31386         (TypeContainer::Emit): Emit nested members too.
31387
31388         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31389         instead just use the name argument passed in as it is already fully
31390         qualified.
31391
31392         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31393         to TypeContainer mapping to see if a type is user-defined.
31394
31395         * class.cs (TypeContainer::CloseType): Implement. 
31396
31397         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31398         the default constructor.
31399
31400         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31401         twice.
31402
31403         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31404
31405         * interface.cs (CloseType): Create the type here.
31406
31407         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31408         the hierarchy.
31409
31410         Remove all the methods which are now in TypeContainer.
31411
31412 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31413
31414         * delegate.cs (Define): Re-write bits to define the delegate
31415         correctly.
31416
31417 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31418
31419         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31420
31421         * expression.cs (ImplicitReferenceConversion): handle null as well
31422         as a source to convert to any reference type.
31423
31424         * statement.cs (Return): Perform any implicit conversions to
31425         expected return type.  
31426
31427         Validate use of return statement.  
31428
31429         * codegen.cs (EmitContext): Pass the expected return type here.
31430
31431         * class.cs (Method, Constructor, Property): Pass expected return
31432         type to EmitContext.
31433
31434 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31435
31436         * expression.cs: Make DoResolve take an EmitContext instead of a
31437         TypeContainer.
31438
31439         Replaced `l' and `location' for `loc', for consistency.
31440
31441         (Error, Warning): Remove unneeded Tc argument.
31442
31443         * assign.cs, literal.cs, constant.cs: Update to new calling
31444         convention. 
31445
31446         * codegen.cs: EmitContext now contains a flag indicating whether
31447         code is being generated in a static method or not.
31448
31449         * cs-parser.jay: DecomposeQI, new function that replaces the old
31450         QualifiedIdentifier.  Now we always decompose the assembled
31451         strings from qualified_identifier productions into a group of
31452         memberaccesses.
31453
31454 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31455
31456         * rootcontext.cs: Deal with field-less struct types correctly now
31457         by passing the size option to Define Type.
31458
31459         * class.cs: Removed hack that created one static field. 
31460
31461 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31462
31463         * statement.cs: Moved most of the code generation here. 
31464
31465 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31466
31467         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31468         seem very right.
31469
31470         (ElementAccess): Remove useless bits for now - keep checks as the spec
31471         says.
31472
31473 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31474
31475         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31476         and start performing checks according to the spec.
31477
31478 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31479
31480         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31481         rank_specifiers instead.
31482
31483         (rank_specifiers): Change the order in which the rank specifiers are stored
31484
31485         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31486
31487         * expression.cs (ElementAccess): Implement the LValue interface too.
31488
31489 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31490
31491         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31492         except that user defined conversions are not included.
31493
31494         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31495         perform the conversion of the return type, if necessary.
31496
31497         (New::DoResolve): Check whether we are creating an array or an object
31498         and accordingly do the needful.
31499
31500         (New::Emit): Same here.
31501
31502         (New::DoResolve): Implement guts of array creation.
31503
31504         (New::FormLookupType): Helper function.
31505
31506 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31507
31508         * codegen.cs: Removed most of the code generation here, and move the
31509         corresponding code generation bits to the statement classes. 
31510
31511         Added support for try/catch/finalize and throw.
31512
31513         * cs-parser.jay: Added support for try/catch/finalize.
31514
31515         * class.cs: Catch static methods having the flags override,
31516         virtual or abstract.
31517
31518         * expression.cs (UserCast): This user cast was not really doing
31519         what it was supposed to do.  Which is to be born in fully resolved
31520         state.  Parts of the resolution were being performed at Emit time! 
31521
31522         Fixed this code.
31523
31524 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31525
31526         * expression.cs: Implicity convert the result from UserCast.
31527
31528 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31529
31530         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31531         prevented it from working correctly. 
31532
31533         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31534         merely ConvertImplicit.
31535
31536 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31537
31538         * typemanager.cs: Make the LookupTypeContainer function static,
31539         and not per-instance.  
31540
31541         * class.cs: Make static FindMembers (the one that takes a Type
31542         argument). 
31543
31544         * codegen.cs: Add EmitForeach here.
31545
31546         * cs-parser.jay: Make foreach a toplevel object instead of the
31547         inline expansion, as we need to perform semantic analysis on it. 
31548
31549 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31550
31551         * expression.cs (Expression::ImplicitUserConversion): Rename to
31552         UserDefinedConversion.
31553
31554         (Expression::UserDefinedConversion): Take an extra argument specifying 
31555         whether we look for explicit user conversions too.
31556
31557         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31558
31559         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31560
31561         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31562         with the appropriate arguments.
31563
31564         * cs-parser.jay (cast_expression): Record location too.
31565
31566         * expression.cs (Cast): Record location info.
31567
31568         (Expression::ConvertExplicit): Take location argument.
31569
31570         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31571         to determine if we are doing explicit conversions.
31572
31573         (UserCast::Emit): Update accordingly.
31574
31575         (Expression::ConvertExplicit): Report an error if everything fails.
31576
31577         * ../errors/cs0030.cs : Add.
31578
31579 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31580
31581         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31582         virtual and newslot bits. 
31583
31584         * class.cs (TypeContainer::RegisterRequiredImplementations):
31585         Record methods we need.
31586
31587         (TypeContainer::MakeKey): Helper function to make keys for
31588         MethodBases, since the Methodbase key is useless.
31589
31590         (TypeContainer::Populate): Call RegisterRequiredImplementations
31591         before defining the methods.   
31592
31593         Create a mapping for method_builders_to_methods ahead of time
31594         instead of inside a tight loop.
31595
31596         (::RequireMethods):  Accept an object as the data to set into the
31597         hashtable so we can report interface vs abstract method mismatch.
31598
31599 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31600
31601         * report.cs: Make all of it static.
31602
31603         * rootcontext.cs: Drop object_type and value_type computations, as
31604         we have those in the TypeManager anyways.
31605
31606         Drop report instance variable too, now it is a global.
31607
31608         * driver.cs: Use try/catch on command line handling.
31609
31610         Add --probe option to debug the error reporting system with a test
31611         suite. 
31612
31613         * report.cs: Add support for exiting program when a probe
31614         condition is reached.
31615
31616 2001-10-03  Ravi Pratap  <ravi@ximian.com>
31617
31618         * expression.cs (Binary::DoNumericPromotions): Fix the case when
31619         we do a forcible conversion regardless of type, to check if 
31620         ForceConversion returns a null.
31621
31622         (Binary::error19): Use location to report error.
31623
31624         (Unary::error23): Use location here too.
31625
31626         * ../errors/cs0019.cs : Check in.
31627
31628         * ../errors/cs0023.cs : Check in.
31629
31630         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
31631         case of a non-null MethodInfo object with a length of 0 !
31632
31633         (Binary::ResolveOperator): Flag error if overload resolution fails to find
31634         an applicable member - according to the spec :-)
31635         Also fix logic to find members in base types.
31636
31637         (Unary::ResolveOperator): Same here.
31638
31639         (Unary::report23): Change name to error23 and make first argument a TypeContainer
31640         as I was getting thoroughly confused between this and error19 :-)
31641
31642         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
31643         (::FindMostEncompassedType): Implement.
31644         (::FindMostEncompassingType): Implement.
31645         (::StandardConversionExists): Implement.
31646
31647         (UserImplicitCast): Re-vamp. We now need info about most specific
31648         source and target types so that we can do the necessary conversions.
31649
31650         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
31651         mathematical union with no duplicates.
31652
31653 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31654
31655         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
31656         in order from base classes to child classes, so that we can in
31657         child classes look up in our parent for method names and
31658         attributes (required for handling abstract, virtual, new, override
31659         constructs: we need to instrospect our base class, and if we dont
31660         populate the classes in order, the introspection might be
31661         incorrect.  For example, a method could query its parent before
31662         the parent has any methods and would determine that the parent has
31663         no abstract methods (while it could have had them)).
31664
31665         (RootContext::CreateType): Record the order in which we define the
31666         classes.
31667
31668 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
31669
31670         * class.cs (TypeContainer::Populate): Also method definitions can
31671         fail now, keep track of this.
31672
31673         (TypeContainer::FindMembers): Implement support for
31674         DeclaredOnly/noDeclaredOnly flag.
31675
31676         (Constructor::Emit) Return the ConstructorBuilder.
31677
31678         (Method::Emit) Return the MethodBuilder. 
31679         Check for abstract or virtual methods to be public.
31680
31681         * rootcontext.cs (RootContext::CreateType): Register all the
31682         abstract methods required for the class to be complete and the
31683         interface methods that must be implemented. 
31684
31685         * cs-parser.jay: Report error 501 (method requires body if it is
31686         not marked abstract or extern).
31687
31688         * expression.cs (TypeOf::Emit): Implement.
31689
31690         * typemanager.cs: runtime_handle_type, new global type.
31691
31692         * class.cs (Property::Emit): Generate code for properties.
31693
31694 2001-10-02  Ravi Pratap  <ravi@ximian.com>
31695
31696         * expression.cs (Unary::ResolveOperator): Find operators on base type
31697         too - we now conform exactly to the spec.
31698
31699         (Binary::ResolveOperator): Same here.
31700
31701         * class.cs (Operator::Define): Fix minor quirk in the tests.
31702
31703         * ../errors/cs0215.cs : Added.
31704
31705         * ../errors/cs0556.cs : Added.
31706
31707         * ../errors/cs0555.cs : Added.
31708
31709 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31710
31711         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
31712         single integer which is really efficient
31713
31714 2001-10-01  Ravi Pratap  <ravi@ximian.com>
31715
31716         *  expression.cs (Expression::ImplicitUserConversion): Use location
31717         even in the case when we are examining True operators.
31718  
31719         * class.cs (Operator::Define): Perform extensive checks to conform
31720         with the rules for operator overloading in the spec.
31721
31722         * expression.cs (Expression::ImplicitReferenceConversion): Implement
31723         some of the other conversions mentioned in the spec.
31724
31725         * typemanager.cs (array_type): New static member for the System.Array built-in
31726         type.
31727
31728         (cloneable_interface): For System.ICloneable interface.
31729
31730         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
31731         we start resolving the tree and populating types.
31732
31733         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
31734  
31735 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31736
31737         * expression.cs (Expression::ExprClassFromMemberInfo,
31738         Expression::Literalize): Create literal expressions from
31739         FieldInfos which are literals.
31740
31741         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
31742         type casts, because they were wrong.  The test suite in tests
31743         caught these ones.
31744
31745         (ImplicitNumericConversion): ushort to ulong requires a widening
31746         cast. 
31747
31748         Int32 constant to long requires widening cast as well.
31749
31750         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
31751         for integers because the type on the stack is not i4.
31752
31753 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
31754
31755         * expression.cs (report118): require location argument. 
31756
31757         * parameter.cs: Do not dereference potential null value.
31758
31759         * class.cs: Catch methods that lack the `new' keyword when
31760         overriding a name.  Report warnings when `new' is used without
31761         anything being there to override.
31762
31763         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
31764
31765         * class.cs: Only add constructor to hashtable if it is non-null
31766         (as now constructors can fail on define).
31767
31768         (TypeManager, Class, Struct): Take location arguments.
31769
31770         Catch field instance initialization in structs as errors.
31771
31772         accepting_filter: a new filter for FindMembers that is static so
31773         that we dont create an instance per invocation.
31774
31775         (Constructor::Define): Catch errors where a struct constructor is
31776         parameterless 
31777
31778         * cs-parser.jay: Pass location information for various new
31779         constructs. 
31780
31781         * delegate.cs (Delegate): take a location argument.
31782
31783         * driver.cs: Do not call EmitCode if there were problesm in the
31784         Definition of the types, as many Builders wont be there. 
31785
31786         * decl.cs (Decl::Decl): Require a location argument.
31787
31788         * cs-tokenizer.cs: Handle properly hex constants that can not fit
31789         into integers, and find the most appropiate integer for it.
31790
31791         * literal.cs: Implement ULongLiteral.
31792
31793         * rootcontext.cs: Provide better information about the location of
31794         failure when CreateType fails.
31795
31796 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
31797
31798         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
31799         as well.
31800
31801         * expression.cs (Binary::CheckShiftArguments): Add missing type
31802         computation.
31803         (Binary::ResolveOperator): Add type to the logical and and logical
31804         or, Bitwise And/Or and Exclusive Or code paths, it was missing
31805         before.
31806
31807         (Binary::DoNumericPromotions): In the case where either argument
31808         is ulong (and most signed types combined with ulong cause an
31809         error) perform implicit integer constant conversions as well.
31810
31811 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31812
31813         * expression.cs (UserImplicitCast): Method should always be
31814         non-null. 
31815         (Invocation::BetterConversion): Simplified test for IntLiteral.
31816
31817         (Expression::ImplicitNumericConversion): Split this routine out.
31818         Put the code that performs implicit constant integer conversions
31819         here. 
31820
31821         (Expression::Resolve): Become a wrapper around DoResolve so we can
31822         check eclass and type being set after resolve.
31823
31824         (Invocation::Badness): Remove this dead function
31825
31826         (Binary::ResolveOperator): Do not compute the expensive argumnets
31827         unless we have a union for it.
31828
31829         (Probe::Emit): Is needs to do an isinst and then
31830         compare against null.
31831
31832         (::CanConvert): Added Location argument.  If the Location argument
31833         is null (Location.Null), then we do not report errors.  This is
31834         used by the `probe' mechanism of the Explicit conversion.  We do
31835         not want to generate an error for something that the user
31836         explicitly requested to be casted.  But the pipeline for an
31837         explicit cast first tests for potential implicit casts.
31838
31839         So for now, if the Location is null, it means `Probe only' to
31840         avoid adding another argument.   Might have to revise this
31841         strategy later.
31842
31843         (ClassCast): New class used to type cast objects into arbitrary
31844         classes (used in Explicit Reference Conversions).
31845
31846         Implement `as' as well.
31847
31848         Reverted all the patches from Ravi below: they were broken:
31849
31850                 * The use of `level' as a mechanism to stop recursive
31851                   invocations is wrong.  That was there just to catch the
31852                   bug with a strack trace but not as a way of addressing
31853                   the problem.
31854
31855                   To fix the problem we have to *understand* what is going
31856                   on and the interactions and come up with a plan, not
31857                   just get things going.
31858
31859                 * The use of the type conversion cache that I proposed
31860                   last night had an open topic: How does this work across
31861                   protection domains.  A user defined conversion might not
31862                   be public in the location where we are applying the
31863                   conversion, a different conversion might be selected
31864                   (ie, private A->B (better) but public B->A (worse),
31865                   inside A, A->B applies, but outside it, B->A will
31866                   apply).
31867
31868                 * On top of that (ie, even if the above is solved),
31869                   conversions in a cache need to be abstract.  Ie, `To
31870                   convert from an Int to a Short use an OpcodeCast', not
31871                   `To convert from an Int to a Short use the OpcodeCast on
31872                   the variable 5' (which is what this patch was doing).
31873
31874 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31875
31876         * expression.cs (Invocation::ConversionExists): Re-write to use
31877         the conversion cache
31878
31879         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
31880         cache all conversions done, not just user-defined ones.
31881
31882         (Invocation::BetterConversion): The real culprit. Use ConversionExists
31883         to determine if a conversion exists instead of acutually trying to 
31884         perform the conversion. It's faster too.
31885
31886         (Expression::ConvertExplicit): Modify to use ConversionExists to check
31887         and only then attempt the implicit conversion.
31888
31889 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31890
31891         * expression.cs (ConvertImplicit): Use a cache for conversions
31892         already found. Check level of recursion and bail out if necessary.
31893
31894 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31895
31896         * typemanager.cs (string_concat_string_string, string_concat_object_object):
31897         Export standard methods that we expect for string operations.
31898
31899         * statement.cs (Block::UsageWarning): Track usage of variables and
31900         report the errors for not used variables.
31901
31902         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
31903         operator. 
31904
31905 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
31906
31907         * codegen.cs: remove unnneded code 
31908
31909         * expression.cs: Removed BuiltinTypeAccess class
31910
31911         Fix the order in which implicit conversions are
31912         done.  
31913
31914         The previous fixed dropped support for boxed conversions (adding a
31915         test to the test suite now)
31916
31917         (UserImplicitCast::CanConvert): Remove test for source being null,
31918         that code is broken.  We should not feed a null to begin with, if
31919         we do, then we should track the bug where the problem originates
31920         and not try to cover it up here.
31921
31922         Return a resolved expression of type UserImplicitCast on success
31923         rather than true/false.  Ravi: this is what I was talking about,
31924         the pattern is to use a static method as a "constructor" for
31925         objects. 
31926
31927         Also, do not create arguments until the very last minute,
31928         otherwise we always create the arguments even for lookups that
31929         will never be performed. 
31930
31931         (UserImplicitCast::Resolve): Eliminate, objects of type
31932         UserImplicitCast are born in a fully resolved state. 
31933
31934         * typemanager.cs (InitCoreTypes): Init also value_type
31935         (System.ValueType). 
31936
31937         * expression.cs (Cast::Resolve): First resolve the child expression.
31938
31939         (LValue): Add new method AddressOf to be used by
31940         the `&' operator.  
31941
31942         Change the argument of Store to take an EmitContext instead of an
31943         ILGenerator, because things like FieldExpr need to be able to call
31944         their children expression to generate the instance code. 
31945
31946         (Expression::Error, Expression::Warning): Sugar functions for
31947         reporting errors.
31948
31949         (Expression::MemberLookup): Accept a TypeContainer instead of a
31950         Report as the first argument.
31951
31952         (Expression::ResolvePrimary): Killed.  I still want to improve
31953         this as currently the code is just not right.
31954
31955         (Expression::ResolveMemberAccess): Simplify, but it is still
31956         wrong. 
31957
31958         (Unary::Resolve): Catch errors in AddressOf operators.
31959
31960         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
31961         index to a byte for the short-version, or the compiler will choose
31962         the wrong Emit call, which generates the wrong data.
31963
31964         (ParameterReference::Emit, ::Store): same.
31965
31966         (FieldExpr::AddressOf): Implement.
31967
31968         * typemanager.cs: TypeManager: made public variable instead of
31969         property.
31970
31971         * driver.cs: document --fatal.
31972
31973         * report.cs (ErrorMessage, WarningMessage): new names for the old
31974         Error and Warning classes.
31975
31976         * cs-parser.jay (member_access): Turn built-in access to types
31977         into a normal simplename
31978
31979 2001-09-27  Ravi Pratap  <ravi@ximian.com>
31980
31981         * expression.cs (Invocation::BetterConversion): Fix to cope
31982         with q being null, since this was introducing a bug.
31983
31984         * expression.cs (ConvertImplicit): Do built-in conversions first.
31985
31986 2001-09-27  Ravi Pratap  <ravi@ximian.com>
31987
31988         * expression.cs (UserImplicitCast::Resolve): Fix bug.
31989
31990 2001-09-27  Ravi Pratap  <ravi@ximian.com>
31991
31992         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
31993         I had introduced long ago (what's new ?).
31994
31995         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
31996         the work of all the checking. 
31997         (ConvertImplicit): Call CanConvert and only then create object if necessary.
31998         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
31999
32000         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32001         that is the right way. 
32002
32003         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32004         overloading resolution. Use everywhere instead of cutting and pasting code.
32005
32006         (Binary::ResolveOperator): Use MakeUnionSet.
32007
32008         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32009         we have to convert to bool types. Not complete yet.
32010
32011 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32012
32013         * typemanager.cs (TypeManager::CSharpName): support ushort.
32014
32015         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32016         to provide an expression that performsn an implicit constant int
32017         conversion (section 6.1.6).
32018         (Expression::ConvertImplicitRequired): Reworked to include
32019         implicit constant expression conversions.
32020
32021         (Expression::ConvertNumericExplicit): Finished.
32022
32023         (Invocation::Emit): If InstanceExpression is null, then it means
32024         that we perform a call on this.
32025
32026 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32027
32028         * expression.cs (Unary::Emit): Remove some dead code.
32029         (Probe): Implement Resolve and Emit for `is'.
32030         (Expression::ConvertImplicitRequired): Attempt to do constant
32031         expression conversions here.  Maybe should be moved to
32032         ConvertImplicit, but I am not sure.
32033         (Expression::ImplicitLongConstantConversionPossible,
32034         Expression::ImplicitIntConstantConversionPossible): New functions
32035         that tell whether is it possible to apply an implicit constant
32036         expression conversion.
32037
32038         (ConvertNumericExplicit): Started work on explicit numeric
32039         conversions.
32040
32041         * cs-parser.jay: Update operator constants.
32042
32043         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32044         (Parameters::GetSignature): Hook up VerifyArgs here.
32045         (Parameters::VerifyArgs): Verifies that no two arguments have the
32046         same name. 
32047
32048         * class.cs (Operator): Update the operator names to reflect the
32049         ones that the spec expects (as we are just stringizing the
32050         operator names).
32051
32052         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32053         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32054         previous usage did only work for our methods.
32055         (Expression::ConvertImplicit): Handle decimal implicit numeric
32056         conversions as well.
32057         (Expression::InternalTypeConstructor): Used to invoke constructors
32058         on internal types for default promotions.
32059
32060         (Unary::Emit): Implement special handling for the pre/post
32061         increment/decrement for overloaded operators, as they need to have
32062         the same semantics as the other operators.
32063
32064         (Binary::ResolveOperator): ditto.
32065         (Invocation::ConversionExists): ditto.
32066         (UserImplicitCast::Resolve): ditto.
32067
32068 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32069
32070         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32071         operator, return after emitting body. Regression tests pass again !
32072
32073         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32074         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32075         (Invocation::OverloadResolve): Ditto.
32076         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32077
32078         * everywhere : update calls to the above methods accordingly.
32079
32080 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32081
32082         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32083
32084         * expression.cs (ExpressionStatement): New base class used for
32085         expressions that can appear in statements, so that we can provide
32086         an alternate path to generate expression that do not leave a value
32087         on the stack.
32088
32089         (Expression::Emit, and all the derivatives): We no longer return
32090         whether a value is left on the stack or not.  Every expression
32091         after being emitted leaves a single value on the stack.
32092
32093         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32094         facilties of ExpressionStatement if possible.
32095
32096         * cs-parser.jay: Update statement_expression.
32097
32098 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32099
32100         * driver.cs: Change the wording of message
32101
32102 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32103
32104         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32105         the type of the expression to the return type of the method if
32106         we have an overloaded operator match ! The regression tests pass again !
32107         (Unary::ResolveOperator): Ditto.
32108
32109         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32110         to find "op_Implicit", not "implicit" ;-)
32111         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32112         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32113
32114         * everywhere : Correct calls to the above accordingly.
32115
32116         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32117         (ConvertImplicit): Do user-defined conversion if it exists.
32118
32119 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32120
32121         * assign.cs: track location.
32122         (Resolve): Use implicit conversions on assignment.
32123
32124         * literal.cs: Oops.  Not good, Emit of short access values should
32125         pass (Bytes) or the wrong argument will be selected.
32126
32127         * expression.cs (Unary::Emit): Emit code for -expr.
32128
32129         (Unary::ResolveOperator): Handle `Substract' for non-constants
32130         (substract from zero from the non-constants).
32131         Deal with Doubles as well. 
32132
32133         (Expression::ConvertImplicitRequired): New routine that reports an
32134         error if no implicit conversion exists. 
32135
32136         (Invocation::OverloadResolve): Store the converted implicit
32137         expressions if we make them
32138
32139 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32140
32141         * class.cs (ConstructorInitializer): Take a Location argument.
32142         (ConstructorBaseInitializer): Same here.
32143         (ConstructorThisInitializer): Same here.
32144
32145         * cs-parser.jay : Update all calls accordingly.
32146
32147         * expression.cs (Unary, Binary, New): Take location argument.
32148         Update accordingly everywhere.
32149
32150         * cs-parser.jay : Update all calls to the above to take a location
32151         argument.
32152
32153         * class.cs : Ditto.
32154
32155 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32156
32157         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32158         (Invocation::BetterConversion): Same here
32159         (Invocation::ConversionExists): Ditto.
32160
32161         (Invocation::ConversionExists): Implement.
32162
32163 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32164
32165         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32166         Also take an additional TypeContainer argument.
32167
32168         * All over : Pass in TypeContainer as argument to OverloadResolve.
32169
32170         * typemanager.cs (CSharpName): Update to check for the string type and return
32171         that too.
32172
32173         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32174         a given method.
32175
32176 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32177
32178         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32179         (Invocation::BetterFunction): Implement.
32180         (Invocation::BetterConversion): Implement.
32181         (Invocation::ConversionExists): Skeleton, no implementation yet.
32182
32183         Okay, things work fine !
32184
32185 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32186
32187         * typemanager.cs: declare and load enum_type, delegate_type and
32188         void_type. 
32189
32190         * expression.cs (Expression::Emit): Now emit returns a value that
32191         tells whether a value is left on the stack or not.  This strategy
32192         might be reveted tomorrow with a mechanism that would address
32193         multiple assignments.
32194         (Expression::report118): Utility routine to report mismatches on
32195         the ExprClass.
32196
32197         (Unary::Report23): Report impossible type/operator combination
32198         utility function.
32199
32200         (Unary::IsIncrementableNumber): Whether the type can be
32201         incremented or decremented with add.
32202         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32203         complemented. 
32204         (Unary::ResolveOperator): Implement ++, !, ~,
32205
32206         (Invocation::Emit): Deal with new Emit convetion.
32207
32208         * All Expression derivatives: Updated their Emit method to return
32209         whether they leave values on the stack or not.
32210
32211         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32212         stack for expressions that are statements. 
32213
32214 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32215
32216         * expression.cs (LValue): New interface.  Must be implemented by
32217         LValue objects.
32218         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32219         LValue interface.
32220
32221         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32222         interface for generating code, simplifies the code.
32223
32224 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32225
32226         * expression.cs (everywhere): Comment out return statements in ::Resolve
32227         methods to avoid the warnings.
32228
32229 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32230
32231         * driver.cs (parse): Report error 2001 if we can not open the
32232         source file.
32233
32234         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32235         not resolve it.
32236
32237         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32238         object. 
32239
32240         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32241         otherwise nested blocks end up with the same index.
32242
32243         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32244
32245         * expression.cs:  Instead of having FIXMEs in the Resolve
32246         functions, throw exceptions so it is obvious that we are facing a
32247         bug. 
32248
32249         * cs-parser.jay (invocation_expression): Pass Location information.
32250
32251         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32252         Use a basename for those routines because .NET does not like paths
32253         on them. 
32254
32255         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32256         already defined.
32257
32258 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32259
32260         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32261         are loading the correct data types (throws an exception if not).
32262         (TypeManager::InitCoreTypes): Use CoreLookupType
32263
32264         * expression.cs (Unary::ResolveOperator): return the child
32265         expression for expressions which are just +expr.
32266         (Unary::ResolveOperator): Return negative literals for -LITERAL
32267         expressions (otherwise they are Unary {Literal}).
32268         (Invocation::Badness): Take into account `Implicit constant
32269         expression conversions'.
32270
32271         * literal.cs (LongLiteral): Implement long literal class.
32272         (IntLiteral): export the `Value' of the intliteral. 
32273
32274 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32275
32276         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32277
32278         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32279         instead of 'Operator'
32280
32281         * expression.cs (Binary::ResolveOperator): Update accordingly.
32282         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32283         and 'Minus'
32284
32285         * cs-parser.jay (unary_expression): Update to use the new names.
32286
32287         * gen-treedump.cs (GetUnary): Same here.
32288
32289         * expression.cs (Unary::Resolve): Implement.
32290         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32291         operators are found instead of making noise ;-)
32292         (Unary::ResolveOperator): New method to do precisely the same thing which
32293         Binary::ResolveOperator does for Binary expressions.
32294         (Unary.method, .Arguments): Add.
32295         (Unary::OperName): Implement.   
32296         (Unary::ForceConversion): Copy and Paste !
32297
32298         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32299         a unary operator.
32300
32301         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32302         for the inbuilt operators. Only overloading works for now ;-)
32303
32304 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32305
32306         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32307         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32308
32309         * expression.cs (This::Emit): Implement. 
32310         (This::Resolve): Implement.
32311         (TypeOf:Resolve): Implement.
32312         (Expression::ResolveSimpleName): Add an implicit this to instance
32313         field references. 
32314         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32315         Bind instance variable to Field expressions.
32316         (FieldExpr::Instance): New field used to track the expression that
32317         represents the object instance.
32318         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32319         binding 
32320         (FieldExpr::Emit): Implement.
32321
32322         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32323         the last instruction contains a return opcode to avoid generating
32324         the last `ret' instruction (this generates correct code, and it is
32325         nice to pass the peverify output).
32326
32327         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32328         initializer for static and instance variables.
32329         (Constructor::Emit): Allow initializer to be null in the case of
32330         static constructors.  Only emit initializer for instance
32331         constructors. 
32332
32333         (TypeContainer::FindMembers): Return a null array if there are no
32334         matches.
32335
32336         Also fix the code for the MemberTypes.Method branch, as it was not
32337         scanning that for operators (or tried to access null variables before).
32338
32339         * assign.cs (Assign::Emit): Handle instance and static fields. 
32340
32341         * TODO: Updated.
32342
32343         * driver.cs: Stop compilation if there are parse errors.
32344
32345         * cs-parser.jay (constructor_declaration): Provide default base
32346         initializer for non-static constructors.
32347         (constructor_declarator): Do not provide a default base
32348         initializers if none was specified.
32349         Catch the fact that constructors should not have parameters.
32350
32351         * class.cs: Do not emit parent class initializers for static
32352         constructors, that should be flagged as an error.
32353
32354 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32355
32356         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32357         Move back code into TypeContainer::Populate.
32358
32359 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32360
32361         * class.cs (TypeContainer::AddConstructor): Fix the check to
32362         compare against Name, not Basename. 
32363         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32364
32365         * cs-parser.jay : Update accordingly.
32366
32367         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32368         for methods, don't forget to look into the operators too.
32369         (RegisterMethodBuilder): Helper method to take care of this for
32370         methods, constructors and operators.
32371         (Operator::Define): Completely revamp.
32372         (Operator.OperatorMethod, MethodName): New fields.
32373         (TypeContainer::Populate): Move the registering of builders into
32374         RegisterMethodBuilder.
32375         (Operator::Emit): Re-write.
32376
32377         * expression.cs (Binary::Emit): Comment out code path to emit method
32378         invocation stuff for the case when we have a user defined operator. I am
32379         just not able to get it right !
32380
32381 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32382
32383         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32384         argument. 
32385
32386         (Expression::MemberLookup): Provide a version that allows to
32387         specify the MemberTypes and BindingFlags. 
32388
32389         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32390         so it was not fetching variable information from outer blocks.
32391
32392         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32393         Beforefieldinit as it was buggy.
32394
32395         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32396         that Ravi put here.  
32397
32398         * class.cs (Constructor::Emit): Only emit if block is not null.
32399         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32400         deal with this by semantically definining it as if the user had
32401         done it.
32402
32403         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32404         constructors as we now "emit" them at a higher level.
32405
32406         (TypeContainer::DefineDefaultConstructor): Used to define the
32407         default constructors if none was provided.
32408
32409         (ConstructorInitializer): Add methods Resolve and Emit. 
32410
32411         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32412
32413 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32414
32415         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32416         the default constructor builder with our hashtable for methodbuilders
32417         to methodcores.
32418
32419         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32420         and argument_count is 0 in which case we have a match.
32421         (Binary::ResolveOperator): More null checking and miscellaneous coding
32422         style cleanup.
32423
32424 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32425
32426         * rootcontext.cs (IsNameSpace): Compare against null.
32427
32428         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32429
32430         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32431         and Unary::Operator.
32432
32433         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32434         accordingly.
32435
32436         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32437         we have overloaded operators.
32438         (Binary::ResolveOperator): Implement the part which does the operator overload
32439         resolution.
32440
32441         * class.cs (Operator::Emit): Implement.
32442         (TypeContainer::Emit): Emit the operators we have too.
32443
32444         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32445         the case when we have a user-defined operator.
32446
32447 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32448
32449         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32450
32451 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32452
32453         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32454         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32455         (Constructor::Emit): Implement.
32456         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32457         if we have no work to do. 
32458         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32459         Emit method.
32460
32461         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32462         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32463
32464         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32465         of parent.parent.
32466
32467 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32468
32469         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32470         in the source.
32471         (Tree::RecordNamespace): Method to do what the name says ;-)
32472         (Tree::Namespaces): Property to get at the namespaces hashtable.
32473
32474         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32475         keep track.
32476
32477         * rootcontext.cs (IsNamespace): Fixed it :-)
32478
32479 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32480
32481         * class.cs (TypeContainer::FindMembers): Add support for
32482         constructors. 
32483         (MethodCore): New class that encapsulates both the shared aspects
32484         of a Constructor and a Method.  
32485         (Method, Constructor): Factored pieces into MethodCore.
32486
32487         * driver.cs: Added --fatal which makes errors throw exceptions.
32488         Load System assembly as well as part of the standard library.
32489
32490         * report.cs: Allow throwing exceptions on errors for debugging.
32491
32492         * modifiers.cs: Do not use `parent', instead use the real type
32493         container to evaluate permission settings.
32494
32495         * class.cs: Put Ravi's patch back in.  He is right, and we will
32496         have to cope with the
32497
32498 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32499
32500         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32501         FamORAssem, not FamANDAssem.
32502
32503 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32504
32505         * driver.cs: Added --parse option that only parses its input files
32506         and terminates.
32507
32508         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32509         incorrect.  IsTopLevel is not used to tell whether an object is
32510         root_types or not (that can be achieved by testing this ==
32511         root_types).  But to see if this is a top-level *class* (not
32512         necessarly our "toplevel" container). 
32513
32514 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32515
32516         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32517         parent instead of a direct call to GetType.
32518
32519 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32520
32521         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32522         Modifiers.TypeAttr. This should just be a call to that method.
32523
32524         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32525         object so that we can determine if we are top-level or not.
32526
32527         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32528         TypeContainer too.
32529
32530         * enum.cs (Enum::Define): Ditto.
32531
32532         * modifiers.cs (FieldAttr): Re-write.
32533
32534         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32535         (TypeContainer::HaveStaticConstructor): New property to provide access
32536         to precisely that info.
32537
32538         * modifiers.cs (MethodAttr): Re-write.
32539         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32540
32541         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32542         of top-level types as claimed.
32543
32544 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32545
32546         * expression.cs (MemberLookup): Fruitless attempt to lookup
32547         constructors.  Maybe I need to emit default constructors?  That
32548         might be it (currently .NET emits this for me automatically).
32549         (Invocation::OverloadResolve): Cope with Arguments == null.
32550         (Invocation::EmitArguments): new function, shared by the new
32551         constructor and us.
32552         (Invocation::Emit): Handle static and instance methods.  Emit
32553         proper call instruction for virtual or non-virtual invocations.
32554         (New::Emit): Implement.
32555         (New::Resolve): Implement.
32556         (MemberAccess:Resolve): Implement.
32557         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32558         to track instances.
32559         (FieldExpr::Resolve): Set type.
32560
32561         * support.cs: Handle empty arguments.
32562                 
32563         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32564         SimpleLookup): Auxiliary routines to help parse a qualifier
32565         identifier.  
32566
32567         Update qualifier_identifier rule.
32568
32569         * codegen.cs: Removed debugging messages.
32570
32571         * class.cs: Make this a global thing, this acts just as a "key" to
32572         objects that we might have around.
32573
32574         (Populate): Only initialize method_builders_to_methods once.
32575
32576         * expression.cs (PropertyExpr): Initialize type from the
32577         PropertyType. 
32578
32579         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32580         Resolve pattern.  Attempt to implicitly convert value to boolean.
32581         Emit code.
32582
32583         * expression.cs: Set the type for the int32/int32 argument case.
32584         (Binary::ResolveOperator): Set the return type to boolean for
32585         comparission operators
32586
32587         * typemanager.cs: Remove debugging print code.
32588
32589         (Invocation::Resolve): resolve type.
32590
32591         * class.cs: Allocate a MemberInfo of the correct size, as the code
32592         elsewhere depends on the test to reflect the correct contents.
32593
32594         (Method::) Keep track of parameters, due to System.Reflection holes
32595
32596         (TypeContainer::Populate): Keep track of MethodBuilders to Method
32597         mapping here.
32598
32599         (TypeContainer::FindMembers): Use ArrayList and then copy an array
32600         of the exact size and return that.
32601
32602         (Class::LookupMethodByBuilder): New function that maps
32603         MethodBuilders to its methods.  Required to locate the information
32604         on methods because System.Reflection bit us again.
32605
32606         * support.cs: New file, contains an interface ParameterData and
32607         two implementations: ReflectionParameters and InternalParameters
32608         used to access Parameter information.  We will need to grow this
32609         as required.
32610
32611         * expression.cs (Invocation::GetParameterData): implement a cache
32612         and a wrapper around the ParameterData creation for methods. 
32613         (Invocation::OverloadResolve): Use new code.
32614
32615 2001-09-13  Ravi Pratap  <ravi@ximian.com>
32616
32617         * class.cs (TypeContainer::EmitField): Remove and move into 
32618         (Field::Define): here and modify accordingly.
32619         (Field.FieldBuilder): New member.
32620         (TypeContainer::Populate): Update accordingly.
32621         (TypeContainer::FindMembers): Implement.
32622
32623 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32624
32625         * statement.cs: (VariableInfo::VariableType): New field to be
32626         initialized with the full type once it is resolved. 
32627
32628 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
32629
32630         * parameter.cs (GetParameterInfo): Use a type cache to compute
32631         things only once, and to reuse this information
32632
32633         * expression.cs (LocalVariableReference::Emit): Implement.
32634         (OpcodeCast::Emit): fix.
32635
32636         (ParameterReference::Resolve): Implement.
32637         (ParameterReference::Emit): Implement.
32638
32639         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
32640         that are expressions need to stay as Expressions.
32641
32642         * typemanager.cs (CSharpName): Returns the C# name of a type if
32643         possible. 
32644
32645         * expression.cs (Expression::ConvertImplicit): New function that
32646         implements implicit type conversions.
32647
32648         (Expression::ImplicitReferenceConversion): Implements implicit
32649         reference conversions.
32650
32651         (EmptyCast): New type for transparent casts.
32652
32653         (OpcodeCast): New type for casts of types that are performed with
32654         a sequence of bytecodes.
32655
32656         (BoxedCast): New type used for casting value types into reference
32657         types.  Emits a box opcode.
32658
32659         (Binary::DoNumericPromotions): Implements numeric promotions of
32660         and computation of the Binary::Type.
32661
32662         (Binary::EmitBranchable): Optimization.
32663
32664         (Binary::Emit): Implement code emission for expressions.
32665
32666         * typemanager.cs (TypeManager): Added two new core types: sbyte
32667         and byte.
32668
32669 2001-09-12  Ravi Pratap  <ravi@ximian.com>
32670
32671         * class.cs (TypeContainer::FindMembers): Method which does exactly
32672         what Type.FindMembers does, only we don't have to use reflection. No
32673         implementation yet.
32674
32675         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
32676         typecontainer objects as we need to get at them.
32677         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
32678
32679         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
32680         typecontainer object.
32681
32682         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
32683         of just a Report object.
32684
32685 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32686
32687         * class.cs (Event::Define): Go back to using the prefixes "add_" and
32688         "remove_"
32689         (TypeContainer::Populate): Now define the delegates of the type too.
32690         (TypeContainer.Delegates): Property to access the list of delegates defined
32691         in the type.
32692
32693         * delegates.cs (Delegate::Define): Implement partially.
32694
32695         * modifiers.cs (TypeAttr): Handle more flags.
32696
32697 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32698
32699         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
32700         and not <=
32701         (Operator::Define): Re-write logic to get types by using the LookupType method
32702         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
32703         (Indexer::Define): Ditto.
32704         (Event::Define): Ditto.
32705         (Property::Define): Ditto.
32706
32707 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32708
32709         * class.cs (TypeContainer::Populate): Now define operators too. 
32710         (TypeContainer.Operators): New property to access the list of operators
32711         in a type.
32712         (Operator.OperatorMethodBuilder): New member to hold the method builder
32713         for the operator we are defining.
32714         (Operator::Define): Implement.
32715
32716 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32717
32718         * class.cs (Event::Define): Make the prefixes of the accessor methods
32719         addOn_ and removeOn_ 
32720
32721         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
32722         of the location being passed in too. Ideally, this should go later since all
32723         error reporting should be done through the Report object.
32724
32725         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
32726         (Populate): Iterate thru the indexers we have and define them too.
32727         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
32728         for the get and set accessors.
32729         (Indexer::Define): Implement.
32730
32731 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
32732
32733         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
32734         my previous implementation, did not work.
32735
32736         * typemanager.cs: Add a couple of missing types (the longs).
32737
32738         * literal.cs: Use TypeManager.bool_type instead of getting it.
32739
32740         * expression.cs (EventExpr): New kind of expressions.
32741         (Expressio::ExprClassFromMemberInfo): finish
32742
32743 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
32744
32745         * assign.cs: Emit stores to static fields differently.
32746
32747 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32748
32749         * Merge in changes and adjust code to tackle conflicts. Backed out my
32750         code in Assign::Resolve ;-) 
32751
32752 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32753
32754         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
32755         instead Report.Error and also pass in the location.
32756         (CSharpParser::Lexer): New readonly property to return the reference
32757         to the Tokenizer object.
32758         (declare_local_variables): Use Report.Error with location instead of plain 
32759         old error.
32760         (CheckDef): Ditto.
32761
32762         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
32763         (Operator.CheckBinaryOperator): Ditto.
32764
32765         * cs-parser.jay (operator_declarator): Update accordingly.
32766
32767         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
32768         (CheckBinaryOperator): Same here.
32769
32770         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
32771         on the name without any prefixes of namespace names etc. This is because we
32772         already might have something already fully qualified like 
32773         'System.Console.WriteLine'
32774
32775         * assign.cs (Resolve): Begin implementation. Stuck ;-)
32776
32777 2001-09-07  Ravi Pratap  <ravi@ximian.com>
32778
32779         * cs-tokenizer.cs (location): Return a string which also contains
32780         the file name.
32781
32782         * expression.cs (ElementAccess): New class for expressions of the
32783         type 'element access.'
32784         (BaseAccess): New class for expressions of the type 'base access.'
32785         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
32786         respectively.
32787
32788         * cs-parser.jay (element_access): Implement action.
32789         (base_access): Implement actions.
32790         (checked_expression, unchecked_expression): Implement.
32791
32792         * cs-parser.jay (local_variable_type): Correct and implement.
32793         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
32794
32795         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
32796
32797         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
32798         name and the specifiers.
32799
32800         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
32801
32802         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
32803         making them all public ;-)
32804
32805         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
32806         class anyways.
32807
32808 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
32809
32810         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
32811         PropertyExprs.
32812         (FieldExpr, PropertyExprs): New resolved expressions.
32813         (SimpleName::MemberStaticCheck): Perform static checks for access
32814         to non-static fields on static methods. Maybe this should be
32815         generalized for MemberAccesses. 
32816         (SimpleName::ResolveSimpleName): More work on simple name
32817         resolution. 
32818
32819         * cs-parser.jay (primary_expression/qualified_identifier): track
32820         the parameter index.
32821
32822         * codegen.cs (CodeGen::Save): Catch save exception, report error.
32823         (EmitContext::EmitBoolExpression): Chain to expression generation
32824         instead of temporary hack.
32825         (::EmitStatementExpression): Put generic expression code generation.
32826
32827         * assign.cs (Assign::Emit): Implement variable assignments to
32828         local variables, parameters and fields.
32829
32830 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
32831
32832         * statement.cs (Block::GetVariableInfo): New method, returns the
32833         VariableInfo for a variable name in a block.
32834         (Block::GetVariableType): Implement in terms of GetVariableInfo
32835
32836         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
32837         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
32838
32839 2001-09-06  Ravi Pratap  <ravi@ximian.com>
32840
32841         * cs-parser.jay (operator_declaration): Continue on my quest : update
32842         to take attributes argument.
32843         (event_declaration): Ditto.
32844         (enum_declaration): Ditto.
32845         (indexer_declaration): Ditto.
32846
32847         * class.cs (Operator::Operator): Update constructor accordingly.
32848         (Event::Event): Ditto.
32849
32850         * delegate.cs (Delegate::Delegate): Same here.
32851
32852         * enum.cs (Enum::Enum): Same here.
32853
32854 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32855
32856         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
32857
32858         * ../tests/cs0658.cs : New file to demonstrate error 0658.
32859
32860         * attribute.cs (Attributes): New class to encapsulate all attributes which were
32861         being passed around as an arraylist.
32862         (Attributes::AddAttribute): Method to add attribute sections.
32863
32864         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
32865         (struct_declaration): Update accordingly.
32866         (constant_declaration): Update.
32867         (field_declaration): Update.
32868         (method_header): Update.
32869         (fixed_parameter): Update.
32870         (parameter_array): Ditto.
32871         (property_declaration): Ditto.
32872         (destructor_declaration): Ditto.
32873
32874         * class.cs (Struct::Struct): Update constructors accordingly.
32875         (Class::Class): Ditto.
32876         (Field::Field): Ditto.
32877         (Method::Method): Ditto.
32878         (Property::Property): Ditto.
32879         (TypeContainer::OptAttribute): update property's return type.
32880
32881         * interface.cs (Interface.opt_attributes): New member.
32882         (Interface::Interface): Update to take the extra Attributes argument.
32883
32884         * parameter.cs (Parameter::Parameter): Ditto.
32885
32886         * constant.cs (Constant::Constant): Ditto.
32887
32888         * interface.cs (InterfaceMemberBase): New OptAttributes field.
32889         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
32890         the attributes as a parameter.
32891         (InterfaceProperty): Update constructor call.
32892         (InterfaceEvent): Ditto.
32893         (InterfaceMethod): Ditto.
32894         (InterfaceIndexer): Ditto.
32895
32896         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
32897         pass the attributes too.
32898         (interface_event_declaration): Ditto.
32899         (interface_property_declaration): Ditto.
32900         (interface_method_declaration): Ditto.
32901         (interface_declaration): Ditto.
32902
32903 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
32904
32905         * class.cs (Method::Define): Track the "static Main" definition to
32906         create an entry point. 
32907
32908         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
32909         EntryPoint if we find it. 
32910
32911         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
32912         (EmitContext::ig): Make this variable public.
32913
32914         * driver.cs: Make the default output file be the first file name
32915         with the .exe extension.  
32916
32917         Detect empty compilations
32918
32919         Handle various kinds of output targets.  Handle --target and
32920         rename -t to --dumper.
32921
32922         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
32923         methods inherited from Expression return now an Expression.  This
32924         will is used during the tree rewriting as we resolve them during
32925         semantic analysis.
32926
32927         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
32928         the spec.  Missing entirely is the information about
32929         accessability of elements of it.
32930
32931         (Expression::ExprClassFromMemberInfo): New constructor for
32932         Expressions that creates a fully initialized Expression based on
32933         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
32934         a Type.
32935
32936         (Invocation::Resolve): Begin implementing resolution of invocations.
32937
32938         * literal.cs (StringLiteral):  Implement Emit.
32939
32940 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32941
32942         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
32943         member.
32944
32945 2001-09-04  Ravi Pratap  <ravi@ximian.com>
32946
32947         * cs-parser.jay (attribute_arguments): Implement actions.
32948         (attribute): Fix bug in production. Implement action.
32949         (attribute_list): Implement.
32950         (attribute_target): Implement.
32951         (attribute_target_specifier, opt_target_specifier): Implement
32952         (CheckAttributeTarget): New method to check if the attribute target
32953         is valid.
32954         (attribute_section): Implement.
32955         (opt_attributes): Implement.
32956
32957         * attribute.cs : New file to handle attributes.
32958         (Attribute): Class to hold attribute info.
32959
32960         * cs-parser.jay (opt_attribute_target_specifier): Remove production
32961         (attribute_section): Modify production to use 2 different rules to 
32962         achieve the same thing. 1 s/r conflict down !
32963         Clean out commented, useless, non-reducing dimension_separator rules.
32964
32965         * class.cs (TypeContainer.attributes): New member to hold list
32966         of attributes for a type.
32967         (Struct::Struct): Modify to take one more argument, the attribute list.
32968         (Class::Class): Ditto.
32969         (Field::Field): Ditto.
32970         (Method::Method): Ditto.
32971         (Property::Property): Ditto.
32972
32973         * cs-parser.jay (struct_declaration): Update constructor call to
32974         pass in the attributes too.
32975         (class_declaration): Ditto.
32976         (constant_declaration): Ditto.
32977         (field_declaration): Ditto.
32978         (method_header): Ditto.
32979         (fixed_parameter): Ditto.
32980         (parameter_array): Ditto.
32981         (property_declaration): Ditto.
32982
32983         * constant.cs (Constant::Constant): Update constructor similarly.
32984         Use System.Collections.
32985
32986         * parameter.cs (Parameter::Parameter): Update as above.
32987
32988 2001-09-02  Ravi Pratap  <ravi@ximian.com>
32989
32990         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
32991         (TypeContainer.delegates): New member to hold list of delegates.
32992
32993         * cs-parser.jay (delegate_declaration): Implement the action correctly 
32994         this time as I seem to be on crack ;-)
32995
32996 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
32997
32998         * rootcontext.cs (RootContext::IsNamespace): new function, used to
32999         tell whether an identifier represents a namespace.
33000
33001         * expression.cs (NamespaceExpr): A namespace expression, used only
33002         temporarly during expression resolution.
33003         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33004         utility functions to resolve names on expressions.
33005
33006 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33007
33008         * codegen.cs: Add hook for StatementExpressions. 
33009
33010         * class.cs: Fix inverted test for static flag in methods.
33011
33012 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33013
33014         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33015         to make it coincide with MS' number.
33016         (Operator::CheckBinaryOperator): Ditto.
33017
33018         * ../errors/errors.txt : Remove error numbers added earlier.
33019
33020         * ../errors/cs1019.cs : Test case for error # 1019
33021
33022         * ../errros/cs1020.cs : Test case for error # 1020
33023
33024         * cs-parser.jay : Clean out commented cruft.
33025         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33026         used anywhere - non-reducing rule.
33027         (namespace_declarations): Non-reducing rule - comment out.
33028
33029         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33030         with TypeContainer::AddEnum.
33031
33032         * delegate.cs : New file for delegate handling classes.
33033         (Delegate): Class for declaring delegates.
33034
33035         * makefile : Update.
33036
33037         * cs-parser.jay (delegate_declaration): Implement.
33038
33039 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33040
33041         * class.cs (Event::Define): Implement.
33042         (Event.EventBuilder): New member.
33043
33044         * class.cs (TypeContainer::Populate): Update to define all enums and events
33045         we have.
33046         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33047         readonly fields for all these cases ?
33048
33049 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33050
33051         * class.cs (Property): Revamp to use the convention of making fields readonly.
33052         Accordingly modify code elsewhere.
33053
33054         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33055         the Define method of the Property class.
33056
33057         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33058         trivial bug.
33059         (TypeContainer::Populate): Update to define all the properties we have. Also
33060         define all enumerations.
33061
33062         * enum.cs (Define): Implement.
33063
33064 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33065
33066         * cs-parser.jay (overloadable_operator): The semantic value is an
33067         enum of the Operator class.
33068         (operator_declarator): Implement actions.
33069         (operator_declaration): Implement.
33070
33071         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33072         validity of definitions.
33073         (Operator::CheckBinaryOperator): Static method to check for binary operators
33074         (TypeContainer::AddOperator): New method to add an operator to a type.
33075
33076         * cs-parser.jay (indexer_declaration): Added line to actually call the
33077         AddIndexer method so it gets added ;-)
33078
33079         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33080         already taken care of by the MS compiler ?  
33081
33082 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33083
33084         * class.cs (Operator): New class for operator declarations.
33085         (Operator::OpType): Enum for the various operators.
33086
33087 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33088
33089         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33090         ostensibly handle this in semantic analysis.
33091
33092         * cs-parser.jay (general_catch_clause): Comment out
33093         (specific_catch_clauses, specific_catch_clause): Ditto.
33094         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33095         (catch_args, opt_catch_args): New productions.
33096         (catch_clause): Rewrite to use the new productions above
33097         (catch_clauses): Modify accordingly.
33098         (opt_catch_clauses): New production to use in try_statement
33099         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33100         and re-write the code in the actions to extract the specific and
33101         general catch clauses by being a little smart ;-)
33102
33103         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33104         Hooray, try and catch statements parse fine !
33105
33106 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33107
33108         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33109         string from the hashtable of variables.
33110
33111         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33112         I end up making that mistake ;-)
33113         (catch_clauses): Fixed gross error which made Key and Value of the 
33114         DictionaryEntry the same : $1 !!
33115
33116 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33117
33118         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33119
33120         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33121         when the add and remove accessors are specified. 
33122
33123 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33124
33125         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33126         information about indexer_declarator.
33127         (indexer_declarator): Implement actions.
33128         (parsing_indexer): New local boolean used to keep track of whether
33129         we are parsing indexers or properties. This is necessary because 
33130         implicit_parameters come into picture even for the get accessor in the 
33131         case of an indexer.
33132         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33133
33134         * class.cs (Indexer): New class for indexer declarations.
33135         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33136         (TypeContainer::indexers): New member to hold list of indexers for the
33137         type.
33138
33139 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33140
33141         * cs-parser.jay (add_accessor_declaration): Implement action.
33142         (remove_accessor_declaration): Implement action.
33143         (event_accessors_declaration): Implement
33144         (variable_declarators): swap statements for first rule - trivial.
33145
33146         * class.cs (Event): New class to hold information about event
33147         declarations.
33148         (TypeContainer::AddEvent): New method to add an event to a type
33149         (TypeContainer::events): New member to hold list of events.
33150
33151         * cs-parser.jay (event_declaration): Implement actions.
33152
33153 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33154
33155         * cs-parser.jay (dim_separators): Implement. Make it a string
33156         concatenating all the commas together, just as they appear.
33157         (opt_dim_separators): Modify accordingly
33158         (rank_specifiers): Update accordingly. Basically do the same
33159         thing - instead, collect the brackets here.
33160         (opt_rank_sepcifiers): Modify accordingly.
33161         (array_type): Modify to actually return the complete type string
33162         instead of ignoring the rank_specifiers.
33163         (expression_list): Implement to collect the expressions
33164         (variable_initializer): Implement. We make it a list of expressions
33165         essentially so that we can handle the array_initializer case neatly too.
33166         (variable_initializer_list): Implement.
33167         (array_initializer): Make it a list of variable_initializers
33168         (opt_array_initializer): Modify accordingly.
33169
33170         * expression.cs (New::NType): Add enumeration to help us
33171         keep track of whether we have an object/delegate creation
33172         or an array creation.
33173         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33174         members to hold data about array creation.
33175         (New:New): Modify to update NewType
33176         (New:New): New Overloaded contructor for the array creation
33177         case.
33178
33179         * cs-parser.jay (array_creation_expression): Implement to call
33180         the overloaded New constructor.
33181
33182 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33183
33184         * class.cs (TypeContainer::Constructors): Return member
33185         constructors instead of returning null.
33186
33187 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33188
33189         * typemanager.cs (InitCoreTypes): Initialize the various core
33190         types after we have populated the type manager with the user
33191         defined types (this distinction will be important later while
33192         compiling corlib.dll)
33193
33194         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33195         on Expression Classification.  Now all expressions have a method
33196         `Resolve' and a method `Emit'.
33197
33198         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33199         generation from working.     Also add some temporary debugging
33200         code. 
33201
33202 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33203
33204         * codegen.cs: Lots of code generation pieces.  This is only the
33205         beginning, will continue tomorrow with more touches of polish.  We
33206         handle the fundamentals of if, while, do, for, return.  Others are
33207         trickier and I need to start working on invocations soon.
33208
33209         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33210         s.InitStatement. 
33211
33212         * codegen.cs (EmitContext): New struct, used during code
33213         emission to keep a context.   Most of the code generation will be
33214         here. 
33215
33216         * cs-parser.jay: Add embedded blocks to the list of statements of
33217         this block.  So code generation proceeds in a top down fashion.
33218
33219 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33220
33221         * statement.cs: Add support for multiple child blocks.
33222
33223 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33224
33225         * codegen.cs (EmitCode): New function, will emit the code for a
33226         Block of code given a TypeContainer and its ILGenerator. 
33227
33228         * statement.cs (Block): Standard public readonly optimization.
33229         (Block::Block constructors): Link children. 
33230         (Block::Child): Child Linker.
33231         (Block::EmitVariables): Emits IL variable declarations.
33232
33233         * class.cs: Drop support for MethodGroups here, delay until
33234         Semantic Analysis.
33235         (Method::): Applied the same simplification that I did before, and
33236         move from Properties to public readonly fields.
33237         (Method::ParameterTypes): Returns the parameter types for the
33238         function, and implements a cache that will be useful later when I
33239         do error checking and the semantic analysis on the methods is
33240         performed.
33241         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33242         and made a method, optional argument tells whether this is a class
33243         or a structure to apply the `has-this' bit.
33244         (Method::GetCallingConvention): Implement, returns the calling
33245         convention. 
33246         (Method::Define): Defines the type, a second pass is performed
33247         later to populate the methods.
33248
33249         (Constructor::ParameterTypes): implement a cache similar to the
33250         one on Method::ParameterTypes, useful later when we do semantic
33251         analysis. 
33252
33253         (TypeContainer::EmitMethod):  New method.  Emits methods.
33254
33255         * expression.cs: Removed MethodGroup class from here.
33256
33257         * parameter.cs (Parameters::GetCallingConvention): new method.
33258
33259 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33260
33261         * class.cs (TypeContainer::Populate): Drop RootContext from the
33262         argument. 
33263
33264         (Constructor::CallingConvention): Returns the calling convention.
33265         (Constructor::ParameterTypes): Returns the constructor parameter
33266         types. 
33267
33268         (TypeContainer::AddConstructor): Keep track of default constructor
33269         and the default static constructor.
33270
33271         (Constructor::) Another class that starts using `public readonly'
33272         instead of properties. 
33273
33274         (Constructor::IsDefault): Whether this is a default constructor. 
33275
33276         (Field::) use readonly public fields instead of properties also.
33277
33278         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33279         track of static constructors;  If none is used, turn on
33280         BeforeFieldInit in the TypeAttributes. 
33281
33282         * cs-parser.jay (opt_argument_list): now the return can be null
33283         for the cases where there are no arguments. 
33284
33285         (constructor_declarator): If there is no implicit `base' or
33286         `this', then invoke the default parent constructor. 
33287
33288         * modifiers.cs (MethodAttr): New static function maps a set of
33289         modifiers flags into a MethodAttributes enum
33290         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33291         MethodAttr, TypeAttr to represent the various mappings where the
33292         modifiers are used.
33293         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33294
33295 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33296
33297         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33298         method arguments.
33299
33300         * interface.cs (PopulateIndexer): Implemented the code generator
33301         for interface indexers.
33302
33303 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33304
33305         * interface.cs (InterfaceMemberBase): Now we track the new status
33306         here.  
33307
33308         (PopulateProperty): Implement property population.  Woohoo!  Got
33309         Methods and Properties going today. 
33310
33311         Removed all the properties for interfaces, and replaced them with
33312         `public readonly' fields. 
33313
33314 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33315
33316         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33317         initialize their hashtables/arraylists only when they are needed
33318         instead of doing this always.
33319
33320         * parameter.cs: Handle refs and out parameters.
33321
33322         * cs-parser.jay: Use an ArrayList to construct the arguments
33323         instead of the ParameterCollection, and then cast that to a
33324         Parameter[] array.
33325
33326         * parameter.cs: Drop the use of ParameterCollection and use
33327         instead arrays of Parameters.
33328
33329         (GetParameterInfo): Use the Type, not the Name when resolving
33330         types. 
33331
33332 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33333
33334         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33335         and instead use public readonly fields.
33336
33337         * class.cs: Put back walking code for type containers.
33338
33339 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33340
33341         * class.cs (MakeConstant): Code to define constants.
33342
33343         * rootcontext.cs (LookupType): New function.  Used to locate types 
33344
33345
33346 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33347
33348         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33349         this System.Reflection code is.  Kudos to Microsoft
33350
33351         * typemanager.cs: Implement a type cache and avoid loading all
33352         types at boot time.  Wrap in LookupType the internals.  This made
33353         the compiler so much faster.  Wow.  I rule!
33354
33355         * driver.cs: Make sure we always load mscorlib first (for
33356         debugging purposes, nothing really important).
33357
33358         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33359         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33360
33361         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33362         on namespaces that have been imported using the `using' keyword.
33363
33364         * class.cs (TypeContainer::TypeAttr): Virtualize.
33365         (Class::TypeAttr): Return attributes suitable for this bad boy.
33366         (Struct::TypeAttr): ditto.
33367         Handle nested classes.
33368         (TypeContainer::) Remove all the type visiting code, it is now
33369         replaced with the rootcontext.cs code
33370
33371         * rootcontext.cs (GetClassBases): Added support for structs. 
33372
33373 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33374
33375         * interface.cs, statement.cs, class.cs, parameter.cs,
33376         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33377         Drop use of TypeRefs, and use strings instead.
33378
33379 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33380
33381         * rootcontext.cs: 
33382
33383         * class.cs (Struct::Struct): set the SEALED flags after
33384         checking the modifiers.
33385         (TypeContainer::TypeAttr): new property, returns the
33386         TypeAttributes for a class.  
33387
33388         * cs-parser.jay (type_list): Oops, list production was creating a
33389         new list of base types.
33390
33391         * rootcontext.cs (StdLib): New property.
33392         (GetInterfaceTypeByName): returns an interface by type name, and
33393         encapsulates error handling here.
33394         (GetInterfaces): simplified.
33395         (ResolveTree): Encapsulated all the tree resolution here.
33396         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33397         types. 
33398
33399         * driver.cs: Add support for --nostdlib, to avoid loading the
33400         default assemblies.
33401         (Main): Do not put tree resolution here. 
33402
33403         * rootcontext.cs: Beginning of the class resolution.
33404
33405 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33406
33407         * rootcontext.cs: Provide better error reporting. 
33408
33409         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33410
33411         * rootcontext.cs (CreateInterface): Handle the case where there
33412         are no parent interfaces.
33413
33414         (CloseTypes): Routine to flush types at the end.
33415         (CreateInterface): Track types.
33416         (GetInterfaces): Returns an array of Types from the list of
33417         defined interfaces.
33418
33419         * typemanager.c (AddUserType): Mechanism to track user types (puts
33420         the type on the global type hash, and allows us to close it at the
33421         end). 
33422
33423 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33424
33425         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33426         RecordInterface instead.
33427
33428         * cs-parser.jay: Updated to reflect changes above.
33429
33430         * decl.cs (Definition): Keep track of the TypeBuilder type that
33431         represents this type here.  Not sure we will use it in the long
33432         run, but wont hurt for now.
33433
33434         * driver.cs: Smaller changes to accomodate the new code.
33435
33436         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33437         when done. 
33438
33439         * rootcontext.cs (CreateInterface):  New method, used to create
33440         the System.TypeBuilder type for interfaces.
33441         (ResolveInterfaces): new entry point to resolve the interface
33442         hierarchy. 
33443         (CodeGen): Property, used to keep track of the code generator.
33444
33445 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33446
33447         * cs-parser.jay: Add a second production for delegate_declaration
33448         with `VOID'.
33449
33450         (enum_body): Put an opt_comma here instead of putting it on
33451         enum_body or enum_member_declarations so we can handle trailing
33452         commas on enumeration members.  Gets rid of a shift/reduce.
33453
33454         (type_list): Need a COMMA in the middle.
33455
33456         (indexer_declaration): Tell tokenizer to recognize get/set
33457
33458         * Remove old targets.
33459
33460         * Re-add the parser target.
33461
33462 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33463
33464         * cs-parser.jay: Add precendence rules for a number of operators
33465         ot reduce the number of shift/reduce conflicts in the grammar.
33466
33467 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33468
33469         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33470         and put it here.
33471
33472         Get rid of old crufty code.
33473
33474         * rootcontext.cs: Use this to keep track of the parsed
33475         representation and the defined types available to the program. 
33476
33477         * gen-treedump.cs: adjust for new convention.
33478
33479         * type.cs: Split out the type manager, and the assembly builder
33480         from here. 
33481
33482         * typemanager.cs: the type manager will live here now.
33483
33484         * cil-codegen.cs: And the code generator here. 
33485
33486 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33487
33488         * makefile: Fixed up for easy making.
33489
33490 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33491
33492         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33493         the 
33494
33495         (unary_expression): Expand pre_increment_expression and
33496         post_decrement_expression to reduce a shift/reduce.
33497
33498 2001-07-11  Simon Cozens
33499
33500         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33501
33502         Improve allow_keyword_as_indent name.
33503
33504 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33505
33506         * Adjustments for Beta2. 
33507
33508 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33509
33510         * decl.cs: Added `Define' abstract method.
33511         (InTransit): new property, used to catch recursive definitions. 
33512
33513         * interface.cs: Implement `Define'. 
33514
33515         * modifiers.cs: Map Modifiers.constants to
33516         System.Reflection.TypeAttribute flags.
33517
33518         * class.cs: Keep track of types and user-defined types.
33519         (BuilderInit): New method for creating an assembly
33520         (ResolveType): New function to launch the resolution process, only
33521         used by interfaces for now.
33522
33523         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33524         that are inserted into the name space. 
33525
33526 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33527
33528         * ARGH.  I have screwed up my tree so many times due to the use of
33529         rsync rather than using CVS.  Going to fix this at once. 
33530
33531         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33532         load types.
33533
33534 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33535
33536         * Experiment successful: Use System.Type rather that our own
33537         version of Type.  
33538
33539 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33540
33541         * cs-parser.jay: Removed nsAliases from here.
33542
33543         Use new namespaces, handle `using XXX;' 
33544
33545         * namespace.cs: Reimplemented namespace handling, use a recursive
33546         definition of the class.  Now we can keep track of using clauses
33547         and catch invalid using clauses.
33548
33549 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33550
33551         * gen-treedump.cs: Adapted for all the renaming.
33552
33553         * expression.cs (Expression): this class now has a Type property
33554         which returns an expression Type.
33555
33556         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33557         `Type', as this has a different meaning now in the base
33558
33559 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33560
33561         * interface.cs, class.cs: Removed from all the sources the
33562         references to signature computation, as we can not do method
33563         signature computation during the parsing time, as we are not
33564         trying to solve at that point distinguishing:
33565
33566         class X {
33567                 void a (Blah x) {}
33568                 void a (NS.Blah x) {}
33569         }
33570
33571         Which depending on the context might be valid or not, as we do not
33572         know if Blah is the same thing as NS.Blah at that point.
33573
33574         * Redid everything so the code uses TypeRefs now instead of
33575         Types.  TypeRefs are just temporary type placeholders, that need
33576         to be resolved.  They initially have a pointer to a string and the
33577         current scope in which they are used.  This is used later by the
33578         compiler to resolve the reference to an actual Type. 
33579
33580         * DeclSpace is no longer a CIR.Type, and neither are
33581         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33582         are all DeclSpaces, but no Types. 
33583
33584         * type.cs (TypeRefManager): This implements the TypeRef manager,
33585         which keeps track of all the types that need to be resolved after
33586         the parsing has finished. 
33587
33588 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33589
33590         * ARGH.  We are going to have to store `foreach' as a class rather
33591         than resolving it, as we need to verify error 1579 after name
33592         resolution.   *OR* we could keep a flag that says `This request to
33593         IEnumerator comes from a foreach statement' which we can then use
33594         to generate the error.
33595
33596 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
33597
33598         * class.cs (TypeContainer.AddMethod): we now add methods to the
33599         MethodGroup instead of the method hashtable.  
33600
33601         * expression.cs: Add MethodGroup abstraction, which gets us one
33602         step closer to the specification in the way we handle method
33603         declarations.  
33604
33605         * cs-parser.jay (primary_expression): qualified_identifier now
33606         tried to match up an identifier to a local variable reference or
33607         to a parameter reference.
33608
33609         current_local_parameters is now a parser global variable that
33610         points to the current parameters for the block, used during name
33611         lookup.
33612
33613         (property_declaration): Now creates an implicit `value' argument to
33614         the set accessor.
33615
33616 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
33617
33618         * parameter.cs: Do not use `param' arguments as part of the
33619         signature, per the spec.
33620
33621 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
33622
33623         * decl.cs: Base class for classes, structs and interfaces.  This
33624         is the "Declaration Space" 
33625
33626         * cs-parser.jay: Use CheckDef for checking declaration errors
33627         instead of having one on each function.
33628
33629         * class.cs: Factor out some code for handling error handling in
33630         accordance to the "Declarations" section in the "Basic Concepts"
33631         chapter in the ECMA C# spec.
33632
33633         * interface.cs: Make all interface member classes derive from
33634         InterfaceMemberBase.
33635
33636 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
33637
33638         * Many things: all interfaces are parsed and generated in
33639         gen-treedump.  Support for member variables, constructors,
33640         destructors, properties, constants is there.
33641
33642         Beginning of the IL backend, but very little done, just there for
33643         testing purposes. 
33644
33645 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
33646
33647         * cs-parser.jay: Fix labeled statement.
33648
33649         * cs-tokenizer.cs (escape): Escape " and ' always.
33650         ref_line, ref_name: keep track of the line/filename as instructed
33651         by #line by the compiler.
33652         Parse #line.
33653
33654 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
33655
33656         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
33657         to match the values in System.CodeDOM.
33658
33659         Divid renamed to Divide.
33660
33661         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
33662         statements. 
33663         (Statements.set): remove.
33664
33665         * System.CodeDOM/CodeCatchClause.cs: always have a valid
33666         statements. 
33667
33668         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
33669         falseStatements always have valid values. 
33670
33671         * cs-parser.jay: Use System.CodeDOM now.
33672