2010-05-21 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / ChangeLog
1 2010-05-21  Marek Safar  <marek.safar@gmail.com>
2
3         * expression.cs: Use constrained prefix more broadly to avoid boxing.
4
5 2010-05-20  Marek Safar  <marek.safar@gmail.com>
6
7         A fix for bug #591149
8         * nullable.cs: Don't double wrap same expression.
9         
10 2010-05-20  Marek Safar  <marek.safar@gmail.com>
11
12         A fix for bug #569827
13         * anonymous.cs: Any issued error in probing mode means no match.
14
15 2010-05-20  Marek Safar  <marek.safar@gmail.com>
16
17         * expression.cs: Search for base indexer using the closest match
18         rule.
19
20 2010-05-20  Marek Safar  <marek.safar@gmail.com>
21
22         A fix for bug #572071
23         * method.cs: Set override constraints using unexpanded interface
24         list.
25
26 2010-05-20  Marek Safar  <marek.safar@gmail.com>
27
28         A fix for bug #572071
29         * ecore.cs: Include secondary extension method lookup in probing
30         mode.
31
32 2010-05-19  Marek Safar  <marek.safar@gmail.com>
33
34         A fix for bug #515801
35         * typespec.cs (MayBecomeEqualGenericTypes): Recursively check
36         type arguments.
37
38 2010-05-19  Marek Safar  <marek.safar@gmail.com>
39
40         A fix for bug #515801
41         * pending.cs: Advance counter correctly.
42
43 2010-05-19  Marek Safar  <marek.safar@gmail.com>
44
45         A fix for bug #480139
46         * method.cs, pending.cs: Indexer override uses base name.
47         
48 2010-05-19  Marek Safar  <marek.safar@gmail.com>
49
50         A fix for bug #424064
51         * generic.cs: Replace original with inflated type parameter on
52         failure.
53
54 2010-05-19  Marek Safar  <marek.safar@gmail.com>
55
56         A fix for bug #359733
57         * parameter.cs: Extension attribute can be defined in each assembly.
58
59 2010-05-18  Marek Safar  <marek.safar@gmail.com>
60
61         A fix for bug #446507
62         * method.cs: Only one method can implement an interface.
63
64 2010-05-18  Marek Safar  <marek.safar@gmail.com>
65
66         A fix for bug #594905
67         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
68         Typed null can be used as a source for expression methods.
69
70 2010-05-18  Marek Safar  <marek.safar@gmail.com>
71
72         A fix for bug #606551
73         * namespace.cs: Using directive imports only types and not nested
74         namespaces.
75
76 2010-05-17  Marek Safar  <marek.safar@gmail.com>
77
78         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
79         delegate.cs: Member instance is resolved after member overload
80         definitely resolves static/instance property of member expression.
81         Fixes #545047, #358848, #456605, #460016, #603299
82
83 2010-05-12  Marek Safar  <marek.safar@gmail.com>
84
85         A fix for bug #604981
86         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
87         details for nested anonymous methods stories.
88
89 2010-05-11  Marek Safar  <marek.safar@gmail.com>
90
91         A fix for bug #604735
92         * namespace.cs: Don't report namespace collision.
93
94 2010-05-11  Marek Safar  <marek.safar@gmail.com>
95
96         A fix for bug #604748
97         * class.cs, typespec.cs: Search full imported attribute hierarchy
98         for AttributeUsage.
99
100 2010-05-11  Marek Safar  <marek.safar@gmail.com>
101
102         * namespace.cs: Ignore missing dependencies failure at
103         initialization.
104
105 2010-05-11  Marek Safar  <marek.safar@gmail.com>
106
107         A fix for bug #604640
108         * namespace.cs: Don't resolve using constraints too early.
109
110 2010-05-11  Marek Safar  <marek.safar@gmail.com>
111
112         A fix for bug #604239
113         * generic.cs: Copy partial type constraints to partial container.
114
115 2010-05-10  Marek Safar  <marek.safar@gmail.com>
116
117         A fix for bug #557210
118         * import.cs: Relax underlying enum field rules.
119
120 2010-05-10  Marek Safar  <marek.safar@gmail.com>
121
122         A fix for bug #603476
123         * property.cs: Implement IParametersMember for indexer accessors.
124
125 2010-05-07  Marek Safar  <marek.safar@gmail.com>
126
127         A fix for bug #601141
128         * class.cs: Update all partial modifiers.
129
130 2010-05-06  Marek Safar  <marek.safar@gmail.com>
131
132         A fix for bug #601708
133         * method.cs, membercache.cs: Destructors cannot be hidden.
134
135 2010-05-06  Marek Safar  <marek.safar@gmail.com>
136
137         A fix for bug #602551
138         * class.cs: Resursive reference of type definition is allowed.
139
140 2010-05-06  Marek Safar  <marek.safar@gmail.com>
141
142         * anonymous.cs: Mutate cached storey instance types too.
143
144 2010-05-06  Marek Safar  <marek.safar@gmail.com>
145
146         A fix for bug #602443
147         * convert.cs: Explicit enum conversion cannot involve user operators
148
149 2010-05-05  Miguel de Icaza  <miguel@novell.com>
150
151         * class.cs (TypeContainer.DefineBaseTypes)
152         (TypeContainer.CheckRecursiveDefinition): check for the iface not
153         being null, as we could have failed resolution and crashed;
154         Fixes #442144
155
156         * cs-parser.jay: Productions to catch common mistakes when other
157         punctuation operators are used instead of comma.   Fixes 571702 
158
159 2010-05-05  Marek Safar  <marek.safar@gmail.com>
160
161         * anonymous.cs: Mutate correct set of constraints.
162
163 2010-05-05  Marek Safar  <marek.safar@gmail.com>
164
165         A fix for bug #602842
166         * expression.cs: Resolve all array bound arguments.
167
168 2010-05-05  Marek Safar  <marek.safar@gmail.com>
169
170         * import.cs: Don't import private fields.
171
172 2010-04-30  Marek Safar  <marek.safar@gmail.com>
173
174         Partially based on patch by <sami.lamti@gmail.com>
175
176         * eval.cs, ecore.cs: Fixed eval show methods.
177
178 2010-04-30  Marek Safar  <marek.safar@gmail.com>
179
180         * generic.cs, delegate.cs: Implement output type inference of
181         methodgroup now when the specification was cleared at least little
182         bit.
183
184 2010-04-29  Marek Safar  <marek.safar@gmail.com>
185
186         A fix for bug #575611
187         * class.cs: Fix recursive unmanaged recursice sruct check.
188         
189 2010-04-29  Marek Safar  <marek.safar@gmail.com>
190
191         A fix for bug #479776
192         * expression.cs: Implement typeof unbounded nested generic types.
193
194 2010-04-29  Marek Safar  <marek.safar@gmail.com>
195
196         A fix for bug #474953
197         * class.cs: Fix valid recursive base type definition.
198
199 2010-04-29  Marek Safar  <marek.safar@gmail.com>
200
201         A fix for bug #421737
202         * convert.cs, expression.cs: A boxing conversion exists from a
203         nullable-type to a reference type, if a boxing conversion exists
204         from the underlying non-nullable-value-type to the reference type.
205
206 2010-04-29  Marek Safar  <marek.safar@gmail.com>
207
208         A fix for bug #376875
209         * import.cs: Import volatile modifier.
210
211 2010-04-29  Marek Safar  <marek.safar@gmail.com>
212
213         A fix for bug #372412
214         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
215         generic arrays.
216
217 2010-04-29  Marek Safar  <marek.safar@gmail.com>
218
219         A fix for bug #568955
220         * statements.cs: Handle recursive scope initializers.
221
222 2010-04-28  Marek Safar  <marek.safar@gmail.com>
223
224         A fix for bug #566511
225         * anonymous.cs: Always get inflated version of hoisted variable
226         on generic type definition.
227
228 2010-04-28  Marek Safar  <marek.safar@gmail.com>
229
230         * import.cs, membercache.cs: Relax rules for valid properties.
231
232 2010-04-28  Marek Safar  <marek.safar@gmail.com>
233
234         * import.cs: Intern arrays used in generic arguments.
235
236 2010-04-28  Marek Safar  <marek.safar@gmail.com>
237
238         A fix for bug #600398
239         * convert.cs: Actually use effective base type for the comparison.
240
241 2010-04-28  Marek Safar  <marek.safar@gmail.com>
242
243         A fix for bug #600326
244         * ecore.cs: Pass arity to base member lookup.
245
246 2010-04-28  Marek Safar  <marek.safar@gmail.com>
247
248         A fix for bug #573385
249         * expression.cs: MemberAccess is of generic type based on right
250         arity length only.
251
252 2010-05-28  Marek Safar  <marek.safar@gmail.com>
253
254         * cs-tokenizer.cs: Made tab size configurable.
255
256 2010-05-27  Marek Safar  <marek.safar@gmail.com>
257
258         * attribute.cs: Ensure Obsolete members are defined before doing
259         ctor look-up.
260
261 2010-05-27  Marek Safar  <marek.safar@gmail.com>
262
263         * visit.cs: Add DOM visitor skeleton.
264         
265         * *.cs: Updated.
266
267 2010-05-27  Marek Safar  <marek.safar@gmail.com>
268
269         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
270         
271 2010-05-27  Marek Safar  <marek.safar@gmail.com>
272
273         * *.cs: Major rewrite of compiler internals to better work with
274         unmodified System.Reflection.Emit. Some of the key changes are
275         - TypeSpec replaces reflection specific System.Type.
276         - All Type(TypeSpec) operations are now done in compiler therefore
277         no dependency on SRE to inflate generic members and types or to
278         query unclosed types.
279         - MemberCache is now the only and full hierarchical topology.
280         - Generic constraints are implemented properly.
281         - And as a bonus compilation is on average 30% faster.
282
283 2010-04-15  Jb Evain  <jbevain@novell.com>
284
285         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
286
287 2010-04-12  Marek Safar  <marek.safar@gmail.com>
288
289         * expression.cs, attribute.cs, parameter.cs: More attribute type
290         checks.
291
292 2010-04-12  Marek Safar  <marek.safar@gmail.com>
293
294         A fix for bug #593342
295
296         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
297         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
298         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
299         codegen.cs: Add custom attribute encoder to deal with unfinished
300         types and easier corlib bootstrap from its own types.
301
302 2010-03-26  Marek Safar  <marek.safar@gmail.com>
303
304         * cs-parser.jay: Report invalid constraint types.
305
306 2010-03-16  Jb Evain  <jbevain@novell.com>
307
308         * Makefile: rename the net_2_1 profile to moonlight.
309
310 2010-03-11  Marek Safar  <marek.safar@gmail.com>
311
312         * statement.cs, cs-parser.jay: Use correct location for empty
313         statements.
314
315 2010-03-11  Marek Safar  <marek.safar@gmail.com>
316
317         * cs-parser.jay: Disable Location from expression.
318         
319         * generic.cs: Check constraints for overrides in the parser.
320
321 2010-03-09  Marek Safar  <marek.safar@gmail.com>
322
323         * cs-parser.jay (GetLocation): Use an expression when available.
324
325 2010-03-04  Marek Safar  <marek.safar@gmail.com>
326
327         A fix for bug #582579
328         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
329
330 2010-03-04  Marek Safar  <marek.safar@gmail.com>
331
332         A patch by kornelpal@gmail.com
333         
334         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
335         compiler generated classes sealed by default. Emit and close top
336         level compiler generated classes as well. 
337         
338         * support.cs: Use RuntimeHelpers.GetHashCode.
339
340 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
341
342         * Makefile: We need to use the internal bootstrapping gmcs for
343         net_2_1_bootstrap too now.
344
345 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
346
347         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
348
349 2010-03-02  Marek Safar  <marek.safar@gmail.com>
350
351         * cs-tokenizer.cs: Missed few locations in previous fix.
352
353 2010-03-02  Marek Safar  <marek.safar@gmail.com>
354
355         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
356         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
357         Report correct location for operator errors.
358
359 2010-03-02  Marek Safar  <marek.safar@gmail.com>
360
361         * typemanager.cs (IsDynamicType): Don't check external types when
362         the attribute is not external.
363
364 2010-02-24  Marek Safar  <marek.safar@gmail.com>
365
366         A fix for bug #582579
367         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
368         modifiers.
369
370 2010-02-24  Marek Safar  <marek.safar@gmail.com>
371
372         A fix for bug #581804
373         * ecore.cs: Fixed type comparison.
374
375 2010-02-08  Miguel de Icaza  <miguel@novell.com>
376
377         * namespace.cs (CompletionGetTypesStartingWith): Do not include
378         private types in the completion results.
379
380         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
381         ... let ?"
382
383 2010-02-17  Marek Safar  <marek.safar@gmail.com>
384
385         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
386         constraint parsing.
387
388 2010-02-14  Miguel de Icaza  <miguel@novell.com>
389
390         * eval.cs: Do not do the report printer dance unless the user has
391         set the DescribeTypes feature.
392
393 2010-02-10  Marek Safar  <marek.safar@gmail.com>
394
395         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
396
397 2010-02-08  Marek Safar  <marek.safar@gmail.com>
398
399         A fix for bug #577029
400         * anonymous.cs: Fixed TypeBuilder* check.
401
402 2010-02-06  Miguel de Icaza  <miguel@novell.com>
403
404         * eval.cs (CompileBlock): Also undo if there are problems during
405         semantic analysis, fixes various cases where invalid C# code would
406         be reported, but the internal changes would not be undone.
407
408 2010-02-03  Miguel de Icaza  <miguel@novell.com>
409
410         * driver.cs: Change the --fatal flag to allow a number to be
411         passed, this ignores the first N fatal errors.   Useful to debug
412         errors that do not happen on the first hit.
413
414         * cs-parser.jay (invocation_expression): accept both the
415         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
416         inside an invocation.
417
418         * driver.cs: Expose FatalErrors.
419
420         * eval.cs: Initialize the printer's Fatal property from the
421         Driver's FatalError flag, this allows csharp --fatal to work
422         again. 
423
424         Add support for calling Describe (typeof (TYPE)) if the expression
425         entered is a TYPE.
426         
427 2010-02-02  Marek Safar  <marek.safar@gmail.com>
428
429         A fix for bug #574991
430         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
431         --lint.
432
433 2010-02-02  Marek Safar  <marek.safar@gmail.com>
434
435         A fix for bug #575986
436         * expression.cs: Don't mutate typeof type definitions.
437
438 2010-01-28  Marek Safar  <marek.safar@gmail.com>
439
440         * decl.cs: Use only one set of modifiers.
441
442 2010-01-26  Marek Safar  <marek.safar@gmail.com>
443
444         A fix for bug #573329
445         * eval.cs: Don't disable error reporting completely on silent mode.
446         
447 2010-01-25  Marek Safar  <marek.safar@gmail.com>
448
449         A fix for bug #573312
450         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
451         pointer index of unknown size types greater than 2.
452
453 2010-01-15  Marek Safar  <marek.safar@gmail.com>
454
455         * *.cs: Use only 1 member kind enum.
456
457 2010-01-15  Marek Safar  <marek.safar@gmail.com>
458
459         * *.cs: Add event specification.
460
461 2010-01-14  Marek Safar  <marek.safar@gmail.com>
462
463         * membercache.cs: Extracted from decl.cs.
464         
465         * *.cs: Put more infrastructure in place.
466
467 2010-01-13  Marek Safar  <marek.safar@gmail.com>
468
469         * *.cs: Add property specification, unused yet.
470
471 2010-01-13  Marek Safar  <marek.safar@gmail.com>
472
473         * property.cs: Move all property based declarations into a new file.
474
475 2010-01-13  Marek Safar  <marek.safar at gmail.com>
476
477         * expression.cs (Conditional): Resolve reduced expression.
478
479 2010-01-13  Marek Safar  <marek.safar at gmail.com>
480
481         * *.cs: Introduced non-generic method specification.
482
483 2010-01-07  Marek Safar  <marek.safar@gmail.com>
484
485         * method.cs: Move all method based declarations into a new file.
486
487 2010-01-07  Marek Safar  <marek.safar@gmail.com>
488
489         * *.cs: Extract field specification.
490
491 2009-12-17  Marek Safar  <marek.safar@gmail.com>
492
493         * field.cs: Extracted from class.cs
494
495 2009-12-15  Marek Safar  <marek.safar@gmail.com>
496
497         * attribute.cs (GetFixedBuffer): Work on field definition only.
498
499 2009-12-15  Marek Safar  <marek.safar@gmail.com>
500
501         * *.cs: Clean up NET_4_0 conditional where possible.
502
503 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
504
505         support.cs (DynamicType): Assembly property returns the assembly builder.
506         This is required due to how compiler context works in corlib.
507
508 2009-12-14  Marek Safar  <marek.safar@gmail.com>
509
510         A fix for bug #564376
511         * assign.cs (LocalTemporary): Removed no longer needed special
512         by-ref handling.
513
514 2009-12-11  Marek Safar  <marek.safar@gmail.com>
515
516         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
517         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
518         enum for easier debugging.
519
520 2009-12-10  Marek Safar  <marek.safar@gmail.com>
521
522         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
523         point.
524         
525         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
526         directly.
527
528 2009-12-10  Marek Safar  <marek.safar@gmail.com>
529
530         * cs-parser.jay, statement.cs: Handle parser error in code
531         completition.
532
533 2009-12-10  Marek Safar  <marek.safar@gmail.com>
534
535         * ecore.cs: Ignore base imported methods when they are already
536         in method bag.
537         
538         * eval.cs: Handle non-existent keys.
539         
540         * report.cs, driver.cs: Make fatal work with console printer only.
541
542 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
543
544         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
545
546 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
547
548         * typemanager.cs: Add MakeGenericMethod that checks if the method
549         is really the generic method definition.
550
551         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
552         to inflate generic methods.
553
554 2009-12-08  Marek Safar  <marek.safar@gmail.com>
555
556         A fix for bug #561149
557         * anonymous.cs: Use actual type parameters when checking for generic
558         method host.
559
560 2009-12-08  Marek Safar  <marek.safar@gmail.com>
561
562         A fix for bug #561369
563         * expression.cs (DoNumericPromotion): Fixed typo.
564
565 2009-12-08  Marek Safar  <marek.safar@gmail.com>
566
567         *.cs: Moving to generics world.
568
569         cs-parser.jay: Removed current_array_type.
570
571 2009-12-07  Marek Safar  <marek.safar@gmail.com>
572
573         *.cs: Moving to generics world.
574
575 2009-12-04  Marek Safar  <marek.safar@gmail.com>
576
577         *.cs: Moving to generics world (day 2).
578
579 2009-12-03  Marek Safar  <marek.safar@gmail.com>
580
581         *.cs: Moving to generics world.
582
583 2009-12-02  Marek Safar  <marek.safar@gmail.com>
584
585         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
586         Encode dynamic type attribute for elements where attributes cannot
587         be used.
588
589 2009-12-01  Marek Safar  <marek.safar@gmail.com>
590
591          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
592          arguments by ref.
593
594 2009-12-01  Marek Safar  <marek.safar@gmail.com>
595
596         A fix for bug #360455
597         * class.cs: Never report a unused warning for generic events to
598         workaround wrong expression type.
599
600 2009-11-30  Marek Safar  <marek.safar@gmail.com>
601
602         A fix for bug #558305
603         * decl.cs, class.cs: Check partial method definitions using correct
604         flag.
605
606 2009-11-30  Marek Safar  <marek.safar@gmail.com>
607
608         * argument.cs: Don't cache rarely used dynamic flag.
609
610 2009-11-27  Marek Safar  <marek.safar@gmail.com>
611
612         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
613
614 2009-11-27  Marek Safar  <marek.safar@gmail.com>
615
616         * ecore.cs (SimpleName): Removed no longer needed in_transit as
617         Resolve is now non-reentrant (saves ~0.6MB for corlib).
618
619 2009-11-26  Marek Safar  <marek.safar@gmail.com>
620
621         A fix for bug #545081
622         * decl.cs: Check private nested types of nested types recursively.
623
624 2009-11-26  Marek Safar  <marek.safar@gmail.com>
625
626         A fix for bug #558305
627         * location.cs: Ignore self referencing #line directive
628
629 2009-11-26  Marek Safar  <marek.safar@gmail.com>
630
631         A fix for bug #558292
632         * class.cs: Allow single unsafe fixed buffer fields.
633
634 2009-11-26  Marek Safar  <marek.safar@gmail.com>
635
636         * expression: Optimize few more zero-based operations.
637
638 2009-11-26  Marek Safar  <marek.safar@gmail.com>
639
640         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
641         avoids boxing of literal values.
642
643 2009-11-26  Marek Safar  <marek.safar@gmail.com>
644
645         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
646         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
647         codegen.cs: LocatedToken redesing to avoid excessive allocation and
648         boxing (saves ~7MB for corlib). Also fixes presise token location.
649
650 2009-11-25  Marek Safar  <marek.safar@gmail.com>
651
652         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
653         common data buckers.
654
655 2009-11-24  Marek Safar  <marek.safar@gmail.com>
656
657         * expression.cs: Lower static array initializer barrier.
658         
659         * support.cs, driver.cs: Share reader buffer.
660
661 2009-11-23  Marek Safar  <marek.safar@gmail.com>
662
663         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
664
665 2009-11-23  Marek Safar  <marek.safar@gmail.com>
666
667         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
668         cleanup some obsolete code.
669
670 2009-11-20  Marek Safar  <marek.safar@gmail.com>
671
672         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
673         Expression.Resolve.
674
675 2009-11-20  Marek Safar  <marek.safar@gmail.com>
676
677         * *.cs: Resolved expressions are never resolved again, this helps to
678         uncover some not easy to find bugs and improve the performance.
679
680 2009-11-19  Marek Safar  <marek.safar@gmail.com>
681
682         * *.cs: Made constant expressions fully compatible with any other
683         expression.
684
685 2009-11-19  Marek Safar  <marek.safar@gmail.com>
686
687         * *.cs: DoResolve is a worker method and has to be protected.
688
689 2009-11-18  Marek Safar  <marek.safar@gmail.com>
690
691         * *.cs: More context specific handling.
692
693 2009-11-17  Marek Safar  <marek.safar@gmail.com>
694
695         * *.cs: More context specific handling.
696
697 2009-11-16  Marek Safar  <marek.safar@gmail.com>
698
699         * dynamic.cs, class.cs: Removed few fixed user types conversions.
700         
701         * symbolwriter.cs: Uses public ILOffset.
702
703 2009-11-13  Marek Safar  <marek.safar@gmail.com>
704
705         A fix for bug #553650
706         * generic.cs: Another missing TypeToCoreType, still too many to fix.
707
708 2009-11-13  Marek Safar  <marek.safar@gmail.com>
709
710         A fix for bug #555170
711
712         * class.cs, delegate.cs, enum.cs: Constants have to be available
713         for parameters resolve.
714
715 2009-11-12  Marek Safar  <marek.safar@gmail.com>
716
717         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
718         arrays.
719
720 2009-11-12  Marek Safar  <marek.safar@gmail.com>
721
722         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
723         with a statically known candidate set.
724
725 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
726
727         * generic.cs: Made type inflation for generic constraint checks
728         recursive. This fixes BGO #553655.
729
730 2009-11-11  Marek Safar  <marek.safar@gmail.com>
731
732         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
733         checks.
734
735 2009-11-10  Marek Safar  <marek.safar@gmail.com>
736
737         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
738         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
739         attribute.cs: Add some dynamic error checking.
740
741 2009-11-07  Marek Safar  <marek.safar@gmail.com>
742
743         A fix for bug #553465
744
745         * expression.cs: Fixed mixed version of expression tree anonymous
746         type.
747
748 2009-11-06  Marek Safar  <marek.safar@gmail.com>
749
750         A fix for bug #553031
751
752         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
753         expression tree version of anonymous type with members declaration.
754
755 2009-11-05  Marek Safar  <marek.safar@gmail.com>
756
757         * parameter.cs: Handle nullable parameter default expression.
758         
759         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
760         class.cs, attribute.cs: Check for wrong dynamic arguments.
761
762 2009-11-05  Marek Safar  <marek.safar@gmail.com>
763
764         * statement.cs: Dynamic statements.
765
766 2009-11-04  Marek Safar  <marek.safar@gmail.com>
767
768         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
769         Compound assignments over dynamic type.
770
771 2009-11-03  Marek Safar  <marek.safar@gmail.com>
772
773         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
774         constructor arguments.
775
776 2009-10-30  Marek Safar  <marek.safar@gmail.com>
777
778         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
779         codegen.cs: Unary mutator on dynamic member access expression.
780
781 2009-10-29  Marek Safar  <marek.safar@gmail.com>
782
783         A fix for bug #550580   
784         * convert.cs: Don't eliminate explicit precission casts.
785
786 2009-10-28  Marek Safar  <marek.safar@gmail.com>
787
788         A fix for bug #550404
789         
790         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
791         expression.cs, statement.cs, ecore.cs: Quote any nested expression
792         tree.
793
794 2009-10-27  Marek Safar  <marek.safar@gmail.com>
795
796         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
797         constant.
798         
799         * class.cs: Allow nullable binary user operators.
800
801 2009-10-26  Marek Safar  <marek.safar@gmail.com>
802
803         * expression.cs: Move binary expression optimization at the end of
804         resolve.
805
806 2009-10-23  Marek Safar  <marek.safar@gmail.com>
807
808         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
809         Separate NullConstant from NullLiteral.
810
811 2009-10-23  Marek Safar  <marek.safar@gmail.com>
812
813         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
814         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
815         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
816         ModuleContainer. Add common unclosed member check routine.
817
818 2009-10-22  Marek Safar  <marek.safar@gmail.com>
819
820         * argument.cs: Use literal flag for real literals only.
821
822         * dynamic.cs: Use correct return type for custom delegates.
823
824 2009-10-22  Marek Safar  <marek.safar@gmail.com>
825
826         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
827         resolver.
828
829 2009-10-22  Marek Safar  <marek.safar@gmail.com>
830
831         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
832
833 2009-10-21  Marek Safar  <marek.safar@gmail.com>
834
835         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
836         conversion.
837
838 2009-10-21  Marek Safar  <marek.safar@gmail.com>
839
840         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
841         binder flags.
842
843 2009-10-20  Marek Safar  <marek.safar@gmail.com>
844
845         * argument.cs, dynamic.cs, expression.cs: Latest API update.
846
847 2009-10-19  Marek Safar  <marek.safar@gmail.com>
848
849         * typemanager.cs, expression.cs: Dynamic array initializer.
850
851 2009-10-16  Marek Safar  <marek.safar@gmail.com>
852
853         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
854         is imported.
855
856 2009-10-16  Marek Safar  <marek.safar@gmail.com>
857
858         A fix for bug #493523, #507067
859         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
860         standard nullable conversion using underlying standard conversion
861         and not full conversion.
862
863 2009-10-15  Marek Safar  <marek.safar@gmail.com>
864
865         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
866         type in VerifyArgumentsCompat.
867
868 2009-10-15  Marek Safar  <marek.safar@gmail.com>
869
870         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
871         Reject variable used with type arguments.
872
873 2009-10-14  Marek Safar  <marek.safar@gmail.com>
874
875         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
876         Implement dynamic expressions assignment.
877
878 2009-10-14  Marek Safar  <marek.safar@gmail.com>
879
880         * expression.cs: Build underlying expression when resolving unary
881         mutators.
882
883 2009-10-14  Marek Safar  <marek.safar@gmail.com>
884
885         * expression.cs: Emit enum array initializer using binary blob.
886
887 2009-10-08  Marek Safar  <marek.safar@gmail.com>
888
889         * typemanager.cs, constant.cs: Optimize decimal constants which fit
890         to long range.
891
892 2009-10-07  Marek Safar  <marek.safar@gmail.com>
893
894         * typemanager.cs: Reset object_type.
895         
896         * assign: Made SimpleAssign public.
897
898 2009-10-06  Marek Safar  <marek.safar@gmail.com>
899
900         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
901         invocation assembly to IsThisOrFriendAssembly.
902
903 2009-10-05  Marek Safar  <marek.safar@gmail.com>
904
905         * expression.cs: Equality comparison of generic parameter with
906         class constraint.
907
908 2009-10-05  Marek Safar  <marek.safar@gmail.com>
909
910         A fix for bug #543570
911         * generic.cs: Import predefined constraints correctly.
912
913 2009-10-02  Marek Safar  <marek.safar@gmail.com>
914
915         * ecore.cs: Don't crash on overloads with optional paremeters where
916         arguments count overflows.
917         
918         * parameter.cs: Import optional parameter constants using optional
919         value type.
920
921 2009-10-01  Marek Safar  <marek.safar@gmail.com>
922
923         * Makefile: Default is gmcs compiler.
924
925 2009-10-01  Marek Safar  <marek.safar@gmail.com>
926
927         * cs-parser.jay: Fixed few NRE.
928
929 2009-10-01  Marek Safar  <marek.safar@gmail.com>
930
931         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
932
933 2009-09-30  Marek Safar  <marek.safar@gmail.com>
934
935         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
936         ShimExpression, ImplicitCast.
937
938 2009-09-30  Marek Safar  <marek.safar@gmail.com>
939
940         A fix for bug #542959
941         * delegate.cs: Emit correct delegate instance variable when there
942         are static and non-static overloads.
943
944 2009-09-29  Marek Safar  <marek.safar@gmail.com>
945
946         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
947         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
948
949 2009-09-28  Marek Safar  <marek.safar@gmail.com>
950
951         A fix for bug #542487
952         * ecore.cs: Resolve extension methods hidden by properties.
953
954 2009-09-25  Marek Safar  <marek.safar@gmail.com>
955
956         * expression.cs, ecore.cs: More dynamic binary expressions.
957
958 2009-09-22  Marek Safar  <marek.safar@gmail.com>
959
960         * nullable.cs, expression.cs: Fixed null lifted conversion for
961         bitwise enum operations.
962
963 2009-09-22  Marek Safar  <marek.safar@gmail.com>
964
965         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
966         values in checked context.
967
968 2009-09-22  Marek Safar  <marek.safar@gmail.com>
969
970         * expression.cs, ecore.cs: Fixed array index constant conversion.
971
972 2009-09-20  Miguel de Icaza  <miguel@novell.com>
973
974         * expression.cs: Do not crash when MemberLookup returns something
975         that is not a MemberExpr here.   Report error 582 instead. 
976
977         Fixes #499988.
978
979 2009-09-18  Marek Safar  <marek.safar@gmail.com>
980
981         * decl.cs, class.cs: Check protected property accessors.
982
983 2009-09-18  Marek Safar  <marek.safar@gmail.com>
984
985         * dynamic.cs, assign.cs: Dynamic compound assignment.
986
987 2009-09-17  Marek Safar  <marek.safar@gmail.com>
988
989         * expression.cs: Fixed compound assignment explicit conversion.
990
991 2009-09-17  Marek Safar  <marek.safar@gmail.com>
992
993         * expression.cs, ecore.cs: Cannot infer variables from method group.
994
995 2009-09-16  Marek Safar  <marek.safar@gmail.com>
996
997         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
998         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
999         codegen.cs: Dynamic binary operations scaffolding.
1000
1001 2009-09-15  Marek Safar  <marek.safar@gmail.com>
1002
1003         * expression.cs: Fixes nullable promotion for enum type variables.
1004
1005 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1006
1007         * driver.cs, dynamic.cs: Reset more static variables.
1008
1009 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1010
1011         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
1012         driver.cs: Introduced Expression::MakeExpression.
1013
1014 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1015
1016         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
1017
1018 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1019
1020         * eval.cs, report.cs: Use Console.Out for all eval error or warning
1021         output.
1022
1023 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1024
1025         A fix for bug #518707
1026         * expression.cs (Is): Optimize only generic parameter type
1027         expression probing value type generic parameter.
1028
1029 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1030
1031         A fix for bug #532571
1032         * ecore.cs: Check for simple name type arguments used with
1033         non-generic type.
1034
1035 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1036
1037         A fix for bug #497421
1038         * generic.cs (CheckConstraint): Don't use buildin types to check for
1039         parameterless constructor.
1040
1041 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1042
1043         A fix for bug #537402
1044         * generic.cs (CheckConstraint): Correctly inflate generic type
1045         arguments when checking generic method. 
1046
1047 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1048
1049         A fix for bug #536463
1050         * decl.cs (AddToContainer): Don't report collision between explicit
1051         and parameterless non-explicit members.
1052
1053 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1054
1055         * eval.cs: Reset more static stuff.
1056
1057 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1058
1059         A fix for bug #324625
1060         * expression.cs, ecore.cs: Create nested generic type expression
1061         using declaring and not current type.
1062
1063 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1064
1065         * *.cs: Changed Report class to accept various output printers and
1066         be an instance class. An expression resolver can now use different
1067         message reporter for each call and Report.Error can safely throw
1068         an exception. Part of ongoing work to turn mcs into proper library.
1069
1070 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1071
1072         * statement.cs, ecore.cs: Removed error reporting from emit code.
1073
1074 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1075
1076         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1077
1078 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1079
1080         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1081         parser checks out of constructors.
1082
1083 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1084
1085         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1086
1087 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1088
1089         A fix for bug #535448
1090         * anonymous.cs, class.cs: Copy return label between all contexts.
1091
1092 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1093
1094         A fix for bug #535395
1095         * namespace.cs: Resolve context can be null.
1096
1097 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1098
1099         A fix for bug #533912
1100         * generic.cs: Use correct context for constraints resolving.
1101
1102 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1103
1104         A fix for bug #532630
1105         * driver.cs: Trim conditional symbols.
1106
1107 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1108
1109         * context.cs: New file.
1110         
1111         * *.exe.sources, *.csproj: Updated.
1112
1113 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1114
1115         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1116         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1117         IMembercontext, some small cleanups.
1118
1119 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1120
1121         * *.cs: Split ResolveContext and EmitContext.
1122
1123 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1124
1125         * *.cs: Only ResolveContext implements IMemberContext.
1126
1127 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1128
1129         * *.cs: Renamed IResolveContext to IMemberContext.
1130
1131 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1132
1133         * *.cs: Detached ResolveContext from EmitContext.
1134
1135 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1136
1137         * codegen.cs: Moved flow-analysis to BlockContext.
1138
1139 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1140
1141         * *.cs: Detached BlockContext from EmitContext.
1142
1143 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1144
1145         * statement.cs: avoid nullref when the return value of GetEnumerator()
1146         does not contain any MoveNext() method.
1147
1148 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1149
1150         * *.cs: Removed IResolveContext::GenericDeclContainer.
1151
1152 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1153
1154         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1155
1156 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1157
1158         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1159         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1160
1161 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1162
1163         * *.cs: Removed boolean fields from EmitContext.
1164
1165 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1166
1167         * *.cs: Add IResolveContext::IsStatic.
1168
1169 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1170
1171         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1172
1173 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1174
1175         * *.cs: Removed DeclContainer from EmitContext.
1176
1177 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1178
1179         * *.cs: Add IResolveContext::CurrentTypeParameters.
1180
1181 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1182
1183         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1184
1185 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1186
1187         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1188         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1189
1190 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1191
1192         * decl.cs: Look in PartialContainer for parent type parameters.
1193
1194 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1195
1196         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1197         codegen.cs: Add IResolveContext::LookupTypeParameter.
1198
1199 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1200
1201         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1202         Moved resolved logic from Emit to Resolve.
1203
1204 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1205
1206         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1207         codegen.cs: Reworked atttributes handling of ResolveContext.
1208
1209 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1210
1211         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1212         LookupNamespaceOrType to ResolveContext.
1213
1214 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1215
1216         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1217         class.cs: Removed unused parameters and methods.
1218
1219 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1220
1221         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1222         codegen.cs: Finding the best common type of a set of expressions for
1223         lambda statements.
1224
1225 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1226
1227         * dynamic.cs, expression.cs: More dynamic conversions.
1228
1229 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1230
1231         * generic.cs: This loop was incorrect, it was increment ii, but
1232         checking for `i'.  This was a change introduced to fix #327497,
1233         now we fix #424012.
1234  
1235         * class.cs: Catch another case for cs0533 error, fixes #324782.
1236
1237 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1238
1239         * typemanager.cs (GetGenericArguments): SRE returns null for
1240         generic methods on type builder instances if they are not generic
1241         themselves. For example, for Foo<int>::Bar() it returns null, but
1242         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1243
1244 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1245
1246         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1247         delegate.cs: Work on dynamic binding.
1248
1249 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1250
1251         A second fix for bug #525342
1252         * class.cs: Attach partial method attributes to method
1253         implementation.
1254
1255 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1256
1257         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1258         restrictions.
1259         
1260         * rootcontext.cs: Default to langversion v4.
1261
1262 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1263
1264         * pending.cs: Check return type before member info is set.
1265
1266 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1267
1268         * anonymous.cs: Fully initialize generic hoisted field expression.
1269
1270 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1271
1272         * cs-parser.jay: Flag variables declared on the interactive shell
1273         as used to prevent the 168 warning about local variable not being
1274         used. 
1275
1276 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1277
1278         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1279         attribute.cs: Emit dynamic export attribute.
1280
1281 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1282
1283         * expression.cs: More verifier work.
1284
1285 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1286
1287         * nullable.cs: Fixed SRE crash during corlib compilation.
1288
1289 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1290
1291         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1292         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1293         More TypeManager.TypeToCoreType needed.
1294
1295 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1296
1297         * anonymous.cs: Update after recent SRE fixes.
1298
1299 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1300
1301         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1302         version of GetFieldHandle for fields of generic types.
1303
1304 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1305
1306         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1307         ecore.cs: Add TypeManager.IsDynamicType,
1308         PredefinedAttributes.Dynamic.
1309
1310 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1311
1312         A fix for bug #415375
1313         * expression.cs: Fixed object and reference type parameter
1314         comparison.
1315
1316 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1317
1318         A fix for bug #525342
1319         * class.cs: Attach partial method attributes to method
1320         implementation.
1321
1322 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1323
1324         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1325         Dynamic arguments.
1326
1327 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1328
1329         * anonymous.cs (MutateField): Add imported types handling.
1330
1331 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1332
1333         * expression.cs, delegate.cs: Moved arguments resolve into their
1334         counterparts expressions. Removed argument resolve from
1335         CollectionElementInitializer.
1336
1337 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1338
1339         A fix for bug #523683
1340         * convert.cs, delegate.cs: Use common overload mechanism for method
1341         group conversion check.
1342
1343 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1344
1345         A fix for bug #523899
1346         * generics.cs: Exact type inference with other bound types.
1347
1348 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1349
1350         Don't complain when the same type is implemented by the output
1351         assembly as well as multiple referenced assemblies
1352         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1353         'must_be_unique' flag.
1354         (GlobalRootNamespace): Update to changes.
1355         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1356         already have a type in hand.
1357
1358 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1359
1360         * expression.cs: More verifier instrumentation.
1361         
1362         * statement.cs: Do proper throw expression conversion.
1363
1364 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1365
1366         A fix for bug #522789
1367         * expression.cs: Mutate invocation return type.
1368
1369 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1370
1371         * anonymous.cs: Split assignable and readonly generated variable
1372         references.
1373
1374 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1375
1376         A fix for bug #521671
1377         * statement.cs: Fixed crash when checking missing type.
1378
1379 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1380
1381         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1382         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1383         class.cs, driver.cs: Work on dynamic binding.
1384
1385         * dynamic.cs: New file.
1386
1387         * *.sources, *.proj: Updated.
1388
1389 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1390
1391         * expression.cs (Conditional): Avoid double Resolve.
1392
1393 2009-07-13  Marcus Griep  <marcus@griep.us>
1394
1395         * ecore.cs: Fix obscure bug with resolving members of interfaces
1396         that hide parent interface members. Fixes bug #444388 and corrects
1397         bug #323096
1398
1399 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1400
1401         * expression.cs (LocalVariableReference): Bounce resolve.
1402
1403 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1404
1405         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1406         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1407         types to new class.
1408         
1409         * support.cs: New dynamic type wrapper.
1410
1411 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1412
1413         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1414         typed local variable.
1415
1416 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1417
1418         A fix for bug #519005
1419         * anonymous.cs: Use null_type as no return type placeholder.
1420
1421 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1422
1423         * generic.cs: Handle type inference of identical type parameters
1424         with different bounds.
1425
1426 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1427
1428         * expression.cs, class.cs: Events variance.
1429         
1430         * cs-parser.jay: Interface events error messages.
1431
1432 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1433
1434         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1435
1436 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1437
1438         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1439         parameter expression can be value-type New.
1440
1441         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1442
1443 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1444
1445         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1446         Implemented C# 4.0 named arguments.
1447
1448 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1449
1450         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1451         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1452         parameter modifier. Also fixes bug #515497.
1453
1454 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1455
1456         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1457         arguments expression to be implemented.
1458         
1459         *.sources: Add argument.cs
1460
1461 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1462
1463         * parameter.cs: Moved GetParameterIndexByName to base class.
1464         
1465         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1466         unused AType. Use argument's version of GetExpressionTree.
1467
1468 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1469
1470         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1471         arguments grammar.
1472
1473 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1474
1475         A fix for bug #514096
1476         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1477
1478 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1479
1480         * expression.cs: The first multi-dimensional array nested array
1481         initializers was not checked.
1482         
1483         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1484
1485 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1486
1487         A fix for bug #513400
1488         * nullable.cs (EmitEquality): Operands emit could be simplified for
1489         built-in types when we now emit user operators differently.
1490
1491 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1492
1493         * ecore.cs: Report inaccessible delegate methods correctly.
1494
1495 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1496
1497         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1498         cs-parser.jay: Implemented C# 4.0 optional parameters.
1499
1500 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1501
1502         * driver.cs: Removed broken DefineManifestResource.
1503
1504 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1505
1506         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1507         Use $(BOOTSTRAP_PROFILE) instead.
1508
1509 2009-06-12  Jb Evain  <jbevain@novell.com>
1510
1511         * rootcontext.cs: add a Platform field.
1512         * driver.cs: handle /platform.
1513         * codegen.cs: pass the proper flags according to
1514         the platform when saving the assembly.
1515
1516 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1517
1518         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1519         Add optional parameters grammar.
1520
1521 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1522
1523         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1524         driver.cs: Split lang version and metadata version.
1525
1526 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1527
1528         * decl.cs: Better overload ctor collision error message.
1529
1530 2009-06-05  Jb Evain  <jbevain@novell.com>
1531
1532         * driver.cs (EmbededResource): avoid using an internal method
1533         in gmcs to embed manifest resources.
1534
1535 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1536
1537         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1538         the compiler from older mono versions (like moon's bots)
1539
1540 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1541
1542         * namespace.cs (LookupTypeReflection): Ignore collisions between
1543         forwarded types.
1544
1545 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1546
1547         * codegen.cs: Enabled generic type forwarders.
1548
1549 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1550
1551         * dmcs.*: Add another version of SRE compiler.
1552
1553 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1554
1555         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1556         generic-mcs.cs: Fixed variant type conversions.
1557
1558 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1559
1560         A fix for bug #507863
1561         * codegen.cs: Fixes a crash on invalid string value attribute.
1562
1563 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1564
1565         A fix for bug #508334
1566         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1567         cs-parser.jay: Fully import __arglist modifier.
1568
1569 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1570
1571         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1572         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1573         actually work with closed generic types.
1574
1575 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1576
1577         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1578         Fix the build by replacing the use of 'var' with the actual type.
1579
1580 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1581
1582         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1583     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1584         declarations.
1585           
1586         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1587         filter.
1588
1589 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1590                         Marek Safar  <marek.safar@gmail.com>
1591
1592         A fix for bug #377509
1593         * parameter.cs: Use predefined and not empty name for implicit
1594         setters.
1595
1596 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1597
1598         * class.cs: Don't report wrong warnings for event fields.
1599
1600 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1601
1602         A fix for bug #504667
1603         * class.cs: Check for static class using parent container instead of
1604         parent type.
1605
1606 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1607
1608         A fix for bug #496922
1609         * expression.cs: Always use temporary variable when using object
1610         initializer.
1611
1612 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1613
1614         A fix for bug #495112
1615         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1616         local cache.
1617
1618 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1619
1620         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1621
1622 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1623
1624         * complete.cs: No idea how gonzalo got a null in the list, but
1625         avoid crashing.
1626
1627 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1628
1629         * complete.cs (CompletionElementInitializer): New completion class
1630         to support completing inside a C# 3 element initializer, so this
1631         allows completion for Silverlight situations where it is very
1632         common to do:
1633
1634         new TextBlock () { Fo<TAB>
1635
1636         (CompletionSimpleName): Expose the prefix that was
1637         passed to the simple name.
1638
1639         * cs-parser.jay (object_or_collection_initializer): Add support
1640         for element_initializers.
1641
1642         * expression.cs (CollectionOrObjectInitializers.DoResolve):
1643         special case completion expressions as this method aggressively
1644         collects data before it operates, and errors were being thrown
1645         earlier than we were able to complete.
1646
1647 2009-04-23  Miguel de Icaza  <miguel@novell.com>
1648
1649         * eval.cs: Make getcompletions silent and enable debugging output
1650         if the -v option is passed.
1651
1652         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
1653         Consider looking up the namespace that matches the prefix being
1654         used. 
1655
1656         This is part of the support for allowing completions like:
1657         `System.Co<TAB>' to complete to System.Console.
1658
1659         * complete.cs (CompletionSimpleName.AppendResults): Make this
1660         routine reusable.
1661
1662 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
1663
1664         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
1665         COMPLETE_COMPLETION as internal.
1666
1667 2009-04-17  Miguel de Icaza  <miguel@novell.com>
1668
1669         * complete.cs: Include namespace resolution in simple names as
1670         well as global types and types in the using scope in the
1671         resolution. 
1672
1673         * namespace.cs: Supporting infrastrcture to provide completions
1674         based on the current using scope. 
1675
1676         * eval.cs: Introduce an entry point that allows for initialization
1677         to return a list of the files passed on the command line.
1678
1679 2009-04-14  Marek Safar  <marek.safar@gmail.com>
1680
1681         A fix for bug #494243
1682         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
1683
1684 2009-04-13  Marek Safar  <marek.safar@gmail.com>
1685
1686         A fix for bug #493887
1687         * statement.cs: Don't skip string multi-section with default or
1688         null label when populating string hashtable.
1689
1690 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1691
1692         A fix for bug #492329
1693         * expression.cs (New): Load variable when assigning type parameter
1694         to ref variable.
1695
1696 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1697
1698         A fix for bug #488960
1699         * decl.cs: Compare MVAR types using non-null values.
1700
1701 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1702
1703         * typemanager.cs, expression.cs: Removed unused nullable checks.
1704
1705 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1706
1707         * *.cs: Removed some gmcs conditionals.
1708
1709 2009-03-26  Marek Safar  <marek.safar@gmail.com>
1710
1711         * generic.cs, support.cs: Moved generics stuff out of support.cs
1712
1713 2009-03-24  Marek Safar  <marek.safar@gmail.com>
1714
1715         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
1716         DeclaringType.
1717
1718 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1719
1720         * attribute.cs: Consider all members for error reporting when
1721         checking named arguments.
1722
1723 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1724
1725         A fix for bug #487625
1726         * namespace.cs: Use a warning for all predefined type conflicts.
1727
1728 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1729
1730         A fix for bug #485706
1731         * statement.cs: Explicitly type catch type argument to pass verifier
1732         check.
1733
1734 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1735
1736         Initial support to provide code completion facilities to consumers
1737         of the evaluator API.
1738         
1739         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
1740         support the completion engine.   When we reach the end of the
1741         input stream instead of returning EOF, when this flag is true the
1742         tokenizer instead produces:
1743
1744                 One GENERATE_COMPLETION token: this token then must be
1745                 handled in the grammar at every point where the user
1746                 would likely request a completion.
1747
1748                 As many COMPLETE_COMPLETION tokens as necessary.   These
1749                 tokens are generated to assist the parser in unwinding and
1750                 producing a valid parse tree.    
1751
1752         The parser rules do not have to be perfect, the parser needs to be
1753         augmented with judicious use of GENERATE_COMPLETION tokens to
1754         improve the areas where we can provide completion and the parser
1755         needs to add support for COMPLETE_COMPLETION tokens in productions
1756         to make them work.
1757
1758         It is common to not have enough support for COMPLETE_COMPLETION
1759         under certain rules and that even if we generated the
1760         GENERATE_COMPLETION token that the resulting tree will be invalid
1761         due to the missing rules that support COMPLETE_COMPLETION.
1762
1763         The final EOF token is produced by having the parser notify the
1764         tokenizer when it reaches the root production that the next token
1765         should be EOF.
1766
1767         * support.cs (CompletionResult): New Exception.   This exception
1768         is thrown to return the completion results when one of the special
1769         completion expressions is reached.
1770
1771         This exception is thrown by the completing ExpressionStatements
1772         classes that live in complete.cs
1773
1774         * complete.cs (CompletingExpression): a new base class for
1775         completing expressions.   This derives from the
1776         ExpressionStatement class and not from Expression as it allows
1777         completion to happen not only where expressions are expected in
1778         the grammar, but also where statements are expected.
1779
1780         (CompletionSimpleName): A new class used to provide completions
1781         for SimpleNames.     This currently only resolves to local
1782         variables from the evaluator context (GetVars call).
1783
1784         (CompletionMemberAccess): Implements support for completing member
1785         access patterns. 
1786
1787         * cs-parser.jay: Add support for completion in a few places. 
1788
1789         * eval.cs (GetCompletions): New public API for the evaluator that
1790         returns a list of possible completions given the input.   The
1791         return value is an array of completions 
1792
1793         * anonymous.cs (Compatible): If the exception thrown from the
1794         resolved expression is a CompletionResult exception let that one
1795         through instead of printing a diagnostic error in the try/catch. 
1796 <       
1797 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1798
1799         * 
1800
1801         * driver.cs (Main): Use Environment.Exit to quit quickly and
1802         prevent the compiler from doing the usual wait for helper thread
1803         to terminate.  
1804
1805         This is to prevent a slowdown that was reported by Gonzalo on
1806         ASP.NET 
1807
1808 2009-03-19  Marek Safar  <marek.safar@gmail.com>
1809
1810         * ecore.cs: Load build-in types directly instead of accessing
1811         an internal field.
1812
1813 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1814
1815         * ecore.cs: Always use unbox.any when available.
1816
1817 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1818
1819         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
1820
1821 2009-03-17  Marek Safar  <marek.safar@gmail.com>
1822
1823         * generic.cs: Removed obsolete version of type inference.
1824
1825 2009-03-16  Marek Safar  <marek.safar@gmail.com>
1826
1827         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
1828         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
1829         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
1830         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
1831
1832 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1833
1834         A fix for bug #482996
1835         * anonymous.cs: Make sure we are not infering return type when
1836         checking type compatibility.
1837
1838 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1839
1840         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
1841         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
1842         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
1843         attributes in their own structure. Needed when accessing their
1844         properties before they are resolved.
1845
1846 2009-03-09  Marek Safar  <marek.safar@gmail.com>
1847
1848         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
1849         hashtable (~10x faster).
1850         
1851         * driver.cs: Removed wrong Reset.
1852
1853 2009-03-08  Marek Safar  <marek.safar@gmail.com>
1854
1855         * class.cs: Use correct common base type for unmanaged delayed
1856         check.
1857
1858         * rootcontext.cs: Wrap unhandled exception.
1859
1860 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
1861
1862         Make SeekableStreamReader self-tuning and arbitrarily seekable
1863         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
1864         the buffer.
1865         (SeekableStreamReader.Position.set): Use it.  Simplify logic
1866         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
1867         buffer size when the stream needs to be re-read from the beginning.
1868
1869 2009-03-05  Marek Safar  <marek.safar@gmail.com>
1870
1871         A fix for bug #480100
1872         * parameter.cs: A parameter is not hoisted when used directly as ET.
1873
1874 2009-03-04  Marek Safar  <marek.safar@gmail.com>
1875
1876         * statement.cs: Fixed an issue when using variable is of interface
1877         type.
1878
1879 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1880
1881         A fix for bug #480319
1882         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
1883
1884 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1885
1886         A fix for bug #480867
1887         * typemanager.cs, expression.cs, ecore.cs: Changed method group
1888         expression to have no valid type.
1889
1890 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1891
1892         A fix for bug #481258
1893         * class.cs: Set extension method flag in partial container.
1894
1895 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1896
1897         * statement.cs, typemanager.cs: Use expression for StringEmitter.
1898         
1899         * attribute.cs: Add sanity check.
1900
1901 2009-02-27  Marek Safar  <marek.safar@gmail.com>
1902
1903         * class.cs: Add external constructor error.
1904
1905 2009-02-26  Marek Safar  <marek.safar@gmail.com>
1906
1907         A fix for bug #475354
1908         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
1909         correctly user defined nullable equality operators.
1910
1911 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1912
1913         A fix for bug #479532
1914         * expression.cs: Implement NewInitialize::AddressOf.
1915
1916 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1917
1918         A fix for bug #413633
1919         * expression.cs: Iterate all base class-constraint types.
1920
1921 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1922
1923         A fix for bug #479209
1924         * literal.cs: Mutate null underlying type.
1925
1926 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1927
1928         A fix for bug #476295
1929         * convert.cs: Avoid wrapping implicitly convertible reference type.
1930
1931 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1932
1933         * iterators.cs: Create MemberName correctly.
1934
1935 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1936
1937         A fix for bug #478655
1938         * literal.cs: Check also underlying null type conversion.
1939
1940 2009-02-21  Marek Safar  <marek.safar@gmail.com>
1941
1942         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
1943
1944 2009-02-20  Marek Safar  <marek.safar@gmail.com>
1945
1946         A fix for bug #477447
1947         * statement.cs: Add reference to correct parent storey when this
1948         is accessible from deep children storey (more than 1 level).
1949
1950 2009-02-19  Marek Safar  <marek.safar@gmail.com>
1951
1952         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
1953         * class.cs: Define base type members before setting up member cache.
1954
1955 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1956
1957         A fix for bug #477378
1958         * nullable.cs, expression.cs, statement.cs: More precise null type
1959         sanity checks.
1960
1961 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1962
1963         A fix for bug #472805
1964         * typemanager.cs, namespace.cs: Import only visible extension method
1965         types.
1966
1967 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1968
1969         A fix for bug #476895
1970         * attribute.cs: Use correct resolve context for attribute type.
1971
1972 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1973
1974         A fix for bug #476266
1975         * anonymous.cs: Mutate multi-dimensional arrays.
1976
1977 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1978
1979         A fix for bug #476400
1980         * statement.cs, expression.cs: Removed wrong Dispose optimization.
1981
1982 2009-02-18  Marek Safar  <marek.safar@gmail.com>
1983
1984         A fix for bug #476811
1985         * generics.cs: Fixed null-literal check.
1986
1987 2009-02-17  Marek Safar  <marek.safar@gmail.com>
1988
1989         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
1990         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
1991         messing with static variables.
1992
1993 2009-02-16  Marek Safar  <marek.safar@gmail.com>
1994
1995         A fix for bug #475965
1996         * generics.cs: Check generic parameter type after extracting from
1997         Expression<T>.
1998
1999 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2000
2001         A fix for bug #475823
2002         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
2003         typed-null support.
2004
2005 2009-02-14  Marek Safar  <marek.safar@gmail.com>
2006
2007         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
2008         Simplified event field definition using backing field and not
2009         field builder directly.
2010
2011         * expression.cs (EmitLdArg): Optimize fast paths.
2012
2013 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2014
2015         A fix for bug #475327
2016         * expression.cs (ArrayCreation): Don't mutate values optimized away.
2017
2018 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2019
2020         A fix for bug #475342
2021         * cs-parser.jay: Using 'super' instead of 'base' to call base
2022         constructor crashes compiler.
2023
2024 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2025
2026         A fix for bug #475354
2027         * expression.cs (Constantify): Add nullable types.
2028         
2029         * const.cs (EmitDecimalConstant): Avoid explicit cast.
2030
2031 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2032
2033         A fix for bug #475246
2034         * expression.cs: More broken flowanalysis hacking needed.
2035
2036 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2037
2038         * attribute.cs: Compare only ref/out array modifiers. 
2039
2040 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2041
2042         * statement.cs: Use member cache when looking for foreach members.
2043
2044 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2045
2046         * expression.cs: Don't expose internal initializer types.
2047         
2048         * statement.cs: Check also explicit conversions for goto case.
2049
2050 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2051
2052         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2053
2054 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2055
2056         * *.cs: Replace null-type with NullLiteral where appropriate.
2057
2058 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2059
2060         * expression.cs: Initializer of reference argument use temporary
2061         variable to be verifiable.
2062         
2063         * parameter.cs: Share EmitLdArg.
2064
2065 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2066
2067         A fix for bug #473559
2068         * class.cs: Fixed: Not reporting error about nested class with the
2069         same name.
2070
2071 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2072
2073         Contributed under the MIT/X11 license.
2074
2075         * generic.cs: Added VerifyVariantTypeParameters which performs new
2076         variance verification logic. The old logic, based on the spec, was
2077         wrong because the spec is full of LIES!
2078
2079         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2080
2081         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2082
2083         * class.cs:
2084         * ecore.cs: Added calls to the new variance verification logic.
2085
2086         * parameter.cs:
2087         * delegate.cs: Removed calls to the old variance verification logic.
2088
2089 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2090
2091         * delegate.cs: Use cached Invoke method directly.
2092
2093 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2094
2095         * expression.cs: Emit expression tree for hoisted variable access.
2096
2097 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2098
2099         * namespace.cs: Add better extension class check.
2100
2101 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2102
2103         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2104
2105 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2106
2107         This patch adds initial generic variance support to the compiler.
2108         It is contributed under the MIT/X11 license.
2109
2110         * typemanager.cs: Modified ImplementsInterface to check variance.
2111         Added VerifyVariantTypeParameters which checks the specified type to see
2112         if it uses a variant type parameter as a type argument (which is not
2113         allowed). Added IsVariantOf which determins if the first type is a
2114         variant of the second. NOTE: This only supports reference types at
2115         the moment to conform with the current level of VM support. When the
2116         VM supports value types, this will follow step.
2117
2118         * generic.cs: Added the Variance enum. Added a Variance property to
2119         TypeParameter and added variance support to definition phase. Added a
2120         Variance property to TypeParameterName. Also check to make sure that
2121         no variant types appear in generic method parameters.
2122
2123         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2124         keywords if the langversion supports it.
2125
2126         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2127         that variant types are only used in legal positions. Also added
2128         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2129         parameters.
2130
2131         * decl.cs: Construct TypeParameter with the variance information.
2132
2133         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2134         and ImplicitConversionStandard.
2135
2136         * rootcontext.cs: Added new "Future" language version.
2137
2138         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2139         type parameters are not used as type arguments in interface inheritance.
2140         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2141         parameters are not used as method return types. In MemberBase.
2142         ResolveMemberType, ensure that variant type parameters are not used
2143         as type arguments. Also call VerifyNoVariantTypeParameters on every
2144         set of parameters which are resolved.
2145
2146         * delegate.cs: Modified Delegate.Define to ensure that variant
2147         parameters are not used as type arguments and that a contravariant
2148         parameter is not used as the return type. Also call
2149         VerifyNoVariantTypeParameters on the delegate parameters.
2150
2151         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2152         to specify generic variance.
2153
2154         * driver.cs: Added support for LanguageVersion.Future in the form of
2155         "-langversion:future".
2156
2157         * generic-mcs.cs: Stubbed out new members in generic.cs.
2158
2159 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2160
2161         * class.cs, generic.cs: Emit type parameter constraints for nested
2162         types.
2163
2164 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2165
2166         A fix for bug #471213
2167         * class.cs: Avoid emitting backing field for abstract event fields.
2168
2169 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2170
2171         A fix for bug #359731
2172         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2173         expressions.
2174
2175 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2176
2177         A fix for bug #470767
2178         * statement.cs: Introduced BlockScopeExpression, needed when 
2179         expression tree conversion has to emit scope variables.
2180
2181 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2182
2183         * class.cs: Remove duplicate CallingConvention.
2184
2185 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2186
2187         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2188         when I finally found the right naming convention.
2189
2190 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2191
2192         * cs-tokenizer.cs: Put back different open parens optimization.
2193
2194 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2195
2196         A fix for bug #470227
2197         * cs-tokenizer.cs: Remove too agressive parser optimization.
2198
2199 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2200
2201         A fix for bug #324319
2202         * class.cs: Remove too early base type resolve.
2203
2204 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2205
2206         A fix for bug #324319
2207         * ecore.cs: Explicitly type null when assigning to type argument to
2208         make pass verifier check.
2209
2210 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2211
2212         * anonymous.cs: Fixed recent regression when initializing captured 
2213         this.
2214
2215 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2216
2217         A fix for bug #469019
2218         * anonymous.cs: Use all parent type parameters when instantiating
2219         nested generic storey.
2220
2221 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2222
2223         * expression.cs: Check for null instance methodgroup expression.
2224
2225 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2226
2227         A fix for bug #469244
2228         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2229         instance inside a conditional expression.
2230
2231 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2232
2233         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2234         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2235         GetElementType and HasElementType. IsValueType clean up.
2236
2237 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2238
2239         * nullable.cs: Use common EmitCall.
2240         
2241         * expression.cs: Emit constraint. for virtual calls only.
2242
2243 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2244
2245         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2246         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2247         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2248         checks.
2249
2250 2009-01-22  Jb Evain  <jbevain@novell.com>
2251
2252         * anonymous.cs: make anonymous types' ToString implementation
2253         match what csc outputs.
2254
2255 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2256
2257         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2258         up.
2259
2260 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2261
2262         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2263         verifier checks.
2264
2265 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2266
2267         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2268         expressions.
2269
2270 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2271
2272         A fix for bug #466634
2273         * statement.cs: Add reference for nested storey when only this
2274         is captured.
2275
2276 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2277
2278         A fix for bug #466474
2279         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2280         was specified.
2281
2282 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2283
2284         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2285         Fixed nested stories parent referencing process. Also fixes #463985.
2286
2287 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2288
2289         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2290         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2291         implementation. Also fixes #463108.
2292
2293 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2294
2295         A fix for bug #416109
2296         * decl.cs: Issue correct CLSAttribute warning location.
2297
2298 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2299
2300         A fix for bug #456775
2301         * attribute.cs: Use attribute owner scope when resolving attribute
2302         arguments.
2303
2304 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2305
2306         A fix for bug #457257
2307         * decl.cs: Fixed incorrect member declaring type comparison.
2308
2309 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2310
2311         A fix for bug #460896
2312         * driver.cs: Handle /RES resources as embeddable.
2313
2314 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2315
2316         A fix for bug #462515
2317         * ecore.cs: Report inacessible members upwards.
2318
2319 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2320
2321         A fix for bug #463190, #463192
2322         * decl.cs, namespace.cs: Also import internal extension classes.
2323
2324 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2325
2326         A fix for bug #463415
2327         * generic.cs: Use right index for RemoveDependentTypes.
2328
2329 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2330
2331         A fix for bug #463196
2332         * expression.cs: Fixed enum to null comparison.
2333
2334 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2335
2336         A fix for bug #463121
2337         * nullable.cs: Fixed nullable user equality operator comparison.
2338
2339 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2340
2341         A fix for bug #462950
2342         * class.cs, decl.cs: Use full explicit name when defining automatic
2343         property backing field.
2344
2345 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2346
2347         A fix for bug #462592
2348         * pending.cs: Emit type arguments for generic proxy method.
2349
2350 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2351
2352         * expression.cs (As): Mutate all type arguments.
2353
2354 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2355
2356         A fix for bug #462622
2357         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2358         context.
2359
2360 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2361
2362         A fix for bug #450782
2363         * ecore.cs: Consider more variables of form V.I to be fixed.
2364
2365 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2366
2367         A fix for bug #460712
2368         * typemanager.cs: Core types could be imported.
2369
2370 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2371
2372         A fix for bugs #460847, #460772, #458049, #457339, #447807
2373         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2374         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2375         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2376         user lambdas used inside query clauses.
2377
2378 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2379
2380         A fix for bug #460229
2381         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2382
2383 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2384
2385         A fix for bug #459952
2386         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2387
2388 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2389
2390         A fix for bug #459630
2391         * convert.cs: Enum to valuetype conversion is not allowed.
2392
2393 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2394
2395         A fix for bug #457087
2396         * generic.cs: Don't crash when constraint comes from type
2397         declaration.
2398
2399 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2400
2401         A fix for bug #459221
2402         * anonymous.cs, statement.cs: Delay only captured this
2403         initialization.
2404
2405 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2406
2407         A fix for bug #457489
2408         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2409         and initialization to capture scope initializers correctly.
2410
2411 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2412
2413         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2414         ParameterReference refactoring.
2415
2416 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2417
2418         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2419         to be imported from any assembly.
2420
2421 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2422
2423         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2424         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2425         from anonymous method and lambda expression.
2426
2427 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2428
2429         A fix for bug #448560
2430         * expression.cs (As): Box any generic type arguments to be
2431         verifiable.
2432
2433 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2434
2435         Add tripwire for implicit conversion bugs
2436         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2437         for CS1501 error.
2438         (MethodGroupExpr.OverloadResolve): Add sanity check between
2439         IsApplicable and VerifyArgumentsCompat.
2440         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2441
2442 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2443
2444         Fix build break in System.Data_test
2445         * convert.cs (ImplicitConversionExists): Move NullLiteral
2446         conversions ...
2447         (ImplicitStandardConversionExists): ... here.
2448
2449 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2450
2451         * literal.cs: Emit correctly explicit null to nullable cast.
2452
2453 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2454
2455         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2456         resolve.
2457
2458 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2459
2460         A fix for bug #449005
2461         * convert.cs, nullable.cs: Use only one implicit nullable
2462         conversion.
2463
2464 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2465
2466         * convert.cs, literal.cs: More Convert cleanup is needed.
2467
2468 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2469
2470         * decl.cs, class.cs: Fixed misleading error message.
2471
2472 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2473
2474         A fix for bug #449005
2475         * nullable.cs (EmitEquality): Disable optimization for user operator
2476         operands.
2477
2478 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2479
2480         A fix for bug #447027
2481         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2482         with context variables stored as expression instances.
2483
2484 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2485
2486         A fix for bug #447027
2487         * delegate.cs: Fixed delegate VerifyMethod logic.
2488
2489 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2490
2491         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2492         but not verifiable.
2493
2494 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2495
2496         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2497         member type resolve to follow normal flow, instead of random
2498         property access.
2499
2500 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2501
2502         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2503         type.
2504
2505 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2506
2507         * const.cs: Emit decimal array constant as literal.
2508
2509 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2510
2511         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2512
2513 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2514
2515         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2516         into real property (saves 8 MB for corlib compilation).
2517
2518 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2519
2520         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2521         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2522         generic-mcs.cs: Small cleanup of TypeArguments.
2523
2524 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2525
2526         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2527         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2528         of ConstructedType expression, renamed to GenericTypeExpr.
2529
2530 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2531
2532         A fix for bug #445303
2533         * location.cs (IsConditionalDefined): Handle undefined global
2534         defines.
2535
2536 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2537
2538         A fix for bug #444678
2539         * expression.cs (TryReduceConstant): Always create new constant
2540         instance.
2541
2542 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2543
2544         A fix for bug #444673
2545         * ecore.cs: Ignore open generic types when used as generic type
2546         instance fields.
2547
2548 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2549
2550         A fix for bug #445458
2551         * expression.cs, cs-parser.jay: Don't crash when an expression
2552         statement is null.
2553
2554 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2555
2556         A fix for bug #445464
2557         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2558         inside unbound type.
2559
2560 2008-11-14  Jb Evain  <jbevain@novell.com>
2561
2562         * driver.cs: ignore empty -nowarn argument such as
2563         the one in -nowarn:12,13,,.
2564
2565 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2566
2567         A fix for bug #444271
2568         * anonymous.cs: Rescan parent storeys when best candidate was
2569         undone.
2570
2571 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2572
2573         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2574         useless UnboundTypeExpression.
2575         
2576         * attribute.cs: Do check obsolete attribute on generic types.
2577
2578 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2579
2580         A fix for bugs #425680, #400139
2581         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2582         refactoring.
2583
2584 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2585
2586         A fix for bug #435747
2587         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2588         compound value types assignment. Few micro optimizations added.
2589
2590 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2591
2592         A fix for bug #442610
2593         * anonymous.cs (MutateConstructor): More SRE hacking.
2594
2595 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2596
2597         A fix for bug #442579
2598         * ecore.cs: Also initialize expanded form of a method with 1 params
2599         parameter.
2600
2601 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2602
2603         * expression.cs (UnaryMutator): Do early l-side check.
2604
2605 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2606
2607         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2608         Init, otherwise we would crash later on when checking for friend
2609         assemblies. 
2610
2611         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2612         Otherwise we never get any meaningful information as to what
2613         failed. 
2614
2615 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2616
2617         A fix for bug #436318
2618         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2619
2620 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2621
2622         * namespace.cs: Turns out that it was a really bad idea to hide
2623         the errors for namespaces not found here in eval mode.    
2624
2625         * eval.cs: When we process using clauses, only enter those into
2626         the list of valid using clauses after they have been validated.   
2627
2628         The above change gives the proper semantics: it does not
2629         senselessly report the same errors with broken using statements by
2630         never storing them in the first place when they are invalid.
2631
2632 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2633
2634         A fix for bug #421839
2635         * cs-parser.jay: Remove expression from coalesce rule to force lower
2636         priority than the assignment operator.
2637
2638 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2639
2640         A fix for bug #437875
2641         * nullable.cs: Compile correctly method group operand used with null
2642         coalescing operator.
2643
2644 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2645
2646         A fix for bug #434589
2647         * expression.cs (Binary): Ignore lifted conversions when at least
2648         one operand is of reference type.
2649
2650 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2651
2652         * cs-parser.jay: Better syntax error report.
2653
2654 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2655
2656         A fix for bug #436792
2657         * cs-parser.jay: Use GetLocation to access location.
2658
2659 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2660
2661         A fix for bug #440774
2662         * cs-parser.jay: Also set current_array_type when parsing local
2663         variables types.
2664
2665 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2666
2667         A fix for bug #440785
2668         * expression.cs (As): Don't resolve self modifing expression
2669         multiple times.
2670
2671 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2672
2673         A fix for bug #439447
2674         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
2675
2676 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2677
2678         A fix for bug #437571
2679         * cs-parser.jay: Fixes internal error for invalid expression
2680         statements.
2681
2682 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2683
2684         * ecore.cs: Resolve correctly ambiguous params delegate methods.
2685
2686 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2687
2688         * generic.cs, anonymous.cs: Simplified GetDeclarations.
2689
2690 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2691
2692         * cs-tokenizer.cs: More precise cast parsing.
2693
2694 2008-10-16  Martin Baulig  <martin@ximian.com>
2695
2696         * anonymous.cs (AnonymousMethodStorey): Put back the
2697         `hoisted_locals' hashtable and use it in EmitType().
2698
2699 2008-10-15  Marek Safar  <marek.safar@gmail.com>
2700
2701         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
2702         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
2703         ~5MB for corlib.
2704
2705 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2706
2707         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
2708
2709 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2710
2711         * statement.cs: Mutate scope initializers.
2712
2713 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2714
2715         * expression.cs: Use typeless value for This constant.
2716         
2717         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
2718
2719 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2720
2721         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
2722         tokenizer.
2723
2724 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2725
2726         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
2727         type to type cast.
2728
2729 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2730
2731         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
2732         parser and tokenizer. Fixes many ambiguities including #433258.
2733
2734 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2735
2736         * cs-parser.jay: Fixed missing accessor recovery.
2737
2738 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2739
2740         A fix for bug #433701
2741         * expression.cs: Better error message.
2742
2743 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2744
2745         * cs-parser.jay, expression.cs: Start reporting real parser errors.
2746         
2747         * Makefile: Disabled unused debug symbols.
2748
2749         Also fixes: #320556, #321097, #321656, #321876, #351316
2750
2751 2008-10-09  Miguel de Icaza  <miguel@novell.com>
2752
2753         * eval.cs: rename "<interactive>" to "{interactive}", to work
2754         around a requirement in the compiler that this be a valid
2755         filename, and in Windows it is not (433886).
2756
2757 2008-10-09  Marek Safar  <marek.safar@gmail.com>
2758
2759         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
2760
2761 2008-10-08  Marek Safar  <marek.safar@gmail.com>
2762
2763         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
2764         cs-parser.jay: Generic type declaration and type arguments cleanup.
2765
2766 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2767
2768         * cs-parser.jay: Allow parsing weird array creation construct.
2769
2770 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2771
2772         * cs-parser.jay: Conflicts reduction.
2773
2774 2008-10-04  Marek Safar  <marek.safar@gmail.com>
2775
2776         * cs-parser.jay: Conflicts reduction.
2777
2778 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
2779
2780         Fix #398325
2781         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
2782         property.  Add a 'count' hint about the use of the shared vector.
2783         Ensure that we don't leak out dirty bits.
2784         (UsageVector.MergeChild): Throw away information about variables
2785         in child vectors.
2786         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
2787
2788 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2789
2790         A fix for bug #431746
2791         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
2792         parameters when iterator is created.
2793
2794 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2795
2796         A fix for bug #431827
2797         * expression.cs: Fixed right based pointer arithmetic operations
2798         emit.
2799
2800 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2801
2802         A fix for bug #353779
2803         * assign.cs, expression.cs: Fixed compound assignment conversions.
2804
2805 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2806
2807         A fix for bug #375262
2808         * statement.cs: Refactor ArrayForeach to be usable with string
2809         indexer. Optimized single dimentional arrays foreach.
2810
2811 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2812
2813         A fix for bug #431255
2814         * anonymous.cs, expression.cs: Removed broken optimization.
2815
2816 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2817
2818         * anonymous.cs: Use full type parameters of parent generic
2819         containers. Removed unnecessary AddParentStoreyReference call.
2820
2821 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2822
2823         A fix for bug #324702
2824         * class.cs: Use better shorter names for explicit interface member
2825         implementations.
2826
2827         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
2828
2829 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2830         
2831         * expression.cs: Use new interface to check fixed expression.
2832
2833 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2834
2835         A fix for bug #421101
2836         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
2837         interface to check for fixed fixed-buffers.
2838
2839 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2840
2841         A fix for bug #429264
2842         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
2843         
2844         * delegate.cs: Removed unnecessary casts.
2845
2846 2008-09-30  Marek Safar  <marek.safar@gmail.com>
2847
2848         A fix for bug #352151
2849         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
2850         class.cs: Fixed already defined explicit interface members check.
2851
2852 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
2853
2854         cs-tokenizer.cs: Fix typo.
2855
2856 2008-09-28  Miguel de Icaza  <miguel@novell.com>
2857
2858         * eval.cs (InteractiveBase): The quit command now just sets a
2859         flag, instead of calling Environment.Exit(), it is milder on
2860         embedded hosts. 
2861
2862         CompiledMethod is now in Mono.CSharp, not nested inside
2863         the Evaluator, it was inconvenient to use.
2864
2865 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2866
2867         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
2868         code to be invoked without having to reparse.
2869
2870 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2871
2872         * ecore.cs: The recent changes to FieldExpr broke this as well.
2873         Fixes LINQ queries in the interactive shell.
2874
2875         * Multiple files: indentation fixing for the Mono coding
2876         guidelines for the switch statement.
2877
2878         * eval.cs: Make the Evaluator API thread safe.
2879
2880 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2881
2882         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
2883         constructor parsing.
2884
2885 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2886
2887         A fix for bug #325326
2888         * statement.cs: Check possible mistaken empty statement using
2889         explicit blocks only.
2890
2891 2008-09-25  Miguel de Icaza  <miguel@novell.com>
2892
2893         * eval.cs (LoadAssembly, ReferenceAssembly): Call
2894         RootNamespace.ComputeNamespaces to update the internal list of
2895         namespaces, this is no longer done for us.
2896
2897         (InteractiveBase): Use the Evaluator APIs instead of calling into
2898         Driver directly
2899
2900 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2901
2902         A fix for bug #429264
2903         * expression.cs: Missing mutator for access to multidimensional
2904         arrays.
2905
2906 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2907
2908         * class.cs, statement: Emit DebuggerHidden attribute for iterator
2909         entry wrapper.
2910         
2911         * driver.cs: Missing input argument check.
2912
2913 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2914
2915         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
2916         expression.cs, statement.cs, rootcontext.cs, class.cs, 
2917         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
2918         DefineMembers.
2919
2920 2008-09-24  Miguel de Icaza  <miguel@novell.com>
2921
2922         * ecore.cs (FieldExpr): Only initialize eclass when we return a
2923         fully constructed FieldExpr, fixes the regression introduced in
2924         the last commit.
2925         
2926         * ecore.cs, expression.cs: Plug back the eclass initialization as
2927         otherwise it regresses `csharp'. 
2928
2929 2008-09-24  Marek Safar  <marek.safar@gmail.com>
2930
2931         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
2932         ecore.cs, attribute.cs: Moved obsolete method checks from emit
2933         phase to resolve phase. It resolves problems with expression trees
2934         and fixes bugs #323796, #325156.
2935
2936 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2937
2938         * codegen.cs: Report better error when symbol writer is missing.
2939
2940 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2941
2942         * codegen.cs: Set .NET symbol writer.
2943         
2944         * decl.cs: Guard against null generic arguments.
2945         
2946         * report.cs: Don't report exactly same additional details.
2947
2948 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2949
2950         A fix for bug #324917
2951         * cs-parser.jay: Add missing multidimensional non-expression type
2952         ranks.
2953         
2954 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2955
2956         A fix for bug #428191
2957         * anonymous.cs: Create an outer generic fields also for non-storey
2958         anonymous methods.
2959
2960 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2961
2962         A fix for bug #378294
2963         * class.cs: Make fixed size buffers gmcs feature only.
2964
2965 2008-09-22  Marek Safar  <marek.safar@gmail.com>
2966
2967         A fix for bug #355622, #324993
2968         * assign.cs, const.cs, class.cs: Create new EmitContext for each
2969         field initializer.
2970
2971 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2972
2973         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
2974         error reporting.
2975
2976 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2977
2978         A fix for bug #416110
2979         * generic.cs: Struct constraint results in default ctor and
2980         ValueType base type constraint to be set.
2981
2982 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2983
2984         A fix for bug #423791
2985         * generic.cs: Fixed params output type type-inference.
2986
2987 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2988
2989         * cs-parser.jay, expression.cs: Fixed few expression crashes.
2990         
2991 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2992
2993         * cs-tokenizer.cs: Don't break on extra partial modifier.
2994
2995 2008-09-19  Marek Safar  <marek.safar@gmail.com>
2996
2997         A fix for bug #427592
2998         * generic.cs: Use common parameter resolve method.
2999
3000 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3001
3002         A fix for bug #414758
3003         * expression.cs, ecore.cs: Fixed crash when accessing non-static
3004         property.
3005
3006 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3007
3008         * driver.cs, namespace.cs: Read types and namespaces after all
3009         requested assemblies are loaded, fixes issues with System.Core
3010         auto-reference, and #419888.
3011
3012 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3013
3014         A fix for bug #417705
3015         * cs-parser.jay: Fixed as/is operator expression split.
3016
3017 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3018
3019         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
3020         Fixed expression tree representation of empty new expression and
3021         new initializer expression.
3022
3023 2008-09-18  Miguel de Icaza  <miguel@novell.com>
3024
3025         * eval.cs: Remove warning, keep reference to driver around.
3026
3027         * Hide fields that do not need to be public.
3028
3029 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3030
3031         A fix for bug #426385
3032         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
3033         conversion for array elements.
3034
3035 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3036
3037         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
3038         void parsing conflicts.
3039
3040 2008-09-15  Marek Safar  <marek.safar@gmail.com>
3041
3042         A fix for bug #425601
3043         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
3044         System.Core only when there is no custom ExtensionAttribute
3045         implementation.
3046
3047 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3048
3049         * namespace.cs: Do not report CS0246 (name
3050
3051 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3052
3053         A fix for bug #425669
3054         * generic.cs: Don't cache generic static anonymous method 
3055         containers.
3056
3057 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3058
3059         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3060         conflicting constraints.
3061
3062 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3063
3064         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3065         mcs too.
3066
3067 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3068
3069         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3070         to null pointer conversion fixes.
3071
3072 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3073
3074         * cs-parser.jay, expression.cs: An implicitly typed local variable
3075         declarator cannot use an array initializer.
3076
3077 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3078
3079         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3080
3081 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3082
3083         * generic.cs (InflatedConstraints): Don't crash when constraints
3084         are different.
3085         
3086         * cs-parser.jay: const_declarator is a block.
3087
3088         * constant.cs: Check for not allowed NaN conversions.
3089
3090 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3091
3092         * driver.cs: Drop --shell argument, the compiler is no longer a
3093         REPL. 
3094
3095         * eval.cs: Move most of the code that deals with evaluation into
3096         this file and document the public API from repl.cs
3097
3098         * repl.cs: Remove from here.
3099         
3100 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3101
3102         A fix for bug #424684
3103         * generic.cs: Generic class constraints must come first.
3104
3105 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3106
3107         * cs-parser.jay: Improve error reporting for syntax errors in
3108         statements and expressions, we now report the expected tokens
3109         instead of reporting the useless "; expected".
3110
3111         Drop the strings from the token declaration, it turns out that
3112         they did not do what I thought they did.  Instead they were adding
3113         two sets of tokens to the tables.
3114
3115 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3116
3117         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3118         delegate.cs: Share special type check.
3119
3120 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3121
3122         A fix for bug #423981
3123         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3124
3125 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3126
3127         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3128         ConvertImplicitly.
3129
3130 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3131
3132         A fix for bugs: #324750, #335946
3133         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3134         lookup rule to determine ?-based tokens.
3135
3136 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3137
3138         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3139         expressions (like event adding or removing) end up here, so we
3140         need to treat those as statements.
3141
3142         Add LoadAssembly method.
3143
3144 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3145
3146         * repl.cs: Add Time method.
3147
3148 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3149
3150         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3151
3152 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3153
3154         * repl.cs: Add workaround for old compilers.
3155
3156 2008-09-04  Jb Evain  <jbevain@novell.com>
3157
3158         * repl.cs (PrettyPrint): pretty print everything that
3159         implements IDictionary, as well as IEnumerables. Also,
3160         add a quit helper property.
3161
3162 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3163
3164         * constant.cs: Better error reporting for decimal literals.
3165         
3166         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3167         field attributes.
3168         
3169 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3170                         Miguel de Icaza  <miguel@novell.com>
3171
3172         A fix for bug #422951
3173         * assign.cs (Assign.DoResolve): Perform the type conversions
3174         checks before we attempt to initialize `New' initializers. 
3175
3176 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3177
3178         A fix for bug #422853
3179         * delegate.cs (DelegateCreation): Add special handling for
3180         EmptyExpression.Null instance expression which is just another
3181         hack for undecided member instance exression.
3182
3183 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3184
3185         * expression.cs, ecore.cs: Emit full expression tree for reduced
3186         binary expressions.
3187
3188 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3189
3190         * expression.cs (This): Guard against multi-resolving.
3191         
3192         * ecore.cs, statement.cs (Throw): Simplified.
3193         
3194         * flowanalysis.cs: Also verify event fields.
3195
3196 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3197
3198         * assign.cs (Assign.DoResolve): Perform the type conversions
3199         checks before we attempt to initialize `New' initializers. 
3200
3201         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3202
3203         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3204         public. 
3205
3206         * repl.cs: Update help.
3207
3208 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3209
3210         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3211         handling of the default config handling, including the special
3212         treatment of System.Core assembly. 
3213
3214         Fixes the REPL processing for LINQ.
3215
3216 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3217
3218         A fix for bug #422507
3219         * expression.cs (UnboxCast): Add missing child expression mutator.
3220
3221 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3222
3223         * driver.cs: Don't self reference System.Core assembly.
3224
3225 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3226
3227         A fix for bug #422507
3228         * expression.cs (StringConcat): Add missing type mutator.
3229
3230 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3231
3232         * generic.cs (TypeInferenceContext): Follow equality rule for
3233         constructed type lower bound type inference.
3234
3235 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3236
3237         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3238         <dblank@cs.brynmawr.edu> which updates the cursor position on
3239         refresh.
3240         
3241 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3242
3243         A fix for bug #367145
3244         * driver.cs: Fixed import of extension methods when using -noconfig
3245         option.
3246
3247 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3248
3249         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3250         version from non-generic implementation instead.
3251
3252 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3253
3254         A fix for bug #418908
3255         * class.cs: Use AddScopeStatement for field initializers.
3256
3257 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3258
3259         A fix for bug #415385
3260         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3261
3262 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3263
3264         A fix for bug #421736
3265         * iterators.cs: Don't crash on unreachable iterators.
3266
3267 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3268
3269         A fix for bug #421628
3270         * parameter.cs, attribute.cs: Clone also parameter attributes.
3271
3272 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3273
3274         * namespace.cs (LookupType): In EvalMode, try to replace
3275         the TypeBuilder from our cache with a Type as Reflection.Emit does
3276         not  like to mix code from older assemblies emitted and new
3277         assemblies emitted. 
3278
3279         This sounds like a serious Mono bug that prevents multiple
3280         assemblies to be generated and consumed at the same time.
3281
3282         * cs-parser.jay (push_current_class): Do not make interactive
3283         classes internal or private, make them public as we currently
3284         generate each new class in a new assembly.   
3285
3286 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3287
3288         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3289         remove types that are entered into the global namespace during
3290         parsing so that we can remove them on failure.
3291  
3292         * cs-parser.jay: Parsing: we now keep track of types that are
3293         entered into global variables and queue those in case the parsing
3294         or resolution fail.
3295  
3296         This happens in a few situations: during partial-input, we invoke
3297         the parser repeatedly for example with the string "class X", this
3298         would cause X to be registed, and we need to remove this
3299         registration so that another parse attempt later with say "class X {"
3300         would actually work.
3301  
3302         Additionally, if there is an error in the resolution phase, for
3303         example: "class X : NonExistant {}" th
3304         
3305         * cs-parser.jay: Be more precise with the errors being raised,
3306         instead of flagging all exceptions during parsing to be attributed
3307         to the parsing process, distinguish those from errors happening in
3308         the actions and hint that using -v would produce the actual
3309         exception. 
3310
3311         * repl.cs: Do not load all compiler references on each reset,
3312         doing the partial reset takes care of this.
3313         
3314 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3315
3316         * repl.cs: Add support for loading all the files from
3317         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3318         as shell libraries.
3319
3320         Introduce a micro-parser that is able to deambiguate on its input
3321         whether we are dealing with a compilation unit (namespace, class,
3322         interface, struct, delegate) declaration or a statement.   This
3323         allows both declarations and statements to be entered. 
3324
3325         Set history size by default to 300 lines.
3326
3327         Instead of distinguishing based on the parser.InteractiveResult,
3328         have only two cases: statements were parsed, or a compilation unit
3329         was.   Always pull the Using statement additions from the
3330         compilation unit parse.
3331         
3332         * cs-tokenizer.cs: Rename tokens to better describe their intent
3333         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3334         
3335         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3336         EvalMode is used to trigger the lookup of global variables while
3337         StatementMode is used turn variable declarations into static
3338         fields.
3339
3340         * getline.cs: Allow history size to be set.
3341         
3342 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3343
3344         A fix for bug #360755
3345         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3346
3347 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3348
3349         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3350         
3351         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3352         member name, it is too confusing
3353         
3354         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3355         
3356         * rootcontext.cs: Finally default to warning level 4.
3357
3358 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3359
3360         * class.cs (CheckBase): Ignore overloaded operators.
3361
3362 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3363
3364         A fix for bug #420830
3365         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3366
3367 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3368
3369         A fix for bug #420832
3370         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3371
3372 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3373
3374         A fix for bug #420386
3375         * nullables.cs: Fixed logic of nullable user comparison operators involving
3376         null values.
3377
3378 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3379         
3380         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3381
3382 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3383
3384         * repl.cs: Add support for aborting the running code with C-c. 
3385
3386 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3387
3388         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3389
3390 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3391
3392         * cs-parser.jay (interactive_statement_list): A new set of rules
3393         for hosting statements that uses the "interactive_" prefix.   
3394
3395         * repl.cs: Add support for parsing `using' as a statement or as a
3396         directive.  Deambiguating before passing this to the parser.
3397
3398         We need to distinguish statement_expressions that occur at the
3399         toplevel vs those that occur embedded into expressions.
3400
3401         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3402         that fixes the cursor key handling, and a history bug.
3403         
3404 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3405
3406         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3407         limitations in Console, instead the 2.0 bootstrap libraries now
3408         include the Console bits.
3409
3410         Also, remove the use of Nullables from getline.cs
3411
3412         ------------
3413         
3414         Interactive support for the C# compiler.   Use gmcs --shell to
3415         enter a read-eval-print loop shell.
3416
3417         Docs: http://www.mono-project.com/CsharpRepl
3418         
3419         * sources: include repl.cs here and getline.cs for gmcs.exe,
3420         everything else is getline.cs impaired.
3421
3422         * Makefile: when bootstrapping pass a special flag
3423         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3424         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3425         This distinguishes those two cases.
3426
3427         * repl.cs: Support for a read-eval-print loop.   Will be soon
3428         refactored into eval support and then REPL on top of it.
3429
3430         * ecore.cs: If a simplename lookup fails, before erroring out,
3431         if we are in EvalMode to resolve the name to a declaration in the
3432         Eval-land.    
3433
3434         This means that variable declarations that happened in previous
3435         classes (as repl puts every statement in a separate class) are
3436         made visible in this way.
3437
3438         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3439         triggered an error due to the end of file being reached.   This is
3440         used to do multi-line input, and notify the caller that the user
3441         needs to provide more text before a successful parse.
3442
3443         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3444         to drive the evaluation with a custom wrapper. 
3445
3446         * driver.cs: Add support for --shell, and refactor some code to be
3447         reused from repl.cs
3448         
3449         * namespace.cs: Add support for serializing the contents of the
3450         namespaces and reloading them.  
3451
3452         * getline.cs: A managed implementation of ReadLine under
3453         X11/Apache2 license terms.  Easy to embed in other applications as
3454         well.
3455
3456         * namespace.cs: Add some functions to save and restore the
3457         namespace state.
3458
3459         * rootcontext.cs: New public field.
3460
3461         * cs-tokenizer.cs: Add support for one of the possible characters
3462         we introduce into the token stream.  
3463
3464         This patch does not affect the regular tokenization process, the
3465         only performance hit would happen if there is an invalid character
3466         on the input string.
3467
3468         * support.cs: Move isatty helper routine here.
3469
3470         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3471         code generator for in-memory assemblies.
3472
3473 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3474
3475         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3476         parameter cannot be always used as a type.
3477
3478 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3479
3480         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3481
3482 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3483
3484         * convert.cs: Implement explicit array to IList<T> conversion.
3485
3486 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3487
3488         A fix for bug #362740
3489         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3490
3491 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3492         
3493         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3494         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3495         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3496         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3497         handling to use just one type of infrastructure and deal with generics
3498         more effectivelly.
3499
3500 2008-07-23  Martin Baulig  <martin@ximian.com>
3501
3502         *** Merged this from trunk revision 108527 ***
3503
3504         * statement.cs
3505         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3506         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3507         scope variable.
3508
3509 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3510         
3511         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3512         error checks.
3513
3514 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3515         
3516         * delegate.cs: Fixed compiler crash when creating delegate using partial
3517         method.
3518         
3519         * typemanager.cs: MulticastDelegate is not a delegate.
3520
3521 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3522         
3523         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3524         checks.
3525
3526 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3527
3528         * cs-parser.jay (type): Allow 'var' in mcs too.
3529         (local_variable_type): Likewise.
3530
3531 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3532         
3533         * driver.cs: Removed broken -noconfig variants.
3534
3535 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3536         
3537         A fix for bug #417078
3538         * expression.cs: Emit correctly left side pointer operators.
3539
3540 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3541
3542         * generic.cs, lambda.cs: Inflate method generic arguments only.
3543
3544 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3545
3546         * class.cs: Fixed struct layout check regression.
3547
3548 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3549
3550         * cs-parser.jay, enum.cs: Simplified enum parsing.
3551         
3552         * decl.cs: Check all type parameters conflicts.
3553         
3554         * expression.cs, statement.cs, attribute.cs: More expression checks.
3555
3556 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3557
3558         * generic.cs: Add type inference types restriction.
3559         
3560         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3561         anonymous.cs, expression.cs: Allocate less accessor parameters.
3562
3563 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3564
3565         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3566         classes.
3567
3568 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3569
3570         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3571
3572 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3573
3574         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3575         Also fixes #362146 and #381592.
3576
3577 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3578
3579         * ecore.cs: Reduced constant cannot be used as an attribute value.
3580         
3581         * cs-parser.jay: Base expression has to be a type.
3582         
3583         * expression.cs (Conditional): Uses ReducedExpression.
3584
3585 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3586
3587         A fix for bug #376826
3588         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3589         address of hoisted local variable or parameter cannot be taken.
3590
3591 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3592
3593         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3594         anonymous method inside checked/unchecked expression.
3595
3596 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3597
3598         * typemanager.cs (IsEqual): Guard against null.
3599         
3600         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3601         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3602         routine. Fixed few misleading conversion errors.
3603
3604 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3605
3606         * class.cs: Consider generics when checking cycles in struct layout.
3607
3608 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3609
3610         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3611
3612 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3613
3614         A fix for bug #414165
3615         * anonymous.cs: Use same anonymous implementation method for all anonymous
3616         method emits.
3617
3618 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3619
3620         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3621         constraints.
3622
3623 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3624
3625         * cs-parser.jay: Typeof argument has to be a type expression.
3626         
3627         * namespace.cs: Check alias and namespace definitions collisions.
3628         
3629         * class.cs, pending.cs: Moved explicit interface accessor implementation
3630         check.
3631         
3632         * delegate.cs, expression.cs: Verify special name invocations.
3633         
3634 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3635
3636         * cs-parser.jay: Don't choke on empty generic type arguments.
3637         
3638         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3639         
3640         * expression.cs, ecore.cs: Minor expressions bugs.
3641
3642 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3643
3644         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
3645         and added more error handling.
3646         
3647         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
3648         
3649         *  modifiers.cs, enum.cs: Fixed.
3650
3651 2008-07-31  Jb Evain  <jbevain@novell.com>
3652
3653         * driver.cs: remove -pkg ability of smcs.
3654
3655 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3656
3657         * statement.cs (Switch): Correctly set empty default target for single
3658         blocks.
3659
3660 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3661
3662         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
3663         string switch statement implementation to use string dictionary which
3664         significantly (2-8x) improves performance of generated code.
3665
3666 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3667
3668         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
3669         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
3670         
3671 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3672
3673         A fix for bug #412595
3674         * typemanager.cs, convert.cs, expression.cs: Some types are never
3675         convertible to each other.
3676
3677 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3678
3679         * nullable.cs (CreateNullConstant): An error messages update.
3680
3681 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3682
3683         A fix for bug #412595
3684         * cfold.cs: Don't cast undefined bool constant.
3685
3686 2008-07-29  Martin Baulig  <martin@ximian.com>
3687
3688         * symbolwriter.cs
3689         (SymbolWriter.Reset): New public static method.
3690
3691         * driver.cs
3692         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
3693
3694 2008-07-28  Marek Safar  <marek.safar@gmail.com>
3695
3696         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
3697         
3698         * expression.cs (ElementAccess): Exact size allocation.
3699
3700 2008-07-26  Marek Safar  <marek.safar@gmail.com>
3701
3702         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
3703
3704 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3705
3706         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
3707         
3708         * class.cs: Removed $PRIVATE$ field hack which caused problems during
3709         flow analysis.
3710
3711 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3712
3713         A fix for bug #412217
3714         * assign.cs: Mutate also assignment type.
3715
3716 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3717
3718         A fix for bug #323644
3719         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
3720         indexers.
3721
3722 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3723
3724         A fix for bug #412134
3725         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
3726         non-enumerable operands when overloading equality or bitwise operators.
3727
3728 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3729
3730         * anonymous.cs: Cache closed generic anonymous method delegates.
3731
3732 2008-07-24  Marek Safar  <marek.safar@gmail.com>
3733
3734         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
3735         anonymous.cs, statement.cs: Always emit anonymous method as static method
3736         when is instance free. Use nesting for nested anynomous methods blocks.
3737         
3738 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3739
3740         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
3741         types.
3742
3743 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3744
3745         * expression.cs: Removed MakeSimpleCall.
3746
3747 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3748
3749         A fix for bug #323012
3750         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
3751         Base method implementing interface has to be public.
3752
3753 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3754
3755         * cs-parser.jay: Don't break on missing argument.
3756
3757 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3758
3759         A fix for bug #320993
3760         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
3761           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
3762
3763 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3764
3765         A fix for bug #320748
3766         * convert.cs: Implicit user operators cannot convert to interfaces
3767
3768 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3769
3770         A fix for bug #312686
3771         * driver.cs: Ignore empty assembly references.
3772
3773 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3774
3775         A fix for bug #387040
3776         * ecore.cs: Skip constrains check for an explicit implementation.
3777
3778 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3779
3780         A fix for bug #409045
3781         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
3782           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
3783           identifiers are file specific unless passed as input arguments.
3784
3785 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3786
3787          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
3788          to emit UnmanagedMarshal data under 2.0 profile.
3789
3790 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3791
3792         A fix for bug #410369
3793         * parameter.cs: Clone correctly ParamsParameter.
3794
3795 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3796
3797         * expression.cs (Argument): Always report type for type based expressions
3798         errors.
3799
3800 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3801
3802         A fix for bug #410666
3803         * anonymous.cs: Correctly initialize generic storey reference.
3804
3805 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3806
3807         * convert.cs: Don't box same type arguments.
3808
3809 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3810
3811         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
3812         Finished missing generic type mutators.
3813
3814 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3815
3816         * iterators.cs, statement.cs: Finished statements CloneTo.
3817
3818 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3819
3820         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
3821         
3822         * expression.cs: Emit optimized default value expressions in expression tree
3823         array initializer.
3824
3825 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3826
3827         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
3828
3829 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3830
3831         A fix for bug #367536
3832         * cs-parser.jay: Check static constructor of generic types for an access
3833         modifier.
3834
3835 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3836
3837         A fix for bug #353800
3838         * lambda.cs: Emit ret for contextual statements.
3839         
3840         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
3841         up emitting redundant ret for all anonymous methods with return.
3842
3843 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3844
3845         A fix for bug #365188
3846         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
3847         create anonymous method storey in unreachable block.
3848
3849 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3850
3851         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
3852         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
3853         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
3854         statement.cs: Fixed relevant defects found by Gendarme.
3855
3856 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3857
3858         A fix for bug #325291
3859         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
3860         statement.cs: Replaced IAnonymousHost with top level block flag.
3861
3862 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3863
3864         * cs-parser.jay: Clean up unused open_parens.
3865
3866 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3867
3868         * ecore.cs: Custom error message for a range variable assignment.
3869
3870 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3871
3872         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
3873         load.
3874
3875 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3876
3877         * literal.cs: Null literal is of object type.
3878
3879 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3880
3881         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
3882         expression of nullable equality comparison.
3883
3884 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3885
3886         * expression.cs(PointerArithmetic): Removed redundant assignment.
3887
3888 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3889
3890         * decl.cs (GetSignatureForError): Report full namespace name for containers.
3891
3892 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3893
3894         A fix for bug #408361
3895         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
3896         they are replaced by GetMethod.
3897
3898 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3899
3900         A fix for bug #408721 by jeremie.laval@gmail.com
3901         * expression.cs (Indirection): Implemented CloneTo.
3902
3903 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3904
3905         * statement.cs (AssignableSlots): Temporary disabled variable initialization
3906         assert check.
3907
3908 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3909
3910         * report.cs (EnableReporting): Don't reinitialize 0-based values.
3911
3912 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3913
3914         * linq.cs: Reset tranparent parameter counter in probing mode.
3915
3916 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3917
3918         * anonymous.cs: Mutate anonymous method type.
3919
3920 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3921
3922         * ecore.cs, anonymous.cs: Mutate field expressions.
3923
3924 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3925
3926         A fix for bug #369670
3927         * linq.cs, statement.cs: Use explicit block for query expressions variables.
3928
3929 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3930
3931         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
3932
3933 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
3934
3935         Fix bug #314902
3936         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
3937         only one '>', and finds a '>>', abort the generic lookahead.
3938
3939 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3940
3941         A fix for bug #319902
3942         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
3943
3944 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3945
3946         A fix for bug #406371
3947         * statement.cs: Moved EmitSymbolInfo to Block.
3948
3949 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3950
3951         * ecore.cs: Report better error for extension method overload failures.
3952
3953 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3954
3955         * expression.cs (Is): No need to box reference values.
3956
3957 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3958
3959         * class.cs: Use event resolve context when initializing CreateEmitContext.
3960
3961 2008-07-09  Marek Safar  <marek.safar@gmail.com>
3962
3963         A fix for bug #394436
3964         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
3965         method used inside expression trees. Added more LINQ to expression tree
3966         conversions.
3967
3968 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3969
3970         A fix for bug #378189, #370577
3971         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
3972         from expression.
3973
3974 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3975
3976         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
3977         hierarchically.
3978
3979 2008-07-08  Marek Safar  <marek.safar@gmail.com>
3980
3981         A fix for bug #406702
3982         * anonymous.cs: Always park anonymous method in the nearest parent storey.
3983
3984 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3985
3986         A fix for bug #406648
3987         * cs-parser.jay: Report nullable use in mcs for some cases.
3988
3989 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3990
3991         * ecore.cs: Improved argument mismatch error messages.
3992
3993 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3994
3995         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
3996
3997 2008-07-07  Marek Safar  <marek.safar@gmail.com>
3998
3999         * expression.cs (TypeOf): Mutate type argument.
4000
4001 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4002
4003         * class.cs: Report missing partial modifier for correct type.
4004
4005 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4006
4007         * ecore.cs, expression.cs (VariableReference): Variable property is 
4008         protected.
4009
4010 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4011
4012         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
4013         
4014 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4015
4016         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
4017         method delegates.
4018
4019 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4020
4021         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
4022         anonymous method storey to an instance method when only "this" is hoisted.
4023
4024 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4025
4026         A fix for bug #321615
4027         * expression.cs: Pointer comparisons use unsigned operator.
4028
4029 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4030
4031         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
4032
4033 2008-07-02  Marek Safar  <marek.safar@gmail.com>
4034
4035         A fix for bug #404905
4036         * class.cs: Always initialize local unsafe variables.
4037
4038 2008-06-30  Marek Safar  <marek.safar@gmail.com>
4039
4040         A fix for bug #396987
4041         * expression.cs (NewInitialize): Clear local temporary variable for next run
4042
4043 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4044
4045         A fix for bug #401020
4046         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4047
4048 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4049
4050         A fix for bug #398319
4051         * cs-parser.jay: Implemented undocumented base access expression inside
4052         anonymous types.
4053
4054 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4055
4056         A fix for bug #404227
4057         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4058
4059 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4060
4061         A fix for bug #404227
4062         * convert.cs: Fixed explicit array to interface cast.
4063
4064 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4065
4066         A fix for bug #403894
4067         * delegate.cs: Mutate DelegateInvocation type.
4068
4069 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4070
4071         A fix for bug #379348
4072         * delegate.cs: Box a load of generic parameters.
4073
4074 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4075
4076         * expression.cs: Add an array creation arguments mutate.
4077
4078 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4079
4080         A fix for bug #386068
4081         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4082         parameter.
4083
4084 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4085
4086         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4087         CloneTo.
4088
4089 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4090
4091         A fix for bug #403518
4092         * delegate.cs: Type correctly anonymous method new invocation.
4093
4094 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4095
4096         A fix for bug #394826
4097         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4098         calls.
4099
4100 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4101
4102         A fix for bug #394826
4103         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4104         needed.
4105
4106 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4107
4108         * class.cs: Clone indexer parameters for localized capturing.
4109
4110 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4111
4112         A fix for bug #402379
4113         * expression.cs: Don't crash when an object initializer resolve fails.
4114
4115 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4116
4117         A fix for bug #402888
4118         * expression.cs: Mutate conditional expression.
4119
4120 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4121
4122         A fix for bug #401012
4123         * class.cs: Keep StructLayout in shared container.
4124
4125 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4126
4127         A fix for bug #400438
4128         * decl.cs, class.cs: Only properties can be automatically implemented.
4129
4130 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4131
4132         * statement.cs (ChangeToIterator): Copy also labels.
4133
4134 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4135
4136         * ecore.cs: Pass type argument details to parent extension method.
4137
4138 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4139
4140         A fix for bug #375966
4141         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4142
4143 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4144
4145         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4146
4147 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4148
4149         A fix for bug #394347
4150         * anonymous.cs: Cache compatible delegates as compatibility check produces
4151         a new method every time.
4152
4153 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4154
4155         * anonymous.cs: Propagate storey reference for single references.
4156
4157 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4158
4159         A fix for bug #387615
4160         * assign.cs, expression.cs: Correctly clone compound assignment.
4161
4162 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4163
4164         A fix for bug #359611, #359604
4165         * anonymous.cs: Mutate all types of hoisted parameters.
4166
4167 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4168
4169         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4170         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4171         expression.cs, codegen.cs, statement.cs
4172         
4173         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4174         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4175         
4176         ** Anonymous methods, lambda expressions rewrite **
4177         
4178         Anonymous expressions are now resolved when an explicit block is resolved 
4179         and they don't require any registration procedure anymore. Further,
4180         anonymous methods are defined when explicit block is emitted which allows
4181         better control of whole process and opens possibilities for more
4182         optimizations as well as alternative to reverse whole process.
4183         
4184         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4185         process consistent and to correctly emit hoisted generic methods when they
4186         have at least 1 hoisted variable.
4187         
4188 2008-06-17  Martin Baulig  <martin@ximian.com>
4189
4190         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4191         iterator method.
4192         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4193         virtual property; check it in Emit().
4194         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4195         an iterator.
4196         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4197         an iterator.
4198         (Indexer.Define): Likewise.
4199
4200 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4201
4202         * convert.cs: Don't use IsInterface on type arguments.
4203         
4204         * delegate.cs: DelegateInvocation uses MethodInfo.
4205         
4206         * parameter.cs: Removed IsTypeParameter.
4207         
4208         * generic-mcs.cs: More missing stuff.
4209
4210 2008-06-16  Martin Baulig  <martin@ximian.com>
4211
4212         * modifiers.cs
4213         (Modifiers.DEBUGGER_HIDDEN): New public const.
4214
4215         * typemanager.cs
4216         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4217
4218         * class.cs
4219         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4220         (AbstractPropertyEventMethod): Likewise.
4221         (Constructor.Emit): Likewise.
4222         (SourceMethod.SetCompilerGenerated): Removed.
4223
4224         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4225         on MoveNext().
4226
4227         * anonymous.cs
4228         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4229         if we're an `IteratorHost'.
4230         (AnonymousMethodMethod..ctor): Don't set
4231         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4232         not on the method.
4233
4234 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4235
4236         * statement.cs: Clean-up foreach statements.
4237
4238 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4239
4240         * class.cs: Stop using public method which should not exist
4241         (MethodBuilder.SetGenericMethodSignature).
4242
4243 2008-06-11  Martin Baulig  <martin@ximian.com>
4244
4245         * location.cs
4246         (Location.LookupFile): Add `CompilationUnit' argument; when given
4247         a relative file name, make it relative to the directory the .cs
4248         file is located in instead of using the current directory.
4249
4250 2008-06-11  Martin Baulig  <martin@ximian.com>
4251
4252         * class.cs
4253         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4254         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4255         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4256         (SourceMethod.SetCompilerGenerated): Likewise.
4257
4258 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4259
4260         * codegen.cs, driver: Only write symbol file when it's asked for.
4261
4262 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4263
4264         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4265
4266 2008-06-10  Martin Baulig  <martin@ximian.com>
4267
4268         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4269
4270 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4271
4272         A fix for bug #316290
4273         * expression.cs: Include decimal operators in predefined table.
4274         
4275         * parameters.cs: More readonlyness.
4276
4277 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4278
4279         A fix for bug #397213
4280         * cs-parser.jay: One more missing current_local_parameters reset.
4281
4282 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4283
4284         A fix for bug #396633
4285         * class.cs: Host backing field in partial container.
4286
4287 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4288
4289         A fix for bug #397068
4290         * expression.cs: Check both operand types when predefined operator is used.
4291
4292 2008-06-05  Martin Baulig  <martin@ximian.com>
4293
4294         Merged the `debugger-kahalo' branch.
4295
4296         * class.cs
4297         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4298         we're an iterator method.
4299         (SourceMethod): Reflect latest symbol writer changes;
4300         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4301         now `start_row' and `end_row'.
4302         (Constructor.Emit): Fix the logic whether to emit symbol information.
4303
4304         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4305         generated methods.
4306
4307         * location.cs
4308         (CompilationUnit): New public class; derives from `SourceFile'.
4309         (SourceFileEntry.DefineSymbolInfo): New public method.
4310         (SourceFileEntry.SetChecksum): New public method.
4311         (Location): Encode hidden line numbers by using `column == 255';
4312         the .ctor now accepts `column == -1' to mark a hidden line number.
4313         (Location.Hidden): New public property.
4314         (Location.CheckPoint): Add `CompilationUnit'.
4315         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4316         (Location.Push): Add `CompilationUnit compile_unit' argument.
4317         (Location.CompilationUnit): New public property.
4318
4319         * statement.cs
4320         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4321
4322         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4323
4324         * driver.cs: `SourceFile' -> `CompilationUnit'.
4325
4326         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4327
4328         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4329
4330         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4331         `#line hidden'.
4332
4333         * symbolwriter.cs
4334         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4335         new symbol writer API to also pass the file.
4336
4337 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4338
4339         * statement.cs: Emit catch variable assignment using variable expression.
4340         
4341 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4342
4343         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4344         with other variable types.
4345
4346 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4347
4348         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4349         GetLength method emit, it breaks resolve rules.
4350         
4351 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4352             Marek Safar  <marek.safar@gmail.com>
4353                         
4354         A fix for bug #395542
4355         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4356         declaration.
4357         
4358 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4359
4360         A fix for bug #395287
4361         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4362
4363 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4364
4365         A fix for bug #395845
4366         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4367         non-nullable parameter type.
4368         
4369 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4370
4371         * class.cs: Handle contructor initializer as a statement in top-level block.
4372
4373 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4374
4375         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4376         security attributes.
4377
4378 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4379
4380         * ecore.cs, expression.cs: Small IVariable refactoring.
4381
4382 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4383
4384         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4385
4386 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4387
4388         * cs-parser.jay: Removed redundant catch type check.
4389
4390 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4391
4392         A fix for bug #390372
4393         * nullable.cs: Set correct return type.
4394
4395 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4396
4397         A fix for bug #391062
4398         * typemanager.cs: Fixed crash when comparing null types.
4399
4400 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4401
4402         A fix for bug #391871
4403         * cs-parser.jay: Better error handling for invalid catch type.
4404
4405 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4406
4407         A fix for bug #392155
4408         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4409
4410 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4411
4412         A fix for bug #390666
4413         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4414         expressions.
4415
4416 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4417
4418         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4419         in getter.
4420
4421 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4422
4423         A fix for bug #389625
4424         * delegate.cs, generic.cs: Some progress on method group return type
4425         inference.
4426
4427 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4428
4429         A fix for bug #378419
4430         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4431
4432 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4433
4434         * class.cs (Constructor): Added IsCompilerGenerated.
4435
4436 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4437
4438         * expression.cs: Enum binary operators can accept non-enum operand only when
4439         is implicitly convertible to underlying type.
4440
4441 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4442
4443         A fix for bug #389272
4444         * support.cs: Workaround System.InvalidOperationException for enums.
4445
4446 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4447
4448         A fix for bug #389073
4449         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4450
4451 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4452
4453         * driver.cs: Split Parse.
4454         
4455         * location.cs (LookupFile): Uses string.Empty.
4456
4457 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4458
4459         * expression.cs, parameter.cs: Small ParameterReference clean up.
4460
4461 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4462
4463         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4464         hack. Fixes #387502.
4465
4466 2008-05-06  Martin Baulig  <martin@ximian.com>
4467
4468         * class.cs (Constructor.Emit): Fix the logic whether to emit
4469         symbol information.
4470
4471 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4472
4473         Fix #385503
4474         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4475         InvalidOperationException when the iterator is before the start or
4476         after the end.
4477
4478 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4479
4480         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4481         when left is nullable type.
4482
4483 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4484
4485         A fix for bug #386628
4486         * expression.cs (LocalVariableReference): Continue in resolving when
4487         variable is not assigned.
4488
4489 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4490
4491         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4492         nullable operations.
4493
4494 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4495
4496         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4497         it saves many redundant temporary variables for nullable operations.
4498
4499 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4500
4501         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4502         
4503         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4504         method.
4505         
4506         * nullable.cs: Constant coalescing operator optimizations.
4507
4508 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4509
4510         * constant.cs: Use unsigned conversion for values which are unsigned only.
4511
4512 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4513
4514         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4515         coalescing operator as it should be.
4516
4517 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4518
4519         A fix for bug #371016
4520         * expression.cs: All predefined delegate operators require implicit method
4521         group conversion.
4522         
4523 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4524
4525         * constant.cs: Emit long constant as uint when fits the range.
4526         
4527         * convert.cs, expression.cs: Fixed few unsafe conversions.
4528
4529 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4530
4531         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4532
4533 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4534
4535         Fix #385758
4536         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4537         'expr'.
4538         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4539
4540 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4541
4542         * constant.cs, literal.cs: IsLiteral property for error reporting.
4543         
4544         * ecore.cs, expression.cs: Implemented Property expression.
4545
4546 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4547
4548         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4549         
4550         * nullable.cs: Implemented nullable coalescing null operator.
4551
4552         * ecore.cs, expression.cs: Expression trees work.
4553
4554 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4555
4556         * ecore.cs: CreateExpressionTree is finally abstract.
4557
4558         * expression.cs, linq.cs: Updated.
4559
4560 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4561
4562         * expression.cs, ecore.cs: Block base access expression inside expression
4563         tree.
4564
4565 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4566
4567         A fix for bug #385058
4568         * expression.cs: User-defined operator implementations always take
4569         precedence over predefined operator implementations.
4570
4571 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4572
4573         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4574         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4575         expression tree conversions.
4576         
4577 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4578
4579         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4580         operators method details to Operator class.
4581
4582 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4583
4584         * anonymous.cs: Pass unsafe flags to anonymous container.
4585         
4586         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4587         inside expression tree.
4588
4589 2008-04-29  Martin Baulig  <martin@ximian.com>
4590
4591         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4592         (Tokenizer.PopPosition): Also restore the `line'.
4593
4594 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4595
4596         * delegate.cs: Implemented Invoke expression.
4597
4598 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4599
4600         * expression.cs: Fixed equality reference comparison regression.
4601
4602 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4603
4604         * ecore.cs: Clean up EmptyCast hack.
4605         
4606         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4607         using correct conversion rules. Also fixes #383993.
4608
4609 2008-04-28  Martin Baulig  <martin@ximian.com>
4610
4611         * class.cs (Constructor.Emit): Don't emit debugging information
4612         for generated default .ctor's.
4613
4614 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4615
4616         * convert.cs: Empty-cast ushort to int conversion.
4617
4618 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4619
4620         A fix for bug #384191
4621         * ecore.cs, expression.cs: Fixed expression cloning.
4622
4623 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4624
4625         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4626
4627 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4628
4629         Fix #381559, test-638.cs, test-639.cs
4630         * assign.cs (CompoundAssign.Helper): New wrapper.
4631         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4632         access.
4633         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4634         Pass unconverted expressions to the params array creation expression.
4635         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4636         (PropertyExpr.EmitAssign): Likewise.
4637         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4638         element if it is of kind CompoundAssign.Helper.
4639         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
4640         first before anything else.
4641         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
4642         (ArrayAccess.LoadArrayAndArguments): Simplify.
4643
4644 2008-04-27  Marek Safar  <marek.safar@gmail.com>
4645
4646         * expression.cs: Fixed cloning of typeof(void).
4647
4648 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
4649
4650         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
4651         (Assign.Emit): Likewise.  Move it to ...
4652         (CompoundAssign.DoResolve): ... here and ...
4653         (CompoundAssign.Emit): ... here.
4654         (EventAddOrRemove): New helper to handle += and -= on events, and
4655         avoid the use of BinaryDelegates.
4656         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
4657         (EventExpr.EmitAddOrRemove): Improve.
4658         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
4659
4660         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
4661         create VarExprs for 'foo.bar.var'.
4662         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
4663         is a highly inappropriate name for its functionality.
4664
4665 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4666
4667         Simplify handling of multiple assignments
4668         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
4669         inheritable-only.
4670         (SimpleAssign): New.  Class to be used for normal assignments.
4671         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
4672         * expression.cs, parameter.cs, statement.cs: Likewise.
4673
4674 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4675
4676         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
4677         for incompatible underlying types, more to come, uff.
4678
4679 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4680
4681         Fix gtest-388.cs
4682         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
4683         Handle 'leave_copy'.
4684
4685 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4686
4687         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
4688
4689 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
4690
4691         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
4692         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
4693         * statement.cs (While, Do, For): Allow test to have side effects.
4694         (For.DoEmit): Always emit InitStatement.
4695
4696         Fix test-635.cs
4697         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
4698         Always create SideEffectConstant.
4699         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
4700         of type EnumConstant.
4701
4702         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4703         Handle 'right' being SideEffectConstant of type 'bool'.
4704
4705         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4706         Use left.EmitBranchable instead of open coding it, so as to
4707         improve optimization opportunities.
4708
4709         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
4710
4711         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
4712         assumptions.
4713         (Expression.EmitSideEffect): Document.
4714
4715 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4716
4717         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
4718
4719 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4720
4721         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
4722
4723 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4724
4725         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
4726         conversion to expression tree.
4727
4728 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4729
4730         * ecore.cs: Removed unused expression.
4731
4732 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4733
4734         * expression.cs: Implemented NegateChecked and New expressions.
4735
4736 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4737
4738         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
4739
4740 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
4741
4742         Fix #351102
4743         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
4744         needing final 'ret' instruction.
4745
4746 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4747
4748         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
4749
4750 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4751
4752         * expression.cs: Emit ldnull and not null expression as an instance argument
4753          of static method expression calls.
4754
4755 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4756
4757         A fix for bug #378200
4758         * expression.cs: Fixed crash when creating parameterless expression tree
4759         method call.
4760
4761 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4762
4763         A fix for bug #375297
4764         * anonymous.cs: Fixed crash when inferring from null argument anonymous
4765         method.
4766
4767 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4768
4769         A fix for bug #377596
4770         * decl.cs, class.cs: Emit delegate type argument attributes.
4771
4772 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4773
4774         A fix for bug #365314
4775         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
4776         
4777 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4778
4779         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
4780         only.
4781
4782 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4783
4784         * generic.cs (TypeParameter): Removed redundant location.
4785
4786 2008-04-19  Marek Safar  <marek.safar@gmail.com>
4787
4788         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
4789         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
4790         FullNamedExpression in all declaration type expression, statements will come
4791         later.
4792
4793 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4794
4795         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
4796         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
4797
4798 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4799
4800         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
4801         code.
4802
4803 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4804
4805         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
4806         constraints.
4807
4808 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4809
4810         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
4811         name expressions.
4812         Also fixes #340463.
4813
4814 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
4815
4816         Hook up 'EmitSideEffect'
4817         * constant.cs (Constant.EmitSideEffect): New.
4818         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
4819         (SideEffectConstant.EmitSideEffect): New.
4820         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
4821         unconditional branch in EmitBranchable.
4822         (FieldExpr.EmitBranchable): New.
4823         * expression.cs (Unary.EmitSideEffect): New.
4824         (Binary.EmitSideEffect): New.
4825         (VariableReference.EmitSideEffect): New.  Do nothing.
4826
4827 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4828
4829         Introduce 'EmitSideEffect'
4830         * ecore.cs (Expression.EmitSideEffect): New.
4831         (TypeCast): Rename from EmptyCast.
4832         (EmptyCast): New.
4833         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
4834         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
4835         * convert.cs, nullable.cs: Update to changes.
4836
4837 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4838
4839         * class.cs, cs-parser.jay: Early check for base types expression.
4840
4841 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4842
4843         * decl.cs (MemberName): Declare PrettyName as obsolete.
4844
4845 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4846
4847         * namespace.cs: Use MemberName comparison.
4848
4849 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4850
4851         Fix build break
4852         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
4853         FullName.
4854         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
4855         (MemberName.FullyQualifiedName): New.  Provides the functionality
4856         that users assume FullName would have.
4857         * ecore.cs, namespace.cs: Update to changes.
4858
4859         * statement.cs (Using.assign): Make into ExpressionStatement.
4860         (Using.EmitPreTryBody): Simplify.
4861
4862 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4863
4864         * report.cs: ColorFormat is protected.
4865         
4866         * rootcontext.cs: Unused fields clean-up.
4867         
4868         * namespace.cs: Made UsingEntry name private.
4869
4870 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4871
4872         * cs-tokenizer.cs, location.cs: Removed unused field.
4873
4874 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
4875             Raja R Harinath  <harinath@hurrynot.org>
4876
4877         Fix #379822
4878         * constant.cs (SideEffectConstant.value): Rename from 'left'.
4879         (SideEffectConstant.side_effect): Rename from 'right'.
4880         (SideEffectConstant..ctor): Normalize 'side_effect'.
4881         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
4882         value of this constant.
4883         * cfold.cs: Update to changes.
4884
4885 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4886
4887         * cs-paser.jay: Removed unused variable.
4888         
4889         * driver.cs: Made Compile instance method.
4890
4891 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
4892
4893         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
4894
4895 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4896
4897         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
4898
4899 2008-04-13  Jb Evain  <jbevain@novell.com>
4900
4901         * namespace.cs: update the System.Core fullname for 2.1
4902         * driver.cs: update the list of required assemblies for 2.1.
4903         Merged from the Moonlight 2 branch.
4904
4905 2008-04-11  Marek Safar  <marek.safar@gmail.com>
4906
4907         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
4908         types and user defined operators. User operators arguments has to be checked
4909         for null value before invocation, which also means no operator is called
4910         when any argument is not convertible to unwrapped nullable type.
4911         
4912 2008-04-09  Marek Safar  <marek.safar@gmail.com>
4913
4914         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
4915         of Unary expressions to follow operator overloading rules precisely.
4916         Also fixes #321794, #323794
4917         
4918 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4919
4920         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
4921         expression.
4922         
4923 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4924
4925         * expression.cs, ecore.cs: Implemented MemberInit expression.
4926         
4927 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
4928
4929         Fix mono/tests/exception4.cs
4930         * statement.cs (ExceptionStatement, TryCatch): Revert to using
4931         ec.NeedReturnLabel () rather emitting a 'nop'.
4932
4933         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
4934         simple heuristic.
4935         (TryCatch.SomeCodeFollows): Likewise.
4936         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
4937         for 'break', 'continue' and 'return' statements inside a try.
4938         We're fairly sure that the generated IL stream will have more
4939         instructions textually following the try.
4940         (FlowBranchingTryCatch): Likewise.
4941
4942         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
4943         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
4944         overrides.
4945
4946         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
4947         wrapper -- forward everything to CollectionForeach.
4948         (CollectionForeach.NonDisposableWrapper): New.
4949         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
4950         instead of a pop + branch to end.
4951
4952 2008-04-07  Marek Safar  <marek.safar@gmail.com>
4953
4954         A fix for bug #377485
4955         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
4956         Propagate location for extension method groups. Report conversion failure at
4957         right place.
4958
4959 2008-04-07  Marek Safar  <marek.safar@gmail.com>
4960
4961         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
4962         ListInit and Field expressions.
4963
4964 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
4965
4966         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
4967         Since $PC is always -1 inside the body of MoveNext, the fault
4968         handler is a no-op.
4969         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
4970         * statement.cs (ExceptionStatement.emit_finally): Likewise.
4971         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
4972
4973         The denouement!  Fix #324708
4974         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
4975         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
4976         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
4977         'finally' inside the finally clause.
4978
4979         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
4980         inside an iterator.  Don't emit the body of the 'finally' inside
4981         the finally clause yet.
4982
4983         Use the ResumableStatement infrastructure for MoveNext ()
4984         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
4985         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
4986         'old_resume_points'.  Move dispatcher upfront.
4987         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
4988         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
4989         in an enumerator.  This encodes the main fix in this patch series
4990         -- we can only jump into the first instruction of a try from the
4991         outside, but we want to emit try/finally regions in iterators and
4992         resume in the middle of them.
4993
4994 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
4995
4996         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
4997         of NeedReturnLabel here.
4998
4999         Introduce a common point for emitting try/finally to IL
5000         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
5001         features of the various subclasses, which are now driven by ...
5002         (ExceptionStatement.EmitPreTryBody): ... this and ...
5003         (ExceptionStatement.EmitTryBody): ... this and the original
5004         EmitFinallyBody.
5005         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
5006         Remove DoEmit and update to follow above protocol.
5007
5008         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
5009         of the dispatcher are the same, skip emitting the 'switch'.
5010         * iterator.cs (Iterator.EmitDispose): Update to changes.
5011
5012         Clean up handling of 'using' statement
5013         * statement.cs (UsingTemporary): New.  Carved out of ...
5014         (Using): ... this.  Simplify drastically.  Handle exactly
5015         one variable.
5016         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
5017         or Using as appropriate.  If there are multiple variable declared,
5018         create nested Using statements.
5019         (resource_acquisition): Kill.
5020
5021         * statement.cs (ExceptionStatement.EmitForDispose): Use
5022         EmitFinallyBody, not EmitFinally.
5023
5024         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
5025         * iterator.cs: Update to changes.
5026
5027         Start using the ResumableStatement infrastructure
5028         * statement.cs (ResumeableStatement.PrepareForDispose): New.
5029         (ResumableStatement.EmitForDispose): New.
5030         (ExceptionStatement): Override them.
5031         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
5032         EmitForDispose to create the body of the Dispose method.  Don't
5033         use OldResumePoint.
5034
5035         * iterator.cs (Iterator.AddResumePoint): Move here from ...
5036         * statement.cs (Toplevel.AddResumePoint): ... here.
5037         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
5038         * flowanalysis.cs (FlowBranchingIterator): New.
5039         * codegen.cs (EmitContext): Update to changes.
5040
5041         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
5042         (Iterator.old_resume_points): Rename from 'resume_points'.
5043         (Iterator.MoveNextStatement): Remove unused class.
5044
5045         New infrastructure for try/finally in iterators (still unused)
5046         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5047         (FlowBranchingToplevel.AddResumePoint): Hook into
5048         ToplevelBlock.AddResumePoint.
5049         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5050         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5051         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5052         resume points and assign program-counter values.
5053         (ExceptionBlock.AddResumePoint): Collect resume points for
5054         de-muxer at the top of try block.
5055         * iterators.cs (Yield.CheckContext): Simplify.
5056         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5057
5058 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5059
5060         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5061         argument to an ExitStatement.
5062         (FlowBranchingException): Refactor saved origins code.
5063         * statement.cs (ExitStatement): Update to cahges.
5064         * iterator.cs (YieldBreak): Likewise.
5065
5066         * statement.cs (ResumableStatement): New.  Common base class for
5067         YieldReturn and ExceptionStatement.
5068         (ExitStatement): New.  Common base class for Return and YieldBreak.
5069         (Return): Update to changes.
5070         * iterator.cs (YieldBreak): Likewise.
5071         * lambda.cs (ContextualReturn): Likewise.
5072
5073         Fix #377028
5074         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5075         emit a meaningful error message.
5076
5077         Fix #324765, #319508
5078         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5079         (VariableInfo.SetAssigned): Set it.
5080         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5081         determine if CS0219 or CS0168 is appropriate.  Don't use
5082         flow-analysis information.
5083         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5084         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5085         (EmitContext.EndFlowBranching): ... this.
5086
5087 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5088
5089         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5090
5091 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5092
5093         A fix for bug #376508
5094         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5095         ImplicitConversionExists.
5096
5097 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5098
5099         * expression.cs (Binary): Added remaining binary operators to expression
5100         tree builder.
5101
5102         * nullable.cs: Optimize shift with null argument.
5103
5104 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5105
5106         Fix minor IL regression
5107         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5108         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5109         * cs-parser.jay (try_statement): Update to changes.
5110
5111         * statement.cs (TryFinally.need_exc_block): Delete.
5112         (TryFinally): Update to changes.
5113
5114         Now all ExceptionStatements are unconditional
5115         * statement.cs (CollectionForeach.DisposableWrapper): New.
5116         Extract out the try/finally code into a new wrapper.
5117         (CollectionForeach.Resolve): Use it to simplify the code.
5118
5119 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5120
5121         Start at simplifying ExceptionStatement semantics a bit
5122         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5123         * cs-parser.jay (try_statement): Update to changes.
5124         (opt_catch_clauses): Remove.
5125         * flowanalysis.cs: Update to changes.
5126         (FlowBranching.BranchingType.TryCatch): New.
5127         (FlowBranchingTryCatch): New.
5128
5129         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5130         (FlowBranching.CreateBranching): Update to changes.
5131         (FlowBranchingBlock.AddSibling): Add sanity check.
5132         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5133         Update to changes.
5134
5135         * iterators.cs (Iterator.MarkFinally): Remove.
5136         * statement.cs (ExceptionStatement): Update to changes.
5137
5138         Add support for skipping over finally blocks at runtime.  First
5139         in a series to fix #324708
5140         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5141         (Iterator.EmitMoveNext): Initialize it.
5142         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5143         branch over the body of the 'finally' clause.
5144
5145 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5146
5147         Avoid lopsided use of Foo/DoFoo names
5148         * statement.cs (ExpressionStatement.EmitFinallyBody):
5149         Rename from EmitFinally.
5150         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5151         * iterator.cs: Update to changes.
5152
5153 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5154
5155         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5156         based on UserOperatorCall. More binary nullable operators clean up.
5157
5158 2008-04-02  Martin Baulig  <martin@ximian.com>
5159
5160         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5161
5162 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5163
5164         * nullable.cs: Merge user and empty conversions when lifting expression
5165         trees.
5166         
5167         * expression.cs (StringConcat): Implemented expression tree representation.
5168
5169 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5170
5171         * nullable.cs: When lifting null literal and a user operator exists, no call 
5172         is made.
5173         
5174 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5175
5176         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5177         null.
5178
5179 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5180
5181         * nullable.cs, expression.cs: Use namespace instead heavily nested
5182         monster abstract class.
5183
5184 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5185
5186         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5187         lifting of null literal and user operators. Clean up of some temporary
5188         nullable hacks.
5189
5190 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5191
5192         Fix #368224, test-629.cs
5193         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5194         if it crossed an unwind-protect boundary.
5195         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5196         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5197         inside an unwind-protected region.
5198         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5199         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5200         'leave' instead of a 'br' if unwind-protected.
5201         (Iterator.EmitYieldBreak): Likewise.
5202
5203 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5204
5205         * driver.cs: Only define versioninfo resources if no win32 resource
5206         file was specified.
5207
5208 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5209
5210         A fix for bug #372375
5211         * convert.cs: Fixed boxing of nullable types.
5212
5213 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5214
5215         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5216         type.
5217
5218 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5219
5220         A fix for bug #374619
5221         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5222         
5223 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5224
5225         * lambda.cs: Check return type only for invocation.
5226         
5227 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5228
5229         A fix for bug #374214
5230         * ecore.cs: Correctly report argument type mismatch.
5231
5232 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5233
5234         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5235         and not rely on broken IsEnum.
5236
5237 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5238
5239         * nullable.cs: New file, extracted from generic.cs.
5240         
5241         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5242
5243 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5244
5245         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5246         predefined comparison operators and null literals.
5247         
5248         * report.cs: New warning ID.
5249         
5250 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5251
5252         A fix for bug #370577
5253         * lambda.cs: Check return type too.
5254
5255 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5256
5257         A fix for bug #372846
5258         * class.cs: Automatic properties can be declared as unsafe.
5259
5260 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5261
5262         * location.cs: Use string based concatenation.
5263         
5264         * expression.cs: LiftedBinaryOperator is gmcs only.
5265         
5266 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5267
5268         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5269         conversions rules and expression trees.
5270
5271 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5272
5273         * delegate.cs: Use extension method source as delegate target.
5274
5275 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5276
5277         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5278         binary operations to be purely based on binary operations and optimized
5279         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5280         and other ET refactoring.
5281         
5282         * typemanager.cs: Fixed warning.
5283         
5284 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5285
5286         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5287         
5288         * symbolwriter.cs: Fixed.
5289
5290 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5291
5292         * anonymous.cs, driver.cs: Reset anonymous types counters.
5293
5294 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5295
5296         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5297         
5298         * class.cs: Use fullname for all type member definitions.
5299         
5300 2008-02-19  Martin Baulig  <martin@ximian.com>
5301
5302         * class.cs
5303         (IMethodData.EmitExtraSymbolInfo): New interface method.
5304         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5305         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5306         interface method here as an empty public virtual method.
5307
5308         * anonymous.cs
5309         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5310         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5311         CodeGen.SymbolWriter.SetRealMethodName().       
5312
5313 2008-02-18  Martin Baulig  <martin@ximian.com>
5314
5315         * anonymous.cs
5316         (ScopeInfo.EmitType): Override this and emit debugging
5317         information for captured variables.
5318         (RootScopeInfo.EmitType): Override this and emit symbol
5319         information for a captured `this'.
5320
5321 2008-02-15  Martin Baulig  <martin@ximian.com>
5322
5323         * iterators.cs: Emit debugging info.
5324
5325         * codegen.cs
5326         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5327         (EmitContext.OmitDebuggingInfo): New public property.
5328
5329         * statement.cs
5330         (While): Override Emit() and don't emit symbol info there; do it
5331         inside DoEmit() instead.
5332         (Block.Emit): Omit symbol information while emitting the scope
5333         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5334         block logic.
5335         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5336         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5337         .ctor to make `IsIterator' work.
5338
5339 2008-03-14  Martin Baulig  <martin@ximian.com>
5340
5341         * symbolwriter.cs: Added the new symbol writer function from the
5342         debugger's `terrania' branch; temporarily enclose them inside
5343         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5344         my vacations.
5345
5346 2008-03-14  Martin Baulig  <martin@ximian.com>
5347
5348         * symbolwriter.cs
5349         (SymbolWriter): Make this a public static class.
5350
5351         * codegen.cs
5352         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5353         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5354
5355 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5356
5357         A fix for bug #370577
5358         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5359         return type.
5360         
5361 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5362
5363         * typemanager.cs (CSharpName): Made 250 times faster.
5364
5365 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5366
5367         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5368         
5369 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5370
5371         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5372         crash when predefined field does not exist.
5373         
5374 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5375
5376         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5377         
5378 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5379
5380         * class.cs (FixedField): Don't crash when contructors are missing.
5381
5382 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5383
5384         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5385         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5386         check internal types accessibility for internal and external types.
5387         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5388
5389 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5390
5391         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5392         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5393         attribute.cs, statement: Use corect instance of predefined types (work
5394         related to #364674).
5395
5396 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5397
5398         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5399         
5400 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5401
5402         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5403         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5404         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5405         predefined types clean up, delayed predefined types members initialization
5406         (work related to #364674).
5407
5408 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5409
5410         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5411         
5412 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5413
5414         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5415         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5416         predefined types clean up (work related to #364674).
5417
5418 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5419
5420         * ecore.cs: Print an error message instead of throwing exception.
5421         
5422 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5423
5424         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5425         expression.cs, statement.cs: Unififed null literal representation.
5426
5427 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5428
5429         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5430         expression.cs: Refactored binary operators resolve phase and improved speed.
5431         The nullable code is still missing and won't work correctly, more fixes
5432         required.
5433
5434         It also fixes #323726, #324312, #324248, and many other unreported issues.
5435
5436 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5437
5438         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5439         instead of 'gmcs'.
5440
5441 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5442
5443         * ecore.cs: Clean-up and split BetterConversion.
5444         
5445 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5446
5447         Fix #363791
5448         * enum.cs (EnumMember.Value): Only access 'value' if
5449         ResolveValue says it's ok.
5450         (EnumMember.DoResolveValue): Don't set prev_member.value.
5451         (Enum.GetDefinition): Reverse arguments of Equals --
5452         EnumMember.Value can return 'null'.
5453
5454         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5455
5456 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5457
5458         * generic.cs, expression.cs: More ongoing work on expression trees.
5459         
5460 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5461
5462         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5463         handle missing matches when mutiple operators exist.
5464         
5465 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5466
5467         A fix for bug #363218
5468         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5469         initializers.
5470         
5471 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5472
5473         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5474         update. This time to deal correctly with SideEffectConstant expression used
5475         as an argument for another constant folding.
5476
5477 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5478
5479         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5480         MethodBuilder.
5481
5482 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5483
5484         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5485
5486 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5487
5488         A fix for bug #328136
5489         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5490         side is a false constant, because we still need to evaluate the right-hand
5491         side.
5492
5493         * statement.cs (If): Emit two types of boolean constants (simple constant,
5494         side-effect constant).
5495
5496 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5497
5498         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5499
5500         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5501         constants.
5502
5503 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5504
5505         A fix for bug #361457
5506         * ecore.cs (IsApplicable): Params methods have lower priority.
5507
5508         * support.cs: Return correct parameter modifier for params types.
5509
5510 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5511
5512         * generic.cs (TypeParameter): Cache attribute target name.
5513
5514         * support.cs: Removed unused variable.
5515
5516         * typemanager.cs: Removed debugging leftover.
5517
5518         * ecore.cs: Use local type instead of a property;
5519
5520         * class.cs (VerifyMembers): Consider also parent to test whether type member
5521         is local or public.
5522
5523         * expression.cs (FullMethodDesc): Removed.
5524
5525         * attribute.cs (IsValidArgumentType): Made static.
5526
5527 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5528
5529         Cleanup to be more readable.
5530         * Makefile (GMCS_PROFILE): Remove.
5531         (COMPILER_NAME): New helper.
5532
5533 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5534
5535         * cs-tokenizer.cs: if a conditional expression happens inside a
5536         (...) this also means that we do not need to de-ambiguate between
5537         an parenthesized expression and a cast.
5538
5539         Fixes 346484.
5540
5541         * constant.cs (SideEffectConstant): a constant value that happens
5542         to have a side effect.
5543
5544         Fixes the build regressions introduced by the fix for #359789
5545
5546 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5547
5548         * expression.cs (Conditional.Emit): when emitting the ternary
5549         operator, use local variables to generate code verifiable code.
5550
5551         The verifier cannot infer that the type on stack before the
5552         stloc.0 is executed is of type ParentB. This happens because the
5553         stack merge algorithm uses only parent types when deciding which
5554         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5555         335.
5556
5557         This code compiled with mcs is not verifiable under MS. The MS
5558         verifier picks the first common interface of Foo and Bar, which is
5559         wrong, but doesn't use a full join type of the 2 interfaces.
5560
5561         CSC uses a clever hack to compile such code in a verifiable
5562         way. It stores the intermediate values in a local variable with
5563         the expected type.
5564
5565         Fixes: #358102
5566
5567 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5568
5569         * expression.cs: Do not fold BitwiseAnd operators when the left
5570         side is a false constant, because we still need to evaluate the
5571         right-hand side.
5572
5573         Fixes #359789
5574
5575         * support.cs: Instead of throwing an InternalErrorException when
5576         the position of the stream is outside the boundary of our buffer,
5577         reset the state of the reader, and restart the reading from the
5578         beginning of the file.
5579
5580 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5581
5582         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5583
5584 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5585
5586         A fix for bug #361686
5587         * decl.cs: A protected types used inside a private class which parents
5588         derives from the protected class are accessible.
5589
5590 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5591
5592         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5593         the parameterless constructor.
5594
5595 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5596
5597         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5598         lookup methods to use standard member cache when doing member lookup.
5599
5600 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5601
5602         * driver.cs: Don't report full path for referenced module as assembly error.
5603
5604 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5605
5606         * Makefile: Fixed `qh' target to work on all machines.
5607
5608         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5609         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5610         and HasElementType with TypeManager implementation.
5611
5612 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5613
5614         A fix for bugs #325134, #359749
5615         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5616         first binds point to non-method member expression.
5617
5618 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5619
5620         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5621
5622 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5623
5624         A fix for bugs #321394, #323028
5625         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5626         Reworked naive IsAccessibleAs implementation to handle nested types.
5627
5628 2008-02-05  Jb Evain  <jbevain@novell.com>
5629
5630         * class.cs: use generic type comparison for parameters
5631         as well.
5632
5633 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5634
5635         A fix for bug #325372
5636         * class.cs: Use generic type comparison when testing method signatures.
5637
5638 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5639
5640         A fix for bug #357047
5641         * ecore.cs: Applied C# 3.0 changes to better conversion.
5642
5643 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5644
5645         A fix for bug #358374
5646         * cs-parser.jay: Correctly set modifiers for all constructor types.
5647
5648 2008-02-04  Marek Safar  <marek.safar@gmail.com>
5649
5650         A fix for bug #355251
5651         * generic.cs: Added base class constraint based type inference.
5652
5653 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5654
5655         A fix for bug #357255
5656         * decl.cs: One more missing visibility check.
5657
5658 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5659
5660         * support.cs: Fixed broken return.
5661
5662 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5663
5664         * report.cs: Correctly reset warnings count after probing.
5665
5666 2008-01-25  Martin Baulig  <martin@ximian.com>
5667
5668         * namespace.cs
5669         (NamespaceEntry.SymbolFileID): Make this work again after
5670         MemberName.ToString() is gone.
5671
5672 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5673
5674         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
5675         expressions.
5676
5677 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5678
5679         * generic.cs: Use full implicit conversion for type inference fixing.
5680
5681 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5682
5683         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
5684         Fixed user operator conversions.
5685
5686 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5687
5688         * generic.cs: Do nullable type to null comparison optimization during
5689         resolve phase.
5690
5691 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5692
5693         A fix for bug #355163
5694         * generic.cs: Enabled l-value resolve on nullable expressions.
5695
5696 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5697
5698         A fix for bug #353986
5699         * class.cs: Ingore static ctors with parameters for any further checks.
5700
5701 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5702
5703         A fix for bug #354310
5704         * namespace.cs: Removed redundant check.
5705
5706 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5707
5708         A fix for bug #354928
5709         * expression.cs: ElementInitializers can be resolved only once.
5710
5711 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5712
5713         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
5714         Condition expressions.
5715
5716 2008-01-23  Marek Safar  <marek.safar@gmail.com>
5717
5718         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
5719
5720 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5721
5722         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
5723         not allowed.
5724
5725         * generic.cs: Implemented coalesce expression.
5726
5727 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5728
5729         A fix for bug #355145
5730         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
5731         expression tree type inference.
5732
5733 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
5734
5735         Fix #354663
5736         * expression.cs (Binary.IsUnsignedType): Fix typo.
5737
5738 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5739
5740         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
5741
5742 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5743
5744         A fix for bug #355161
5745         * ecore.cs, expression.cs: Wider range of extension method supported
5746         expressions.
5747
5748 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
5749
5750         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
5751         AssemblyBuilder to operate in compiler context. Fixes mcs part of
5752         bug #354970.
5753
5754 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5755
5756         A fix for bug #355148
5757         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
5758
5759 2008-01-22  Miguel de Icaza  <miguel@novell.com>
5760
5761         * expression.cs (CreateExpressionTree): Add support for or and
5762         logical or, and indent following the coding conventions.
5763
5764         * typemanager.cs (LinqExpression): renamed from
5765         ExpressionTreeManager, for a shorter name.
5766
5767         Use TypeManager.CoreLookupType to lookup types from our core
5768         assemblies and turn those into "Type" variables.
5769
5770         Consumers that previously used "Namespace" and "Type" from this
5771         class should instead use the TypeExpression which is a type that
5772         is fully resolved (without involving the regular C# resolution
5773         rules). 
5774
5775         This typically looks like this:
5776
5777         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
5778         new MemberAccess (texpr, name, type_arguments, loc)
5779
5780         This avoids the problem in: #355178
5781
5782 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5783
5784         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
5785         feature in parser only as we do in other cases.
5786         
5787 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5788
5789         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
5790         typemanager.cs: A refactoring of params arguments to reuse existing
5791         expressions (params -> array initializer) to emit params argument instead
5792         of specialized handling.
5793         It was required by expression tree implementation and it has other benefits
5794         as well, we now apply same optimization for params arguments as we do for
5795         array initializers.
5796         
5797 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5798
5799         A fix for bug #353526
5800         * generic.cs: A type inference of params arguments may not required any
5801         temporary array creation.
5802         
5803 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5804
5805         A fix for bug #353534
5806         * generic.cs, ecore.cs, expression.cs: A method group type inference is
5807         supported for delegates only.
5808         
5809 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5810
5811         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
5812         type for more than 1 candidates.
5813         
5814 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5815
5816         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
5817         expressions.
5818         
5819 2008-01-16  Marek Safar  <marek.safar@gmail.com>
5820
5821         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
5822         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
5823         operator) expressions. 
5824                 
5825 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5826
5827         * statement.cs: Avoid declaring an IL variable for this_variable since it is
5828         not accessed from the generated IL.
5829
5830 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5831
5832         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
5833         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
5834         statement.cs: The first expression tree implementation drop, mostly
5835         infrastructure work.
5836
5837 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5838
5839         * ecore.cs (IsNestedChild): Refactored.
5840
5841 2008-01-11  Marek Safar  <marek.safar@gmail.com>
5842
5843         * lambda.cs: Don't use a cast on unknown expression statement.
5844
5845 2008-01-10  Geoff Norton  <gnorton@novell.com>
5846
5847         * cs-tokenizer.cs: One more token to distinguish between method and lambda
5848         arguments
5849
5850 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5851
5852         * doc.cs: Report better /doc crash details.
5853         
5854 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5855
5856         A fix for bug #352536
5857         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
5858
5859 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5860
5861         A fix for bug #352287
5862         * ecore.cs, expression.cs: Do `this' access checking in all member access
5863         expressions.
5864         
5865 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5866
5867         * rootcontext.cs, driver.cs: Switch to linq mode by default.
5868         
5869         * report.cs: Reset message stacks.
5870         
5871 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5872
5873         * generic.cs (InferInPhases): Correctly calculate params position.
5874         
5875 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5876
5877         * cs-tokenizer.cs: No need to parse full string when parsing lambda
5878         arguments.
5879
5880 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5881
5882         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
5883         
5884         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
5885         
5886         * driver.cs: Updated --help option.
5887         
5888 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5889
5890         * generic.cs (InferParamsTypeArguments): Removed.
5891         (InferInPhases): Add params type inference.
5892         (LowerBoundInference): Fixed scoring mechanism.
5893         
5894         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
5895         
5896 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
5897
5898         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
5899         byte array for unsigned "baked" assemblies.
5900
5901 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
5902
5903         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
5904         array for assemblies that are not strongnamed.
5905
5906 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5907
5908         A fix for bug #351481
5909         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
5910         declaring type for nested generic types.
5911         
5912 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5913
5914         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
5915         instead of ToString.
5916         
5917 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5918
5919         A fix for bug #351047
5920         * expression.cs (Binary.ResolveOperator): Allow equality operators between
5921         null and structs only when equality and inequality operators are defined
5922         either as an user-operators or predefined operators.
5923         
5924 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5925
5926         A fix for bug #351047
5927         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
5928         
5929 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5930
5931         A fix for bug #351257
5932         * cs-tokenizer.cs: Advance line number for '\r' correctly.
5933         
5934 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5935
5936         A fix for bug #351157
5937         * class.cs (Using): Fixed yet another broken cloning.
5938         
5939         (Block): Put back more sensible default value for statements.
5940         
5941 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
5942
5943         * codegen.cs: Allow AssemblyVersion with only major version component.
5944         Fixes bug #351055.
5945
5946 2007-12-29  Marek Safar  <marek.safar@gmail.com>
5947
5948         A fix for bug #324654
5949         * class.cs: Use FullName property as member name.
5950
5951 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5952
5953         A fix for bug #342117
5954         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
5955         constructor constraint.
5956
5957 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5958
5959         A fix for bug #338273
5960         * class.cs (ProbertyBase): Access modifier checks are required for overrides
5961         only.
5962
5963 2007-12-28  Marek Safar  <marek.safar@gmail.com>
5964
5965         A fix for bug #350839
5966         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
5967
5968 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
5969
5970         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
5971         GHOP:
5972         
5973         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
5974
5975         * statement.cs: Changed some Hashtables to use HybridDictionaries
5976         instead. It was observed that some HashTables only contained a few
5977         items in the vast majority of cases. Since HybridDictionary is
5978         more efficient on small sets (<10 elements), "known_variables"
5979         from class ExplicitBlock as well as "labels" and "constants " from
5980         class Block were changed to HybridDictionaries. 
5981
5982         Atsai results: (56216kb->54987kb)
5983
5984         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
5985
5986
5987 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
5988
5989         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
5990         GHOP:
5991         
5992         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
5993         
5994         * expression.cs: foreach loop to for loop, saved on allocation of
5995         enumerator (59333kb->59141kb)
5996
5997         * statement.cs. Changed foreach loops to for loops, saved on
5998         allocation of enumerator (59141kb->59006kb)
5999
6000         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
6001         when constructed with no specified capacity. This was causing a
6002         few ArrayLists to allocate more memory than they would potentially
6003         need in the Block class and MemberCache class. Setting the
6004         ArrayLists to construct with a capacity of 1 saves some
6005         memory. (56216kb->55585kb)
6006
6007 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6008
6009         A fix for bug #347189 (2nd issue)
6010         * expression.cs (MemberAccess): Nested type can be found in base non-generic
6011         type.
6012
6013 2007-12-27  Miguel de Icaza  <miguel@novell.com>
6014         
6015         * report.cs: Do not use colors if stdout and stderr are not a
6016         terminal.
6017
6018 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6019
6020         A fix for bug #346998
6021         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
6022         overloads.
6023
6024 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6025
6026         A fix for bug #343465
6027         * class.cs: Explicit method name for nested types uses dots only.
6028
6029 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6030
6031         A fix for bug #343707
6032         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
6033
6034 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6035
6036         * ecore.cs: Report type inference errors only when arguments count matches
6037         parameter count.
6038         
6039         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
6040         
6041         * expression.cs, report.cs: New warning.
6042         
6043         * typemanager.cs: Catch anonymous method type too.
6044
6045 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6046
6047         A fix for bug #346379
6048         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6049
6050 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6051
6052         A fix for bug #347359
6053         * expression.cs (Invocation): Don't resolve already resolved expression.
6054
6055 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6056
6057         A fix for bug #347189
6058         * class.cs (FixedField): Use non-dependent code only in the define phase.
6059
6060 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6061
6062         A fix for bug #348076
6063         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6064
6065 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6066
6067         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6068         discovered extension methods.
6069
6070 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6071
6072         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6073         method.
6074
6075 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6076
6077         * report.cs (ErrorMessage): Add support for using colors on
6078         terminals that support it. 
6079
6080 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6081
6082         * ecore.cs: Use information about expanded params for error reporting.
6083
6084 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6085
6086         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6087         and logic for params overloads.
6088         
6089 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6090
6091         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6092         as this is also created from the parser.  Fixes #349034
6093
6094 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6095
6096         * statement.cs (Throw.CloneTo): it is valid to have empty
6097         expressions for throw. 
6098
6099 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6100
6101         * cs-parser.jay: Set delegate constraint parsing region correctly.
6102
6103 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6104
6105         A fix for bug #345467
6106         * typemanager.cs (IsEqual): Compare generic parameters position only.
6107         
6108 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6109
6110         * expression.cs (BaseAccess): Type arguments can be null.
6111
6112 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6113
6114         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6115         consistent even when an error has occured.
6116         (Switch.Resolve): Likewise.
6117
6118 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6119
6120         A fix for bug #334505
6121         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6122         overrides.
6123         
6124 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6125
6126         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6127         refactorings required to resolve extension methods correctly when mixing
6128         generics and non-generics members.
6129         
6130 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6131
6132         A fix for bug #342584
6133         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6134         conversion.
6135         
6136 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6137
6138         A fix for bug #342512
6139         * delegate.cs: Use delegate argument expression when is available. Don't
6140         emit virtual call when class is sealed.
6141         
6142 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6143
6144         A fix for bug #325423
6145         * assign.cs (FieldInitializer): Use resolved expression for emit.
6146         
6147         * class.cs: Print less confusing error message.
6148         
6149 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6150
6151         * cs-tokenizer.cs: Removed GMCS ifdefs.
6152         
6153         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6154         mcs.
6155         
6156         * cs-parser.jay: Disabled nullable check.
6157         
6158         * generic-mcs: Copied more generic stuff.
6159                 
6160 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6161
6162         * gcs-parser.jay: Merged to cs-parser.jay.
6163         
6164         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6165         * *.csproj, *.sources: Updated to use only jay parser file.
6166
6167 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6168
6169         * gcs-parser.jay: Added nullable and default expression feature checks.
6170         
6171 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6172
6173         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6174         it fixes many TODOs and hidden bugs.
6175         
6176         * expression: Removed duplicate error check.
6177
6178 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6179
6180         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6181         implicitly type local variable only when it is used in a declaration.
6182
6183 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6184
6185         * attribute.cs: Use CS0612 for empty strings.
6186
6187 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6188
6189         * lambda.cs, statement.cs: Contextual return may act as a statement.
6190
6191 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6192
6193         A fix for a regression cause by #324222
6194         * class.cs: Don't report unused even when it implements an interface.
6195         
6196 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6197
6198         A fix for bug #341205
6199         * ecore.cs, expression.cs: Method group expression cannot do static
6200         method access with an instance reference check before overloading takes
6201         a place.
6202         
6203 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6204
6205         A fix for bug #325359
6206         * class.cs: Use predictable name for automatically generated property.
6207         
6208 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6209
6210         A fix for bug #324996
6211         * expression.cs (Is): Handle case where D is nullable and T is not
6212         correctly.
6213         
6214         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6215         
6216 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6217
6218         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6219         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6220         Flush small error reporting changes.
6221         
6222 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6223
6224         A fix for bug #324996
6225         * expression.cs: Rewrote Is expression implementation to work with
6226         generics, nullable types, anonymous method. A const result expression 
6227         uses existing infrastructure instead of custom not fully-featured one.
6228         
6229 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6230
6231         A fix for bug #340202
6232         * class.cs: Consider generics for volatile field.
6233
6234 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6235
6236         A fix for bug #335594
6237         * expression.cs: Use conversion rules when handling string addition.
6238         
6239 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6240
6241         A fix for bug #336651
6242         * expression.cs: Fixed a crash when probing is on.
6243         
6244 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6245
6246         A fix for bug #324242
6247         * covert.cs: Added a conversion from any nullable-type with an 
6248         underlying enum-type to the type System.Enum.
6249         
6250 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6251
6252         A fix for bug #324222
6253         * class.cs: Report all non-used event fields.
6254         
6255 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6256
6257         A fix for bug #325161
6258         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6259         qualifier for generic types.
6260         
6261 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6262
6263         A fix for bug #322971
6264         * expression.cs, ecore.cs: Added intermediate result value check for
6265         indexers. 
6266         
6267 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6268
6269         A fix for bug #324754
6270         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6271         when it was requested.
6272
6273 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6274
6275         A fix for bug #325101
6276         * expression.cs: Do type not value comparison for `is' expression.
6277
6278 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6279
6280         A fix for bug #320236
6281         * convert.cs: Don't apply user conversion on underlying target type.
6282
6283 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6284
6285         * expression.cs: Don't use unresolved expression for error reporting.
6286  
6287 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6288
6289         A fix for bugs #337712, #324490
6290         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6291         overloading resolution too.
6292         
6293         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6294         the process consistent and more robust.
6295         
6296         * expression.cs, linq.cs, report.cs: Update.
6297
6298 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6299
6300         A fix for bug #332909
6301         * attribute.cs: Resolve attributes in correct context using error
6302         handling procedure.
6303         
6304         * rootcontext.cs: Define Obsolete attribute members as core members.
6305         
6306 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6307
6308         * statement.cs: Removed unused methods.
6309         
6310 2007-10-31  Wade Berrier  <wberrier@novell.com>
6311
6312         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6313         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6314         during 'make dist')
6315
6316 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6317
6318         A fix for bug #338102
6319         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6320         methods registered as non-generics.
6321         
6322 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6323
6324         A fix for bugs #337712, #324490
6325         * delegate.cs: Delegate covariance and contravariance is not allowed for
6326         value types.
6327         
6328 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6329
6330         A fix for bug #337719 
6331         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6332         `from' keyword.
6333         
6334 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6335  
6336         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6337
6338 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6339  
6340         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6341         query expressions.
6342
6343 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6344
6345         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6346
6347 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6348  
6349         A fix for bug #334652
6350         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6351         extension methods when we have not found the best candidate in normal
6352         container.
6353
6354 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6355
6356         * AssemblyInfo.cs: Keep up-to-date.
6357
6358 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6359
6360         * Makefile: Fixed generics compiler name.
6361         
6362 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6363
6364         * lambda.test: removed, lambda parsing is done differently.
6365         
6366         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6367
6368 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6369
6370         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6371
6372 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6373
6374         * Makefile, *.sources : All C# compilers are in mcs folder.
6375         
6376         * *.cs: Use existing 2_1 define for smcs.
6377
6378 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6379
6380         A fix for bug #335847
6381         * assign.cs, expression.cs: Couple of changes to avoid creating a
6382         temporary variable for each object initializer assignment statement. It
6383         simplifies struct initialization too, otherwise two temporary variables
6384         would be required.
6385         Implemented optimization of redundant default element initializers.
6386         
6387 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6388
6389         A fix for bug #336766
6390         * expression.cs (Class.CheckBase): Use generic name when method is
6391         generic.
6392         
6393 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6394
6395         A fix for bug #334737
6396         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6397         variable and not variable argument for prepared copies.
6398
6399 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6400
6401         A fix for bug #325110
6402         * class.cs, expression.cs, attribute.cs: Use open generic method when
6403         checking conditional attribute.
6404         
6405 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6406
6407         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6408         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6409         FeatureIsNotAvailable.
6410
6411 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6412
6413         ** C# 3.0 Partial methods
6414         
6415         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6416         methods support. Because of member cache issue with generics only
6417         non-generics partial methods are fully supported.
6418         
6419 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6420         
6421         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6422         generics and to use member cache for member checking. It also improves
6423         performance and fixes remaining overloads issues.
6424         
6425 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6426         
6427         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6428         roottypes.cs, typemanager.cs:
6429                 
6430         A member cache creation logic changed to add members immediately and
6431         not rely on fallback. The member cache is now only prefered way
6432         how to access and find type declaration members. It saves 5 MB of memory
6433         during MWF compilation and makes code ready for more optimizations and
6434         clean-ups, it's also a pre-requirement for partial methods.
6435         
6436 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6437
6438         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6439         handling for generic parameters.
6440
6441 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6442         
6443         * class.cs (FixedField): Removed redundant volatile check.
6444         
6445 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6446         
6447         * class.cs, decl.cs: Fixed overload members verification to do only one
6448         check per possible collision.
6449         
6450 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6451         
6452         A fix for bug #325478
6453         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6454         and create only one disposable flags container.
6455         
6456 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6457         
6458         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6459         * statement.cs (Fixed): Fixed variables cloning.
6460         
6461 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6462         
6463         A fix for bug #333342
6464         * class.cs (EventField): Don't mark value type event as synchronized. 
6465         
6466 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6467         
6468         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6469         inference to identify best candidate method correctly.
6470         (ProperyExpr): A range variable is read only and cannot be modified.
6471         
6472 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6473         
6474         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6475         logic to identify best candidate method correctly.
6476         
6477 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6478         
6479         * location.cs (Equals, GetHashCode): Removed.
6480         
6481 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6482         
6483         * report.cs: Implemented message recorder. It is used mainly for lambda
6484         expressions to capture otherwise swallowed error messages.
6485         
6486         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6487
6488         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6489         and not at the top.
6490         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6491                 
6492         * expression.cs (MemberAccess): Always report lookup failure.
6493         
6494         * location.cs: Implemented Equals, GetHashCode.
6495         
6496         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6497         
6498 2007-10-10  Jb Evain  <jbevain@novell.com>
6499
6500         * codegen.cs: re-enable assembly version check.
6501
6502 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6503         
6504         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6505         checks.
6506         
6507         * namespace.cs (UsingAlias): Do correct version check.
6508         
6509 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6510         
6511         * expresison.cs, ecore.cs: Issue extension method error message when
6512         appropriate.
6513         
6514         * rootcontext.cs: Added ISO_2 compiler mode option.
6515
6516 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6517         
6518         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6519          message.
6520         
6521 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6522         
6523         * attribute.cs (GetString, GetBoolean): Work with both literal and
6524         constant.
6525         
6526         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6527         Moved method overload specific methods to MethodGroupExpr.
6528         
6529         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6530         it should be less memory consuming.
6531         
6532 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6533
6534         * codegen.cs: remove the assembly version check until the buildbot is
6535         fixed.
6536
6537 2007-10-07  Jb Evain  <jbevain@novell.com>
6538
6539         * attribute.cs (Attribute.GetString): if the value
6540         expression is a StringConstant, return its string value.
6541
6542 2007-10-07  Jb Evain  <jbevain@novell.com>
6543
6544         * typemanager.cs: add `assembly_version_attribute_type`.
6545         * codegen.cs: on attribute emission, check that the
6546         AssemblyVersionAttribute doesn't overflow.
6547
6548 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6549         
6550         A fix for bug #324677
6551         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6552         parent container of a scope container with currently resolved one. 
6553         
6554 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6555         
6556         A fix for bug #325534
6557         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6558         only.
6559         
6560 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6561         
6562         A fix for bug #327504
6563         * class.cs (Operator.Define): Refactored implicit and explicit user
6564         operator conversion rules.
6565         
6566 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6567         
6568         A fix for bug #327520
6569         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6570         
6571 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6572         
6573         A fix for bug #328022
6574         * class.cs (MethodData.Define): Use correct method to check whether
6575         a method implementents an accessor.
6576         
6577 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6578         
6579         A fix for bug #330069
6580         * statement.cs (Fixed.Resolve): Read the first array element only when
6581         an array is instantiated. 
6582         
6583 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6584         
6585         * expression.cs, assign.cs, generics.cs: Print correct operator when
6586         compound assignment is used.
6587         
6588 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6589         
6590         A fix for bug #325841
6591         * expression.cs (ArrayAccess): Use full argument cloning only for
6592         string compound concatenation.
6593         
6594 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6595         
6596         A fix for bug #328774
6597         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6598         assignment.
6599         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6600         assignment.
6601
6602 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6603
6604         Fix #328490
6605         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6606         Event accessibility checks here.  Remove some bogus code that
6607         accidently made GenericMethods work.
6608         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6609
6610 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6611         
6612         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6613         
6614         * statement.cs (Block): Refactored AddVariable to allow error handling
6615         customization.
6616         
6617         * generic.cs: New stub.
6618         
6619 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6620         
6621         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6622         flag.
6623         
6624 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6625
6626         * class.cs: Use partial container to record whether any partial part
6627         contains static field initializer and therefore default contructor has
6628         to be defined.
6629         
6630 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6631
6632         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6633         mono-list when only one of two partial parts has defined accessibility
6634         modifier.
6635         
6636 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6637
6638         A fix for bug #82845
6639         
6640         * class.cs (TypeContainer): Set correct resolve context for all field
6641         initializers.
6642         
6643 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6644
6645         * assign.cs: Fixed a crash when field is resolved twice with an error.
6646         
6647         * codegen.cs: Changed InFieldInitializer to be flag.
6648         
6649         * anonymous.cs, ecore.cs, expression.cs: Update after
6650         IsInFieldInitializer rename.
6651         
6652         * const.cs: Removed unused parameter.
6653         
6654         * class.cs: Changed the way how we resolve and emit field initializers.
6655         The field initilizers have to have access to contructor block to emit
6656         compiler generated code.
6657
6658 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6659
6660         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
6661         generics use TypeContainer instead.
6662         
6663 2007-09-12  Marek Safar  <marek.safar@gmail.com>
6664         
6665         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
6666
6667         * lambda.cs (ResolveParameters): Use more powerful
6668         InflateGenericArgument.
6669         
6670         * parameters.cs: Better exception message.
6671                 
6672 2007-09-10  Marek Safar  <marek.safar@gmail.com>
6673
6674         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
6675         correct expression block type. 
6676         
6677         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
6678         
6679         * expression.cs (Invocation): Extracted method group resolve to
6680         DoResolveOverload.
6681         
6682 2007-09-07  Marek Safar  <marek.safar@gmail.com>
6683
6684         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
6685         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
6686         
6687         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
6688         generic extension methods.
6689
6690 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6691
6692         A fix for bug #82676 (Do I get it right now?)
6693         * convert.cs (Binary.ResolveOperator): An interface is converted to the
6694         object before a standard conversion is applied.
6695         
6696 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6697
6698         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
6699         #82676.
6700         
6701 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6702
6703         A fix for bug #82676
6704         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
6705         non-generic interface types.
6706         
6707 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6708
6709         A fix for bug #82690
6710         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
6711         
6712 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6713
6714         A fix for bug #82571
6715         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
6716         modifier for container based methods.
6717         
6718 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6719
6720         A fix for bug #82676
6721         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
6722         any interface-type T means to any of interface type T.
6723
6724 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6725
6726         * namespace.cs: We have 2 versions of System.Core assembly.
6727
6728 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6729
6730         A fix for bug #82652
6731         * class.cs (Class.GetClassBases): Compare types and not expressions.
6732
6733 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6734
6735         A fix for bug #82620
6736         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
6737         actually never worked before.
6738         (IndexerAccess): Emit prepared arguments before they are modified.
6739         
6740 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6741
6742         A fix for bug #82563
6743         * assign.cs: Revert wrong fix.
6744         
6745         * expression.cs (VariableReference.EmitAssign): Handle ref reference
6746         correctly.
6747         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
6748         Instead of ldelema/stdind we have to use temporary variables to handle
6749         cases like String.Concat (params string[]).
6750         
6751 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6752
6753         * class.cs: EmitAttributes to Emit rename.
6754         
6755         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
6756         null.
6757         (MemberCore.HasClsCompliantAttribute): Don't depend on 
6758         GetClsCompliantAttributeValue execution.
6759         
6760 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6761
6762         * anonymous.cs: Use shorter type prefix.
6763         
6764         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
6765         when exist.
6766         
6767         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
6768         variables when probing is on.
6769         
6770         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
6771         unresolved variables.
6772         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
6773         handle transparent identifiers.
6774         
6775 2007-08-26  Marek Safar  <marek.safar@gmail.com>
6776
6777         * attribute.cs (IsClsCompliant): Add nullable types test.
6778         
6779 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
6780
6781         * doc.cs : catch other types of exception than XmlException to
6782           report CS1570. Fixed bug #82565.
6783
6784 2007-08-23  Marek Safar  <marek.safar@gmail.com>
6785
6786         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
6787         The number of delegate parameters has to match.
6788         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
6789         arrays.
6790
6791 2007-08-21  Marek Safar  <marek.safar@gmail.com>
6792
6793         * anonymous.cs (AnonymousMethod): Generate private anonymous method
6794         to fix problem with private arguments.
6795
6796 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6797
6798         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
6799         
6800         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
6801         
6802         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
6803         empty. Add cloning suport.
6804         
6805         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
6806
6807 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6808
6809         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
6810         to create EmptyCast. It handles EmptyConstantCast specialization for
6811         constants.
6812         
6813 2007-08-18  Marek Safar  <marek.safar@gmail.com>
6814
6815         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
6816         (EmitArrayArgument): One routine for array arguments.
6817         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
6818         
6819 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6820
6821         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
6822
6823 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6824
6825         * anonymous.cs: MemberLookupFinal update.
6826
6827         * class.cs (ConstructorInitializer): Is expression based.
6828         
6829         * delegate.cs: MethodGroupExpr update.
6830         
6831         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
6832         messages.
6833         (Error_MemberLookupFailed): Customizable error override.
6834         (MethodGroupExpr): Keep queried type for later usage.
6835         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
6836         resolve.
6837         
6838         * expression.cs: Error_MemberLookupFailed refactoring.
6839         (New.DoResolve): Resolve as much as possible.
6840         (ElementInitializer.Error_MemberLookupFailed): Object initializer
6841         customization for invalid member types.
6842
6843         * statement.cs: MethodGroupExpr update.
6844         
6845 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6846
6847         * modifier.cs (Check): Check all modifiers and not only accessibility
6848         ones.
6849
6850 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6851
6852         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
6853         type and not an expression.
6854
6855 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6856
6857         * statement.cs (Catch.Clone): Type and variable can be null.
6858
6859 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6860
6861         A fix for bug #81979
6862         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
6863         I am really not sure whether this is the best fix.
6864         
6865         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
6866         only once.
6867         
6868 2007-08-14  Marek Safar  <marek.safar@gmail.com>
6869
6870         ** C# 3.0 Object and collection initializers (major re-write)
6871         
6872         * assign.cs (DoResolve): Initializers are not assign related.
6873         
6874         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
6875         used during collection or object initialization.
6876         
6877         * expression.cs (Error_InvalidArguments): Add initializers specific
6878         messages. More will come later because it requires some general
6879         refactoring.
6880         (New.DoResolve): Better error handling for unsafe types.
6881         (EmptyExpressionStatement): New class.
6882         (ElementInitializer): An object initializer expression.
6883         (CollectionElementInitializer): A collection initializer expression.
6884         (CollectionOrObjectInitializers): A block of object or collection
6885         initializers.
6886         (NewInitialize): New expression with element/object initializers.
6887         
6888         * statement.cs: Reverted object/collection initializer hacks.
6889         
6890         * typemanager.cs (CSharpName): Filter __arglist type.
6891         
6892 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6893
6894         ** C# 3.0 Anonymous Types (update to the latest standard)
6895         
6896         * expression.cs (Binary.ResolveOperator): Threat all null based types
6897         same.
6898         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
6899         (AnonymousTypeParameter): Updated.
6900         
6901         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
6902         (AnonymousTypeClass): New anonymous type container.
6903         
6904         * class.cs (AddField): Return operation result.
6905         
6906         * generic.cs: Another empty TypeArguments overload.
6907         
6908         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
6909         are stored at top of normal hierarchy.
6910         
6911         * typemanager.cs (CSharpName): Filter anonymous types.
6912         
6913 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6914
6915         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
6916         as single Concat call. How could we miss that :-(
6917         
6918 2007-08-08  Marek Safar  <marek.safar@gmail.com>
6919
6920         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
6921         
6922 2007-08-07  Miguel de Icaza  <miguel@novell.com>
6923
6924         * expression.cs: Fix the previous commit, the creation of the
6925         arguments array list needs also to be conditional on the arguments
6926         not being null.
6927
6928         * class.cs: Add a little bit of help to help narrow down problems.
6929
6930         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
6931         not try to copy in that case. 
6932
6933         * driver.cs: When building SMCS, include a new different set of
6934         default assemblies here.   Do this here so we can control whether
6935         to include the default assemblies with /noconfig.
6936
6937 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6938
6939         A fix for bug #81979
6940         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
6941         only.
6942
6943 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6944
6945         A fix for bug #82300
6946
6947         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
6948         we are in probing scope.
6949
6950 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6951
6952         A fix for bug #82301
6953
6954         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
6955         (Statement.CloneTo): Clone and not map children blocks.
6956
6957 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6958
6959         A fix for bug #82299
6960
6961         * expression.cs (LocalVariableReference.CloneTo): Remap local info
6962         variable too.
6963         
6964         * statement.cs (Statement.CloneTo): Clone variables before statements
6965         to allow remaping of local variables.
6966
6967 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6968
6969         A fix for bug #82296
6970
6971         * anonymous.cs,
6972         * report.cs: Log crash details for future clone problems.
6973         
6974         * statement.cs (Return.Clone): Don't clone non-existent expression.
6975
6976 2007-08-03  Raja R Harinath  <harinath@gmail.com>
6977
6978         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
6979         (Class.AddBasesForPart): Move CS0537 check here from ...
6980         * cs-parser.jay (class_declaration): ... here.  Move calling of
6981         'AddBasesForPart' to ...
6982         (class_bases): ... here.
6983         (struct_declaration, interface_declaration): Update to changes.
6984
6985 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6986
6987         A fix for bug #81923
6988
6989         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
6990         conversion is allowed.
6991
6992 2007-08-02  Marek Safar  <marek.safar@gmail.com>
6993
6994         A fix for bug #81564
6995
6996         * ecore.cs (EventExpr): Add IsBase handling.
6997
6998         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
6999         too.    
7000         
7001 2007-08-02  Raja R Harinath  <harinath@gmail.com>
7002
7003         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
7004         * cs-parser.jay: Some whitespace cleanups.
7005         (current_delegate): New.
7006         (type_name): New.
7007         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
7008         a dummy code block, and use 'type_name' instead of 'member_name'.
7009         (interface_declaration, class_declaration): Likewise.
7010         (delegate_declaration): Likewise.  Rearrange slightly and use
7011         'current_delegate'.
7012         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
7013         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
7014
7015 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7016
7017         A fix for bug #82039
7018
7019         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
7020         available.
7021
7022         * typemanager.cs (CSharpName): Split to string overload.
7023
7024 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7025
7026         * expression.cs,
7027         * report.cs: Updated warning CS0472.
7028
7029 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7030
7031         A fix for bug #82181
7032         * cs-parser.jay,
7033         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
7034
7035 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7036
7037         A fix for bug #82277
7038         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
7039
7040 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7041
7042         ** C# 3.0 Type Inference (major bits are working)
7043         
7044         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
7045         (.ImplicitStandardConversionExists): Uses compatible.
7046         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7047         (.InferReturnType): New method.
7048         (.Compatible): Refactored.
7049         (.ResolveParameters): Uses factory to create resolved parameters.
7050         (.CompatibleMethod): Add probing mode support.
7051         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7052         clearly distinguish between 2 different operations.
7053         (LambdaMethod): Moved to lambda.cs.
7054         (AnonymousMethod): Removed unused fields and methods.
7055         (AnonymousDelegate): Simplified.
7056         
7057         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7058         
7059         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7060         
7061         * delegate.cs (Delegate): New mehods to reduce code duplication.
7062         (.GetConstructor): New method.
7063         (.GetInvokeMethod): New method.
7064         (DelegateCreation): Updated.
7065         
7066         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7067         does not exist.
7068         (OverloadResolve): Made probing little bit faster.
7069         
7070         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7071         when probing is on.
7072         
7073         * generic.cs (TypeInferenceContext): Dummy implementation.
7074         
7075         * iterators.cs: Updated after Resolve/Define rename.
7076         
7077         * lambda.cs (LambdaExpression)
7078         (.ResolveParameters): Handles both type of arguments and type inference too.
7079         
7080         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7081         (InflateTypes): Updated.
7082         
7083         * support.cs (InflateTypes): Changed signature and updated.
7084         
7085         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7086         (MemberLookup_FindMembers): More MS tricks.
7087         (GetParameterData): Ditto.
7088         (GetDelegateParameters): Uses quick path for dynamic types.
7089         
7090 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7091
7092         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7093         only.
7094
7095 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7096
7097         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7098         syntax.
7099         
7100 2007-07-26  Jb Evain  <jbevain@novell.com>
7101
7102         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7103         which takes a boolean 'report_errors', similar to the GetMethod.
7104         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7105         in .net 2.1, do not report errors here.
7106
7107         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7108         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7109         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7110         in .net 2.1.
7111
7112         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7113         of the type InternalsVisibleToAttribute before the first call
7114         to CoreLookupType which is allowed to fail (third boolean parameter
7115         to true). Because, during the resolution for a type that is not
7116         immediately found, we try to check if the type is not defined in
7117         a friend assembly, and to do so, we need the
7118         InternalVisibleToAttribute.
7119
7120 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7121
7122         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7123         feature that allows structs to be compared against null and inline
7124         the result as true or false.
7125
7126         Notice that the same code is not permitted inside a generic block
7127         of code that would do:
7128
7129         class Foo<T> where T : struct {
7130             bool Eval (T x)
7131             {
7132                  return x == null;
7133             }
7134         }
7135
7136         It is only allowed if the type of T is not bound (no where
7137         clause).   In my opinion, this CSC 2 behavior is broken but people
7138         seem to be using it (IronRuby does, a few bug reports on bugzilla
7139         have it and some people have complained about it).
7140
7141         All of the users that depend on this behavior have code that is
7142         very likely broken. 
7143         
7144         * report.cs (Warning, Error): make these take object arguments,
7145         not strings, as that allows us to take advantage of Format.
7146
7147 2007-07-20  William Holmes  <billholmes54@gmail.com>
7148
7149         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7150           Left member variable for the Count.
7151         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7152           MemberName.CountTypeArguments to avoid a NRE. 
7153
7154         This code is contributed under the MIT X11 license
7155
7156 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7157
7158         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7159
7160 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7161
7162         * doc.cs : generic method arguments are written as ``x while generic
7163           type arguments are `x. Combined with the previous change, fixed bug
7164           #79706.
7165
7166 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7167
7168         Fix #82120
7169         * expression.cs (Binary.ResolveOperator): When converting
7170         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7171
7172 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7173
7174         * doc.cs : when T: or whatever x: is specified, it does not really
7175           check the doc comment's syntax correctness. Fixed bug #82006.
7176
7177 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7178
7179         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7180         LambdaExpression better.
7181         
7182         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7183         
7184         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7185         
7186         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7187         as it can be generated.
7188         
7189         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7190         modifiers.
7191         
7192         * lambda.cs (LambdaExpression): Refactored to share same code with
7193         AnonymousMethodExpression.
7194         
7195 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7196
7197         * anonymous.cs (MakeName): Include host name for easier debugging.
7198         (LambdaMethod): New class for lambda spcecific stuff.
7199         
7200         * attribute.cs: Set EmitContext return type.
7201
7202         * class.cs: Set EmitContext return type.
7203         
7204         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7205         with null/void meaning.
7206         
7207         * iterators.cs (ContainerType): Implemented.
7208         
7209         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7210         
7211         * statement.cs (Return): Updated to lambda expressions.
7212         (Block.CloneTo): Parent can be null.
7213                 
7214 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7215
7216         A fix for bug #81917
7217         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7218         
7219         * class.cs (FixedField): Check whether field is in unsafe scope.
7220
7221         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7222         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7223
7224         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7225         FieldExpr.
7226         
7227         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7228                 
7229 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7230
7231         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7232         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7233         from Report class.
7234
7235 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7236
7237         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7238         
7239 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7240
7241         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7242         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7243         
7244         * codegen.cs(EmitContext): Add ProbingMode flag.
7245         
7246         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7247         
7248         * driver.cs: For now set both warning values.
7249         
7250         * ecore.cs (SimpleName): Name is readonly.
7251         (MethodGroup.OverloadResolve): One quick path for probing.
7252         
7253         * expression.cs (Unary): Set Oper r/o.
7254         (Binary): Set Oper r/o.
7255         (ParameterReference): Set few instance variables as r/o.
7256         (ParameterReference.DoResolveBase): Don't capture aruments when 
7257         the probing is on.
7258         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7259         (Arglist): arguments are private.
7260         (SizeOf): type is private and r/o.
7261         (MemberAccess): arguments are private.
7262
7263         * report.cs: Enhanced reporting on/off capabilities.
7264         
7265         * lambda.cs: Uses ec.IsInProbingMode.
7266         (ContextualReturn): Derives from return.
7267         
7268         * rootcontext.cs: For now set both warning values.
7269         
7270         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7271         copy if one exists.
7272         (Return.Resolve): Don't die immediately.
7273         (Block.Resolve): Speed-up probing.
7274         (Block.CloneTo): Clone only child blocks.
7275
7276 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7277
7278         * iterators.cs: reverted Miguel's latest change (r81925) as it
7279         breaks the build in System.
7280
7281 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7282
7283         * iterators.cs (Yield.CheckContext): Check for the iterator type
7284         also here as we can call into Yield even in codepaths that are not
7285         directly checked by
7286         (MethodOrOperator is the only path that was checked).
7287
7288         In addition to the standard check, use a more specific check for
7289         constructors to report a more verbose error. 
7290
7291 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7292
7293         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7294         report the warning and continue 
7295
7296         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7297         values on the stack on the call to Emit.   Use EmitStatement if
7298         possible, or using Emit + Pop if not possible.   Fixes #82064
7299
7300 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7301
7302         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7303         avoid try...finally in some cases.
7304
7305 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7306
7307         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7308         
7309         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7310         instead of method. Re-use standard error handling.
7311         (ConstructorInitializer.Emit): Simplified.
7312         
7313         * delegate.cs: Updated after Invocation.EmitCall change.
7314         
7315         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7316         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7317         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7318         method and don't permanently changing input arguments.
7319         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7320         is resolved it has one of the candidates is the best one which is later
7321         used to emit. Removed a few unused method.
7322         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7323
7324         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7325         (Binary.ResolveOperator): Ditto.
7326         (ConditionalLogicalOperator.DoResolve): Ditto.
7327         (Invocation): Uses method group.
7328         (Invocation.DoResolve): Simplified.
7329         (Invocation.EmitCall): Removed useless is_static.
7330         (Invocation.Emit): Delegate to method group.
7331         (Invocation.EmitStatement): Simplified.
7332         (New): Uses method group.
7333         (MemberAccess.DoResolve): Don't destroy original expression.
7334         
7335         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7336         
7337 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7338
7339         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7340         
7341         * anonymous.cs,
7342         * lambda.cs: Add custom error message type.
7343
7344 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7345
7346         * lambda.cs: Simplified little bit.
7347         
7348         * parameter.cs: Introduced ImplicitLambdaParameter.
7349         (Parameters.CreateFullyResolved): New factory instead of ctor.
7350         
7351         * anonymous.cs,
7352         * class.cs,
7353         * delegate.cs: Updated parameter creation.
7354         
7355 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7356
7357         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7358         arguments.
7359         
7360         * generic.cs: Synchronized with gmcs.
7361         
7362 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7363
7364         * class.cs (Indexer): Check return type as soon as possible.
7365         
7366         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7367         members too.
7368         
7369         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7370         
7371         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7372         
7373         * parameter.cs (Parameter): Use expression type when it is available.
7374         
7375         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7376         method modifier for the first parameter only.
7377
7378 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7379
7380         A fix for bug #81938
7381         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7382         
7383         * constant.cs: Tide up an exception message.
7384
7385 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7386
7387         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7388         an uninitialized variable is used.
7389         
7390         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7391
7392 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7393
7394         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7395         not found error handling.
7396
7397         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7398         simplified.
7399         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7400         (ArrayCreation.DoResolve): Simplified.
7401         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7402         its own resolve process.
7403         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7404
7405 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7406
7407         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7408         more error details.
7409         
7410 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7411
7412         * cs-tokenizer.cs: Removed var related stuff.
7413         
7414         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7415         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7416         a type and a keyword at same time.
7417         
7418         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7419         matches to "var".
7420         
7421         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7422         implicitly typed arrays, more changes will follow.
7423         
7424         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7425         
7426 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7427
7428         * ecore.cs (VarExpr): Removed Handled field.
7429         
7430         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7431         build-in assign functionality.
7432         (ForEach.Resolve): Removed all implicitly typed local variable code and
7433         simplified.
7434         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7435         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7436
7437 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7438
7439         * assign.cs: Removed implicitly typed local variable check.
7440         
7441         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7442         referencing implicitly typed local variable.
7443         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7444         variable here.
7445         
7446         * statement.cs (Fixed): Removed unsupported implicitly typed local
7447         variable code.
7448
7449 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7450
7451         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7452
7453 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7454
7455         A fix for bugs #81855 and #76274
7456         * attribute.cs (AttachTo): Always set owner for global attributes to
7457         prefined owner.
7458         
7459         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7460         usefull too.
7461         
7462         * cs-parser.jay: Assembly and module attributes must precede all other
7463         elements except using clauses and extern alias declarations.
7464
7465 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7466
7467         A fix for bug #81748
7468         * cs-tokenizer.cs,
7469         * expression.cs: More checks for non ISO-1 features.
7470
7471 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7472
7473         A fix for bug #81807
7474         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7475         present inside switch statement and it is required by nullable check.
7476
7477 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7478
7479         A fix for bug #81840
7480         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7481         when type matching fails.
7482         
7483         * namespace.cs: Tiny error message change.
7484
7485 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7486
7487         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7488         reporting. Added automatic property check.
7489         
7490         * class.cs: Updated after CheckAbstractAndExtern relocation.
7491         (AEventPropertyAccessor.GetSignatureForError): Customized.
7492         
7493 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7494
7495         * class.cs (DefineBaseTypes): Base type can be undefined.
7496         
7497         * ecore.cs (TypeLookup): Minor refactoring.
7498         (DoResolveAsTypeStep): Removed redundant check.
7499
7500         * namespace.cs (Lookup): Removed redundant check.
7501                 
7502         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7503         ResolveAsTypeTerminal step.
7504         (BootstrapCorlib_*): Simplified.
7505         (PopulateCoreType): Core types can be now external.
7506
7507 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7508
7509         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7510          verification only.
7511          (InferTypeArguments): Infers anonymous expression type arguments.
7512          (Compatible): Split to Compatible and InferTypeArguments. 
7513         
7514         * lambda.cs: Updated.
7515
7516 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7517
7518         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7519
7520 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7521
7522         Fix #80477, cs0135-2.cs, cs0135-3.cs
7523         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7524         names to the "known" variables list.
7525         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7526         parameter names are also "known".
7527         (Block.CheckError136): Remove.
7528         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7529         null.
7530
7531 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7532
7533         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7534
7535 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7536
7537         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7538         internal error not an user error.
7539          
7540         * expression.cs (IsApplicable): Refactored to make debugging easier.
7541
7542         * support.cs: More tricks for non-mono runtimes.
7543         
7544         * typemanager.cs (CoreLookupType): Made public.
7545         (InitSystemCore): All linq specific stuff moved to linq.cs
7546
7547 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7548
7549         * typemanager.cs (CSharpSignature): One more missing build-in types
7550         replacement.
7551         More tricks for non-mono runtime.
7552
7553 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7554
7555         * statement.cs (Block.CheckError136_InParents): Remove.
7556         (Block.AddVariable): Use GetParameterInfo instead.
7557         (ToplevelBlock.ProcessArguments): Likewise.
7558
7559 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7560
7561         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7562         information too.
7563         (ToplevelBlock.GetParameterInfo): Split out of ...
7564         (ToplevelBlock.GetParameterRefernce): ... this.
7565         (ToplevelBlock.ParameterMap): Remove.
7566         * expression.cs (ParameterReference): Update to use
7567         ToplevelParameterInfo.
7568
7569         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7570         regression.
7571
7572         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7573         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7574
7575         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7576         (ToplevelBlock.ProcessParameters) ... here.
7577         (ToplevelBlock..ctor): Invoke it.
7578
7579         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7580         new parameters.
7581
7582         * statement.cs (IKnownVariable): New interface.
7583         (LocalInfo): Implement it.
7584         (ToplevelParameterInfo): New class.
7585         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7586         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7587         GetKnownVariableInfo.
7588
7589 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7590
7591         Partly speed up CS0136 error checks.
7592         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7593         'recurse' parameter.
7594         (Block.DoCheckError136): Only check errors in parameters.  Move
7595         local variable checks ...
7596         (Block.AddVariable): ... here, and ...
7597         (ToplevelBlock.ResolveMeta): ... here.
7598
7599 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7600
7601         * statement.cs (Block.IsChildOf): Remove.
7602
7603         * statement.cs (Statement.Clone): Move special case code ...
7604         (Block.CloneTo): ... here.
7605
7606 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7607
7608         * statement.cs (ToplevelBlock.container): Remove field.  It's
7609         redundant with 'Parent'.
7610         (ToplevelBlock.ContainerBlock): Remove accessor.
7611         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7612         child with parent here, ...
7613         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7614         current_block.
7615         (start_anonymous): Don't save current_block.
7616         (top_current_block): Remove.
7617
7618         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7619         (Block.Resolve): Update to changes.
7620         (Block..ctor): Move setting of "correct" 'Toplevel'
7621         and 'Explicit' fields to ...
7622         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7623
7624 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7625
7626         Kill Block.Implicit
7627         * statement.cs (Block.Implicit): Remove.
7628         (Block): Update to changes.
7629         * flowanalysis.cs: Likewise.
7630
7631         Mildly speed up CheckInvariantMeaningInBlock
7632         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7633         Recursively call AddKnownVariable to all enclosing blocks.
7634         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7635         Remove recursive calls.
7636         (Block): Update to changes.
7637
7638         New ExplicitBlock invariants
7639         * statement.cs (Block.Explicit): New field.  It points to the
7640         immediately enclosing non-implicit block.
7641         (Block..ctor): Maintain the invariant.
7642         * cs-parser.jay: Take advantage of invariant.
7643
7644         Introduce ExplicitBlock
7645         * statement.cs (ExplicitBlock): New.
7646         (ToplevelBlock): Derive from it.
7647         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
7648         sense of flag.
7649         (Block.Implicit): Update to changes.
7650         * cs-parser.jay: Update to changes.
7651
7652         Remove unused field
7653         * codegen.cs (EmitContext.IsLastStatement): Remove.
7654         * statement.cs (Block.DoEmit): Update to changes.
7655
7656 2007-05-25  Raja R Harinath  <rharinath@novell.com>
7657
7658         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
7659         modifying current_block directly.
7660
7661 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
7662         
7663         * class.cs: Implemented automatic properties (C# 3.0)
7664           Thanks to Marek for the help.
7665
7666 2007-05-23  Raja R Harinath  <rharinath@novell.com>
7667
7668         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
7669         variable as assigned, note also that all its components are
7670         assigned too.
7671         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
7672
7673 2007-05-19  Marek Safar  <marek.safar@gmail.com>
7674
7675         * anonymous.cs, class.cs: Emit Compiler generated attribute when
7676         member is marked as compiler generated.
7677         
7678         * decl.cs (MemberCore): Refactored ModFlags into property.
7679
7680         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
7681         (Check): Check only accessibility modifiers.
7682
7683 2007-05-18  Raja R Harinath  <rharinath@novell.com>
7684
7685         Track all assignable slots in one bit array
7686         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
7687         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
7688         logic from VariableMap constructor here.  Use the same 'offset'
7689         variable that's later used for computing offsets of local
7690         variables.
7691         * flowanalysis.cs (UsageVector.parameters): Remove.
7692         (UsageVector): Update to changes.
7693         (VariableMap): Remove.
7694
7695         Avoid creating ParameterMap in every block
7696         * statement.cs (Block.ParameterMap): Move ...
7697         (ToplevelBlock.ParameterMap): ... here.
7698         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
7699         only once.
7700         * flowanalysis.cs (FlowBranching.param_map): Remove.
7701         (FlowBranching.UsageVector): Update to changes.
7702         (FlowBranchingToplevel.CheckOutParameters): Likewise.
7703
7704         * statement.cs (Block.CloneTo): Clone Toplevel field too.
7705
7706         * expression.cs (ParameterReference): Distinguish between block
7707         where parameter was referenced and declared.
7708
7709 2007-05-18  Marek Safar  <marek.safar@gmail.com>
7710
7711         * flowanalysis.cs, statement.cs: Put back improved error handling.
7712
7713 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
7714         
7715         * assign.cs:
7716         * expression.cs:
7717           Imporved object and collection initialization (C# 3.0).
7718
7719 2007-05-15  Marek Safar  <marek.safar@gmail.com>
7720
7721         A fix for bug #81380
7722         * expression.cs (Is.DoResolve): Only value types have constant `is'
7723         behaviour.
7724
7725 2007-05-15  Raja R Harinath  <rharinath@novell.com>
7726
7727         * statement.cs (ToplevelBlock.child): Remove.
7728
7729 2007-05-15  Raja R Harinath  <harinath@gmail.com>
7730
7731         Rationalize ResolveMeta: refactoring
7732         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
7733         out constant handling code into ...
7734         (Block.DoResolveConstants): ... this.
7735
7736         Rationalize ResolveMeta: kill local_map
7737         * statement.cs (Block.local_map, Block.LocalMap): Remove.
7738         (Block.AssignableSlots): New.
7739         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
7740         for locals -- move code from VariableMap here.  Avoid unnecessary
7741         allocations.
7742         * flowanalysis.cs (FlowBranching.local_map): Remove.
7743         (FlowBranching..ctor): Use Block.AssignableSlots.
7744         (VariableMap): Remove unused constructors.
7745
7746 2007-05-11  Raja R Harinath  <rharinath@novell.com>
7747
7748         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
7749
7750 2007-05-11  Marek Safar  <marek.safar@gmail.com>
7751
7752         * typemanager.cs (IsFriendAssembly): Should not be called for building
7753         assembly.
7754
7755 2007-05-09  Marek Safar  <marek.safar@gmail.com>
7756
7757         * literal.cs (NullConstant): Print null in all cases.
7758         
7759         * expression.cs (Binary.ResolveOperator): Implemented delegate
7760          comparison based on C# 2.0 changes.
7761
7762 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
7763
7764         This code is contributed under the MIT X11 license
7765         
7766         The following enables support for several C# 3.0 language features:
7767         
7768         * cs-tokenizer.cs: Added support for the "var" keyword.
7769         
7770         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
7771           Added VarExpr class to facilitate type inferencing.
7772         
7773         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
7774           to support anonymous types.
7775         
7776         * assign.cs: Added support for type inferencing and initialization.
7777         
7778         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
7779         
7780         * expression.cs: Added implicit array support to ArrayCreation.
7781           Added 5 types and 1 interface:
7782           
7783           IInitializable                Implementing classes can inject initializing
7784                                         statements after object instantiation.
7785           
7786           Initializer                   Stores data for object initialization.
7787           
7788           AnonymousType                 An expression for anonymous types.
7789           
7790           AnonymousTypeParameter        Stores data about an anonymous type's field.
7791           
7792           NewInitialize                 An expression for object initialization.
7793           
7794           CollectionInitialize          An expression for collection initialization.
7795         
7796         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
7797           statements.
7798
7799 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7800
7801         A fix for bug #81500
7802         * cs-tokenizer.cs: Add special handling for coalescing operator.
7803
7804 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7805
7806         A fix for bug #81529
7807         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
7808         its value from base class until it is redefined.
7809
7810 2007-05-02  Raja R Harinath  <rharinath@novell.com>
7811
7812         Fix regression in cs0631-3.cs
7813         * cs-parser.jay (operator_declarator): Add opt_attributes to error
7814         fallback.  Make error fallback catch more cases.
7815
7816 2007-05-01  Miguel de Icaza  <miguel@novell.com>
7817
7818         * cs-parser.jay: Allow parameters in operator declarations to have
7819         attributes. 
7820
7821 2007-04-27  Miguel de Icaza  <miguel@novell.com>
7822
7823         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
7824         exists. 
7825
7826         * lambda.cs (ContextualReturn.Resolve): An expression is valid
7827         inside the ContextualReturn, it does not have to be an
7828         ExpressionStatement. 
7829
7830 2007-04-24  Miguel de Icaza  <miguel@novell.com>
7831
7832         * lambda.cs (ContextualReturn.Resolve): if the return type is not
7833         set, set it.
7834
7835 2007-04-23  Miguel de Icaza  <miguel@novell.com>
7836
7837         * anonymous.cs (AnonymousContainer): split the virtual Resolve
7838         method in two methods: ResolveNoDefine and Resolve.
7839
7840         ResolveNoDefine will stop just after ResolveTopBlock has been
7841         called.   
7842
7843         Resolve will then continue by creating a method and issuing the
7844         call to method.Define ().
7845
7846         (AnonymousMethod): Split and implement the new Resolve and
7847         ResolveNoDefine as well.
7848
7849         * lambda.cs (LambdaExpression): Split the anonymous method
7850         resolution code into a separate routine (CoreCompatibilityTest)
7851         from DoCompatibleTest.
7852
7853         (LambdaExpression.TryBuild): New method, this method tries to
7854         build the LambdaExpression with the given set of types to be used
7855         as the types for the various parameters of the lambda expression. 
7856
7857         If the compilation succeed with the given types, the infered type
7858         of the Anonymous method is returned, otherwise null is returned.
7859
7860 2007-04-23  Marek Safar  <marek.safar@gmail.com>
7861
7862         A fix for bug #81414
7863         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
7864
7865 2007-04-22  Miguel de Icaza  <miguel@novell.com>
7866
7867         * cs-tokenizer.cs: Change various identifiers here from the
7868         camelCasing to the recommended Linux-like style for instance
7869         variables from the Coding Guidelines. 
7870
7871 2007-04-19  Martin Baulig  <martin@ximian.com>
7872
7873         * convert.cs
7874         (Convert.ImplicitReferenceConversionCore): Allow conversions from
7875         System.Enum to System.ValueType.
7876
7877 2007-04-13  Martin Baulig  <martin@ximian.com>
7878
7879         Rewrote implicit reference conversions.  We need to distinguish
7880         between implicit reference conversions (13.1.4) and implicit
7881         boxing conversions (13.1.5).
7882
7883         According to the spec, there's an an implicit conversion
7884         "From a one-dimensional array-type S[] to IList<T> and base
7885         interfaces of this interface, provided there is an implicit
7886         reference conversion from S to T."  Note that this does not
7887         include boxing conversions.
7888
7889         * convert.cs
7890         (Convert.ImplicitTypeParameterBoxingConversion): New method.
7891         (Convert.ImplicitReferenceConversion): Split into
7892         ImplicitReferenceConversionCore() and
7893         ImplicitBoxingConversionExist().
7894         (Convert.ImplicitReferenceConversionExists): Use the new
7895         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
7896
7897 2007-04-12  Martin Baulig  <martin@ximian.com>
7898
7899         * convert.cs (Convert.ImplicitReferenceConversion): Move the
7900         `TypeManager.null_type' checks up to the top of the method.
7901
7902 2007-04-11  Marek Safar  <marek.safar@gmail.com>
7903
7904         A fix for bug #81350
7905         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
7906         extension methods.
7907
7908 2007-04-11  Martin Baulig  <martin@ximian.com>
7909
7910         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
7911         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
7912         to make this work for generic classes; fixes #79561.
7913
7914 2007-04-11  Martin Baulig  <martin@ximian.com>
7915
7916         * expression.cs (As): Add support for nullable types; fixes #79371.
7917
7918 2007-04-11  Martin Baulig  <martin@ximian.com>
7919
7920         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
7921         `type.FullName' is null; fixes #80243.
7922
7923 2007-04-11  Martin Baulig  <martin@ximian.com>
7924
7925         * expression.cs (Invocation.IsApplicable): Don't modify the method
7926         if type inference succeeded, but the method was not applicable.
7927         Fixes #81250.
7928
7929 2007-04-10  Marek Safar  <marek.safar@gmail.com>
7930
7931         A fix for bug #81324
7932         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
7933         internal and external namespaces containers.
7934
7935 2007-04-10  Martin Baulig  <martin@ximian.com>
7936
7937         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
7938         TypeManager.DropGenericMethodArguments() so we also call
7939         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
7940
7941 2007-04-10  Martin Baulig  <martin@ximian.com>
7942
7943         * iterators.cs (Iterator.CreateIterator): Don't crash if
7944         `method.ReturnType' is null.  This happens if something went wrong
7945         while resolving that typ (we already reported an error in this case).
7946
7947 2007-04-10  Martin Baulig  <martin@ximian.com>
7948
7949         * expression.cs (New.DoResolve): Don't call CheckComImport() on
7950         generic interfaces; report the CS0144 directly.
7951
7952 2007-04-10  Martin Baulig  <martin@ximian.com>
7953
7954         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
7955         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
7956
7957 2007-04-10  Martin Baulig  <martin@ximian.com>
7958
7959         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
7960
7961 2007-04-09  Raja R Harinath  <rharinath@novell.com>
7962
7963         A better fix
7964         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
7965         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
7966
7967         Fix #81338
7968         * statement.cs (For.Resolve): If resolution fails, use
7969         KillFlowBranching.
7970
7971 2007-04-08  Marek Safar  <marek.safar@gmail.com>
7972
7973         * anonymous.cs (MakeName): Make faster and zero-based.
7974         (VerifyExplicitParameterCompatibility): Back to mode where generic
7975         parameter is ignored.
7976         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
7977
7978         * class.cs (EmitType): Method can emit another new method.
7979
7980         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
7981
7982         * driver.cs: Updated.
7983
7984         * lambda.cs: Reuse predefined empty parameters.
7985
7986         * parameter.cs: Updated
7987
7988         * support.cs: Implemented InflateTypes.
7989
7990         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
7991         (InitSystemCore): Introduced to isolate 3.0 dependencies.
7992
7993 2007-04-03  Martin Baulig  <martin@ximian.com>
7994
7995         Fix #80632.
7996
7997         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
7998         version of TypeManager.IsOverride() which also works with generic
7999         types.  
8000
8001 2007-04-03  Martin Baulig  <martin@ximian.com>
8002
8003         Fix #81044.
8004
8005         * convert.cs
8006         (Convert.ExplicitReferenceConversion): We need to cast when
8007         converting from IList<T> to S[].
8008
8009 2007-04-01  Marek Safar  <marek.safar@gmail.com>
8010
8011         * decl.cs (FindExtensionMethods): Consider all candidates with same name
8012         at this level.
8013         
8014         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
8015
8016 2007-03-31  Marek Safar  <marek.safar@gmail.com>
8017
8018         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
8019         argument and return type inferring.
8020
8021         * codegen.cs (InferReturnType): Flag whether return can be inferred.
8022         (ReturnType): Turned to property.
8023
8024         * statement.cs (Return): Implemented return type inferring.
8025
8026         * support.cs (ReflectionParameters): Use local types if possible.
8027
8028 2007-03-30  Raja R Harinath  <rharinath@novell.com>
8029
8030         * flowanalysis.cs (FlowBranching.Reachability): Remove.
8031         (FlowBranching.UsageVector): Update to changes.
8032
8033         Prepare to kill 'Reachability'
8034         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
8035         argument of constructor.
8036
8037 2007-03-29  Raja R Harinath  <rharinath@novell.com>
8038
8039         Prepare to kill 'Reachability'
8040         * flowanalysis.cs (UsageVector.is_unreachable): New.
8041         (UsageVector): Update to maintain 'is_unreachable' in parallel to
8042         'reachability', and verify they're consistent.
8043
8044         Fix #81121
8045         * expression.cs (New.EmitStatement): Handle type parameters here too.
8046
8047 2007-03-29  Martin Baulig  <martin@ximian.com>
8048
8049         Fix #79148.
8050
8051         * anonymous.cs
8052         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8053         CompilerGeneratedClass.
8054         (ScopeInfo.EmitScopeInstance): Make this protected.
8055         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8056         `ec.CurrentAnonymousMethod.Scope == Scope'.
8057
8058         * statement.cs (Block.ScopeInfo): Make this a property.
8059
8060 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8061
8062         Prepare to kill 'Reachability'
8063         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8064         (FlowBranching.UsageVector.Reachability): Remove property.
8065         (FlowBranching.UsageVector.IsUnreachable): New property.
8066         (FlowBranching.UsageVector.ResetBarrier): New.
8067         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8068         * codegen.cs, statement.cs: Update to changes.
8069
8070 2007-03-27  Martin Baulig  <martin@ximian.com>
8071
8072         Fix #81209.
8073
8074         * decl.cs
8075         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8076         generic types.
8077
8078 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8079
8080         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8081         instead of TriState.  Remove all mention of TriState.
8082
8083         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8084         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8085         and maintain invariants.
8086
8087 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8088
8089         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8090
8091 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8092
8093         * expression.cs: Stop using obsolete 2.0 opcodes.
8094
8095 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8096
8097         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8098         one of the latests Martin's fixes.
8099
8100 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8101
8102         * expression.cs: On BigEndian systems, swap the bytes, temporary
8103         solution until we get a new bitconverter class.
8104
8105 2007-03-23  Martin Baulig  <martin@ximian.com>
8106
8107         Fix #81158.
8108
8109         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8110         "Method" and "Method`1".  Normally, a cache lookup is done on the
8111         "Method" form (ie. without the generic arity), but this one makes
8112         lookups on the full form work as well.
8113
8114 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8115
8116         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8117         unused properties.
8118
8119 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8120         * class.cs: 
8121         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8122         ordered_member_list, to TypeBuilder to store members to be defined
8123         in the order they were parsed in.
8124         - ordered_explicit_member_list contains all properties indexers
8125           and methods that are defined as explicit implementation of an
8126           interface or base class.
8127         - ordered_member_list contains all properties indexers and methods
8128           that are not defined as explicit implementation of an interface
8129           or base class.
8130
8131         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8132         functionality in these removed classes has been replaced with 
8133         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8134         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8135
8136         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8137         to CheckForDuplications inside GetMethod and SetMethod Define Method
8138         to handle method property and indexer name conflicts.
8139
8140         Fixes #79434
8141
8142         All code is contributed under the MIT/X11 license.
8143
8144 2007-03-20  Martin Baulig  <martin@ximian.com>
8145
8146         * class.cs (TypeContainer.Interfaces): Removed; they're now
8147         included in `TypeContainer.Types'.
8148
8149 2007-03-20  Martin Baulig  <martin@ximian.com>
8150
8151         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8152
8153         * class.cs (TypeContainer.CreateType): New public method.  This is
8154         now called before DefineType() to create the TypeBuilders.
8155         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8156         has already been created by CreateType().
8157         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8158         don't resolve our base classes here; this has been moved into
8159         DefineBaseTypes().  We're now called from CreateType().
8160         (TypeContainer.DefineBaseTypes): New private method; resolve our
8161         base classes here.  We're now called from DefineType().
8162
8163         * rootcontext.cs
8164         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8165         our types first to create all the TypeBuilders.  After that, call
8166         TypeContainer.DefineType() on all the types which'll resolve their
8167         base classes and setup the resolve order.
8168
8169 2007-03-20  Martin Baulig  <martin@ximian.com>
8170
8171         * class.cs (TypeContainer.Enums): Removed; they're now included in
8172         `TypeContainer.Types'.  
8173
8174 2007-03-20  Martin Baulig  <martin@ximian.com>
8175
8176         * class.cs
8177         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8178         (TypeContainer.DoResolveMembers): Call DefineType() on our
8179         `compiler_generated' classes; moved here from DefineNestedTypes().
8180
8181         * rootcontext.cs
8182         (RootContext.ResolveTree): Call ResolveMembers() on all
8183         TypeContainer's in the `type_container_resolve_order'.
8184
8185 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8186
8187         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8188
8189 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8190
8191         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8192         implementation flags.
8193
8194 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8195
8196         * class.cs: More optimizations for type parameters.
8197
8198 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8199
8200         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8201
8202         * ecore.cs, parameter.cs: More common code for both corlibs.
8203
8204         * typemanager.cs (IsGenericMethod): Simplified.
8205
8206 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8207
8208         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8209         'returns'.
8210         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8211
8212         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8213         unconditionally.  Simplify explanation.
8214         (Try.Resolve, Using.Resolve): Likewise.
8215
8216 2007-03-15  Martin Baulig  <martin@ximian.com>
8217
8218         Fix #80731.
8219
8220         * decl.cs (DeclSpace): If we're a partial class, use our
8221         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8222
8223 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8224
8225         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8226         'throws'.
8227         (FlowBranching.UsageVector): Update to changes.
8228         (FlowBranching.MergeSiblings): Likewise.
8229         * statement.cs: Likewise.
8230
8231 2007-03-15  Martin Baulig  <martin@ximian.com>
8232
8233         Fix #79302.
8234
8235         * decl.cs
8236         (MemberCache): Added a special .ctor for type parameters.
8237
8238         * typemanager.cs
8239         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8240         `MemberCache'.  
8241
8242 2007-03-09  Martin Baulig  <martin@ximian.com>
8243
8244         * enum.cs (Enum): Make this a TypeContainer.
8245         (EnumMember): Derive from `Const'.
8246
8247         * const.cs
8248         (Const.DoResolveValue): New protected virtual method; move most of
8249         the functionality of ResolveValue() here so we can override it in
8250         `EnumMember'.
8251         (Const.CreateConstantReference): Make this virtual.
8252
8253         * class.cs (Kind): Add `Kind.Enum'.
8254         (TypeContainer.Emit): Don't emit the enums here; they're already
8255         in the `RootContext.typecontainer_resolve_order'.
8256
8257         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8258         here; they're already in the `typecontainer_resolve_order'.
8259
8260         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8261         TypeManager.DropGenericTypeArguments().
8262
8263         * typemanager.cs
8264         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8265         (TypeManager.IsEnumType): Likewise.
8266         (TypeManager.EnumToUnderlying): Likewise.
8267         (TypeManager.IsEqual): Add support for enums.
8268
8269 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8270
8271         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8272         DefaultParameterValueAttribute to be undefined, say if System.dll
8273         is not referenced.
8274
8275 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8276
8277         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8278         any mscorlib.
8279
8280 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8281
8282         * class.cs, parameter.cs: Unified parameters verification.
8283
8284 2007-03-08  Martin Baulig  <martin@ximian.com>
8285
8286         * cs-parser.jay (constructor_header): Pass the location to the
8287         newly created TopLevelBlock.
8288
8289 2007-03-07  Martin Baulig  <martin@ximian.com>
8290
8291         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8292
8293 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8294
8295         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8296         with the changes from David, fixes the build.
8297
8298 2007-03-05  David Mitchell  <dmitchell@logos.com>
8299
8300         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8301         and its base interfaces to a one-dimensional array type S[],
8302         provided there is an implicit or explicit reference conversion
8303         from S to T.
8304
8305 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8306
8307         * cs-tokenizer.cs: Implemented basic linq grammar.
8308
8309         * driver.cs: Set linq lang version on demand.
8310
8311 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8312
8313         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8314
8315 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8316
8317         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8318         (Fixes #80455)
8319
8320         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8321         here.
8322         Check property and event extern attributes.
8323
8324         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8325         charset.
8326
8327 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8328
8329         A fix for bug #80407
8330         * ecore.cs: Don't report ambiguity error when methods have same parent.
8331
8332 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8333
8334         A fix for bug #80878
8335         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8336
8337 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8338
8339         * attribute.cs: Enable ExtensionAttribute presence test.
8340
8341 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8342
8343         * class.cs: Warn about missing GetHashCode only when Equals is override.
8344
8345         * decl.cs: Check accessibility of type arguments.
8346
8347         * typemanager.cs: Correctly report nullable array.
8348
8349 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8350
8351         * class.cs, report.cs: Capture more details when things go wrong.
8352
8353 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8354
8355         A fix for bug #80650
8356         * cs-parser.jay: Anonymous container starts at constructor declaration
8357         and not at block beginning because it has to be usable in constructor
8358         initializer.
8359
8360         * statement.cs: Use context location and not block one for error reporting.
8361
8362 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8363
8364         A fix for bug #78712
8365         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8366         too.
8367
8368 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8369
8370         A fix for bug #80493 by Atsushi Enomoto
8371         * cs-parser.jay: Ignore invalid attribute target.
8372
8373 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8374  
8375         * cs-tokenizer.cs: Ignore '\0' as white space character.
8376
8377 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8378
8379         * cs-parser.jay: Add support for lambda expressions to the mcs
8380         compiler as well.
8381
8382         * lambda.cs: Only clone when we are probing, not on the final call
8383         (Compatible is the final call). 
8384
8385         * statement.cs (CloneContext): Introduce class to provide block
8386         remapping during clone.
8387
8388         All statements Clone themselves now.
8389
8390         (Clone): special handling for blocks, when we clone a block, we
8391         register the block inside this routine, as children of the block
8392         might trigger a lookup. 
8393         
8394         * expression.cs: Add support for CloneContext in all expressions. 
8395         
8396 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8397  
8398         A fix for bug #80493
8399         * statement.cs: Report ambiguous warning when interfaces are not related.
8400
8401 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8402
8403         C# 3.0 extension methods.
8404
8405         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8406         cannot be used directly.
8407
8408         * class.cs (Class.Emit): Emit extension attribute if any class method
8409         is extension method.
8410         (Method.Define): Add basic extension method validation conditions.
8411         (Method.Emit): Emit extension attribute for method.
8412
8413         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8414         extension method exists. Currently we follow same approach as Microsoft
8415         does, emit even if a method or a class are private but this can change
8416         later.
8417
8418         * cs-parser.jay: Add handling of `this' keyword in method parameters
8419         context.
8420
8421         * decl.cs (DeclSpace.IsStaticClass): New property.
8422         (MemberCache.FindExtensionMethods): Looks for extension methods with
8423         defined name and extension type.
8424
8425         * doc.cs: Updated after OverloadResolve changes.
8426
8427         * driver.cs: Add new soft reference to System.Core.dll.
8428
8429         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8430         (ExtensionMethodGroupExpr): Represents group of extension methods.
8431
8432         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8433         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8434         to MethodGroupExpr and made non-static for easier customization.
8435         (Invocation.DoResolve): Add extension method lookup when no standard
8436         method was found.
8437         (MemberAccess.DoResolve): Try extension methods if no member exists.
8438
8439         * modifiers.cs: Add METHOD_EXTENSION modifier.
8440
8441         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8442         as well as candidate extension type.
8443         (ComputeNamespaces): When assembly constains extension methods registers
8444         them.
8445         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8446         extension method lookup.
8447         (Namespace.LookupExtensionMethod): Looks for extension method in this
8448         namespace.
8449         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8450         find a method which matches name and extensionType.
8451
8452         * parameter.cs (Parameter): Add This modifer.
8453         (HasExtensionMethodModifier): New property.
8454         (Resolve): Add extension parameter check.
8455         (ModFlags): turned to property to exclude this modifier as it is not real
8456         parameter modifier.
8457         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8458
8459         * support.cs (ParameterData): Add ExtensionMethodType.
8460         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8461
8462         * typemanager.cs: Add type and ctor extension attribute type.
8463
8464 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8465
8466         * report.cs (DisableErrors, EnableErrors): used to prevent error
8467         output when we are "trying" to compile various methods with
8468         different types. 
8469
8470         * ecore.cs (Expression): Add Clone method that calls the virtual
8471         CloneTo method.  The current CloneTo method in Expression throws
8472         an exception so we can track down all the places where this must
8473         be implemented (not using abstract, because that would be a lot of
8474         up-front-work before we can start testing the implementation
8475         idea). 
8476
8477         Important: we only need Clone capabilities for expressions created
8478         by the parser, as the expressions we will be cloning are
8479         expressions in the pre-resolved state.   This vastly simplifies
8480         the work required. 
8481         
8482         (SimpleName): Add CloneTo that does nothing.
8483         (EmptyCast): Add CloneTo.
8484         
8485         * expression.cs (Binary): Implement CloneTo.
8486         (Invocation.IsApplicable): Store the current ec in
8487         EmitContext.TempEc and restore it on return.  This is used so we
8488         do not have to sprinkle hundres of methods with an extra
8489         EmitContext, we know that the only user is the lambda expression
8490         ImplicitConversionExists code. 
8491         
8492         (Argument): Add Cloning capabilities.
8493         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8494         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8495         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8496         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8497         IndexerAccess): Add Clone capability.
8498
8499         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8500
8501         (Argument): Add cloning capability.
8502
8503         * assign.cs (Assign): Implement CloneTo.
8504
8505         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8506         
8507         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8508         version by calling Convert with the EmitContext (that we are
8509         currently storing in ec, this is not great, but will do for now,
8510         to avoid passing EmitContext parameters to hundreds of functions
8511         that do not need them now).
8512
8513         (SetExpression): Remove, it is not needed.
8514         
8515         (ContextualReturn): Implement CloneTo.
8516
8517         * statement.cs (Statement): Implement cloning infrastructure,
8518         similar to expressions.
8519
8520         (Block): Partial implementation of Clone for statements.
8521
8522         (Return): Implement clone.
8523         
8524         * constant.cs (Constant.CloneTo): New method, does nothing.
8525
8526         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8527         solution, until we decide how to exactly do this.  
8528         
8529 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8530  
8531         A fix for bug #80493
8532         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8533         a property is override we need to use second accessor.
8534
8535 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8536  
8537         A fix for bug #80418
8538         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8539         methods.
8540
8541 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8542
8543         Another fix for bug #80749
8544         * pending.cs: Abstract class has priority over interfaces.
8545
8546 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8547
8548         Another fix for bug #80749
8549         * pending.cs: Abstract class has priority over interfaces.
8550
8551 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8552
8553         Another fix for bug #80749
8554         * pending.cs: Abstract class has priority over interfaces.
8555
8556 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8557
8558         Another fix for bug #80749
8559         * pending.cs: Abstract class has priority over interfaces.
8560
8561 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8562
8563         * class.cs Better error message.
8564
8565         * driver.cs: Add shorter versions of -optimize option.
8566
8567 2007-02-13  Martin Baulig  <martin@ximian.com>
8568
8569         * class.cs (Constructor.Emit): Check the return value of
8570         ec.ResolveTopBlock() and return on error.
8571
8572 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8573
8574         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8575         message to fix error message regression.
8576
8577 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8578
8579         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8580
8581 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8582
8583         A fix for bug #80749
8584         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8585         its parent container.
8586
8587         * class.cs (DefineFieldInitializers): Each initializer can has different
8588         resolve context.
8589
8590         * const.cs: Updated.
8591
8592 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8593
8594         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8595         now all the heavy lifting to check that embedded statements or
8596         expressions have the right form is done in the ContextualReturn.
8597
8598         (ContextualReturn): New class.  
8599
8600         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8601         method that can be invoked to report 201, so we do not replicate
8602         this everywhere.
8603
8604         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8605         
8606         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8607         treating tabs as spaces. 
8608
8609 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8610
8611         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8612         * assign.cs: Use full implicit conversion for right side check.
8613
8614 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8615
8616         * statement.cs (Switch): Switch over boolean type is not standardized.
8617
8618 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8619
8620         A fix for bug #80755
8621         * decl.cs (FindBaseEvent): Don't use method cache for events.
8622
8623 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8624
8625         * cs-parser.jay: Better syntax error handling.
8626
8627         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8628         instead of underlying type value.
8629
8630 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8631
8632         * driver.cs: Check define identifier before is registered.
8633
8634         * namespace.cs: Use existing error message.
8635
8636         * report.cs: New warning.
8637
8638 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8639
8640         A fix for bug #80742
8641         * expression.cs: Delegate Invoke method can be called directly.
8642
8643 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8644
8645         A fix for bug #80676
8646         * class.cs (IsEntryPoint): The Main method can have params modifier.
8647
8648 2007-02-04  Miguel de Icaza  <miguel@novell.com>
8649
8650         * parameter.cs (Parameter, Parameters): Add Clone method.
8651
8652         * anonymous.cs (Compatible): Turn method into virtual method, so
8653         LambdaExpression can implement a different behavior.
8654
8655         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
8656         out the basic checking here, so it can be used by
8657         LambdaExpressions.
8658         
8659         * lambda.cs: Introduce "Compatible" function that will do the
8660         heavy lifting.
8661
8662 2007-02-02  Marek Safar  <marek.safar@gmail.com>
8663
8664         * attribute.cs: Unified one error message.
8665
8666         * class.cs (Class): Use type attributes and not properties to test static
8667         class.
8668         (IsEntryPoint): Don's pass local variable.
8669
8670         * convert.cs: Removed duplicate check.
8671
8672         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
8673
8674         * driver.cs: Don't crash when soft reference does not exist.
8675
8676         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
8677         (UsingEntry): Removed redundant allocation.
8678
8679         * parameter.cs: Add fast path for type parameters.
8680
8681         * support.cs: Don't allocate attribute when it's not used.
8682
8683 2007-01-30  Miguel de Icaza  <miguel@novell.com>
8684
8685         * anonymous.cs
8686         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
8687         this into a virtual method, so we can override it in LambdaExpression.
8688
8689         * driver.cs: Improve diagnostics in case of failure. 
8690
8691         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
8692         write a function that is slightly more complex and that parses:
8693
8694         type identifier [, type identifier]* )
8695
8696         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
8697         this expression:
8698
8699                 (canEmpty ? i >= 0 : i > 0)
8700
8701 2007-01-30  Raja R Harinath  <rharinath@novell.com>
8702
8703         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
8704         exception on possibly valid code.
8705
8706 2007-01-29  Raja R Harinath  <rharinath@novell.com>
8707
8708         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
8709         Push/PopPosition.
8710         (parse_opt_type_arguments): Remove.  It's almost the same as
8711         parse_less_than.
8712         (parse_namespace_or_typename): Use parse_less_than.
8713
8714 2007-01-28  Miguel de Icaza  <miguel@novell.com>
8715
8716         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
8717         this bug took a few hours to find, because the state saved and
8718         restored by PushPosition and PopPosition was ignoring the state of
8719         parse_generic_less_than.
8720
8721         I can also now remove the handling of OP_LT and OP_GT, this solves
8722         the big mistery.
8723         
8724         * cs-tokenizer.cs: store the location for the ARROW token, we use
8725         that in the parser.
8726
8727         (PushPosition, PopPosition): save/restore also `current_token',
8728         restore `parse_generic_less_than' (was missing).
8729
8730         (parse_opt_type_arguments): use parse_type, not
8731         parse_namespace_or_typename to parse types.
8732
8733         * lambda.cs: Empty new file, will eventually have the lambda
8734         expression implementation.
8735
8736         * lambda.test: used to test the internal tokenizer. 
8737
8738         * report.cs (FeatureIsNotISO1): Rename from
8739         FeatureIsNotStandardized, because it was about the language level
8740         (1 vs 2) it was not about standarization.
8741
8742         (FeatureRequiresLINQ): New.
8743
8744         * support.cs (SeekableStreamReader): Only require that the reader
8745         is a TextReader, not a StreamReader, so we can plug StringReader. 
8746
8747         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
8748         given position in the input stream the following tokens can be
8749         parsed as a type followed by an identifier.
8750
8751         (is_punct): after a '(' if parse_type_and_parameter returns true,
8752         then return a special token OPEN_PARENS_LAMBDA which is used to
8753         avoid reduce/reduce errors in the grammar for the
8754         lambda_expression rules.
8755
8756         (parse_type): implement a type parser inside the
8757         tokenizer, the parser only returns true or false depending on
8758         whether the input at a given position can be parsed as a type.
8759
8760         (peek_token): new method used during type parsing.
8761
8762 2007-01-28  Raja R Harinath  <rharinath@novell.com>
8763
8764         Fix #80531
8765         * anonymous.cs (ScopeInfo.InflateParameters): New.
8766         (AnonymousContainer.Resolve): Use it to redirect types of
8767         delegate parameters.
8768
8769 2007-01-27  Raja R Harinath  <rharinath@novell.com>
8770
8771         Fix #80530
8772         * expression.cs (Error_InvalidArguments): Don't use two different
8773         messages for CS1503.  Use ExtraInformation and
8774         SymbolRelatedToPreviousError instead.
8775
8776         Fix #80358
8777         * decl.cs (DeclSpace.initialize_type_params): Don't access
8778         'type_params' of a partial class directly.
8779
8780 2007-01-26  Miguel de Icaza  <miguel@novell.com>
8781
8782         * constant.cs: Removed a handful of out-of-range checks that were
8783         not necessary. 
8784
8785 2007-01-25  Marek Safar  <marek.safar@gmail.com>
8786
8787         * expression.cs (CheckUselessComparison): Add additional check for char
8788         constants.
8789
8790         * namespace.cs: Fixed typo.
8791
8792 2007-01-23  Miguel de Icaza  <miguel@novell.com>
8793
8794         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
8795         gone, instead we inline the test, preventing the needless casts to
8796         longs, ulongs and doubles for the parameters, avoiding calls to
8797         methods that overchecked stuff, and instead inlined things
8798         nicely. 
8799
8800 2007-01-20  Marek Safar  <marek.safar@gmail.com>
8801
8802         * cs-parser.jay: Better parameter error handling.
8803
8804 2007-01-17  Marek Safar  <marek.safar@gmail.com>
8805
8806         A fix for bug #80368, #80522
8807         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
8808         whether array initializer contains constants only.
8809         (ArrayCreation.Emit): Use better formula to decide when
8810         are array initializers for static initialization.
8811         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
8812         have to emit even constants otherwise they are pre-initialized.
8813
8814 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
8815             Raja R Harinath  <rharinath@novell.com>
8816
8817         Fix emit order of 'get' vs. 'set'.
8818         * support.cs (Accessors): New.
8819         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
8820         Note the order in which accessors are declared in the source.
8821         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
8822         Refactored from Property.Define and Indexer.Define.
8823         (PropertyBase.DefineAccessors): New helper that calls the above in
8824         appropriate order as noted by the parser.
8825         (Property.Define, Indexer.Define): Update to changes.
8826         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
8827
8828 2007-01-17  Raja R Harinath  <rharinath@novell.com>
8829
8830         Fix cs0029-6.cs and gcs0029-2.cs (regression)
8831         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
8832         there's an implicit conversion from the current type to the target
8833         type before converting the underlying constant.
8834
8835 2007-01-16  Marek Safar  <marek.safar@gmail.com>
8836
8837         * const.cs (ResolveValue): Updated after constant conversion was made more
8838         generic.
8839
8840         * constant.cs (GetAttributableValue): constant to object conversion is
8841         used for attributes only.
8842         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
8843         constant conversions.
8844         (LongConstant.ConvertImplicitly): Ditto.
8845
8846         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
8847         (ImplicitConversionStandard): Handle constant conversion as extra step.
8848         It solves the issue when constant conversion was called indirectly like
8849         inside array initializer and constant folding was skipped.
8850
8851         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
8852         this change.
8853
8854         * statement.cs(ImplicitConversionStandard): Updated after constant
8855         conversion was made more generic.
8856
8857 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
8858
8859         * expression.cs (As.DoResolve): Use GenericConstraints instead of
8860         Constraints, solves the problem where the compiler incorrectly
8861         reported that a type parameter was not constrained to a class (Bug
8862         80518)
8863
8864 2007-01-14  Marek Habersack  <grendello@gmail.com>
8865
8866         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
8867
8868 2007-01-14  Marek Safar  <marek.safar@gmail.com>
8869
8870         A fix for bug #80368
8871         * assign.cs (FieldInitializer): New class implements field
8872         initializer statement.
8873
8874         * attribute.cs: Update after FieldMember rename.
8875
8876         * class.cs (PropertyBasedMember): New common class for property based
8877         types.
8878         (InterfaceMemberBase): New base class for all members which can be used as
8879         an interface members.
8880         (MethodCore): Moved really common code to InterfaceMemberBase.
8881         (Method.Define): Equal and GetHasCode detection is relevant for methods
8882         only.
8883         (MethodData.Define): Don't assume that public event implements an
8884         interface automatically.
8885         (MethodData.DefineMethodBuilder): Issue an error even if only extern
8886         modifier is used.
8887         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
8888         (FieldMember): Merged with FieldBase.
8889         (EventProperty.AEventPropertyAccessor): New specialization to check whether
8890         event extern modifier can be used.
8891         (EventField.EventFieldAccessor): Moved event field specific code here.
8892         (Event.AllowedModifiers): Even event can be extern.
8893         (Event.FindOutBaseMethod): New override specific to events.
8894         (Indexer.parameters): Reintroduce parameters because base class holds
8895         only properties common data.
8896         (Indexer.CheckForDuplications): Indexers are threated as methods so we
8897         need do extra parameters check.
8898
8899         * const.cs: Update after FieldMember rename.
8900
8901         * decl.cs (MemberCache.FindBaseEvent): New method.
8902
8903         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
8904         to reflect that indexer is now derived from PropertyBased.
8905
8906         * ecore.cs (GetMemberType): Made public.
8907         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
8908         obsolete event.
8909
8910         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
8911         
8912         * typemanager.cs (CSharpSignature): Correctly print event accessors.
8913         (RegisterEvent): Removed.
8914         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
8915         (GetPrivateFieldOfEvent): Renamed to GetEventField.
8916
8917 2007-01-11  Raja R Harinath  <rharinath@novell.com>
8918
8919         Fix #80249
8920         * statement.cs (CollectionForeach.TryType): Prefer generic
8921         GetEnumerator over non-generic variant.  Fix code to follow comments.
8922
8923 2007-01-09  Raja R Harinath  <rharinath@novell.com>
8924
8925         Fix #80446
8926         * support.cs (ReflectionParameter): Don't use an invalid index on
8927         the generic parameter data.
8928
8929 2007-01-08  Miguel de Icaza  <miguel@novell.com>
8930
8931         * driver.cs: Just add a tiny bit of infrastructure.
8932
8933 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8934
8935         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
8936         where field type is struct from current assembly.
8937         
8938         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
8939         it is possible.
8940
8941 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8942
8943         A fix for bug #80381
8944         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
8945         the core types.
8946
8947         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
8948         messages.
8949         (Namespace.LookupType): Always use core types from corlib when speficied.
8950
8951         * report.cs: A new warning.
8952
8953         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
8954         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
8955         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
8956
8957         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
8958         (InitCoreTypes): Set expression type of object_type and value_type
8959         immediately after lookup.
8960
8961 2007-01-01  Miguel de Icaza  <miguel@novell.com>
8962
8963         * cs-tokenizer.cs: Accept Pc class characters (Connector
8964         Punctuation) as valid identifiers.  Fixes #78259
8965
8966         * expression.cs (Invocation.DoResolve): Moved the check for the
8967         use of `this' for doing method calls to the Invocation resolution
8968         step, after overload resolution has taken place instead of doing
8969         the check at the low-level `This.DoResolve' level.
8970
8971         The `This.DoResolve'(appens before overload resolution, so it has
8972         no way of knowing if the method that will be called will be
8973         instace or static, triggering an erroneous report for cs0188 (Bug
8974         78113).
8975
8976         We now do the check for instance method invocations after we know
8977         what method will be called.
8978
8979         (This.CheckThisUsage): Move the actual use of this structure
8980         checking into its own method and expose it. 
8981
8982         * Everywhere that called Error_ValueCannotBeConverted: pass a new
8983         EmitContext.
8984
8985         Exceptions: Null.ConvertImplicitly,
8986         Constant.ImplicitConversionRequired as there are too many call
8987         sites for passing the ec. 
8988
8989         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
8990         EmitContext, if the value is null, then we do not try to provide
8991         the extra information from the error (If a userdefined conversion
8992         exists, as UserDefinedConversion requires a non null-EmitContext).
8993
8994         Fixes: #80347
8995
8996 2006-12-30  Raja R Harinath  <rharinath@novell.com>
8997
8998         * flowanalysis.cs (MyBitVector): Document some invariants.
8999         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
9000         introduced below, and add a couple of others, 
9001
9002 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9003
9004         * attribute.cs (GetMethodObsoleteAttribute): Uses new
9005         GetPropertyFromAccessor and GetEventFromAccessor.
9006         
9007         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
9008         overrides non-obsolete one.
9009         (Indexer.Define): Error message has been moved to the parser.
9010
9011         * cs-parser.jay: Better syntax errors handling.
9012
9013         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
9014         when an invocation has no arguments.
9015
9016         * ecore.cs: Removed not used caching.
9017
9018         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
9019         implementation.
9020
9021         * report.cs: Add a new warning.
9022
9023         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
9024
9025         * typemanager.cs (enumeration_type): Removed.
9026         (CSharpSignature): Reuses IsSpecialMethod.
9027         (IsEqual): Hack for MS BCL.
9028         (GetPropertyFromAccessor): New method.
9029         (GetEventFromAccessor): New method.
9030         (IsSpecialMethod): Fixed to handle more cases.
9031
9032 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9033
9034         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
9035         Made white spaces array static.
9036
9037         * ecore.cs (RemoveGenericArity): Optimized.
9038
9039         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
9040         10 times faster).
9041         (MyBitVector.initialize_vector): Simplified.
9042
9043 2006-12-22  Miguel de Icaza  <miguel@novell.com>
9044
9045         * ecore.cs: Am not entirely happy with this hack, but it seems to
9046         address the issue in 80257 (a small test case for
9047         CreativeDocs.NET). 
9048
9049         I set the MethodGroupExpr.Type to an internal compiler type
9050         (itself in this case) to force the resolution to take place.   Why
9051         it does not take place with a null is beyond me.
9052
9053 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9054
9055         A fix for bug #80288
9056         * expression.cs (ResolveOperator): Consider user defined conversion for
9057         logical and operator too.
9058         (EmitBranchable): Optimization for logical and when full constant folding
9059         could not be applied but one operand is constant.
9060
9061 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9062
9063         * class.cs (GetClassBases): Write 5 times every day, will never use
9064         FullName for error reporting.
9065
9066         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9067
9068 2006-12-19  Martin Baulig  <martin@ximian.com>
9069
9070         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9071         the symbol file info here.
9072
9073 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9074
9075         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9076         of `elseif' is taking then following sections are not taking.
9077         Fixes an issue reported on mono mailing list.
9078
9079 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9080
9081         A fix for bug #80300
9082         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9083         a caller is not taking.
9084
9085 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9086
9087         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9088         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9089         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9090         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9091         * class.cs: Update to changes.
9092
9093 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9094
9095         A fix for bug #79934
9096         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9097         partial container.
9098
9099         * class.cs (ResolveMembers): Register an iterator in current container and
9100         not in shared one.
9101
9102 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9103
9104         Fix test-543.cs
9105         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9106         satisfy a params annotated parameter.
9107
9108 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9109
9110         A fix for bug #77014
9111         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9112         paramters correctly and not rely on hacks in Parameters class.
9113         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9114         at any possition.
9115         (Invocation.VerifyArgumentsCompat): Ditto.
9116         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9117         any possition.
9118
9119         * parameter.cs (HasParams): Don't assume that params is the last one.
9120
9121         * support.cs (ReflectionParameters.ctor): Look for params attribute
9122         correctly.
9123         (ReflectionParameters.ParameterType): Removed hack when we returned last
9124         parameter for out of range parameters.
9125         (ParameterName, ParameterModifier): Ditto.
9126
9127 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9128
9129         A fix for bug #79987
9130         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9131         when assembly is not CLS compliant but type is. I have no idea why is this
9132         allowed.
9133
9134         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9135
9136 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9137
9138         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9139         in struct constructors, they are basically no-ops.
9140
9141 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9142
9143         * cs-tokenizer.cs (Position): Save preprocessor status too.
9144
9145 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9146
9147         A fix for bug #77794
9148         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9149
9150 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9151
9152         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9153         Fixes #69299.
9154         (pp_expr): Report error for an invalid expression.
9155         (handle_preprocessing_directive): Simplified; add more error checking.
9156
9157 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9158
9159         A fix for bug #74939
9160         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9161         directives handling.
9162
9163 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9164
9165         A fix for bugs #80093, and #75984
9166         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9167         logic, it seems to me as it worked before "by coincidence".
9168         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9169         (cleanup): Enabled endif check.
9170
9171 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9172
9173         A fix for bug #80162
9174         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9175         enumerators are never ambiguous.
9176
9177 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9178
9179         Fix #80060
9180         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9181
9182 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9183
9184         A fix for bug #80144
9185         * class.cs (EventProperty.Define): Explicit implementation means
9186         that an even is used.
9187
9188 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9189
9190         Fixes the operators implementation (part II)
9191
9192         * cfold.cs (DoConstantNumericPromotions): Renamed to
9193         DoBinaryNumericPromotions and simplified.
9194         (BinaryFold): Couple of conversion fixes; simplified.
9195
9196         * constant.cs, ecore.cs, literal.cs
9197         (ToType): Renamed to ConvertImplicitly.
9198         (Reduce): Renamed to ConvertExplicitly.
9199
9200         * class.cs, convert.cs: Updated.
9201
9202         * expression.cs: TryReduce doesn't throw an exception.
9203
9204 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9205
9206         A fix for bug #80108
9207         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9208         compatible.
9209
9210 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9211
9212         Fixes unary operators implementation (part I)
9213         Also fixes #80026
9214
9215         * cfold.cs (Error_CompileTimeOverflow): Made internal
9216
9217         * const.cs (IConstant): Changed to use reference to constant and
9218         not constant itself.
9219         Updated IConstant implementations.
9220
9221         * constant.cs (CreateConstant): New factory method.
9222         Updated IConstant implementation.
9223
9224         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9225
9226         * ecore.cs: Updated to use CreateConstantReference.
9227
9228         * enum.cs: Reflects IConstant changes.
9229
9230         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9231
9232         * literal.cs (NullConstant): Change to be independently usable.
9233
9234 2006-11-29  Martin Baulig  <martin@ximian.com>
9235
9236         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9237         we need to emit the scope initializer before calling the base .ctor.
9238
9239         * anonymous.cs: Merged back from the new anonymous methods branch.
9240         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9241
9242         * expression.cs (ParameterReference.DoResolveBase): Create a
9243         "normal" ScopeInfo when capturing parameters rather than using the
9244         root scope; this makes things work with anonymous methods having
9245         parameters.
9246
9247         * statement.cs
9248         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9249
9250 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9251
9252         A fix for bug #79987
9253         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9254         check to a base class.
9255         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9256         only when assembly has missing attribute.
9257         * report.cs: Update.
9258
9259 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9260
9261         * cs-tokenizer.cs: Merged with gmcs version.
9262
9263 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9264
9265         * cs-tokenizer.cs,
9266         * cs-parser.jay: Better error message when partial keyword is misplaced.
9267
9268 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9269
9270         A fix for bug #79810
9271         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9272         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9273         a RuntimeWrappedException by default.
9274
9275 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9276
9277         A fix for bug #79843
9278         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9279         implementation.
9280         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9281
9282 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9283
9284         * driver.cs, namespace.cs: Uses faster IndexOf version.
9285
9286 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9287
9288         A fix for bug #79941
9289         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9290         operators.
9291         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9292         even if internal name is different.
9293         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9294         (UserDefinedConversion): Simplified as the operators cannot be internal.
9295         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9296         conversions.
9297         (MethodLookup): Replaced EmitContext with parentType.
9298         * expression.cs: Updated.
9299
9300 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9301
9302         * driver.cs (BadAssembly): Handle all the ugliness of
9303         DefineDynamicAssembly.
9304
9305 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9306
9307         Address parts of #58244 -- most of what's left is in the runtime
9308         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9309         CS1509 error checks, and handle them for all assembly loads, not
9310         just the first invocation.
9311         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9312         * codegen.cs (AssemblyClass.AddModule): ... here.
9313
9314 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9315
9316         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9317         IEnumerable<T> is ambiguous.
9318
9319 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9320
9321         A fix for bug #67689
9322         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9323         GetEnumerator is ambiguous.
9324
9325         * report.cs: Add new warning.
9326
9327 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9328
9329         A fix for bug #78602
9330         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9331         to protected member can be nested type.
9332
9333 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9334
9335         A fix for bug #78965
9336         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9337         to protected member must derive from current type.
9338
9339 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9340
9341         assign.cs: Reuses error method.
9342
9343         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9344         instead of type for constants.
9345         (Expression.Error_ValueAssignment): Common error method.
9346
9347         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9348         for any assignment.
9349
9350 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9351
9352         A fix for bug #79081
9353         * expression.cs (MemberAccess.DoResolve): Check nested type
9354         accessibility.
9355
9356 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9357
9358         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9359
9360 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9361
9362         A fix for bug #76591
9363         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9364
9365 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9366
9367         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9368         type forwarder of the same type multiple times.
9369
9370 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9371
9372         Fix #78820
9373         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9374         instance as an rvalue, even when we later resolve as an lvalue.
9375
9376 2006-10-25  Martin Baulig  <martin@ximian.com>
9377
9378         * anonymous.cs: Fix #79673.
9379
9380 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9381
9382         A fix for bug #79666
9383         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9384         ignored when is optimized (= default value) as its value is already set.
9385
9386 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9387
9388         A fix for bug #79724
9389         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9390         TypeContainer for type lookup.
9391
9392 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9393
9394         A fix for bug #79231
9395         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9396         * expression.cs (OverloadResolve): Always convert type name for
9397         an error message.
9398         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9399         other member.
9400
9401 2006-10-18  Martin Baulig <martin@ximian.com>
9402
9403         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9404
9405 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9406
9407         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9408         an int32, but requesting an int64 from the conversion
9409
9410 2006-10-12  Martin Baulig  <martin@ximian.com>
9411
9412         * anonymous.cs
9413         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9414         
9415 2006-10-12  Martin Baulig  <martin@ximian.com>
9416
9417         * statement.cs
9418         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9419
9420 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9421
9422         * convert.cs: Remove broken code: I was doing the "Existance"
9423         tests for Implicit conversions.
9424
9425 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9426
9427         * convert.cs: Added one missing case in
9428         ImplicitStandardConversionExists uint64 to intptr.
9429
9430         Fixes #59800
9431         
9432         * typemanager.cs (uintptr_type): another core known type.   
9433
9434         * ecore.cs (OperatorCast): routine used to do cast operations that
9435         depend on op_Explicit.  We could change some of the Decimal
9436         conversions to use this.
9437
9438         This one has a probe mechanism that checks both types for an op_
9439         which it coudl be used to eliminate two classes: CastToDecimal
9440         and CastFromDecimal.
9441
9442         * convert.cs: Implement the conversions documented in #59800
9443         
9444 2006-10-10  Martin Baulig  <martin@ximian.com>
9445
9446         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9447         before RootScope.ResolveMembers().
9448
9449         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9450         `CurrentType' if appropriate.
9451
9452 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9453
9454         A fix for bug #78568
9455         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9456         when contains binary operators.
9457         * cs-parser.jay: Updated.
9458
9459 2006-10-09  Martin Baulig  <martin@ximian.com>
9460
9461         * delegate.cs
9462         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9463         moved that into Define() and also do the other type parameter
9464         checks there.  Fixes #79094.  Added gtest-292.cs.
9465
9466         * expression.cs
9467         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9468         since that doesn't include type parameters; don't use `Ldelema'
9469         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9470
9471 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9472
9473         A fix for #77796
9474         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9475         conversion is allowed.
9476
9477 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9478
9479         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9480         error reporting when no error occurs.
9481
9482 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9483
9484         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9485         does not exist.
9486
9487 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9488
9489         Fix #79584
9490         * class.cs (DefineTypeBuilder): Check circular dependencies before
9491         setting the parent of the TypeBuilder.
9492         (CheckRecursiveDefinition): Don't use 'BaseType', since
9493         it may not be valid until after DefineTypeBuilder.  Use
9494         'base_type' instead.
9495
9496 2006-10-04  Martin Baulig  <martin@ximian.com>
9497
9498         Merged the Anonymous Methods patch.
9499
9500         * anonymous.cs, iterators.cs: The new anonymous methods code.
9501
9502         * statement.cs (Variable): New public abstract class.
9503         (LocalInfo.Variable): New public property.
9504         (LocalInfo.ResolveVariable): New public method.
9505         (Block.Flags): Add `IsIterator'.
9506         (Block.AddVariable): Improved the CS0136 check.
9507         (Block.AnonymousChildren): New public property.
9508         (Block.AddAnonymousChild): New public method.
9509         (ToplevelBlock): Update to use the new anonymous method framework.
9510         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9511         `ToplevelBlock'; this is required to correctly implement the
9512         CS0136 check.
9513         (Fixed, Using): Use `TemporaryVariable' instead of directly
9514         creating the `LocalBuilder'.
9515
9516         * parameter.cs (Parameter.ResolveVariable): New public method.
9517         (Parameters.ResolveVariable): Likewise.
9518
9519         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9520
9521         * class.cs (TypeContainer): Replaced the `iterators' list and
9522         corresponding methods with a list of `CompilerGeneratedClass'es.
9523         (TypeContainer.ResolveMembers): New public method.
9524         (Method): `IIteratorContainer' has been replaced by
9525         `IAnonymousHost'.
9526
9527         * expression.cs (VariableReference): New public abstract base
9528         class for `LocalVariableReference', `ParameterReference' and
9529         `This'.
9530
9531         * codegen.cs (EmitContext): Removed `capture_context',
9532         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9533         (EmitContext.EmitThis): Removed.
9534
9535         * cs-parser.jay: Replace `iterator_container' with
9536         `anonymous_host'.       
9537
9538 2006-10-04  Martin Baulig  <martin@ximian.com>
9539
9540         * generic.cs (GenericMethod): Don't make this abstract.
9541         (Constraints.Clone): Added dummy implementation.
9542
9543 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9544
9545         Fix #79577
9546         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9547         'declspaces'.  Avoid allocating arrays willy-nilly.
9548
9549         Fix #79553
9550         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9551         cases out of the switch.
9552
9553 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9554
9555         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9556         message when non-generic type is used with the type arguments.
9557         * expression.cs: Updated.
9558
9559 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9560
9561         Fix #79013
9562         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9563         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9564         Change semantics slightly.  Don't insist on having only one
9565         temporary EmptyExpression -- just throttle the creation of new ones.
9566
9567         Fix #79451
9568         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9569         non-interfaces too.  If no methods are found, don't try to create
9570         a MethodGroupExpr.
9571
9572 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9573
9574         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9575         generic type.
9576
9577         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9578         us produce better error message.
9579
9580 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9581
9582         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9583         of the `|' operator.
9584
9585         * report.cs: A new warning added.
9586
9587 2006-09-27  Martin Baulig  <martin@ximian.com>
9588
9589         * generic.cs (GenericMethod): Don't make this abstract.
9590
9591 2006-09-27  Martin Baulig  <martin@ximian.com>
9592
9593         * report.cs
9594         (InternalErrorException): Added overloaded ctor taking a params array.
9595
9596 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9597
9598         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9599         Fixed the cases when same error was reported twice.
9600
9601         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9602         now report symbol information.
9603
9604 2006-09-25  Martin Baulig  <martin@ximian.com>
9605
9606         * class.cs: Completely unified with the gmcs version.
9607
9608 2006-09-25  Martin Baulig  <martin@ximian.com>
9609
9610         * typemanager.cs (TypeManager.IsNullableType): New public function.
9611         (TypeManager.IsNullableTypeOf): Likewise.
9612         (TypeManager.IsNullableValueType): Likewise.
9613
9614         * class.cs (MethodCore): Added the `GenericMethod' argument from
9615         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9616
9617 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9618
9619         * convert.cs: Unify with gmcs version.
9620
9621 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9622
9623         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9624         verify them as well.
9625
9626         * report.cs: New warning.
9627
9628 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9629
9630         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9631         for anonymous block with out argument.
9632
9633 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9634
9635         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9636         not used private events only.
9637
9638 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9639
9640         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
9641
9642         * const.cs (Const.Define): Check for constant type.
9643         (Const.IsConstantTypeValid): Looks for valid constant types.
9644
9645         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
9646
9647         * ecore.cs (EmptyConstantCast): New common class for all constant based
9648         EmptyCast(s).
9649
9650         * expression.cs (Is.DoResolve): Handle null constant especially.
9651         (New.DoResolve): Check for new void().
9652         (MemberAccess.DoResolve): Cope with all kind of nulls.
9653
9654         * literal.cs (NullConstant): Uses EmptyConstantCast.
9655         (NullDefault): Based on EmptyConstantCast.
9656         (NullLiteral): Uses EmptyConstantCast.
9657
9658         * statement.cs (Block.ResolveMeta): Check for constant type.
9659
9660 2006-09-22  Martin Baulig  <martin@ximian.com>
9661
9662         * delegate.cs, attribute.cs: Merged with the gmcs versions.
9663
9664 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9665
9666         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
9667         not the null type.
9668
9669         Fix part of #79451
9670         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
9671         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
9672         code slightly.
9673
9674 2006-09-22  Martin Baulig  <martin@ximian.com>
9675
9676         * ecore.cs: Merged with the gmcs version.
9677
9678         * generic.cs (ConstructedType): New dummy class.
9679         (TypeArguments): Don't make this abstract.
9680
9681         * typemanager.cs
9682         (TypeManager.IsGenericTypeDefinition): New method.
9683         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
9684
9685 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9686
9687         * expression.cs (ComposedCast): Check for arrays of TypedReference
9688         before creating the type, not after.
9689
9690 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
9691
9692         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
9693         after ToType change.
9694
9695         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
9696         when constant must be implicitly convertible.
9697
9698         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
9699
9700         * ecore.cs (NullCast): Derives from NullConstant.
9701
9702         * expression.cs (Is.DoResolve): Removed useless variables.
9703         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
9704         (New.Constantify): Add enum support.
9705         (MemberAccess.DoResolve): Add warning when accessing null constant or
9706         variable.
9707
9708         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
9709         property.
9710
9711         * literal.cs (NullConstant): New abstract class with common
9712         functionality for all null specializations.
9713         (NullDefault): Represents default(X) when result can be
9714         reduced to null.
9715         (NullLiteral): Updated.
9716
9717         * report.cs: Add new warning.
9718
9719 2006-09-21  Martin Baulig  <martin@ximian.com>
9720
9721         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
9722
9723 2006-09-21  Martin Baulig  <martin@ximian.com>
9724
9725         * generic.cs (GenericConstraints): New dummy class.
9726         (Constraints): Likewise.
9727         (TypeParameter): Likewise.
9728         (TypeParameterName): Likewise.
9729         (GenericMethod): Likewise.
9730
9731         * typemanager.cs (TypeManager.GetGenericArguments): New method.
9732
9733         * decl.cs: Merged with the gmcs version.
9734
9735 2006-09-21  Raja R Harinath  <rharinath@novell.com>
9736
9737         * generic.cs (TypeParameter): Implement IMemberContainer.
9738         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
9739
9740         * rootcontext.cs: Unify with gmcs version.
9741
9742         * report.cs: Unify with gmcs version.
9743         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
9744         from gmcs/generics.cs.
9745         * generics.cs (TypeParameter): New dummy class.
9746
9747         * support.cs: Unify with gmcs version.
9748
9749 2006-09-20  Raja R Harinath  <rharinath@novell.com>
9750
9751         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
9752         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
9753
9754         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
9755         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
9756         * mcs.exe.sources: Add generic.cs.
9757
9758         * codegen.cs: Unify with gmcs version.
9759
9760         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
9761         (EmitContext): Add GenericDeclContainer implementation.
9762         * decl.cs (MemberCore, DeclSpace): Likewise.
9763         * namespace.cs: Remove #ifdef GMCS_SOURCE.
9764
9765         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
9766         MCS TypeManager has a corresponding dummy method.
9767
9768 2006-09-19  Martin Baulig  <martin@ximian.com>
9769
9770         * expression.cs: Completely merged with the gmcs version.
9771
9772 2006-09-19  Martin Baulig  <martin@ximian.com>
9773
9774         * expression.cs (Invocation): Merged with the gmcs version.
9775         (ArrayAccess.GetStoreOpcode): Likewise.
9776
9777 2006-09-19  Martin Baulig  <martin@ximian.com>
9778
9779         * typemanager.cs
9780         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
9781         (TypeManager.IsGenericMethodDefinition): Likewise.
9782
9783 2006-09-19  Martin Baulig  <martin@ximian.com>
9784
9785         * typemanager.cs
9786         (TypeManager.IsEqual): Moved the gmcs implementation here.
9787         (TypeManager.DropGenericTypeArguments): Likewise.
9788         (TypeManager.DropGenericMethodArguments): Likewise.
9789         (TypeManager.GetTypeArguments): Moved here from gmcs.
9790         (TypeManager.HasGenericArguments): Likewise.
9791
9792 2006-09-19  Martin Baulig  <martin@ximian.com>
9793
9794         * expression.cs (Binary): Merged with the gmcs version.
9795
9796 2006-09-19  Martin Baulig  <martin@ximian.com>
9797
9798         * expression.cs (Probe, As, Is): Merged with the gmcs version.
9799
9800 2006-09-19  Martin Baulig  <martin@ximian.com>
9801
9802         * typemanager.cs: Merged with the gmcs version.
9803
9804 2006-09-16  Raja R Harinath  <rharinath@novell.com>
9805
9806         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
9807         * driver.cs: Likewise.
9808
9809 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
9810
9811         A fix for #79401
9812         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
9813         only if parent type is class.
9814         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
9815         update.
9816
9817 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
9818
9819         * cs-parser.jay,
9820         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
9821         keywords are used.
9822         * typemanager.cs(CSharpName): Converts NullType to null.
9823
9824 2006-09-15  Martin Baulig  <martin@ximian.com>
9825
9826         * typemanager.cs
9827         (TypeManager.GetMethodName): Added mcs implementation.
9828         (TypeManager.IsEqual): Likewise.
9829
9830         * ecore.cs
9831         (SimpleName.RemoveGenericArity): Added dummy implementation.
9832
9833         * pending.cs: Merged with the gmcs version.     
9834
9835 2006-09-15  Martin Baulig  <martin@ximian.com>
9836
9837         * statement.cs: Merge with the gmcs version.
9838
9839 2006-09-15  Martin Baulig  <martin@ximian.com>
9840
9841         * statement.cs (Switch): Merge with the gmcs implementation
9842         (without nullables), which is newer.
9843
9844 2006-09-15  Martin Baulig  <martin@ximian.com>
9845
9846         * statement.cs (Block.Variables): Make this public.
9847         (ToplevelBlock.Parameters): Make this a property.
9848         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
9849
9850 2006-09-15  Martin Baulig  <martin@ximian.com>
9851
9852         * namespace.cs: Merge with the gmcs version.
9853
9854 2006-09-15  Martin Baulig  <martin@ximian.com>
9855
9856         * decl.cs (MemberName): Minor code cleanups.
9857
9858 2006-09-15  Martin Baulig  <martin@ximian.com>
9859
9860         * parameter.cs: Merge with the gmcs version.
9861
9862 2006-09-15  Martin Baulig  <martin@ximian.com>
9863
9864         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
9865         and an error in mcs.
9866
9867 2006-09-15  Martin Baulig  <martin@ximian.com>
9868
9869         * flowanalysis.cs: Merged from GMCS; added the generics code into
9870         a `GMCS_SOURCE' conditional so we can share this file.
9871
9872 2006-09-08  Martin Baulig  <martin@ximian.com>
9873
9874         * typemanager.cs (TypeManager.interlocked_type): New public field.
9875         (TypeManager.int_interlocked_compare-exchange): New public field.
9876         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
9877         enumerator types here and call InitGenericCoreTypes().
9878         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
9879         after calling InitEnumUnderlyingTypes().
9880
9881         * rootcontext.cs
9882         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
9883         `classes_second_stage'. 
9884
9885 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
9886
9887         * assign.cs, ecore.cs, expression.cs: Share error message text.
9888         * class.cs (FieldMember.Define): Check for varible of static type.
9889         * driver.cs (LoadAssembly): Uses error output for errors.
9890         * statement.cs: Updated.
9891
9892 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
9893
9894         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
9895         type instance.
9896
9897 2006-09-07  Martin Baulig  <martin@ximian.com>
9898
9899         * driver.cs
9900         (MainDriver): Revert r62663 from Marek; see #70506 for details.
9901
9902 2006-08-29  Miguel de Icaza  <miguel@novell.com>
9903
9904         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
9905         
9906 2006-08-17  Miguel de Icaza  <miguel@novell.com>
9907
9908         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
9909         #52019 and #79064, the use of the \uXXXX sequence in source code
9910         to represent unicode characters.
9911
9912 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
9913
9914         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
9915         support.
9916         * class.cs, ecore.cs, statement.cs: Merged to one error message.
9917
9918 2006-08-13  Miguel de Icaza  <miguel@novell.com>
9919
9920         * assign.cs: Catch attempts to assign to a method groups in += and
9921         report as 1656
9922
9923 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
9924
9925         A fix for #79056
9926         * cs-parser.jay: Don't destroy current array type by typeof of array's.
9927
9928 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
9929
9930         * class.cs (Method.Define): Issue a warning when generic method looks like
9931         an entry point.
9932         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
9933         as well.
9934
9935 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
9936  
9937         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
9938         looking for ctor.
9939         * decl.cs (MemberCache.FindMembers): When container is interface we need to
9940         search all base interfaces as a member can be ambiguous.
9941         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
9942         Constructor member type filter. 
9943         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
9944         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
9945         reporting for returned memberinfos.
9946         * report.cs: Updated.
9947         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
9948         version to work on all runtimes.
9949         (TypeManager.RealMemberLookup): Removed members filtering.
9950
9951 2006-08-08  Raja R Harinath  <rharinath@novell.com>
9952
9953         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
9954         (PropertyExpr.EmitAssign): Likewise.
9955         * expression.cs (Indirection.EmitAssign): Likewise.
9956         (LocalVariableReference.EmitAssign): Likewise.
9957         (ParameterReference.EmitAssign): Likewise.
9958         (Invocation.EmitArguments): Likewise.
9959         (ArrayAccess.EmitAssign): Likewise.
9960         (IndexerAccess.EmitAssign): Likewise.
9961         (This.EmitAssign): Likewise.
9962         (ConditionalLogicalOperator.Emit): Likewise.
9963
9964         Fix #79026
9965         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
9966         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
9967         leave it in after returning it.
9968         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
9969
9970 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
9971
9972         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
9973         message.
9974
9975 2006-08-03  Raja R Harinath  <rharinath@novell.com>
9976
9977         Fix cs0146-3.cs and cs0146-4.cs.
9978         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
9979         enclosing types don't depend on the current type.
9980
9981 2006-08-02  Raja R Harinath  <rharinath@novell.com>
9982
9983         Fix #77963
9984         * class.cs (TypeContainer.DoDefineMembers): Use
9985         FindBaseMemberWithSameName on Parent, since we're interested in
9986         whether we hide inherited members or not.
9987         (FindBaseMemberWithSameName): Make slightly more robust.
9988
9989         Fix the non-generic testcase from #77396
9990         * decl.cs (DeclSpace.DeclContainer): Remove override.
9991
9992         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
9993         declspaces for doppelgangers too.
9994         (UsingEntry): Implement IResolveContext.
9995         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
9996         'this' as the resolve context.
9997         (LocalAliasEntry): Likewise.
9998
9999         Implement parts of #77403
10000         * roottypes.cs (RootDeclSpace): New.  Used to represent the
10001         toplevel declaration space.  Each namespace declaration introduces
10002         a "partial" root declaretion space.
10003         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
10004         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
10005         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
10006         from 'current_namespace.SlaveDeclSpace'.
10007         (namespace_declaration): Likewise.
10008         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
10009         check.  It can't happen now.
10010         * decl.cs (DeclSpace.LookupType): Likewise.
10011         * driver.cs (MainDriver): Sanity check.
10012
10013 2006-08-01  Raja R Harinath  <rharinath@novell.com>
10014
10015         * decl.cs (DeclSpace.FindNestedType): Remove.
10016         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
10017         LookupTypeContainer to get the container of the nested type.
10018         * class.cs (TypeContainer.FindNestedType): Make non-override.
10019
10020 2006-07-31  Raja R Harinath  <rharinath@novell.com>
10021
10022         * decl.cs (DeclSpace.PartialContainer): Move field from ...
10023         * class.cs (TypeContainer.PartialContainer): ... here.
10024         (TypeContainer.AddBasesForPart): New helper.
10025         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
10026         instead.
10027         * cs-parser.jay (current_class): Convert to DeclSpace.
10028         (struct_declaration, interface_declaration, class_declaration):
10029         Use AddBasesForPart instead of .Bases directly.
10030         * const.cs, iterators.cs: Update to changes.
10031
10032 2006-07-28  Raja R Harinath  <rharinath@novell.com>
10033
10034         * class.cs (TypeContainer.AddMemberType): Rename from
10035         AddToTypeContainer.
10036         (TypeContainer.AddMember): Rename from AddToMemberContainer.
10037         (AddTypeContainer): New.  Combine AddClassOrStruct and
10038         AddInterface.
10039         (AddPartial): Update.  Add 'is_partial' argument.
10040         * roottypes.cs: Update to changes.
10041         * cs-parser.jay (push_current_class): New helper for handling
10042         current_container and current_class.
10043         (struct_declaration, interface_declaration, class_declaration):
10044         Use it.
10045
10046 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10047
10048         * roottypes.cs: Rename from tree.cs.
10049
10050         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10051         * tree.cs (Tree, ITreeDump): Remove types.
10052         * rootcontext.cs (tree, Tree): Remove fields.
10053         (root, ToplevelTypes): New.
10054         * *.cs: Update to rename.
10055
10056         * tree.cs (Tree.RecordDecl): Remove.
10057         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10058         namespace here.
10059         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10060
10061 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10062
10063         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10064         DoFlowAnalysis and OmitStructFlowAnalysis here.
10065         (ec.With): Rename from WithUnsafe and generalize.
10066         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10067         (ec.WithFlowAnalyis): New.
10068         * ecore.cs, expression.cs, statement.cs: Update.
10069
10070 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10071
10072         * statement.cs (Block.ResolveMeta): Simplify slightly.
10073
10074         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10075         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10076         check_state to flags.
10077         (CheckState, ConstantCheckState): Update.
10078         (InUnsafe): New read-only property.
10079         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10080         arbitrary flags.
10081         (WithUnsafe): New helper similar to WithCheckState.
10082         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10083         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10084
10085 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10086
10087         Make comparisons use the same IL irrespective of whether they're
10088         in a 'checked' or 'unchecked' context: one of the issues in #78899
10089         * codegen.cs (EmitContext.CheckState): Make read-only property.
10090         (EmitContext.ConstantCheckState): Likewise.
10091         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10092         helper that implement a save/restore stack for CheckState
10093         values.  This is the only way to change check-state.
10094         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10095         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10096         (CheckedExpr.EmitBranchable): New forwarding method.
10097         (UnCheckedExpr): Likewise.
10098         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10099         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10100         (Checked.Resolve, checked.DoEmit): Likewise.
10101
10102 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10103
10104         * anonymous.cs: Cache the resolved anonymous delegate, and return
10105         this so that the ResolveTopBlock is only triggered once, not
10106         twice.
10107
10108         Currently we trigger ResolvetopBlock twice due to a first pass of
10109         argument check compatibility, and a second pass that does the
10110         actual resolution.   
10111         
10112 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10113
10114         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10115         modifiers.
10116         * rootcontext.cs (Reset): Add helper_classes.
10117
10118 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10119
10120         A fix for #78860
10121         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10122         correctly.
10123
10124 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10125
10126         * statement.cs (Lock): Handle expressions of type
10127         TypeManager.null_type specially.  Fixes #78770
10128
10129 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10130
10131         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10132         to an event.
10133
10134 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10135
10136         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10137         for accessors as well.
10138         * ecore.cs (EventExpr): Add AccessorTable.
10139
10140 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10141
10142         A fix for #78738
10143         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10144         for CS0122 where appropriate.
10145         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10146         level attributes.
10147         (Filter): Assembly can be null in the case of top level attributes.
10148
10149 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10150
10151         A fix for #78690
10152
10153         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10154         is done at global level.
10155
10156 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10157
10158         A fix for #77002, Implemented TypeForwarder support.
10159
10160         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10161         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10162         * typemanager.cs (): Add type_forwarder_attr_type.
10163
10164 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10165
10166         * report.cs: Add CS0469 warning.
10167
10168 2006-06-21  Martin Baulig  <martin@ximian.com>
10169
10170         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10171         the `try'-block, so we also report CS0016 etc. there.
10172
10173 2006-06-21  Martin Baulig  <martin@ximian.com>
10174
10175         * delegate.cs
10176         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10177
10178 2006-06-21  Martin Baulig  <martin@ximian.com>
10179
10180         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10181         also report CS1686 for parameters.
10182
10183 2006-06-21  Martin Baulig  <martin@ximian.com>
10184
10185         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10186         instead of an error if the value is not implicitly convertible to
10187         the switch types; fixes #77964.
10188
10189 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10190
10191         Fix #78673
10192         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10193         FieldBuilder is null.
10194
10195         Fix #78662
10196         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10197         'left' and 'right' before error-checking.
10198
10199 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10200
10201         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10202         Fixed bug #78601.
10203         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10204         (FieldExpr.DoResolve): likewise.
10205         (PropertyExpr.InstanceResolve): likewise.
10206         (EventExpr.InstanceResolve): likewise. 
10207
10208 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10209
10210         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10211         attribute applicable tests for attribute argument.
10212
10213 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10214
10215         Fix #78079
10216         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10217         (Binary.OverloadResolve_PredefinedIntegral): New.
10218         (Binary.OverloadResolve_PredefinedFloating): New.
10219         (Binary.OverloadResolve_PredefinedString): New.
10220         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10221         Follow the standard more closely, and treat numeric promotions in
10222         terms of overload resolution.
10223         (Binary.CheckShiftArguments): Simplify.
10224
10225 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10226
10227         * flowanalysis.cs (MyBitVector): Simplify representation.
10228         (MyBitVector.Clone): Avoid allocating BitArray.
10229         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10230         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10231         (*): Update.  Change all references to MyBitVector.And and
10232         MyBitVector.Or to &= and |=.
10233
10234 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10235
10236         Fix cs0231-[34].cs.
10237         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10238         to param arguments too.
10239
10240 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10241
10242         * cs-parser.jay: Catch another parsing form for arglist being
10243         followed by other arguments.  Fixes #78313.
10244
10245 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10246
10247         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10248         checking of out parameters to ...
10249         (FlowBranchingToplevel.Merge): ... here.
10250         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10251         set, propagate the origin upward, and only complain if there was
10252         no other error.
10253         (FlowBranchingException.AddContinueOrigin): Likewise.
10254         (FlowBranchingException.AddReturnOrigin): Likewise.
10255         (FlowBranchingException.AddGotoOrigin): Likewise.       
10256
10257 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10258
10259         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10260         unreachable, skip it.
10261         (FlowBranchingException.Merge): Always propagate jumps, even if
10262         the finally block renders subsequent code unreachable.
10263
10264 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10265
10266         Fix #77601
10267         * statement.cs (Goto.Resolve): Move responsibility for resolving
10268         'goto' to FlowBranching.AddGotoOrigin.
10269         (Goto.SetResolvedTarget): New.  Callback to set the
10270         LabeledStatement that's the target of the goto.
10271         (Goto.DoEmit): Use Leave instead of Br when crossing an
10272         unwind-protect boundary.
10273         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10274         LookupLabel and adjust to new semantics.
10275         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10276         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10277         Goto.SetResolvedTarget to update target.
10278         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10279         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10280         AddBreakOrigin & co.  Delay propagation until ...
10281         (FlowBranchingException.Merge): ... this.
10282
10283         * statement.cs (Block.Resolve): Always depend on flow-branching to
10284         determine unreachability.  Kill workaround that originally emitted
10285         only one statement after an "unreachable" label (see infloop in
10286         test-515.cs).
10287
10288         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10289         This is still "wrong", but anything better would probably need a
10290         multi-pass algorithm.
10291         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10292         usage vector.  Force current usage vector to be reachable, to
10293         optimistically signify backward jumps.
10294         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10295         detected.
10296         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10297         detected, return the original salted-away usage vector instead,
10298         updated with appropriate changes.  Print unreachable warning if
10299         necessary.
10300         * statement.cs (Block.Resolve): Don't print unreachable warning on
10301         a labeled statement.
10302
10303 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10304
10305         * driver.cs: Pass filename without path to AssemblyBuilder's 
10306         AddResourceFile. Fixes bug #78407.
10307
10308 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10309
10310         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10311         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10312         (FlowBranching.MergeChild): Overwrite
10313         reachability information from Labeled branchings too.
10314
10315 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10316
10317         * statement.cs (Goto.Resolve): Merge jump origins here ...
10318         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10319
10320         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10321         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10322         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10323         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10324         here, ...
10325         * statement.cs (Goto.Resolve): ... not here.
10326         (Goto.Emit): Remove CS1632 check.
10327
10328 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10329
10330         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10331         error message.
10332
10333 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10334
10335         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10336         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10337         (FlowBranchingException.Label): Likewise.
10338
10339         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10340         given value.
10341         (MyBitVector.Or): Use it to avoid losing information (Count).
10342         (FlowBranching.MergeOrigins): Likewise.
10343
10344         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10345         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10346         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10347         (UsageVector.ToString): Simplify.
10348         (UsageVector.MergeSiblings): Move here from ...
10349         (FlowBranching.Merge): ... here.
10350         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10351         not a MyBitVector.
10352
10353 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10354
10355         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10356         null bitvector is treated as all-true.
10357
10358         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10359         (MyBitVector): Rationalize invariants.  'vector != null' implies
10360         that we have our own copy of the bitvector.  Otherwise,
10361         'InheritsFrom == null' implies all inherited bits are true.
10362
10363 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10364
10365         * statement.cs (LocalInfo): Add IsConstant.
10366         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10367         local variable for constants.
10368
10369 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10370
10371         * flowanalysis.cs (MyBitVector.Empty): New.
10372         (MyBitVector): Don't allow InheritedFrom to be null.
10373         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10374         (UsageVector, FlowBranching): Update to changes.
10375
10376         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10377         recursion.  The 'Parent == null' condition isn't sufficient for
10378         anonymous methods.
10379         (FlowBranching.AddBreakOrigin): Likewise.
10380         (FlowBranching.AddContinueOrigin): Likewise.
10381         (FlowBranching.AddReturnOrigin): Likewise.
10382         (FlowBranching.StealFinallyClauses): Likewise.
10383         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10384         (FlowBranching.CheckOutParameters): Likewise.
10385         (FlowBranchingToplevel): Terminate all the above recursions here.
10386         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10387         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10388
10389         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10390         toplevel block.
10391         (FlowBranchingToplevel): New.  Empty for now.
10392         (FlowBranching.MergeTopBlock): Update.
10393         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10394         branching for the anonymous delegate.
10395         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10396
10397         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10398         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10399         information at the start of the merge.  Reorganize.
10400
10401 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10402
10403         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10404
10405 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10406
10407         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10408         to newly introduced ctor.
10409
10410         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10411         message to one place.
10412         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10413         global namespace.
10414
10415 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10416
10417         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10418
10419         * ecore.cs (Expression.ResolveAsConstant): Updated.
10420
10421         * statement.cs (ResolveMeta): Updated.
10422
10423 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10424
10425         * cs-parser.jay: __arglist cannot be used in initializer.
10426
10427 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10428
10429         A fix for #77879
10430         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10431         private types.
10432
10433 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10434
10435         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10436         (LabeledStatement): Add 'name' parameter.
10437         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10438         (Block.AddLabel): Update to changes.
10439         * cs-parser.jay (labeled_statement): Likewise.
10440
10441         * flowanalysis.cs (BranchingType.Labeled): New.
10442         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10443         (FlowBranchingLabeled): New.  Does nothing for now, but will
10444         eventually handle 'goto' flows.
10445         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10446         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10447         that's terminated ...
10448         (Block.Resolve): ... here.
10449
10450         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10451         (UsageVector.MergeFinallyOrigins): Likewise.
10452         (FlowBranching.InTryOrCatch): Likewise.
10453         (FlowBranching.AddFinallyVector): Likewise.
10454         (FlowBranchingException): Update to changes.
10455
10456         Fix #78290
10457         * statement.cs (Return.Resolve): Move error checking to ...
10458         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10459         (FlowBranchingException): Handle return origins like break and
10460         continue origins.
10461         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10462
10463 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10464
10465         A fix for #76122
10466         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10467         filter.
10468
10469 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10470
10471         A fix for #77543
10472         * class.cs (MethodData.Define): Do public accessor check only when method
10473         implements an interface.
10474
10475 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10476
10477         Remove special handling of 'break'
10478         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10479         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10480         (UsageVector.Break): Remove.
10481         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10482         reachability.
10483         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10484
10485         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10486         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10487
10488 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10489
10490         A fix for #75726
10491         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10492         be the interface member.
10493
10494 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10495
10496         A fix for #60069
10497         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10498         for emitting small (int) values.
10499
10500 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10501
10502         Fix #59427
10503         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10504         control-flow passes through the 'finally' after merging-in all the
10505         control-flows from 'try' and the 'catch' clauses.
10506
10507         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10508         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10509         always true at the only non-recursive entry point.
10510         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10511         FlowBranchingBreakable.
10512         (FlowBranchingLoop): Remove.
10513         * statement.cs (Return.DoResolve): Update to changes.
10514
10515         Fix #76471, #76665
10516         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10517         (FlowBranching.CreateBranching): Handle it: create a
10518         FlowBranchingContinuable.
10519         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10520         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10521         except that it handles the 'continue' command.
10522         (FlowBranching.UsageVector.MergeOrigins): Rename from
10523         MergeBreakOrigins.
10524         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10525         except that it overrides AddContinueOrigin.
10526         (FlowBranchingException): Override AddContinueOrigin, similar to
10527         AddBreakOrigin.
10528         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10529         Create a new branching around the embedded statement.
10530         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10531         control flow after the embedded statement.
10532         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10533
10534         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10535         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10536         FlowBranchingBreakable.
10537         (FlowBranchingSwitch): Remove.
10538
10539         Fix test-503.cs
10540         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10541         error reporting to ...
10542         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10543         Rename from 'AddBreakVector'.  Add new location argument.  Return
10544         a bool indicating whether the 'break' crosses an unwind-protect.
10545         (FlowBranchingException.AddBreakOrigin): Add.
10546         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10547         flowbranching after updating with the effects of the 'finally'
10548         clause.
10549         (FlowBranchingBreakable): New common base class for
10550         FlowBranchingLoop and FlowBranchingSwitch.
10551
10552         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10553         embedded statement.
10554         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10555
10556 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10557
10558         * statement.cs (Do.Resolve): If the loop is infinite, set the
10559         barrier.
10560         (While.Resolve, For.Resolve): Set a barrier after the embedded
10561         statement.  There's no direct control flow that goes from the end
10562         of the embedded statement to the end of the loop.
10563         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10564         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10565         above ensure that the reachability is correctly computed.
10566
10567         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10568         (UsageVector.MergeBreakOrigins): If the current path is
10569         unreachable, treat it as if all parameters/locals are initialized.
10570         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10571         infinite loops before merging-in break origins.
10572
10573         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10574         (Reachability.Reachable): Split part into ...
10575         (Reachability.Unreachable): ... this.  Simplify.
10576         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10577
10578         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10579         (Reachability.SetThrowsSometimes): Likewise.
10580         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10581         TriState.Always, use corresponding property.
10582         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10583         (Block.Resolve): Likewise.  Remove some redundant checks.
10584
10585 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10586
10587         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10588         (Reachability.Meet): Don't bother checking AlwaysThrows --
10589         barrier is always set.
10590         (FlowBranchingBlock.Merge): Likewise.
10591
10592 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10593
10594         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10595         checks for unreachable.
10596
10597 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10598
10599         A fix for #77980
10600         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10601
10602         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10603         whether field is really assigned.
10604
10605 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10606
10607         * flowanalysis.cs (Reachability): Make 4-argument constructor
10608         private.
10609         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10610         (Reachability.Always): Rename from the highly misleading
10611         'Reachability.Never'.
10612         (FlowBranching.Merge): Update to changes.  Mark an impossible
10613         situation with a 'throw'.
10614         (*): Update to changes.
10615
10616 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10617
10618         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10619         Remove 'Undefined'.
10620         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10621         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10622         (*): Update to changes.
10623         * statement.cs: Update to changes.
10624
10625 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10626
10627         A fix for #78049
10628         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10629
10630 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10631
10632         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10633         dummy UsageVector.
10634
10635         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10636         argument to two arguments: an usage-vector and a bool.  Move call
10637         to FlowBranching.Merge () ...
10638         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10639
10640         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
10641         handling of loop and switch reachability to ...
10642         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
10643
10644 2006-04-27  Raja R Harinath  <harinath@gmail.com>
10645
10646         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
10647         handling to FlowBranchingLoop.InLoop.
10648         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
10649
10650 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
10651
10652         A fix for #78115
10653         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
10654         anonymous method is allowed from AnonymousContainer here.
10655
10656         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
10657
10658 2006-04-24  Raja R Harinath  <rharinath@novell.com>
10659
10660         Fix #78156
10661         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
10662
10663 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
10664
10665         A fix for #49011.
10666         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
10667         (DoubleConstant.Reduce): Ditto.
10668
10669 2006-04-23  Raja R Harinath  <rharinath@novell.com>
10670
10671         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
10672         Remove 'lvalue_right_side' argument.  Move parts to ...
10673         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
10674         (LocalVariable.DoResolveLValue): ... these.
10675
10676 2006-04-21  Raja R Harinath  <rharinath@novell.com>
10677
10678         Fix cs1655.cs
10679         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
10680         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
10681         (LocalVariableReference.DoResolveBase): Use it to implement new
10682         CS1655 check.
10683         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
10684         (Argument.Resolve): Simplify.  Move CS1510 check ...
10685         * ecore.cs (Expression.ResolveLValue): ... here.
10686         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
10687         (PropertyExpr.DoResolveLValue): Likewise.
10688         (FieldExpr.Report_AssignToReadonly): Likewise.
10689         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
10690         LValueMemberAccess or LValueMemberOutAccess on instance depending
10691         on it.
10692         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
10693         DoResolve as appropriate.
10694
10695 2006-04-20  Raja R Harinath  <rharinath@novell.com>
10696
10697         Fix #75800
10698         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
10699         implicit conversions on 'out' and 'ref' arguments.
10700
10701         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
10702         improve clarity.  Remove dead code.
10703
10704         Fix #66031
10705         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
10706         (Catch.Resolve): Resolve VarBlock if it exists.
10707
10708 2006-04-19  Miguel de Icaza  <miguel@novell.com>
10709
10710         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
10711         twice, this was some residual code, the enumerator was emitted
10712         properly in the two branche of if later.
10713
10714 2006-04-19  Raja R Harinath  <rharinath@novell.com>
10715
10716         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
10717         cast is never an lvalue.
10718         (Cast.DoResolve, Cast.ResolveRest): Combine.
10719         (Argument.Emit): Simplify slightly.  Move 'Expr is
10720         IMemoryLocation' check ...
10721         (Argument.Resolve): ... here.
10722         (Argument.Error_LValueRequired): Remove.  Inline into only user.
10723
10724         Simplifications.  Fix cs0191-2.cs
10725         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
10726         CS1649 and CS1651 to ...
10727         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
10728         the actual selection of the error code and message to a lookup
10729         table.  Add a dummy return value to simplify callsites.
10730         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
10731         readonly fields of other instances of the same type.  Move CS0197
10732         warning from ...
10733         * expression.cs (Argument.Resolve): ... here.  Simplify code.
10734         Ensure that ec.InRefOutArgumentResolving is only set during LValue
10735         resolution of an out or ref argument.  The code simplification
10736         above uses this invariant.
10737
10738 2006-04-18  Raja R Harinath  <rharinath@novell.com>
10739
10740         Possibly fix #77752.  Fix cs1690-[4-7].cs.
10741         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
10742         CheckMarshallByRefAccess.  Drop parameter.
10743         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
10744         warning.
10745         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
10746         InstanceExpression.
10747         * report.cs (AllWarnings): Add CS1690.
10748         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
10749         for ref access too.
10750         (LocalVariableReference.DoResolveBase): Update.
10751
10752 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10753
10754         * class.cs (MethodOrOperator): Moved common parts from method class.
10755         detect obsolete attributes.
10756         (Method.Define): Simplified as it reuses code from base.
10757         (Constructor.ValidAttributeTargets): Fixed issue found during
10758         refactoring.
10759         (Destructor.ValidAttributeTargets): Fixed issue found during
10760         refactoring.
10761         (Operator): Finished refactoring set off by #78020. Operator class is now
10762         ordinary method class.
10763
10764         * anonymous.cs: Updated.
10765
10766         * decl.cs (DeclSpace): Add IsGeneric
10767
10768 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10769
10770         * class.cs (Constructor.Emit): Don't emit the attributes twice.
10771
10772 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10773
10774         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
10775         detect obsolete attributes.
10776         (Method.CreateEmitContext): Moved to MethodOrOperator.
10777
10778 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10779
10780         A fix for #78048.
10781         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
10782         customized exception to make crash detection easier.
10783         (MethodOrOperator): Started to work on new base class for methods and
10784         operators.
10785         (Method): Derives from MethodOrOperator.
10786         (Constructor.Emit): Emits its own attributes.
10787         (AbstractPropertyEventMethod.Emit): Ditto.
10788         (Operator): Derives from MethodOrOperator, will refactor fully in extra
10789         patch.
10790         (Operator.Emit): It's temporary more tricky than should be.
10791         
10792         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
10793
10794         * report.cs (InternalErrorException): Add ctor with inner exception.
10795
10796 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
10797
10798         A fix for #76744.
10799         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
10800         only not visible.
10801
10802 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
10803
10804         A fix for #77916.
10805         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
10806         array.
10807
10808 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10809
10810         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
10811         attribute is present and Guid not.
10812         (Interface.ApplyAttributeBuilder): Ditto.
10813
10814         * attribute.cs: Add error message.
10815
10816 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10817
10818         A fix for #78020.
10819
10820         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
10821         sources (it's composite) so hold them in extra array as they are used in
10822         Emit phase only. It worked in the previous versions by mistake.
10823         (Attribute.Emit): Emit attribute for more owners when exist.
10824
10825         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
10826         it has now different behaviour.
10827
10828 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
10829
10830         * constant.cs (Constant.IsDefaultInitializer): New method.
10831
10832         * class.cs: Updated.
10833
10834         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
10835         re-initialize default values. It saves KBs almost for every assembly.
10836         Thanks Zoltan for the idea.
10837         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
10838         (ArrayCreation.DoResolve): Resolve only once.
10839         (ArrayCreation.Emit): Emit static initializer only when it is faster.
10840         (ArrayCreation.GetAttributableValue): Cope with optimized values.
10841
10842 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10843
10844         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
10845         From #77961.
10846
10847 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10848
10849         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
10850         in an embedded statement too.
10851
10852 2006-04-01  Raja R Harinath  <rharinath@novell.com>
10853
10854         Fix #77958
10855         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
10856
10857 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10858
10859         A fix for #77966.
10860
10861         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
10862         was not specified.
10863
10864         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
10865
10866 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
10867
10868         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
10869         phase.
10870
10871         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
10872         LocalTemporary change.
10873
10874         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
10875         TypeContainer.
10876         (ClassOrStruct.DefineFieldInitializers): Implemented static field
10877         initializers optimization.
10878         (ClassOrStruct.TypeAttr): Moved from modifiers.
10879         (Constructor.CheckBase): Don't crash when static ctor has parameters.
10880         (FieldBase.ResolveInitializer): Resolves initializer.
10881         (FieldBase.HasDefaultInitializer): New property.
10882
10883         * cs-parser.jay: Removed message.
10884
10885         * expression.cs (CompilerGeneratedThis): New specialization.
10886
10887         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
10888
10889 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
10890
10891         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
10892
10893 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10894
10895         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
10896         be now EnumConstants only.
10897
10898 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10899
10900         * attribute.cs, driver.cs: Reset more caches.
10901
10902 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10903
10904         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
10905
10906 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10907
10908         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
10909         for easier reuse. Updated all overrides.
10910         (IntegralConstant): New base class for all integral constants.
10911         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
10912         of the constant range, report custom error.
10913         (UIntConstant.Reduce): Fixed uint conversion.
10914
10915         * ecore.cs, literal.cs: Reduce updates.
10916
10917 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10918
10919         A fix for #75813.
10920
10921         * class.cs (Constructor.Define): Removed extra if for default ctors.
10922         A patch from Atsushi Enomoto.
10923
10924 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10925
10926         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
10927         GetAttributableValue.
10928
10929         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
10930         when required.
10931
10932         * convert.cs (ImplicitConversionRequired): Error message moved to
10933         DoubleLiteral.
10934
10935         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
10936         automatic implicit conversion of an output value.
10937         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
10938
10939         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
10940         conversion.
10941         (TypeOf.GetAttributableValue): Add extra handling for object type.
10942
10943         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
10944         special error message.
10945
10946 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
10947
10948         * class.cs (Constructor.Emit): Don't crash when struct ctor is
10949         InternalCall.
10950         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
10951         compatible with MS runtime.
10952
10953 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
10954
10955         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
10956         attribute arguments here.
10957
10958         * class.cs (Indexer.Define): The check was moved to attribute class.
10959
10960 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
10961
10962         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
10963         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
10964         easier.
10965
10966 2006-03-22  Raja R Harinath  <rharinath@novell.com>
10967
10968         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
10969         mcs to keep code differences small.
10970         * attribute.cs (Attribute.GetParameterDefaultValue): New.
10971         * typemanager.cs (parameter_default_value_attribute_type): New.
10972         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
10973         CS1908 check.
10974
10975 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
10976
10977         * expression.cs (StringConcat.Append): Reverted back to no warning state.
10978
10979 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
10980
10981         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
10982
10983         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
10984         the blocks too.
10985
10986 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
10987
10988         * doc-bootstrap.cs : fix build.
10989
10990 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
10991
10992         * expression.cs (StringConcat.Append): Issue a warning when empty string
10993         is going to append.
10994
10995 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
10996
10997         * assign.cs (CompoundAssign.ResolveSource): Removed.
10998
10999         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
11000         clean up.
11001
11002         * class.cs (TypeContainer.FindMethods): Removed.
11003         (TypeContainer.CheckMemberUsage): Made static.
11004
11005         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
11006
11007         * constant.cs (CheckRange): Removed unused type argument.
11008         (CheckUnsigned): Removed unused type argument.
11009
11010         * cs-parser.jay: Updated after MemberAccess clean up.
11011         Uses Length for empty string test.
11012
11013         * cs-tokenizer.cs: Uses Length for empty string test.
11014         (IsCastToken): Made static.
11015         (is_hex): Made static.
11016         (real_type_suffix): Made static.
11017
11018         * decl.cs (SetupCache): Made static.
11019         (OnGenerateDocComment): Removed unused ds argument.
11020
11021         * delegate.cs (VerifyDelegate): Removed unused argument.
11022
11023         * doc.cs: Uses Length for empty string test.
11024
11025         * driver.cs: Uses Length for empty string test.
11026
11027         * enum.cs (IsValidEnumType): Made static
11028
11029         * expression.cs (EnumLiftUp): Removed unused argument.
11030         (ResolveMethodGroup): Ditto.
11031         (BetterConversion): Ditto.
11032         (GetVarargsTypes): Ditto.
11033         (UpdateIndices): Ditto.
11034         (ValidateInitializers): Ditto.
11035         (MemberAccess.ctor): Ditto.
11036         (GetIndexersForType): Ditto.
11037
11038         * flowanalysis.cs: (MergeFinally): Removed unused argument.
11039
11040         * iterators.cs: Updated after MemberAccess clean up.
11041
11042         * location.cs: Uses Length for empty string test.
11043
11044         * namespace.cs: Uses Length for empty string test.
11045
11046          * report.cs (CheckWarningCode): Made static.
11047
11048         * statement.cs (LabeledStatement): Removed unused argument.
11049
11050         * typemanager.cs (FilterNone): Removed.
11051
11052 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11053
11054         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11055         obsolete.
11056
11057         * class.cs: Updated.
11058
11059 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11060
11061         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11062
11063 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11064
11065         A fix for #77822.
11066
11067         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11068         reporting, it's more tricky than I thought.
11069
11070 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11071
11072         A fix for #77816.
11073
11074         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11075         host container.
11076         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11077         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11078         Add more error reporting; Fixed issue with params.
11079
11080         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11081
11082         * cs-parser.jay: AnonymousMethod requires host container.
11083
11084         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11085
11086 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11087
11088         * class.cs: Change 'TypeContainer ds' constructor argument to
11089         'DeclSpace parent'.  Some classes were missed below due to
11090         different naming convention.
11091
11092         * class.cs (MemberCore.Parent): Delete.  This makes the
11093         ParentContainer changes below enforceable by the compiler.
11094
11095         Treat pointers to enclosing declaration space as 'DeclSpace', not
11096         'TypeContainer'.
11097         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11098         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11099
11100         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11101         of TypeContainer.
11102         (Block.AddThisVariable): Likewise.
11103         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11104         (AbstractPropertyEventMethod.Emit): Likewise.
11105         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11106         (GetMethod.Define, SetMethod.Define): Likewise.
11107         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11108         (DelegateMethod.EmitMethod): Likewise.
11109
11110         Fix regression test-partial-13.cs.
11111         Rationalize use of PartialContainer.  Ensure that the partial
11112         class semantics can be tied to type-correctness, i.e., any
11113         violation will cause a compile error.
11114         * class.cs, const.cs: Access all fields that belong to class
11115         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11116         Resolve()-like functions still use 'Parent'.
11117
11118         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11119         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11120         (PropertyMethod.CheckModifiers): Remove unused argument.
11121         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11122         DeclSpace.
11123
11124 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11125
11126         Make semantics of PartialContainer simpler.
11127         * decl.cs (DeclSpace.IsPartial): Remove.
11128         * class.cs (TypeContainer.IsPartial): Likewise.
11129         (TypeContainer..ctor): Set PartialContainer to point to self.
11130         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11131         (TypeContainer.FindNestedType): Likewise.
11132         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11133
11134 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11135
11136         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11137
11138 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11139
11140         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11141         classes.
11142
11143 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11144
11145         * class.cs (Operator.Define): An error for base conversion was not
11146         reported correctly.
11147
11148 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11149
11150         * iterator.cs : yield break is allowed in try statement which has
11151           catch clauses. Fixed bug #77767.
11152
11153 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11154
11155         A fix for #77593, #77574.
11156
11157         * class.cs (MethodCore.CheckBase): Another if for operator.
11158
11159 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11160
11161         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11162         were not resolved
11163
11164         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11165         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11166         conversion test.
11167         
11168         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11169         not needed.
11170
11171         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11172         Updated after another emitcontext usage was clean up. It should help us to
11173         synchronize with gmcs easier.
11174
11175 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11176
11177         A fix for #77353.
11178
11179         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11180         (Event.Define): ditto
11181         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11182
11183         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11184         Removed redundant code and set NewSlot for Invoke method too.
11185
11186         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11187         (Parameters.MergeGenerated): New method. Use this method when you merge
11188         compiler generated argument with user arguments.
11189
11190 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11191
11192         * attribute.cs (ResolveAsTypeTerminal): Removed.
11193
11194         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11195         specialization for predefined types; 30% speed up.
11196         Finally placed obsolete check to right place.
11197         (Expression.ResolveType): Removed.
11198
11199         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11200         Updated after ResolveType was removed.
11201
11202         * expression.cs (Cast.ctor): Check void cast.
11203         (Binary.ResolveAsTypeTerminal): Is never type.
11204         (Conditional.ResolveAsTypeTerminal): Is never type.
11205
11206         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11207
11208 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11209
11210         Fix #77679.
11211         * expression.cs (ParameterReference.DoResolveBase): Change return
11212         type to bool.
11213         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11214         Update.
11215
11216         Fix #77628.
11217         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11218
11219         Fix #77642.
11220         * typemanager.cs (GetFullNameSignature): Don't nullref on
11221         protected accessors.
11222
11223 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11224
11225         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11226         these two separated members to simplify the code.
11227         (Attribute.Resolve): Refactored to use new fields and methods.
11228         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11229         implemented obsolete attribute checking.
11230         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11231         implemented obsolete checking again. It look line never ending quest ;-)
11232         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11233
11234         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11235
11236         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11237
11238         *class.cs (Property.Define): Add RegisterProperty call.
11239
11240         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11241         argument groups (only 2).
11242
11243         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11244         encoding expression to arguments.
11245         (Expression.ExprClassToResolveFlags): Just turned to property.
11246
11247         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11248         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11249         optimized as well as implemented support for zero-length attributes.
11250
11251         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11252         Add caching of PropertyInfo's.
11253
11254 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11255
11256         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11257         error multiple times.
11258
11259 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11260
11261         New partial class implementation.
11262         A fix for #77027, #77029, #77403
11263
11264         * attribute.cs (Attributable): Made attributes protected.
11265
11266         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11267         the replacements of ClassPart and PartialContainer.
11268         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11269         (TypeContainer.AddInterface): Ditto.
11270         (TypeContainer.AddPartial): The main method for partial classes. It checks
11271         for errors and merges ModFlags and attributes. At the end class is added to
11272         partial_parts list.
11273         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11274         required here.
11275         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11276         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11277         from the rest of partial classes.
11278         (TypeContainer.GetClassBases): Simplified.
11279         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11280         DefineType.
11281         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11282         (TypeContainer.HasExplicitLayout): Uses Flags now.
11283         (PartialContainer): Removed.
11284         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11285         (StaticClass): Was merged with Class.
11286         (Class.GetClassBases): class and static class bases are verified here.
11287         (Class.TypeAttr): Added static attributes when class is static.
11288         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11289         (MemberBase): In some cases we need to call parent container for partial
11290         class. It should be eliminated but it's not easy now.
11291
11292         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11293
11294         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11295         partial classed to accumulate class comments.
11296         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11297
11298         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11299
11300         * driver.cs (MainDriver): Tree.GetDecl was removed.
11301
11302         * modifiers.cs (Modifiers): Add partial modifier.
11303
11304         * tree.cs (Tree.decl): Removed.
11305         (RootTypes): Started to use this class more often for root types
11306         specializations.
11307
11308 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11309
11310         A fix for #77615
11311
11312         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11313         external interface does not have an attribute.
11314
11315 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11316
11317         Another prerequisites for new partial classs implementation.
11318         
11319         * attribute.cs (Attribute.Equal): Implemented.
11320         (Attribute.Emit): Changed as attributes can be applied more than twice.
11321         (Attributes.Emit): Check for duplicate attributes here.
11322
11323         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11324         as a parameter, clean-up.
11325
11326 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11327
11328         A fix for #77485
11329
11330         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11331         contains obsolete attribute check which can in some cases look for base
11332         type of current class which is not initialized yet.
11333         (TypeContainer.BaseType): Replacement of ptype.
11334
11335         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11336
11337 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11338
11339         First of prerequisites for new partial classs implemention.
11340         
11341         * attribute.cs (Attributable): Extended by ResolveContext;
11342         Attributes finally have correct context for resolving in all cases.
11343         (AttachTo): Attribute owner is assigned here.
11344
11345         * codegen.cs (IResolveContext): Introduce new interface to hold
11346         all information needed in resolving phase.
11347         (EmitContext): Implements IResolveContext; more clean-up needed here.
11348         
11349         * decl.cs (MemberCore): Implemented IResolveContext.
11350
11351         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11352         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11353         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11354         Refactored to use new IResolveContext instead of EmitContext; cleanup
11355
11356 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11357
11358         * codegen.cs (EmitScopeInitFromBlock): check here the
11359         capture_context, there is no need to make two calls to the
11360         EmitContext. 
11361
11362         * anonymous.cs: Add some debugging messages that might help me
11363         track other instances of this problem in the future (the
11364         regression of test 467).
11365
11366         * cs-parser.jay: track the variable block, as we need to initalize
11367         any captured variables declared in this block for the "catch"
11368         portion of the "Try" statement.
11369
11370         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11371         scope initialization for captured variables. 
11372
11373         Also, move the emit for the variables after the block location has
11374         been marked.
11375
11376 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11377
11378         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11379
11380 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11381
11382         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11383         commit yesterday, the initialization for the roots is necessary.
11384         What is not necessary is the scope activation.
11385
11386 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11387
11388         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11389         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11390         CS0206 checks.
11391         (Argument.Resolve): Remove CS0206 checks.
11392
11393 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11394
11395         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11396         scopes for all the roots, the scopes will now be emitted when the
11397         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11398
11399         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11400         code.  This reduces a lot of existing cruft.
11401         
11402         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11403         that the ScopeInfo is generated as we enter the scope, not at the
11404         time of use, which is what we used to do before.
11405
11406         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11407         every time a Block is about to be emitted if we have a
11408         CaptureContext. 
11409
11410 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11411
11412         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11413         (Reset): Update.
11414         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11415
11416         * typemanager.cs (cons_param_array_attribute): Make private.
11417         (Reset): Set it to null.
11418         (InitCoreHelpers): Don't initialize it.
11419         (ConsParamArrayAttribute): New.  Initialize it as needed.
11420         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11421
11422 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11423
11424         * expression.cs: There might be errors reported during the
11425         selection of applicable methods.  If there are errors, do not
11426         continue execution as it will lead the compiler to crash.
11427
11428 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11429
11430         * expression.cs: Member access is not allowed on anonymous
11431         methods.  Fixes #77402.
11432
11433 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11434
11435         Fix #77401
11436         * cs-parser.jay (VariableDeclaration): Don't set
11437         current_array_type to null.
11438         (field_declaration, event_declaration, declaration_statement):
11439         Set it to null here.
11440
11441 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11442
11443         * typemanager.cs (GenericParameterPosition): New.
11444         * doc.cs: Use it.
11445
11446 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11447
11448         * doc.cs : To process "include" elements, first we should create
11449           another list than XmlNodeList, because it could result in node
11450           removal, which could result in that the XmlNodeList gives up
11451           yielding next node.
11452
11453           (Also made code identical to gmcs again.)
11454
11455 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11456
11457         * ecore.cs: Introduce an error report that we were not catching
11458         before, if not silent, we must report the error.  Gonzalo ran into
11459         it.
11460
11461 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11462
11463         A fix for bug: #76957
11464         
11465         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11466         ComputeMethodHost before creating the method, this is a new
11467         requirement. 
11468
11469         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11470         that this method references (RegisterScope).  The actual scope
11471         where the method is hosted is computed with the ComputeMethodHost
11472         before we create the method.
11473
11474         Moved the Deepest routine here.
11475
11476         (AnonymousContainer.ComputeMethodHost): New routine used to
11477         compute the proper ScopeInfo that will host the anonymous method.
11478
11479         (ScopeInfo): Deal with multiple roots.  The problem was that we
11480         did not have a unique root where all ScopeInfos could be hanged
11481         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11482         of roots.  
11483
11484         Remove AdjustMethodScope which is now computed at the end.  Remove
11485         LinkScope which did a partial link, instead link all ScopeInfos
11486         before code generation from the new "LinkScopes" routine. 
11487
11488         Simplify all the Add* routines as they no longer need to maintain
11489         the tree, they just need to record that they are using variables
11490         from a ScopeInfo.
11491
11492         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11493         routines to produce the forest of ScopeInfo trees.
11494
11495         * class.cs (TypeContainer.AppendMethod): This is just like
11496         AddMethod, but ensures that an interface implementation method
11497         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11498         methods, but at the end.
11499
11500         We use this functionality to ensure that the generated MoveNext
11501         method in the iterator class is resolved/emitted before the
11502         enumerator methods created.   
11503
11504         This is required because the MoveNext method computes the right
11505         ScopeInfo for the method.  And the other methods will eventually
11506         need to resolve and fetch information computed from the anonymous
11507         method. 
11508
11509 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11510             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11511
11512         Fix rest of #76995.
11513         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11514         the 'aliases' hash.
11515         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11516         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11517
11518 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11519
11520         Fix #76656, cs0231-2.cs.
11521         * cs-parser.jay (formal_parameter_list): Make error case catch
11522         more issues.
11523         (parenthesized_expression_0): Add CS1026 check.
11524         (invocation_expression): Remove unused { $$ = lexer.Location }.
11525
11526 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11527
11528         Fix #76824.
11529         * cs-parser.jay (statement_expression): Don't list out the
11530         individual statement-expressions.  Convert syntax error into
11531         CS0201 check.
11532
11533 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11534
11535         Fix #76874.
11536         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11537         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11538         CheckIntermediateModification.
11539         (FieldExpr.DoResolve): Add new two-argument version that
11540         allows us to resolve the InstanceExpression as an lvalue.
11541         The one-argument variant is now just a wrapper.
11542         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11543         Resolve the lhs as an lvalue if the it has a value type.
11544         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11545         from Assign.DoResolve.
11546         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11547         resolved as an lvalue.
11548         (PropertyExpr.DoResolve): Update.
11549         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11550         has a value type.  Move CS1612 check here from
11551         CheckIntermediateModification.
11552         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11553         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11554         'right_side' of a ResolveLValue on an 'out' argument.
11555         (EmptyExpression.LValueMemberAccess): New.  Used as the
11556         'right_side' of a propagated ResolveLValue on a value type.
11557         (LocalVariableReference.DoResolveBase): Recognize
11558         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11559         Add CS1654 check.
11560         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11561         EmptyExpression.Null.
11562
11563 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11564
11565         * typemanager.cs : added IsGenericParameter(). In mcs it always
11566           return false.
11567         * doc.cs : for generic parameters, use GenericParameterPosition,
11568           not FullName.
11569
11570 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11571
11572         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11573
11574 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11575
11576         This fixes the problem where we used ldfld instead of ldflda to
11577         load the "THIS" pointer on captured parameters, when THIS is a
11578         value type.  See bug #77205.
11579         
11580         * iterators.cs (CapturedThisReference.Emit): Pass false to
11581         EmitThis (we do not need the address).
11582
11583         * codegen.cs (EmitThis): it needs to know whether we need the
11584         address of `this' or not.  This is used by value types.  
11585
11586         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11587         every other call passes false.
11588
11589 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11590
11591         Fix #77221.
11592         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11593         GetOverride.
11594         * expression.cs (Invocation.OverloadResolve): Update.
11595         (Invocation.DoResolve): Avoid double resolution of invocation.
11596
11597 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11598
11599         Fix #77180.
11600         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11601         unary negation of floating point types as 0-expr; negation cannot
11602         overflow in floating point types.
11603
11604         Fix #77204.
11605         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11606         on operands of 'void' type.
11607
11608         Fix #77200.
11609         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11610         and ExclusiveOr for boolean constants too.
11611
11612 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11613
11614         Fix #75636.
11615         * expression.cs (Invocation.OverloadResolve): Replace reflected
11616         override methods with their base virtual methods, rather than
11617         skipping over them.
11618         * typemanager.cs (TypeManager.GetOverride): New.
11619
11620 2006-01-05  Jb Evain  <jbevain@gmail.com>
11621
11622         * class.cs (Property.Define, Indexer.Define): do not tag the
11623         properties as SpecialName | RTSpecialName.
11624
11625 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11626
11627         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11628         doing a low-level comparission of parameter types.  It was lacking
11629         a check for __argslist. 
11630
11631 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11632
11633         * expression.cs (ParameterReference.DoResolveBase): Allow
11634         reference parameters if they are local to this block. 
11635
11636         This allows the ref and out parameters of a delegate to be used in
11637         an anonymous method, for example:
11638
11639         delegate void set (out int x);
11640
11641         set s = delegate (out int x){
11642                 x = 0;
11643         };
11644
11645         This is used by functionality introduced late in the C# language.
11646         
11647         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
11648         method that take ref and out parameters. 
11649
11650         Fixes #77119 which was a late change in the spec.
11651
11652 2005-12-23  Miguel de Icaza  <miguel@novell.com>
11653
11654         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
11655         parent if its the same scope.  Fixes #77060.
11656
11657 2005-12-21  Miguel de Icaza  <miguel@novell.com>
11658
11659         * driver.cs: Report the case of no source files and no -out:
11660         argument provided.
11661
11662 2005-12-20  Raja R Harinath  <rharinath@novell.com>
11663
11664         Fix #77035.
11665         * expression.cs (ComposedCast.GetSignatureForError): Define.
11666
11667 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11668
11669         Fix #76995
11670
11671         * namespace.cs (NamespaceEntry): Add extern_aliases as a
11672         ListDictionary, to contain the ExternAliasEntry entries (in
11673         addition to the NamespaceEntry.aliases hashtable). This field is
11674         shared between the original entry and its doppelganger (bodyless 
11675         copy of it).
11676         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
11677         extern_aliases field.
11678         (NamespaceEntry.Lookup): Move the IsImplicit check after the
11679         lookup in extern_aliases.
11680
11681 2005-12-16  Raja R Harinath  <rharinath@novell.com>
11682
11683         Fix #77006.
11684         * class.cs (TypeContainer.Mark_HasEquals): New.
11685         (TypeContainer.Mark_HasGetHashCode): New.
11686         (ClassPart): Override them.
11687         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
11688
11689         Fix #77008.
11690         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
11691         'parent' argument to the base constructor.
11692
11693         Remove all mention of TypeContainer from decl.cs.
11694         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
11695         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
11696         (DeclSpace.DeclSpace): Likewise.
11697         (DeclSpace.DefineMembers): Remove unused argument.
11698         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
11699         debugging check -- we don't care if the debug code throws an
11700         InvalidCastException instead of an InternalErrorException.
11701         * class.cs (TypeContainer.DefineMembers): Update to changes.
11702         (TypeContainer.DoDefineMembers): Likewise.
11703         (TypeContainer.GetMethods): Likewise.
11704         (PropertyMember.Define): Likewise.
11705         (MemberBase.Parent): New property that forwards to
11706         MemberCore.Parent, but ensures that we get a TypeContainer.
11707         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
11708         (RootContext.PopulateTypes): Likewise.  Remove special case code
11709         for !RootContext.StdLib: DefineMembers is idempotent.
11710
11711 2005-12-14  Miguel de Icaza  <miguel@novell.com>
11712
11713         * convert.cs (ExplicitConversionCore): Check the return value from
11714         ExplicitConversionCore which can return null on failure.  Fixes #76914
11715
11716 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
11717
11718         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
11719
11720 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
11721
11722         * doc.cs : The search for referenced namespace was insufficient to
11723           get global one as it used to do. Fixed bug #76965.
11724
11725 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
11726
11727         * doc.cs : check name in cref in the last phase that whether it is
11728           namespace or not.
11729
11730 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11731
11732         * cs-tokenizer.cs : reverted the latest change: it somehow broke
11733           Mono.C5.
11734
11735 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11736
11737         * doc.cs : so it turned out that we cannot skip override check for 
11738           interface members. Fixed bug #76954.
11739
11740 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11741
11742         * cs-tokenizer.cs : fixed bug #75984:
11743           - #warning and #error should not be handled when the source line
11744             is disabled.
11745           - #line is not checked strictly when the source line is disabled.
11746           - #define and #undef is on the other hand checked strictly at any
11747             state.
11748
11749 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
11750
11751         * cs-tokenizer.cs : missing Location (actually, filename) in one of
11752           CS1027 report.
11753
11754 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11755
11756         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
11757
11758         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
11759         event initializers.
11760         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
11761         (FieldBase.Initializer): Initializer is now optional.
11762         (EventField.Define): Only event field can have initializer.
11763
11764         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
11765
11766         * const.cs (Const): Reuse initializer.
11767
11768         * cs-parser.jay: Updated after FieldBase changes.
11769         Added current_array_type to simplify array initializers.
11770
11771         * ecore.cs (NullCast.IsDefaultValue): Implemented.
11772
11773         * expression.cs, iterators.cs: Updated.
11774
11775         * namespace.cs (NamespaceEntry): Made UsingFound private.
11776
11777 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11778
11779         * parameterCollection.cs: Obsolete, removed.
11780         * parser.cs: Obsolete, removed.
11781
11782 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11783
11784         Fix #76849.
11785         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
11786
11787         * enum.cs (Enum.Define): Set obsolete context here.
11788
11789 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11790
11791         * doc.cs :
11792           - FindDocumentedMember() now expects 1) paramList as null
11793             when "we don't have to check the number of parameters" and
11794             2) Type.EmptyTypes when "there is no arguments".
11795           - Introduced FoundMember struct to hold the exact type which was
11796             used to find the documented member (the above change broke
11797             test-xml-044; it might be better just to use DeclaringType than
11798             what MS does, like this change does, but it depends on usage.)
11799
11800 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11801
11802         * doc.cs : documented member might be from DeclaringType for nested
11803           types. Fixed bug #76782.
11804
11805 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
11806
11807         * anonymous.cs: Have the param code handle leaving copies on the
11808         stack etc. Allows anonymous params to take part in the assignment
11809         code (++, +=, etc). Fixes bug #76550
11810
11811         * expression.cs: Handle the prepare_for_load/leave_copy by passing
11812         it down to the anon code.
11813
11814         * iterators.cs: Use dummy var here
11815
11816         * codegen.cs: Handle new vars
11817
11818 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11819
11820         Fix #76849.
11821         * class.cs (MethodData.Define): Set proper Obsolete context.
11822
11823         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
11824         obsolete context.
11825         (FieldExpr.DoResolve): Ditto.
11826
11827 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11828
11829         Fix #76849.
11830         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
11831         parent is not obsolete.
11832
11833 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
11834
11835         * doc.cs : (FindDocumentedMember) find parameterless members first
11836           and get CS0419 in the early stage. Fixed first case of bug #76727.
11837
11838 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
11839
11840         Fix #76859.
11841         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
11842         no error was reported.
11843
11844         *expression.cs (Binary.DoResolve): left can be null.
11845
11846 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
11847
11848         Fix #76783.
11849         * class.cs (MethodData.Emit): Parameters should be labeled first.
11850
11851 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
11852
11853         Fix #76761.
11854         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
11855
11856 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
11857
11858         * attribute.cs (AreParametersCompliant): Moved to Parameter.
11859
11860         * class.cs (MethodCore): Parameter clean up.
11861         (IMethodData): Added ParameterInfo.
11862         (MethodData): Parameter clean up.
11863         (Indexer.Define): Parameter clean up.
11864
11865         * anonymous.cs,
11866         * codegen.cs,
11867         * cs-parser.jay,
11868         * decl.cs,
11869         * doc.cs,
11870         * ecore.cs,
11871         * flowanalysis.cs,
11872         * iterators.cs,
11873         * pending.cs,
11874         * statement.cs,
11875         * typemanager.cs: Parameter clean up.
11876
11877         * delegate.cs (Define): Get rid of duplicated code.
11878
11879         * expression.cs (ParameterReference): Removed useless parameters
11880         and simplified.
11881         (Invocation): Ditto.
11882
11883         * parameter.cs (ParamsParameter): New class, params specialization.
11884         (ArglistParameter): Attemp to separate arglist.
11885         (Parameter): Refactored to be reusable and faster.
11886         (Parameter.Modifier): Made understandable.
11887         (Parameters): Changed to be used as a class for `this' assembly
11888         parameters. Refactored to use new specialized classes.
11889
11890         * support.cs (ParameterData): Added Types property.
11891         (InternalParameters): Deleted.
11892
11893 2005-08-20  Martin Baulig  <martin@ximian.com>
11894
11895         Merging this patch from GMCS to fix #75867.
11896
11897         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
11898         scope if we don't already have it.
11899
11900 2005-11-17  Martin Baulig  <martin@ximian.com>
11901
11902         * anonymous.cs
11903         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
11904         inherit the scope from our parent.  Fixes #76653.
11905
11906 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11907
11908         * doc.cs : the previous patch does not actually fix the bug.
11909           PropertyInfo override check is now implemented and really fixed it.
11910         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
11911
11912 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11913
11914         * doc.cs : apply "override filter" also to properties.
11915           Fixed bug #76730.
11916
11917 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11918
11919         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
11920           no need to check overrides. For classes, omit those results from 
11921           interfaces since they must exist in the class. Fixed bug #76726.
11922
11923 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11924
11925         * typemanager.cs : (GetFullNameSignature) differentiate indexers
11926           with different parameters. Fixed the second problem in #76685.
11927
11928 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11929
11930         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
11931           get expected 'protected' access in CheckValidFamilyAccess()).
11932           Fixed bug #76692.
11933
11934 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11935
11936         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
11937           Fixed bug #76705.  CS1569 was incorrectly commented out.
11938
11939 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11940
11941         * doc.cs : use Invocation.IsOverride() to do real override check.
11942         * expression.cs : made Invocation.IsOverride() internal.
11943
11944 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11945
11946         * doc.cs : use TypeManager.FindMembers() instead of (possible)
11947           TypeBuilder.FindMembers() and filter overriden base members out.
11948           Fixed bug #76990.
11949
11950 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11951
11952         * doc.cs : ref/out parameters are represented as '@' (instead of
11953           '&' in type FullName). Fixed bug #76630 (additionally crefs).
11954
11955 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11956
11957         * doc.cs : when there was no '.' in cref to methods in doc comment,
11958           then parameters were missing in the output. Fixed bug #76691.
11959
11960 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11961
11962         * driver.cs : don't output docs when there is an error.
11963           Fixed bug #76693.
11964
11965 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11966
11967         * doc.cs :
11968           Now it should detect indexers. Fixed primary concern in bug #76685.
11969           Fixed CS0419 message to not show the identical member signature in
11970           the message.
11971
11972 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
11973
11974         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
11975           instead of Type.FindMembers() since it does not handle events.
11976           Fixed bug #71604.
11977
11978 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
11979
11980         * codegen.cs: Fixed typo (speficied -> specified).
11981
11982 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
11983
11984         Fix #76369.
11985         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
11986
11987 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
11988
11989         * attribute.cs: Changed error message.
11990
11991         * cs-tokenizer.cs: One more check.
11992
11993 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
11994
11995         * statement.cs (Block.Resolve): Ignore empty statement.
11996
11997 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
11998
11999         * report.cs: Made error/warning methods more strict to avoid
12000         their misuse.
12001
12002         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
12003         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
12004         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
12005         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
12006
12007 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
12008
12009         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
12010         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
12011
12012         * class.cs (TypeContainer.IsComImport): New property.
12013         (Constructor.Define): Create proper ctor for ComImport types.
12014
12015         * expression.cs (New.CheckComImport): Fixed.
12016
12017 2005-11-07  Miguel de Icaza  <miguel@novell.com>
12018
12019         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
12020         that a parameter has been captured does not mean that we do not
12021         have to do the rest of the processing.  This fixes the second part
12022         of #76592.  If there was another anonymous method capturing
12023         values in the past, the Scope would never be set for the second
12024         method that captured the same parameter.
12025
12026         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
12027         properly manipulate the stack.   Second part of fix for #76592.
12028
12029         * expression.cs (New): Add support for invoking "new" on
12030         interfaces that have been flagged with the ComImport attribute and
12031         the CoClass.  Fixes #76637 
12032
12033         * statement.cs (Try.DoEmit): When a variable is captured, do not
12034         try to emit the vi.LocalBuilder variable as it has been captured.
12035         Create a temporary variable and store the results on the
12036         FieldBuilder.  Fixes #76642
12037
12038 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
12039
12040         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
12041
12042         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
12043
12044         * expression.cs (Binary.DoResolve): Added && optimalization.
12045     
12046         * typemanager.cs (AddUserType): Removed useless argument.
12047
12048 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12049
12050         * statement.cs (Block.variables): Uses ListDictionary.
12051
12052 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12053
12054         Fix #75969.
12055         * class.cs (PartialContainer.EmitType): Customized to emit
12056         security attributes.
12057         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12058         for partial classes.
12059
12060 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12061
12062         Fix #76599.
12063         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12064         access has to be fixed.
12065         
12066         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12067
12068 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12069
12070         Fix #76590.
12071         * ecore.cs (NullCast.Reduce): Implemented.
12072
12073         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12074         constant type.
12075         
12076         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12077         properly.
12078         (Foreach.Resolve): Catch null properly.
12079
12080 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12081  
12082         * cs-tokenizer.cs: Warning text fix.
12083
12084         * driver.cs: AllWarningNumbers exposed on public interface.
12085
12086         * report.cs (): Reviewed warning numbers.
12087         (IsValidWarning): Use binary search.
12088
12089 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12090  
12091         * driver.cs: Implemeted resource visibility.
12092         (Resources): New class for code sharing between /res: and
12093         /linkres:
12094  
12095 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12096
12097         Fix #76568.
12098         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12099         folding.
12100         
12101         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12102         contants only.
12103         
12104         * ecore.cs (NullCast): Child is contant only.
12105         
12106         * literal.cs (NullLiteral.Reduce): null can be converted to any
12107         reference type.
12108
12109 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12110
12111         * driver.cs: Use Encoding.Default as default code page instead
12112           of ISO-28591.
12113
12114 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12115
12116         Fix #76085.
12117         * expression.cs (Invocation.Error_InvalidArguments): Handle
12118         __arglist parameters.
12119         (Invocation.VerifyArgumentsCompat): Likewise.
12120         * support.cs (ReflectionParameters.GetSignatureForError): Print
12121         __arglist parameters.
12122         (InternalParamters.GetSignatureForError): Likewise.
12123         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12124
12125 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12126
12127         * attribute.cs (GetPropertyValue): Made public.
12128
12129         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12130         Resolve.
12131         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12132         attribute.
12133         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12134         is not defined.
12135         
12136         * driver.cs: Reflect method name change.
12137         
12138         * statement.cs (Try.Resolve): Warn when try has both general
12139         exception handlers.
12140         
12141         * typemanager.cs: runtime_compatibility_attr_type new predefined
12142         type.
12143
12144 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12145
12146         Fix #76419.
12147         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12148         treat it as an empty parameter list.
12149
12150 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12151
12152         Fix #76271.     
12153         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12154         ResolveAsTypeStep silent.
12155         * statement.cs (Block.AddConstant): Mark block as used.
12156         (Block.ResolveMeta): Avoid piling on error messages
12157         if a constant initializer resolution fails.
12158
12159 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12160
12161         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12162         Remove.
12163         (NamespaceEntry.VerifyAllUsing): New.
12164         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12165         behaviour.  Delegates actual resolution of alias to ...
12166         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12167         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12168         Update.
12169         * driver.cs (Driver.MainDriver): Update.
12170         
12171         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12172         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12173         property.
12174         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12175         Remove.
12176         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12177         RootNamespace.DefineNamespacesForAll.
12178
12179 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12180
12181         * typemanager.cs (assemblies, external_aliases, modules)
12182         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12183         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12184         overhead.  Move resposibility ...
12185         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12186         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12187
12188 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12189
12190         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12191         cached_namespaces.  Improve usage.
12192         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12193         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12194         Move from GlobalRootNamespace and simplify.
12195         (RootNamespace.Global): Make instance variable.
12196         (RootNamespace.RootNamespace): Add "alias name" parameter.
12197         (GlobalRootNamespace): Simplify drastically.
12198         (Namespace.Lookup): Don't use GetNamespace.
12199         * typemanager.cs (GetRootNamespace): Rename from
12200         ComputeNamespaceForAlias.
12201         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12202
12203 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12204
12205         * anonymous.cs (AnonymousContainer): Don't crash when container
12206         doesn't exist.
12207
12208 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12209
12210         * expression.cs (Binary.DoResolve): Warn when comparing same
12211         values.
12212
12213 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12214
12215         Fix #76486.
12216         * expression.cs (Binary.DoResolve): It looks like there are no
12217         convetsion rules in enum context.
12218
12219 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12220
12221         Add support for extern alias qualifiers.
12222         * typemanager.cs: Move some LookupTypeReflection code
12223         to namespace.cs, to have cleaner code. Added some methods
12224         to help us keep track of the extern aliased references.
12225         * driver.cs: Add suport for extern alias assemblies on command
12226         line and check for their warnings/errors. Also keep track of the
12227         extern aliased assemblies.
12228         * namespace.cs: Move the global functionality of Namespace
12229         to GlobalRootNamespace/RootNamespace. Now the global namespace
12230         is GlobalRootNamespace.Globa. Also the code moved from 
12231         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12232         Finally added LocalAliasEntry (AliasEntry before) and
12233         ExternAliasEntry, to handle alias statements.
12234         * cs-parser.jay: Add support in the grammar for extern alias
12235         statement.
12236         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12237         Update callings to Namespace (now in GlobalRootNamespace).
12238
12239 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12240
12241         Fix #76371.
12242         * class.cs (TypeContainer.DefineType): Move updating of
12243         topological sort earlier in the code.
12244         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12245
12246 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12247
12248         Fix #76273.
12249         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12250         
12251         * constant.cs (Constant.TryReduce): Moved from Cast class.
12252         (Reduce): Made little bit more OO and fixed missing conversions.
12253         
12254         * ecore.cs (Reduce): Implemented.
12255         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12256         
12257         * literal.cs (Reduce): Implemented.
12258         
12259         * class.cs: Reverted Miguel's wrong commit.
12260
12261 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12262
12263         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12264
12265 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12266
12267         * cs-parser.jay, expression.cs : CS0214 was missing error location
12268           for constants. Fixed bug #76404.
12269
12270 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12271
12272         Fix #76370.
12273         * convert.cs (ExplicitConversionCore): Fixed object->enum
12274         conversion.
12275
12276 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12277
12278         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12279         InstanceExpression.
12280         (PropertyExpr.EmitCall): Likewise.
12281         * expression.cs (Invocation.EmitArguments): Handle case where
12282         arguments == null.
12283         (Invocation.EmitCall): Avoid allocating temporary variable if
12284         there are no arguments.
12285
12286 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12287
12288         Fix #76323.
12289         * convert.cs (ImplicitConversionStandard): Move conversion of
12290         void* to arbitrary pointer types ...
12291         (ExplicitConversionStandard): .. here.
12292         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12293         error to always print typenames.
12294
12295 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12296
12297         * convert.cs (GetConversionOperator): Rename from
12298         GetConversionOperators.  Move operator selection code from ...
12299         (UserDefinedConversion): ... here.
12300
12301 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12302
12303         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12304         conversion.
12305
12306 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12307
12308         * assign.cs (Assign.DoResolve): Error method changed.
12309
12310         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12311         
12312         * const.cs (ResolveValue): Reset in_transit immediately.
12313         
12314         * constant.cs: Error method changed.
12315         
12316         * convert.cs: Removed useless location parameter.
12317         (ExplicitNumericConversion): Don't do double enum check.
12318         (ExplicitConversionCore): Renamed from ExplicitConversion.
12319         (ExplicitUnsafe): Extracted from ExplicitConversion.
12320         (ExplicitConversion): Uses for error reporting.
12321         
12322         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12323         error messages.
12324         (ResolveBoolean): Uses common error method.
12325         (CastToDecimal): Get rid of ec.
12326         (CastFromDecimal): Optimized.
12327         (ConvCast): Get rid of ec.
12328         
12329         * enum.cs (ResolveValue): Reset in_transit immediately.
12330         (Emit): Return after first error.
12331         
12332         * expression.cs: Convert changes.
12333         
12334         * literal.cs: Error method changed.
12335         
12336         * statement.cs: Error method changed.
12337
12338 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12339
12340         * support.cs (SeekableStreamReader.Position): Don't error out when
12341         the requested position is just beyond the end of the current
12342         buffered data.
12343
12344 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12345
12346         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12347         try to keep in sync with the byte count of the underlying Stream.
12348         However, this limits us to a window size of 2048 characters: i.e.,
12349         the maximum lookahead of our lexer/parser can be 2048 characters.
12350
12351 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12352
12353         Fix #76255.
12354         * driver.cs: Fix compilation files with full root path.
12355
12356 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12357
12358         * report.cs (SymbolRelatedToPreviousError): Format the output so
12359         it does not use an open parenthesis that is never closed. 
12360
12361         * driver.cs: Follow coding guidelines
12362
12363 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12364
12365         Fix #72930.
12366         * const.cs (Const.ResolveValue): Check for assigning non-null
12367         value to reference type.
12368
12369 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12370
12371         * anonymous.cs: Implemented ExprClassName.
12372         
12373         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12374         delegate.
12375         
12376         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12377         check.
12378         
12379         * class.cs (StaticClass.DefineContainerMembers): Report protected
12380         members as error.
12381         
12382         * codegen.cs: if(ed) PRODUCTION.
12383         
12384         * convert.cs (Error_CannotImplicitConversion): Better error
12385         distinction.
12386         
12387         * cs-parser.jay: More error checks.
12388         
12389         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12390         
12391         * driver.cs (CSCParseOption): Enabled wrong option check.
12392         
12393         * ecore.cs (Expression.ExprClassName): Turned to property.
12394         (MemberExpr.CheckIntermediateModification): For checking boxed
12395         value types     modification.
12396         
12397         * statement.cs (Fixed.Resolve): Expression type must be
12398         convertible to fixed type.
12399         (CollectionForeach.GetEnumeratorFilter,TryType):
12400         Small refactoring for easier error checking.
12401
12402 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12403
12404         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12405         attributes.
12406         
12407         * class.cs (GeneratedBaseInitializer): New class for customization
12408         compiler generated initializers.
12409         (MemberBase.DoDefine): Check Obsolete attribute here.
12410         (FieldMember.DoDefine): Ditto.
12411         
12412         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12413         constants.
12414         
12415         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12416         (MemberCore.GetObsoleteAttribute): Removed argument.
12417         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12418         (MemberCore.CheckObsoleteType): New helper.
12419         
12420         * delegate.cs,
12421         * enum.cs,
12422         * statement.cs: Updates after MemberCore changes.
12423         
12424         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12425         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12426         
12427         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12428         obsolete attribute for compiler construct.
12429         (As.DoResolve): Cache result.
12430         
12431         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12432
12433 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12434
12435         Fix #76133.
12436         * expression.cs (This.VerifyFixed): In a value type T, the type of
12437         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12438         value type R, 'this' is treated as a value parameter.
12439
12440 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12441
12442         * statement.cs (Lock): Use the TemporaryVariable class instead of
12443         manually using local variables as those do not work when variables
12444         are captured.
12445
12446         * ecore.cs: Moved the TemporaryVariable class from being a nested
12447         class inside Foreach to be a public class that can be employed in
12448         other places. 
12449
12450 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12451
12452         * cs-parser.jay: interface_accessors replaced by
12453         accessor_declarations.
12454
12455         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12456         location.
12457         
12458         * statement.cs (GotoCase.Resolve): Convert null constant to
12459         null case.
12460         (SwitchLabel.ResolveAndReduce): Ditto.
12461         (SwitchLabel.NullStringCase): Custom null stamp.
12462         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12463         
12464         typemanager.cs (CSharpSignature): Don't skip first argument
12465         for full names.
12466
12467 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12468
12469         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12470
12471         * location.cs (InEmacs): in this mode, do not report column
12472         location as it confuses Emacs.
12473
12474 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12475
12476         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12477         expression.cs, iterators.cs, literal.cs: Store constants and
12478         literals location.
12479         
12480         * class.cs (MemberBase.ShortName): Pass location.
12481         
12482         * cs-parser.jay: Some location fixes.
12483         
12484         * ecore.cs (Expression.Location): Made virtual.
12485
12486 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12487
12488         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12489         if the underlying types are the same, otherwise we need to produce
12490         code that will do the proper cast.
12491
12492         This was exposed by Marek's constant rewrite which produced
12493         invalid code for the call site:
12494
12495         enum X : long { a }
12496         void Method (X v) {}
12497
12498         Method ((X) 5)
12499
12500         This fixes test-49.cs
12501
12502 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12503
12504         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12505           Type/Object should be allowed as well. Fixed bug #75968.
12506
12507 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12508
12509         * expression.cs : (Binary.DoResolve): when one is enum constant and
12510           another is constant 0, then return enum one *as enum type*.
12511           Fixed bug 74846.
12512
12513 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12514
12515         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12516         internal.
12517
12518         Fix #75941.
12519         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12520         flow-branching for LocalVariableReferences in case we were invoked
12521         from a MemberAccess.
12522         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12523         Carved out of ...
12524         (LocalVariableReference.DoResolveBase): ... this.
12525         (MemberAccess.Resolve): Do the check that was disabled during
12526         SimpleNameResolve.
12527
12528 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12529
12530         * class.cs :
12531           (PartialContainer.Create): check abstract/sealed/static strictly
12532           but abstract/sealed can exist only at one side. Fixed bug #75883.
12533
12534 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12535
12536         Fix #75945.
12537         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12538         specified, don't default to UnmanagedType.I4.
12539
12540 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12541
12542         * expression.cs : conditional operator should check possibly
12543           incorrect assign expression. Fixed bug #75946.
12544
12545 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12546
12547         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12548           Reverting the change. gmcs is much complex than mcs on this matter.
12549
12550 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12551
12552         * cs-tokenizer.cs : To read another token ahead of the actual 
12553           consumption, use new SavedToken and cache token instead of moving
12554           back the stream with SeekableStreamReader (it seemed problematic).
12555         * cs-parser.jay,
12556           driver.cs : Thus use StreamReader directly.
12557         * support.cs : Thus removed SeekableStreamReader.
12558
12559 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12560
12561         Fix #75934.
12562         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12563         (ScopeInfo.EmitScopeType): Use it to construct field names from
12564         names of captured locals.
12565
12566         Fix #75929.
12567         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12568         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12569         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12570         (ExplicitConversion): Remove enum cases already handled by
12571         implicit conversion.  Move implicit conversion check to the beginning.
12572         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12573         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12574         Don't treat System.Enum as a struct.
12575
12576 2005-08-30  Jb Evain  <jbevain@gmail.com>
12577
12578         * attribute.cs: handles as expression in parameters.
12579
12580 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12581
12582         Fix #75802.
12583         * class.cs (TypeContainer.VerifyClsName): Don't use a
12584         PartialContainer when verifying CLS compliance.
12585         (AbstractPropertyEventMethod): Set Parent here, ...
12586         (PropertyMethod): ... not here.
12587
12588 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12589
12590         * attribute.cs : escaped attribute name should not be allowed to be
12591           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12592
12593 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12594
12595         Fix #75927.
12596         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12597         when converting a long constant to unsigned long.
12598         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12599         detect where IsApplicable and VerifyArgumentsCompat disagree.
12600
12601 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12602         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12603
12604         Fix #75848.
12605         * class.cs (TypeContainer.CanElideInitializer): New helper.
12606         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12607         can safely emitting the initializer of a field.
12608
12609 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12610
12611         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12612           allowed inside a switch (without loop). Fixed bug #75433.
12613
12614 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12615
12616         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12617         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12618
12619 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12620
12621         * driver.cs : kinda reverting the default encoding changes (not exact 
12622           revert since I noticed that "codepage:reset" might not work fine).
12623
12624 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12625
12626         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12627           Location. Now getter and setter store location correctly.
12628           (errors/cs0111-12.cs now reports the expected location.)
12629
12630 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12631
12632         * driver.cs : Use default encoding on the environment.
12633           Removed (now that) extra parameter for SeekableStreamReader.
12634         * support.cs : (SeekableStreamReader) third .ctor() argument for
12635           StreamReader is not required (always true). preamble size could
12636           be acquired in simpler and safe way.
12637
12638 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12639
12640         * cs-parser.jay: report CS0642 at warning level 3
12641           and report CS0642 for an if else statement also
12642           fixes bug #74745. Patch by John Luke (and a bit
12643           modified by me).
12644           Removed extra CS0642 warning check for "while",
12645           "for" and "fixed".
12646         * statement.cs: In Block.Resolve(), CS0642 check
12647           is reimplemented to check a sequence of an empty
12648           statement and a block.
12649
12650           Both fix bug #66777.
12651
12652 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
12653
12654         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
12655         detection until I fix it.
12656         
12657         * cs-tokenizer.cs: Changed error message.
12658         
12659         * cs-parser.jay: Fixed 2 error locations.
12660         
12661         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
12662         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
12663         properties.
12664         
12665         * enum.cs (GetSignatureForError): Fixed.
12666         
12667         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
12668         method detection.
12669         
12670         * class.cs,
12671         * typemanager.cs (RegisterProperty): Removed.
12672         
12673         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
12674
12675 2005-08-24  Raja R Harinath  <rharinath@novell.com>
12676
12677         Fix #75874.
12678         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
12679         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
12680
12681 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12682
12683         * expression.cs : tiny fix is required for not warning positive ulong.
12684           See test-441.cs.
12685
12686 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12687
12688         * expression.cs : add CS0652 check for constant and integral
12689           expression. Fixed bug #53974.
12690
12691 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12692
12693         * expression.cs : in DoNumericPromotions(), check if there is implicit
12694           conversion overload for string (to check CS0034). Fixed bug #52492.
12695
12696 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12697
12698         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
12699
12700 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12701
12702         * ecore.cs : report location when it is *not* Null.
12703
12704 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12705
12706         * codegen.cs,
12707           ecore.cs,
12708           flowanalysis.cs,
12709           expression.cs:
12710           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
12711           correctly. Fixed bug #75721.
12712
12713 2005-08-23  Raja R Harinath  <rharinath@novell.com>
12714
12715         * support.cs (SeekableStreamReader.Position): Avoid an expensive
12716         loop that performs 'min (pos, char_count)'.
12717
12718         Fix #75862.
12719         * expression.cs (Unary.ResolveOperator): Don't discard implicit
12720         converted value in Operator.OnesComplement.
12721
12722 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
12723
12724         * anonymous.cs: If the anon method is pulled into a helper class,
12725         it needs to be `internal' not `private'. Fixes runtime behavior on
12726         msft. bug #75704
12727
12728 2005-08-20  Martin Baulig  <martin@ximian.com>
12729
12730         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12731         scope if we don't already have it.
12732
12733         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
12734         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
12735         fixes #75867.
12736
12737 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
12738
12739         Fix #75803
12740         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
12741         is a partial class.
12742
12743 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
12744
12745         The big constants rewrite
12746         Fix #75746, #75685 and more
12747         As a side effect saved 1MB for MWF ;-)
12748         
12749         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
12750         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
12751         enum based for corlib compilation.
12752         
12753         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
12754         subtractions.
12755         
12756         * class.cs (FixedField.Define): Use ResolveAsConstant.
12757         
12758         * const.cs (IConstant): Interface constants and enums.
12759         (Const.ResolveValue): New method for constant resolvning.
12760         (ExternalConstant): Constants from imported assemblies.
12761         
12762         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
12763         conversion; like enums.
12764         (Constant.ToType): Converts this constant to different type.
12765         (Constant.Increment): Adds 1.
12766         
12767         * convert.cs (ImplicitConversionRequired): Simplified.
12768         
12769         * cs-parser.jay: Create EnumMember directly.
12770         
12771         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
12772         
12773         * doc.cs (GenerateEnumDocComment): Removed.
12774         
12775         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
12776         (ConvertIntLiteral): Removed.
12777         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
12778         
12779         * enum.cs (EnumMember): Implement IConstant.
12780         (Enum.IsValidEnumConstant): Removed.
12781         (Enum.GetNextDefaultValue): Removed.
12782         (Enum.FindMembers): Updated.
12783         (Enum.GenerateDocComment): Iterate enum members.
12784         
12785         * expression.cs (Cast.TryReduce): Handle enums correctly.
12786         (New.Constantify): Made public.
12787         (MemberAccess.DoResolve): Removed contant specific if(s).
12788         
12789         * literal.cs (NullLiteral): Implement new abstract methods.
12790         
12791         * statement.cs (GotoCase.Resolve): Use new constant methods.
12792         (SwitchLabel.ResolveAndReduce): Use new constant methods.
12793         
12794         * typemanager.cs (LookupEnum): Removed.
12795         (IsEnumType): Fixed to work with corlib.
12796         (RegisterConstant): Removed.
12797         (LookupConstant): Removed.
12798         (GetConstant): Changed to work with IConstant.
12799
12800 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
12801
12802         * location.cs : Fixed overflown (>255) column number.
12803
12804 2005-08-03  Raja R Harinath  <rharinath@novell.com>
12805
12806         First cut of the qualified-alias-member feature.
12807         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
12808         token.
12809         * cs-parser.jay (DOUBLE_COLON): New token.
12810         (namespace_or_type_name): Add rule for recognizing
12811         qualified-alias-members.
12812         (primary_expression): Likewise.
12813         (element_access): Allow QualifiedAliasMember as a possible
12814         type-bearing expression.
12815         (local_variable_type, local_variable_pointer_type): Likewise.
12816         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
12817         aliases in the current and enclosing namespace declarations.
12818         (NamespaceEntry.UsingAlias): Add CS0440 warning.
12819         * decl.cs (MemberName.is_double_colon): New.
12820         (MemberName.MemberName): Add new constructor for alias-member.
12821         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
12822         * expression.cs (QualifiedAliasMember): New expression type.
12823
12824 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12825
12826         * location.cs : it borked when no argument was specified.
12827
12828 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12829
12830         * location.cs : tiny ToString() format fix.
12831
12832 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12833
12834         * statement.cs : oops, it was missing.
12835
12836 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12837
12838         A set of fixes for precise line/column location.
12839
12840         * location.cs :
12841           "token" field now holds a file/line "delta", a line number offset 
12842           from the segment, and a column number. See also:
12843           http://lists.ximian.com/pipermail/mono-devel-list/2004-
12844           December/009508.html
12845           Removed static IsNull. Use instance IsNull property instead.
12846         * cs-tokenizer.cs :
12847           For some tokens it stores Location. For Identifier it stores
12848           LocatedToken which is a pair of string name and location.
12849           Column numbers are adjusted only at getChar().
12850         * report.cs :
12851           Use Location.ToString() for reporting (it now contains column).
12852         * cs-parser.jay :
12853           Largely modified to use LocatedToken instead of
12854           string (IDENTIFIER), and to acquire Location from some tokens.
12855         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
12856           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
12857           codegen.cs :
12858           Now MemberName holds Location. DeclSpace.ctor() receives Location
12859           as a parameter. Removed extra parameters to all derived classes.
12860           Replaced Location.IsNull() with instance property.
12861         * assign.cs, expression.cs :
12862           Added .ctor() overload that omits Location.
12863         * attribute.cs :
12864           Added "nameEscaped" flag that indicates the identifier was escaped
12865           in the source file. This fixes bug #57047.
12866
12867 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
12868
12869         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
12870         New method, looking for lo-case imported cls type.
12871
12872         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
12873         here.
12874
12875         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
12876
12877         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
12878
12879         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
12880         all_imported_types.
12881         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
12882
12883         Optimized to save 3.5 MB for SWF compilation.
12884
12885 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12886
12887         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
12888         (PartialContainer.Create): Moved logic AddToContainer.
12889         (PartialContainer.MarkForDuplicationCheck): Shares name.
12890         
12891         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
12892         place.
12893         
12894         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
12895         initialization.
12896         (Namespace.GetSignatureForError): New method.
12897         
12898         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
12899         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
12900
12901 2005-08-01  Raja R Harinath  <rharinath@novell.com>
12902
12903         Fix #75669.
12904         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
12905         member lookup rather than qualifier_type, since qualifier_type can
12906         be null.
12907
12908 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12909
12910         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
12911         enum member.
12912
12913 2005-07-31  Miguel de Icaza  <miguel@novell.com>
12914
12915         * statement.cs: Copy the local exception into the exception
12916         captured local.  Fixes 75674
12917
12918 2005-07-31  Raja R Harinath  <harinath@gmail.com>
12919
12920         Fix #75658.
12921         * expression.cs (Invocation.OverloadResolve): Don't report error
12922         CS1501 if error CS1502 has been reported.
12923         (New.DoResolve): Delegate CS1501 reporting to
12924         Invocation.OverloadResolve.
12925
12926         Fix #75656.
12927         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
12928         invariant-meaning-in-block property in an enclosing block if
12929         necessary.
12930
12931 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
12932
12933         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
12934         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
12935         (Switch.CheckSwitch): Just save 50kb for SWF.
12936
12937 2005-07-27  Martin Baulig  <martin@ximian.com>
12938
12939         * anonymous.cs (CaptureContext.AddField): Added
12940         `AnonymousContainer am' argument; compute its toplevel scope if
12941         it's not already computed.  Fixes #75649.
12942
12943 2005-07-26  Raja R Harinath  <rharinath@novell.com>
12944
12945         Fix #75628.
12946         * class.cs (Constructor.Emit): Reset block to null if the block
12947         resolve fails.
12948
12949 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
12950
12951         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
12952
12953 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
12954
12955         * class.cs (MethodData.Define): Check whether accessor implementing
12956         interface is public.
12957
12958         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
12959
12960 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
12961
12962         Fix #57245
12963         * namespace.cs (LookupType): Moved same type check to...
12964         
12965         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
12966         with the same name.
12967
12968 2005-07-21  Raja R Harinath  <rharinath@novell.com>
12969
12970         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
12971         already found a typebuilder.
12972         * class.cs (MethodCore.IsDuplicateImplementation): Compare
12973         MemberNames, not strings.
12974
12975         * const.cs (Error_ExpressionMustBeConst): 
12976         Rename from Error_EpressionMustBeConst.
12977         * const.cs, class.cs, statement.cd: Update.
12978
12979 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
12980
12981         Fix #65573
12982
12983         * const.cs (Const.LookupConstantValue): Report missing contant expression
12984         everytime.
12985         (Error_EpressionMustBeConstant): Only one error method.
12986
12987         * class.cs, statement.c: Updated.
12988
12989 2005-07-20  Raja R Harinath  <rharinath@novell.com>
12990
12991         * statement.cs (Block.Flags): Add back HasVarargs.
12992         (Block.flags): Make protected.
12993         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
12994
12995         * typemanager.cs (types, typecontainers, user_types): Remove.
12996         (UserTypes, TypeContainers): Likewise.
12997         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
12998         (CleanUp, Reset): Update.
12999         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
13000         (GetNestedType): Use Type.GetNestedType.
13001         (CoreLookupType): Take two arguments, the namespace and the
13002         basename of the type.  Update to use the Namespace.Lookup
13003         mechanism.
13004         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
13005         (RealMemberLookup): Use IsNestedChildOf instead of playing with
13006         string concatenation and substring matches.
13007         * class.cs, enum.cs, delegate.cs: Update to changes.
13008
13009 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
13010
13011         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
13012         Expression and made virtual.
13013
13014         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
13015         (ImplicitStandardConversionExists): Fixed `byte' typo ?
13016
13017         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
13018
13019         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
13020         error message.
13021
13022         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
13023         change.
13024
13025 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
13026
13027         Fix #57707
13028         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
13029         AssemblyCultureAttribute is not used on executable.
13030
13031         * rootcontext.cs,
13032         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
13033
13034 2005-07-16  Raja R Harinath  <rharinath@novell.com>
13035
13036         Fix #60638.
13037         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
13038         New.  Reports CS0252/CS0253.
13039         Mostly taken from preliminary patch by Duncak Mak.
13040         (Binary.DoResolveOperator): Store results of operator lookup.
13041         Use them to detect if we need to warn about unintended reference
13042         comparisons.
13043
13044 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13045
13046         Fix #72969.
13047         * namespace.cs (Namespace.Lookup): Add back location parameter.
13048         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13049         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13050
13051         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13052         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13053         (Namespace.LookupType): ... this.
13054         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13055         of namespaces.
13056         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13057         purported to handle pointers.
13058         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13059         CoreLookupType.
13060
13061 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13062
13063         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13064         type as namespace.
13065
13066 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13067
13068         * namespace.cs (Namespace.Lookup): Drop location parameter.
13069         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13070         (NamespaceEntry.Lookup): ... this.
13071         (NamespaceEntry.Error_AmbiguousTypeReference):
13072         Move here from DeclSpace.
13073         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13074         names ...
13075         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13076         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13077         Move to NamespaceEntry.
13078         * delegate.cs, expression.cs: Update to changes.
13079
13080 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13081
13082         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13083         CheckAttributeType and refactored.
13084         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13085         ResolveAsTypeTerminal error handling.
13086         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13087         handling.
13088         (GetSignatureForError): Print errors in same way.
13089
13090         * class.cs,
13091         * codegen.cs: Reflect attribute GetSignatureForError change.
13092
13093         * ecore.cs,
13094         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13095
13096         * namespace.cs (UsingEntry): Refactored to make fields private.
13097
13098         * assign.cs,
13099         statement.cs: Error_UnexpectedKind has extra parameter.
13100
13101 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13102
13103         * ecore.cs (IAlias): Remove.
13104         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13105         that implement the interface.
13106         * namespace.cs (Namespace): Likewise.
13107         (Namespace.declspaces): Renamed from 'defined_names'.
13108         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13109         DeclSpace instead of an IAlias.
13110         * tree.cs (Tree.AddDecl): Update.
13111
13112 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13113
13114         * statement.cs (Block.Flags); Remove HasVarargs.
13115         (Block.HasVarargs): Move to ToplevelBlock.
13116         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13117         (Block.Variables): Make protected.  Initialize variable hashtable
13118         if necessary.
13119         (Block.AddVariable): Update.
13120         (Block.Resolve): Update to changes.
13121         (ToplevelBlock.HasVarargs): New boolean.
13122         (ToplevelBlock.ThisVariable): Move here from Block.
13123         (ToplevelBlock.AddThisVariable): Likewise.
13124         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13125         * expression.cs (This.ResolveBase): Update to changes.
13126         (ArglistAccess.DoResolve): Likewise.
13127
13128 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13129
13130         Fix #75321
13131         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13132
13133         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13134         not used and not used & assigned.
13135         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13136
13137 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13138
13139         Fix #75053
13140         * expression.cs (Is.DoResolve): null is never provided type.
13141
13142 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13143
13144         Fix #52496
13145         * cs-parser.jay: Less strict event error rule to catch more errors.
13146
13147 2005-07-08  Martin Baulig  <martin@ximian.com>
13148
13149         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13150         gettter (allowed) or setter (not allowed).
13151
13152         * class.cs (Accessor): Implement IIteratorContainer.
13153         (Accessor.Yields): New public field.
13154         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13155         per-accessor basis.
13156
13157         * cs-parser.jay
13158         (get_accessor_declaration, set_accessor_declaration): Set the
13159         `yields' flag on the accessor, not the property.
13160         (property_declaration): Do the iterators check on a per-accessor
13161         basis and not for the whole property.
13162
13163 2005-07-08  Martin Baulig  <martin@ximian.com>
13164
13165         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13166         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13167
13168 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13169
13170         Fix #74975
13171         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13172         (ExtractSecurityPermissionSet): Cope with self referencing security
13173         attributes properly.
13174
13175         * driver.cs (SetOutputFile): Made public property OutputFile.
13176
13177 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13178
13179         Fix #75486.
13180         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13181         has_nonstatic_fields.  Make into a FieldBase pointer.
13182         (TypeContainer.AddField): Add CS0282 check.
13183         (TypeContainer.EmitType): Update.
13184
13185 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13186
13187         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13188         compare if they start with __.
13189
13190 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13191
13192         * statement.cs (Switch.SwitchGoverningType): Only look at
13193         UserCasts that don't need implicit standard conversions to one of
13194         the allowed switch types (Fixes test-322.cs).
13195         (LocalInfo.Resolve): Re-enable sanity-test.
13196
13197 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13198
13199         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13200         
13201         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13202         
13203         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13204
13205 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13206
13207         Fix #75472.
13208         * ecore.cs (SimpleName.GetSignatureForError): Add.
13209         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13210         (MemberAccess.GetSignatureForError): Add.
13211
13212 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13213  
13214         The big error and warning messages review.
13215         
13216         * anonymous.cs,
13217         * assign.cs,
13218         * attribute.cs,
13219         * class.cs,
13220         * codegen.cs,
13221         * convert.cs,
13222         * cs-parser.jay,
13223         * cs-tokenizer.cs,
13224         * decl.cs,
13225         * delegate.cs,
13226         * doc.cs,
13227         * driver.cs,
13228         * ecore.cs,
13229         * enum.cs,
13230         * expression.cs,
13231         * flowanalysis.cs,
13232         * iterators.cs,
13233         * literal.cs,
13234         * location.cs,
13235         * modifiers.cs,
13236         * namespace.cs,
13237         * parameter.cs,
13238         * pending.cs,
13239         * report.cs,
13240         * rootcontext.cs,
13241         * statement.cs,
13242         * support.cs,
13243         * tree.cs,
13244         * typemanager.cs: Updated.
13245         
13246         * class.cs: (MethodCore.SetYields): Moved here to share.
13247         (PropertyMethod.Define): Moved iterator setup here.
13248         
13249         * iterators.cs: Add orig_method to have full access to parent
13250         container.
13251
13252 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13253
13254         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13255         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13256         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13257         variable of struct type.
13258         * expression.cs (Unary.ResolveOperator): Update to change.
13259         (Indirection.VerifyFixed): Likewise.
13260         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13261         (ParameterReference.VerifyFixed): Value parameters are fixed.
13262         (This.VerifyFixed): Treat 'this' as a value parameter.
13263         * statement.cs (LocalInfo.IsFixed): Remove.
13264
13265 2005-07-01  Martin Baulig  <martin@ximian.com>
13266
13267         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13268         `ec.EmitThis ()' to get the correct scope.
13269
13270 2005-07-01  Martin Baulig  <martin@ximian.com>
13271
13272         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13273         instance is a ParameterReference; fixes #75299.
13274
13275 2005-07-01  Martin Baulig  <martin@ximian.com>
13276
13277         Reverted Marek's latest patch (r46725):
13278         - it contains structural changes which are neither mentioned in
13279           the ChangeLog nor explained anywhere; for example the additional
13280           argument of EmitContext's and Iterator's .ctor's and the
13281           TypeContainer.DefineMembers() change.
13282         - structural changes like this should go in in seperate patches
13283           and not be hidden in a huge patch which just seems to affect
13284           warnings and errors.
13285           a big and hard to understand patch.
13286         - it breaks iterators and causes regressions, for instance in
13287           test-iter-03.cs.      
13288
13289 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13290
13291         Fix #75412.
13292         * expression.cs (Indexers.map): Remove.
13293         (Indexers.Append): Filter out inaccessible setters and getters.
13294         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13295
13296         Fix #75283.
13297         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13298         Refactored from ...
13299         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13300         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13301         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13302         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13303
13304 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13305
13306         Fix #75322
13307         * class.cs (FieldBase.GetInitializerExpression): One more field
13308         for backup.
13309
13310 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13311
13312         * pending.cs: Do not define a proxy if the base method is virtual,
13313         it will be picked up by the runtime (bug 75270).
13314
13315 2005-06-08  Martin Baulig  <martin@ximian.com>
13316
13317         The big Iterators rewrite :-)
13318
13319         * iterators.cs: Rewrite this to use the anonymous methods framework.
13320
13321         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13322         before the TypeContainers; see 2test-21.cs.
13323
13324         * class.cs
13325         (TypeContainer.DefineType): Don't create a new EmitContext if we
13326         already have one (this only happens if we're an Iterator).
13327         (TypeContainer.Define): Also call Define() on all our iterators.
13328         (Method.CreateEmitContext): Added support for iterators.
13329
13330         * anonymous.cs
13331         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13332         (AnonymousContainer.CreateMethodHost): Moved here from
13333         AnonymousMethod and made abstract.
13334         (AnonymousContainer.CreateScopeType): New abstract method.
13335         (AnonymousContainer.IsIterator): New public property.
13336         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13337         get the ScopeTypeBuilder rather than manually defining it here. 
13338         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13339         iterators here.
13340
13341         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13342         before RootContext.DefineTypes().
13343
13344         * codegen.cs (EmitContext.RemapToProxy): Removed.
13345         (EmitContext.CurrentAnonymousMethod): Changed type from
13346         AnonymousMethod -> AnonymousContainer.
13347         (EmitContext.ResolveTopBlock): Protect from being called twice.
13348         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13349         (EmitContext.EmitThis): Removed the iterators hacks; use the
13350         anonymous methods framework for that.
13351
13352         * statement.cs
13353         (ToplevelBlock.Container): Make this a property, not a field.
13354         (ToplevelBlock.ReParent): New public method; move the
13355         ToplevelBlock into a new container.
13356         (Foreach.TemporaryVariable): Simplify.
13357
13358 2005-06-05  Martin Baulig  <martin@ximian.com>
13359
13360         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13361         (Block.AddTemporaryVariable): New public method; creates a new
13362         `LocalInfo' for a temporary variable.
13363         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13364         variables here.
13365         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13366         non-iterator variables.
13367
13368 2005-06-05  Martin Baulig  <martin@ximian.com>
13369
13370         * statement.cs (Foreach.TemporaryVariable): Create the
13371         LocalBuilder in the Emit phase and not in Resolve since in some
13372         situations, we don't have an ILGenerator during Resolve; see
13373         2test-19.cs for an example.
13374
13375 2005-06-04  Martin Baulig  <martin@ximian.com>
13376
13377         **** Merged r45395 from GCS ****
13378
13379         The big Foreach rewrite - Part II.
13380
13381         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13382         with `PropertyInfo ienumerator_getcurrent'.
13383
13384         * codegen.cs (VariableStorage): Removed.
13385
13386         * statement.cs
13387         (Foreach): Derive from Statement, not ExceptionStatement.
13388         (Foreach.CollectionForeach): New nested class.  Moved all the code
13389         dealing with collection foreach here.
13390         (Foreach.ForeachHelperMethods): Removed.
13391         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13392
13393 2005-05-23  Martin Baulig  <martin@ximian.com>
13394
13395         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13396         don't need to.  Fix #75014.
13397
13398 2005-05-20  Martin Baulig  <martin@ximian.com>
13399
13400         Merged r44808 from GMCS.
13401
13402         * class.cs (TypeContainer.CircularDepException): Removed.
13403         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13404         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13405         (CS0146) and interface (CS0529) dependencies here.
13406
13407 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13408
13409         * expression.cs (Invocation.EmitCall): Fix initialization
13410         'this_call' to reflect current behaviour.  Fix indentation.
13411
13412         * convert.cs (FindMostEncompassedType): Add two trivial special
13413         cases (number_of_types == 0 || number_of_types == 1).
13414         (FindMostEncompasingType): Likewise.
13415
13416 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13417
13418         Some cleanups preparing for the fix of #75283.
13419         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13420         error testing.
13421         (EventExpr.InstanceResolve): Likewise.
13422         (EventExpr.DoResolve): Remove redundant checks.
13423
13424 2005-06-10  Duncan Mak  <duncan@novell.com>
13425
13426         * cs-tokenizer.cs (process_directives): New flag for controlling
13427         the processing of preprocessor directives.
13428         (x_token): After seeing a '#', return Token.NONE instead of going
13429         to handle_preprocessing_directive() when not processing
13430         directives. This avoids unnecessary processing during the token peek in
13431         is_punct().
13432
13433         This fixes #74939.
13434
13435         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13436         the existing error reporting methods instead of Report.Error.
13437
13438         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13439         after Raja's rewrite.
13440
13441 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13442
13443         * class.cs: Small fix.
13444
13445 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13446
13447         Fix #75160.
13448         * class.cs (GetPartialBases): Fix return value check of
13449         part.GetClassBases.
13450
13451 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13452
13453         Ensure that partial classes are registered in their enclosing
13454         namespace.  Initial part of fix of #75160.
13455         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13456         Register declspace with namespace here, not in
13457         DeclSpace.RecordDecl.
13458         * cs-parser.jay: Pass namespace to RecordDecl.
13459         * class.cs (PartialContainer.Create): Likewise.
13460         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13461         called.
13462         * decl.cs (Declspace.RecordDecl): Remove.
13463         * namespace.cs (NamespaceEntry.DefineName): Remove.
13464
13465 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13466
13467         * rootcontext.cs: Reset TargetExt as well.
13468
13469 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13470
13471         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13472         -langversion:ISO-1.
13473
13474 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13475
13476         Fix #75080, cs0119.cs.
13477         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13478         of ...
13479         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13480         allowing ExprClass.Type and ExprClass.Namespace for
13481         ResolveFlags.VariableOrValue.
13482         (Expression.Resolve) [1-argument variant]: Change default resolve
13483         flags based on language version.
13484         (Expression.Error_UnexpectedKind): Use a simple string array
13485         rather than an ArrayList.
13486         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13487         not ExprClass.Type.
13488         (TypeOfVoid.DoResolve): Likewise.
13489         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13490         flags argument -- it always has the same value.
13491
13492 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13493
13494         Fix #75081.
13495         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13496         Use it in the error message.
13497         * assign.cs, expression.cs, statement.cs: Update.
13498
13499 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13500
13501         Fix #75088.
13502         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13503         the "almostMatchedMember" case too.
13504         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13505         that failed the accessibility checks to 'almost_match'.
13506
13507 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13508
13509         * attribute.cs: Use internal MethodBuilder methods to set
13510         ExactSpelling and SetLastError on PInvoke methods, instead
13511         of passing them via charset.  Fixes #75060.
13512
13513 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13514
13515         * parameter.cs (Parameter): Remove TODO comment.
13516         (Parameter.DefineParameter): Remove Location parameter.
13517         (Parameters.LabelParameters): Likewise.
13518         * class.cs (Constructor.Emit): Update to change.
13519         (MethodData.Emit): Likewise.
13520         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13521         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13522
13523 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13524
13525         * parameter.cs,
13526           Removed Parameters.Location and added Parameter.Location instead.
13527           Removed Location parameter from Emit() and GetSignature().
13528         * anonymous.cs,
13529           class.cs,
13530           cs-parser.jay,
13531           delegate.cs,
13532           iterators.cs,
13533           statement.cs :
13534           Modified all related calls.
13535
13536 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13537
13538         Improve user-defined conversion handling.
13539         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13540         applicable operators.
13541         (AddConversionOperators): New.  Helper for GetConversionOperators.
13542         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13543         there is only one most encompassed/encompassing type.
13544         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13545         "applicable operator" handling.
13546         (UserConversion): Move cache here from GetConversionOperators.
13547         Directly cache the chosen operator, rather than the whole
13548         MethodGroup.
13549         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13550         case.  Allow conversion of decimal to sbyte and byte too.
13551         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13552         New static methods.  Used to avoid allocating EmptyExpressions in
13553         convert.cs.
13554
13555 2005-05-24  Duncan Mak  <duncan@novell.com>
13556
13557         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13558         another class, used in Convert.ExplicitNumericConversion.
13559         (CastToDecimal): New class, similar to above, but casts to
13560         System.Decimal, used in Convert.ImplicitNumericConversion and also
13561         in explicit convesion from double/float to decimal.
13562
13563         * convert.cs (ImplicitNumericConversion): Handle implicit
13564         conversions to System.Decimal.
13565         (ExplicitNumericConversion): handle explicit conversions to
13566         System.Decimal.
13567
13568         This fixes #68711.
13569         
13570 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13571
13572         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13573         know the type at this stage, just break through.   Fixes #75008 
13574
13575 2005-05-19  Martin Baulig  <martin@ximian.com>
13576
13577         * delegate.cs
13578         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13579         to disable error reporting.
13580
13581         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13582         here since we don't want to report an error; see the new test-336.cs.
13583
13584 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13585
13586         * statement.cs (ToplevelBlock.GetParameterReference)
13587         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13588         Move here from class Block.
13589         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13590         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13591
13592 2005-05-18  Martin Baulig  <martin@ximian.com>
13593
13594         Fix #74978.
13595
13596         * flowanalysis.cs
13597         (FlowBranching.Reachability): Add non-static public And() and Or()
13598         methods.
13599         (FlowBranchingSwitch): New class; do the `break_origins' thing
13600         like in FlowBranchingLoop.
13601         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13602         reachability, not just locals and parameters.
13603         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13604         switch; MergeBreakOrigins() now takes care of that.
13605
13606 2005-05-18  Martin Baulig  <martin@ximian.com>
13607
13608         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13609         a loop and may leave it, reset the barrier; fixes #74974.
13610
13611 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13612         
13613         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13614         is back.
13615         
13616         * cs-parser.jay: Catch more lexical errors.
13617         
13618         * report.cs: Add one more Error method.
13619         
13620         * rootcontext.cs,
13621         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13622
13623 2005-05-17  Martin Baulig  <martin@ximian.com>
13624
13625         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13626         #70970. 
13627
13628 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13629
13630         Fix test-382.cs.  Emit values of decimal constants.
13631         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13632         Carved out of ...
13633         (TypeContainer.AddField): ... this.
13634         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13635         with initializers to include 'Const's.
13636         (ClassPart.RegisterFieldForInitialization): Forward to
13637         PartialContainer.
13638         * const.cs (Const.Const): Pass initializer to base class.
13639         (Const.Define): In case of decimal constants, register them for
13640         initialization in a static constructor.
13641
13642 2005-05-14  Martin Baulig  <martin@ximian.com>
13643
13644         * statement.cs (Block.Resolve): Correctly handle unreachable code;
13645         do not call ResolveUnreachable() on unreachable statements in
13646         here, see the comment in the source code.
13647
13648 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13649
13650         Fix #74934.
13651         * expression.cs (BinaryResolveOperator): If one of the operands of
13652         an equality comparison is 'null' and the other is a pointer type,
13653         convert the null to a NullPointer.
13654         * convert.cs (ImplicitReferenceConversion): If the expression is a
13655         NullLiteral and the target type is a pointer type, return a
13656         NullPointer instead.
13657         (ImplicitConversionStandard): Likewise.
13658
13659 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
13660         
13661         * cs-parser.jay: Set readonly context based on special constructs.
13662         
13663         * expression.cs (LocalVariableReference.DoResolveBase): Improved
13664         readonly variable error handling.
13665         
13666         * rootcontext.cs (EmitCode): Don't verify members when error
13667         occurred.
13668         
13669         * statement.cs (LocalInfo): Add reaodnly context information.
13670         (SetReadOnlyContext, GetReadOnlyContext): New methods.
13671
13672 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13673
13674         * statement.cs (Block.Resolve): Revert change below.  Modify fix
13675         for #74041 to initialize 'resolved' to false only for explicit
13676         blocks.  Fixes #74873.
13677
13678 2005-05-12  Raja R Harinath  <harinath@gmail.com>
13679
13680         Fix #74920.
13681         * typemanager.cs (unmanaged_enclosing_types): New.
13682         (IsUnmanagedType): Avoid infloops by using
13683         'unmanaged_enclosing_types' to talk with recursive invocations.
13684
13685 2005-05-13  Martin Baulig  <martin@ximian.com>
13686
13687         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
13688         instance variable, not a local.  Fix #74873.
13689         (Block.ResolveUnreachable): Set it to true here.
13690
13691 2005-05-11  Duncan Mak  <duncan@novell.com>
13692
13693         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
13694         continuing to process for 'arg'.
13695         (handle_preprocessing_directive): Check the argument of the #endif
13696         directive and report error CS1025 if there are any trailing
13697         characters.
13698
13699         According to the C# spec, having even whitespace after the #endif
13700         directive is illegal; however, because we call arg.TrimEnd ()
13701         beforehand, we have the same behavior as csc, allowing whitespace
13702         after the directive.
13703
13704         Fixes #74892.
13705
13706 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
13707
13708         Fix #74863.
13709         
13710         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
13711         (Constructor.GetObsoleteAttribute): Implemented correctly.
13712
13713 2005-05-10  Martin Baulig  <martin@ximian.com>
13714
13715         * support.cs (ReflectionParameters.ParameterModifier): Use
13716         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
13717         and `ParameterAttributes.In'.  Fixes #74884.
13718
13719 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
13720
13721         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
13722         
13723         * expression.cs (Argument.GetParameterModifier): Turned to property.
13724         (Invocation.Error_InvalidArguments): Add more descriptive errors.
13725         
13726         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
13727         its C# equivalent.
13728         
13729 2005-05-09  Raja R Harinath  <rharinath@novell.com>
13730
13731         Fix #74852.
13732         * decl.cs (MemberCache.AddMethods): Register override methods,
13733         rather than non-override methods.
13734         * typemanager.cs (RegisterOverride): New.
13735         (IsOverride): Update.
13736
13737 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
13738
13739         Fix #73105.
13740         
13741         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
13742         recursive declaration.
13743         
13744         * statement.cs (Block.ResolveMeta): Report any error in resolving.
13745         
13746 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
13747
13748         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
13749         
13750         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
13751
13752 2005-05-05  Raja R Harinath  <rharinath@novell.com>
13753
13754         Fix #74797.
13755         * decl.cs (DeclSpace.FamilyAccessible): 
13756         Use TypeManager.IsNestedFamilyAccessible.
13757
13758         Fix reopened #64812.
13759         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
13760         internal'.
13761
13762 2005-05-04  Raja R Harinath  <rharinath@novell.com>
13763             Abin Thomas  <projectmonokochi@rediffmail.com>
13764             Anoob V E  <projectmonokochi@rediffmail.com>
13765             Harilal P R  <projectmonokochi@rediffmail.com>
13766
13767         Fix #64812.
13768         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
13769         allow access to all static members.
13770
13771 2005-05-04  Martin Baulig  <martin@ximian.com>
13772
13773         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
13774
13775 2005-05-04  Martin Baulig  <martin@ximian.com>
13776
13777         Fix #74655.
13778
13779         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
13780         section at the end; make things work if `default' is not the last
13781         section.        
13782
13783 2005-05-04  Martin Baulig  <martin@ximian.com>
13784
13785         Fix #70400.
13786
13787         * statement.cs (Switch): Replaced the `got_default' field with a
13788         `default_section' one.
13789         (Switch.CheckSwitch): Set `default_section' here.
13790         (Switch.Resolve): If we're a constant switch and the constant is
13791         not found, use the default section.
13792
13793 2005-05-03  Martin Baulig  <martin@ximian.com>
13794
13795         * expression.cs (ArrayAccess.EmitGetLength): New public method.
13796
13797         * statement.cs (Foreach.ArrayForeach): New nested class.
13798         (Foreach.TemporaryVariable): New nested class.
13799         (Foreach.EmitArrayForeach): Removed; this is now in the new
13800         ArrayForeach class.
13801
13802 2005-05-03  Raja R Harinath  <rharinath@novell.com>
13803
13804         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
13805         more conservative.
13806         (VerifyPendingMethods): Revert change below.
13807
13808         * typemanager.cs (IsOverride, RegisterNonOverride): New.
13809         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
13810         that used to trigger warning -28.  Remove warning -28.
13811         * expression.cs (Invocation.OverloadResolve): Use
13812         TypeManager.IsOverride to distinguish override methods.
13813
13814         Fix #74773.
13815         * pending.cs (VerifyPendingMethods): If a base type implements the
13816         requested interface, don't bother checking individual methods of
13817         the base type.  As a side-effect, this prevents the creation of
13818         unnecessary proxies.
13819
13820 2005-05-02  Martin Baulig  <martin@ximian.com>
13821
13822         Fix #70182.
13823
13824         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
13825         Also `And' the locals if the old vector is null.
13826         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
13827         null; in this case we basically reset all the variables.        
13828
13829 2005-05-02  Martin Baulig  <martin@ximian.com>
13830
13831         Fix #74529.
13832
13833         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
13834         Added `FlowBranching branching' argument; always `and' the
13835         variables instead of `or'ing them unless we're an infinite loop.
13836
13837         * statement.cs (While.Resolve): Create a new sibling unless we're
13838         infinite.       
13839
13840 2005-05-02  Martin Baulig  <martin@ximian.com>
13841
13842         Fix #70140.
13843
13844         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
13845         arguments; use it instead of creating a new TopLevelBlock.
13846         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
13847         our ConstructorInitializer.
13848
13849         * statement.cs
13850         (TopLevelBlock.TopLevelBranching): New public property.
13851         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
13852         and create our `TopLevelBranching'.
13853
13854         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
13855         anonymous method host, use `block.TopLevelBranching' rather than
13856         creating a new branching.
13857
13858 2005-04-20  Miguel de Icaza  <miguel@novell.com>
13859
13860         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
13861         a ScopeInfo, if any of the current children is a child of the new
13862         entry, move those children there.
13863
13864 2005-04-30  Martin Baulig  <martin@ximian.com>
13865
13866         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
13867         at the beginning of a SwitchSection.  Fix #73335.
13868
13869 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
13870
13871         Fix #74378
13872         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
13873         
13874         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
13875         (FieldExpr.DoResolve): Obsolete members are ignored for field
13876         initializers.
13877         
13878 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
13879
13880         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
13881         of arrays detection.
13882
13883         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
13884         verification.
13885         (Field.VerifyClsCompliance): Volatile fields are not compliant.
13886
13887         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
13888         arrays report.
13889
13890 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
13891
13892         * cs-parser.jay: Use the prefered version of -unsafe in error
13893         message.
13894
13895 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
13896
13897         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
13898         circumstances.
13899
13900 2005-04-20  John Luke  <john.luke@gmail.com>
13901
13902         * driver.cs: fix typo in error message, --outout to --output
13903
13904 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
13905
13906         * codegen.cs (InRefOutArgumentResolving): New field.
13907         
13908         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
13909         fields outside contructor.
13910         
13911         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
13912         
13913 2005-04-19  Miguel de Icaza  <miguel@novell.com>
13914
13915         * anonymous.cs (CaptureContext.EmitParameterInstance): The
13916         parameter code was not completed ever, so it was not as up-to-date
13917         as local variables.  Must finish it.
13918
13919         The bug fix was to compare the Toplevel of the block, not the
13920         current block.  Thanks for Ben for pointing this out. 
13921
13922 2005-04-19  Raja R Harinath  <rharinath@novell.com>
13923
13924         * decl.cs (AddMethods): Use the declaring type of the problem
13925         method to determine if we want to squash a warning.
13926
13927 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
13928
13929         * attribute.cs: Removed debug output.
13930
13931         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
13932         
13933         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
13934         Report.Stderr.
13935         
13936 2005-04-18  Raja R Harinath  <rharinath@novell.com>
13937
13938         Fix #74481.
13939         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
13940         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
13941         all null comparisons against reference types.
13942
13943 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
13944
13945         Fix# 74565
13946         * class.cs (TypeContainer.CircularDepException) New nested
13947         exception class.
13948         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
13949         (TypeContainer.DefineType): Removed error, reset InTransit before
13950         exit.
13951         (Class.DefineType): Throw exception when is in Transit.
13952         Catch exception and report error.
13953         (Struct.DefineType): Throw exception when is in Transit.
13954         Catch exception and report error.
13955         (Interface.DefineType): Throw exception when is in Transit.
13956         Catch exception and report error.
13957
13958         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
13959         handle nested exception handlers.
13960
13961         * flowanalysis.cs (InTryWithCatch): New method, search for try with
13962         a catch.
13963
13964         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
13965         InFinally and InCatch storage.
13966
13967         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
13968         (Catch.Resolve): Set and Restore ec.InCatch.
13969         (Try.Resolve): Set and Restore ec.InFinally.
13970         (Try.HasCatch): True when try has catch.
13971
13972 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
13973
13974         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
13975           for the same event member, so exclude such cases from warning 419.
13976           Fixed bug #74633.
13977
13978 2005-04-16  Miguel de Icaza  <miguel@novell.com>
13979
13980         * expression.cs (Binary.ResolveOperator): Apply patch from John
13981         Luke to fix bug 59864: operators &, | and ^ on enumerations
13982         require that the same enum type on both sides.
13983
13984         * driver.cs: Add warnings to old flag usage, this is to assist
13985         people who produce Makefiles and hope that the Makefiles will be
13986         used on Windows.
13987
13988         * class.cs (TypeContainer.EmitType): Moved the definition of the
13989         special $PRIVATE$ field from the resolve phase to the Emit phase.
13990         During resolve we do not know if we are a struct with
13991         HasExplicitLayout, we know this only after the attributes for the
13992         type are emitted.
13993
13994         Set the FieldOffset to zero on the dummy field that we create for
13995         the class.   Fixes 74590.
13996
13997 2005-04-16  Raja R Harinath  <rharinath@novell.com>
13998
13999         Fix #73834.
14000         * ecore.cs (PropertyExpr.resolved): New.
14001         (DoResolve): Use it to handle a case of double resolution here.
14002         Handle a case of identical-name-and-type-name.
14003         * expression.cs (ArrayCreation.CheckIndices): Avoid double
14004         resolution by storing the results of expression resolution back
14005         into the "probes" array.
14006
14007 2005-04-15  Raja R Harinath  <rharinath@novell.com>
14008
14009         Fix cs0208-7.cs and cs0208-8.cs.
14010         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
14011         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
14012         error reporting to point out the reason a struct is not unmanaged.
14013
14014 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14015
14016         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
14017           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
14018
14019 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14020
14021         Fix #74528.
14022         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
14023         IdenticalNameAndTypeName here.
14024         (EventExpr.InstanceResolve): Likewise.
14025
14026 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
14027
14028         C# 2.0 DefaultCharSetAttribute implementation
14029         
14030         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
14031         which allows us to set GlobalNamespace for every resolve.
14032         (Attribute.ResolveArguments): Cut from Resolve.
14033         (Attribute.GetCharSetValue): Returns CharSet named argument.
14034         (Attribute.DefinePInvokeMethod): Gets default charset from
14035         module settings.
14036         (GlobalAttribute.ResolveAsTypeStep): Override.
14037         (GlobalAttribute.ResolveArguments): Override.
14038         
14039         * class.cs (TypeAttr): Is protected.
14040         
14041         * codegen.cs (ModuleClass.DefaultCharSet): New member.
14042         (ModuleClass.DefaultCharSetType): New memeber.
14043         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
14044         
14045         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
14046         charset from module.
14047         
14048         * delegate.cs (TypeAttr): Override.
14049         (Delegate.DefineType): Use this TypeAttr.
14050         
14051         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14052         at very early stage (before types are defined) to resolve model
14053         module attributes. It will probably not work with corlib but it
14054         should be ok.
14055         
14056         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14057         charset from module.
14058         
14059         * typemanager.cs (default_charset_type): New type.
14060
14061 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14062
14063         * decl.cs (MemberCache.AddMethods): Don't warn if
14064         System.Object.Finalize has buggy MethodAttributes.
14065
14066         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14067         removed below.
14068
14069 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14070
14071         * doc.cs : detect ambiguous reference to overloaded members.
14072           Fixed bug #71603. MS 1.1 csc does not detect it.
14073
14074 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14075
14076         * doc.cs : delegates must not be referenced with parameters.
14077           Fixed bug #71605.
14078
14079 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14080
14081         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14082
14083 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14084
14085         * driver.cs (MainDriver): Stop processing if the CLS stage found
14086         errors. 
14087
14088         (CompilerCallableEntryPoint.InvokeCompiler): Always
14089         reset after execution;   Take a TextWriter argument for the
14090         output.
14091
14092         * report.cs: Use the error stream instead of hardcoding stderr. 
14093
14094 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14095
14096         * class.cs: Reduce code paths to test, too small of an
14097         optimization to make it worth the extra testing.  Always perform
14098         it. 
14099
14100 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14101
14102         Fix #74510.
14103         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14104         operators that had errors reported on them.
14105
14106 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14107
14108         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14109         argument types.
14110         (Attribute.Resolve): Add named argument type checking.
14111         
14112         * class.cs (FixedField.Define): Use IsPrimitiveType
14113         
14114         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14115         
14116         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14117         unsafe parameter types.
14118         
14119         * statement.cs (Using.ResolveExpression): Add better error description.
14120         
14121         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14122         
14123 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14124
14125         Fix #74484.
14126         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14127         AttributeUsageAttribute in the emitcontext of the attribute class,
14128         not in the emitcontext of the attributable entity it was attached to.
14129         * cs-parser.jay: Use 'current_class', not 'current_container',
14130         when creating a GlobalAttribute.
14131
14132 2005-04-08  Alp Toker  <alp@atoker.com>
14133
14134         * pending.cs: The fix to #58413 failed to compile methods implementing
14135         interfaces with/without params modifiers and vice versa, even though
14136         params modifiers aren't part of the signature. Make the modifier check
14137         less strict as in csc.
14138
14139 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14140             Anoob V E  <projectmonokochi@rediffmail.com>
14141             Harilal P R  <projectmonokochi@rediffmail.com>
14142
14143         Fix #58413.
14144         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14145         modifiers of pending methods.
14146         (PendingImplementation.PendingImplementation): Initialize it.
14147         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14148         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14149         with ParameterData.  Add check for modifiers.
14150         * class.cs (MethodData.Define): Update to changes.
14151
14152 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14153
14154         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14155
14156 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14157
14158         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14159         property.
14160         
14161         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14162         
14163         * rootcontext.cs,
14164         * typemanager.cs: Registered RequiredAttributeAttribute.
14165         
14166 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14167
14168         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14169         Warning CS0169 is back at level 3.
14170         (IMethodData.SetMemberIsUsed): New method.
14171         
14172         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14173         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14174         
14175         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14176
14177         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14178         contants.
14179         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14180         is used.
14181         
14182         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14183         is used.
14184         
14185         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14186         to avoid the problems with nested types.
14187
14188 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14189             Anoob V.E  <projectmonokochi@rediffmail.com>
14190             Harilal P.R  <projectmonokochi@rediffmail.com>
14191             Raja R Harinath  <rharinath@novell.com>
14192
14193         Fix #73820.
14194         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14195         attribute.
14196         * typemanager (GetConstructor): Make public.
14197
14198 2005-04-05  John Luke  <john.luke@gmail.com>
14199             Raja R Harinath  <rharinath@novell.com>
14200
14201         Fix #62232.
14202         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14203         struct too.  Return false quicker in a few cases.
14204         (VerifyUnManaged): Use it.
14205
14206 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14207
14208         Fix #74041.
14209         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14210         not 'unreachable_seen'.
14211
14212 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14213
14214         * attribute.cs (Attribute.GetValue): Removed unused.
14215         
14216         * codegen.cs (CodeGen.TrimExt): Removed unused.
14217         
14218         * cs-parser.jay (output): Removed unused.
14219         
14220         * cs-tokenizer.cs (hex_digits): Removed unused.
14221         
14222         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14223         
14224         * expression.cs (Indirection.LoadExprValue): Removed unused.
14225         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14226         
14227         * iterators.cs (Iterator.param_types): Removed unused.
14228         
14229         * statement.cs (Goto.block): Removed unused.
14230         (ToplevelBlock.did): Removed unused.
14231         (Switch.ResolveConstantSwitch): Removed unused.
14232
14233 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14234
14235         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14236         resetting thingy.
14237
14238 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14239
14240         Fix #74232 and cs0208-3.cs.
14241         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14242         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14243         unmanaged type.  Don't use FieldBuilders when 't' is a
14244         TypeBuilder.  Use ModFlags and MemberType fields.
14245         * class.cs (MemberBase.member_type): Rename from MemberType.
14246         (MemberBase.MemberType): New property.  Determines member_type on
14247         demand.
14248         (MemberBase.DoDefine): Don't initialize MemberType here.
14249         (FieldMember.Define): Likewise.
14250
14251 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14252
14253         Fix #74241
14254         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14255         Attributes are emitted there.
14256         
14257 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14258
14259         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14260         keyword in 'partial enum' too.
14261         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14262         is not allowed).
14263         Report from Kamil Skalski <nazgul@omega.pl>.
14264
14265         Fix #74309.
14266         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14267         have partial containers too.
14268
14269         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14270         in block' checks to Block.CheckInvariantMeaningInBlock.
14271         * statement.cs (Block.GetKnownVariableInfo): Make private.
14272         (Block.IsVariableUsedInChildBlock): Remove.
14273         (Block.IsVariableUsedInBlock): Likewise.
14274         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14275         conflicting declaration.
14276         (Block.AddVariable): Make error messages less long-winded and more
14277         specific.  Show location of conflicting declaration.
14278         * parameter.cs (Parameters.Location): New readonly property.
14279
14280 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14281
14282         Clean up semantics of invoking ResolveMemberAccess.
14283         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14284         can have an instance, ensure that we pass in a non-TypeExpression
14285         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14286         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14287         argument.  Update to changes and simplify.
14288         (FieldExpr.Emitinstance): Remove CS0120 check.
14289         (PropertyExpr.EmitInstance): Likewise.
14290         * expression.cs (Argument.Resolve): Likewise.
14291         (Invocation.DoResolve): Update to changes in semantics of
14292         InstanceExpression.
14293
14294 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14295
14296         Fix #74241
14297         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14298         customization.
14299         
14300         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14301
14302 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14303
14304         Fix difference in behaviour with commandline invocation.
14305         * driver.cs (Driver.Reset): New.
14306         (CompilerCallableEntryPoint): Call it.
14307
14308         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14309         variable" warnings if the boolean expression failed to resolve.
14310
14311 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14312
14313         * attribute.cs: Fix the union of several permissions when some of them
14314         are unrestricted (so the result isn't an unrestricted permission set).
14315         Fix #74036.
14316
14317 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14318
14319         * ecore.cs (MemberExpr): New class.  Convert from interface
14320         IMemberExpr.
14321         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14322         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14323         error checks.
14324         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14325         (MethodGroupExpr.IsExplicitImpl): Remove.
14326         (Expression.GetFieldFromEvent): Remove.
14327         (SimpleName.MemberStaticCheck): Remove.
14328         (SimpleName.DoSimpleNameResolve): Update to changes.
14329         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14330         (MemberAccess.IdenticalNameAndTypeName): Remove.
14331         (MemberAccess.error176): Move to MemberExpr.
14332         (MemberAccess.DoResolve): Update to changes.
14333         (BaseAccess.DoResolve): Likewise.
14334
14335 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14336
14337         C# 2.0 Conditional attribute class implementation
14338         
14339         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14340         Analyzes class whether it has attribute which has ConditionalAttribute
14341         and its condition is not defined.
14342         
14343         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14344         (Class.IsExcluded): New method. Search for at least one defined
14345         condition in ConditionalAttribute of attribute class.
14346
14347 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14348
14349         * ecore.cs (PropertyExpr): Derive from Expression, not
14350         ExpressionStatement.
14351         (PropertyExpr.EmitStatement): Remove.
14352
14353 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14354
14355         Fix #74060.
14356         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14357         internal field "value__" of an enum be private.  The examples for
14358         "value__" that I found on MSDN all used FieldAttributes.Private.
14359
14360         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14361         Don't mention IL method attribute names.
14362
14363         Fix #47991.  Remove a TODO.
14364         * statement.cs (Block.Toplevel): Make into a field.
14365         (Block.Parameters): Move into ToplevelBlock.
14366         (Block.known_variables): Rename from child_variable_names.
14367         (Block.Block): Remove variants that take Parameters.  Initialize
14368         'Toplevel' with the immediately surrounding toplevel block.
14369         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14370         LocalInfo parameter.
14371         (Block.GetKnownVariableInfo): New.
14372         (Block.IsVariableNameUsedInChildBlock): Update.
14373         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14374         the block, even though it may not be in scope.
14375         (Block.AddVariable): Remove Parameters parameter.  Use
14376         Toplevel.Parameters instead.
14377         (Block.AddConstant): Remove Parameters parameter.
14378         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14379         (Block.IsParamaterReference): Likewise.
14380         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14381         (ToplevelBlock.Parameters): New.  Moved from Block.
14382         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14383         initialize Parameters to a non-null value.
14384         * cs-parser.jay: Update to changes.
14385         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14386         simple names that mean different things in the same block.  Use
14387         Block.IsVariableNameUsedInBlock.
14388
14389 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14390
14391         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14392         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14393         GetTypeHandle.  It is possible for a reflected type to derive from
14394         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14395         System.Array during mscorlib compilation).
14396         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14397         contain a method_hash, don't create one either.  Don't create a
14398         deep copy of the base cache's method_hash.
14399         (MemberCache.SetupCache): Rename back from DeepCopy.
14400         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14401         already initialized.  If we see an override function, add its
14402         underlying base virtual function to the member_hash too.
14403
14404         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14405
14406 2005-03-26  Raja R Harinath  <harinath@acm.org>
14407
14408         Fix #73038.
14409         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14410         fails to resolve, ensure that the LHS is still resolved as an
14411         lvalue.
14412
14413 2005-03-25  Raja R Harinath  <harinath@acm.org>
14414
14415         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14416         ec.ContainerType.
14417         (Enum.current_ec): Remove.
14418         (Enum.LookupEnumValue): Remove EmitContext argument.
14419         Just uses the one created during DefineType.
14420         (Enum.FindMembers): Update.
14421         * expression.cs (MemberAccess.DoResolve): Update.
14422
14423 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14424
14425         * assign.cs (Assign.DoResolve): Check for CS1717 when
14426         source and target are same (uses Equals).
14427
14428         * expression.cs (LocalVariableReference, ParameterReference,
14429         This): Implemented Equals, GetHashCode.
14430
14431         * statement.cs (Block.GetParameterReference): Removed useless
14432         local variable.
14433
14434 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14435
14436         Fix cs0128.cs
14437         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14438         blocks before deciding whether the error is cs0136 or cs0128.
14439
14440         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14441         (using_alias_directive, using_namespace_directive): Pass
14442         MemberName, not an expression to Namespace.UsingAlias and
14443         Namespace.Using.
14444         (MakeName): Use the MemberName of the namespace.
14445         * namespace.cs (Namespace.MemberName): New.
14446         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14447         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14448         Likewise.
14449         * decl.cs (MemberName.Name): Make readonly.
14450         (MemberName.FromDotted): New "constructor".
14451         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14452         (MemberCore.Name): Compute from MemberName on demand.
14453         (MemberCore.SetMemberName): Provide a way to change the
14454         MemberName.
14455         (MemberCore.AddToContainer): Don't take a fullname parameter.
14456         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14457         fully qualified name of the container to the member name.
14458         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14459         only if the type is a member of the root container.
14460         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14461         MemberName.Left rather than searching for an embedded ".".
14462         (PartialContainer.CreatePart): Update to changes in RootContext.
14463         (MemberBase.ShortName): Turn into a property.  Use
14464         MemberCore.SetMemberName.
14465         (MemberBase.ExplicitInterfaceName): Remove.
14466         (MemberBase.UpdateMemberName): Remove.
14467         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14468         (PropertyBase.SetMemberName): New override.
14469         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14470         (Tree.GetDecl): New.
14471         (Tree.AllDecls): Rename from Decls.
14472         * attribute.cs, enum.cs, report.cs: Update to changes.
14473         * driver.cs (MainDriver): Use MemberName.FromDotted on
14474         RootContext.MainClass.
14475
14476 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14477
14478         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14479         checks.
14480
14481         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14482
14483 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14484
14485         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14486         property accessor modifiers.
14487
14488         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14489         fixed buffer attribute (CS1716).
14490         (PropertyMethod.HasCustomAccessModifier): When property accessor
14491         has custom modifier.
14492
14493         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14494         modifiers.
14495         (PropertyExpr.DoResolveLValue): Add CS0272.
14496
14497 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14498
14499         * convert.cs: When converting to a pointer, use the proper Conv.U
14500         or Conv.I depending on the source data type.
14501
14502         * cs-tokenizer.cs: Make the size for large decimal constants,
14503         fixes #72957.
14504
14505 2005-03-17  Martin Baulig  <martin@ximian.com>
14506
14507         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14508         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14509
14510 2005-03-17  Martin Baulig  <martin@ximian.com>
14511
14512         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14513         to bool so we can return an error condition.
14514         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14515         returned an error.
14516
14517 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14518
14519         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14520         attributes.
14521
14522 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14523
14524         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14525         Refactor to avoid traversing the list of assemblies, and to avoid
14526         string concatenation.
14527         * typemanager.cs (guid_attr_type): Remove.
14528         (negative_hits, pointers, references): Remove hashes.
14529         (type_hash): New.
14530         (GetConstructedType): New.  Uses type_hash to handle constructed
14531         types (arrays, references, pointers).
14532         (GetReferenceType, GetPointerType): Use it.
14533         (GetNestedType): New.  Uses type_hash to handle nested types of
14534         reflected types.
14535         (LookupType, LookupTypeDirect): Remove.
14536         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14537         'types' hash and LookupTypeReflection directly.
14538         (params_string, params_object): Use GetConstructedType.
14539         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14540         top-level types.
14541         (Namespace.Lookup): Use cached_types.
14542         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14543         provided by old TypeManager.LookupType.
14544         * rootcontext.cs (MakeFQN): Remove.
14545         * decl.cs (DeclSpace.MakeFQN): Likewise.
14546         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14547         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14548         TypeManager.GetConstructedType.
14549         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14550
14551 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14552
14553         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14554         indexers.
14555
14556         * cs-parser.jay: Reports CS1527 for any namespace element.
14557
14558         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14559         Added CS0407.
14560
14561         * expression.cs (ParameterReference.IsAssigned): Changed error to
14562         CS0269.
14563         (Error_WrongNumArguments): Moved CS0245 detection here.
14564
14565         * statement.cs (Return.Resolve): Add CS1622 report.
14566
14567 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14568
14569         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14570
14571 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14572
14573         * attribute.cs expression.cs: Get rid of some allocations.
14574
14575 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14576
14577         * doc.cs : just eliminate the latest change.
14578
14579 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14580
14581         * doc.cs : commented out the latest change. It breaks xml-030.cs
14582
14583 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14584
14585         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14586           fail. So invoke CreateType() in FindDocumentedType().
14587
14588 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14589
14590         * cs-tokenizer.cs : added IsKeyword().
14591         * doc.cs : Detect keyword incorrectly used as identifier.
14592           Allow identifiers prefixed by @.
14593
14594 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14595
14596         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14597         It caused exception in namespace resolving (again!).
14598         
14599         * class.cs (Class.ctor): Removed exit.
14600         (PropertyMethod.ctor): ditto.
14601         
14602         * codegen.cs (Codegen.Reset): Reset static data.
14603         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14604         
14605         * cs-tokenizer.cs (Cleanup): Removed.
14606         
14607         * driver.cs (GetSystemDir): Rewrote to one line command.
14608         It caused problem with unloaded dynamic modules.
14609         (UnixParseOption): Removed Exit.
14610         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14611         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14612         Now can be mcs used as library.
14613         
14614         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14615         empty location.
14616         
14617         * location.cs (Reset): Reset static data.
14618         
14619         * namespace.cs (Reset): Reset static data.
14620         
14621         * report.cs (Report.Reset): Reset static data.
14622         
14623         * rootcontext.cs (RootContext.Reset): Reset static data.
14624         
14625         * tree.cs (RootTypes.ctor): Use Location.Null
14626         
14627         * typemanager.cs (TypeManager.Reset): Reset static data.
14628         (CoreLookupType): Removed Exit.
14629         (TypeHandle.Reset): Reset static data.
14630         
14631 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14632
14633         Fix #73516.
14634         * typemanager.cs (ComputeNamespaces): Import namespaces from
14635         referenced modules too.
14636
14637 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14638
14639         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
14640         than '.'.
14641
14642 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14643
14644         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
14645         enclosing DeclSpace.  This ensures that a name-lookup populates
14646         more caches and there are fewer 'TypeExpression's.  Carve out
14647         nested type lookup into ...
14648         (LookupNestedTypeInHierarchy): ... this.
14649
14650 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14651
14652         Clean up a few partial-class semantics.  
14653         Fixes test-357.cs and cs1618-2.cs.
14654         * cs-parser.jay (struct_declaration): Use 'current_class' as
14655         parent of newly-created struct.  Remove call to Register ().
14656         Use 'pop_current_class' to complete handing the current struct.
14657         (interface_declaration): Likewise.
14658         (class_declaration): Likewise.
14659         (enum_declaration): Use 'current_class' as parent of newly created
14660         enum.
14661         (delegate_declaration): Likewise.
14662         (pop_current_class): New function.  This is used to handle closing
14663         up the 'current_class' and 'current_container', and pointing them
14664         to the enclosing class/container.
14665         (CSharpParser): Initialize 'current_class' too.
14666         * decl.cs (MemberCore): Add check for invariant: a partial
14667         container is not a parsed entity, and thus does not enclose any
14668         parsed members.
14669         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
14670         (DeclSpace.BaseTypeExpr): Use it.
14671         (DeclSpace.LookupType): Add check for invariant.
14672         * class.cs (TypeContainer): Add check for invariant: a nested
14673         class should have the same NamespaceEntry as its enclosing class.
14674         (TypeContainer.EmitFieldInitializers): Make virtual.
14675         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
14676         MemberCore.
14677         (TypeContainer.Register): Remove.
14678         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
14679         null.  Use TypeResolveEmitContext for resolving base types and
14680         interfaces.  Move initialization of Parts.TypeBuilder here from
14681         ...
14682         (TypeContainer.DefineNestedTypes): ... here.
14683         (PartialContainer): Take a Namespace not a NamespaceEntry.
14684         (PartialContainer.Create): Don't use Register.  Call the
14685         appropriate Add... function directly.
14686         (ClassPart): Take both the PartialContainer and the enclosing
14687         class as constructor arguments.
14688         (ClassPart.EmitFieldInitializers): Override.
14689         (ClassPart.PartFindNestedTypes): Remove.
14690         (FieldBase.GetInitializerExpression): Resolve the initializer
14691         expression in the emit context of the enclosing class.
14692         * tree.cs (RootTypes): Remove Register ().
14693         
14694 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
14695
14696         * cs-parser.jay: Removed CS0134.
14697         
14698         * driver.cs: Removed CS1901.
14699         
14700         * expression.cs (SizeOf.DoResolve): Don't report CS0233
14701         for predefined types.
14702
14703 2005-03-07  Duncan Mak  <duncan@novell.com>
14704
14705         * codegen.cs (Save):  Catch UnauthorizedAccessException as
14706         well. Fixes bug #73454.
14707
14708 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
14709
14710         * cs-tokenizer.cs (xtoken): Add CS1035.
14711         
14712         * class.cs (MethodData.Define): Add CS0683.
14713         (FieldMember.ctor): Add CS0681.
14714
14715 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14716
14717         * ecore.cs (SimpleName.DoResolve): Rename from
14718         SimpleName.DoResolveAllowStatic.
14719         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
14720         Pass 'intermediate' flag to MemberStaticCheck.
14721         (SimpleName.MemberStaticCheck): Skip "static check" only in case
14722         of "intermediate" lookups via MemberAccess.
14723         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
14724         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
14725
14726 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14727
14728         Fix #73394.
14729         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
14730         slipped in because of variable names that are identical to a
14731         builtin type's BCL equivalent ('string String;', 'int Int32;').
14732         (PropertyExpr.EmitInstance): Likewise.
14733
14734 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
14735
14736         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
14737         
14738         * report.cs (warning_ignore_table): Made public.
14739
14740 2005-03-04  Raja R Harinath  <rharinath@novell.com>
14741
14742         Fix #73282.
14743         * class.cs (MethodData.Emit): Pass 'container' to
14744         container.GetObsoleteAttribute instead of 'container.Parent'.
14745
14746 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
14747
14748         * cs-parser.jay: Add 1534 error test.
14749
14750         * iterators.cs (Yield.CheckContext): Add error 1629.
14751         (Iterator.ctor): Save unsafe modifier.
14752         (MoveNextMethod.DoEmit): Restore unsafe context.
14753
14754         * namespace.cs (UsingAlias): Better error message.
14755
14756 2005-03-03  Dan Winship  <danw@novell.com>
14757
14758         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
14759         the warning message [#73219]
14760
14761 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14762
14763         Fix compile with MCS 1.0.0.0.
14764         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
14765         w_restore to not depend on string constant folding.
14766
14767 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14768
14769         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
14770         CS0246 check to users who passed 'silent = false'.
14771         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
14772         check.
14773         (SimpleName.SimpleNameResolve): Update.
14774         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
14775         (MemberAccess.IdenticalNameAndTypeName): Update.
14776         * doc.cs (FindDocumentedTypeNonArray): Update.
14777
14778 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
14779
14780         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
14781         * parameters.cs (ComputeAndDefineParameters): Remove.
14782         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
14783         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
14784         Use GetParameterInfo.
14785
14786 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
14787
14788         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
14789
14790 2005-03-02  Raja R Harinath  <rharinath@novell.com>
14791
14792         Unify DeclSpace.LookupType and DeclSpace.FindType.
14793         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
14794         is in charge of defining nested types on demand.
14795         (DeclSpace.LookupType): Use it when the current_type is a
14796         TypeBuilder.  Use LookupTypeDirect for reflected types.
14797         (DeclSpace.FindType): Remove.
14798         (DeclSpace.LookupInterfaceOrClass): Likewise.
14799         (DeclSpace.DefineTypeAndParents): Likewise.
14800         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
14801         DeclSpace.LookupType.
14802         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
14803         * typemanager.cs (LookupType): Simplify.
14804         (AddUserType): Remove type from negative_hits.
14805         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
14806         * class.cs (TypeContainer.FindMembers): Move handling of nested
14807         types ...
14808         (TypeContainer.FindMembers_NestedTypes): ... here.
14809         (TypeContainer.FindNestedType): Implement override.
14810         (ClassPart.FindNestedType): Delegate to PartialContainer.
14811         (ClassPart.PartFindNestedType): Looks up the nested types of the
14812         part alone.
14813
14814 2005-03-02  Martin Baulig  <martin@ximian.com>
14815
14816         * class.cs (TypeContainer.DoDefineMembers): We also need a default
14817         static constructor in static classes.
14818
14819 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
14820
14821         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
14822         sizeParamIndex is not specified.
14823
14824 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
14825
14826         Fix #73117
14827         * report.cs (WarningMessage.IsEnabled): Missing null check.
14828
14829 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14830
14831         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
14832         in the fields and not in the properties.
14833
14834 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
14835
14836         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
14837         fields as well.
14838
14839 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14840
14841         * attribute.cs: Small refactoring (improved robustness).
14842         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
14843         (ValidateGuid): Removed.
14844         (Resolve): Removed referenced to above mentioned.
14845         (GetAttributeUsage): Made private and changed to work without
14846         class assistance.
14847         (GetIndexerAttributeValue): Don't crash.
14848         (GetConditionalAttributeValue): Ditto.
14849         (GetClsCompliantAttributeValue): Ditto.
14850         (ExtractSecurityPermissionSet): All attributes exceptions are
14851         error 648.
14852         (GetPropertyValue): New helper.
14853         (GetMethodImplOptions): New method.
14854         (DefinePInvokeMethod): Reuse common code. Implemented handling of
14855         some missing properties.
14856         
14857         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
14858         (Method.ApplyAttributeBuilder): Updated.
14859         
14860         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
14861         exception.
14862
14863 2005-02-28  Raja R Harinath  <rharinath@novell.com>
14864
14865         Fix #73052.
14866         * report.cs (Report.SymbolRelatedToPreviousError): Handle
14867         non-simple types (array, pointer, reference).
14868
14869 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14870
14871         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
14872
14873         * class.cs (MethodCore.IsDuplicateImplementation): Special error
14874         for operators.
14875         (Method.CheckBase): Catch wrong destructor here.
14876         (MethodData.Define): Add errors 550, 668.
14877
14878         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
14879
14880         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
14881
14882         * pending.cs (VerifyPendingMethods): Add error 551.
14883
14884         * typemanager.cs (CSharpName): Next error report helper.
14885
14886 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
14887
14888         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
14889         attributes. Removed useless attribute double check.
14890         It saves almost 2MBs for corlib.
14891
14892 2005-02-25  Raja R Harinath  <rharinath@novell.com>
14893
14894         Fix #72924.
14895         * statement.cs (ExpressionStatement.Resolve): Make robust to being
14896         called twice in case of error.
14897
14898 2005-02-23  Chris Toshok  <toshok@ximian.com>
14899
14900         Fix compiler portions of #72827.
14901         * statement.cs (Block.Emit): call Begin/EndScope on the
14902         EmitContext instead of the ILGenerator.
14903
14904         * codegen.cs (EmitContext.BeginScope): new method, call
14905         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
14906         we have one.)
14907         (EmitContext.BeginScope): same, but EndScope and CloseScope
14908
14909         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
14910         offset and call the superclass's OpenScope(int) with it.
14911         (SymbolWriter.CloseScope): get the current il
14912         offset and call superclass's CloseScope(int) with it.
14913
14914 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
14915
14916         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
14917         CS1677 for out and ref as well.
14918
14919         * class.cs (Method.Define): Add error CS1599 detection.
14920         
14921         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
14922         
14923         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
14924         
14925         * delegate.cs (Delegate.Define): Add error CS1599 detection.
14926         
14927         * support.cs.cs (ModifierDesc): New helper method.
14928
14929 2005-02-23  Raja R Harinath  <rharinath@novell.com>
14930             Abin Thomas  <projectmonokochi@rediffmail.com>
14931             Anoob V E  <projectmonokochi@rediffmail.com>
14932             Harilal P R  <projectmonokochi@rediffmail.com>
14933
14934         Fix #57851, #72718.
14935         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
14936         MemberLookup (used for error reporting) actually returns a result.
14937         Fix error report number (122, not 112).
14938
14939 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
14940             Anoob V E  <projectmonokochi@rediffmail.com>
14941             Harilal P R  <projectmonokochi@rediffmail.com>
14942
14943         Fix #71134.
14944         * pending.cs (PendingImplementation.GetAbstractMethods):
14945         Find NonPublic members too.
14946
14947 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
14948
14949         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
14950         Fixed error 217.
14951         
14952         * class.cs (MethodCore.CheckMethodAgainstBase):
14953         Add error 239 report.
14954
14955 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14956
14957         Fix #68955.
14958         * expression.cs (Invocation.IsApplicable): Make public.
14959         (Invocation.IsParamsMethodApplicable): Likewise.
14960         * delegate.cs (Delegate.VerifyApplicability): Don't use
14961         Invocation.VerifyArgumentCompat for parameter applicability
14962         testing.  Use Invocation.IsApplicable and
14963         Invocation.IsParamsMethodApplicable.
14964
14965 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
14966
14967         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
14968         
14969         * class.cs (Operator.Define): Add error 217 report.
14970         
14971 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14972
14973         * namespace.cs (UsingEntry.Resolve): Undo change below.
14974
14975 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14976
14977         Fix #72756.
14978         * ecore.cs (Expression.MemberLookupFailed): Add argument to
14979         disable the error message when the extended MemberLookup also
14980         fails.
14981         (Expression.MemberLookupFinal): Update.
14982         (SimpleName.DoSimpleNameResolve): Update.
14983         * expression.cs (MemberAccess.ResolveNamespaceOrType):
14984         Don't use MemberLookupFinal.
14985         (New.DoResolve): Update.
14986         (BaseAccess.CommonResolve): Update.
14987
14988 2005-02-21  Raja R Harinath  <rharinath@novell.com>
14989
14990         Fix #72732.
14991         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
14992         occured previously, don't resolve again.
14993
14994 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
14995
14996         Fix #69949
14997         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
14998         argument. Call ResolveAttributeUsage for unresolved.
14999         when types doesn't match ctor arguments.
15000         
15001         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
15002         for nested attribute classes.
15003         (Class.attribute_usage): Removed.
15004         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
15005         for attribute class.
15006         
15007         * ecore.cs (IsAttribute): Removed.
15008         
15009         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
15010         
15011         * rootcontext.cs (RegisterAttribute): Removed, attributes are
15012         now normal types.
15013         (attribute_types): Removed.
15014         (EmitCode): Global attributes are emited as the latest.
15015
15016 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
15017
15018         * class.cs (EmitFieldInitializers): Don't emit field initializer
15019         for default values when optimilization is on.
15020         
15021         * constant.cs (Constant.IsDefaultValue): New property.
15022         
15023         * driver.cs: Add /optimize handling.
15024         
15025         * constant.cs,
15026         * ecore.cs,
15027         * literal.cs: Implement new IsDefaultValue property.
15028         
15029         * rootcontext.cs (Optimize): New field, holds /optimize option.
15030
15031 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15032
15033         Fix crasher in re-opened #72347.
15034         * namespace.cs (Namespace.Lookup): Return null if
15035         DeclSpace.DefineType returns null.
15036
15037         Fix #72678.
15038         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
15039
15040 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15041
15042         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
15043         now returns null if it cannot resolve to an lvalue.
15044         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
15045         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
15046         returned null.  Remove check for SimpleName.
15047         (EventExpr.DoResolveLValue): New.
15048         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15049         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15050         error from ...
15051         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15052         avoid CS0131 error.
15053         (Unary.ResolveOperator): Move CS0211 check ...
15054         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15055         CS0131 error.
15056         (Unary.DoResolveLValue): Simplify.
15057         (AddressOf.DoResolveLValue): New.
15058         (ArrayAccess.DoResolveLValue): New.
15059
15060 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15061
15062         * attribute.cs (Attribute.Resolve): Add arguments casting for
15063         when types doesn't match ctor arguments.
15064
15065 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15066
15067         Fix parts of #63202.
15068         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15069         lookup of operator in base type.  Ensure that all checks happen
15070         when the operator resolves to an "op_..." method.
15071
15072 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15073
15074         Fix #71992.
15075         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15076         'ignore_cs0104' parameter.  Pass it to ...
15077         (NamespaceEntry.Lookup): ... this.
15078         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15079         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15080         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15081         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15082         Update.  Request that cs0104 errors be ignored.
15083         (ComposedCast.ResolveAsTypeStep): Update.
15084
15085 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15086
15087         Fix #59209.
15088         * expression.cs (Invocation.BetterFunction): Remove support for
15089         comparing virtual functions and their overrides.
15090         (Invocation.IsOverride): New.
15091         (Invocation.OverloadResolve): Don't consider 'override' functions
15092         during candidate selection.  Store them in a lookaside list.
15093         If the selected method is a 'virtual' function, use the list to
15094         find any overrides that are closer to the LHS type.
15095
15096 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15097
15098         * expression.cs (New.DoResolve): Add complex core type reduction.
15099         (New.Constantify): Converts complex core type syntax like 'new int ()'
15100         to simple constant.
15101         
15102 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15103
15104         * decl.cs (EntryType.EntryType): New constructor to create an
15105         updated copy of a cache entry.
15106         (MemberCache.AddMethods): Use it.
15107         (MemberCache.ClearDeclaredOnly): Remove.
15108         (MemberCache.MemberCache): Update.
15109
15110 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15111
15112         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15113         variable.  This one is represents the actual low-level declaration
15114         of the method, as opposed to the semantic level `IsStatic'.   
15115
15116         An anonymous method which is hosted into a static method might be
15117         actually an instance method.  IsStatic would reflect the
15118         container, while MethodIsStatic represents the actual code
15119         generated.
15120
15121         * expression.cs (ParameterReference): Use the new MethodIsStatic
15122         instead of IsStatic.
15123
15124         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15125         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15126         set on the current EmitContext. 
15127
15128         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15129         resolve our casted expression as an LValue.  This triggers the
15130         proper LValue processing that is later required by Assign.
15131
15132         This fixes 72347.
15133
15134         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15135
15136 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15137
15138         C# 2.0 Fixed buffer implementation
15139
15140         * anonymous.cs: Update after RegisterHelperClass renaming.
15141
15142         * attribute.cs (AttributeTester.fixed_buffer_cache):
15143         Cache of external fixed buffers.
15144         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15145         implementation if field is fixed buffer else null.
15146
15147         * class.cs
15148         (TypeContainer.AddField): Accept FieldMember instead of Field.
15149         (FieldBase.IsFieldClsCompliant): Extracted code from
15150         VerifyClsCompliance descendant customization.
15151         (FixedField): New class handles fixed buffer fields.
15152         (FixedFieldExternal): Keeps information about imported fixed
15153         buffer.
15154         (IFixedField): Make access to internal or external fixed buffer
15155         same.
15156
15157         * cs-parser.jay: Add fixed buffer parsing.
15158
15159         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15160         buffer.
15161
15162         * expression.cs (Indirection): Extended implementation to accept
15163         fixed buffer field.
15164         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15165         (ElementAccess.MakePointerAccess): Get type as parameter.
15166         (DoResolve): Add fixed buffer field expression conversion.
15167         (DoResolveLValue): Ditto.
15168         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15169         (ArrayPtr): Derives from FixedBufferPtr.
15170         (ArrayPtr.Emit): Add extra emit for array elements.
15171
15172         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15173
15174         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15175         for compiler generated types.
15176         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15177
15178         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15179         and consume less memory.
15180         (Fixed.Resolve): Add fixed buffer case.
15181
15182         * typemanager.cs (compiler_generated_attr_ctor,
15183         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15184         (HasElementType): Add our own implementation to work on every
15185         runtime.
15186
15187 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15188
15189         * anonymous.cs (CaptureContext): Track whether `this' has been
15190         referenced.   
15191
15192         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15193         only captured `this' if it was implicitly done (instance
15194         methods/variables were used). 
15195
15196         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15197         `this' must be captured.
15198
15199 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15200  
15201         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15202         is null it means that there has been no need to capture anything,
15203         so we just create a sibling.
15204
15205         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15206
15207         Just a partial fix.  The other half is fairly elusive.
15208         
15209 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15210
15211         Fix #52586, cs0121-4.cs.
15212         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15213         and return a hashtable.
15214         (MemberCache.ClearDeclaredOnly): New.
15215         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15216         the method_hash of a base type too.
15217         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15218         type methods.  Overwrite entries with the same MethodHandle so
15219         that the ReflectedType is correct.  The process leaves in base
15220         virtual functions and their overrides as distinct entries.
15221         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15222         matters since it was boxed in a ArrayList before.
15223         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15224         modifier.
15225         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15226         case of a virtual function and its override (choose the overload
15227         as better).
15228         (Invocation.OverloadResolve): Avoid 'override' members during
15229         'applicable_type' calculation.
15230
15231 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15232
15233         Combine two near-redundant caches.
15234         * typemanager.cs (method_params): Rename from method_internal_params.
15235         (TypeManager.GetParameterData): New.  Replace
15236         Invocation.GetParameterData.
15237         (TypeManager.LookupParametersByBuilder): Remove.
15238         * expression.cs (Invocation.method_parameter_cache): Remove.
15239         (Invocation.GetParameterData): Remove.
15240         Update to changes.
15241         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15242         Update to changes.
15243
15244 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15245
15246         Fix #72015.
15247         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15248         TypeManager.multicast_delegate_type is null, resolve it by looking
15249         up "System.MulticastDelegate".
15250         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15251
15252 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15253             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15254             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15255
15256         Fix cs0164.cs.
15257         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15258         (LabeledStatement.AddReference): New.  Set 'referenced'.
15259         (Goto.Resolve): Use it.
15260
15261 2005-02-05  John Luke  <john.luke@gmail.com>
15262
15263         * driver.cs: remove duplicate -doc line in Usage ()
15264
15265 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15266
15267         * location.cs (Location.AddFile): Fix CS2002 error report.
15268
15269 2005-02-02  Martin Baulig  <martin@ximian.com>
15270
15271         * delegate.cs (Delegate.DefineType): Report an internal error if
15272         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15273         details.        
15274
15275 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15276
15277         Fix a crasher in a variant of #31984.
15278         * const.cs (Constant.CheckBase): New override that defers the
15279         new-or-override check in case the base type hasn't been populated
15280         yet.
15281         (Constant.Define): Ensure the new-or-override check is performed.
15282
15283 2005-02-01  Duncan Mak  <duncan@ximian.com>
15284
15285         * const.cs (LookupConstantValue): Check that `ce' is not null
15286         before calling GetValue ().
15287
15288 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15289
15290         Fix test-334.cs (#69519).
15291         * cs-parser.jay (using_alias_directive): Pass in an expression to
15292         NamespaceEntry.UsingAlias.
15293         (using_namespace_directive): Pass in an expression to
15294         NamespaceEntry.Using.
15295         (namespace_name): Don't flatten to a string.
15296         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15297         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15298         ResolveAsTypeStep.
15299         (NamespaceEntry.UsingEntry): Likewise.
15300         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15301         changes.
15302         (NamespaceEntry.LookupForUsing): Remove.
15303         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15304         names.
15305         (NamespaceEntry.Lookup): Remove support for dotted names.
15306
15307 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15308
15309         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15310         split into two.
15311         (NamespaceEntry.ImplicitParent): Compute on demand.
15312         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15313         parallels the current.
15314         (NamespaceEntry.LookupForUsing): Use it.
15315         (NamespaceEntry.Lookup): If the current namespace-entry is
15316         implicit, don't search aliases and using tables.
15317
15318 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15319
15320         Fix #31984.
15321         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15322         BaseCache here.
15323         (TypeContainer.BaseCache): Compute on demand.
15324         (TypeContainer.FindMembers): Define constants and types if they're
15325         not already created.
15326         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15327         check.
15328         * const.cs (Constant.Define): Make idempotent.
15329
15330 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15331
15332         * pending.cs: Produce better code (no nops produced by using Ldarg
15333         + value).
15334         
15335         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15336         i - 1' it should be arg + 1.
15337
15338         Fixes bug #71819.
15339
15340 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15341
15342         * attribute.cs (Attribute.CheckAttributeType): Make private
15343         non-virtual.
15344         (Attribute.ResolveType): Make virtual.
15345         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15346         handling of RootContext.Tree.Types.
15347
15348 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15349
15350         Update attribute-handling to use the SimpleName/MemberAccess
15351         mechanisms.
15352         * cs-parser.jay (attribute): Pass in an expression to the
15353         constructors of Attribute and GlobalAttribute.
15354         * attribute.cs (Attribute): Take an expression for the name.
15355         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15356         passed in attribute name expression.
15357         (Attribute.CheckAttributeType): Use it.
15358         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15359         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15360         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15361         argument to prevent error messages if the lookup fails.
15362
15363 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15364
15365         * expression.cs (Indirection): Implemented IVariable interface
15366         to support indirection in AddressOf operator.
15367         (PointerArithmetic.Emit): Add optimalization for case where
15368         result can be precomputed.
15369
15370 2005-01-26  Martin Baulig  <martin@ximian.com>
15371
15372         * class.cs (TypeContainer.AttributeTargets): Return the correct
15373         AttributeTargets depending on our `Kind' instead of throwing an
15374         exception; fixes #71632.
15375
15376 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15377
15378         Fix #71257
15379         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15380         constant members.
15381
15382 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15383
15384         Fix #71602.
15385         * expression.cs (MemberAccess.DoResolve): Don't complain with
15386         cs0572 when the LHS of a member access has identical name and type
15387         name.
15388
15389 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15390
15391         Fix #71651, #71675
15392         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15393         CreatePermission.
15394         Create custom PermissionSet only for PermissionSetAttribute.
15395
15396 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15397
15398         Fix #71649
15399         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15400         delegates in static class.
15401
15402 2005-01-24  Martin Baulig  <martin@ximian.com>
15403
15404         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15405         merging an implicit block, just use its reachability.
15406
15407         * statement.cs (Block.Resolve): Make the unreachable code check
15408         work wrt. implicit blocks; see test-337 from #63842.
15409
15410 2005-01-21  Alp Toker  <alp@atoker.com>
15411  
15412         * cs-parser.jay: destructor_declaration's container is PartialContainer
15413         not Class when partial types are used, so use Kind prop instead of
15414         'is'.
15415         
15416 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15417
15418         * cs-parser.jay: Improve error reporting when an interface
15419         declares new types.
15420
15421 2005-01-20  Dick Porter  <dick@ximian.com>
15422
15423         * support.cs: SeekableStreamReader fix from Sandor Dobos
15424         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15425         chars are read.  Fixes bug 70369.
15426
15427 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15428
15429         * cs-parser.jay (catch_clause): Simplify current_block handling
15430         somewhat.
15431
15432 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15433
15434         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15435         code with ImplicitStandardConversion to handle the implicit
15436         conversion of method groups into valid delegate invocations. 
15437
15438         The problem is that in parameter handling we were using this code
15439         path.  Fixes bug #64698
15440
15441 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15442
15443         * cs-parser.jay: Fix several infelicities.
15444         - Avoid assigning to the parser value stack.  Code like 
15445           '$3 = null' is unclean.  Synthesize a value for the code block
15446           instead. 
15447         - Avoid using oob_stack for storing location information.  Use ...
15448         (_mark_): ... this.  New (empty) rule.  Saves the current location
15449         in $$.
15450         (foreach_statement): Avoid using oob_stack for current_block
15451         handling.  Use technique used in for_statement and
15452         using_statement.  Synthesize a value for the code block to store
15453         additional intermediate information.
15454
15455 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15456
15457         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15458         of a different type is only allowed to private fields of a
15459         containing type, not on fields of a base class.
15460
15461         See test-174.cs and error cs0122-9.cs
15462
15463 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15464
15465         Fix test-335.cs (bug #58126).
15466         * cs-parser.jay (argument): Split out non-expression parts of the
15467         rule into 'non_simple_argument'.
15468         (invocation_expression): Support parenthesized invocations with
15469         multiple arguments, and with single non-simple arguments.
15470
15471 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15472
15473         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15474         places.
15475
15476 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15477
15478         Fix cs0038-1.cs, cs1640-6.cs.
15479         * ecore.cs (Expression.Resolve): Remove special-case for
15480         SimpleName in error-handling.
15481         (Expression.almostMatchedMembers): Relax access permission to
15482         protected.
15483         (Expression.MemberLookupFailed): Handle duplicates in
15484         almostMatchedMembers list.
15485         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15486         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15487         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15488         overload if the passed in MemberInfo is a MethodBase.
15489
15490 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15491
15492         Fix #70749
15493         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15494         for non-CAS & merge permission sets properly.
15495
15496 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15497
15498         Improve standard-compliance of simple name and member access 
15499         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15500         * ecore.cs (FullNamedExpression): New abstract base class 
15501         for Namespaces and TypeExpressions.
15502         (ResolveFlags.SimpleName): Remove.
15503         (SimpleName): Remove support for dotted names.
15504         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15505         DeclSpace.FindType and DeclSpace.LookupType.
15506         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15507         (Expression.ExprClassName): Make member function.
15508         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15509         a namespace.  Remove creation of dotted "SimpleName"s.
15510         (MemberAccess.DoResolve): Likewise.
15511         * decl.cs (DeclSpace.Cache): Make private.
15512         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15513         (DeclSpace.FindType): Update.
15514         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15515         FullNamedExpression.
15516         * namespace.cs (Namespace): Derive from FullNamedExpression
15517         so that it can be part of expression resolution.
15518         (Namespace.Lookup): Return an FullNamedExpression.
15519         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15520         namespace.
15521         * rootcontext.cs (NamespaceLookup): Remove.
15522         (LookupType): Move to DeclSpace.
15523         * attribute.cs (CheckAttributeType): Update.
15524         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15525         (FindDocumentedTypeNonArray): Likewise.
15526
15527 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15528
15529         Fix cs0509.cs, cs1632.cs.
15530         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15531         is the same as IsInterface.
15532         (TypeContainer.GetClassBases): Likewise.
15533         * statement.cs (LabeledStatement.ig): New field.
15534         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15535         label.
15536         (LabeledStatement.DoEmit): Check that the label was created with
15537         the same ILGenerator.
15538
15539 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15540
15541         Fix #71058
15542         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15543         accessors to its properties.
15544
15545         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15546         from accessors to property.
15547         
15548 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15549
15550         Fix #70722
15551         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15552         only for overrides.
15553         
15554 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15555
15556         * attribute.cs: Check for null and empty strings.  
15557
15558         I have lost another battle to Paolo.
15559
15560 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15561
15562         Fix #70942
15563         * class.cs (PropertyMethod): Set Parent field in ctors.
15564         (SetMethod.InternalParameters): Add unsafe switch hack.
15565         Override MarkForDuplicationCheck where it is appropriate.
15566
15567         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15568         It says whether container allows members with the same name.
15569         Base default is no.
15570         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15571         Removed is_method parameter.
15572
15573 2005-01-06  Duncan Mak  <duncan@ximian.com>
15574
15575         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15576         because the previous change led to incorrect reporting of CS1032
15577         ("Cannot define/undefine preprocessor symbols after first token in
15578         file"). Instead of using `tokens_seen' as the only flag that
15579         triggers CS1040, introduce `comments_seen'. This new flag is used
15580         to signify having seen comments on the current line, so it is
15581         unset after a newline.
15582
15583 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15584
15585         * doc.cs : When searching for a type, find nested type too.
15586           This fixes bug #71040.
15587
15588 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15589
15590         * doc.cs :
15591           - Warn missing member comment on those classes which also does not
15592             have doc comments. Fixed bug #71041.
15593           - Don't warn missing doc comment on default constructor.
15594             Fixed bug #71042.
15595
15596 2005-01-06  Duncan Mak  <duncan@ximian.com>
15597
15598         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15599         comments, set `tokens_seen' to true. This allows us to detect
15600         misplaced preprocessor directives (i.e. not at the beginning of
15601         the a line, nor after whitespaces). In that case, report error
15602         CS1040. This fixes bug #56460.
15603
15604         * cs-parser.jay (interface_member_declaration): Add checks for
15605         IsExplicitImpl, and report CS0541 error if an interface member is
15606         defined as an explicit interface declaration.
15607
15608 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15609
15610         Fix #70817
15611         * class.cs (PropertyMethod): Set Parent field in ctors.
15612         (SetMethod.InternalParameters): Add unsafe switch hack.
15613         
15614         * decl.cs (MemberCore.Parent): Cannot be readonly.
15615
15616 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15617
15618         * decl.cs (DeclSpace.ResolveType): Remove.
15619         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15620         Merge in code from ...
15621         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15622         * class.cs, enum.cs: Update to changes.
15623
15624 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15625
15626         * anonymous.cs: Ensure that we init the scope of our parent if it
15627         has not been initialized yet.
15628
15629 2004-12-30  Duncan Mak  <duncan@ximian.com>
15630
15631         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15632         if field.FieldBuilder is null. Fixes #70758.
15633
15634         * convert.cs: Fixed some typos and updated some of the comments.
15635         (ImplicitStandardConversionExists):
15636         (TryImplicitIntConversion): If `target_type' is an interface and
15637         the type of `ic' implements this interface, return true or a new
15638         BoxedCast instead of null. This fixes #70468.
15639
15640 2004-12-29  Duncan Mak  <duncan@ximian.com>
15641
15642         * expression.cs (Argument.Emit): Check that Expr is
15643         IMemoryLocation before casting to it, and report CS1510 otherwise.
15644
15645         This fixes #70402.
15646
15647 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15648
15649         * statement.cs (Block.ThisVariable): remove the recursion here, to
15650         make the --profile more sane.
15651
15652 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
15653
15654         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
15655         assembly, by JB Evain.
15656
15657 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15658
15659         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
15660           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
15661         "parent" refers to enclosing type/class.  "base" refers to superclass.
15662
15663 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15664
15665         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15666         Ensure that we only have GlobalAttributes.
15667         * attribute.cs (Attribute.Emit): Make non-virtual.
15668         (GlobalAttribute.Emit): Remove.
15669         (Attribute.Resolve): Make virtual.
15670         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
15671         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
15672         the argument. Don't create one.
15673         (Attribute.GetObsoleteAttribute): Likewise.
15674         (Attribute.GetClsCompliantAttributeValue): Likewise.
15675         * class.cs, decl.cs: Update to changes.
15676
15677 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
15678
15679         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
15680         
15681         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
15682         
15683         * statement.cs (Foreach.Resolve): Add error 186 report.
15684
15685 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
15686
15687         * expression.cs (Conditional.DoResolve): Add warning 429.
15688         
15689         * statement.cs (If.Resolve): Add warning 665.
15690
15691 2004-12-16  Raja R Harinath  <rharinath@novell.com>
15692
15693         New invariant: RootContext.Tree.Types.NamespaceEntry == null
15694         except when in the parser, and in GlobalAttribute.
15695         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
15696         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
15697         RootContext.Tree.Types.NamespaceEntry once work is done.
15698         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
15699         and resets RootContext.Tree.Types.NamespaceEntry.
15700
15701 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
15702
15703         * cs-parser.jay: Don't create a block for every variable.
15704
15705 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
15706
15707         * location.cs: Provide extra information.
15708
15709         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
15710         variables from the captured environment, it is the ldarg_0.
15711
15712 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15713
15714         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
15715         find a conclusion.
15716         
15717         * class.cs: Changed warning level for 169 to avoid developer
15718         displeasure from warning flooding. It will be changed back when they
15719         fix most of current BCL warnings.
15720         
15721         * RootContext.cs: Pushed default WarningLevel to 3.
15722         
15723         * statement.cs: Removed unused variable.
15724
15725 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15726
15727         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
15728         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
15729         Add error 502 report.
15730         (StaticClass.DefineType): Add error 441 report.
15731         (Class.AllowedModifiersProp): New virtual property as temporary
15732         extension to AllowedModifiers.
15733         (Class.DefineType): Add error 418 report. Moved ModFlags check here
15734         to share implementation with StaticClass and don't call virtual
15735         methods from ctor.
15736         
15737         * driver.cs (MainDriver): Add error 1558 test.
15738
15739         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
15740         report. Moved error 36 test here.
15741
15742         * statement.cs (Throw.Resolve): Add error 724 report.
15743
15744         * typemanager.cs: Add out_attribute_type core type.
15745         
15746 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
15747
15748         * class.cs (TypeContainer.VerifyClsCompliance): Add error
15749         3018 report.
15750         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
15751
15752         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
15753         3017 report.
15754         
15755         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
15756
15757         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
15758         Add error 3023 report.
15759         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
15760
15761         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
15762         implementation.
15763
15764 2004-12-12  John Luke  <john.luke@gmail.com>
15765
15766         * driver.cs (AddArgs): take -- into account when
15767         adding arguments, fixes bug 65710 
15768
15769 2004-12-12  Martin Baulig  <martin@ximian.com>
15770
15771         * expression.cs (Unary.TryReduceNegative): Added support for
15772         SByteConstant and ByteConstant.
15773         (Unary.Reduce): Check error values from TryReduceNegative().
15774
15775 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
15776
15777         * attributes.cs (Attribute.Resolve): Avoid multiple error report
15778         and report exception as error 182.
15779
15780 2004-12-10  Raja R Harinath  <rharinath@novell.com>
15781
15782         * driver.cs (Main): Fix message when there are warnings.
15783
15784 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
15785
15786         * delegate.cs: Fixed my fix from yesterday, sorry about that.
15787
15788 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
15789
15790         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
15791         Reduced number of warnings.
15792         
15793         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
15794
15795 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
15796
15797         * driver.cs: Removed message.
15798
15799         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
15800
15801 2004-12-08    <vargaz@freemail.hu>
15802
15803         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
15804
15805 2004-12-08  Martin Baulig  <martin@ximian.com>
15806
15807         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
15808         instead of a CS3002 for properties and indexer.
15809
15810 2004-12-08  Martin Baulig  <martin@ximian.com>
15811
15812         * decl.cs (MemberName.ToString): Make this work again.
15813
15814 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
15815
15816         * attribute.cs (Resolve): Add error 591 detection.
15817
15818         * class.cs (FieldMember.Define): Add error 1547 detection.
15819         (Indexer.Define): Add error 620 detection.
15820         (Operator.Define): Add error 590 detection.
15821
15822         * ecore.cs: Missing argument for error 79.
15823
15824         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
15825         detection.
15826
15827 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
15828
15829         Fix #70106
15830         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
15831         only.
15832
15833 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
15834
15835         * cs-parser.jay : handle doc comments on implicit/explicit operators.
15836           Some operator comments were suppressed.
15837         * doc.cs : Implicit/explicit operator name in doc comments are like
15838           "op_Explicit(type)~returnType", so added suffix handling.
15839
15840 2004-12-07  Martin Baulig  <martin@ximian.com>
15841
15842         * decl.cs
15843         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
15844         (MemberCore.GetClsCompliantAttributeValue): Likewise.
15845         (DeclSpace.ec): New protected field; store the EmitContext here.
15846         (DeclSpace.EmitContext): New public property; moved here from
15847         `TypeContainer'.
15848         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
15849         EmitContext.
15850
15851         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
15852         (Enum.Emit): Don't create a new EmitContext.
15853
15854         * delegate.cs (Delegate.DefineType): Always create the
15855         EmitContext.
15856
15857         * iterators.cs (Iterators.DefineIterator): Create a new
15858         EmitContext and store it in `ec'.
15859
15860 2004-08-24  Martin Baulig  <martin@ximian.com>
15861
15862         * typemanager.cs
15863         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
15864         this for accessibility checks.
15865         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
15866         IsNestedFamilyAccessible.
15867         (TypeManager.IsSubclassOf): New method, do what the name actually
15868         says.   
15869
15870 2004-12-06  Raja R Harinath  <rharinath@novell.com>
15871
15872         Fix crash on cs0657-17.cs.
15873         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15874         Use RootContext.Tree.Types, not 'new RootTypes ()'.
15875         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
15876         the case where the NamespaceEntry gets overwritten.
15877
15878 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
15879
15880         Fixed #69195, #56821
15881         * ecore.cs (ResolveBoolean): Tiny refactoring.
15882
15883         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
15884         of right expression resolving when left is false constant and
15885         operator is LogicalAnd OR true constant and operator is LogicalOr.
15886
15887         * statement.cs (ResolveUnreachable): Always reports warning.
15888
15889 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
15890
15891         * class.cs: Distinguish between 1721 and 1722 (just a little help
15892         for the programmer).
15893
15894 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
15895
15896         * delegate.cs: Only allow this on new versions of the language. 
15897
15898 2004-12-02  Duncan Mak  <duncan@ximian.com>
15899
15900         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
15901         Expression class.
15902         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
15903         here as a static method. Take an additional bool out parameter
15904         `must_do_cs1540_check' for signaling to InstanceResolve.
15905         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
15906         member field from PropertyExpr class and made it an argument of
15907         the method instead.
15908         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
15909         check for MarshalByRefObject, and report CS0122 instead of CS1540.
15910         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
15911         and `remove_accessor' as well as InstanceResolve: report CS0122
15912         where applicable.
15913
15914         Fixes #70129.
15915
15916 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15917
15918         Fix test-327.cs, test-328.cs, and put in early infrastructure
15919         for eventually fixing #52697.
15920         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
15921         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
15922         from other methods.
15923         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
15924         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
15925         (VerifyUsing, error246): Update.
15926         * rootcontext.cs (RootContext.NamespaceLookup): Just use
15927         'NamespaceEntry.LookupNamespaceOrType'.
15928
15929 2004-12-03  Martin Baulig  <martin@ximian.com>
15930
15931         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15932         method as our child, call AnonymousMethod.Compatible() on it.
15933
15934 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15935
15936         Disable XML documentation support in 'basic' profile.
15937         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
15938         Redirect XmlElement to System.Object.
15939         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
15940         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
15941         * mcs.exe.sources: Add doc-bootstrap.cs.
15942         * doc-bootstrap.cs: New file.  Contains empty stub implementation
15943         of doc.cs.
15944
15945 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
15946
15947         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
15948           comments are allowed.
15949
15950 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
15951
15952         * delegate.cs: Add checks for subtypes in paramaters and return values
15953         in VerifyMethod () to add support for Covariance/Contravariance
15954         in delegates.
15955         
15956 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
15957
15958         * report.cs: Remove extra closing parenthesis.
15959
15960         * convert.cs (Error_CannotImplicitConversion): If the name of the
15961         types are the same, provide some extra information.
15962
15963         * class.cs (FieldBase): Use an unused bit field from the field to
15964         encode the `has_offset' property from the FieldMember.  This saves
15965         a couple of Ks on bootstrap compilation.
15966
15967         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15968         method as our child, return the AnonymousMethod resolved
15969         expression.
15970
15971         * expression.cs (New.DoResolve): Allow return values from
15972         NewDelegate to also include AnonymousMethods.
15973
15974         Fixes #70150.
15975
15976 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
15977
15978         Fix bug #70102
15979         * attribute.cs (Resolve): Improved implementation of params
15980         attribute arguments.
15981
15982         * support.cs (ParameterData): Add HasParams to be faster.
15983
15984 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
15985
15986         all things are for /doc support:
15987
15988         * doc.cs: new file that supports XML documentation generation.
15989         * mcs.exe.sources: added doc.cs.
15990         * driver.cs:
15991           Handle /doc command line option.
15992           Report error 2006 instead of 5 for missing file name for /doc.
15993           Generate XML documentation when required, after type resolution.
15994         * cs-tokenizer.cs:
15995           Added support for picking up documentation (/// and /** ... */),
15996           including a new XmlCommentState enumeration.
15997         * cs-parser.jay:
15998           Added lines to fill Documentation element for field, constant,
15999           property, indexer, method, constructor, destructor, operator, event
16000           and class, struct, interface, delegate, enum.
16001           Added lines to warn incorrect comment.
16002         * rootcontext.cs :
16003           Added Documentation field (passed only when /doc was specified).
16004         * decl.cs:
16005           Added DocComment, DocCommentHeader, GenerateDocComment() and
16006           OnGenerateDocComment() and some supporting private members for
16007           /doc feature to MemberCore.
16008         * class.cs:
16009           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
16010         * delegate.cs:
16011           Added overriden DocCommentHeader.
16012         * enum.cs:
16013           Added overriden DocCommentHeader and GenerateDocComment().
16014
16015 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
16016
16017         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
16018         unwrapping the enumeration values, chain to
16019         DoConstantNumericPromotions again, so we can promote things to the
16020         fundamental types (takes care of enums that are bytes, sbytes).
16021
16022         Fixes bug #62054.
16023
16024 2004-12-01  Raja R Harinath  <rharinath@novell.com>
16025
16026         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
16027         Fix long-standing bug in type-lookup.  Use FindType instead of
16028         LookupType when ec.ResolvingTypeTree.
16029         (Attribute.ResolveType, Attribute.Resolve)
16030         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
16031         Update to changes.
16032         (Attributes.Search): Remove internal version.  Update.
16033         (Attributes.SearchMulti): Update.
16034         (Attributes.GetClsCompliantAttribute): Remove.
16035         (Attributes.GetIndexerNameAttribute): Remove.
16036         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
16037         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
16038         * class.cs (Indexer.Define): Likewise.
16039
16040 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
16041
16042         Fix bug #68790
16043         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
16044         MarshallByReference members access.
16045
16046         * expression.cs: Use CheckMarshallByRefAccess;
16047         Better error CS0197 message.
16048
16049         * report.cs: Print whole related error message.
16050
16051 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16052
16053         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16054         the current directory to help debugging.
16055
16056 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16057
16058         * class (GetClassBases): Better error 60 report.
16059         (EventProperty): Disabled warning 67 detection.
16060
16061 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16062
16063         Fix bug #60324
16064         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16065
16066         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16067         precise values.
16068
16069 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16070
16071         Fix bug #49488
16072         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16073
16074         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16075
16076 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16077
16078         * attribute.cs (Attribute.Resolve): Refine error reporting and
16079         report a cs0117 if the identifier does not exist, to distinguish
16080         from 0617 which is a miss-use of the actual identifier.
16081
16082         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16083         between cs0070 and cs0079.
16084
16085         * class.cs (MemberBase.DoDefine): When reporting a wrong
16086         accessibility level, we use MethodCore to compare instead of
16087         Method (this was a regression in some refactoring effort).
16088
16089         So now we correctly report cs0056 again.
16090
16091         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16092         testing the target_type (which was known to be object_type) and
16093         not the source type (which is anonymous_method).
16094
16095         Fixed reporting of error cs1660.
16096
16097         * expression.cs (UserCast.Source): Expose the underlying cast.
16098
16099         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16100         allowed types to find a match to int32 first (most common).
16101
16102         In addition, it ignores any ImplicitUserConversions that did an
16103         internal implicit conversion (as the switch statement allows only
16104         one integral conversion to exist).
16105
16106         * class.cs (PartialContainer.Create): rename `name' to
16107         `member_name' for clarity.  Then replace the string calls with a
16108         call to MemberName.GetPartialName, as now using
16109         MemberName.ToString is an error (this is due to the side effects
16110         it had, that were fixed in the past).
16111
16112         This will restore the error reporting on a number of partial class
16113         errors that were missusing this (and getting an exception as a
16114         results, which is now just a plain textual warning, because
16115         yyparse debug output would crash otherwise).
16116
16117 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16118
16119         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16120
16121 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16122
16123         * rootcontext.cs (LookupType): Make sure to cache lookups that
16124         don't give us a negative result. This saves about 5% of corlib
16125         compilation time.
16126
16127 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16128
16129         * report.cs (AbstractMessage.Print): messages are sent to stderr
16130
16131         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16132         non-interface in the list of interfaces (at this point, either
16133         parent was properly set, or a base class is being listed in the
16134         interfaces section).
16135
16136         This flags error 1722, and resolves the crash from bug 69259.
16137
16138 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16139
16140         * statement.cs (Using.EmitExpressionFinally): make this work right
16141         for valuetypes. Fixes 69926.
16142
16143 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16144
16145         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16146         converted to an enum" here, before we try to change the underlying
16147         type.  This code exists, but it is a different code path than the
16148         one used while encoding constants.
16149
16150         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16151         old bug: when converting from the null literal to a pointer,
16152         return an EmptyCast, not the NullLiteral.
16153
16154         This fixes #69921, the recent null_type changes probably made this
16155         bug more prominent.
16156
16157         (ImplicitReferenceConversionExists): In addition, resynchronized
16158         the code here, so it matches the same code in
16159         ImplicitReferenceConversionExists for the `from any class-type S
16160         to any interface-type T'.
16161         
16162
16163 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16164
16165         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16166
16167 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16168
16169         * cs-parser.jay: Use verbosity accordingly. 
16170
16171 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16172
16173         * expression.cs (Unary.ResolveOperator): Do not report warning;
16174         AddressOf reads from variable.
16175         
16176         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16177
16178 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16179
16180         Fix bug #69462
16181
16182         * attribute.cs (Attributable): Removed CheckTargets.
16183         (Attributes.Emit): Explicit attribute targets are tested here.
16184
16185         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16186         not enabled for interfaces.
16187
16188         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16189         (GetAssemblyName): Ouch next bug there.
16190
16191 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16192
16193         * expression.cs: Error 275 added.
16194         
16195 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16196
16197         Fix bug #69177 (Implemented decimal constant support)
16198
16199         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16200         (BinaryFold): Add DecimalConstant.
16201
16202         * const.cs (Define): Decimal constant 
16203         (is not constant.
16204         (ChangeType): Add decimal type handling.
16205         (LookupConstantValue): Don't set value for decimal type but
16206         emit DecimalConstantAttribute. Needed for constant optimization.
16207
16208         * constant.cs (ToDecimal): New method.
16209         (ConvertToDecimal): New method.
16210         (IntConstant): Implemented ConvertToDecimal.
16211         (DecimalConstant.Emit): Emit optimized version for decimals in
16212         int range.
16213
16214         * expression.cs (ResolveOperator): Changed order of constant
16215         reduction to work correctly with native types which have
16216         overloaded operators.
16217         (ResolveMemberAccess): Extract constant value from attribute
16218         for decimal type.
16219
16220         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16221
16222         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16223         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16224         (ChangeType): Decimal is special.
16225         (TypeToCoreType): Add decimal type.
16226
16227 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16228
16229         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16230         decimal types.
16231
16232 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16233
16234         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16235         test cs1667-5.cs.
16236
16237 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16238
16239         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16240
16241         * pending.cs (PendingImplementation): Grab only interfaces.
16242
16243 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16244
16245         * statement.cs (ForeachHelperMethods): Add location member and
16246         error 202 detection.
16247
16248 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16249
16250         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16251         automatically handled by executable.make.
16252         (PROGRAM): Make profile-specific.
16253
16254 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16255
16256         * expression.cs (DoResolveBase): Fixed wrong warning for out
16257         variables.
16258
16259 2004-11-18  Martin Baulig  <martin@ximian.com>
16260
16261         Merged latest changes into gmcs.  Please keep this comment in
16262         here, it makes it easier for me to see what changed in MCS since
16263         the last time I merged.
16264
16265 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16266
16267         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16268         (TypeHandle.GetMemberCache): New.
16269         (TypeHandle.TypeHandle): Update.
16270         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16271         (TypeManager.LookupParentInterfacesCache):
16272         Rename from LookupInterfaceCache.  Optimize slightly.
16273         (TypeManager.MemberLookup_FindMembers): Update.
16274         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16275         multi-type variant.
16276         (AddCacheContents): Rename from AddHashtable.
16277         * class.cs (TypeContainer.parent_container): Remove.
16278         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16279         (TypeContainer.DoDefineMembers): Don't initialize it.
16280         Update to name changes.
16281         
16282 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16283
16284         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16285         that factors the code to check access modifiers on override.  
16286
16287         (PropertyBase): Use the code here.
16288
16289         Patch from Lluis S'anchez, fixes bug #69361.
16290
16291 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16292
16293         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16294         routine that is used to report the use of a captured variable
16295         whose address has been taken.
16296
16297         There are two checks: one when variables are being captured and
16298         the other check is when the address of a variable is taken. 
16299         
16300         (because an anonymous methods might be resolved before *or* after
16301         the address has been taken) and 
16302
16303         * expression.cs (Conditional.DoResolve): Remove the special
16304         casing that Martin added to trueExpr and falseExpr being both
16305         NullLiteral.  We get the right behavior now just by introducing
16306         the null_type into the compiler. 
16307
16308         * convert.cs (ExplicitConversion): Change the code to use
16309         null_type instead of testing `expr is NullLiteral'.
16310         (ImplicitConversionStandard): use null_type too.
16311         (ImplicitReferenceConversionExists): use null_type too.
16312         (ImplicitReferenceConversion): use null_type too.
16313
16314         * literal.cs: The type of `NullLiteral' is now null_type instead
16315         of object_type. 
16316         (Resolve): Set the type here.
16317
16318         * typemanager.cs: Introduce null_type.
16319
16320 2004-11-17  Martin Baulig  <martin@ximian.com>
16321
16322         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16323         direction, like FindMembers() does.  Fixes #69546, testcase is in
16324         test-315.cs.    
16325
16326 2004-11-16  Martin Baulig  <martin@ximian.com>
16327
16328         This is based on a patch from Marek Safar, see bug #69082.
16329         Fixes bugs #63705 and #67130.
16330
16331         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16332         method; create a MemberCache for an interface type and cache the
16333         result.
16334
16335         * decl.cs (IMemberContainer.ParentContainer): Removed.
16336         (IMemberContainer.ParentCache): New property.
16337         (MemberCache.SetupCacheForInterface): Removed.
16338         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16339         to create a cache for an interface's "parent".
16340
16341         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16342         interfaces too.
16343
16344 2004-11-16  Martin Baulig  <martin@ximian.com>
16345
16346         Merged back from gmcs; these changes already went into gmcs a
16347         couple of weeks ago.
16348
16349         * typemanager.cs
16350         (TypeManager.AddUserType): Removed the `ifaces' argument.
16351         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16352         `TypeExpr []'.
16353         (TypeManager.AddUserInterface): Removed.
16354         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16355         `TypeExpr []'.
16356         (TypeManager.GetInterfaces): Likewise.
16357         (TypeManager.GetExplicitInterfaces): Likewise.
16358
16359         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16360
16361         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16362         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16363
16364 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16365
16366         * statement.cs: Avoid adding bools to a hashtable.
16367
16368 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16369
16370         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16371         calling an unsafe method from a safe location.
16372
16373 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16374
16375         Fix #69167
16376         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16377
16378 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16379
16380         * namespace.cs (VerifyUsing): use GetPartialName instead of
16381         ToString. 
16382
16383 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16384
16385         * statement.cs (Return.Resolve): Fix regression in typo: if
16386         `in_exc', we have to request a NeedReturnLabel, this was a typo
16387         introduced in the anonymous method check-in.  Fixes #69131.
16388
16389         * Indexers were using the ShortName when defining themselves,
16390         causing a regression in the compiler bootstrap when applying the
16391         patch from 2004-11-02 (first part), now they use their full name
16392         and the bug is gone.
16393
16394 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16395
16396         * driver.cs: Strip the path from the names of embedded resources. Fixes
16397         #68519.
16398
16399 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16400
16401         Fix error message regression: cs0104-2.cs.
16402         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16403         (AliasEntry.Resolve): Update.
16404         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16405         'silent' flag.
16406         (RootContext.LookupType): Update.
16407
16408 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16409
16410         * cs-parser.jay: Add support for handling accessor modifiers
16411         * class: Add support port accessor modifiers and error checking,
16412         define PropertyMethod.Define as virtual (not abstract anymore)
16413         * ecore.cs: Add checking for proeprties access with access modifiers
16414         * iterators.cs: Modify Accessor constructor call based in the modified
16415         constructor
16416 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16417
16418         * expression.cs (StringConcat): Handle being called twice,
16419         as when we have a concat in a field init with more than two
16420         ctors in the class
16421
16422 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16423
16424         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16425         special case explicit implementations, we should always produce
16426         the .property or .event declaration.
16427         
16428         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16429         since it will not return correct data if people use this
16430         unresolved in the presence of using statements (see test-313).
16431
16432         * class.cs (MethodData.Define): If we are an explicit interface
16433         implementation, set the method name to the full name of the
16434         interface plus the name of the method.  
16435
16436         Notice that using the method.MethodName.GetFullName() does not
16437         work, as it will only contain the name as declared on the source
16438         file (it can be a shorthand in the presence of using statements)
16439         and not the fully qualifed type name, for example:
16440
16441         using System;
16442
16443         class D : ICloneable {
16444                 object ICloneable.Clone ()  {
16445                 }
16446         }
16447
16448         Would produce a method called `ICloneable.Clone' instead of
16449         `System.ICloneable.Clone'.
16450
16451         * namespace.cs (Alias.Resolve): Use GetPartialName.
16452         
16453 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16454
16455         * cs-parser.jay: Add error 1055 report.
16456
16457 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16458
16459         * assign.cs (Assign.DoResolve): Only do the transform of
16460         assignment into a New if the types are compatible, if not, fall
16461         through and let the implicit code deal with the errors and with
16462         the necessary conversions. 
16463
16464 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16465
16466         * cs-parser.jay: Add error 1031 report.
16467
16468         * cs-tokenizer.cs: Add location for error 1038.
16469
16470 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16471
16472         * cs-parser.jay: Add error 1016 report.
16473
16474 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16475
16476         * cs-parser.jay: Add errors 1575,1611 report.
16477
16478 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16479
16480         * cs-parser.jay: Add error 1001 report.
16481
16482 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16483
16484         Fix #68850
16485         * attribute.cs (GetMarshal): Add method argument for
16486         caller identification.
16487
16488         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16489         agument for GetMarshal and RuntimeMissingSupport.
16490
16491 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16492
16493         * attribute.cs (ExtractSecurityPermissionSet): Removed
16494         TypeManager.code_access_permission_type.
16495
16496         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16497
16498 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16499
16500         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16501         for obsolete use of a variable here.   Fixes regression on errors
16502         cs0619-25 and cs0619-26.
16503
16504 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16505
16506         Fix #62358, implemented security attribute encoding.
16507
16508         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16509         Tests permitted SecurityAction for assembly or other types.
16510         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16511         data from SecurityPermissionAttribute to PermisionSet class.
16512
16513         * class.cs (ApplyAttributeBuilder): Added special handling
16514         for System.Security.Permissions.SecurityAttribute based types.
16515
16516         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16517         special handling for System.Security.Permissions.SecurityAttribute
16518         based types.
16519
16520         * enum.cs (ApplyAttributeBuilder): Added special handling
16521         for System.Security.Permissions.SecurityAttribute based types.
16522
16523         * parameter.cs (ApplyAttributeBuilder): Added special handling
16524         for System.Security.Permissions.SecurityAttribute based types.
16525
16526         * rootcontext.cs: Next 2 core types.
16527
16528         * typemanager.cs (TypeManager.security_permission_attr_type):
16529         Built in type for the SecurityPermission Attribute.
16530         (code_access_permission_type): Build in type.
16531
16532 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16533
16534         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16535         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16536         all of this information into
16537         EmitContext.EmitCapturedVariableInstance.
16538         
16539         * codegen.cs (EmitCapturedVariableInstance): move here the
16540         funcionality of emitting an ldarg.0 in the presence of a
16541         remapping.   This centralizes the instance emit code.
16542
16543         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16544         then emit a load of this: it means that we have reached the
16545         topmost ScopeInfo: the one that contains the pointer to the
16546         instance of the class hosting the anonymous method.
16547
16548         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16549         captures to the topmost CaptureContext.
16550
16551 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16552
16553         * expression.cs (LocalVariableReference): Move the knowledge about
16554         the iterators into codegen's EmitCapturedVariableInstance.
16555
16556 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16557
16558         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16559         all code paths return a value from an anonymous method (it is the
16560         same as the 161 error, but for anonymous methods).
16561
16562 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16563
16564         The introduction of anonymous methods in the compiler changed
16565         various ways of doing things in the compiler.  The most
16566         significant one is the hard split between the resolution phase
16567         and the emission phases of the compiler.
16568
16569         For instance, routines that referenced local variables no
16570         longer can safely create temporary variables during the
16571         resolution phase: they must do so from the emission phase,
16572         since the variable might have been "captured", hence access to
16573         it can not be done with the local-variable operations from the runtime.
16574         
16575         * statement.cs 
16576
16577         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16578         is a toplevel block.
16579
16580         (ToplevelBlock): A new kind of Block, these are the blocks that
16581         are created by the parser for all toplevel method bodies.  These
16582         include methods, accessors and anonymous methods.
16583
16584         These contain some extra information not found in regular blocks:
16585         A pointer to an optional CaptureContext (for tracking captured
16586         local variables and parameters).  A pointer to the parent
16587         ToplevelBlock.
16588         
16589         (Return.Resolve): Catch missmatches when returning a value from an
16590         anonymous method (error 1662).
16591         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16592         phase.
16593
16594         (Break.Resolve): ditto.
16595
16596         (SwitchLabel): instead of defining the labels during the
16597         resolution phase, we now turned the public ILLabel and ILLabelCode
16598         labels into methods called GetILLabelCode() and GetILLabel() that
16599         only define the label during the Emit phase.
16600
16601         (GotoCase): Track the SwitchLabel instead of the computed label
16602         (its contained therein).  Emit the code by using
16603         SwitchLabel.GetILLabelCode ().
16604
16605         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16606         whether the Local has been captured or not.
16607
16608         (LocalInfo.IsCaptured): New property, used to tell whether the
16609         local has been captured.
16610         
16611         * anonymous.cs: Vastly updated to contain the anonymous method
16612         support.
16613
16614         The main classes here are: CaptureContext which tracks any
16615         captured information for a toplevel block and ScopeInfo used to
16616         track the activation frames for various local variables.   
16617
16618         Each toplevel block has an optional capture context associated
16619         with it.  When a method contains an anonymous method both the
16620         toplevel method and the anonymous method will create a capture
16621         context.   When variables or parameters are captured, they are
16622         recorded on the CaptureContext that owns them, for example:
16623
16624         void Demo () {
16625              int a;
16626              MyDelegate d = delegate {
16627                  a = 1;
16628              }
16629         }
16630
16631         Here `a' will be recorded as captured on the toplevel
16632         CapturedContext, the inner captured context will not have anything
16633         (it will only have data if local variables or parameters from it
16634         are captured in a nested anonymous method.
16635
16636         The ScopeInfo is used to track the activation frames for local
16637         variables, for example:
16638
16639         for (int i = 0; i < 10; i++)
16640                 for (int j = 0; j < 10; j++){
16641                    MyDelegate d = delegate {
16642                         call (i, j);
16643                    }
16644                 }
16645
16646         At runtime this captures a single captured variable `i', but it
16647         captures 10 different versions of the variable `j'.  The variable
16648         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
16649         recorded on a child.  
16650
16651         The toplevel ScopeInfo will also track information like the `this'
16652         pointer if instance variables were referenced (this is necessary
16653         as the anonymous method lives inside a nested class in the host
16654         type of the method). 
16655
16656         (AnonymousMethod): Expanded to track the Toplevel, implement
16657         `AnonymousMethod.Compatible' to tell whether an anonymous method
16658         can be converted to a target delegate type. 
16659
16660         The routine now also produces the anonymous method content
16661
16662         (AnonymousDelegate): A helper class that derives from
16663         DelegateCreation, this is used to generate the code necessary to
16664         produce the delegate for the anonymous method that was created. 
16665
16666         * assign.cs: API adjustments for new changes in
16667         Convert.ImplicitStandardConversionExists.
16668
16669         * class.cs: Adjustments to cope with the fact that now toplevel
16670         blocks are of type `ToplevelBlock'. 
16671
16672         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
16673         insteda of standard blocks.
16674
16675         Flag errors if params arguments are passed to anonymous methods.
16676
16677         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
16678         `CurrentAnonymousMethod' which points to the current Anonymous
16679         Method.  The variable points to the AnonymousMethod class that
16680         holds the code being compiled.  It is set in the new EmitContext
16681         created for the anonymous method.
16682
16683         (EmitContext.Phase): Introduce a variable and an enumeration to
16684         assist in enforcing some rules about when and where we are allowed
16685         to invoke certain methods (EmitContext.NeedsReturnLabel is the
16686         only one that enfonces this right now).
16687
16688         (EmitContext.HaveCaptureInfo): new helper method that returns
16689         whether we have a CapturedContext initialized.
16690
16691         (EmitContext.CaptureVariable): New method used to register that a
16692         LocalInfo must be flagged for capturing. 
16693
16694         (EmitContext.CapturedParameter): New method used to register that a
16695         parameters must be flagged for capturing. 
16696         
16697         (EmitContext.CapturedField): New method used to register that a
16698         field must be flagged for capturing. 
16699
16700         (EmitContext.HaveCapturedVariables,
16701         EmitContext.HaveCapturedFields): Return whether there are captured
16702         variables or fields. 
16703
16704         (EmitContext.EmitMethodHostInstance): This is used to emit the
16705         instance for the anonymous method.  The instance might be null
16706         (static methods), this (for anonymous methods that capture nothing
16707         and happen to live side-by-side with the current method body) or a
16708         more complicated expression if the method has a CaptureContext.
16709
16710         (EmitContext.EmitTopBlock): Routine that drives the emission of
16711         code: it will first resolve the top block, then emit any metadata
16712         and then emit the code.  The split is done so that we can extract
16713         any anonymous methods and flag any captured variables/parameters.
16714         
16715         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
16716         during this phase, the ILGenerator should not be used as labels
16717         and local variables declared here might not be accessible to any
16718         code that is part of an anonymous method.  
16719
16720         Exceptions to this include the temporary variables that are
16721         created by some statements internally for holding temporary
16722         variables. 
16723         
16724         (EmitContext.EmitMeta): New routine, in charge of emitting all the
16725         metadata for a cb
16726
16727         (EmitContext.TemporaryReturn): This method is typically called
16728         from the Emit phase, and its the only place where we allow the
16729         ReturnLabel to be defined other than the EmitMeta.  The reason is
16730         that otherwise we would have to duplicate a lot of logic in the
16731         Resolve phases of various methods that today is on the Emit
16732         phase. 
16733
16734         (EmitContext.NeedReturnLabel): This no longer creates the label,
16735         as the ILGenerator is not valid during the resolve phase.
16736
16737         (EmitContext.EmitThis): Extended the knowledge in this class to
16738         work in anonymous methods in addition to iterators. 
16739
16740         (EmitContext.EmitCapturedVariableInstance): This emits whatever
16741         code is necessary on the stack to access the instance to a local
16742         variable (the variable will be accessed as a field).
16743
16744         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
16745         EmitContext.EmitAddressOfParameter): Routines to support
16746         parameters (not completed at this point). 
16747         
16748         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
16749         will also remove the parameters.
16750
16751         * convert.cs (Convert): Define a `ConstantEC' which points to a
16752         null.  This is just to prefity some code that uses
16753         ImplicitStandardConversion code and do not have an EmitContext
16754         handy.
16755
16756         The idea is to flag explicitly that at that point in time, it is
16757         known that the conversion will not trigger the delegate checking
16758         code in implicit conversions (which requires a valid
16759         EmitContext). 
16760
16761         Everywhere: pass new EmitContext parameter since
16762         ImplicitStandardConversionExists now requires it to check for
16763         anonymous method conversions. 
16764
16765         (Convert.ImplicitStandardConversionExists): If the type of an
16766         expression is the anonymous_method_type, and the type is a
16767         delegate, we invoke the AnonymousMethod.Compatible method to check
16768         whether an implicit conversion is possible. 
16769
16770         (Convert.ImplicitConversionStandard): Only do implicit method
16771         group conversions if the language level is not ISO_1.
16772
16773         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
16774         MethodInfo for the Invoke method.  used by Delegate and
16775         AnonymousDelegate.
16776
16777         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
16778         method conversions if the target type is a delegate.
16779
16780         Removed extra debugging nops.
16781
16782         (LocalVariableReference): Turn the `local_info' into a public
16783         field. 
16784
16785         Add `prepared' field, the same hack used for FieldExprs to cope
16786         with composed assignments, as Local variables do not necessarily
16787         operate purely on the stack as they used to: they can be captured
16788         fields. 
16789
16790         Add `temp' for a temporary result, like fields.
16791
16792         Refactor DoResolve and DoResolveLValue into DoResolveBase.
16793
16794         It now copes with Local variables that are captured and emits the
16795         proper instance variable to load it from a field in the captured
16796         case. 
16797
16798         (ParameterReference.DoResolveBase): During the resolve phase,
16799         capture parameters if we are in an anonymous method.
16800
16801         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
16802         anonymous method, use the EmitContext helper routines to emit the
16803         parameter reference.
16804
16805         * iterators.cs: Set RemapToProxy to true/false during the
16806         EmitDispose class.
16807
16808         * parameters.cs (GetParameterByName): New helper method. 
16809
16810         * typemanager.cs (anonymous_method_type) a new type that
16811         represents an anonyous method.  This is always an internal type,
16812         used as a fencepost to test against the anonymous-methodness of an
16813         expression. 
16814         
16815 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
16816
16817         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
16818         561 report.
16819         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
16820
16821 2004-10-18  Martin Baulig  <martin@ximian.com>
16822
16823         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
16824         `Type' directly, but call ResolveType() on it.
16825         (Catch.Resolve): Likewise.
16826         (Foreach.Resolve): Likewise.
16827
16828 2004-10-18  Martin Baulig  <martin@ximian.com>
16829
16830         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
16831         `Type' directly, but call ResolveType() on it.
16832         (Probe.DoResolve): Likewise.
16833         (ArrayCreation.LookupType): Likewise.
16834         (TypeOf.DoResolve): Likewise.
16835         (SizeOf.DoResolve): Likewise.
16836
16837 2004-10-18  Martin Baulig  <martin@ximian.com>
16838
16839         * expression.cs (Invocation.BetterFunction): Put back
16840         TypeManager.TypeToCoreType().
16841
16842 2004-10-18  Raja R Harinath  <rharinath@novell.com>
16843
16844         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
16845         the ResolveType.
16846
16847 2004-10-18  Martin Baulig  <martin@ximian.com>
16848
16849         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
16850         `Type' directly, but call ResolveType() on it.
16851
16852 2004-10-18  Martin Baulig  <martin@ximian.com>
16853
16854         * class.cs (FieldMember.Define): Don't access the TypeExpr's
16855         `Type' directly, but call ResolveType() on it.
16856         (MemberBase.DoDefine): Likewise.
16857
16858         * expression.cs (New.DoResolve): Don't access the TypeExpr's
16859         `Type' directly, but call ResolveType() on it.
16860         (ComposedCast.DoResolveAsTypeStep): Likewise.
16861
16862         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
16863         `Type' directly, but call ResolveType() on it.
16864
16865 2004-10-17  John Luke  <john.luke@gmail.com>
16866
16867         * class.cs (Operator.GetSignatureForError): use CSharpName
16868
16869         * parameter.cs (Parameter.GetSignatureForError): Returns
16870         correct name even if was not defined.
16871
16872 2004-10-13  Raja R Harinath  <rharinath@novell.com>
16873
16874         Fix #65816.
16875         * class.cs (TypeContainer.EmitContext): New property.
16876         (DefineNestedTypes): Create an emitcontext for each part.
16877         (MethodCore.DoDefineParameters): Use container's emitcontext.
16878         Pass type array to InternalParameters.
16879         (MemberBase.DoDefine): Use container's emitcontext.
16880         (FieldMember.Define): Likewise.
16881         (Event.Define): Likewise.
16882         (SetMethod.GetParameterInfo): Change argument to EmitContext.
16883         Pass type array to InternalParameters.
16884         (SetIndexerMethod.GetParameterInfo): Likewise.
16885         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
16886         * delegate.cs (Define): Pass emitcontext to
16887         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
16888         array to InternalParameters.
16889         * expression.cs (ParameterReference.DoResolveBase): Pass
16890         emitcontext to GetParameterInfo.
16891         (ComposedCast.DoResolveAsTypeStep): Remove check on
16892         ec.ResolvingTypeTree.
16893         * parameter.cs (Parameter.Resolve): Change argument to
16894         EmitContext.  Use ResolveAsTypeTerminal.
16895         (Parameter.GetSignature): Change argument to EmitContext.
16896         (Parameters.ComputeSignature): Likewise.
16897         (Parameters.ComputeParameterTypes): Likewise.
16898         (Parameters.GetParameterInfo): Likewise.
16899         (Parameters.ComputeAndDefineParameterTypes): Likewise.
16900         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
16901         * support.cs (InternalParameters..ctor): Remove variant that takes
16902         a DeclSpace.
16903         * typemanager.cs (system_intptr_expr): New.
16904         (InitExpressionTypes): Initialize it.
16905
16906 2004-10-12  Chris Toshok  <toshok@ximian.com>
16907
16908         * cs-parser.jay: fix location for try_statement and catch_clause.
16909
16910 2004-10-11  Martin Baulig  <martin@ximian.com>
16911
16912         * report.cs: Don't make --fatal abort on warnings, we have
16913         -warnaserror for that.
16914
16915 2004-10-07  Raja R Harinath  <rharinath@novell.com>
16916
16917         More DeclSpace.ResolveType avoidance.
16918         * decl.cs (MemberCore.InUnsafe): New property.
16919         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
16920         with newly created EmitContext.
16921         (FieldMember.Define): Likewise.
16922         * delegate.cs (Delegate.Define): Likewise.
16923         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
16924         only if normal name-lookup fails.
16925         (TypeExpr.DoResolve): Enable error-checking.
16926         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
16927         (SizeOf.DoResolve): Likewise.
16928         (ComposedCast.DoResolveAsTypeStep): Likewise.
16929         (StackAlloc.DoResolve): Likewise.
16930         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
16931         (Block.Unsafe): New property.
16932         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
16933         (Unsafe): Set 'unsafe' flag of contained block.
16934         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
16935         (Fixed.Resolve): Likewise.
16936         (Catch.Resolve): Likewise.
16937         (Using.ResolveLocalVariableDecls): Likewise.
16938         (Foreach.Resolve): Likewise.
16939
16940 2004-10-05  John Luke <john.luke@gmail.com>
16941
16942         * cs-parser.jay: add location to error CS0175
16943
16944 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
16945
16946         * ecore.cs (Expression.Constantity): Add support for turning null
16947         into a constant.
16948
16949         * const.cs (Const.Define): Allow constants to be reference types
16950         as long as the value is Null.
16951
16952 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
16953
16954         * namespace.cs (NamespaceEntry.Using): No matter which warning
16955         level is set, check if this namespace name has already been added.
16956
16957 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
16958
16959         * expression.cs: reftype [!=]= null should always use br[true,false].
16960         # 67410
16961
16962 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
16963
16964         Fix #67108
16965         * attribute.cs: Enum conversion moved to 
16966         GetAttributeArgumentExpression to be applied to the all
16967         expressions.
16968
16969 2004-10-01  Raja R Harinath  <rharinath@novell.com>
16970
16971         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
16972         * class.c (TypeContainer.DefineType): Flag error if
16973         base types aren't accessible due to access permissions.
16974         * decl.cs (DeclSpace.ResolveType): Move logic to
16975         Expression.ResolveAsTypeTerminal.
16976         (DeclSpace.ResolveTypeExpr): Thin layer over
16977         Expression.ResolveAsTypeTerminal.
16978         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
16979         Refactor code into NestedAccess.  Use it.
16980         (DeclSpace.NestedAccess): New.
16981         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
16982         argument to silence errors.  Check access permissions.
16983         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
16984         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
16985         (Cast.DoResolve): Likewise.
16986         (New.DoResolve): Likewise.
16987         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
16988         (TypeOf.DoResolve): Likewise.
16989
16990         * expression.cs (Invocation.BetterConversion): Return the Type of
16991         the better conversion.  Implement section 14.4.2.3 more faithfully.
16992         (Invocation.BetterFunction): Make boolean.  Make correspondence to
16993         section 14.4.2.2 explicit.
16994         (Invocation.OverloadResolve): Update.
16995         (Invocation): Remove is_base field.
16996         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
16997         (Invocation.Emit): Likewise.
16998
16999 2004-09-27  Raja R Harinath  <rharinath@novell.com>
17000
17001         * README: Update to changes.
17002
17003 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
17004
17005         * cs-parser.jay: Reverted 642 warning fix.
17006
17007 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17008
17009         Fix bug #66615
17010         * decl.cs (FindMemberWithSameName): Indexer can have more than
17011         1 argument.
17012
17013 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17014
17015         * expression.cs (LocalVariableReference.DoResolveLValue):
17016         Do not report warning 219 for out values.
17017         (EmptyExpression.Null): New member to avoid extra allocations.
17018
17019 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17020
17021         * cs-parser.jay: Fix wrong warning 642 report.
17022
17023         * cs-tokenizer.cs (CheckNextToken): New helper;
17024         Inspect next character if is same as expected.
17025
17026 2004-09-23  Martin Baulig  <martin@ximian.com>
17027
17028         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
17029         (Convert.ImplicitReferenceConversionExists): Likewise.
17030
17031 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17032
17033         * class.cs (Operator.Define): Add error 448 and 559 report.
17034
17035 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17036
17037         * class.cs (MemberBase.IsTypePermitted): New protected
17038         method for checking error CS0610.
17039
17040 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17041
17042         * class.cs (TypeContainer.HasExplicitLayout): New property
17043         Returns whether container has StructLayout attribute set Explicit.
17044         (FieldMember): New abstract class for consts and fields.
17045         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
17046         (Field): Reuse FieldMember.
17047
17048         * const.cs (Const): Reuse FieldMember.
17049
17050         * rootcontext.cs: EmitConstants call moved to class.
17051
17052 2004-09-22  Martin Baulig  <martin@ximian.com>
17053
17054         Thanks to Peter Sestoft for this bug report.
17055
17056         * expression.cs (Conditional): If both the `trueExpr' and the
17057         `falseExpr' is a NullLiteral, return a NullLiteral.
17058
17059 2004-09-22  Martin Baulig  <martin@ximian.com>
17060
17061         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17062         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17063         for the "get_Current" call.
17064
17065 2004-09-22  Martin Baulig  <martin@ximian.com>
17066
17067         Marek and me just fixed one of our oldest bugs: #28562 :-)
17068
17069         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17070
17071         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17072         we're an EnumConstant, just return that.
17073         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17074         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17075         to get the value which'll actually be written into the attribute.
17076         However, we have to use GetValue() to access the attribute's value
17077         in the compiler.        
17078
17079 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17080
17081         * constant.cs (Constant.IsNegative): New abstract property
17082         IsNegative.
17083
17084         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17085         (StackAlloc.DoResolve): Reused IsNegative.
17086
17087 2004-09-21  Martin Baulig  <martin@ximian.com>
17088
17089         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17090         if we're used in an iterator, we may be called from different
17091         methods.
17092
17093         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17094         we actually have an exception block.
17095
17096 2004-09-20  John Luke <jluke@cfl.rr.com>
17097
17098         * class.cs, cs-parser.jay: Improve the error report for 1520:
17099         report the actual line where the error happens, not where the
17100         class was declared.
17101
17102         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17103         Pass location information that was available elsewhere.
17104
17105 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17106
17107         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17108         runtime to delay sign assemblies.
17109
17110 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17111
17112         * cs-parser.jay: Do not report the stack trace, this is barely
17113         used nowadays.
17114
17115 2004-08-22  John Luke  <john.luke@gmail.com>
17116  
17117         * driver.cs : check that a resource id is not already used
17118         before adding it, report CS1508 if it is, bug #63637
17119
17120 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17121
17122         * ecore.cs: Removed dead code.
17123
17124 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17125
17126         * class.cs: Do not report warning CS0067 on the interfaces.
17127
17128 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17129
17130         * cs-parser.jay: Add error 504 report.
17131
17132 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17133
17134         * rootcontext.cs: WarningLevel is 4 by default now.
17135
17136         * statement.cs (Fixed.Resolve): Do not null
17137         VariableInfo.
17138
17139 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17140
17141         Fixed bug #55780
17142         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17143         deep search when property is not virtual.
17144         (PropertyExpr.ResolveAccessors): Make one call for both
17145         accessors.
17146
17147 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17148
17149         Fixed bug #65766
17150         * statement.cs: Error 152 report constains also location.
17151
17152 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17153
17154         Fixed bug #65766
17155         * const.cs: Explicitly set constant as static.
17156
17157 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17158
17159         Fixed bug #64226
17160         * cs-parser.jay: Add error 1017 report.
17161
17162 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17163
17164         Fixed bug #59980, #64224
17165         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17166
17167         * typemanager.cs (IsSpecialMethod): Simplified
17168
17169 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17170
17171         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17172         condition with better params.
17173
17174 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17175
17176         Fixed bug #65238
17177         * attribute.cs (Resolve): Property has to have both
17178         accessors.
17179
17180 2004-09-14  Martin Baulig  <martin@ximian.com>
17181
17182         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17183
17184 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17185
17186         Fixed bug #61902
17187         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17188         called and is obsolete then this member suppress message
17189         when call is inside next [Obsolete] method or type.
17190
17191         * expression.cs: Use TestObsoleteMethodUsage member.
17192
17193 2004-09-14  Martin Baulig  <martin@ximian.com>
17194
17195         * cs-parser.jay: Sync a bit with the GMCS version.
17196
17197 2004-09-14  Martin Baulig  <martin@ximian.com>
17198
17199         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17200         (CSharpParser.yacc_verbose_flag): New public field.
17201
17202         * genericparser.cs: Removed.
17203
17204 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17205
17206         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17207
17208 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17209
17210         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17211
17212 2004-09-10  Martin Baulig  <martin@ximian.com>
17213
17214         Backported my MemberName changes from GMCS into MCS.
17215
17216         - we are now using a special `MemberName' class instead of using
17217         strings; in GMCS, the `MemberName' also contains the type
17218         arguments.
17219
17220         - changed the grammar rules a bit:
17221           * the old `member_name' is now a `namespace_or_type_name':
17222             The rule is that we use `namespace_or_type_name' everywhere
17223             where we expect either a "member name" (GetEnumerator) or a
17224             "member name" with an explicit interface name
17225             (IEnumerable.GetEnumerator).
17226             In GMCS, the explicit interface name may include type arguments
17227             (IEnumerable<T>.GetEnumerator).
17228           * we use `member_name' instead of just `IDENTIFIER' for
17229             "member names":
17230             The rule is that we use `member_name' wherever a member may
17231             have type parameters in GMCS.       
17232
17233         * decl.cs (MemberName): New public class.
17234         (MemberCore.MemberName): New public readonly field.
17235         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17236         (DeclSpace): Likewise.
17237
17238         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17239         * enum.cs (Enum.ctor): Likewise.
17240
17241         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17242         MemberName.     
17243         (AliasEntry.ctor): Take a MemberName, not an Expression.
17244         (AliasEntry.UsingAlias): Likewise.
17245
17246         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17247         (IMethodData.MemberName): Changed type from string to MemberName.
17248         (MemberBase.ExplicitInterfaceName): Likewise.
17249         (AbstractPropertyEventMethod.SetupName): Make this private.
17250         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17251         argument; compute the member name here.
17252         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17253         on the `member.MemberName' and the `prefix'.
17254
17255         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17256         not `type_name'.
17257         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17258         thus, we get a `MemberName' instead of a `string'.  These
17259         declarations may have type parameters in GMCS.
17260         (interface_method_declaration, delegate_declaration): Likewise.
17261         (class_declaration, interface_declaration): Likewise.
17262         (method_header): Use `namespace_or_type_name' instead of
17263         `member_name'.  We may be an explicit interface implementation.
17264         (property_declaration, event_declaration): Likewise.
17265         (member_name): This is now just an `IDENTIFIER', not a
17266         `namespace_or_type_name'.
17267         (type_name, interface_type): Removed.
17268         (namespace_or_type_name): Return a MemberName, not an Expression.
17269         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17270         call GetTypeExpression() on the MemberName to get an expression.
17271         (IndexerDeclaration.interface_type): Changed type from string to
17272         MemberName.
17273         (MakeName): Operate on MemberName's instead of string's.
17274
17275 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17276
17277         Fix bug #55770.
17278         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17279         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17280         lookup to avoid symbols introduced by 'using'.
17281         * rootcontext.cs (NamespaceLookup): Update.
17282
17283 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17284
17285         * class.cs (TypeContainer.DoDefineMembers): Do not call
17286         DefineDefaultConstructor for static classes.
17287
17288 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17289
17290         * attribute.cs (Attribute.Resolve): Add error 653 report.
17291
17292         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17293         report.
17294         (Method.ApplyAttributeBuilder): Add error 685 report.
17295         (Operator.Define): Add error 564 report.
17296
17297         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17298
17299         * expression.cs (Invocation.DoResolve): Add error
17300         245 and 250 report.
17301
17302         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17303         error 674 report.
17304
17305 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17306
17307         * class.cs (ConstructorInitializer.Resolve):
17308         Wrong error number (515->516).
17309
17310 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17311
17312         * class.cs (Indexer.Define): Add error 631 report.
17313
17314 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17315
17316         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17317
17318 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17319
17320         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17321
17322 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17323
17324         * cs-parser.jay: Added error CS0241 report.
17325
17326 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17327
17328         * cs-parser.jay (fixed_statement): Introduce a scope for the
17329         declaration in the 'fixed' statement.
17330
17331 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17332
17333         * cs-parser.jay: Added CS0230 error report.
17334
17335 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17336
17337         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17338
17339 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17340
17341         * expression.cs (Argument.Resolve): Added error CS0192 and
17342         CS0199 report.
17343
17344 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17345
17346         C# 2.0 #pragma warning feature
17347
17348         * cs-tokenizer.cs (PreProcessPragma): New method; 
17349         Handles #pragma directive.
17350
17351         * report.cs (WarningRegions): New class; Support
17352         class for #pragma warning directive. It tests whether
17353         warning is enabled for a given line.
17354
17355 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17356
17357         * const.cs: Add more descriptive error report, tahnks to
17358         Sebastien. 
17359
17360 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17361
17362         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17363
17364 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17365
17366         * expression.cs: Apply patch from Ben: Remove dead code from
17367         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17368         as that code just threw an exception anwyays.
17369
17370         * const.cs: Remove the call to the turnintoconstant, for details
17371         see bug: #63144
17372         
17373         * literal.cs: The type of the null-literal is the null type;  So
17374         we use a placeholder type (literal.cs:System.Null, defined here)
17375         for it.
17376
17377         * expression.cs (Conditional.DoResolve): Remove some old code that
17378         is no longer needed, conversions have been fixed.
17379
17380         (ArrayCreationExpression.DoResolve): Return false if we fail to
17381         resolve the inner expression.
17382
17383 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17384
17385         Fix test-290.cs.
17386         * cs-parser.jay (delegate_declaration): Record a delegate
17387         declaration as a type declaration.
17388         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17389
17390 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17391
17392         * parameter.cs: Do not crash if the type can not be resolved. 
17393
17394         * expression.cs: Report errors with unsafe pointers, fixes #64896
17395
17396 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17397
17398         * expression.cs: Pointer arith always needs to do a conv.i
17399         if the operand is a long. fix 65320
17400
17401 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17402
17403         Fixed cs0619-37.cs, cs0619-38.cs
17404
17405         * enum.cs (GetObsoleteAttribute): Removed.
17406
17407         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17408         on Enum member is double staged. The first is tested member
17409         and then enum.
17410
17411 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17412
17413         Fixed #56986, #63631, #65231
17414
17415         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17416         adds member to name container.
17417         (TypeContainer.AddToTypeContainer): New method, adds type to
17418         name container.
17419         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17420         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17421         AddOperator): Simplified by reusing AddToMemberContainer.
17422         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17423         instead of field.
17424         (Method.CheckForDuplications): Fixed implementation to test all
17425         possibilities.
17426         (MemberBase): Detection whether member is explicit interface
17427         implementation is now in constructor.
17428         (MemberBase.UpdateMemberName): Handles IndexerName.
17429         (Accessor): Changed to keep also location information.
17430         (AbstractPropertyEventMethod): Is derived from MemberCore.
17431         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17432         will be emited or not.
17433         (PropertyBase.AreAccessorsDuplicateImplementation):
17434         Tests whether accessors are not in collision with some method.
17435         (Operator): Is derived from MethodCore to simplify common
17436         operations.
17437
17438         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17439         must be performed.
17440         (DeclSpace.AddToContainer): Adds the member to defined_names
17441         table. It tests for duplications and enclosing name conflicts.
17442
17443         * enum.cs (EnumMember): Clean up to reuse the base structures
17444
17445 2004-09-03  Martin Baulig  <martin@ximian.com>
17446
17447         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17448         into TypeContainer, to make partial classes work again.
17449
17450 2004-09-03  Martin Baulig  <martin@ximian.com>
17451
17452         * rootcontext.cs (RootContext.V2): Removed.
17453
17454 2004-03-23  Martin Baulig  <martin@ximian.com>
17455
17456         * expression.cs (Invocation.OverloadResolve): Added `bool
17457         may_fail' argument and use it instead of the Location.IsNull() hack.
17458
17459 2004-09-03  Martin Baulig  <martin@ximian.com>
17460
17461         Merged latest changes into gmcs.  Please keep this comment in
17462         here, it makes it easier for me to see what changed in MCS since
17463         the last time I merged.
17464
17465 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17466
17467         Fix #61128.
17468         * expression.cs (BetterConversion): Don't allow either conversion 
17469         to be null.  Remove redundant implicit conversion test when 'q ==
17470         null' -- when this function is invoked, we already know that the
17471         implicit conversion exists.
17472         (BetterFunction): Assume that 'best' is non-null.  Remove
17473         redundant reimplementation of IsApplicable when 'best' is null.
17474         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17475         number of arguments.
17476         (IsAncestralType): Extract from OverloadResolve.
17477         (OverloadResolve): Make robust to the MethodGroupExpr being
17478         unsorted.  Implement all the logic of Section 14.5.5.1, and
17479         support overloading of methods from multiple applicable types.
17480         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17481
17482         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17483         (RealError, Warning): Append type of report to related symbol.
17484
17485 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17486
17487         * enum.cs: Fixed CLS-Compliance checks for enum members.
17488         Error tests cs3008-8.cs, cs3014-8.cs
17489
17490 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17491
17492         Fixed bug #62342, #63102
17493         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17494         like ImplementMethod.
17495
17496 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17497
17498         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17499         Fixed bug #65170.
17500
17501 2004-09-02  Martin Baulig  <martin@ximian.com>
17502
17503         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17504         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17505         on the MethodBase.
17506
17507 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17508
17509         C# 2.0 Static classes implemented
17510
17511         * class.cs (TypeContainer): instance_constructors,
17512         initialized_fields, initialized_static_fields,
17513         default_constructor, base_inteface_types are protected to be
17514         accessible from StaticClass.
17515         (TypeContainer.DefineDefaultConstructor): New virtual method
17516         for custom default constructor generating
17517         (StaticClass): New class to handle "Static classes" feature.
17518
17519         * cs-parser.jay: Handle static keyword on class like instance
17520         of StaticClass.
17521
17522         * driver.cs: Added "/langversion" command line switch with two
17523         options (iso-1, default).
17524
17525 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17526
17527         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17528
17529 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17530
17531         * delegate.cs: Style.
17532
17533 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17534
17535         * delegate.cs: Add seperate instance expr field for miguel.
17536
17537 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17538
17539         * PointerArithmetic (Resolve): make sure we are not doing
17540         pointer arith on void*. Also, make sure we are resolved
17541         by not setting eclass until resolve.
17542
17543         All callers: Make sure that PointerArithmetic gets resolved.
17544
17545 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17546
17547         * ArrayCreation (LookupType): If the type does not resolve 
17548         to an array, give an error.
17549
17550 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17551
17552         * statement.cs (Try.Resolve): Fixed bug #64222
17553
17554 2004-08-27  Martin Baulig  <martin@ximian.com>
17555
17556         * class.cs
17557         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17558         crash here.     
17559
17560 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17561
17562         * ecore.cs (Constantify): Get underlying type via
17563         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17564         Windows in special cases.
17565
17566 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17567
17568         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17569         for obtaining also private methods.
17570         (GetRemoveMethod): Used GetRemoveMethod (true)
17571         for obtaining also private methods.
17572
17573 2004-08-24  Martin Baulig  <martin@ximian.com>
17574
17575         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17576         MethodAttributes.HideBySig for operators.
17577
17578 2004-08-23  Martin Baulig  <martin@ximian.com>
17579
17580         Back to the old error reporting system :-)
17581
17582         * report.cs (Message): Removed.
17583         (Report.MessageData, ErrorData, WarningData): Removed.
17584         (Report.Error, Warning): Back to the old system.
17585
17586 2004-08-23  Martin Baulig  <martin@ximian.com>
17587
17588         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17589
17590         * class.cs (TypeContainer.ParentContainer): New public virtual
17591         method; replaces the explicit interface implementation.
17592         (ClassPart.ParentContainer): Override.
17593
17594 2004-08-23  Martin Baulig  <martin@ximian.com>
17595
17596         * statement.cs (Switch): Added support for constant switches; see
17597         #59428 or test-285.cs.
17598
17599 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17600
17601         Fixed bug #62740.
17602         * statement.cs (GetEnumeratorFilter): Removed useless
17603         logic because C# specs is strict. GetEnumerator must be
17604         public.
17605
17606 2004-08-22  Martin Baulig  <martin@ximian.com>
17607
17608         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17609         a switch and may break, reset the barrier.  Fixes #59867.
17610
17611 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17612
17613         CLS-Compliance speed up (~5% for corlib)
17614
17615         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17616         New method. Tests container for CLS-Compliant names
17617
17618         * class.cs (TypeContainer.VerifyClsName): New method.
17619         Checks whether container name is CLS Compliant.
17620         (Constructor): Implements IMethodData.
17621
17622         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17623         low-case table for CLS Compliance test.
17624         (MemberCache.VerifyClsParameterConflict): New method.
17625         Checks method parameters for CS3006 error.
17626
17627         * enum.cs (EnumMember): Is derived from MemberCore.
17628         (Enum.VerifyClsName): Optimized for better performance.
17629
17630 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17631
17632         * report.cs: Renamed Error_T to Error and changed all
17633         references.
17634
17635 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17636
17637         * class.cs (TypeContainer.IndexerArrayList): New inner class
17638         container for indexers.
17639         (TypeContainer.DefaultIndexerName): New constant for default
17640         indexer name. Replaced all "Item" with this constant.
17641         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
17642
17643         * typemanager.cs (TypeManager.default_member_ctor): Cache here
17644         DefaultMemberAttribute constructor.
17645
17646 2004-08-05  Martin Baulig  <martin@ximian.com>
17647
17648         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
17649         Fix bug #59429.
17650
17651 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
17652
17653         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
17654         multi platforms problem.
17655
17656         * compiler.csproj: Included shared files.
17657
17658 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17659
17660         Fix bug 60333, 55971 in the more general way
17661         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17662         Added arg_type argument for constant conversion.
17663         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
17664
17665 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17666
17667         Fix bug #59760
17668         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
17669         OperatorArrayList, MethodCoreArrayList for typecontainer
17670         containers. Changed class member types to these new types.
17671         (MethodArrayList.DefineMembers): Added test for CS0659.
17672
17673 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
17674
17675         * cfold.cs: Synchronize the folding with the code in expression.cs
17676         Binary.DoNumericPromotions for uint operands.
17677
17678         * attribute.cs: Revert patch from Raja, it introduced a regression
17679         while building Blam-1.2.1 (hard to isolate a test case).
17680
17681 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17682
17683         Fix for #55382
17684         * class.cs:
17685         (TypeContainer.Define): Renamed to DefineContainerMembers because of
17686         name collision.
17687         (MethodCore.parent_method): New member. The method we're overriding
17688         if this is an override method.
17689         (MethodCore.CheckBase): Moved from Method class and made common.
17690         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
17691         private.
17692         (MethodCore.CheckForDuplications): New abstract method. For custom
17693         member duplication search in a container
17694         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
17695         method and its return type.
17696         (Event.conflict_symbol): New member. Symbol with same name in the
17697         parent class.
17698
17699         * decl.cs:
17700         (MemberCache.FindMemberWithSameName): New method. The method
17701         is looking for conflict with inherited symbols.
17702
17703 2004-08-04  Martin Baulig  <martin@ximian.com>
17704
17705         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
17706
17707         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
17708
17709 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17710
17711         * report.cs (Message): New enum for better error, warning reference in
17712         the code.
17713         (MessageData): New inner abstract class. It generally handles printing of
17714         error and warning messages.
17715         Removed unused Error, Warning, Message methods.
17716
17717 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17718
17719         Fix for cs0592-8.cs test
17720         * attribute.cs
17721         (Attributable.ValidAttributeTargets): Made public.
17722         (Attribute.ExplicitTarget): New member for explicit target value.
17723         (Attribute.CheckTargets): Now we translate explicit attribute
17724         target to Target here.
17725
17726 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
17727
17728         * ecore.cs (MethodGroupExpr): new IsBase property.
17729
17730         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
17731
17732         * delegate.cs (DelegateCreation): store a MethodGroupExpr
17733         rather than an instance expr.
17734
17735         (DelegateCreation.Emit): Use the method group rather than
17736         the instance expression. Also, if you have base.Foo as the
17737         method for a delegate, make sure to emit ldftn, not ldftnvirt.
17738
17739         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
17740
17741         (NewDelegate.DoResolve): Only check for the existance of Invoke
17742         if the method is going to be needed. Use MethodGroupExpr.
17743
17744         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
17745
17746         * expression.cs: For pointer arith., make sure to use
17747         the size of the type, not the size of the pointer to
17748         the type.
17749
17750 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17751
17752         Fix for #60722
17753         * class.cs (Class): Added error CS0502 test.
17754
17755 2004-08-03  John Luke  <jluke@cfl.rr.com>
17756             Raja R Harinath  <rharinath@novell.com>
17757
17758         Fix for #60997.
17759         * attribute.cs (Attribute.complained_before): New flag.
17760         (Attribute.ResolveType, Attribute.Resolve),
17761         (Attribute.DefinePInvokeMethod): Set it.
17762         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
17763         
17764 2004-08-03  Martin Baulig  <martin@ximian.com>
17765
17766         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
17767         use a user-defined operator; we still need to do numeric
17768         promotions in case one argument is a builtin type and the other
17769         one has an implicit conversion to that type.  Fixes #62322.
17770
17771 2004-08-02  Martin Baulig  <martin@ximian.com>
17772
17773         * statement.cs (LocalInfo.Flags): Added `IsThis'.
17774         (LocalInfo.IsThis): New public property.
17775         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
17776
17777 2004-08-01  Martin Baulig  <martin@ximian.com>
17778
17779         * class.cs (TypeContainer.GetClassBases): Don't set the default
17780         here since we may get called from GetPartialBases().
17781         (TypeContainer.DefineType): If GetClassBases() didn't return a
17782         parent, use the default one.
17783
17784 2004-07-30  Duncan Mak  <duncan@ximian.com>
17785
17786         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
17787
17788 2004-07-30  Martin Baulig  <martin@ximian.com>
17789
17790         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
17791
17792         * class.cs (SourceMethod): New public class, derive from the
17793         symbol writer's ISourceMethod.
17794         (Method): Use the new symbol writer API.
17795
17796         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
17797         as argument and use the new symbol writer.
17798
17799         * location.cs
17800         (SourceFile): Implement the symbol writer's ISourceFile.
17801         (Location.SymbolDocument): Removed.
17802         (Location.SourceFile): New public property.
17803
17804         * symbolwriter.cs: Use the new symbol writer API.
17805
17806 2004-07-30  Raja R Harinath  <rharinath@novell.com>
17807
17808         * Makefile (install-local): Remove.  Functionality moved to
17809         executable.make.
17810
17811 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17812
17813         * Makefile: Install mcs.exe.config file together with mcs.exe.
17814         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
17815         correct runtime version.
17816         
17817 2004-07-25  Martin Baulig  <martin@ximian.com>
17818
17819         * class.cs
17820         (TypeContainer.RegisterOrder): Removed, this was unused.
17821         (TypeContainer, interface_order): Removed.
17822         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
17823         TypeContainer as argument since we can also be called with a
17824         `PartialContainer' for a partial class/struct/interface.
17825         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
17826         of checking whether we're an `Interface' - we could be a
17827         `PartialContainer'.
17828         (PartialContainer.Register): Override; call
17829         AddClass()/AddStruct()/AddInterface() on our parent.
17830
17831         * cs-parser.jay (interface_member_declaration): Add things to the
17832         `current_container', not the `current_class'.
17833
17834         * rootcontext.cs (RegisterOrder): The overloaded version which
17835         takes an `Interface' was unused, removed.
17836
17837         * typemanager.cs (TypeManager.LookupInterface): Return a
17838         `TypeContainer', not an `Interface'.
17839         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
17840         contain a `PartialContainer' for an interface, so check it's
17841         `Kind' to figure out what it is.
17842
17843 2004-07-25  Martin Baulig  <martin@ximian.com>
17844
17845         * class.cs (Class.DefaultTypeAttributes): New public constant.
17846         (Struct.DefaultTypeAttributes): Likewise.
17847         (Interface.DefaultTypeAttributes): Likewise.
17848         (PartialContainer.TypeAttr): Override this and add the
17849         DefaultTypeAttributes.
17850
17851 2004-07-25  Martin Baulig  <martin@ximian.com>
17852
17853         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
17854         we can just use the `Parent' field instead.
17855
17856 2004-07-25  Martin Baulig  <martin@ximian.com>
17857
17858         * class.cs (TypeContainer.Emit): Renamed to EmitType().
17859
17860 2004-07-25  Martin Baulig  <martin@ximian.com>
17861
17862         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
17863         our parts before defining any methods.
17864         (TypeContainer.VerifyImplements): Make this virtual.
17865         (ClassPart.VerifyImplements): Override and call VerifyImplements()
17866         on our PartialContainer.
17867
17868 2004-07-25  Martin Baulig  <martin@ximian.com>
17869
17870         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
17871
17872         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
17873         argument, we can just use the `Parent' field instead.
17874
17875         * class.cs
17876         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
17877         (MemberBase.DoDefine): Likewise.
17878
17879 2004-07-24  Martin Baulig  <martin@ximian.com>
17880
17881         * decl.cs (MemberCore.Parent): New public field.
17882         (DeclSpace.Parent): Moved to MemberCore.
17883
17884         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
17885         (MemberBase.ctor): Added TypeContainer argument, pass it to our
17886         parent's .ctor.
17887         (FieldBase, Field, Operator): Likewise.
17888         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
17889         (EventField, Event): Likewise.
17890
17891 2004-07-23  Martin Baulig  <martin@ximian.com>
17892
17893         * class.cs (PartialContainer): New public class.
17894         (ClassPart): New public class.
17895         (TypeContainer): Added support for partial classes.
17896         (TypeContainer.GetClassBases): Splitted some of the functionality
17897         out into GetNormalBases() and GetPartialBases().
17898
17899         * cs-tokenizer.cs (Token.PARTIAL): New token.
17900         (Tokenizer.consume_identifier): Added some hacks to recognize
17901         `partial', but only if it's immediately followed by `class',
17902         `struct' or `interface'.
17903
17904         * cs-parser.jay: Added support for partial clases.
17905
17906 2004-07-23  Martin Baulig  <martin@ximian.com>
17907
17908         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
17909         a `DeclSpace' and also made it readonly.
17910         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
17911         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
17912         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
17913
17914         * cs-parser.jay: Pass the `current_class', not the
17915         `current_container' (at the moment, this is still the same thing)
17916         to a new Method, Property, Event, Indexer or Constructor.
17917
17918 2004-07-23  Martin Baulig  <martin@ximian.com>
17919
17920         * cs-parser.jay (CSharpParser): Added a new `current_class' field
17921         and removed the `current_interface' one.
17922         (struct_declaration, class_declaration, interface_declaration):
17923         Set `current_class' to the newly created class/struct/interface;
17924         set their `Bases' and call Register() before parsing their body.
17925
17926 2004-07-23  Martin Baulig  <martin@ximian.com>
17927
17928         * class.cs (Kind): New public enum.
17929         (TypeContainer): Made this class abstract.
17930         (TypeContainer.Kind): New public readonly field.
17931         (TypeContainer.CheckDef): New public method; moved here from
17932         cs-parser.jay.
17933         (TypeContainer.Register): New public abstract method.
17934         (TypeContainer.GetPendingImplementations): New public abstract
17935         method.
17936         (TypeContainer.GetClassBases): Removed the `is_class' and
17937         `is_iface' parameters.
17938         (TypeContainer.DefineNestedTypes): Formerly known as
17939         DoDefineType().
17940         (ClassOrStruct): Made this class abstract.
17941
17942         * tree.cs (RootTypes): New public type. 
17943
17944 2004-07-20  Martin Baulig  <martin@ximian.com>
17945
17946         * tree.cs (Tree.RecordNamespace): Removed.
17947         (Tree.Namespaces): Removed.
17948
17949         * rootcontext.cs (RootContext.IsNamespace): Removed.
17950
17951         * cs-parser.jay (namespace_declaration): Just create a new
17952         NamespaceEntry here.
17953
17954 2004-07-20  Martin Baulig  <martin@ximian.com>
17955
17956         * statement.cs (ExceptionStatement): New abstract class.  This is
17957         now used as a base class for everyone who's using `finally'.
17958         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
17959         our local variables before using them.
17960
17961         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
17962         virtual method.  This is used by Yield.Resolve() to "steal" an
17963         outer block's `finally' clauses.
17964         (FlowBranchingException): The .ctor now takes an ExceptionStatement
17965         argument.
17966
17967         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
17968         version which takes an ExceptionStatement.  This version must be
17969         used to create exception branchings.
17970
17971         * iterator.cs
17972         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
17973         (Iterator.EmitMoveNext): Added exception support; protect the
17974         block with a `fault' clause, properly handle 'finally' clauses.
17975         (Iterator.EmitDispose): Run all the `finally' clauses here.
17976
17977 2004-07-20  Martin Baulig  <martin@ximian.com>
17978
17979         * iterator.cs: This is the first of a set of changes in the
17980         iterator code.  Match the spec more closely: if we're an
17981         IEnumerable, then GetEnumerator() must be called.  The first time
17982         GetEnumerator() is called, it returns the current instance; all
17983         subsequent invocations (if any) must create a copy.
17984
17985 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
17986
17987         * expression.cs: Resolve the constant expression before returning
17988         it. 
17989
17990 2004-07-19  Martin Baulig  <martin@ximian.com>
17991
17992         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
17993         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
17994         the return type of the new EmitContext.
17995
17996 2004-07-18  Martin Baulig  <martin@ximian.com>
17997
17998         * class.cs (Property.Define): Fix iterators.
17999
18000         * iterators.cs (Iterator.Define): Moved the
18001         `container.AddInterator (this)' call here from the .ctor; only do
18002         it if we resolved successfully.
18003
18004 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
18005
18006         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
18007         `true' for preprocessing directives that we parse.  The return
18008         value indicates whether we should return to regular tokenizing or
18009         not, not whether it was parsed successfully.
18010
18011         In the past if we were in: #if false ... #line #endif, we would
18012         resume parsing after `#line'.  See bug 61604.
18013
18014         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
18015         building: IsEnumType should return true only for enums, not for
18016         enums or System.Enum itself.  This fixes #61593.
18017
18018         Likely what happened is that corlib was wrong: mcs depended on
18019         this bug in some places.  The bug got fixed, we had to add the
18020         hack, which caused bug 61593.
18021
18022         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
18023         that was a workaround for the older conditions.
18024
18025 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
18026
18027         * assign.cs: IAssignMethod has a new interface, as documented
18028         inline. All assignment code now uses this new api.
18029
18030         * ecore.cs, expression.cs: All classes which implement
18031         IAssignMethod now use the new interface.
18032
18033         * expression.cs (Invocation): add a hack to EmitCall so that
18034         IndexerAccess can be the target of a compound assignment without
18035         evaluating its arguments twice.
18036
18037         * statement.cs: Handle changes in Invocation api.
18038
18039 2004-07-16  Martin Baulig  <martin@ximian.com>
18040
18041         * iterators.cs: Rewrote this.  We're now using one single Proxy
18042         class for both the IEnumerable and the IEnumerator interface and
18043         `Iterator' derives from Class so we can use the high-level API.
18044
18045         * class.cs (TypeContainer.AddIterator): New method.
18046         (TypeContainer.DoDefineType): New protected virtual method, which
18047         is called from DefineType().
18048         (TypeContainer.DoDefineMembers): Call DefineType() and
18049         DefineMembers() on all our iterators.
18050         (TypeContainer.Emit): Call Emit() on all our iterators.
18051         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18052
18053         * codegen.cs (EmitContext.CurrentIterator): New public field.
18054
18055 2004-07-15  Martin Baulig  <martin@ximian.com>
18056
18057         * typemanager.cs
18058         (TypeManager.not_supported_exception_type): New type.   
18059
18060 2004-07-14  Martin Baulig  <martin@ximian.com>
18061
18062         * iterators.cs: Use real error numbers.
18063
18064 2004-07-14  Martin Baulig  <martin@ximian.com>
18065
18066         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18067         requires this to be a System.Collection.IEnumerable and not a
18068         class implementing that interface.
18069         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18070
18071 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18072
18073         * class.cs: Fixed previous fix, it broke some error tests.
18074
18075 2004-07-12  Martin Baulig  <martin@ximian.com>
18076
18077         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18078         Fixes #61293.
18079
18080 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18081
18082         * assign.cs (LocalTemporary): Add new argument: is_address,If
18083         `is_address' is true, then the value that we store is the address
18084         to the real value, and not the value itself.
18085         
18086         * ecore.cs (PropertyExpr): use the new local temporary
18087         stuff to allow us to handle X.Y += z (where X is a struct)
18088
18089 2004-07-08  Martin Baulig  <martin@ximian.com>
18090
18091         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18092         not always return, just like we're doing in Using.Resolve().
18093
18094 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18095
18096         * cs-parser.jay (fixed_statement): flag this as Pinned.
18097
18098 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18099
18100         * typemanager.cs (TypeManager): Removed MakePinned method, this
18101         mechanism is replaced with the .NET 2.x compatible mechanism of
18102         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18103
18104         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18105         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18106         `IsFixed' property which has a different meaning.
18107
18108 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18109
18110         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18111         visible from inside a nested class, not just the names of the
18112         immediately enclosing class.
18113         Fix for bug #60730.
18114
18115 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18116
18117         * expression.cs (BetterConversion): Remove buggy special-case
18118         handling of "implicit constant expression conversions".  At this
18119         point, we already know that the conversion is possible -- we're
18120         only checking to see which is better.
18121
18122 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18123
18124         * cs-parser.jay: Added error CS0210 test.
18125
18126 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18127
18128         * cs-parser.jay: Added error CS0134 test.
18129
18130 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18131
18132         Fix bug #52507
18133         * cs-parser.jay: Added error CS0145 test.
18134
18135 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18136
18137         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18138
18139 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18140         
18141         * expression.cs (StackAlloc.Resolve): The argument may not
18142         be a constant; deal with this case.
18143         
18144 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18145
18146         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18147         GetIndexerAttributeValue.
18148         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18149
18150         * class.cs (Indexer.Define): Added error tests for CS0415,
18151         CS0609.
18152
18153 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18154
18155         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18156         property code.
18157
18158 2004-06-23  Martin Baulig  <martin@ximian.com>
18159
18160         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18161         neither return nor throw, reset the barrier as well.  Fixes #60457.
18162
18163 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18164
18165         * class.cs : EventAttributes is now set to None by default.
18166           This fixes bug #60459.
18167
18168 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18169
18170         Fix bug #60219
18171         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18172         Don't throw exception but return null (it's sufficient now).
18173
18174 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18175
18176         * typemanager.cs (GetArgumentTypes): Faster implementation.
18177
18178 2004-06-18  Martin Baulig  <martin@ximian.com>
18179
18180         * attribute.cs (Attribute.Resolve): Check whether we're an
18181         EmptyCast which a Constant child.  Fixes #60333.
18182
18183 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18184
18185         * statement.cs (EmitCollectionForeach): Account for the fact that
18186         not all valuetypes are in areas which we can take the address of.
18187         For these variables, we store to a temporary variable. Also, make
18188         sure that we dont emit a `callvirt' on a valuetype method.
18189
18190 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18191
18192         * expression.cs (StackAlloc.DoReSolve): Added test for
18193         negative parameter (CS0247).
18194
18195 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18196
18197         Fix bug #59792
18198         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18199
18200 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18201
18202         Fix bug #59781
18203         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18204         ulong.
18205
18206 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18207
18208         Fix bug #58254 & cs1555.cs, cs1556.cs
18209         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18210
18211 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18212
18213         * cs-parser.jay: Added error CS1669 test for indexers.
18214
18215 2004-06-11  Martin Baulig  <martin@ximian.com>
18216
18217         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18218         call this twice: for params and varargs methods.
18219
18220 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18221
18222         * class.cs:
18223         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18224
18225 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18226
18227         * attribute.cs (Attribute.GetValidTargets): Made public.
18228
18229         * class.cs: 
18230         (AbstractPropertyEventMethod): New class for better code sharing.
18231         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18232         CS1667 report.
18233         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18234
18235 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18236
18237         Fix bug #59477.
18238         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18239         that the call to Resolve is part of a MemberAccess.
18240         (Expression.Resolve): Use it for SimpleName resolution.
18241         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18242         Add 'intermediate' boolean argument.
18243         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18244         error message when the SimpleName can be resolved ambiguously
18245         between an expression and a type.
18246         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18247         public.
18248         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18249         call on the left-side.
18250
18251 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18252
18253         * class.cs:
18254         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18255
18256 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18257
18258         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18259
18260 2004-06-11  Martin Baulig  <martin@ximian.com>
18261
18262         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18263         varargs methods if applicable.
18264
18265 2004-06-11  Martin Baulig  <martin@ximian.com>
18266
18267         * expression.cs (Invocation.EmitCall): Don't use
18268         `method.CallingConvention == CallingConventions.VarArgs' since the
18269         method could also have `CallingConventions.HasThis'.
18270
18271 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18272
18273         * class.cs (Event.GetSignatureForError): Implemented.
18274         Fixed crash in error test cs3010.cs
18275
18276 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18277
18278         * cs-tokenizer.cs: Change the way we track __arglist to be
18279         consistent with the other keywords.
18280
18281 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18282
18283         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18284         tomorrow.
18285
18286 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18287
18288         * codegen.cs: Check that all referenced assemblies have a strongname
18289         before strongnaming the compiled assembly. If not report error CS1577.
18290         Fix bug #56563. Patch by Jackson Harper.
18291         * typemanager.cs: Added a method to return all referenced assemblies.
18292         Fix bug #56563. Patch by Jackson Harper.
18293
18294 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18295
18296         * class.cs:
18297         (Method.ApplyAttributeBuilder): Moved and added conditional
18298         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18299
18300         * delegate.cs:
18301         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18302
18303 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18304
18305         Fixed #59640
18306         * class.cs: (EventField.attribute_targets): Changed default target.
18307
18308 2004-06-08  Martin Baulig  <martin@ximian.com>
18309
18310         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18311
18312 2004-06-08  Martin Baulig  <martin@ximian.com>
18313
18314         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18315
18316 2004-06-07  Martin Baulig  <martin@ximian.com>
18317
18318         Added support for varargs methods.
18319
18320         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18321         keyword.
18322
18323         * cs-parser.jay: Added support for `__arglist'.
18324
18325         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18326
18327         * expression.cs (Argument.AType): Added `ArgList'.
18328         (Invocation): Added support for varargs methods.
18329         (ArglistAccess): New public class.
18330         (Arglist): New public class.
18331
18332         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18333
18334         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18335         a method's top-level block if the method has varargs.
18336
18337         * support.cs (ReflectionParameters, InternalParameters): Added
18338         support for varargs methods.    
18339
18340 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18341
18342         * class.cs: Provide location in indexer error report.
18343
18344         * driver.cs: Use standard names.
18345
18346         * namespace.cs: Catch the use of using after a namespace has been
18347         declared also on using aliases.
18348
18349 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18350
18351         Bug #50820.
18352         * typemanager.cs (closure_private_ok, closure_invocation_type)
18353         (closure_qualifier_type, closure_invocation_assembly)
18354         (FilterWithClosure): Move to ...
18355         (Closure): New internal nested class.
18356         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18357         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18358         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18359         (MemberLookup, MemberLookupFailed): Use it.
18360         * expression.cs (New.DoResolve): Treat the lookup for the
18361         constructor as being qualified by the 'new'ed type.
18362         (Indexers.GetIndexersForTypeOrInterface): Update.
18363
18364 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18365
18366         * attribute.cs
18367         (GetConditionalAttributeValue): New method. Returns
18368         condition of ConditionalAttribute.
18369         (SearchMulti): New method.  Returns all attributes of type 't'.
18370         Use it when attribute is AllowMultiple = true.
18371         (IsConditionalMethodExcluded): New method.
18372
18373         * class.cs
18374         (Method.IsExcluded): Implemented. Returns true if method has conditional
18375         attribute and the conditions is not defined (method is excluded).
18376         (IMethodData): Extended interface for ConditionalAttribute support.
18377         (PropertyMethod.IsExcluded): Implemented.
18378
18379         * decl.cs
18380         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18381
18382         * expression.cs
18383         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18384         on the method.
18385
18386 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18387
18388         * expression.cs (ArrayCreationExpression): Make this just an
18389         `expression'. It can't be a statement, so the code here was
18390         dead.
18391
18392 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18393
18394         Fixed #59072
18395         * typemanager.cs (GetFullNameSignature): New method for
18396         MethodBase types.
18397
18398 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18399
18400         Fixed #56452
18401         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18402         Use this method when MethodBuilder is null.
18403         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18404         Added test for error CS0626 (MONO reports error for this situation).
18405         (IMethodData.GetSignatureForError): Extended interface.
18406
18407 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18408
18409         * attribute.cs
18410         (AttributeTester.GetObsoleteAttribute): Returns instance of
18411         ObsoleteAttribute when type is obsolete.
18412
18413         * class.cs
18414         (TypeContainer.VerifyObsoleteAttribute): Override.
18415         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18416         (MethodCode.VerifyObsoleteAttribute): Override.
18417         (MemberBase.VerifyObsoleteAttribute): Override.
18418
18419         * decl.cs
18420         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18421         and report proper error.
18422
18423         *delegate.cs
18424         Delegate.VerifyObsoleteAttribute): Override.
18425
18426         * ecore.cs
18427         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18428         and report proper error.
18429         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18430
18431         * enum.cs
18432         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18433         and enum member.
18434
18435         * expression.cs
18436         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18437         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18438         Added test for ObsoleteAttribute.
18439
18440         * statement.cs
18441         (Catch): Derived from Statement.
18442
18443 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18444  
18445         Fixed bug #59071 & cs0160.cs
18446  
18447         * statement.cs (Try.Resolve): Check here whether order of catch
18448         clauses matches their dependencies.
18449
18450 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18451
18452         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18453         caused a regression: #59343.  Referencing nested classes from an
18454         assembly stopped working.
18455
18456 2004-05-31  Martin Baulig  <martin@ximian.com>
18457
18458         MCS is now frozen for beta 2.
18459
18460 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18461
18462         * convert.cs: add a trivial cache for overload operator resolution.
18463
18464 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18465
18466         * decl.cs: If possible, use lookuptypedirect here. We can only do
18467         this if there is no `.' after the namespace. Avoids using
18468         LookupType, which does lots of slow processing.
18469         (FindNestedType) New method, does what it says :-).
18470         * namespace.cs: use LookupTypeDirect.
18471         * rootcontext.cs: use membercache, if possible.
18472         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18473
18474 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18475
18476         * expression.cs:
18477         According to the spec, 
18478
18479         In a member access of the form E.I, if E is a single identifier,
18480         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18481         field, property, localvariable, or parameter with the same type as
18482         the meaning of E as a type-name (§3.8), then both possible
18483         meanings of E are permitted.
18484
18485         We did not check that E as a simple-name had the same type as E as
18486         a type name.
18487
18488         This trivial check gives us 5-7% on bootstrap time.
18489
18490 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18491
18492         * expression.cs (Invocation.OverloadResolve): Avoid the
18493         use of hashtables and boxing here by allocating on demand.
18494
18495 2004-05-30  Martin Baulig  <martin@ximian.com>
18496
18497         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18498         we're doing a silent lookup.  Don't try to lookup nested types in
18499         TypeManager.object_type (thanks to Ben Maurer).
18500
18501 2004-05-30  Martin Baulig  <martin@ximian.com>
18502
18503         Committing a patch from Ben Maurer.
18504
18505         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18506
18507 2004-05-29  Martin Baulig  <martin@ximian.com>
18508
18509         * class.cs (IMethodData.ShouldIgnore): New method.
18510
18511         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18512         `Location' argument, we don't need it anywhere.  Use
18513         `IMethodData.ShouldIgnore ()' instead of
18514         `MethodData.GetMethodFlags ()'.
18515         (TypeManager.AddMethod): Removed.
18516         (TypeManager.AddMethod2): Renamed to AddMethod.
18517
18518 2004-05-29  Martin Baulig  <martin@ximian.com>
18519
18520         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18521
18522         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18523         converting from a class type S to an interface type and we already
18524         have an object on the stack, don't box it again.  Fixes #52578.
18525
18526 2004-05-29  Martin Baulig  <martin@ximian.com>
18527
18528         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18529         Added support for `params' parameters.  Fixes #59267.
18530
18531 2004-05-29  Martin Baulig  <martin@ximian.com>
18532
18533         * literal.cs (NullPointer): Provide a private .ctor which sets
18534         `type' to TypeManager.object_type.  Fixes #59048.
18535
18536 2004-05-29  Martin Baulig  <martin@ximian.com>
18537
18538         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18539         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18540
18541         * ecore.cs (EventExpr.instance_expr): Make the field private.
18542
18543 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18544
18545         Fixed bug #50080 & cs0214-2.cs
18546         * expression.cs (Cast.DoResolve): Check unsafe context here.
18547         
18548         * statement.cs (Resolve.DoResolve): Likewise.
18549
18550 2004-05-26  Martin Baulig  <martin@ximian.com>
18551
18552         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18553
18554         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18555         (RootContext.LookupType): Pass down the `silent' flag.
18556
18557 2004-05-25  Martin Baulig  <martin@ximian.com>
18558
18559         * expression.cs
18560         (MethodGroupExpr.IdenticalTypeName): New public property.
18561         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18562         expression actually refers to a type.
18563
18564 2004-05-25  Martin Baulig  <martin@ximian.com>
18565
18566         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18567         for #56176 and made it actually work.
18568
18569 2004-05-25  Martin Baulig  <martin@ximian.com>
18570
18571         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18572         (FieldExpr, PropertyExpr): Override and implement
18573         CacheTemporaries.  Fixes #52279.
18574
18575 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18576
18577         * location.cs: In the new compiler listing a file twice is a
18578         warning, not an error.
18579
18580 2004-05-24  Martin Baulig  <martin@ximian.com>
18581
18582         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18583         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18584
18585 2004-05-24  Martin Baulig  <martin@ximian.com>
18586
18587         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18588         walking the `using' list.  Fixes #53921.
18589
18590 2004-05-24  Martin Baulig  <martin@ximian.com>
18591
18592         * const.cs (Const.LookupConstantValue): Added support for
18593         EmptyCast's; fixes #55251.
18594
18595 2004-05-24  Martin Baulig  <martin@ximian.com>
18596
18597         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18598         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18599         which does the CS0135 check.  The reason is that we first need to
18600         check whether the variable actually exists.
18601
18602 2004-05-24  Martin Baulig  <martin@ximian.com>
18603
18604         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18605         than RootContext.LookupType() to find the explicit interface
18606         type.  Fixes #58584.
18607
18608 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18609
18610         * Makefile: Simplify.  Use executable.make.
18611         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18612
18613 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18614
18615         * decl.cs:
18616         * enum.cs:
18617         Use the invariant culture when doing String.Compare for CLS case
18618         sensitivity.
18619         
18620 2004-05-23  Martin Baulig  <martin@ximian.com>
18621
18622         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18623         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18624
18625         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18626         
18627 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18628
18629         * class.cs (MemberBase.Define): Reuse MemberType member for 
18630         resolved type. Other methods can use it too.
18631
18632 2004-05-23  Martin Baulig  <martin@ximian.com>
18633
18634         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18635         the variable also exists in the current block (otherwise, we need
18636         to report a CS0103).  Fixes #58670.
18637
18638 2004-05-23  Martin Baulig  <martin@ximian.com>
18639
18640         * flowanalysis.cs (Reachability.Reachable): Compute this
18641         on-the-fly rather than storing it as a field.
18642
18643 2004-05-23  Martin Baulig  <martin@ximian.com>
18644
18645         * flowanalysis.cs (Reachability.And): Manually compute the
18646         resulting `barrier' from the reachability.      
18647        
18648 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18649
18650         Fix bug #57835
18651         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
18652         instance of ObsoleteAttribute when symbol is obsolete.
18653
18654         * class.cs
18655         (IMethodData): Extended interface for ObsoleteAttribute support.
18656
18657 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18658
18659         * attribute.cs: Fix bug #55970
18660
18661 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18662
18663         Fix bug #52705
18664         * attribute.cs
18665         (GetObsoleteAttribute): New method. Creates the instance of
18666         ObsoleteAttribute.
18667         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
18668         ObsoleteAttribute when member is obsolete.
18669         (AttributeTester.Report_ObsoleteMessage): Common method for
18670         Obsolete error/warning reporting.
18671
18672         * class.cs
18673         (TypeContainer.base_classs_type): New member for storing parent type.
18674
18675         * decl.cs
18676         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
18677         for this MemberCore.
18678
18679 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18680
18681         * attribute.cs, const.cs: Fix bug #58590
18682
18683 2004-05-21  Martin Baulig  <martin@ximian.com>
18684
18685         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
18686         out parameters if the end of the method is unreachable.  Fixes
18687         #58098. 
18688
18689 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18690
18691         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
18692         Hari was right, why extra method.
18693
18694 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18695
18696         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
18697
18698 2004-05-20  Martin Baulig  <martin@ximian.com>
18699
18700         Merged this back from gmcs to keep the differences to a minumum.
18701
18702         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
18703         instead of a Declspace.
18704         (Attribute.ResolveType): Likewise.
18705         (Attributes.Search): Likewise.
18706         (Attributes.Contains): Likewise.
18707         (Attributes.GetClsCompliantAttribute): Likewise.
18708
18709         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
18710         argument.
18711         (MethodData.ApplyAttributes): Take an EmitContext instead of a
18712         DeclSpace.
18713
18714 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
18715
18716         Fix bug #58688 (MCS does not report error when the same attribute
18717         is assigned twice)
18718
18719         * attribute.cs (Attribute.Emit): Distinction between null and default.
18720
18721 2004-05-19  Raja R Harinath  <rharinath@novell.com>
18722
18723         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
18724         of a top-level attribute without an attribute target.
18725         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
18726         Make non-static.
18727         (Attribute.Conditional_GetConditionName), 
18728         (Attribute.Obsolete_GetObsoleteMessage): Update.
18729         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
18730         part of ScanForIndexerName.
18731         (Attribute.CanIgnoreInvalidAttribute): New function.
18732         (Attribute.ScanForIndexerName): Move to ...
18733         (Attributes.ScanForIndexerName): ... here.
18734         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
18735         (Attributes.Search): New internal variant that can choose not to
18736         complain if types aren't resolved.  The original signature now
18737         complains.
18738         (Attributes.GetClsCompliantAttribute): Use internal variant, with
18739         complaints suppressed.
18740         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
18741         only if it not useful.
18742         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
18743         top-level for attributes that are shared between the assembly
18744         and a top-level class.
18745         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
18746         * class.cs: Update to reflect changes.
18747         (DefineIndexers): Fuse loops.
18748         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
18749         a couple more variants of attribute names.
18750
18751 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
18752
18753         Fix bug #52585 (Implemented explicit attribute declaration)
18754
18755         * attribute.cs:
18756         (Attributable.ValidAttributeTargets): New abstract method. It gets
18757         list of valid attribute targets for explicit target declaration.
18758         (Attribute.Target): It holds target itself.
18759         (AttributeSection): Removed.
18760         (Attribute.CheckTargets): New method. It checks whether attribute
18761         target is valid for the current element.
18762
18763         * class.cs:
18764         (EventProperty): New class. For events that are declared like
18765         property (with add and remove accessors).
18766         (EventField): New class. For events that are declared like field.
18767         class.cs
18768
18769         * cs-parser.jay: Implemented explicit attribute target declaration.
18770
18771         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
18772         Override ValidAttributeTargets.
18773
18774         * parameter.cs:
18775         (ReturnParameter): Class for applying custom attributes on 
18776         the return type.
18777         (ParameterAtribute): New class. Class for applying custom
18778         attributes on the parameter type.
18779
18780 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
18781
18782         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
18783         definitions. 
18784
18785         (Method): Allow UNSAFE here.
18786
18787         * modifiers.cs: Support unsafe reporting.
18788
18789 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
18790
18791         * decl.cs: Fix bug #58478.
18792
18793 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18794
18795         * statement.cs: When checking for unreachable code on an EmptyStatement,
18796         set the location. Fixes bug #58488.
18797
18798 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
18799
18800         * driver.cs: Add -pkg handling.
18801
18802         From Gonzalo: UseShelLExecute=false
18803
18804 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
18805
18806         * attribute.cs:
18807         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
18808         for attribute.
18809         (Attribute.IsClsCompliaceRequired): Moved to base for better
18810         accesibility.
18811         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
18812         when attribute is AttributeUsageAttribute.
18813         (Attribute.GetValidTargets): Simplified.
18814         (Attribute.GetAttributeUsage): New method returns AttributeUsage
18815         attribute for this type.
18816         (Attribute.ApplyAttributes): Method renamed to Emit and make
18817         non-static.
18818         (GlobalAttributeSection): New class for special handling of global
18819         attributes (assembly, module).
18820         (AttributeSection.Emit): New method.
18821
18822         * class.cs: Implemented Attributable abstract methods.
18823         (MethodCore.LabelParameters): Moved to Parameter class.
18824         (Accessor): Is back simple class.
18825         (PropertyMethod): Implemented Attributable abstract class.
18826         (DelegateMethod): Implemented Attributable abstract class.
18827         (Event): New constructor for disctintion between normal Event
18828         and Event with accessors.
18829
18830         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
18831
18832         * codegen.cs, const.cs, decl.cs, delegate.cs:
18833         (CommonAssemblyModulClass): Implemented Attributable abstract class
18834         and simplified.
18835
18836         * enum.cs: Implement IAttributeSupport interface.
18837         (EnumMember): New class for emum members. Implemented Attributable
18838         abstract class
18839
18840         * parameter.cs:
18841         (ParameterBase): Is abstract.
18842         (ReturnParameter): New class for easier [return:] attribute handling.
18843
18844         * typemanager.cs: Removed builder_to_attr.
18845
18846 2004-05-11  Raja R Harinath  <rharinath@novell.com>
18847
18848         Fix bug #57151.
18849         * attribute.cs (Attribute.GetPositionalValue): New function.
18850         * class.cs (TypeContainer.VerifyMembers): New function.
18851         (TypeContainer.Emit): Use it.
18852         (ClassOrStruct): New base class for Class and Struct.
18853         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
18854         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
18855         class.
18856         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
18857         then each non-static field should have a FieldOffset attribute.
18858         Otherwise, none of the fields should have a FieldOffset attribute.
18859         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
18860         and FieldOffset attributes.
18861         * typemanager.cs (TypeManager.struct_layout_attribute_type)
18862         (TypeManager.field_offset_attribute_type): New core types.
18863         (TypeManager.InitCoreTypes): Initialize them.
18864
18865 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
18866
18867         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
18868         Return correct type.
18869         From bug #58270.
18870
18871 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
18872
18873         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
18874         be implicitly converted to ulong.
18875         
18876         * expression.cs: The logic for allowing operator &, | and ^ worked
18877         was wrong, it worked before because we did not report an error in
18878         an else branch.  Fixes 57895.
18879
18880         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
18881         allow volatile fields to be reference types.
18882
18883 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
18884
18885         * driver.cs: Add support for /debug-
18886
18887 2004-05-07  Raja R Harinath  <rharinath@novell.com>
18888
18889         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
18890         Add a 'complain' parameter to silence errors.
18891         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
18892         silently overlooked type-resolutions.
18893         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
18894         to reflect changes.
18895         (Attributes.Search): New function.
18896         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
18897         (Attributes.GetAttributeFullName): Remove hack.
18898         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
18899         Update to reflect changes.
18900         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
18901         Use Attributes.Search instead of nested loops.
18902
18903 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
18904
18905         * decl.cs:
18906         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
18907         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
18908         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
18909
18910         * report.cs: (Report.Warning): Renamed to Warning_T because of
18911         parameter collision.
18912
18913 2004-05-05  Raja R Harinath  <rharinath@novell.com>
18914
18915         * expression.cs (MemberAccess.ResolveMemberAccess):
18916         Exit with non-zero status after Report.Error.
18917         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
18918         Likewise.
18919         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
18920
18921 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18922
18923         * support.cs: Don't hang when the file is empty.
18924
18925 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18926
18927         * support.cs: In SeekableStreamReader, compute the preamble size of the
18928           underlying stream. Position changes should take into account that initial
18929           count of bytes.
18930
18931 2004-05-03  Todd Berman  <tberman@sevenl.net>
18932
18933         * driver.cs: remove unused GetSysVersion function.
18934
18935 2004-05-03  Todd Berman  <tberman@sevenl.net>
18936
18937         * driver.cs: Remove the hack from saturday, as well as the hack
18938         from jackson (LoadAssemblyFromGac), also adds the CWD to the
18939         link_paths to get that bit proper.
18940
18941 2004-05-01  Todd Berman  <tberman@sevenl.net>
18942
18943         * driver.cs: Try a LoadFrom before a Load, this checks the current
18944         path. This is currently a bug in mono that is be fixed, however, this
18945         provides a workaround for now. This will be removed when the bug
18946         is fixed.
18947
18948 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
18949
18950         * CryptoConvert.cs: Updated to latest version. Fix issue with 
18951         incomplete key pairs (#57941).
18952
18953 2004-05-01  Todd Berman  <tberman@sevenl.net>
18954
18955         * driver.cs: Remove '.' from path_chars, now System.* loads properly
18956         from the GAC
18957
18958 2004-04-30  Jackson Harper  <jackson@ximian.com>
18959
18960         * codegen.cs: Open keys readonly.
18961         
18962 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18963
18964         * typemanager.cs: don't report cyclic struct layout when a struct
18965         contains 2 or more fields of the same type. Failed for Pango.AttrShape
18966         which has 2 Pango.Rectangle fields.
18967
18968 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
18969
18970         * expression.cs: Handle IntPtr comparisons with IL code
18971         rather than a method call.
18972
18973 2004-04-29  Martin Baulig  <martin@ximian.com>
18974
18975         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
18976         the list of PropertyInfo's in class hierarchy and find the
18977         accessor.  Fixes #56013.
18978
18979 2004-04-29  Martin Baulig  <martin@ximian.com>
18980
18981         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
18982
18983 2004-04-29  Martin Baulig  <martin@ximian.com>
18984
18985         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
18986
18987         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
18988
18989 2004-04-29  Martin Baulig  <martin@ximian.com>
18990
18991         * class.cs (ConstructorInitializer.Resolve): Check whether the
18992         parent .ctor is accessible.  Fixes #52146.
18993
18994 2004-04-29  Martin Baulig  <martin@ximian.com>
18995
18996         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
18997
18998         * statement.cs (Using.EmitLocalVariableDecls): Use
18999         TypeManager.idisposable_type, not typeof (IDisposable).
19000         (Foreach.EmitCollectionForeach): Added support for valuetypes.
19001
19002 2004-04-29  Martin Baulig  <martin@ximian.com>
19003
19004         * class.cs (Event.Define): Don't emit the field and don't set
19005         RTSpecialName and SpecialName for events on interfaces.  Fixes
19006         #57703. 
19007
19008 2004-04-29  Raja R Harinath  <rharinath@novell.com>
19009
19010         Refactor Attribute.ApplyAttributes.
19011         * attribute.cs (Attributable): New base class for objects that can
19012         have Attributes applied on them.
19013         (Attribute): Make AttributeUsage fields public.
19014         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
19015         (Attribute.IsInternalCall): New property.
19016         (Attribute.UsageAttr): Convert to a public read-only property.
19017         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
19018         (Attribute.ResolveType, Attribute.Resolve)
19019         (Attribute.ScanForIndexerName): Update to reflect changes.
19020         (Attribute.CheckAttributeTarget): Re-format.
19021         (Attribute.ApplyAttributes): Refactor, to various
19022         Attributable.ApplyAttributeBuilder methods.
19023         * decl.cs (MemberCore): Make Attributable.
19024         * class.cs (Accessor): Make Attributable.
19025         (MethodData.ApplyAttributes): Use proper attribute types, not
19026         attribute names.
19027         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
19028         (TypeContainer.ApplyAttributeBuilder)
19029         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
19030         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
19031         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
19032         (Operator.ApplyAttributeBuilder): New factored-out methods.
19033         * const.cs (Const.ApplyAttributeBuilder): Likewise.
19034         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
19035         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
19036         * parameter.cs (ParameterBase): New Attributable base class
19037         that can also represent Return types.
19038         (Parameter): Update to the changes.
19039
19040 2004-04-29  Jackson Harper  <jackson@ximian.com>
19041
19042         * driver.cs: Prefer the corlib system version when looking for
19043         assemblies in the GAC. This is still a hack, but its a better hack
19044         now.
19045         
19046 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19047
19048         * decl.cs, enum.cs: Improved error 3005 reporting.
19049   
19050         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19051         (related_symbols): New private member for list of symbols
19052         related to reported error/warning.
19053         
19054         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19055
19056 2004-04-29  Martin Baulig  <martin@ximian.com>
19057
19058         * ecore.cs (Expression.Constantify): If we're an enum and
19059         TypeManager.TypeToCoreType() doesn't give us another type, use
19060         t.UnderlyingSystemType.  Fixes #56178.  
19061
19062 2004-04-29  Martin Baulig  <martin@ximian.com>
19063
19064         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19065         interfaces and for each interface, only add members directly
19066         declared in that interface.  Fixes #53255.
19067
19068 2004-04-28  Martin Baulig  <martin@ximian.com>
19069
19070         * expression.cs (ConditionalLogicalOperator): Use a temporary
19071         variable for `left' to avoid that we evaluate it more than once;
19072         bug #52588.
19073
19074 2004-04-28  Martin Baulig  <martin@ximian.com>
19075
19076         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19077         `void[]' (CS1547).
19078
19079 2004-04-28  Martin Baulig  <martin@ximian.com>
19080
19081         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19082         void (CS1547).
19083
19084         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19085         whether the type is not void (CS1547).
19086
19087 2004-04-28  Martin Baulig  <martin@ximian.com>
19088
19089         * expression.cs (Unary.DoResolveLValue): Override this and report
19090         CS0131 for anything but Operator.Indirection.
19091
19092 2004-04-28  Martin Baulig  <martin@ximian.com>
19093
19094         Committing a patch from Ben Maurer; see bug #50820.
19095
19096         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19097         check for classes.
19098
19099         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19100         classes.        
19101
19102 2004-04-28  Martin Baulig  <martin@ximian.com>
19103
19104         Committing a patch from Ben Maurer; see bug #50820.
19105
19106         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19107         check for classes.
19108
19109         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19110         classes.        
19111
19112 2004-04-28  Martin Baulig  <martin@ximian.com>
19113
19114         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19115         (Block.AddLabel): Call DoLookupLabel() to only search in the
19116         current block.
19117
19118 2004-04-28  Martin Baulig  <martin@ximian.com>
19119
19120         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19121         comparing StringConstants and NullLiterals in Equality and Inequality.
19122
19123 2004-04-28  Jackson Harper  <jackson@ximian.com>
19124
19125         * driver.cs: Attempt to load referenced assemblies from the
19126         GAC. This is the quick and dirty version of this method that
19127         doesnt take into account versions and just takes the first
19128         canidate found. Will be good enough for now as we will not have more
19129         then one version installed into the GAC until I update this method.
19130
19131 2004-04-28  Martin Baulig  <martin@ximian.com>
19132
19133         * typemanager.cs (TypeManager.CheckStructCycles): New public
19134         static method to check for cycles in the struct layout.
19135
19136         * rootcontext.cs (RootContext.PopulateTypes): Call
19137         TypeManager.CheckStructCycles() for each TypeContainer.
19138         [Note: We only need to visit each type once.]
19139
19140 2004-04-28  Martin Baulig  <martin@ximian.com>
19141
19142         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19143
19144         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19145         success and added `out object value'.  Use a `bool resolved' field
19146         to check whether we've already been called rather than
19147         `ConstantValue != null' since this breaks for NullLiterals.
19148
19149 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19150
19151         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19152         setting of this flag, since the 'set' method may be non-public.
19153
19154 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19155
19156         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19157         check on current_vector.Block.
19158
19159 2004-04-27  Martin Baulig  <martin@ximian.com>
19160
19161         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19162         a field initializer.  Fixes #56459.
19163
19164 2004-04-27  Martin Baulig  <martin@ximian.com>
19165
19166         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19167         we're not attempting to use an indexer.  Fixes #52154.
19168
19169 2004-04-27  Martin Baulig  <martin@ximian.com>
19170
19171         * statement.cs (Return): Don't create a return label if we don't
19172         need it; reverts my change from January 20th.  Thanks to Ben
19173         Maurer for this.
19174
19175 2004-04-27  Martin Baulig  <martin@ximian.com>
19176
19177         According to the spec, `goto' can only leave a nested scope, but
19178         never enter it.
19179
19180         * statement.cs (Block.LookupLabel): Only lookup in the current
19181         block, don't recurse into parent or child blocks.
19182         (Block.AddLabel): Check in parent and child blocks, report
19183         CS0140/CS0158 if we find a duplicate.
19184         (Block): Removed this indexer for label lookups.
19185         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19186         this already does the error reporting for us.
19187
19188         * flowanalysis.cs
19189         (FlowBranching.UsageVector.Block): New public variable; may be null.
19190         (FlowBranching.CreateSibling): Added `Block' argument.
19191         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19192         label for the target of a `goto' and check whether we're not
19193         leaving a `finally'.
19194
19195 2004-04-27  Martin Baulig  <martin@ximian.com>
19196
19197         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19198         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19199         just for returns).
19200
19201 2004-04-27  Martin Baulig  <martin@ximian.com>
19202
19203         * statement.cs (Block.AddLabel): Also check for implicit blocks
19204         and added a CS0158 check.
19205
19206 2004-04-27  Martin Baulig  <martin@ximian.com>
19207
19208         * flowanalysis.cs (FlowBranchingLoop): New class.
19209         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19210         UsageVector's instead of an ArrayList.
19211         (FlowBranching.Label): Likewise.
19212         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19213         (FlowBranching.AddBreakVector): New method.
19214
19215 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19216
19217         * attribute.cs: Small regression fix: only convert the type if we
19218         the type is different, fixes System.Drawing build.
19219
19220 2004-04-27  Martin Baulig  <martin@ximian.com>
19221
19222         * attribute.cs (Attribute.Resolve): If we have a constant value
19223         for a named field or property, implicity convert it to the correct
19224         type.
19225
19226 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19227
19228         * statement.cs (Block.Block): Implicit blocks share
19229         'child_variable_names' fields with parent blocks.
19230         (Block.AddChildVariableNames): Remove.
19231         (Block.AddVariable): Mark variable as "used by a child block" in
19232         every surrounding block.
19233         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19234         been used in a child block, complain about violation of "Invariant
19235         meaning in blocks" rule.
19236         * cs-parser.jay (declare_local_variables): Don't use
19237         AddChildVariableNames.
19238         (foreach_statement): Don't create an implicit block: 'foreach'
19239         introduces a scope.
19240
19241 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19242
19243         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19244         converting from 0L to ulong.  Fixes 57522.
19245
19246 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19247
19248         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19249         derived class hides via 'new' keyword field from base class (test-242.cs).
19250         TODO: Handle this in the more general way.
19251         
19252         * class.cs (CheckBase): Ditto.
19253
19254 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19255
19256         * decl.cs (caching_flags): New member for storing cached values
19257         as bit flags.
19258         (MemberCore.Flags): New enum where bit flags for caching_flags
19259         are defined.
19260         (MemberCore.cls_compliance): Moved to caching_flags.
19261         (DeclSpace.Created): Moved to caching_flags.
19262
19263         * class.cs: Use caching_flags instead of DeclSpace.Created
19264         
19265 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19266
19267         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19268         if we are only a derived class, not a nested class.
19269
19270         * typemanager.cs: Same as above, but do this at the MemberLookup
19271         level (used by field and methods, properties are handled in
19272         PropertyExpr).   Allow for the qualified access if we are a nested
19273         method. 
19274
19275 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19276
19277         * class.cs: Refactoring.
19278         (IMethodData): New inteface; Holds links to parent members
19279         to avoid member duplication (reduced memory allocation).
19280         (Method): Implemented IMethodData interface.
19281         (PropertyBase): New inner classes for get/set methods.
19282         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19283         (Event): New inner classes for add/remove methods.
19284         (Event.DelegateMethod): Implemented IMethodData interface.
19285
19286         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19287         EmitContext (related to class.cs refactoring).
19288
19289 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19290
19291         * delegate.cs (Delegate.VerifyApplicability): If the number of
19292         arguments are the same as the number of parameters, first try to
19293         verify applicability ignoring  any 'params' modifier on the last
19294         parameter.
19295         Fixes #56442.
19296
19297 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19298
19299         * class.cs (TypeContainer.AddIndexer): Use
19300         'ExplicitInterfaceName' to determine if interface name was
19301         explicitly specified.  'InterfaceType' is not initialized at this time.
19302         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19303         Indexers array is already in the required order.  Initialize
19304         'IndexerName' only if there are normal indexers.
19305         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19306         (TypeContainer.Emit): Emit DefaultMember attribute only if
19307         IndexerName is initialized.
19308         Fixes #56300.
19309
19310 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19311
19312         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19313         Fixes #57007
19314
19315 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19316
19317         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19318         attributes.
19319         Fix for #56456.
19320
19321         * attribute.cs (Attribute.Resolve): Check for duplicate named
19322         attributes.
19323         Fix for #56463.
19324
19325 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19326
19327         * iterators.cs (MarkYield): track whether we are in an exception,
19328         and generate code accordingly.  Use a temporary value to store the
19329         result for our state.
19330
19331         I had ignored a bit the interaction of try/catch with iterators
19332         since their behavior was not entirely obvious, but now it is
19333         possible to verify that our behavior is the same as MS .NET 2.0
19334
19335         Fixes 54814
19336
19337 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19338
19339         * iterators.cs: Avoid creating temporaries if there is no work to
19340         do. 
19341
19342         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19343         Enumerations, use TypeManager.EnumToUnderlying and call
19344         recursively. 
19345
19346         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19347         bug #57013
19348
19349         (This.Emit): Use EmitContext.EmitThis to emit our
19350         instance variable.
19351
19352         (This.EmitAssign): Ditto.
19353
19354         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19355         codepaths, we will move all the functionality into
19356         Mono.CSharp.This 
19357
19358         (FieldExpr.EmitAssign): Ditto.
19359
19360         This fixes several hidden bugs that I uncovered while doing a code
19361         review of this today.
19362
19363         * codegen.cs (EmitThis): reworked so the semantics are more clear
19364         and also support value types "this" instances.
19365
19366         * iterators.cs: Changed so that for iterators in value types, we
19367         do not pass the value type as a parameter.  
19368
19369         Initialization of the enumerator helpers is now done in the caller
19370         instead of passing the parameters to the constructors and having
19371         the constructor set the fields.
19372
19373         The fields have now `assembly' visibility instead of private.
19374
19375 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19376
19377         * expression.cs (Argument.Resolve): Check if fields passed as ref
19378         or out are contained in a MarshalByRefObject.
19379
19380         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19381         another compiler type.
19382
19383 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19384
19385         * class.cs (Indexer.Define): use the new name checking method.
19386         Also, return false on an error.
19387         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19388         (is_identifier_[start/part]_character): make static.
19389
19390 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19391
19392         * expression.cs (Binary.ResolveOperator): Do no append strings
19393         twice: since we can be invoked more than once (array evaluation)
19394         on the same concatenation, take care of this here.  Based on a fix
19395         from Ben (bug #56454)
19396
19397 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19398
19399         * codegen.cs: Fix another case where CS1548 must be reported (when 
19400         delay-sign isn't specified and no private is available #56564). Fix
19401         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19402         error when MCS is used on the MS runtime and we need to delay-sign 
19403         (which seems unsupported by AssemblyBuilder - see #56621).
19404
19405 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19406
19407         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19408         (TypeManager.ComputeNamespaces): Faster implementation for
19409         Microsoft runtime.
19410
19411         * compiler.csproj: Updated AssemblyName to mcs.
19412
19413 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19414
19415         * rootcontext.cs: Add new types to the boot resolution.
19416
19417         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19418         MulticastDelegate is not allowed.
19419
19420         * typemanager.cs: Add new types to lookup: System.TypedReference
19421         and ArgIterator.
19422
19423         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19424         check for TypedReference or ArgIterator, they are not allowed. 
19425
19426         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19427         makes us properly catch 1510 in some conditions (see bug 56016 for
19428         details). 
19429
19430 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19431
19432         * CryptoConvert.cs: update from corlib version
19433         with endian fixes.
19434
19435 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19436
19437         * class.cs (Indexer.Define): Check indexername declaration
19438
19439 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19440
19441         * attribute.cs (IsClsCompliant): Fixed problem with handling
19442         all three states (compliant, not-compliant, undetected).
19443
19444 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19445
19446         * attribute.cs (Attribute): Location is now public.
19447         (Resolve): Store resolved arguments (pos_values) in attribute class.
19448         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19449         (GetClsCompliantAttributeValue): New method that gets
19450         CLSCompliantAttribute value.
19451         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19452         if exists else null.
19453         (AttributeTester): New class for CLS-Compliant verification routines.
19454
19455         * class.cs (Emit): Add CLS-Compliant verification.
19456         (Method.GetSignatureForError): Implemented.
19457         (Constructor.GetSignatureForError): Implemented
19458         (Constructor.HasCompliantArgs): Returns if constructor has
19459         CLS-Compliant arguments.
19460         (Constructor.Emit): Override.
19461         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19462         is needed to test only parameters.
19463         (FieldBase.GetSignatureForError): Implemented.
19464         (TypeContainer): New member for storing base interfaces.
19465         (TypeContainer.FindMembers): Search in base interfaces too.
19466
19467         * codegen.cs (GetClsComplianceAttribute): New method that gets
19468         assembly or module CLSCompliantAttribute value.
19469         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19470         for assembly.
19471         (ModuleClass.Emit): Add error 3012 test.
19472
19473         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19474
19475         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19476         state for all decl types.
19477         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19478         if CLS-Compliant tests are required.
19479         (IsClsCompliaceRequired): New method. Analyze whether code
19480         must be CLS-Compliant.
19481         (IsExposedFromAssembly): New method. Returns true when MemberCore
19482         is exposed from assembly.
19483         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19484         value or gets cached value.
19485         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19486         is explicitly marked with CLSCompliantAttribute.
19487         (IsIdentifierClsCompliant): New abstract method. This method is
19488         used to testing error 3005.
19489         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19490         for identifier and parameters CLS-Compliant testing.
19491         (VerifyClsCompliance): New method. The main virtual method for
19492         CLS-Compliant verifications.
19493         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19494         null. I don't know why is null (too many public members !).
19495         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19496         and get value of first CLSCompliantAttribute that found.
19497
19498         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19499         (VerifyClsCompliance): Override and add extra tests.
19500
19501         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19502         clscheck- disable CLS-Compliant verification event if assembly is has
19503         CLSCompliantAttribute(true).
19504
19505         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19506         ApllyAttribute is now called in emit section as in the other cases.
19507         Possible future Emit integration.
19508         (IsIdentifierClsCompliant): New override.
19509         (VerifyClsCompliance): New override.
19510         (GetEnumeratorName): Returns full enum name.
19511
19512         * parameter.cs (GetSignatureForError): Implemented.
19513
19514         * report.cs (WarningData): New struct for Warning message information.
19515         (LocationOfPreviousError): New method.
19516         (Warning): New method. Reports warning based on the warning table.
19517         (Error_T): New method. Reports error based on the error table.
19518
19519         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19520         verifications are done here.
19521
19522         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19523
19524         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19525         CLSCompliantAttribute.
19526         (all_imported_types): New member holds all imported types from other
19527         assemblies.
19528         (LoadAllImportedTypes): New method fills static table with exported types
19529         from all referenced assemblies.
19530         (Modules): New property returns all assembly modules.
19531
19532 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19533
19534         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19535         throwing a parser error.
19536
19537         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19538         which removes the hardcoded get_/set_ prefixes for properties, as
19539         IL allows for the properties to be named something else.  
19540
19541         Bug #56013
19542
19543         * expression.cs: Do not override operand before we know if it is
19544         non-null.  Fix 56207
19545
19546 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19547
19548         * typemanager.cs: support for pinned variables.
19549
19550 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19551
19552         * decl.cs, typemanager.cs: Avoid using an arraylist
19553         as a buffer if there is only one result set.
19554
19555 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19556
19557         * expression.cs: Make sure you cant call a static method
19558         with an instance expression, bug #56174.
19559
19560 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19561
19562         * class.cs (IsDuplicateImplementation): Improve error reporting to
19563         flag 663 (method only differs in parameter modifier).
19564
19565         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19566         in preprocessor directives.
19567
19568         * location.cs (LookupFile): Allow for the empty path.
19569
19570         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19571         better approach for some of that patch, but its failing with the
19572         CharSet enumeration.  For now try/catch will do.
19573
19574         * typemanager.cs: Do not crash if a struct does not have fields.
19575         Fixes 56150.
19576
19577 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19578
19579         * expression.cs: cs0213, cant fix a fixed expression.
19580         fixes 50231.
19581
19582 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19583
19584         * cs-parser.jay: detect invalid embeded statements gracefully.
19585         bug #51113.
19586
19587 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19588
19589         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19590         As a regex:
19591         s/
19592         the invocation type may not be a subclass of the tye of the item/
19593         The type of the item must be a subclass of the invocation item.
19594         /g
19595
19596         Fixes bug #50820.
19597
19598 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19599
19600         * attribute.cs: Added methods to get a string and a bool from an
19601         attribute. Required to information from AssemblyKeyFileAttribute,
19602         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19603         * codegen.cs: Modified AssemblyName creation to include support for
19604         strongnames. Catch additional exceptions to report them as CS1548.
19605         * compiler.csproj: Updated include CryptoConvert.cs.
19606         * compiler.csproj.user: Removed file - user specific configuration.
19607         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19608         Mono.Security assembly. The original class is maintained and tested in
19609         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19610         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19611         like CSC 8.0 (C# v2) supports.
19612         * Makefile: Added CryptoConvert.cs to mcs sources.
19613         * rootcontext.cs: Added new options for strongnames.
19614
19615 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19616
19617         * driver.cs: For --expect-error, report error code `2'
19618         if the program compiled with no errors, error code `1' if
19619         it compiled with an error other than the one expected.
19620
19621 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19622
19623         * compiler.csproj: Updated for Visual Studio .NET 2003.
19624         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19625         * compiler.sln: Updated for Visual Studio .NET 2003.
19626
19627 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19628
19629         * expression.cs: Fix bug #47234. We basically need to apply the
19630         rule that we prefer the conversion of null to a reference type
19631         when faced with a conversion to 'object' (csc behaviour).
19632
19633 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19634
19635         * statement.cs: Shorter form for foreach, eliminates
19636         a local variable. r=Martin.
19637
19638 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19639
19640         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
19641         checks if we can use brtrue/brfalse to test for 0.
19642         * expression.cs: use the above in the test for using brtrue/brfalse.
19643         cleanup code a bit.
19644
19645 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19646
19647         * expression.cs: Rewrite string concat stuff. Benefits:
19648
19649         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
19650         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
19651         rather than a concat chain.
19652
19653         * typemanager.cs: Add lookups for more concat overloads.
19654
19655 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19656
19657         * expression.cs: Emit shorter il code for array init.
19658
19659         newarr
19660         dup
19661         // set 1
19662
19663         // set 2
19664
19665         newarr
19666         stloc.x
19667
19668         ldloc.x
19669         // set 1
19670
19671         ldloc.x
19672         // set 2
19673
19674 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
19675
19676         * statement.cs: Before, two switch blocks would be merged if the
19677         total size of the blocks (end_item - begin_item + 1) was less than
19678         two times the combined sizes of the blocks.
19679
19680         Now, it will only merge if after the merge at least half of the
19681         slots are filled.
19682
19683         fixes 55885.
19684
19685 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
19686
19687         * class.cs : csc build fix for GetMethods(). See bug #52503.
19688
19689 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19690
19691         * expression.cs: Make sure fp comparisons work with NaN.
19692         This fixes bug #54303. Mig approved this patch a long
19693         time ago, but we were not able to test b/c the runtime
19694         had a related bug.
19695
19696 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
19697
19698         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
19699
19700 2004-03-19  Martin Baulig  <martin@ximian.com>
19701
19702         * class.cs (MemberCore.IsDuplicateImplementation): Report the
19703         error here and not in our caller.
19704
19705 2004-03-19  Martin Baulig  <martin@ximian.com>
19706
19707         * interface.cs: Completely killed this file.
19708         (Interface): We're now a TypeContainer and live in class.cs.
19709
19710         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
19711         argument; we're now also called for interfaces.
19712         (TypeContainer.DefineMembers): Allow this method being called
19713         multiple times.
19714         (TypeContainer.GetMethods): New public method; formerly known as
19715         Interface.GetMethod().  This is used by PendingImplementation.
19716         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
19717         it's now private and non-static.
19718         (Interface): Moved this here; it's now implemented similar to
19719         Class and Struct.
19720         (Method, Property, Event, Indexer): Added `bool is_interface'
19721         argument to their .ctor's.
19722         (MemberBase.IsInterface): New public field.
19723
19724         * cs-parser.jay: Create normal Method, Property, Event, Indexer
19725         instances instead of InterfaceMethod, InterfaceProperty, etc.
19726         (opt_interface_base): Removed; we now use `opt_class_base' instead.
19727         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
19728
19729 2004-03-19  Martin Baulig  <martin@ximian.com>
19730
19731         * class.cs (MethodCore.IsDuplicateImplementation): New private
19732         method which does the CS0111 checking.
19733         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
19734         Use IsDuplicateImplementation().
19735
19736 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19737
19738         * decl.cs (FindMemberToOverride): New method to find the correct
19739         method or property to override in the base class.
19740         * class.cs
19741             - Make Method/Property use the above method to find the
19742               version in the base class.
19743             - Remove the InheritableMemberSignatureCompare as it is now
19744               dead code.
19745
19746         This patch makes large code bases much faster to compile, as it is
19747         O(n) rather than O(n^2) to do this validation.
19748
19749         Also, it fixes bug 52458 which is that nested classes are not
19750         taken into account when finding the base class member.
19751
19752         Reviewed/Approved by Martin.
19753
19754 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
19755
19756         * interface.cs: In all interface classes removed redundant
19757         member initialization.
19758
19759 2004-03-16  Martin Baulig  <martin@ximian.com>
19760
19761         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
19762
19763 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
19764
19765         * decl.cs (DefineTypeAndParents): New helper method to define a
19766         type's containers before the type itself is defined;  This is a
19767         bug exposed by the recent changes to Windows.Forms when an
19768         implemented interface was defined inside a class that had not been
19769         built yet.   
19770
19771         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
19772
19773         (Check): Loop correctly to report errors modifiers
19774         (UNSAFE was not in the loop, since it was the same as TOP).
19775
19776         * interface.cs: Every interface member now takes a ModFlags,
19777         instead of a "is_new" bool, which we set on the base MemberCore. 
19778
19779         Every place where we called "UnsafeOk" in the interface, now we
19780         call the proper member (InterfaceMethod.UnsafeOK) instead to get
19781         the unsafe settings from the member declaration instead of the
19782         container interface. 
19783
19784         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
19785
19786         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
19787         `set_indexer_name' to the pending bits (one per type).
19788
19789         We fixed a bug today that was picking the wrong method to
19790         override, since for properties the existing InterfaceMethod code
19791         basically ignored the method name.  Now we make sure that the
19792         method name is one of the valid indexer names.
19793
19794 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
19795  
19796         * support.cs (SeekableStreamReader): Keep track of stream byte
19797         positions and don't mix them with character offsets to the buffer.
19798
19799         Patch from Gustavo Giráldez
19800
19801 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
19802
19803         * interface.cs (InterfaceSetGetBase): Removed double member
19804         initialization, base class does it as well.
19805
19806 2004-03-13  Martin Baulig  <martin@ximian.com>
19807
19808         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
19809         when compiling corlib.
19810
19811 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
19812
19813         * convert.cs (ExplicitConversion): We were reporting an error on
19814         certain conversions (object_type source to a value type, when the
19815         expression was `null') before we had a chance to pass it through
19816         the user defined conversions.
19817
19818         * driver.cs: Replace / and \ in resource specifications to dots.
19819         Fixes 50752
19820
19821         * class.cs: Add check for duplicate operators.  Fixes 52477
19822
19823 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
19824
19825         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
19826         that are in the middle of the statements, not only at the end.
19827         Fixes #54987
19828
19829         * class.cs (TypeContainer.AddField): No longer set the
19830         `HaveStaticConstructor' flag, now we call it
19831         `UserDefineStaticConstructor' to diferentiate the slightly
19832         semantic difference.
19833
19834         The situation is that we were not adding BeforeFieldInit (from
19835         Modifiers.TypeAttr) to classes that could have it.
19836         BeforeFieldInit should be set to classes that have no static
19837         constructor. 
19838
19839         See:
19840
19841         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
19842
19843         And most importantly Zoltan's comment:
19844
19845         http://bugzilla.ximian.com/show_bug.cgi?id=44229
19846
19847         "I think beforefieldinit means 'it's ok to initialize the type sometime 
19848          before its static fields are used', i.e. initialization does not need
19849          to be triggered by the first access to the type. Setting this flag
19850          helps the JIT to compile better code, since it can run the static
19851          constructor at JIT time, and does not need to generate code to call it
19852          (possibly lots of times) at runtime. Unfortunately, mcs does not set
19853          this flag for lots of classes like String. 
19854          
19855          csc sets this flag if the type does not have an explicit static 
19856          constructor. The reasoning seems to be that if there are only static
19857          initalizers for a type, and no static constructor, then the programmer
19858          does not care when this initialization happens, so beforefieldinit
19859          can be used.
19860          
19861          This bug prevents the AOT compiler from being usable, since it 
19862          generates so many calls to mono_runtime_class_init that the AOT code
19863          is much slower than the JITted code. The JITted code is faster, 
19864          because it does not generate these calls if the vtable is type is
19865          already initialized, which is true in the majority of cases. But the
19866          AOT compiler can't do this."
19867
19868 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
19869
19870         * class.cs (MethodData.Emit): Refactor the code so symbolic
19871         information is generated for destructors;  For some reasons we
19872         were taking a code path that did not generate symbolic information
19873         before. 
19874
19875 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
19876
19877         * class.cs: Create a Constructor.CheckBase method that
19878         takes care of all validation type code. The method
19879         contains some code that was moved from Define.
19880
19881         It also includes new code that checks for duplicate ctors.
19882         This fixes bug #55148.
19883
19884 2004-03-09  Joshua Tauberer <tauberer@for.net>
19885
19886         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
19887         a { ... }-style array creation invokes EmitStaticInitializers
19888         which is not good for reference-type arrays.  String, decimal
19889         and now null constants (NullCast) are not counted toward
19890         static initializers.
19891
19892 2004-03-05  Martin Baulig  <martin@ximian.com>
19893
19894         * location.cs (SourceFile.HasLineDirective): New public field;
19895         specifies whether the file contains or is referenced by a "#line"
19896         directive.
19897         (Location.DefineSymbolDocuments): Ignore source files which
19898         either contain or are referenced by a "#line" directive.        
19899
19900 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
19901
19902         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
19903         direct access to our parent, so check the method inline there.
19904
19905 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19906
19907         * expression.cs (Invocation.EmitCall): Miguel's last commit
19908         caused a regression. If you had:
19909
19910             T t = null;
19911             t.Foo ();
19912
19913         In Foo the implict this would be null.
19914
19915 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
19916
19917         * expression.cs (Invocation.EmitCall): If the method is not
19918         virtual, do not emit a CallVirt to it, use Call.
19919
19920         * typemanager.cs (GetFullNameSignature): Improve the method to
19921         cope with ".ctor" and replace it with the type name.
19922
19923         * class.cs (ConstructorInitializer.Resolve): Now the method takes
19924         as an argument the ConstructorBuilder where it is being defined,
19925         to catch the recursive constructor invocations.
19926
19927 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
19928
19929         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
19930         routines to check if a type is an enumerable/enumerator allow
19931         classes that implement the IEnumerable or IEnumerator interfaces.
19932
19933         * class.cs (Property, Operator): Implement IIteratorContainer, and
19934         implement SetYields.
19935
19936         (Property.Define): Do the block swapping for get_methods in the
19937         context of iterators.   We need to check if Properties also
19938         include indexers or not.
19939
19940         (Operator): Assign the Block before invoking the
19941         OperatorMethod.Define, so we can trigger the Iterator code
19942         replacement. 
19943
19944         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
19945         Property and Operator classes are not created when we parse the
19946         declarator but until we have the block completed, so we use a
19947         singleton SimpleIteratorContainer.Simple to flag whether the
19948         SetYields has been invoked.
19949
19950         We propagate this setting then to the Property or the Operator to
19951         allow the `yield' to function.
19952
19953 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
19954
19955         * codegen.cs: Implemented attribute support for modules.
19956         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
19957         Assembly/Module functionality.
19958
19959         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
19960         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
19961         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
19962
19963 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
19964
19965         * interface.cs (FindMembers): The operation is performed on all base
19966         interfaces and not only on the first. It is required for future CLS Compliance patch.
19967
19968 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
19969
19970         * statement.cs, codegen.cs:
19971         This patch deals with patterns such as:
19972
19973         public class List : IEnumerable {
19974
19975                 public MyEnumerator GetEnumerator () {
19976                         return new MyEnumerator(this);
19977                 }
19978
19979                 IEnumerator IEnumerable.GetEnumerator () {
19980                         ...
19981                 }
19982                 
19983                 public struct MyEnumerator : IEnumerator {
19984                         ...
19985                 }
19986         }
19987
19988         Before, there were a few things we did wrong:
19989         1) we would emit callvirt on a struct, which is illegal
19990         2) we emited ldarg when we needed to emit ldarga
19991         3) we would mistakenly call the interface methods on an enumerator
19992         type that derived from IEnumerator and was in another assembly. For example:
19993
19994         public class MyEnumerator : IEnumerator
19995
19996         Would have the interface methods called, even if there were public impls of the
19997         method. In a struct, this lead to invalid IL code.
19998
19999 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
20000
20001         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
20002           renamed to Emit.
20003
20004         * delegate.cs (Define): Fixed crash when delegate type is undefined.
20005
20006 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
20007
20008         * cs-parser.jay: Fix small regression: we were not testing V2
20009         compiler features correctly.
20010
20011         * interface.cs: If the emit context is null, then create one
20012
20013 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
20014
20015         * decl.cs (GetSignatureForError): New virtual method to get full name
20016           for error messages.
20017
20018         * attribute.cs (IAttributeSupport): New interface for attribute setting.
20019           Now it is possible to rewrite ApplyAttributes method to be less if/else.
20020
20021         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
20022           Duplicated members and code in these classes has been removed.
20023           Better encapsulation in these classes.
20024
20025 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
20026
20027         * assign.cs (Assign.DoResolve): When dealing with compound
20028         assignments, there is a new rule in ECMA C# 2.4 (might have been
20029         there before, but it is documented here) that states that in:
20030
20031         a op= b;
20032
20033         If b is of type int, and the `op' is a shift-operator, then the
20034         above is evaluated as:
20035
20036         a = (int) a op b 
20037
20038         * expression.cs (Binary.ResolveOperator): Instead of testing for
20039         int/uint/long/ulong, try to implicitly convert to any of those
20040         types and use that in pointer arithmetic.
20041
20042         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
20043         method to print information for from the type, not from the
20044         null-method we were given.
20045
20046 2004-02-01  Duncan Mak  <duncan@ximian.com>
20047
20048         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20049         parsing for cmd, fixes bug #53694.
20050
20051 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20052
20053         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20054         in the member name duplication tests. Property and operator name duplication
20055         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20056
20057 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20058
20059         * interface.cs (PopulateMethod): Fixed crash when interface method
20060         returns not existing type (error test cs0246-3.cs).
20061
20062 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20063
20064         * cs-parser.jay (interface_accessors): Re-write actions to also
20065         store attributes attached to get and set methods. Fix spelling
20066         while at it.
20067
20068         (inteface_property_declaration): Modify accordingly.
20069
20070         (InterfaceAccessorInfo): New helper class to store information to pass
20071         around between rules that use interface_accessors.
20072
20073         * interface.cs (Emit): Apply attributes on the get and set
20074         accessors of properties and indexers too.
20075
20076         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20077         right MethodBuilder when applying attributes to the get and set accessors.
20078
20079 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20080
20081         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20082
20083 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20084
20085         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20086
20087 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20088
20089         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20090         changes that treat `yield' specially when present before `break'
20091         or `return' tokens.
20092
20093         * cs-tokenizer.cs: yield is no longer a keyword.
20094
20095 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20096
20097         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20098         setting for default constructors.
20099         For default constructors are almost every time set wrong Modifier. The
20100         generated IL code has been alright. But inside mcs this values was
20101         wrong and this was reason why several of my CLS Compliance tests
20102         failed.
20103
20104 2004-01-22  Martin Baulig  <martin@ximian.com>
20105
20106         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20107         not a QualifiedIdentifier.  This is what `type_name_expression'
20108         was previously doing.
20109         (type_name_expression): Removed; the code is now in
20110         `namespace_or_type_name'.
20111         (qualified_identifier): Removed, use `namespace_or_type_name'
20112         instead.
20113         (QualifiedIdentifier): Removed this class.      
20114
20115 2004-01-22  Martin Baulig  <martin@ximian.com>
20116
20117         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20118         not a string as alias name.
20119
20120 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20121
20122         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20123         #52730 bug, and instead compute correctly the need to use a
20124         temporary variable when requesting an address based on the
20125         static/instace modified of the field and the constructor.
20126  
20127 2004-01-21  Martin Baulig  <martin@ximian.com>
20128
20129         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20130         class and namespace before looking up aliases.  Fixes #52517.
20131
20132 2004-01-21  Martin Baulig  <martin@ximian.com>
20133
20134         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20135         assinged in a 'try'; fixes exception4.cs.
20136
20137 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20138         * class.cs : Implemented parameter-less constructor for TypeContainer
20139
20140         * decl.cs: Attributes are now stored here. New property OptAttributes
20141
20142         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20143
20144         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20145
20146 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20147
20148         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20149           (CSharpSignature): New method for indexer and property signature.
20150
20151 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20152
20153         * pending.cs (IsVirtualFilter): Faster implementation.
20154
20155 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20156
20157         * typemanager.cs: Avoid inclusion of same assembly more than once.
20158
20159 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20160
20161         * cs-parser.jay: Fixed problem where the last assembly attribute
20162           has been applied also to following declaration (class, struct, etc.)
20163           
20164 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20165
20166         * class.cs: Added error CS0538, CS0539 reporting.
20167         Fixed crash on Microsoft runtime when field type is void.
20168
20169         * cs-parser.jay: Added error CS0537 reporting.
20170
20171         * pending.cs: Added error CS0535 reporting.
20172         Improved error report for errors CS0536, CS0534.
20173
20174 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20175
20176         Merge a few bits from the Anonymous Method MCS tree.
20177
20178         * statement.cs (ToplevelBlock): New class for toplevel methods,
20179         will hold anonymous methods, lifted variables.
20180
20181         * cs-parser.jay: Create toplevel blocks for delegates and for
20182         regular blocks of code. 
20183
20184 2004-01-20  Martin Baulig  <martin@ximian.com>
20185
20186         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20187         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20188         and `NeedExplicitReturn'; added `IsLastStatement'.
20189         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20190         have a `ReturnLabel' or we're not unreachable.
20191
20192         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20193         child's reachability; don't just override ours with it.  Fixes
20194         #58058 (lluis's example).
20195         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20196         InFinally(), InLoop(), InSwitch() and
20197         BreakCrossesTryCatchBoundary() methods.
20198
20199         * statement.cs (Return): Do all error checking in Resolve().
20200         Unless we are the last statement in a top-level block, always
20201         create a return label and jump to it.
20202         (Break, Continue): Do all error checking in Resolve(); also make
20203         sure we aren't leaving a `finally'.
20204         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20205         statement in a top-level block.
20206         (Block.Flags): Added `IsDestructor'.
20207         (Block.IsDestructor): New public property.
20208
20209 2004-01-20  Martin Baulig  <martin@ximian.com>
20210
20211         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20212
20213 2004-01-20  Martin Baulig  <martin@ximian.com>
20214
20215         * statement.cs (Statement.ResolveUnreachable): New public method.
20216         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20217         (Block.Resolve): Resolve unreachable statements.
20218
20219 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20220
20221         * expression.cs: We need to fix the case where we do
20222         not have a temp variable here.
20223
20224         * assign.cs: Only expression compound assignments need
20225         temporary variables.
20226
20227 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20228
20229         * flowanalysis.cs: Reduce memory allocation in a few ways:
20230           - A block with no variables should not allocate a bit
20231             vector for itself.
20232           - A method with no out parameters does not need any tracking
20233             for assignment of the parameters, so we need not allocate
20234             any data for it.
20235           - The arrays:
20236                 public readonly Type[] VariableTypes;
20237                 public readonly string[] VariableNames;
20238             Are redundant. The data is already stored in the variable
20239             map, so we need not allocate another array for it.
20240           - We need to add alot of checks for if (params | locals) == null
20241             due to the first two changes.
20242
20243 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20244
20245         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20246         implement IMemoryLocation, we store a copy on a local variable and
20247         take the address of it.  Patch from Benjamin Jemlich
20248
20249         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20250         to use a special "type_name_expression" rule which reduces the
20251         number of "QualifiedIdentifier" classes created, and instead
20252         directly creates MemberAccess expressions.
20253
20254 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20255
20256         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20257         that fixes #52853.  Null literal assignment to ValueType
20258
20259         * class.cs (MethodData.Emit): Instead of checking the name of the
20260         method to determine if its a destructor, create a new derived
20261         class from Method called Destructor, and test for that.  
20262
20263         * cs-parser.jay: Create a Destructor object instead of a Method.  
20264
20265         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20266
20267         Fixes: 52933
20268
20269 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20270
20271         * expression.cs (Binary.ResolveOperator): Perform an implicit
20272         conversion from MethodGroups to their delegate types on the
20273         Addition operation.
20274
20275         * delegate.cs: Introduce a new class DelegateCreation that is the
20276         base class for `NewDelegate' and `ImplicitDelegateCreation',
20277         factor some code in here.
20278
20279         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20280         conversion from MethodGroups to compatible delegate types. 
20281
20282         * ecore.cs (Expression.Resolve): Do not flag error 654
20283         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20284         we allow conversions from MethodGroups to delegate types now.
20285
20286         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20287         assignments in v2 either.
20288
20289 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20290
20291         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20292         static read-only fields in ctors.
20293
20294         Applied patch from Benjamin Jemlich 
20295
20296         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20297
20298 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20299
20300         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20301         here to return true, as they can be used like this:
20302
20303                 (XXX) int.MEMBER ()
20304
20305         Fixed 49836 and all the other dups
20306
20307 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20308
20309         * driver.cs: Implement /win32res and /win32icon.
20310
20311 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20312
20313         * cs-parser.jay: Add a rule to improve error handling for the
20314         common mistake of placing modifiers after the type.
20315
20316 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20317
20318         * cs-parser.jay (interface_event_declaration): Catch
20319         initialization of events on interfaces, and report cs0068
20320
20321         * cs-parser.jay (interface_event_declaration): Catch
20322         initialization of events. 
20323
20324         * ecore.cs: Better report missing constructors.
20325
20326         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20327         the error reporting done in the wrong place.  Fix.
20328
20329         * expression.cs (Binary.ResolveOperator): Catch the 
20330         operator + (E x, E y) error earlier, and later allow for implicit
20331         conversions in operator +/- (E e, U x) from U to the underlying
20332         type of E.
20333
20334         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20335         52596, if the container class is abstract, the default constructor
20336         is protected otherwise its public (before, we were always public).
20337
20338         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20339         fixed statement.
20340
20341         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20342         Jemlich that fixes bug #52597, MCS was generating invalid code for
20343         idisposable structs.   Thanks to Ben for following up with this
20344         bug as well.
20345
20346 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20347
20348         * driver.cs: Allow assemblies without code to be generated, fixes
20349         52230.
20350
20351 2004-01-07  Nick Drochak <ndrochak@gol.com>
20352
20353         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20354
20355 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20356
20357         * cs-parser.jay: Add rules to improve error reporting if fields or
20358         methods are declared at the namespace level (error 116)
20359
20360         * Add rules to catch event add/remove
20361
20362 2004-01-04  David Sheldon <dave-mono@earth.li>
20363
20364   * expression.cs: Added matching ")" to error message for 
20365   CS0077
20366
20367 2004-01-03 Todd Berman <tberman@gentoo.org>
20368
20369         * ecore.cs, attribute.cs:
20370         Applying fix from #52429.
20371
20372 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20373
20374         * ecore.cs, expression.cs, statement.cs:
20375         Total rewrite of how we handle branching. We
20376         now handle complex boolean expressions with fewer
20377         jumps. As well if (x == 0) no longer emits a ceq.
20378
20379         if (x is Foo) is much faster now, because we generate
20380         better code.
20381
20382         Overall, we get a pretty big improvement on our benchmark
20383         tests. The code we generate is smaller and more readable.
20384
20385         I did a full two-stage bootstrap. The patch was reviewed
20386         by Martin and Miguel.
20387
20388 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20389
20390         * cs-parser.jay: Make primary_expression not take a QI.
20391         we dont need this because the member_access rule covers
20392         us here. So we replace the rule with just IDENTIFIER.
20393
20394         This has two good effects. First, we remove a s/r conflict.
20395         Second, we allocate many fewer QualifiedIdentifier objects.
20396
20397 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20398
20399         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20400         set the correct information via SRE. This prevents
20401         hanging on the MS runtime. Fixes #29374.
20402
20403 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20404
20405         * convert.cs: correctly handle conversions to value types
20406         from Enum and ValueType as unboxing conversions.
20407
20408         Fixes bug #52569. Patch by Benjamin Jemlich.
20409
20410 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20411
20412         * expression.cs (BetterConversion): Prefer int -> uint
20413         over int -> ulong (csc's behaviour). This fixed bug #52046.
20414
20415 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20416
20417         * decl.cs (MemberCache.FindMembers): now returns a
20418         MemberInfo [].
20419
20420         * typemanager.cs: In general, go with with ^^.
20421         (CopyNewMethods): take an IList.
20422         (RealMemberLookup): Only allocate an arraylist
20423         if we copy from two sets of methods.
20424
20425         This change basically does two things:
20426         1) Fewer array lists allocated due to CopyNewMethods.
20427         2) the explicit cast in MemberList costed ALOT.
20428
20429 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20430
20431         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20432         a hashtable to avoid needless string allocations when an identifier is
20433         used more than once (the common case).
20434
20435 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20436
20437         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20438         is broken, it will not return anything. So, we
20439         have to use the information we have in mcs to
20440         do the task.
20441
20442         * typemanager.cs: Add a cache for GetInterfaces,
20443         since this will now be used more often (due to ^^)
20444
20445         (GetExplicitInterfaces) New method that gets the
20446         declared, not effective, interfaces on a type
20447         builder (eg, if you have interface IFoo, interface
20448         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20449         { IBar }.
20450
20451         This patch makes MCS able to bootstrap itself on
20452         Windows again.
20453
20454 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20455
20456         * expression.cs: Remove the Nop's that Miguel put
20457         in by mistake.
20458
20459 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20460
20461         * report.cs, codegen.cs: Give the real stack trace to
20462         the error when an exception is thrown.
20463
20464 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20465
20466         * decl.cs: only allocate hashtables for ifaces if 
20467         it is an iface!
20468
20469 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20470
20471         * expression.cs: fix the error from cs0121-2.cs
20472         (a parent interface has two child interfaces that
20473         have a function with the same name and 0 params
20474         and the function is called through the parent).
20475
20476 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20477
20478         * class.cs, rootcontext.cs, typmanager.cs: do not
20479         leak pointers.
20480
20481 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20482
20483         * codegen.cs: remove stack for the ec flow branching.
20484         It is already a linked list, so no need.
20485
20486 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20487
20488         * Makefile: Allow custom profiler here.
20489
20490 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20491
20492         * typemanager.cs (LookupType):
20493           - Use a static char [], because split takes
20494             a param array for args, so it was allocating
20495             every time.
20496           - Do not store true in a hashtable, it boxes.
20497
20498 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20499
20500         * flowanalysis.cs: bytify common enums.
20501
20502 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20503
20504         * modifiers.cs: Add a new set of flags for the
20505         flags allowed on explicit interface impls.
20506         * cs-parser.jay: catch the use of modifiers in
20507         interfaces correctly.
20508         * class.cs: catch private void IFoo.Blah ().
20509
20510         All related to bug #50572.
20511
20512 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20513
20514         * decl.cs: Rewrite the consistant accessability checking.
20515         Accessability is not linear, it must be implemented in
20516         a tableish way. Fixes #49704.
20517
20518 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20519
20520         * expression.cs: Handle negation in a checked context.
20521         We must use subtraction from zero. Fixes #38674.
20522
20523 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20524
20525         * class.cs: Ignore static void main in DLLs.
20526         * rootcontext.cs: Handle the target type here,
20527         since we are have to access it from class.cs
20528         * driver.cs: account for the above.
20529
20530 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20531
20532         * report.cs: Give line numbers and files if available.
20533
20534 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20535
20536         * driver.cs: Implement /addmodule.
20537
20538         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20539         ModuleBuilders.
20540
20541 2003-12-20  Martin Baulig  <martin@ximian.com>
20542
20543         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20544         (FieldBase.IsAssigned): Removed this field.
20545         (FieldBase.SetAssigned): New public method.
20546         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20547
20548 2003-12-20  Martin Baulig  <martin@ximian.com>
20549
20550         * expression.cs (LocalVariableReference.DoResolve): Don't set
20551         `vi.Used' if we're called from DoResolveLValue().
20552
20553         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20554         returns the usage vector it just merged into the current one -
20555         pass this one to UsageWarning().
20556         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20557         of the `EmitContext', don't call this recursively on our children.
20558
20559 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20560
20561         * driver.cs: Implement /target:module.
20562
20563 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20564
20565         * support.cs (CharArrayHashtable): New helper class.
20566
20567         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20568         char arrays, not strings, so we can avoid creating a string in
20569         consume_identifier if the identifier is a keyword.
20570
20571 2003-12-16  Martin Baulig  <martin@ximian.com>
20572
20573         * statement.cs (LocalInfo.Assigned): Removed this property.
20574         (LocalInfo.Flags): Removed `Assigned'.
20575         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20576         and uses flow analysis.
20577         (Block.UsageWarning): Made this method private.
20578         (Block.Resolve): Call UsageWarning() if appropriate.
20579
20580         * expression.cs (LocalVariableReference.DoResolve): Always set
20581         LocalInfo.Used here.
20582
20583 2003-12-13  Martin Baulig  <martin@ximian.com>
20584
20585         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20586         any value here; we're now using flow analysis to figure out
20587         whether a statement/block returns a value.
20588
20589 2003-12-13  Martin Baulig  <martin@ximian.com>
20590
20591         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20592         working again.
20593         (FlowBranching.MergeFinally): Don't call
20594         `branching.CheckOutParameters()' here, this is called in
20595         MergeTopBlock().
20596         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20597         when adding the `finally' vector.       
20598
20599 2003-12-13  Martin Baulig  <martin@ximian.com>
20600
20601         * flowanalysis.cs
20602         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20603         actually work and also fix #48962.
20604
20605 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20606
20607         * decl.cs: Do not check System.Object for nested types,
20608         since we know it does not have any. Big bang for buck:
20609
20610         BEFORE:
20611            Run 1:   8.35 seconds
20612            Run 2:   8.32 seconds
20613            corlib:  17.99 seconds
20614         AFTER:
20615            Run 1:   8.17 seconds
20616            Run 2:   8.17 seconds
20617            corlib:  17.39 seconds
20618
20619 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20620
20621         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20622         time we are returning 0 members, so we save alot here.
20623
20624 2003-12-11  Martin Baulig  <martin@ximian.com>
20625
20626         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20627         `MergeChild()', also just take the `FlowBranching' as argument;
20628         call Merge() on it and return the result.
20629         (FlowBranching.Merge): We don't need to do anything if we just
20630         have one sibling.
20631
20632 2003-12-11  Martin Baulig  <martin@ximian.com>
20633
20634         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20635         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20636         Maurer for this idea.
20637
20638 2003-12-11  Martin Baulig  <martin@ximian.com>
20639
20640         * flowanalysis.cs (MergeResult): This class is now gone; we now
20641         use the `UsageVector' for this.  The reason for this is that if a
20642         branching just has one sibling, we don't need to "merge" them at
20643         all - that's the next step to do.
20644         (FlowBranching.Merge): We now return a `UsageVector' instead of a
20645         `MergeResult'.
20646
20647 2003-12-11  Martin Baulig  <martin@ximian.com>
20648
20649         Reworked flow analyis and made it more precise and bug-free.  The
20650         most important change is that we're now using a special `Reachability'
20651         class instead of having "magic" meanings of `FlowReturns'.  I'll
20652         do some more cleanups and optimizations and also add some more
20653         documentation this week.
20654
20655         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
20656         largely reworked this class.
20657         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
20658         the new `Reachability' class instead of having "magic" values here.
20659         (FlowBranching): We're now using an instance of `Reachability'
20660         instead of having separate `Returns', `Breaks' etc. fields.
20661
20662         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
20663         based on flow analysis; ignore the return value of block.Emit ().
20664
20665 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
20666
20667         * driver.cs typemanager.cs: Find the mono extensions to corlib even
20668         if they are private.
20669
20670 2003-12-09  Martin Baulig  <martin@ximian.com>
20671
20672         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
20673         call them directly on the UsageVector.
20674
20675 2003-12-09  Martin Baulig  <martin@ximian.com>
20676
20677         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
20678         Changed return type from `FlowReturns' to `Reachability'.
20679
20680 2003-12-09  Martin Baulig  <martin@ximian.com>
20681
20682         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
20683         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
20684         `Reachable' fields with a single `Reachability' one.
20685
20686 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20687
20688         * class.cs (FindMembers): Remove foreach's.
20689
20690         Bootstrap times:
20691
20692         BEFORE
20693                 Run 1:   8.74 seconds
20694                 Run 2:   8.71 seconds
20695
20696         AFTER
20697                 Run 1:   8.64 seconds
20698                 Run 2:   8.58 seconds
20699
20700
20701 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20702
20703         * cs-parser.jay:
20704         * gen-treedump.cs:
20705         * statement.cs:
20706         This patch does a few things:
20707                 1. EmptyStatement is now a singleton, so it is never reallocated.
20708                 2. All blah is EmptyStatement constructs have been changed to
20709                    blah == EmptyStatement.Value, which is much faster and valid
20710                    now that EmptyStatement is a singleton.
20711                 3. When resolving a block, rather than allocating a new array for
20712                    the non-empty statements, empty statements are replaced with
20713                    EmptyStatement.Value
20714                 4. Some recursive functions have been made non-recursive.
20715         Mainly the performance impact is from (3), however (1) and (2) are needed for
20716         this to work. (4) does not make a big difference in normal situations, however
20717         it makes the profile look saner.
20718
20719         Bootstrap times:
20720
20721         BEFORE
20722         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20723         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20724         Total memory allocated: 56397 KB
20725
20726         AFTER
20727         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
20728         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
20729         Total memory allocated: 55666 KB
20730
20731 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20732
20733         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
20734         than the hashtable in a hashtable version
20735
20736         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
20737         we always end up concating a string. This results in a huge perf
20738         loss, because many strings have to be tracked by the GC. In this
20739         patch, we first use a hashtable that works with two keys, so that
20740         the strings do not need to be concat'ed.
20741
20742         Bootstrap times:
20743         BEFORE
20744                 Run 1:   8.74 seconds
20745                 Run 2:   8.71 seconds
20746
20747         AFTER
20748                 Run 1:   8.65 seconds
20749                 Run 2:   8.56 seconds
20750
20751 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20752
20753         * Makefile: Add a new target `do-time' that does a quick and simple
20754         profile, leaving easy to parse output.
20755
20756 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20757
20758         * codegen.cs (Init): Create the dynamic assembly with 
20759         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
20760
20761 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20762
20763         * support.cs: Make the PtrHashtable use only one
20764         instance of its comparer.
20765
20766 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
20767
20768         * typemanager.cs: Fix lookup of GetNamespaces.
20769
20770 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
20771
20772         * expression.cs: Removed redundant line.
20773
20774         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
20775         ArrayLists, use for loops with bounds.  
20776
20777         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
20778         arraylist.
20779
20780         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
20781         arraylists, use for loop with bounds.
20782
20783         The above three changes give us a 0.071 second performance
20784         improvement out of 3.294 seconds down to 3.223.  On my machine
20785         the above changes reduced the memory usage by 1,387 KB during
20786         compiler bootstrap.
20787
20788         * cs-parser.jay (QualifiedIdentifier): New class used to represent
20789         QualifiedIdentifiers.  Before we created a new string through
20790         concatenation, and mostly later on, the result would be
20791         manipulated by DecomposeQI through string manipulation.
20792
20793         This reduced the compiler memory usage for bootstrapping from
20794         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
20795         compile times in 0.05 seconds.
20796
20797 2003-11-28  Dick Porter  <dick@ximian.com>
20798
20799         * support.cs: Do string compares with the Invariant culture.
20800
20801         * rootcontext.cs: 
20802         * gen-treedump.cs: 
20803         * expression.cs: 
20804         * driver.cs: 
20805         * decl.cs: 
20806         * codegen.cs: 
20807         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
20808         the comparison is done with the Invariant culture.
20809
20810 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
20811
20812         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
20813         GetEnumerator method.
20814
20815         (ProbeCollectionType): Iterate starting at the most specific type
20816         upwards looking for a GetEnumerator
20817
20818         * expression.cs: Shift count can be up to 31 for int/uint and 63
20819         for long/ulong.
20820
20821 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
20822
20823         * statement.cs (Block.LookupLabel): Also look for the label on the
20824         children blocks.  Use a hash table to keep track of visited
20825         nodes. 
20826
20827         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
20828         we actually did transform the other operand, otherwise fall back
20829         to the common codepath that casts to long.
20830
20831         * cs-tokenizer.cs: Use the same code pattern as the int case.
20832         Maybe I should do the parsing myself, and avoid depending on the
20833         Parse routines to get this done.
20834
20835 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
20836
20837         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20838         which fixes bug 51347.  This time test it.
20839
20840         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
20841         attributes for example can not tell the difference between these.
20842         The difference was only a syntax feature of the language. 
20843
20844         * attribute.cs: Apply attributes to delegates.
20845
20846         * delegate.cs: Call the apply attributes method.
20847
20848 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
20849
20850         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
20851         comparing 0 vs Byte.MinValue, not the value
20852
20853         (ImplicitConversionRequired): When reporting a conversion error,
20854         use error 31 to print out the constant error instead of the
20855         simpler 29.
20856
20857         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20858         which fixes bug 51347.
20859
20860 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
20861
20862         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
20863         which fixes the -warnaserror command line option.
20864
20865 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
20866
20867         * cfold.cs (DoNumericPromotions): During constant folding of
20868         additions on UIntConstant, special case intconstants with
20869         IntConstants like we do on the expression binary operator. 
20870
20871 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
20872
20873         * convert.cs (ImplicitReferenceConversion): We were missing a case
20874         (System.Enum are not value types or class types, so we need to
20875         classify them separatedly).
20876
20877         * driver.cs: We do not support error 2007.
20878
20879 2003-11-12 Jackson Harper <jackson@ximian.com>
20880
20881         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
20882         system directory. Also use the full file name so users can
20883         libraries names mscorlib-o-tron.dll in a non system dir.
20884
20885 2003-11-10  Martin Baulig  <martin@ximian.com>
20886
20887         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
20888         (TypeManager.InitCoreTypes): Initialize them here, but instead of
20889         calling `ResolveType()' on them, directly assign their `Type'.
20890
20891 2003-11-08  Martin Baulig  <martin@ximian.com>
20892
20893         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
20894         return value and the `out parent' parameter.
20895         (TypeContainer.DefineType): Moved the CS0644 check into
20896         GetClassBases().  Don't pass the interface types to the
20897         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
20898         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
20899
20900         * ecore.cs (TypeExpr.IsAttribute): New property.
20901         (TypeExpr.GetInterfaces): New method.
20902
20903         * interface.cs (Interface.GetInterfaceTypeByName): Return a
20904         TypeExpr instead of a Type.
20905         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
20906         (Interface.DefineType): Don't pass the interface types to the
20907         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
20908         them later and then call `TypeBulider.AddInterfaceImplementation()'.
20909
20910         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
20911         instead of a `Type[]'.
20912         (TypeManager.RegisterBuilder): Likewise.
20913         (TypeManager.AddUserInterface): Likewise.
20914         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
20915         `Type[]' and also return a `TypeExpr[]'.
20916         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
20917
20918 2003-11-08  Martin Baulig  <martin@ximian.com>
20919
20920         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
20921         Expression.     
20922
20923 2003-11-08  Martin Baulig  <martin@ximian.com>
20924
20925         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
20926         TypeManager.ResolveExpressionTypes().
20927
20928         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
20929         instead of an Expression.
20930         (TypeExpr): This is now an abstract base class for `TypeExpression'.
20931         (TypeExpression): New public class; formerly known as `TypeExpr'.
20932
20933         * expression.cs (ComposedCast): Derive from TypeExpr.
20934
20935         * typemanager.cs (TypeManager.system_*_expr): These are now
20936         TypExpr's instead of Expression's.
20937         (TypeManager.ResolveExpressionTypes): New public static function;
20938         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
20939         of them.        
20940
20941 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
20942
20943         * expression.cs (New.DoResolve): Do not dereference value that
20944         might be a null return.
20945
20946         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
20947         sure that the constant value has the right type.  Fixes an
20948         unreported bug, similar to 50425.
20949
20950         * const.cs (Const.LookupConstantValue): Call
20951         ImplicitStandardConversionExists before doing a conversion to
20952         avoid havng the TypeManager.ChangeType do conversions.
20953
20954         Reduced the number of casts used
20955
20956         (Const.ChangeType): New routine to enable reuse of the constant
20957         type changing code from statement.
20958
20959         * typemanager.cs (ChangeType): Move common initialization to
20960         static global variables.
20961
20962         Fixes #50425.
20963
20964         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
20965         every value type to go through, even if it was void.  Fix that. 
20966
20967         * cs-tokenizer.cs: Use is_identifier_start_character on the start
20968         character of the define, and the is_identifier_part_character for
20969         the rest of the string.
20970
20971 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
20972
20973         * expression.cs (UnaryMutator.EmitCode): When I updated
20974         LocalVariableReference.DoResolve, I overdid it, and dropped an
20975         optimization done on local variable references.
20976
20977 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
20978
20979         * ecore.cs: Convert the return from Ldlen into an int.
20980
20981 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
20982
20983         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
20984         the accessibility, this is a special case for toplevel non-public
20985         classes (internal for instance).
20986
20987 2003-10-20  Nick Drochak <ndrochak@gol.com>
20988
20989         * ecore.cs: Fix typo and build.  Needed another right paren.
20990
20991 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
20992
20993         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
20994         `internal' case regular and protected, but not allowing protected
20995         to be evaluated later.  Bug 49840
20996
20997 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
20998
20999         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
21000         to kb.Nlast, and not the kb.nFirst to isolate the switch
21001         statement.
21002
21003         Extract the underlying type, so enumerations of long/ulong are
21004         treated like long/ulong.
21005
21006 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
21007
21008         * expression.cs (New): Overload the meaning of RequestedType to
21009         track the possible creation of the NewDelegate type, since
21010         DoResolve is invoked more than once for new constructors on field
21011         initialization.
21012
21013         See bugs: #48800 and #37014
21014
21015         * cs-parser.jay (declare_local_constants): Take an arraylist
21016         instead of a single constant.
21017
21018         (local_constant_declaration): It should take a
21019         constant_declarators, not a constant_declarator.  Fixes 49487
21020
21021         * convert.cs: Fix error report.
21022
21023 2003-10-13 Jackson Harper <jackson@ximian.com>
21024
21025         * typemanager.cs (TypeToCoreType): Add float and double this fixes
21026         bug #49611
21027
21028 2003-10-09  Martin Baulig  <martin@ximian.com>
21029
21030         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
21031         to the .ctor.
21032         (MethodCore.DoDefineParameters): Removed the TypeContainer
21033         argument; use the DeclSpace which was passed to the .ctor instead.
21034         (MethodCore.CheckParameter): Take a DeclSpace instead of a
21035         TypeContainer; we only need a DeclSpace here.
21036
21037 2003-10-09  Martin Baulig  <martin@ximian.com>
21038
21039         * class.cs (MethodData): Added additional `DeclSpace ds' argument
21040         to the .ctor.
21041         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
21042         EmitContext's .ctor.    
21043
21044 2003-10-09  Martin Baulig  <martin@ximian.com>
21045
21046         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21047         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21048         AsAccessible(), moved them as well.
21049
21050         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21051
21052 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21053
21054         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21055
21056 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21057
21058         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21059         generation for >=, as spotted by Paolo, bug 48679.  
21060         Patch from David Waite.
21061
21062         * cs-tokenizer.cs: Add handling for #pragma.
21063
21064         * cs-parser.jay: Allow for both yield and yield return in the
21065         syntax.  The anti-cobolization of C# fight will go on!
21066
21067         * class.cs (TypeBuilder.DefineType): Catch error condition here
21068         (Parent.DefineType erroring out and returning null).
21069
21070         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21071         coping with enumerations variables, we were mistakenly processing
21072         them as a regular value type instead of built-in types.  Fixes the
21073         bug #48063
21074
21075         * typemanager.cs (IsBuiltinOrEnum): New method.
21076
21077 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21078
21079         * cs-parser.jay: Upgrade: yield now needs the return clause.
21080
21081 2003-09-19  Martin Baulig  <martin@ximian.com>
21082
21083         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21084         `MemberCache parent' argument.  Normally, an interface doesn't
21085         have a parent type except System.Object, but we use this in gmcs
21086         for generic type parameters.
21087
21088 2003-09-18  Martin Baulig  <martin@ximian.com>
21089
21090         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21091         on `type.IsInterface'; don't check whether the type has a parent
21092         to determine whether it's an interface.
21093
21094 2003-09-15  Martin Baulig  <martin@ximian.com>
21095
21096         * class.cs (TypeContainer.DefineType): Added an error flag to
21097         avoid reporting duplicate CS0146's ("class definition is
21098         circular.").
21099
21100         * driver.cs (Driver.MainDriver): Abort if
21101         RootContext.ResolveTree() reported any errors.
21102
21103 2003-09-07  Martin Baulig  <martin@ximian.com>
21104
21105         * report.cs (Error, Warning): Added overloaded versions which take
21106         a `params object[] args' and call String.Format().
21107
21108 2003-09-07  Martin Baulig  <martin@ximian.com>
21109
21110         * decl.cs (DeclSpace..ctor): Don't call
21111         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21112         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21113         (DeclSpace.RecordDecl): New method.
21114
21115         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21116
21117 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21118
21119         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21120         value attributes to be applied to ParameterBuilders.
21121
21122         * class.cs (MethodCore.LabelParameters): Make static and more
21123         generic so that it can be used from other places - like interface
21124         methods, for instance.
21125
21126         * interface.cs (Interface.Emit): Call LabelParameters before
21127         emitting attributes on the InterfaceMethod.
21128
21129 2003-08-26  Martin Baulig  <martin@ximian.com>
21130
21131         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21132         resolving aliases; fixes #47927.
21133
21134 2003-08-26  Martin Baulig  <martin@ximian.com>
21135
21136         * statement.cs (Using.DoResolve): This is internally emitting a
21137         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21138         do not always return.  Fixes #47681.
21139
21140 2003-08-26  Martin Baulig  <martin@ximian.com>
21141
21142         * decl.cs (MemberCore): Moved WarningNotHiding(),
21143         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21144         into MemberBase.
21145         (AdditionResult): Make this nested in DeclSpace.
21146         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21147         argument; call NamespaceEntry.Define() unless we're nested in a
21148         class or struct.
21149
21150         * namespace.cs (Namespace.DefineName): New public function.  This
21151         is called from DeclSpace's .ctor to add 
21152         (Namespace.Lookup): Include DeclSpaces in the lookup.
21153
21154         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21155
21156         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21157
21158 2003-08-25  Martin Baulig  <martin@ximian.com>
21159
21160         * convert.cs (Convert.ExplicitReferenceConversion): When
21161         converting from an interface type to a class, unbox if the target
21162         type is a struct type.  Fixes #47822.
21163
21164 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21165
21166         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21167         #47854.
21168
21169 2003-08-22  Martin Baulig  <martin@ximian.com>
21170
21171         * class.cs (TypeManager.DefineType): When defining a nested type,
21172         call DefineType() on our parent; fixes #47801.
21173
21174 2003-08-22  Martin Baulig  <martin@ximian.com>
21175
21176         * class.cs (MethodData.Define): While checking if a method is an
21177         interface implementation, improve the test a bit more to fix #47654.
21178
21179 2003-08-22  Martin Baulig  <martin@ximian.com>
21180
21181         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21182         correctly; fixes #47722.
21183
21184 2003-08-22  Martin Baulig  <martin@ximian.com>
21185
21186         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21187         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21188
21189         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21190
21191 2003-08-22  Martin Baulig  <martin@ximian.com>
21192
21193         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21194         can only be assigned in static constructors.  Fixes #47161.
21195
21196 2003-08-22  Martin Baulig  <martin@ximian.com>
21197
21198         Rewrote and improved the flow analysis code.
21199
21200         * flowbranching.cs (FlowBranching): Make this class abstract.
21201         (FlowBranching.CreateBranching): New static function to create a
21202         new flow branching.
21203         (FlowBranchingBlock, FlowBranchingException): New classes.
21204         (FlowBranching.UsageVector.Type): New public readonly field.
21205         (FlowBranching.UsageVector.Breaks): Removed the setter.
21206         (FlowBranching.UsageVector.Returns): Removed the setter.
21207         (FlowBranching.UsageVector): Added Break(), Return(),
21208         NeverReachable() and Throw() methods to modify the reachability.
21209         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21210         done by FlowBranching.Merge().
21211         (FlowBranching.UsageVector.MergeChild): New method; merges the
21212         merge result into the current vector.
21213         (FlowBranching.Merge): New abstract method to merge a branching.
21214
21215 2003-08-12  Martin Baulig  <martin@ximian.com>
21216
21217         * expression.cs (Indirection.CacheTemporaries): Create the
21218         LocalTemporary with the pointer type, not its element type.
21219
21220 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21221
21222         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21223         token was a keyword or not.
21224
21225         Add `error' options where an IDENTIFIER was expected;  Provide
21226         CheckToken and CheckIdentifierToken convenience error reporting
21227         functions. 
21228
21229         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21230
21231         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21232         NameSpaceEntry NameSpaceEntry.
21233
21234         (LookupInterfaceOrClass): Avoid creating a full qualified name
21235         from namespace and name: avoid doing lookups when we know the
21236         namespace is non-existant.   Use new Tree.LookupByNamespace which
21237         looks up DeclSpaces based on their namespace, name pair.
21238
21239         * driver.cs: Provide a new `parser verbose' to display the
21240         exception thrown during parsing.  This is turned off by default
21241         now, so the output of a failure from mcs is more graceful.
21242
21243         * namespace.cs: Track all the namespaces defined in a hashtable
21244         for quick lookup.
21245
21246         (IsNamespace): New method
21247
21248 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21249
21250         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21251         we know that we need to concatenate (full typename can never be
21252         null). 
21253
21254         * class.cs: ditto.
21255
21256         * statement.cs: Use a bitfield;  Do not initialize to null things
21257         which are done by the constructor by default.
21258
21259         * cs-parser.jay: bug fix, parameter was 4, not 3.
21260
21261         * expression.cs: Just use the property;
21262
21263         * statement.cs: No need for GetVariableInfo method.
21264
21265 2003-08-08  Martin Baulig  <martin@ximian.com>
21266
21267         * flowanalysis.cs (FlowReturns): This is now nested in the
21268         `FlowBranching' class.
21269         (MyBitVector): Moved this here from statement.cs.
21270         (FlowBranching.SiblingType): New enum type.
21271         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21272
21273 2003-08-07  Martin Baulig  <martin@ximian.com>
21274
21275         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21276         `FlowBranching' class and called `BranchingType'.
21277
21278 2003-08-07  Martin Baulig  <martin@ximian.com>
21279
21280         * flowanalysis.cs: Moved all the control flow analysis code into
21281         its own file.
21282
21283 2003-08-07  Martin Baulig  <martin@ximian.com>
21284
21285         * assign.cs (Assign.DoResolve): `target' must either be an
21286         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21287         #37319.
21288
21289 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21290
21291         * expression.cs (BinaryMethod): This kind of expression is created by the
21292         Binary class if it determines that the operator has to be handled
21293         by a method.
21294
21295         (BinaryDelegate): This kind of expression is created if we are
21296         dealing with a + or - operator on delegates.
21297
21298         (Binary): remove method, argumetns, and DelegateOperator: when
21299         dealing with methods, 
21300
21301         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21302
21303         * statement.cs (Block): use bitfields for the three extra booleans
21304         we had in use.   Remove unused topblock parameter.
21305
21306         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21307
21308         * assign.cs: Drop extra unneeded tests.
21309
21310 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21311
21312         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21313
21314         * statement.cs (Foreach): Use VariableStorage instead of
21315         LocalBuilders.   
21316
21317         * codegen.cs (VariableStorage): New class used by clients that
21318         require a variable stored: locals or fields for variables that
21319         need to live across yield.
21320
21321         Maybe provide a convenience api for EmitThis+EmitLoad?
21322
21323         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21324         these bad boys.
21325
21326 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21327
21328         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21329         RemapParameterLValue): New methods that are used to turn a
21330         precomputed FieldInfo into an expression like this:
21331
21332                 instance.FieldInfo
21333
21334         The idea is to use this instead of making LocalVariableReference
21335         have more than one meaning.
21336
21337         * cs-parser.jay: Add error production to BASE.
21338
21339         * ecore.cs: Deal with TypeManager.GetField returning null, which
21340         is now a valid return value.
21341
21342         (FieldExprNoAddress): New expression for Fields whose address can
21343         not be taken.
21344
21345         * expression.cs (LocalVariableReference): During the resolve
21346         phases, create new expressions if we are in a remapping context.
21347         Remove code that dealt with remapping here.
21348
21349         (ParameterReference): same.
21350
21351         (ProxyInstance): New expression, like the `This' expression, but
21352         it is born fully resolved.  We know what we are doing, so remove
21353         the errors that are targeted to user-provided uses of `this'.
21354
21355         * statement.cs (Foreach): our variable is now stored as an
21356         Expression;  During resolution, follow the protocol, dont just
21357         assume it will return this.
21358
21359 2003-08-06  Martin Baulig  <martin@ximian.com>
21360
21361         * support.cs (SeekableStreamReader.cs): New public class.
21362
21363         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21364         SeekableStreamReader instead of the normal StreamReader.
21365
21366 2003-08-04  Martin Baulig  <martin@ximian.com>
21367
21368         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21369         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21370         deambiguate casts and delegate invocations.
21371         (parenthesized_expression): Use the new tokens to ensure this is
21372         not a cast of method invocation.
21373
21374         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21375         when reading a `)' and Deambiguate_CloseParens () was previously
21376         called.
21377
21378         * expression.cs (ParenthesizedExpression): New class.  This is
21379         just used for the CS0075 test.
21380         (Binary.DoResolve): Check for CS0075.   
21381
21382 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21383
21384         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21385         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21386         reference comparison.
21387
21388         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21389         examine the ReturnType for equality - this is necessary in the
21390         cases of implicit and explicit operators whose signature also
21391         includes the return type.
21392
21393 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21394
21395         * namespace.cs: Cache the result of the namespace computation,
21396         instead of computing it every time.
21397
21398 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21399
21400         * decl.cs: Use a global arraylist that we reuse over invocations
21401         to avoid excesive memory consumption.  Reduces memory usage on an
21402         mcs compile by one meg (45 average).
21403
21404         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21405         private, work around that.
21406
21407 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21408
21409         * literal.cs (IntLiteral): Define Zero and One static literals. 
21410
21411         * cs-parser.jay (integer_literal): use static literals to reduce
21412         memory usage for the most used literals (0, 1 and -1).  211kb
21413         reduced in memory usage.
21414
21415         Replace all calls to `new ArrayList' with `new
21416         ArrayList(4)' which is a good average number for most allocations,
21417         and also requires only 16 bytes of memory for its buffer by
21418         default. 
21419
21420         This reduced MCS memory usage in seven megabytes for the RSS after
21421         bootstrapping.
21422
21423 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21424
21425         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21426         handle params methods the correct way by forming only one
21427         applicable set with params and normal methods in them. Earlier we
21428         were looking at params methods only if we found no normal methods
21429         which was not the correct thing to do.
21430
21431         (Invocation.BetterFunction): Take separate arguments indicating
21432         when candidate and the best method are params methods in their
21433         expanded form.
21434
21435         This fixes bugs #43367 and #46199.
21436
21437         * attribute.cs: Documentation updates.
21438
21439         (CheckAttribute): Rename to CheckAttributeTarget.
21440         (GetValidPlaces): Rename to GetValidTargets.
21441
21442         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21443         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21444
21445         Fixes bug #44468.
21446
21447 2003-07-28  Martin Baulig  <martin@ximian.com>
21448
21449         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21450         name when looking up the base class of a nested class.  Fixes #46977.
21451
21452 2003-07-26  Martin Baulig  <martin@ximian.com>
21453
21454         * expression.cs (Indexers.Indexer): New nested struct; contains
21455         getter, setter and the indexer's type.
21456         (Indexers.Properties): This is now an ArrayList of
21457         Indexers.Indexer's.
21458         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21459         indexer doesn't have any getters.
21460
21461         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21462         for embedded property and indexer assignments.
21463
21464 2003-07-26  Martin Baulig  <martin@ximian.com>
21465
21466         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21467         preprocessor directive is not the first non-whitespace character
21468         on a line.
21469
21470 2003-07-26  Martin Baulig  <martin@ximian.com>
21471
21472         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21473         namespace parsing, follow the spec more closely.
21474
21475         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21476         NamespaceEntry.Lookup().
21477
21478 2003-07-25  Martin Baulig  <martin@ximian.com>
21479
21480         * MethodCore.cs (OverridesSomething): New public field; it's set
21481         from TypeContainer.DefineMembers if this method overrides
21482         something (which doesn't need to be a method).  Fix #39462.
21483
21484 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21485
21486         * typemanager.cs (GetMembers): Ensure that the list of members is
21487         reversed. This keeps things in sync.
21488
21489         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21490         find an AttributeUsage attribute.
21491
21492         * expression.cs (Invocation.OverloadResolve): Perform the check
21493         which disallows Invoke to be directly called on a Delegate.
21494
21495         (Error_InvokeOnDelegate): Report error cs1533.
21496
21497 2003-07-25  Martin Baulig  <martin@ximian.com>
21498
21499         * expression.cs (Indexers.GetIndexersForType): Only look in the
21500         interface hierarchy if the requested type is already an
21501         interface.  Fixes #46788 while keeping #46502 fixed.
21502
21503 2003-07-25  Martin Baulig  <martin@ximian.com>
21504
21505         * class.cs (TypeContainer.DefineMembers): Check whether all
21506         readonly fields have been assigned and report warning CS0649 if
21507         not.
21508
21509         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21510         a valuetype.
21511
21512 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21513
21514         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21515         returned from GetMethods to make things consistent with the
21516         assumptions MCS makes about ordering of methods.
21517
21518         This should comprehensively fix bug #45127 and it does :-)
21519
21520         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21521         ordering is actually reverse.
21522
21523         * Clean up some debug messages I left lying around.
21524
21525         * interface.cs (Populate*): Get rid of code which emits attributes
21526         since the stage in which we emit attributes is the 'Emit' stage,
21527         not the define stage.
21528
21529         (Emit): Move attribute emission for interface members here.
21530
21531 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21532
21533         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21534         closely: we eliminate methods in base types when we have an
21535         applicable method in a top-level type.
21536
21537         Please see section 14.5.5.1 for an exact description of what goes
21538         on. 
21539
21540         This fixes bug #45127 and a host of other related to corlib compilation.
21541
21542         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21543         array is the method corresponding to the top-level type (this is
21544         because of the changes made to icall.c) so we change this
21545         accordingly.
21546
21547         (MethodGroupExpr.Name): This too.
21548
21549         * typemanager.cs (GetElementType): New method which does the right
21550         thing when compiling corlib. 
21551
21552         * everywhere: Make use of the above in the relevant places.
21553
21554 2003-07-22  Martin Baulig  <martin@ximian.com>
21555
21556         * cs-parser.jay (invocation_expression): Moved
21557         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21558         `cast_expression', but create a InvocationOrCast which later
21559         resolves to either an Invocation or a Cast.
21560
21561         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21562         method; call this before EmitStatement() to make sure that this
21563         expression can be used as a statement.
21564
21565         * expression.cs (InvocationOrCast): New class; resolves to either
21566         an Invocation or a Cast.
21567
21568         * statement.cs (StatementExpression): Call ResolveStatement() on
21569         the ExpressionStatement before emitting it.
21570
21571 2003-07-21  Martin Baulig  <martin@ximian.com>
21572
21573         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21574         `ref' and `out' attributes match; fixes #46220.
21575         (MemberAccess.ResolveMemberAccess): You can't reference a type
21576         through an expression; fixes #33180.
21577         (Indexers.GetIndexersForType): Don't return the indexers from
21578         interfaces the class implements; fixes #46502.
21579
21580 2003-07-21  Martin Baulig  <martin@ximian.com>
21581
21582         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21583         CS0661 checks; fixes bug #30442.
21584
21585 2003-07-21  Martin Baulig  <martin@ximian.com>
21586
21587         * decl.cs (AdditionResult): Added `Error'.
21588
21589         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21590
21591         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21592         makes cs0031.cs actually work.
21593
21594 2003-07-20  Martin Baulig  <martin@ximian.com>
21595
21596         * namespace.cs: Fixed that bug which caused a crash when compiling
21597         the debugger's GUI.
21598
21599 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21600
21601         * typemanager.cs (LookupTypeReflection): Never expose types which
21602         are NotPublic, NestedPrivate, NestedAssembly, or
21603         NestedFamANDAssem.  We used to return these, and later do a check
21604         that would report a meaningful error, but the problem is that we
21605         would not get the real match, if there was a name override.
21606
21607 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21608
21609         * namespace.cs (Namespace, Name): Do not compute the namespace
21610         name dynamically, compute it in the constructor.  This reduced
21611         memory usage by 1697 KB.
21612
21613         * driver.cs: Use --pause to pause at the end.
21614
21615 2003-07-17  Peter Williams  <peter@newton.cx>
21616
21617         * Makefile: Change the name of the test target so that it doesn't
21618         conflict with the recursive test target.
21619
21620 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21621
21622         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21623         AddressOf): Do not use EmitThis, that was wrong, use the actual
21624         this pointer.
21625
21626 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21627
21628         * class.cs (MethodData.Define): While checking if a method is an
21629         interface implementation, improve the test: If we are not public
21630         (use new test here: use the computed MethodAttributes directly,
21631         instead of the parsed modifier flags) check if the `implementing'
21632         method comes from an interface or not.
21633
21634         * pending.cs (VerifyPendingMethods): Slightly better error
21635         message.
21636
21637         * makefile: add test target that does the mcs bootstrap.
21638
21639 2003-07-16  Ravi Pratap  <ravi@ximian.com>
21640
21641         * interface.cs (Define): Do nothing here since there are no
21642         members to populate etc. Move the attribute emission out of here
21643         since this was just totally the wrong place to put it. Attribute
21644         application happens during the 'Emit' phase, not in the 'Define'
21645         phase.
21646
21647         (Emit): Add this method and move the attribute emission here
21648
21649         * rootcontext.cs (EmitCode): Call the Emit method on interface
21650         types too.
21651
21652 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21653
21654         * expression.cs (OverloadResolve): Report error only if Location
21655         is not 'Null' which means that there was a probe going on.
21656
21657 2003-07-14  Martin Baulig  <martin@ximian.com>
21658
21659         * expression.cs (ConditionalLogicalOperator): New public class to
21660         implement user defined conditional logical operators.
21661         This is section 14.11.2 in the spec and bug #40505.
21662
21663 2003-07-14  Martin Baulig  <martin@ximian.com>
21664
21665         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
21666
21667 2003-07-14  Martin Baulig  <martin@ximian.com>
21668
21669         * codegen.cs (EmitContext.InFixedInitializer): New public field.
21670
21671         * ecore.cs (IVariable.VerifyFixed): New interface method.
21672
21673         * expression.cs (Unary.ResolveOperator): When resolving the `&'
21674         operator, check whether the variable is actually fixed.  Fixes bug
21675         #36055.  Set a variable definitely assigned when taking its
21676         address as required by the spec.
21677
21678         * statement.cs (LocalInfo.IsFixed): New field.
21679         (LocalInfo.MakePinned): Set `IsFixed' to true.
21680
21681 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21682
21683         * attribute.cs (Attribute.Resolve): While doing a Member lookup
21684         for .ctors, ensure that we only ask for members declared in the
21685         attribute type (BindingFlags.DeclaredOnly).
21686
21687         Fixes bug #43632.
21688
21689         * expression.cs (Error_WrongNumArguments): Report error 1501
21690         correctly the way CSC does.
21691
21692 2003-07-13  Martin Baulig  <martin@ximian.com>
21693
21694         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
21695         lookup on the fully qualified name, to make things like "X.X" work
21696         where "X.X" is a fully qualified type name, but we also have a
21697         namespace "X" in the using list.  Fixes #41975.
21698
21699 2003-07-13  Martin Baulig  <martin@ximian.com>
21700
21701         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
21702         function. If we're a CompoundAssign, we need to create an embedded
21703         CompoundAssign, not an embedded Assign.
21704         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
21705         Fixes #45854.
21706
21707 2003-07-13  Martin Baulig  <martin@ximian.com>
21708
21709         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
21710         work to fix bug #46088.
21711
21712 2003-07-13  Ravi Pratap <ravi@ximian.com>
21713
21714         * class.cs (Operator.Emit): Do not emit attributes here - it is
21715         taken care of by the Method class that we delegate too. This takes
21716         care of bug #45876.
21717
21718 2003-07-10  Martin Baulig  <martin@ximian.com>
21719
21720         * expression.cs (TypeOfVoid): New class.
21721         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
21722
21723 2003-07-10  Martin Baulig  <martin@ximian.com>
21724
21725         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
21726         bug #35957.
21727
21728 2003-07-10  Martin Baulig  <martin@ximian.com>
21729
21730         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
21731         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
21732
21733         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
21734
21735         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
21736
21737 2003-07-10  Martin Baulig  <martin@ximian.com>
21738
21739         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
21740         of decimal.  Fixes #42850.
21741
21742         NOTE: I also fixed the created byte blob, but this doesn't work on
21743         the MS runtime and csc never produces any byte blobs for decimal
21744         arrays.
21745
21746 2003-07-10  Martin Baulig  <martin@ximian.com>
21747
21748         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
21749         structs; fixes #32068.
21750         (Block.AddChildVariableNames): Fixed #44302.
21751
21752 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21753
21754         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
21755
21756 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21757
21758         * attribute.cs: And this test is onger needed.
21759
21760 2003-07-08  Martin Baulig  <martin@ximian.com>
21761
21762         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
21763         inaccessible types.  Fixes #36313.
21764
21765         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
21766
21767         * namespace.cs (NamespaceEntry): Create implicit entries for all
21768         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
21769         implicit entries for N1.N2 and N1.
21770
21771 2003-07-08  Martin Baulig  <martin@ximian.com>
21772
21773         Rewrote the handling of namespaces to fix a lot of the issues
21774         wrt. `using' aliases etc.
21775
21776         * namespace.cs (Namespace): Splitted this class into a
21777         per-assembly `Namespace' and a per-file `NamespaceEntry'.
21778
21779         * typemanager.cs (TypeManager.IsNamespace): Removed.
21780         (TypeManager.ComputeNamespaces): Only compute namespaces from
21781         loaded assemblies here, not the namespaces from the assembly we're
21782         currently compiling.
21783
21784 2003-07-08  Martin Baulig  <martin@ximian.com>
21785
21786         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
21787
21788 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21789
21790         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
21791         already fixed it.  
21792
21793         I thought about the memory savings here, but LookupTypeReflection
21794         is used under already very constrained scenarios.  Compiling
21795         corlib or mcs only exposes one hit, so it would not really reduce
21796         any memory consumption.
21797
21798 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21799
21800         * typemanager.cs: fixes bug #45889 by only adding public types from
21801         other assemblies to the list of known types.
21802
21803 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21804
21805         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
21806         on the type we resolved.
21807
21808 2003-07-05  Martin Baulig  <martin@ximian.com>
21809
21810         * pending.cs (PendingImplementation.ParentImplements): Don't
21811         create the proxy if the parent is abstract.
21812
21813         * class.cs (TypeContainer.DefineIndexers): Process explicit
21814         interface implementations first.  Fixes #37714.
21815
21816 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
21817
21818         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
21819         defined recursively;  but since we modify the input parameters
21820         (left is set to `this' temporarily), we reset this value if the
21821         left_is_explicit is false, which gives the original semantics to
21822         the code.  
21823
21824         * literal.cs (NullPointer): new class used to represent a null
21825         literal in a pointer context.
21826
21827         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
21828         type is a pointer, use a NullPointer object instead of a
21829         NullLiteral.   Closes 43687
21830
21831         (ExplicitConversion): Convert pointer values using
21832         the conv opcode to the proper type.
21833
21834         * ecore.cs (New): change ValueTypeVariable property into a method,
21835         that returns whether the valuetype is suitable for being used.
21836
21837         * expression.cs (Binary.DoNumericPromotions): Only return if we
21838         the int constant was a valid uint, and we can return both left and
21839         right as uints.  If not, we continue processing, to trigger the
21840         type conversion.  This fixes 39018.
21841
21842         * statement.cs (Block.EmitMeta): During constant resolution, set
21843         the CurrentBlock property on the emitcontext, so that we resolve
21844         constants propertly.
21845
21846 2003-07-02  Martin Baulig  <martin@ximian.com>
21847
21848         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
21849         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
21850
21851         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
21852         than emitting it here.
21853
21854         * statement.cs: Fixed some more flow analysis bugs.
21855
21856 2003-07-02  Martin Baulig  <martin@ximian.com>
21857
21858         * class.cs (MethodData.Define): When implementing interface
21859         methods, set Final unless we're Virtual.
21860
21861         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
21862         check work for interface methods.
21863
21864 2003-07-01  Martin Baulig  <martin@ximian.com>
21865
21866         * ecore.cs (EmitContext.This): Replaced this property with a
21867         GetThis() method which takes a Location argument.  This ensures
21868         that we get the correct error location for a CS0188.
21869
21870 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
21871
21872         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
21873         ImplicitStandardConversion.
21874
21875         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
21876
21877 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
21878
21879         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
21880         optimization.
21881
21882 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
21883
21884         * class.cs (Constructor.Define): Turn off initlocals for unsafe
21885         constructors.
21886
21887         (MethodData.Define): Turn off initlocals for unsafe methods.
21888
21889 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
21890
21891         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
21892         complete;  Fixes #37521.
21893
21894         * delegate.cs: Use Modifiers.TypeAttr to compute the
21895         TypeAttributes, instead of rolling our own.  This makes the flags
21896         correct for the delegates.
21897
21898 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
21899
21900         * class.cs (Constructor.Define): Set the private flag for static
21901         constructors as well.
21902
21903         * cs-parser.jay (statement_expression): Set the return value to
21904         null, to avoid a crash when we catch an error.
21905
21906 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
21907
21908         * cs-parser.jay: Applied patch from Jackson that adds support for
21909         extern and unsafe modifiers to destructor declarations.
21910
21911         * expression.cs: Report error 21 if the user is trying to index a
21912         System.Array.
21913
21914         * driver.cs: Add an error message, suggested by the bug report.
21915
21916         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
21917         if we do not have a ": this ()" constructor initializer.  Fixes 45149
21918
21919 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
21920
21921         * namespace.cs: Add some information to reduce FAQs.
21922
21923 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
21924
21925         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
21926         underlying enumeration types.  Fixes #43915.
21927
21928         * expression.cs: Treat ushort/short as legal values to be used in
21929         bitwise operations.
21930
21931 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
21932
21933         * delegate.cs: transfer custom attributes for paramenters from
21934         the delegate declaration to Invoke and BeginInvoke.
21935
21936 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21937
21938         * attribute.cs: handle custom marshalers and emit marshal info
21939         for fields, too.
21940
21941 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
21942
21943         * makefile.gnu: Added anonymous.cs to the compiler sources.
21944
21945 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
21946
21947         * iterators.cs: Change the name of the proxy class to include two
21948         underscores.
21949
21950         * cs-parser.jay: Update grammar to include anonymous methods.
21951
21952         * anonymous.cs: new file.
21953
21954 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
21955
21956         * class.cs (Field.Define): Add missing test for pointers and
21957         safety. 
21958
21959 2003-05-27  Ravi Pratap  <ravi@ximian.com>
21960
21961         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
21962         we use the stobj opcode.
21963
21964         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
21965         since it wasn't the correct fix. 
21966
21967         It still is puzzling that we are required to use stobj for IntPtr
21968         which seems to be a ValueType.
21969
21970 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
21971
21972         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
21973         during regular simple name resolution.   Now, the trick is that
21974         instead of returning for processing the simplename, we do a
21975         TypeManager.LookupType (ie, a rooted lookup as opposed to a
21976         contextual lookup type).   If a match is found, return that, if
21977         not, return for further composition.
21978
21979         This fixes long-standing 30485.
21980
21981         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21982         using the address to initialize an object, do an Stobj instead of
21983         using the regular Stelem.
21984
21985         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
21986         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
21987         Because if we are a BaseIndexerAccess that value will be true.
21988         Fixes 43643.
21989
21990         * statement.cs (GotoCase.Resolve): Return after reporting an
21991         error, do not attempt to continue. 
21992
21993         * expression.cs (PointerArithmetic.Emit): If our operand is a
21994         long, convert our constants to match the operand before
21995         multiplying.  Convert to I type before adding.   Fixes 43670.
21996
21997 2003-05-14  Ravi Pratap  <ravi@ximian.com>
21998
21999         * enum.cs (ImplicitConversionExists) : Rename to
22000         ImplicitEnumConversionExists to remove ambiguity. 
22001
22002         * ecore.cs (NullCast): New type of cast expression class which
22003         basically is very similar to EmptyCast with the difference being
22004         it still is a constant since it is used only to cast a null to
22005         something else
22006         (eg. (string) null)
22007
22008         * convert.cs (ImplicitReferenceConversion): When casting a null
22009         literal, we return a NullCast.
22010
22011         * literal.cs (NullLiteralTyped): Remove - I don't see why this
22012         should be around anymore.
22013
22014         The renaming (reported was slightly wrong). Corrections:
22015
22016         ConvertImplicitStandard -> ImplicitConversionStandard
22017         ConvertExplicitStandard -> ExplicitConversionStandard
22018
22019         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
22020         before passing them in !
22021
22022         * convert.cs (ImplicitConversionStandard): When comparing for
22023         equal expr and target types, ensure that expr is not a
22024         NullLiteral.
22025
22026         In general, we must not be checking (expr_type ==
22027         target_type) in the top level conversion methods
22028         (ImplicitConversion, ExplicitConversion etc). This checking is
22029         done in the methods that they delegate to.
22030
22031 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
22032
22033         * convert.cs: Move Error_CannotConvertType,
22034         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
22035         ImplicitNumericConversion, ImplicitConversionExists,
22036         ImplicitUserConversionExists, StandardConversionExists,
22037         FindMostEncompassedType, FindMostSpecificSource,
22038         FindMostSpecificTarget, ImplicitUserConversion,
22039         ExplicitUserConversion, GetConversionOperators,
22040         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
22041         TryImplicitIntConversion, Error_CannotConvertImplicit,
22042         ConvertImplicitRequired, ConvertNumericExplicit,
22043         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
22044         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
22045         its own file.
22046
22047         Perform the following renames:
22048
22049         StandardConversionExists -> ImplicitStandardConversionExists
22050         ConvertImplicit -> ImplicitConversion
22051         ConvertImplicitStandard -> ImplicitStandardConversion
22052         TryImplicitIntConversion -> ImplicitIntConversion
22053         ConvertImplicitRequired -> ImplicitConversionRequired
22054         ConvertNumericExplicit -> ExplicitNumericConversion
22055         ConvertReferenceExplicit -> ExplicitReferenceConversion
22056         ConvertExplicit -> ExplicitConversion
22057         ConvertExplicitStandard -> ExplicitStandardConversion
22058
22059 2003-05-19  Martin Baulig  <martin@ximian.com>
22060
22061         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22062         (TypeInfo): Added support for structs having structs as fields.
22063
22064         * ecore.cs (FieldExpr): Implement IVariable.
22065         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22066         VariableInfo for the field.
22067
22068 2003-05-18  Martin Baulig  <martin@ximian.com>
22069
22070         * expression.cs (This.DoResolve): Report a CS0027 if we're
22071         emitting a field initializer.
22072
22073 2003-05-18  Martin Baulig  <martin@ximian.com>
22074
22075         * expression.cs (This.ResolveBase): New public function.
22076         (This.DoResolve): Check for CS0188.
22077
22078         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22079         This.Resolve().
22080
22081         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22082         `instance_expression' to null if we don't have any non-static
22083         methods.
22084
22085 2003-05-18  Martin Baulig  <martin@ximian.com>
22086
22087         Reworked the way how local variables and parameters are handled by
22088         the flow analysis code.
22089
22090         * statement.cs (TypeInfo, VariableMap): New public classes.
22091         (VariableInfo): New public class.  This is now responsible for
22092         checking whether a variable has been assigned.  It is used for
22093         parameters and local variables.
22094         (Block.EmitMeta): Take the InternalParameters as argument; compute
22095         the layout of the flow vectors here.
22096         (Block.LocalMap, Block.ParameterMap): New public properties.
22097         (FlowBranching): The .ctor doesn't get the InternalParameters
22098         anymore since Block.EmitMeta() now computes the layout of the flow
22099         vector.
22100         (MyStructInfo): This class is now known as `StructInfo' and nested
22101         in `TypeInfo'; we don't access this directly anymore.
22102
22103         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22104         property and removed IsAssigned(), IsFieldAssigned(),
22105         SetAssigned() and SetFieldAssigned(); we now call them on the
22106         VariableInfo so we don't need to duplicate this code everywhere.
22107
22108         * expression.cs (ParameterReference): Added `Block block' argument
22109         to the .ctor.
22110         (LocalVariableReference, ParameterReference, This): The new
22111         VariableInfo class is now responsible for all the definite
22112         assignment stuff.
22113
22114         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22115         IsParameterAssigned, SetParameterAssigned): Removed.
22116
22117 2003-05-18  Martin Baulig  <martin@ximian.com>
22118
22119         * typemanager.cs (InitCoreTypes): Try calling
22120         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22121         the 3-args-version.  Corlib now also needs our `void_type'.
22122         (GetMethod): Added overloaded version which takes an optional
22123         `bool report_errors' to allow lookups of optional methods.
22124
22125 2003-05-12  Martin Baulig  <martin@ximian.com>
22126
22127         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22128         only used for locals and not for parameters.
22129
22130 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22131
22132         * support.cs (InternalParameters.ParameterType): Return the
22133         ExternalType of the parameter.
22134
22135         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22136         they were unused.
22137
22138 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22139
22140         * class.cs (MethodData.Define): Do not set the `newslot' on
22141         interface members, if they are also flagged as "override".
22142
22143         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22144         better code for ++i and i++.  This only works for static fields
22145         and local variables.
22146
22147         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22148         want to pull the DeclSpace out of the builder_to_declspace instead
22149         of the TypeBuilder (like in TypeContainer.FindMembers).
22150
22151         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22152         instead of LookupTypeContainer.  Fixes the crash on .NET for
22153         looking up interface members.
22154
22155         * const.cs: Create our own emit context during the Definition
22156         stage, so that constants are evaluated in the proper context, when
22157         a recursive definition happens.
22158
22159 2003-05-11  Martin Baulig  <martin@ximian.com>
22160
22161         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22162         new block for a switch section.
22163         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22164         the adding/lookup in the switch block.  Fixes #39828.
22165
22166 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22167
22168         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22169         functionality: I needed to convert the data after I had performed
22170         the add/sub operation into the operands type size.
22171
22172         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22173         pass the type for the box operation, otherwise the resulting
22174         object would have been of type object.
22175
22176         (BoxedCast): Add constructor to specify the type to box as.
22177
22178 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22179
22180         * iterators.cs: I was reusing the `count' variable inadvertently,
22181         take steps to not allow this to happen.
22182
22183 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22184
22185         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22186         by creating an array at the point where the params starts and
22187         putting all those arguments there, then adjusting the size of the
22188         array.
22189
22190 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22191
22192         * expression.cs (New.AddressOf): Implement interface
22193         IMemoryLocation.  This is used when the `new' operator is used in
22194         the context of an invocation to a method on a value type.
22195
22196         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22197         example. 
22198
22199         * namespace.cs: Also check the using aliases here.
22200
22201         * driver.cs: Move the test for using validity after the types have
22202         been entered, so we do a single pass that also includes the using
22203         aliases. 
22204
22205         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22206         in the regular case.   CreateSiblingForFinally is doing extra
22207         error checking.
22208
22209         * attribute.cs (GetAttributeArgumentExpression): Store the result
22210         on an out value, and use the return value to indicate failure
22211         instead of using null (which is a valid return for Constant.GetValue).
22212
22213         * statement.cs: Perform the analysis flow for the increment
22214         portion after the statement, because this will be the real flow of
22215         execution.  Fixes #42385
22216
22217         * codegen.cs (EmitContext.EmitArgument,
22218         EmitContext.EmitStoreArgument): New helper functions when the
22219         RemapToProxy flag is set.
22220
22221         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22222         function.
22223
22224         Add support for remapping parameters. 
22225
22226         * iterators.cs: Propagate parameter values;  Store parameter
22227         values in the proxy classes.
22228
22229 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22230
22231         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22232         need a proxy reference;  I do not know what I was thinking
22233
22234         * cs-parser.jay (constructor_initializer): catch another error,
22235         and display nice message.
22236
22237         (field_declaration): catch void field declaration
22238         to flag a better error. 
22239
22240         * class.cs (MemberBase.CheckBase): Report an error instead of a
22241         warning if a new protected member is declared in a struct. 
22242         (Field.Define): catch the error of readonly/volatile.
22243
22244         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22245
22246         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22247         volatile variable is taken
22248
22249 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22250
22251         * statement.cs (Fixed.Resolve): Report an error if we are not in
22252         an unsafe context.
22253
22254 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22255
22256         * typemanager.cs: reuse the code that handles type clashes for
22257         delegates and enumerations.
22258
22259         * class.cs (Report28): Always report.
22260
22261         * expression.cs (EncodeAsAttribute): Allow nulls here.
22262
22263 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22264
22265         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22266         the functionality for testing whether an expression is valid for
22267         an attribute here.  Also handle the case of arrays of elements
22268         being stored. 
22269
22270         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22271         encoding a linear array into an array of objects that are suitable
22272         to be passed to an CustomAttributeBuilder.
22273
22274         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22275
22276         * ecore.cs: (FieldExpr): Handle field remapping here.
22277
22278         * iteratators.cs: Pass the instance variable (if the method is an
22279         instance method) to the constructors, so we can access the field
22280         variables on the class.
22281
22282         TODO: Test this with structs.  I think the THIS variable on
22283         structs might have to be a pointer, and not a refenrece
22284
22285 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22286
22287         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22288         local variables to fields in a proxy class.
22289
22290         * iterators.cs (PopulateProxy): Rename our internal fields to
22291         <XXX>.  
22292         Create a <THIS> field if we are an instance method, so we can
22293         reference our parent container variables.
22294         (MapVariable): Called back from the EmitContext code to enter a
22295         new variable to field mapping into the proxy class (we just create
22296         a FieldBuilder).
22297
22298         * expression.cs
22299         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22300         for using the remapped locals to fields.
22301
22302         I placed the code here, because that gives the same semantics to
22303         local variables, and only changes the Emit code.
22304
22305         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22306         statements inside iterators.
22307         (VariableInfo): Add a FieldBuilder for the cases when we are
22308         remapping local variables to fields in a proxy class
22309
22310         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22311         current_block != null.
22312
22313         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22314         not cope with strings, as it has been moved to the
22315         TableSwitchEmit.  Fixed bug in switch generation.
22316
22317         * expression.cs (New.DoResolve): Provide more context for the user
22318         when reporting an error.
22319
22320         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22321         pointers. 
22322
22323         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22324         check the permissions for it.  Note than in a type-resolution
22325         context the check was already present in DeclSpace.ResolveType,
22326         but was missing from the MemberAccess.
22327
22328         (ArrayCreation.CheckIndices): warn if the user has
22329         more nested levels of expressions, but there are no more
22330         dimensions specified.  Avoids crash on bug 41906.
22331
22332 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22333
22334         * statement.cs (Block): replace Implicit bool, for a generic
22335         flags.   
22336         New flag: `Unchecked'.  This is used during the EmitMeta phase
22337         (which is out-of-line with the regular Resolve/Emit process for a
22338         statement, as this is done ahead of time, but still gets a chance
22339         to call constant resolve).
22340
22341         (Block.Flags): new enum for adding a new flag.
22342
22343         (Block.EmitMeta): track the state of unchecked.
22344
22345         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22346         to enable constant resolution to work there as well.
22347
22348 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22349
22350         * typemanager.cs (ienumerable_type): Also look up
22351         System.Collections.IEnumerable. 
22352
22353 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22354
22355         TODO: Test more than one conditional per method.
22356
22357         * class.cs (Indexer.Define): Report the location where the user is
22358         referencing the unsupported feature.
22359
22360         (MethodData): Overload the use of `conditionals' to
22361         minimize the creation of needless ArrayLists.   This saves roughly
22362         212kb on my machine.
22363
22364         (Method): Implement the new IIteratorContainer interface.
22365         (Method.SetYields): Implement the method by setting the ModFlags
22366         to contain METHOD_YIELDS.
22367
22368         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22369         which just got set to null.
22370
22371         * iterators.cs: New file.
22372
22373         (Yield, YieldBreak): New statements.
22374
22375         * statement.cs (Return.Resolve): Flag an error if we are used in
22376         an iterator method.
22377
22378         * codegen.cs (InIterator): New flag set if the code is being
22379         compiled in an iterator method.
22380
22381         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22382         internal modifier, and we just use it to avoid adding extra
22383         fields, as this is seldom used.  
22384
22385         * cs-parser.jay: Add yield_statement (yield and yield break).
22386
22387         * driver.cs: New flag -v2 to turn on version 2 features. 
22388
22389         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22390         hashtable when v2 is enabled.
22391
22392 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22393
22394         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22395         there is already a namespace defined with this name.
22396
22397         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22398         people upgraded their corlibs.
22399
22400         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22401         always use fully qualified types, no need to use the compiler
22402         front end.
22403
22404         (TypeManager.IsNamespace): Use binarysearch.
22405
22406         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22407         AddDelegate): I did not quite use the new IsValid API properly: I
22408         have to pass the short-name and the fullname.  I was passing only
22409         the basename instead of the fullname sometimes. 
22410
22411         (TypeContainer.DefineType): call NamespaceClash.
22412
22413         * interface.cs (Interface.DefineType): use NamespaceClash before
22414         defining the type.
22415
22416         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22417         defining the type.
22418
22419         * enum.cs: (Enum.DefineType): use NamespaceClash before
22420         defining the type.
22421
22422         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22423         speed increase.  First, use the negative_hits cache when we get a
22424         negative.  Second, add the type with its full original name
22425         instead of the new . and + encoded name (reflection uses + to
22426         separate type from a nested type).  Use LookupTypeReflection
22427         directly which bypasses the type->name hashtable (that we already
22428         know does not contain the type.
22429
22430         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22431         location/container type. 
22432
22433         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22434
22435 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22436
22437         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22438
22439         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22440         method is being referenced in the method group from a static
22441         context, and report error 120 if so.
22442
22443         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22444         Error118. 
22445
22446         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22447         is created, we create the A namespace).
22448
22449         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22450         Fixes #41591
22451
22452 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22453
22454         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22455         invocation to ModuleBuilder.GetType with the same values will
22456         return a new type instance, so we need to cache its return
22457         values. 
22458
22459         * expression.cs (Binary.ResolveOperator): Only allow the compare
22460         operators on enums if they are of the same type.
22461
22462         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22463         types of ValueType on their own case.  Before we were giving them
22464         the same treatment as objects.
22465
22466         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22467         fullname.  Short name is used to compare against container name.
22468         Fullname is used to check against defined namespace names.
22469
22470         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22471         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22472
22473         (Method.CheckBase): Call parent.
22474         (MemberBase.CheckBase): Check for protected members on sealed
22475         classes.
22476         (PropertyBase.CheckBase): Call parent.
22477         (Field.Define): Call parent.
22478
22479         * report.cs: Negative error codes are now mapped to 8000 - code,
22480         so that the display is render more nicely.
22481
22482         * typemanager.cs: Do not use try/catch, instead report a regular
22483         error. 
22484
22485         (GetPointerType, GetReferenceType): These methods provide
22486         mechanisms to obtain the T* and T& from a T.  We had the code
22487         previously scattered around the code base, and it also used
22488         TypeManager.LookupType that would go through plenty of caches.
22489         This one goes directly to the type source.
22490
22491         In some places we did the Type.GetType followed by
22492         ModuleBuilder.GetType, but not in others, so this unifies the
22493         processing as well.
22494
22495         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22496         statements now that we have namespace information.
22497
22498         * typemanager.cs (IsNamespace): New method, returns whether the
22499         string presented is a namespace or not.
22500
22501         (ComputeNamespaces): New public entry point, computes the list of
22502         available namespaces, using the GetNamespaces API call in Mono, or
22503         the slower version in MS.NET.   
22504
22505         Now before we start the semantic analysis phase, we have a
22506         complete list of namespaces including everything that the user has
22507         provided.
22508
22509         Deleted old code to cache namespaces in .nsc files.
22510
22511 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22512
22513         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22514         class/struct location definition Location for the implicit
22515         constructor location.
22516
22517         (Operator.Define): Use the location of the operator for the
22518         implicit Method definition.
22519
22520         (Constructor.Emit): use the constructor location for the implicit
22521         base initializer constructor.
22522
22523         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22524         and the Expression class now contains two new methods:
22525
22526         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22527         isolate type lookup from the rest of the resolution process.
22528
22529         Since we use Expressions to hold type definitions due to the way
22530         we parse the input we have historically overloaded Resolve to
22531         perform the Type lookups if a special flag is passed.  Now this is
22532         eliminated and two methods take their place. 
22533
22534         The differences in the two methods between xStep and xTerminal is
22535         that xStep is involved in our current lookup system that uses
22536         SimpleNames to compose a name, while xTerminal is used just to
22537         catch the case where the simplename lookup failed.
22538
22539 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22540
22541         * expression.cs (ResolveMemberAccess): Remove redundant code.
22542         TypeExpr expressions are always born fully resolved.
22543
22544         * interface.cs (PopulateMethod): Do not lookup the types twice.
22545         We were doing it once during SemanticAnalysis and once during
22546         PopulateMethod.
22547
22548         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22549         in local variable type definitions, were being returned as a
22550         SimpleName (we decomposed everything into a string), that is
22551         because primary_expression was being used instead of a type in the
22552         grammar (reduce/reduce conflicts).
22553
22554         The part that was wrong is that we converted the expression into a
22555         string (an oversimplification in one hand, compounded with primary
22556         expressions doing string concatenation).
22557
22558         So things like:
22559
22560         A.B.C [] x;
22561
22562         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22563         using clauses from working on this particular context.  And a type
22564         was being matched directly against "A.B.C[]".
22565
22566         We now use the correct approach, and allow for ComposedCast to be
22567         part of the unary expression.  So the "A.B.C []" become a composed
22568         cast of "A.B.C" (as a nested group of MemberAccess with a
22569         SimpleName at the end) plus the rank composition "[]". 
22570
22571         Also fixes 35567
22572
22573 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22574
22575         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22576         for the access level checking.
22577
22578         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22579         `TypeContainer container', because I kept getting confused when I
22580         was debugging this code.
22581
22582         * expression.cs (Indexers): Instead of tracking getters/setters,
22583         we now track them in parallel.  We create one arraylist less, but
22584         most importantly it is possible now for the LValue code to find a
22585         matching get for a set.
22586
22587         (IndexerAccess.DoResolveLValue): Update the code.
22588         GetIndexersForType has been modified already to extract all the
22589         indexers from a type.  The code assumed it did not.
22590
22591         Also make the code set the correct return type for the indexer.
22592         This was fixed a long time ago for properties, but was missing for
22593         indexers.  It used to be void_type.
22594
22595         (Binary.Emit): Test first for doubles instead of
22596         floats, as they are more common.
22597
22598         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22599         when dealing with floats and the <=, >= operators.  This fixes bug
22600         #39314 
22601
22602         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22603         to load the array value by emitting a load on the foreach variable
22604         type.  This was incorrect.  
22605
22606         We now emit the code to load an element using the the array
22607         variable type, and then we emit the conversion operator.
22608
22609         Fixed #40176
22610
22611 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22612
22613         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22614
22615 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22616
22617         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22618         test for protection before we test for signatures. 
22619
22620         (MethodSignature.ToString): implement.
22621
22622         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22623         to the case where we reduced into a LongConstant.
22624
22625         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22626         depend on whether the information is acurrate, because the
22627         Microsoft runtime will always claim that the array type is public,
22628         regardless of the real state.
22629
22630         If the type is a pointer, another problem happens: the type is
22631         reported as non-public in Microsoft.  
22632
22633         In both cases we have to call CheckAccessLevel recursively with
22634         the underlying type as the argument to be tested.
22635
22636 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22637
22638         * assign.cs (Assign.Emit): If we are dealing with a compound
22639         assignment expression, we should use the code path that stores the
22640         intermediate result in a temporary value.  This fixes #40903.
22641
22642         *expression.cs (Indirection.ToString): Provide ToString method for
22643         debugging. 
22644
22645 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
22646
22647         * class.cs: Null out fields holding references to Block objects so
22648         they can be garbage collected.
22649
22650         * expression.cs (OverloadResolve): Remove unused local.
22651
22652 2003-04-07  Martin Baulig  <martin@ximian.com>
22653
22654         * codegen.cs (EmitContext.CurrentFile): New public field.
22655         (EmitContext.Mark): Use the CurrentFile to check whether the
22656         location is in the correct file.
22657         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
22658
22659 2003-04-07  Martin Baulig  <martin@ximian.com>
22660
22661         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
22662
22663         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
22664         location.  [FIXME: The location argument which gets passed to this
22665         method is sometimes wrong!]
22666
22667 2003-04-07  Nick Drochak <ndrochak@gol.com>
22668
22669         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
22670
22671 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
22672
22673         * expression.cs (Indirection.EmitAssign): We were using the
22674         temporary, but returning immediately instead of continuing the
22675         EmitAssing flow.
22676
22677 2003-04-06  Martin Baulig  <martin@ximian.com>
22678
22679         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
22680         if it's a nested child, but also deriving from the outer class.
22681         See test 190.cs.
22682
22683         * typemanager.cs (IsNestedChildOf): Make this work if it's a
22684         nested child, but also deriving from the outer class.  See
22685         test-190.cs.
22686         (FilterWithClosure): We may access private members of the outer
22687         class if we're a nested child and deriving from the outer class.
22688         (RealMemberLookup): Only set `closure_private_ok' if the
22689         `original_bf' contained BindingFlags.NonPublic.
22690
22691 2003-04-05  Martin Baulig  <martin@ximian.com>
22692
22693         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
22694
22695 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
22696
22697         * class.cs (Event.Define): Do not allow abstract events to have
22698         initializers. 
22699
22700 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
22701
22702         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
22703         block in event declarations.
22704
22705         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
22706         value type, get its address.
22707
22708         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
22709         leaving a class on the stack instead of a boolean value (int
22710         0/1).  Change the code so we compare against null, and then the
22711         result against zero.
22712
22713         * class.cs (TypeContainer.GetClassBases): We were checking for the
22714         parent class being sealed too late.
22715
22716         * expression.cs (Binary.Emit): For <= and >= when dealing with
22717         floating point values, use cgt.un and clt.un instead of cgt and
22718         clt alone.
22719
22720 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
22721
22722         * statement.cs: Apply the same optimization as MS: skip the 
22723         GetEnumerator returning an IEnumerator, and use the one returning a 
22724         CharEnumerator instead. This allows us to avoid the try-finally block 
22725         and the boxing.
22726
22727 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
22728
22729         * cs-parser.jay: Attributes cannot be applied to
22730                          namespaces. Fixes #40473
22731
22732 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22733
22734         * class.cs:
22735         (Add*): check if the name is valid using the full name for constants,
22736         fields, properties and events.
22737
22738 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
22739
22740         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
22741         char constants to be part of the enumeration.
22742
22743         * expression.cs (Conditional.DoResolve): Add support for operator
22744         true. Implements the missing functionality from 14.12
22745
22746         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
22747         operator true/false as required by the spec.
22748
22749         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
22750         implicit conversion to boolean.
22751
22752         * statement.cs (Statement.ResolveBoolean): A boolean expression is
22753         also one where the type implements `operator true'. 
22754
22755         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
22756         get an expression that will invoke operator true based on an
22757         expression.  
22758
22759         (GetConversionOperators): Removed the hack that called op_True
22760         here.  
22761
22762         (Expression.ResolveBoolean): Move this from Statement.
22763
22764 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
22765
22766         * ecore.cs (FieldExpr): do not allow initialization of initonly
22767         fields on derived classes
22768
22769 2003-03-13  Martin Baulig  <martin@ximian.com>
22770
22771         * statement.cs (Block.Emit): Call ig.BeginScope() and
22772         ig.EndScope() when compiling with debugging info; call
22773         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
22774
22775 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
22776
22777         * expression.cs (Indexers): Do not construct immediately, allow
22778         for new members to be appended as we go.  Fixes 38143
22779
22780 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22781
22782         * expression.cs: save/restore context when resolving an unchecked
22783         expression.
22784
22785 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
22786
22787         * cfold.cs: Catch division by zero in modulus operator during
22788         constant folding.
22789
22790 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
22791
22792         * interface.cs (Interface.DefineMembers): Avoid defining members
22793         twice. 
22794
22795 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
22796
22797         * driver.cs: handle the +/- options for -noconfig
22798
22799         * statement.cs (Unckeched.Resolve): Also track the state of
22800         unchecked in the Resolve phase.
22801
22802 2003-02-27  Martin Baulig  <martin@ximian.com>
22803
22804         * ecore.cs (Expression.MemberLookup): Don't create a
22805         MethodGroupExpr for something which is not a method.  Fixes #38291.
22806
22807 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
22808
22809         * class.cs (MemberBase.CheckParameters): Also check that the type
22810         is unmanaged if it is a pointer.
22811
22812         * expression.cs (SizeOf.Resolve): Add location information.
22813
22814         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
22815         a managed type is declared.
22816
22817         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
22818         parameter modifiers as well.  Fixes bug 38606
22819
22820         * class.cs: Very sad.  Am backing out the speed up changes
22821         introduced by the ArrayList -> Array in the TypeContainer, as they
22822         were not actually that much faster, and introduced a bug (no error
22823         reports on duplicated methods).
22824
22825         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
22826         source first, this will guarantee that we have a valid expression
22827         before calling in lower levels functions that will require a
22828         resolved object.  Then use this original_source in the
22829         target.ResolveLValue instead of the original source that was
22830         passed to us.
22831
22832         Another change.  Use target.Resolve instead of LValueResolve.
22833         Although we are resolving for LValues, we will let the Assign code
22834         take care of that (it will be called again from Resolve).  This
22835         basically allows code like this:
22836
22837         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
22838         class Y { void A (X x) { x [0] += o; }
22839
22840         The problem was that the indexer was trying to resolve for
22841         set_Item (idx, object o) and never finding one.  The real set_Item
22842         was set_Item (idx, X).  By delaying the process we get the right
22843         semantics. 
22844
22845         Fixes bug 36505
22846
22847 2003-02-23  Martin Baulig  <martin@ximian.com>
22848
22849         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
22850         while calling DoEmit ().
22851
22852         * codegen.cs (EmitContext.Mark): Don't mark locations in other
22853         source files; if you use the #line directive inside a method, the
22854         compiler stops emitting line numbers for the debugger until it
22855         reaches the end of the method or another #line directive which
22856         restores the original file.
22857
22858 2003-02-23  Martin Baulig  <martin@ximian.com>
22859
22860         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
22861
22862 2003-02-23  Martin Baulig  <martin@ximian.com>
22863
22864         * statement.cs (Block.AddChildVariableNames): We need to call this
22865         recursively, not just for our immediate children.
22866
22867 2003-02-23  Martin Baulig  <martin@ximian.com>
22868
22869         * class.cs (Event.Define): Always make the field private, like csc does.
22870
22871         * typemanager.cs (TypeManager.RealMemberLookup): Make events
22872         actually work, fixes bug #37521.
22873
22874 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
22875
22876         * delegate.cs: When creating the various temporary "Parameters"
22877         classes, make sure that we call the ComputeAndDefineParameterTypes
22878         on those new parameters (just like we do with the formal ones), to
22879         allow them to be resolved in the context of the DeclSpace.
22880
22881         This fixes the bug that Dick observed in Bugzilla #38530.
22882
22883 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
22884
22885         * expression.cs (ResolveMemberAccess): When resolving a constant,
22886         do not attempt to pull a constant if the value was not able to
22887         generate a valid constant.
22888
22889         * const.cs (LookupConstantValue): Do not report more errors than required.
22890
22891 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22892
22893         * expression.cs: fixes bug #38328.
22894
22895 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22896
22897         * class.cs: Changed all the various members that can be part of a
22898         class from being an ArrayList to be an Array of the right type.
22899         During the DefineType type_list, interface_list, delegate_list and
22900         enum_list are turned into types, interfaces, delegates and enums
22901         arrays.  
22902
22903         And during the member population, indexer_list, event_list,
22904         constant_list, field_list, instance_constructor_list, method_list,
22905         operator_list and property_list are turned into their real arrays.
22906
22907         Although we could probably perform this operation earlier, for
22908         good error reporting we need to keep the lists and remove the
22909         lists for longer than required.
22910
22911         This optimization was triggered by Paolo profiling the compiler
22912         speed on the output of `gen-sample-program.pl' perl script. 
22913
22914         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
22915         not crash in methods like MemberLookupFailed that use this field.  
22916
22917         This problem arises when the compiler fails to resolve a type
22918         during interface type definition for example.
22919
22920 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22921
22922         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
22923         inherit from System.Object, so we have to stop at null, not only
22924         when reaching System.Object.
22925
22926 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
22927
22928         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
22929         DeclaredOnly because the parent indexer might have had a different
22930         name, but did not loop until the top of the hierarchy was reached.
22931
22932         The problem this one fixes is 35492: when a class implemented an
22933         indexer from an interface, we were getting the interface method
22934         (which was abstract) and we were flagging an error (can not invoke
22935         abstract method).
22936
22937         This also keeps bug 33089 functioning, and test-148 functioning.
22938
22939         * typemanager.cs (IsSpecialMethod): The correct way of figuring
22940         out if a method is special is to see if it is declared in a
22941         property or event, or whether it is one of the predefined operator
22942         names.   This should fix correctly #36804.
22943
22944 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
22945
22946         The goal here is to remove the dependency on EmptyCast.Peel ().
22947         Killing it completely.
22948
22949         The problem is that currently in a number of places where
22950         constants are expected, we have to "probe" for an EmptyCast, and
22951         Peel, which is not the correct thing to do, as this will be
22952         repetitive and will likely lead to errors. 
22953
22954         The idea is to remove any EmptyCasts that are used in casts that
22955         can be reduced to constants, so we only have to cope with
22956         constants. 
22957
22958         This bug hunt was triggered by Bug 37363 and the desire to remove
22959         the duplicate pattern where we were "peeling" emptycasts to check
22960         whether they were constants.  Now constants will always be
22961         constants.
22962
22963         * ecore.cs: Use an enumconstant here instead of wrapping with
22964         EmptyCast.  
22965
22966         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
22967         throwing me off.  By handling this we can get rid of a few hacks.
22968
22969         * statement.cs (Switch): Removed Peel() code.
22970
22971 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
22972
22973         * class.cs: Location information for error 508
22974
22975         * expression.cs (New.DoResolve): Add a guard against double
22976         resolution of an expression.  
22977
22978         The New DoResolve might be called twice when initializing field
22979         expressions (see EmitFieldInitializers, the call to
22980         GetInitializerExpression will perform a resolve on the expression,
22981         and later the assign will trigger another resolution
22982
22983         This leads to bugs (#37014)
22984
22985         * delegate.cs: The signature for EndInvoke should contain any ref
22986         or out parameters as well.  We were not doing this in the past. 
22987
22988         * class.cs (Field.Define): Do not overwrite the type definition
22989         inside the `volatile' group.  Turns out that volatile enumerations
22990         were changing the type here to perform a validity test, which
22991         broke conversions. 
22992
22993 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
22994
22995         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
22996         and structs, we do not want to load the instance variable
22997
22998         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
22999         enum_type has to be handled like an object reference (implicit
23000         conversions exists from this to object), but the regular IsClass
23001         and IsValueType tests will never return true for this one.
23002
23003         Also we use TypeManager.IsValueType instead of type.IsValueType,
23004         just for consistency with the rest of the code (this is only
23005         needed if we ever use the construct exposed by test-180.cs inside
23006         corlib, which we dont today).
23007
23008 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
23009
23010         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
23011         just InternalCall.
23012
23013 2003-02-09  Martin Baulig  <martin@ximian.com>
23014
23015         * namespace.cs (Namespace..ctor): Added SourceFile argument.
23016         (Namespace.DefineNamespaces): New static public method; this is
23017         called when we're compiling with debugging to add all namespaces
23018         to the symbol file.
23019
23020         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
23021         pass it to the Namespace's .ctor.
23022
23023         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
23024         and MethodBase arguments; pass the namespace ID to the symwriter;
23025         pass the MethodBase instead of the token to the symwriter.
23026         (SymbolWriter.DefineNamespace): New method to add a namespace to
23027         the symbol file.
23028
23029 2003-02-09  Martin Baulig  <martin@ximian.com>
23030
23031         * symbolwriter.cs: New file.  This is a wrapper around
23032         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
23033         methods here in near future.
23034
23035 2003-02-09  Martin Baulig  <martin@ximian.com>
23036
23037         * codegen.cs (EmitContext.Mark): Just pass the arguments to
23038         ILGenerator.MarkSequencePoint() which are actually used by the
23039         symbol writer.
23040
23041 2003-02-09  Martin Baulig  <martin@ximian.com>
23042
23043         * location.cs (SourceFile): New public sealed class.  This
23044         contains the name and an index which is used in the location's token.
23045         (Location): Reserve an appropriate number of bits in the token for
23046         the source file instead of walking over that list, this gives us a
23047         really huge performance improvement when compiling with debugging.
23048
23049         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23050         `SourceFile' argument instead of a string.
23051         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23052         but don't parse/tokenize here, we need to generate the list of all
23053         source files before we do that.
23054         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23055         the files.
23056
23057         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23058         instead of a string.
23059
23060         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23061         of a string.
23062
23063 2003-02-09  Martin Baulig  <martin@ximian.com>
23064
23065         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23066         filename on `#line default'.
23067
23068 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23069
23070         * statement.cs: don't clear the pinned var when the fixed statement
23071         returns from the method (fixes bug#37752).
23072
23073 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23074
23075         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23076         to IsValueType.
23077
23078 2003-02-07  Martin Baulig  <martin@ximian.com>
23079
23080         * driver.cs: Removed the `--debug-args' command line argument.
23081
23082         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23083         automatically by the AsssemblyBuilder.
23084         (CodeGen.InitializeSymbolWriter): We don't need to call any
23085         initialization function on the symbol writer anymore.  This method
23086         doesn't take any arguments.
23087
23088 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23089
23090         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23091         from referenced assemblies as well.
23092
23093 2003-02-02  Martin Baulig  <martin@ximian.com>
23094
23095         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23096
23097 2003-02-02  Martin Baulig  <martin@ximian.com>
23098
23099         * class.cs (Constructor.Emit): Open the symbol writer before
23100         emitting the constructor initializer.
23101         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23102         single-stepping through constructor initializers.
23103
23104 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23105
23106         * class.cs: Handle error 549: do not allow virtual methods in
23107         sealed classes. 
23108
23109 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23110
23111         * decl.cs: Check access levels when resolving types
23112
23113 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23114
23115         * statement.cs: Add parameters and locals set in catch blocks that might 
23116         return to set vector
23117
23118 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23119
23120         * class.cs (Operator): Set the SpecialName flags for operators.
23121
23122         * expression.cs (Invocation.DoResolve): Only block calls to
23123         accessors and operators on SpecialName methods.
23124
23125         (Cast.TryReduce): Handle conversions from char constants.
23126
23127
23128 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23129
23130         * statement.cs: small memory and time optimization in FlowBranching.
23131
23132 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23133
23134         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23135         problem that the last fix but in the other sid (Set).
23136
23137         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23138         access when there is no indexer in the hierarchy.
23139
23140 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23141
23142         * class.cs: Combine some if statements.
23143
23144 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23145
23146         * driver.cs: fixed bug #37187.
23147
23148 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23149
23150         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23151         any indexer, it's needed to build a list with all the indexers in the
23152         hierarchy (AllGetters), else we have problems. Fixes #35653.
23153
23154 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23155
23156         * class.cs (MethodData.Define): It is wrong for an interface
23157         implementation to be static in both cases: explicit and implicit.
23158         We were only handling this in one case.
23159
23160         Improve the if situation there to not have negations.
23161
23162         * class.cs (Field.Define): Turns out that we do not need to check
23163         the unsafe bit on field definition, only on usage.  Remove the test.
23164
23165 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23166
23167         * driver.cs: use assembly.Location instead of Codebase (the latest
23168         patch made mcs fail when using MS assemblies).
23169
23170 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23171
23172         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23173         get the path to *corlib.dll.
23174
23175 2003-01-21  Nick Drochak <ndrochak@gol.com>
23176
23177         * cs-tokenizer.cs:
23178         * pending.cs:
23179         * typemanager.cs: Remove compiler warnings
23180
23181 2003-01-20  Duncan Mak  <duncan@ximian.com>
23182
23183         * AssemblyInfo.cs: Bump the version number to 0.19.
23184
23185 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23186
23187         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23188
23189 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23190
23191         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23192
23193 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23194
23195         * cs-parser.jay: Small fix: we were not comparing the constructor
23196         name correctly.   Thanks to Zoltan for the initial pointer.
23197
23198 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23199
23200         * cs-tokenizer.cs: Set file name when specified with #line
23201
23202 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23203
23204         * cs-parser.jay: Only perform the constructor checks here if we
23205         are named like the class;  This will help provider a better
23206         error.  The constructor path is taken when a type definition is
23207         not found, but most likely the user forgot to add the type, so
23208         report that rather than the constructor error.
23209
23210 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23211
23212         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23213         allocations.
23214
23215 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23216
23217         * cs-parser.jay: Add cleanup call.
23218
23219 2003-01-13  Duncan Mak  <duncan@ximian.com>
23220
23221         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23222         consistent with other methods.
23223
23224 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23225
23226         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23227
23228 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23229
23230         * attribute.cs: only set GuidAttr to true when we have a
23231         GuidAttribute.
23232
23233 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23234
23235         * ecore.cs:
23236         * expression.cs:
23237         * typemanager.cs: fixes to allow mcs compile corlib with the new
23238         Type.IsSubclassOf fix.
23239
23240 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23241
23242         * expression.cs (LocalVariableReference.DoResolve): Classify a
23243         constant as a value, not as a variable.   Also, set the type for
23244         the variable.
23245
23246         * cs-parser.jay (fixed_statement): take a type instead of a
23247         pointer_type, so we can produce a better error message later.
23248
23249         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23250         as an error.  
23251
23252         (For.DoEmit): Make inifinite loops have a
23253         non-conditional branch back.
23254
23255         (Fixed.DoEmit): First populate the pinned variables, then emit the
23256         statement, then clear the variables.  Before I was emitting the
23257         code once for each fixed piece.
23258
23259
23260 2003-01-08  Martin Baulig  <martin@ximian.com>
23261
23262         * statement.cs (FlowBranching.MergeChild): A break in a
23263         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23264
23265 2003-01-08  Martin Baulig  <martin@ximian.com>
23266
23267         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23268         lives in the same number space than `param_map'.  Fixes #36154.
23269
23270 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23271
23272         * cs-parser.jay (constructor_declaration): Set the
23273         Constructor.ModFlags before probing for it.  This makes the
23274         compiler report 514, 515 and 132 (the code was there, but got
23275         broken). 
23276
23277         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23278         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23279         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23280
23281 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23282
23283         * enum.cs: create the enum static fields using the enum type.
23284
23285 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23286
23287         * class.cs: don't try to create the ParamBuilder for the return
23288         type if it's not needed (and handle it breaking for the ms runtime
23289         anyway).
23290
23291 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23292
23293         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23294
23295 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23296
23297         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23298         the command.   This showed up while compiling the JANET source
23299         code, which used \r as its only newline separator.
23300
23301 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23302
23303         * class.cs (Method.Define): If we are an operator (because it
23304         reuses our code), then set the SpecialName and HideBySig.  #36128
23305
23306 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23307
23308         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23309         exception, report error 120 `object reference required'.
23310
23311         * driver.cs: Add --pause option, used during to measure the size
23312         of the process as it goes with --timestamp.
23313
23314         * expression.cs (Invocation.DoResolve): Do not allow methods with
23315         SpecialName to be invoked.
23316
23317 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23318
23319         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23320         number before adding it.
23321
23322 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23323
23324         * ecore.cs (StandardImplicitConversion): When in an unsafe
23325         context, we allow conversion between void * to any other pointer
23326         type. This fixes bug #35973.
23327
23328 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23329
23330         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23331         is not thrown when extensionless outputs are used 
23332
23333 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23334
23335         * rootcontext.cs: fixed compilation of corlib.
23336
23337 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23338
23339         * attribute.cs (Attributes.Contains): Add new method.
23340
23341         * class.cs (MethodCore.LabelParameters): if the parameter is an
23342         `out' parameter, check that no attribute `[In]' has been passed.
23343
23344         * enum.cs: Handle the `value__' name in an enumeration.
23345
23346 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23347
23348         * decl.cs: Added special case to allow overrides on "protected
23349         internal" methods
23350
23351 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23352
23353         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23354         since it makes much more sense.
23355
23356         (Attributes.ctor): Don't require a Location parameter.
23357
23358         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23359
23360         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23361         since we already have that information per attribute.
23362
23363         * everywhere : make appropriate changes.
23364
23365         * class.cs (LabelParameters): Write the code which actually
23366         applies attributes to the return type. We can't do this on the MS
23367         .NET runtime so we flag a warning in the case an exception is
23368         thrown.
23369
23370 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23371
23372         * const.cs: Handle implicit null conversions here too.
23373
23374 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23375
23376         * class.cs (MethodCore.LabelParameters): Remove the extra
23377         Type [] parameter since it is completely unnecessary. Instead
23378         pass in the method's attributes so that we can extract
23379         the "return" attribute.
23380
23381 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23382
23383         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23384         of ignoring it and letting the compile continue.
23385
23386         * typemanager.cs (ChangeType): use an extra argument to return an
23387         error condition instead of throwing an exception.
23388
23389 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23390
23391         * expression.cs (Unary.TryReduce): mimic the code for the regular
23392         code path.  Perform an implicit cast in the cases where we can
23393         implicitly convert to one of the integral types, and then reduce
23394         based on that constant.   This fixes bug #35483.
23395
23396 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23397
23398         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23399
23400 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23401
23402         * namespace.cs: fixed bug #35489.
23403
23404 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23405
23406         * class.cs: Remove some dead code.
23407
23408         * cs-parser.jay: Estimate the number of methods needed
23409         (RootContext.MethodCount);
23410
23411         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23412         numbers instead of StringBuilders.
23413
23414         * support.cs (PtrHashtable): Add constructor with initial size;
23415         We can now reduce reallocations of the method table.
23416
23417 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23418
23419         * attribute.cs (ApplyAttributes): Keep track of the emitted
23420         attributes on a per-target basis. This fixes bug #35413.
23421
23422 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23423
23424         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23425         default to the Windows 1252 encoding.
23426
23427         (UnixParseOption): Support version, thanks to Alp for the missing
23428         pointer. 
23429
23430         * AssemblyInfo.cs: Add nice assembly information.
23431
23432         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23433         (bug 35169).
23434
23435         * cs-parser.jay: Allow a trailing comma before the close bracked
23436         in the attribute_section production.
23437
23438         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23439         address of the instance was being taken, I will take this out,
23440         because we take the address of the object immediately here.
23441
23442 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23443
23444         * typemanager.cs (AreMultipleAllowed): Take care of the most
23445         obvious case where attribute type is not in the current assembly -
23446         stupid me ;-)
23447
23448 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23449
23450         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23451         definitions, instead of doing that afterwards.  
23452
23453         Also we use a nice little hack, depending on the constructor, we
23454         know if we are a "composed" name or a simple name.  Hence, we
23455         avoid the IndexOf test, and we avoid 
23456
23457         * codegen.cs: Add code to assist in a bug reporter to track down
23458         the source of a compiler crash. 
23459
23460 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23461
23462         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23463         types have been emitted for a given element and flag an error
23464         if something which does not have AllowMultiple set is used more
23465         than once.
23466
23467         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23468         attribute types and their corresponding AllowMultiple properties
23469
23470         (AreMultipleAllowed): Check the property for a given type.
23471
23472         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23473         property in the case we have a TypeContainer.
23474
23475         (Attributes.AddAttribute): Detect duplicates and just skip on
23476         adding them. This trivial fix catches a pretty gross error in our
23477         attribute emission - global attributes were being emitted twice!
23478
23479         Bugzilla bug #33187 is now fixed.
23480
23481 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23482
23483         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23484         instead of pp_and).
23485
23486         * expression.cs (Binary.ResolveOperator): I can only use the
23487         Concat (string, string, string) and Concat (string, string,
23488         string, string) if the child is actually a concatenation of
23489         strings. 
23490
23491 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23492
23493         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23494         context where we need a 2-character lookahead.
23495
23496         * pending.cs (PendingImplementation): Rework so we can keep track
23497         of interface types all the time, and flag those which were
23498         implemented by parents as optional.
23499
23500 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23501
23502         * expression.cs (Binary.ResolveOperator): Use
23503         String.Concat(string,string,string) or
23504         String.Concat(string,string,string,string) when possible. 
23505
23506         * typemanager: More helper methods.
23507
23508
23509 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23510
23511         * pending.cs: remove the bogus return from GetMissingInterfaces()
23512         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23513
23514 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23515
23516         * namespace.cs: avoid duplicated 'using xxx' being added to
23517         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23518         when we get more than one 'using' statement for the same namespace.
23519         Report a CS0105 warning for it.
23520
23521 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23522
23523         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23524         of calling getChar/putback, uses internal knowledge of it.    
23525
23526         (xtoken): Reorder tokenizer so most common patterns are checked
23527         first.  This reduces the compilation time in another 5% (from 8.11s
23528         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23529
23530         The parsing time is 22% of the compilation in mcs, and from that
23531         64% is spent on the tokenization process.  
23532
23533         I tried using a binary search for keywords, but this is slower
23534         than the hashtable.  Another option would be to do a couple of
23535         things:
23536
23537                 * Not use a StringBuilder, instead use an array of chars,
23538                   with a set value.  Notice that this way we could catch
23539                   the 645 error without having to do it *afterwards*.
23540
23541                 * We could write a hand-parser to avoid the hashtable
23542                   compares altogether.
23543
23544         The identifier consumption process takes 37% of the tokenization
23545         time.  Another 15% is spent on is_number.  56% of the time spent
23546         on is_number is spent on Int64.Parse:
23547
23548                 * We could probably choose based on the string length to
23549                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23550                   computations. 
23551
23552         Another 3% is spend on wrapping `xtoken' in the `token' function.
23553
23554         Handle 0xa0 as whitespace (#34752)
23555
23556 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23557
23558         * typemanager.cs (IsCLRType): New routine to tell whether a type
23559         is one of the builtin types.  
23560
23561         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23562         typecode in more places instead of doing pointer comparissions.
23563         We could leverage some knowledge about the way the typecodes are
23564         laid out.
23565
23566         New code to cache namespaces in assemblies, it is currently not
23567         invoked, to be used soon.
23568
23569         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23570
23571         * expression.cs (Binary.ResolveOperator): specially handle
23572         strings, and do not perform user-defined operator overloading for
23573         built-in types.
23574
23575 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23576
23577         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23578         internalcall as it is a pretty simple operation;  Avoid whenever
23579         possible to call Char.IsLetter.
23580
23581         (consume_identifier): Cut by half the number of
23582         hashtable calls by merging the is_keyword and GetKeyword behavior.
23583
23584         Do not short-circuit, because if we do, we
23585         report errors (ie, #if false && true would produce an invalid
23586         directive error);
23587
23588
23589 2002-11-24  Martin Baulig  <martin@ximian.com>
23590
23591         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23592         check constant ranges and report a CS0221.  Fixes #33186.
23593
23594 2002-11-24  Martin Baulig  <martin@ximian.com>
23595
23596         * cs-parser.jay: Make this work for uninitialized variable
23597         declarations in the `for' initializer.  Fixes #32416.
23598
23599 2002-11-24  Martin Baulig  <martin@ximian.com>
23600
23601         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23602         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23603
23604 2002-11-24  Martin Baulig  <martin@ximian.com>
23605
23606         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23607         argument; if true, we also check for user-defined conversions.
23608         This is only needed if both arguments are of a user-defined type.
23609         Fixes #30443, added test-175.cs.
23610         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23611
23612         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23613
23614 2002-11-24  Martin Baulig  <martin@ximian.com>
23615
23616         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23617         function to get the store opcode.
23618         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23619         only emit the Ldelema if the store opcode is Stobj.  You must run
23620         both test-34 and test-167 to test this.  Fixes #34529.
23621
23622 2002-11-23  Martin Baulig  <martin@ximian.com>
23623
23624         * ecore.cs (Expression.MemberLookup): Added additional
23625         `qualifier_type' argument which is used when we're being called
23626         from MemberAccess.DoResolve() and null if we're called from a
23627         SimpleName lookup.
23628         (Expression.MemberLookupFailed): New method to report errors; this
23629         does the CS1540 check and reports the correct error message.
23630
23631         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23632         argument for the CS1540 check and redone the way how we're dealing
23633         with private members.  See the comment in the source code for details.
23634         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23635         `closure_start_type' to `closure_qualifier_type' and check whether
23636         it's not null.  It was not this filter being broken, it was just
23637         being called with the wrong arguments.
23638
23639         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
23640         and pass it the correct `qualifier_type'; this also does the error
23641         handling for us.
23642
23643 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
23644
23645         * expression.cs (Invocation.EmitParams): If the we are dealing
23646         with a non-built-in value type, load its address as well.
23647
23648         (ArrayCreation): Use a a pretty constant instead
23649         of the hardcoded value 2.   Use 6 instead of 2 for the number of
23650         static initializers.  
23651
23652         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
23653         because they are not really value types, just glorified integers. 
23654
23655         * driver.cs: Do not append .exe, the CSC compiler does not do it.
23656
23657         * ecore.cs: Remove redundant code for enumerations, make them use
23658         the same code path as everything else, fixes the casting issue
23659         with enumerations in Windows.Forms.
23660
23661         * attribute.cs: Do only cast to string if it is a string, the
23662         validation happens later.
23663
23664         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
23665         people upgrade their corlibs.
23666
23667         * ecore.cs: Oops, enumerations were not following the entire code path
23668
23669 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
23670
23671         * typemanager.cs (FilterWithClosure): Commented out the test for
23672         1540 in typemanager.cs, as it has problems when accessing
23673         protected methods from a parent class (see test-174.cs). 
23674
23675         * attribute.cs (Attribute.ValidateGuid): new method.
23676         (Attribute.Resolve): Use above.
23677
23678 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
23679
23680         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
23681
23682         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
23683         handling for enumerations, as we only needed the TypeContainer
23684         functionality to begin with (this is required for the fix below to
23685         work for enums that reference constants in a container class for
23686         example). 
23687
23688         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
23689
23690         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
23691         a valid TypeBuilder to perform lookups on.o
23692
23693         * class.cs (InheritableMemberSignatureCompare): Use true in the
23694         call to GetGetMethod and GetSetMethod, because we are comparing
23695         the signature, and we need to get the methods *even* if they are
23696         private. 
23697
23698         (PropertyBase.CheckBase): ditto.
23699
23700         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
23701         GotoCase.Resolve): Use Peel on EmpytCasts.
23702
23703         * ecore.cs (EmptyCast): drop child, add Peel method.
23704
23705 2002-11-17  Martin Baulig  <martin@ximian.com>
23706
23707         * ecore.cs (EmptyCast.Child): New public property.
23708
23709         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
23710         label resolved to an EmptyCast.  Fixes #34162.
23711         (GotoCase.Resolve): Likewise.
23712         (Block.EmitMeta): Likewise.
23713
23714 2002-11-17  Martin Baulig  <martin@ximian.com>
23715
23716         * expression.cs (Invocation.BetterConversion): Prefer int over
23717         uint; short over ushort; long over ulong for integer literals.
23718         Use ImplicitConversionExists instead of StandardConversionExists
23719         since we also need to check for user-defined implicit conversions.
23720         Fixes #34165.  Added test-173.cs.
23721
23722 2002-11-16  Martin Baulig  <martin@ximian.com>
23723
23724         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
23725         with the `true' and `false' literals.  Fixes #33151.
23726
23727 2002-11-16  Martin Baulig  <martin@ximian.com>
23728
23729         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
23730         October 22nd; don't do the cs1540 check for static members.
23731
23732         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
23733         now using our own filter here and doing the cs1540 check again.
23734
23735 2002-11-16  Martin Baulig  <martin@ximian.com>
23736
23737         * support.cs (InternalParameters): Don't crash if we don't have
23738         any fixed parameters.  Fixes #33532.
23739
23740 2002-11-16  Martin Baulig  <martin@ximian.com>
23741
23742         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
23743         when looking up static methods to make this work on Windows.
23744         Fixes #33773.
23745
23746 2002-11-16  Martin Baulig  <martin@ximian.com>
23747
23748         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
23749         a setter rather than using PropertyInfo.CanWrite.
23750
23751 2002-11-15  Nick Drochak  <ndrochak@gol.com>
23752
23753         * class.cs: Allow acces to block member by subclasses. Fixes build
23754         breaker.
23755
23756 2002-11-14  Martin Baulig  <martin@ximian.com>
23757
23758         * class.cs (Constructor.Emit): Added the extern/block check.
23759         Fixes bug #33678.
23760
23761 2002-11-14  Martin Baulig  <martin@ximian.com>
23762
23763         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
23764         iteration while looking for indexers, this is needed because the
23765         indexer may have a different name in our base classes.  Fixed the
23766         error reporting (no indexers at all, not get accessor, no
23767         overloaded match).  Fixes bug #33089.
23768         (IndexerAccess.DoResolveLValue): Likewise.
23769
23770 2002-11-14  Martin Baulig  <martin@ximian.com>
23771
23772         * class.cs (PropertyBase.CheckBase): Make this work for multiple
23773         indexers.  Fixes the first part of bug #33089.
23774         (MethodSignature.InheritableMemberSignatureCompare): Added support
23775         for properties.
23776
23777 2002-11-13  Ravi Pratap  <ravi@ximian.com>
23778
23779         * attribute.cs (Attribute.Resolve): Catch the
23780         NullReferenceException and report it since it isn't supposed to
23781         happen. 
23782
23783 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
23784
23785         * expression.cs (Binary.EmitBranchable): Also handle the cases for
23786         LogicalOr and LogicalAnd that can benefit from recursively
23787         handling EmitBranchable.  The code now should be nice for Paolo.
23788
23789 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
23790
23791         * typemanager.cs (LookupType): Added a negative-hit hashtable for
23792         the Type lookups, as we perform quite a number of lookups on
23793         non-Types.  This can be removed once we can deterministically tell
23794         whether we have a type or a namespace in advance.
23795
23796         But this might require special hacks from our corlib.
23797
23798         * TODO: updated.
23799
23800         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
23801         and double which avoids a conversion from an integer to a double.
23802
23803         * expression.cs: tiny optimization, avoid calling IsConstant,
23804         because it effectively performs the lookup twice.
23805
23806 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
23807
23808         But a bogus return here to keep the semantics of the old code
23809         until the Mono runtime is fixed.
23810
23811         * pending.cs (GetMissingInterfaces): New method used to remove all
23812         the interfaces that are already implemented by our parent
23813         classes from the list of pending methods. 
23814
23815         * interface.cs: Add checks for calls after ResolveTypeExpr.
23816
23817 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
23818
23819         * class.cs (Class.Emit): Report warning 67: event not used if the
23820         warning level is beyond 3.
23821
23822         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
23823         being a NullLiteral.
23824
23825         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
23826         specifiers. 
23827
23828         * class.cs (TypeContainer.GetClassBases): Cover a missing code
23829         path that might fail if a type can not be resolved.
23830
23831         * expression.cs (Binary.Emit): Emit unsigned versions of the
23832         operators. 
23833
23834         * driver.cs: use error 5.
23835
23836 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23837
23838         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
23839
23840 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
23841
23842         * cs-parser.jay (switch_section): A beautiful patch from Martin
23843         Baulig that fixed 33094.
23844
23845 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
23846
23847         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
23848         Check whether the base is abstract and report an error if so.
23849
23850         * expression.cs (IndexerAccess.DoResolveLValue,
23851         IndexerAccess.DoResolve): ditto. 
23852
23853         (Invocation.DoResolve): ditto.
23854
23855         (Invocation.FullMethodDesc): Improve the report string.
23856
23857         * statement.cs (Block): Eliminate IsVariableDefined as it is
23858         basically just a wrapper for GetVariableInfo.
23859
23860         * ecore.cs (SimpleName): Use new 
23861
23862         * support.cs (ReflectionParamter.ParameterType): We unwrap the
23863         type, as we return the actual parameter ref/unref state on a
23864         different call.
23865
23866 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
23867
23868         * support.cs: Return proper flags REF/OUT fixing the previous
23869         commit.  
23870
23871         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
23872         not used to mean `ref' but `ref or out' in ParameterReference
23873
23874         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
23875         full type signature instead of calling TypeManger.CSharpName
23876         ourselves. 
23877
23878         * support.cs (InternalParameters.ParameterDesc): Do not compare
23879         directly to the modflags, because REF/OUT will actually be bitsets
23880         if set. 
23881
23882         * delegate.cs (VerifyMethod): Check also the modifiers.
23883
23884         * cs-tokenizer.cs: Fix bug where floating point values with an
23885         exponent where a sign was missing was ignored.
23886
23887         * driver.cs: Allow multiple assemblies to be specified in a single
23888         /r: argument
23889
23890 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
23891
23892         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
23893         because identifiers after a parenthesis would end up in this kind
23894         of production, and we needed to desamiguate it for having casts
23895         like:
23896
23897                 (UserDefinedType *) xxx
23898
23899 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
23900
23901         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
23902         we should set on the Bindingflags.NonPublic, but not turn on
23903         private_ok.  private_ok controls whether a Private member is
23904         returned (this is chekced on the filter routine), while the
23905         BindingFlags.NonPublic just controls whether private/protected
23906         will be allowed.   This fixes the problem part of the problem of
23907         private properties being allowed to be used in derived classes.
23908
23909         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
23910         so we can call the children DoResolveLValue method (this will
23911         properly signal errors on lvalue assignments to base properties)
23912
23913         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
23914         getter are null, and we have a property info, we know that this
23915         happened because the lookup failed, so we report an error 122 for
23916         protection level violation.
23917
23918         We also silently return if setter and getter are null in the
23919         resolve functions, this condition only happens if we have flagged
23920         the error before.  This is the other half of the problem. 
23921
23922         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
23923         not have accessibility information, that is why we were returning
23924         true in the filter function in typemanager.cs.
23925
23926         To properly report 122 (property is inaccessible because of its
23927         protection level) correctly, we report this error in ResolveAccess
23928         by failing if both the setter and the getter are lacking (ie, the
23929         lookup failed). 
23930
23931         DoResolve and DoLResolve have been modified to check for both
23932         setter/getter being null and returning silently, the reason being
23933         that I did not want to put the knowledge about this error in upper
23934         layers, like:
23935
23936         int old = Report.Errors;
23937         x = new PropertyExpr (...);
23938         if (old != Report.Errors)
23939                 return null;
23940         else
23941                 return x;
23942
23943         So the property expr is returned, but it is invalid, so the error
23944         will be flagged during the resolve process. 
23945
23946         * class.cs: Remove InheritablePropertySignatureCompare from the
23947         class, as we no longer depend on the property signature to compute
23948         whether it is possible to implement a method or not.
23949
23950         The reason is that calling PropertyInfo.GetGetMethod will return
23951         null (in .NET, in Mono it works, and we should change this), in
23952         cases where the Get Method does not exist in that particular
23953         class.
23954
23955         So this code:
23956
23957         class X { public virtual int A { get { return 1; } } }
23958         class Y : X { }
23959         class Z : Y { public override int A { get { return 2; } } }
23960
23961         Would fail in Z because the parent (Y) would not have the property
23962         defined.  So we avoid this completely now (because the alternative
23963         fix was ugly and slow), and we now depend exclusively on the
23964         method names.
23965
23966         (PropertyBase.CheckBase): Use a method-base mechanism to find our
23967         reference method, instead of using the property.
23968
23969         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
23970         routines are gone now.
23971
23972         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
23973         names, they were incorrectly named.
23974
23975         * cs-tokenizer.cs: Return are more gentle token on failure. 
23976
23977         * pending.cs (PendingImplementation.InterfaceMethod): This routine
23978         had an out-of-sync index variable, which caused it to remove from
23979         the list of pending methods the wrong method sometimes.
23980
23981 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
23982
23983         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
23984         CanWrite, because those refer to this particular instance of the
23985         property, and do not take into account the fact that we can
23986         override single members of a property.
23987
23988         Constructor requires an EmitContext.  The resolution process does
23989         not happen here, but we need to compute the accessors before,
23990         because the resolution does not always happen for properties.
23991
23992         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
23993         subclass, before we did not update this flag, but we did update
23994         bindingflags. 
23995
23996         (GetAccessors): Drop this routine, as it did not work in the
23997         presence of partially overwritten set/get methods. 
23998
23999         Notice that this broke the cs1540 detection, but that will require
24000         more thinking. 
24001
24002 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24003
24004         * class.cs:
24005         * codegen.cs:
24006         * driver.cs: issue a warning instead of an error if we don't support
24007         debugging for the platform. Also ignore a couple of errors that may
24008         arise when trying to write the symbols. Undo my previous patch.
24009
24010 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24011
24012         * driver.cs: ignore /debug switch except for Unix platforms.
24013
24014 2002-10-23  Nick Drochak  <ndrochak@gol.com>
24015
24016         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
24017
24018 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
24019
24020         * driver.cs: Do not make mcs-debug conditional, so we do not break
24021         builds that use it.
24022
24023         * statement.cs (UsageVector.MergeChildren): I would like Martin to
24024         review this patch.  But basically after all the children variables
24025         have been merged, the value of "Breaks" was not being set to
24026         new_breaks for Switch blocks.  I think that it should be set after
24027         it has executed.  Currently I set this to the value of new_breaks,
24028         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
24029         conservative, but I do not understand this code very well.
24030
24031         I did not break anything in the build, so that is good ;-)
24032
24033         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
24034
24035 2002-10-20  Mark Crichton  <crichton@gimp.org>
24036
24037         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
24038
24039 2002-10-20  Nick Drochak  <ndrochak@gol.com>
24040
24041         * cfold.cs: Fixed compile blocker.
24042
24043 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
24044
24045         * driver.cs: I was chekcing the key, not the file.
24046
24047 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24048
24049         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24050         message that we were generating - we just need to silently return
24051         a null.
24052
24053 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24054
24055         * class.cs (Event.Define): Change my previous commit, as this
24056         breaks the debugger.  This is a temporary hack, as it seems like
24057         the compiler is generating events incorrectly to begin with.
24058
24059         * expression.cs (Binary.ResolveOperator): Added support for 
24060         "U operator - (E x, E y)"
24061
24062         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24063         y)".
24064
24065         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24066         init-only variables, but this path did not take into account that
24067         there might be also instance readonly variables.  Correct this
24068         problem. 
24069
24070         This fixes bug 32253
24071
24072         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24073         delegates as well.
24074
24075         * driver.cs: Change the extension for modules to `netmodule'
24076
24077         * cs-parser.jay: Improved slightly the location tracking for
24078         the debugger symbols.
24079
24080         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24081         modifiers that were specified instead of the hardcoded value
24082         (FamAndAssem).  This was basically ignoring the static modifier,
24083         and others.  Fixes 32429.
24084
24085         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24086         fixed a bug in the process (32476)
24087
24088         * expression.cs (ArrayAccess.EmitAssign): Patch from
24089         hwang_rob@yahoo.ca that fixes bug 31834.3
24090
24091 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24092
24093         * driver.cs: Make the module extension .netmodule.
24094
24095 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24096
24097         * driver.cs: Report an error if the resource file is not found
24098         instead of crashing.
24099
24100         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24101         false, like Emit does.
24102
24103 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24104
24105         * typemanager.cs: Remove unused private member.  Also reported mcs
24106         bug to report this as a warning like csc.
24107
24108 2002-10-15  Martin Baulig  <martin@gnome.org>
24109
24110         * statement.cs (Statement.Emit): Made this a virtual method; emits
24111         the line number info and calls DoEmit().
24112         (Statement.DoEmit): New protected abstract method, formerly knows
24113         as Statement.Emit().
24114
24115         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24116
24117 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24118
24119         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24120         have fixed a remaining problem: not every AddXXXX was adding a
24121         fully qualified name.  
24122
24123         Now everyone registers a fully qualified name in the DeclSpace as
24124         being defined instead of the partial name.  
24125
24126         Downsides: we are slower than we need to be due to the excess
24127         copies and the names being registered this way.  
24128
24129         The reason for this is that we currently depend (on the corlib
24130         bootstrap for instance) that types are fully qualified, because
24131         we dump all the types in the namespace, and we should really have
24132         types inserted into the proper namespace, so we can only store the
24133         basenames in the defined_names array.
24134
24135 2002-10-10  Martin Baulig  <martin@gnome.org>
24136
24137         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24138         from bug #31834, see the bug report for a testcase which is
24139         miscompiled.
24140
24141 2002-10-10  Martin Baulig  <martin@gnome.org>
24142
24143         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24144         flow analysis code for this.
24145
24146         * statement.cs (Do, While, For): Tell the flow analysis code about
24147         infinite loops.
24148         (FlowBranching.UsageVector): Added support for infinite loops.
24149         (Block.Resolve): Moved the dead code elimination here and use flow
24150         analysis to do it.
24151
24152 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24153
24154         * class.cs (Field.Define): Catch cycles on struct type
24155         definitions. 
24156
24157         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24158         fields if the fields are static.  We only need to check instance
24159         fields. 
24160
24161         * expression.cs (As.DoResolve): Test for reference type.
24162
24163         * statement.cs (Using.ResolveExpression): Use
24164         ConvertImplicitRequired, not ConvertImplicit which reports an
24165         error on failture
24166         (Using.ResolveLocalVariableDecls): ditto.
24167
24168         * expression.cs (Binary.ResolveOperator): Report errors in a few
24169         places where we had to.
24170
24171         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24172
24173 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24174
24175         * expression.cs: Use StoreFromPtr instead of extracting the type
24176         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24177
24178         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24179         an enumeration value to a System.Enum, but System.Enum is not a
24180         value type, but an class type, so we need to box.
24181
24182         (Expression.ConvertExplicit): One codepath could return
24183         errors but not flag them.  Fix this.  Fixes #31853
24184
24185         * parameter.cs (Resolve): Do not allow void as a parameter type.
24186
24187 2002-10-06  Martin Baulig  <martin@gnome.org>
24188
24189         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24190         if it's a class type and not a struct.  Fixes #31815.
24191
24192 2002-10-06  Martin Baulig  <martin@gnome.org>
24193
24194         * statement.cs: Reworked the flow analysis code a bit to make it
24195         usable for dead code elimination.
24196
24197 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24198
24199         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24200
24201 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24202
24203         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24204         to fix the test 165, will investigate deeper.
24205
24206 2002-10-04  Martin Baulig  <martin@gnome.org>
24207
24208         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24209         finally blocks actually work.
24210         (Try.Resolve): We don't need to create a sibling for `finally' if
24211         there is no finally block.
24212
24213 2002-10-04  Martin Baulig  <martin@gnome.org>
24214
24215         * class.cs (Constructor.Define): The default accessibility for a
24216         non-default constructor is private, not public.
24217
24218 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24219
24220         * class.cs (Constructor): Make AllowedModifiers public, add
24221         EXTERN.
24222
24223         * cs-parser.jay: Perform the modifiers test here, as the
24224         constructor for the Constructor class usually receives a zero
24225         because of the way we create it (first we create, later we
24226         customize, and we were never checking the modifiers).
24227
24228         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24229         is a version of LookupTypeReflection that includes the type-name
24230         cache.  This can be used as a fast path for functions that know
24231         the fully qualified name and are only calling into *.GetType() to
24232         obtain a composed type.
24233
24234         This is also used by TypeManager.LookupType during its type
24235         composition.
24236
24237         (LookupType): We now also track the real type name, as sometimes
24238         we can get a quey for the real type name from things like
24239         ComposedCast.  This fixes bug 31422.
24240
24241         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24242         complete type fullname, it does not have to go through the type
24243         resolution system to obtain the composed version of the type (for
24244         obtaining arrays or pointers).
24245
24246         (Conditional.Emit): Use the EmitBoolExpression to
24247         generate nicer code, as requested by Paolo.
24248
24249         (ArrayCreation.CheckIndices): Use the patch from
24250         hwang_rob@yahoo.ca to validate the array initializers. 
24251
24252 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24253
24254         * class.cs (ConstructorInitializer.Emit): simplify code by using
24255         Invocation.EmitCall, and at the same time, fix the bugs in calling
24256         parent constructors that took variable arguments. 
24257
24258         * ecore.cs (Expression.ConvertNumericExplicit,
24259         Expression.ImplicitNumericConversion): Remove the code that
24260         manually wrapped decimal (InternalTypeConstructor call is now gone
24261         as well).
24262
24263         * expression.cs (Cast.TryReduce): Also handle decimal types when
24264         trying to perform a constant fold on the type.
24265
24266         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24267
24268         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24269         that only turned off an error report, and did nothing else. 
24270
24271 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24272
24273         * driver.cs: Handle and ignore /fullpaths
24274
24275 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24276
24277         * expression.cs (Binary.ResolveOperator): Catch the case where
24278         DoNumericPromotions returns true, 
24279
24280         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24281
24282 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24283
24284         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24285         report error 70.
24286
24287 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24288
24289         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24290         conversion exists, but it is also required that the conversion be
24291         performed.  This manifested in "(Type64Enum) 2".  
24292
24293         * class.cs (TypeManager.AddMethod): The fix is not to change
24294         AddEnum, because that one was using a fully qualified name (every
24295         DeclSpace derivative does), but to change the AddMethod routine
24296         that was using an un-namespaced name.  This now correctly reports
24297         the duplicated name.
24298
24299         Revert patch until I can properly fix it.  The issue
24300         is that we have a shared Type space across all namespaces
24301         currently, which is wrong.
24302
24303         Options include making the Namespace a DeclSpace, and merge
24304         current_namespace/current_container in the parser.
24305
24306 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24307
24308         * cs-parser.jay: Improve error reporting when we get a different
24309         kind of expression in local_variable_type and
24310         local_variable_pointer_type. 
24311
24312         Propagate this to avoid missleading errors being reported.
24313
24314         * ecore.cs (ImplicitReferenceConversion): treat
24315         TypeManager.value_type as a target just like object_type.   As
24316         code like this:
24317
24318         ValueType v = 1;
24319
24320         Is valid, and needs to result in the int 1 being boxed before it
24321         is assigned to the value type v.
24322
24323         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24324         to validate the enumeration name.
24325
24326         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24327         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24328         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24329
24330         * ecore.cs (TryImplicitIntConversion): When doing an
24331         implicit-enumeration-conversion, check if the type is 64-bits and
24332         perform a conversion before passing to EnumConstant.
24333
24334 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24335
24336         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24337         report ambiguous type references.  Unlike the MS version, we
24338         report what the ambiguity is.   Innovation at work ;-)
24339
24340         (DeclSpace.FindType): Require a location argument to
24341         display when we display an ambiguous error.
24342
24343         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24344
24345         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24346
24347         * expression.cs (EmitDynamicInitializers): Apply patch from
24348         hwang_rob@yahoo.ca that fixes the order in which we emit our
24349         initializers. 
24350
24351 2002-09-21  Martin Baulig  <martin@gnome.org>
24352
24353         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24354         delegate takes no arguments.
24355
24356 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24357
24358         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24359         from integers.
24360
24361         * expression.cs: Extract the underlying type.
24362
24363         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24364
24365         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24366
24367 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24368
24369         * class.cs (TypeContainer.DefineType): We can not use the nice
24370         PackingSize with the size set to 1 DefineType method, because it
24371         will not allow us to define the interfaces that the struct
24372         implements.
24373
24374         This completes the fixing of bug 27287
24375
24376         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24377         means also structs.  This fixes part of the problem. 
24378         (Expresion.ImplicitReferenceConversionExists): ditto.
24379
24380         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24381         error if there were no errors reported during the type lookup
24382         process, to avoid duplicates or redundant errors.  Without this
24383         you would get an ambiguous errors plus a type not found.  We have
24384         beaten the user enough with the first error.  
24385
24386         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24387         reference. 
24388
24389         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24390         during the resolution process, stop the lookup, this avoids
24391         repeated error reports (same error twice).
24392
24393         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24394
24395         * typemanager.cs (LookupType): Redo the type lookup code to match
24396         the needs of System.Reflection.  
24397
24398         The issue is that System.Reflection requires references to nested
24399         types to begin with a "+" sign instead of a dot.  So toplevel
24400         types look like: "NameSpace.TopLevelClass", and nested ones look
24401         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24402         levels. 
24403
24404 2002-09-19  Martin Baulig  <martin@gnome.org>
24405
24406         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24407         says that a method always returns or always throws an exception,
24408         don't report the CS0161.
24409
24410         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24411         set `Returns = new_returns'.
24412
24413 2002-09-19  Martin Baulig  <martin@gnome.org>
24414
24415         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24416         to an enum constant, check for a CS0176.
24417
24418 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24419
24420         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24421         for operators that must be in pairs and report errors.
24422
24423         * ecore.cs (SimpleName.DoResolveType): During the initial type
24424         resolution process, when we define types recursively, we must
24425         check first for types in our current scope before we perform
24426         lookups in the enclosing scopes.
24427
24428         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24429
24430         (Invocation.VerifyArgumentsCompat): Call
24431         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24432         I thought we were supposed to always call this, but there are a
24433         few places in the code where we dont do it.
24434
24435 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24436
24437         * driver.cs: Add support in -linkres and -resource to specify the
24438         name of the identifier.
24439
24440 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24441
24442         * ecore.cs (StandardConversionExists): Sync with the conversion
24443         code: allow anything-* to void* conversions.
24444
24445         (FindMostSpecificSource): Use an Expression argument
24446         instead of a Type, because we might be handed over a Literal which
24447         gets a few more implicit conversions that plain types do not.  So
24448         this information was being lost.
24449
24450         Also, we drop the temporary type-holder expression when not
24451         required.
24452
24453 2002-09-17  Martin Baulig  <martin@gnome.org>
24454
24455         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24456         this is an explicit interface implementation.
24457
24458 2002-09-17  Martin Baulig  <martin@gnome.org>
24459
24460         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24461         different `IndexerName' attributes.
24462
24463         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24464         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24465         virtual CommonResolve().
24466
24467 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24468
24469         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24470         and convert that to the UnderlyingType.
24471
24472         * statement.cs (Foreach.Resolve): Indexers are just like variables
24473         or PropertyAccesses.
24474
24475         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24476         inside quoted strings, we were not doing this before.
24477
24478 2002-09-16  Martin Baulig  <martin@gnome.org>
24479
24480         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24481         resolve it.  This is needed for the definite assignment check of the
24482         instance expression, fixes bug #29846.
24483         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24484
24485 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24486
24487         * parameter.cs: Fix compile error.  Cannot reference static member
24488         from an instance object.  Is this an mcs bug?
24489
24490 2002-09-14  Martin Baulig  <martin@gnome.org>
24491
24492         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24493         multiple times.  Fixes bug #30295, added test-166.cs.
24494
24495 2002-09-14  Martin Baulig  <martin@gnome.org>
24496
24497         * statement.cs (Block.Emit): Don't emit unreachable code.
24498         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24499         `break' statements.
24500         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24501
24502 2002-09-14  Martin Baulig  <martin@gnome.org>
24503
24504         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24505         is set.
24506
24507 2002-09-14  Martin Baulig  <martin@gnome.org>
24508
24509         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24510         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24511         be false on the ms runtime.
24512
24513 2002-09-13  Martin Baulig  <martin@gnome.org>
24514
24515         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24516         the CS0038 error message.
24517
24518 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24519
24520         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24521         constant inside, return it.
24522
24523 2002-09-12  Martin Baulig  <martin@gnome.org>
24524
24525         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24526         implicit conversion can be done between enum types.
24527
24528         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24529         check whether an implicit conversion to the current enum's UnderlyingType
24530         exists and report an error if not.
24531
24532         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24533         without debugging support.
24534
24535         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24536         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24537
24538 2002-09-12  Martin Baulig  <martin@gnome.org>
24539
24540         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24541
24542         * ecore.cs (IMemberExpr.DeclaringType): New property.
24543         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24544         nonstatic member of an outer type (CS0038).
24545
24546 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24547
24548         * driver.cs: Activate the using-error detector at warning level
24549         4 (at least for MS-compatible APIs).
24550
24551         * namespace.cs (VerifyUsing): Small buglett fix.
24552
24553         * pending.cs (PendingImplementation): pass the container pointer. 
24554
24555         * interface.cs (GetMethods): Allow for recursive definition.  Long
24556         term, I would like to move every type to support recursive
24557         definitions, not the current ordering mechanism that we have right
24558         now.
24559
24560         The situation is this: Attributes are handled before interfaces,
24561         so we can apply attributes to interfaces.  But some attributes
24562         implement interfaces, we will now handle the simple cases
24563         (recursive definitions will just get an error).  
24564
24565         * parameter.cs: Only invalidate types at the end if we fail to
24566         lookup all types.  
24567
24568 2002-09-09  Martin Baulig  <martin@gnome.org>
24569
24570         * ecore.cs (PropertyExpr.Emit): Also check for
24571         TypeManager.system_int_array_get_length so this'll also work when
24572         compiling corlib.  Fixes #30003.
24573
24574 2002-09-09  Martin Baulig  <martin@gnome.org>
24575
24576         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24577         and throw an exception if we can't get the type's size.  Fixed #30040,
24578         added test-165.cs.
24579
24580 2002-09-09  Martin Baulig  <martin@gnome.org>
24581
24582         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24583
24584         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24585         context.  Fixes bug #30027.
24586
24587         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24588         virtual functions.  Fixes bug #30043, added test-164.cs.
24589
24590 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24591
24592         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24593
24594 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24595
24596         * driver.cs: Use an object to get the windows codepage since it's not a
24597         static property.
24598
24599 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24600
24601         * statement.cs (For.Emit): for infinite loops (test == null)
24602         return whether there is a break inside, not always "true".
24603
24604         * namespace.cs (UsingEntry): New struct to hold the name of the
24605         using definition, the location where it is defined, and whether it
24606         has been used in a successful type lookup.
24607
24608         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24609         strings.
24610
24611         * decl.cs: ditto.
24612
24613 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24614
24615         * attribute.cs : Fix incorrect code which relied on catching
24616         a NullReferenceException to detect a null being passed in
24617         where an object was expected.
24618
24619 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24620
24621         * statement.cs (Try): flag the catch variable as assigned
24622
24623         * expression.cs (Cast): Simplified by using ResolveType instead of
24624         manually resolving.
24625
24626         * statement.cs (Catch): Fix bug by using ResolveType.
24627
24628 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24629
24630         * expression.cs (BetterConversion): Special case for when we have
24631         a NullLiteral as the argument and we have to choose between string
24632         and object types - we choose string the way csc does.
24633
24634         * attribute.cs (Attribute.Resolve): Catch the
24635         NullReferenceException and report error #182 since the Mono
24636         runtime no more has the bug and having this exception raised means
24637         we tried to select a constructor which takes an object and is
24638         passed a null.
24639
24640 2002-09-05  Ravi Pratap  <ravi@ximian.com>
24641
24642         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
24643         message (1502, 1503) when we can't locate a method after overload
24644         resolution. This is much more informative and closes the bug
24645         Miguel reported.
24646
24647         * interface.cs (PopulateMethod): Return if there are no argument
24648         types. Fixes a NullReferenceException bug.
24649
24650         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
24651         expressions too. Previously we were checking only in one place for
24652         positional arguments leaving out named arguments.
24653
24654         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
24655         type to the enum type is not allowed. Remove code corresponding to
24656         that.
24657
24658         (ConvertNumericExplicit): Allow explicit conversions from
24659         the underlying type to enum type. This precisely follows the spec
24660         and closes a bug filed by Gonzalo.
24661
24662 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24663
24664         * compiler.csproj:
24665         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
24666
24667 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
24668
24669         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
24670         it was important that we stored the right value after the
24671         reduction in `converted'.
24672
24673 2002-09-04  Martin Baulig  <martin@gnome.org>
24674
24675         * location.cs (Location.SymbolDocument): Use full pathnames for the
24676         source files.
24677
24678 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
24679
24680         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
24681         of the expression resolve mechanism, because that will catch the
24682         SimpleName error failures.
24683
24684         (Conditional): If we can not resolve the
24685         expression, return, do not crash.
24686
24687 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24688
24689         * cs-tokenizer.cs:
24690         (location): display token name instead of its number.
24691
24692 2002-08-28  Martin Baulig  <martin@gnome.org>
24693
24694         * expression.cs (Binary.ResolveOperator): Don't silently return
24695         but return an error if an operator cannot be applied between two
24696         enum types.
24697
24698 2002-08-28  Martin Baulig  <martin@gnome.org>
24699
24700         * class.cs (Constructor.Define): Set the permission attributes
24701         correctly instead of making all constructors public.
24702
24703 2002-08-28  Martin Baulig  <martin@gnome.org>
24704
24705         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
24706         for private members before reporting a CS0103; if we find anything,
24707         it's a CS0122.
24708
24709 2002-08-28  Martin Baulig  <martin@gnome.org>
24710
24711         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
24712         to check whether `closure_start_type == closure_invocation_type',
24713         we also need to check whether `m.DeclaringType == closure_invocation_type'
24714         before bypassing the permission checks.  We might be accessing
24715         protected/private members from the base class.
24716         (TypeManager.RealMemberLookup): Only set private_ok if private
24717         members were requested via BindingFlags.NonPublic.
24718
24719         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
24720
24721         * expression.cs (MemberAccess.ResolveMemberAccess): Set
24722         MethodGroupExpr.IsExplicitImpl if appropriate.
24723         (Invocation.DoResolve): Don't report the CS0120 for explicit
24724         interface implementations.
24725
24726 2002-08-27  Martin Baulig  <martin@gnome.org>
24727
24728         * expression.cs (Invocation.DoResolve): If this is a static
24729         method and we don't have an InstanceExpression, we must report
24730         a CS0120.
24731
24732 2002-08-25  Martin Baulig  <martin@gnome.org>
24733
24734         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
24735         `==' between a valuetype and an object.
24736
24737 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
24738
24739         * ecore.cs (TypeExpr): Provide a ToString method.
24740
24741 2002-08-24  Martin Baulig  <martin@gnome.org>
24742
24743         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
24744         now called proggie.dbg and it's a binary file.
24745
24746 2002-08-23  Martin Baulig  <martin@gnome.org>
24747
24748         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
24749
24750 2002-08-23  Martin Baulig  <martin@gnome.org>
24751
24752         * struct.cs (MyStructInfo.ctor): Make this work with empty
24753         structs; it's not allowed to use foreach() on null.
24754
24755 2002-08-23  Martin Baulig  <martin@gnome.org>
24756
24757         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
24758         writer the full pathname of the generated assembly.
24759
24760 2002-08-23  Martin Baulig  <martin@gnome.org>
24761
24762         * statements.cs (FlowBranching.UsageVector.MergeChildren):
24763         A `finally' block never returns or breaks; improved handling of
24764         unreachable code.
24765
24766 2002-08-23  Martin Baulig  <martin@gnome.org>
24767
24768         * statement.cs (Throw.Resolve): Allow `throw null'.
24769
24770 2002-08-23  Martin Baulig  <martin@gnome.org>
24771
24772         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
24773         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
24774         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
24775         MemberLookup would return a wrong event if this is an explicit
24776         interface implementation and the class has an event with the same
24777         name.
24778
24779 2002-08-23  Martin Baulig  <martin@gnome.org>
24780
24781         * statement.cs (Block.AddChildVariableNames): New public method.
24782         (Block.AddChildVariableName): Likewise.
24783         (Block.IsVariableNameUsedInChildBlock): Likewise.
24784         (Block.AddVariable): Check whether a variable name has already
24785         been used in a child block.
24786
24787         * cs-parser.jay (declare_local_variables): Mark all variable names
24788         from the current block as being used in a child block in the
24789         implicit block.
24790
24791 2002-08-23  Martin Baulig  <martin@gnome.org>
24792
24793         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
24794         find the symbol writer.
24795
24796         * driver.cs: csc also allows the arguments to /define being
24797         separated by commas, not only by semicolons.
24798
24799 2002-08-23  Martin Baulig  <martin@gnome.org>
24800
24801         * interface.cs (Interface.GetMembers): Added static check for events.
24802
24803 2002-08-15  Martin Baulig  <martin@gnome.org>
24804
24805         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
24806         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
24807
24808         * ecore.cs (Expression.MemberLookup): Added documentation and explained
24809         why the MethodData.EmitDestructor() change was necessary.
24810
24811 2002-08-20  Martin Baulig  <martin@gnome.org>
24812
24813         * class.cs (TypeContainer.FindMembers): Added static check for events.
24814
24815         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
24816
24817         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
24818         use Type.GetEvents(), not Type.FindMembers().
24819
24820 2002-08-20  Martin Baulig  <martin@gnome.org>
24821
24822         * decl.cs (MemberCache): Added a special method cache which will
24823         be used for method-only searched.  This ensures that a method
24824         search will return a MethodInfo with the correct ReflectedType for
24825         inherited methods.      
24826
24827 2002-08-20  Martin Baulig  <martin@gnome.org>
24828
24829         * decl.cs (DeclSpace.FindMembers): Made this public.
24830
24831 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24832
24833         * delegate.cs: fixed build on windows.
24834         [FIXME:  Filed as bug #29150: MCS must report these errors.]
24835
24836 2002-08-19  Ravi Pratap  <ravi@ximian.com>
24837
24838         * ecore.cs (StandardConversionExists): Return a false
24839         if we are trying to convert the void type to anything else
24840         since that is not allowed.
24841
24842         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
24843         we flag error 70 in the event an event is trying to be accessed
24844         directly from outside the declaring type.
24845
24846 2002-08-20  Martin Baulig  <martin@gnome.org>
24847
24848         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
24849         MemberCache from typemanager.cs to decl.cs.
24850
24851 2002-08-19  Martin Baulig  <martin@gnome.org>
24852
24853         * class.cs (TypeContainer): Implement IMemberContainer.
24854         (TypeContainer.DefineMembers): Create the MemberCache.
24855         (TypeContainer.FindMembers): Do better BindingFlags checking; only
24856         return public members if BindingFlags.Public was given, check
24857         whether members are static.
24858
24859 2002-08-16  Martin Baulig  <martin@gnome.org>
24860
24861         * decl.cs (DeclSpace.Define): Splitted this in Define and
24862         DefineMembers.  DefineMembers is called first and initializes the
24863         MemberCache.
24864
24865         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
24866         DefineMembers() on all our DeclSpaces.
24867
24868         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
24869         but call DefineMembers() on all nested interfaces.  We call their
24870         Define() in our new Define() function.
24871
24872         * interface.cs (Interface): Implement IMemberContainer.
24873         (Interface.Define): Moved all code except the attribute stuf to
24874         DefineMembers().
24875         (Interface.DefineMembers): Initialize the member cache.
24876
24877         * typemanager.cs (IMemberFinder): Removed this interface, we don't
24878         need this anymore since we can use MemberCache.FindMembers directly.
24879
24880 2002-08-19  Martin Baulig  <martin@gnome.org>
24881
24882         * typemanager.cs (MemberCache): When creating the cache for an
24883         interface type, add all inherited members.
24884         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
24885         to `out bool used_cache' and documented it.
24886         (TypeManager.MemberLookup): If we already used the cache in the first
24887         iteration, we don't need to do the interfaces check.
24888
24889 2002-08-19  Martin Baulig  <martin@gnome.org>
24890
24891         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
24892         here from IMemberFinder and don't implement this interface anymore.
24893         (DeclSpace.MemberCache): Moved here from IMemberFinder.
24894
24895         * typemanager.cs (IMemberFinder): This interface is now only used by
24896         classes which actually support the member cache.
24897         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
24898         since we only put DeclSpaces into this Hashtable.
24899         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
24900         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
24901
24902 2002-08-16  Martin Baulig  <martin@gnome.org>
24903
24904         * typemanager.cs (ICachingMemberFinder): Removed.
24905         (IMemberFinder.MemberCache): New property.
24906         (TypeManager.FindMembers): Merged this with RealFindMembers().
24907         This function will never be called from TypeManager.MemberLookup()
24908         so we can't use the cache here, just the IMemberFinder.
24909         (TypeManager.MemberLookup_FindMembers): Check whether the
24910         IMemberFinder has a MemberCache and call the cache's FindMembers
24911         function.
24912         (MemberCache): Rewrote larger parts of this yet another time and
24913         cleaned it up a bit.
24914
24915 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
24916
24917         * driver.cs (LoadArgs): Support quoting.
24918
24919         (Usage): Show the CSC-like command line arguments.
24920
24921         Improved a few error messages.
24922
24923 2002-08-15  Martin Baulig  <martin@gnome.org>
24924
24925         * typemanager.cs (IMemberContainer.Type): New property.
24926         (IMemberContainer.IsInterface): New property.
24927
24928         The following changes are conditional to BROKEN_RUNTIME, which is
24929         defined at the top of the file.
24930
24931         * typemanager.cs (MemberCache.MemberCache): Don't add the base
24932         class'es members, but add all members from TypeHandle.ObjectType
24933         if we're an interface.
24934         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
24935         is the current type.
24936         (MemberCache.CacheEntry.Container): Removed this field.
24937         (TypeHandle.GetMembers): Include inherited members.
24938
24939 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24940
24941         * typemanager.cs: fixed compilation and added a comment on a field that
24942         is never used.
24943
24944 2002-08-15  Martin Baulig  <martin@gnome.org>
24945
24946         * class.cs (ConstructorInitializer.Resolve): In the
24947         Expression.MemberLookup call, use the queried_type as
24948         invocation_type.
24949
24950         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
24951         declared' attribute, it's always true.
24952         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
24953         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
24954         temporary wrapper for FindMembers which tells MemberLookup whether
24955         members from the base classes are included in the return value.
24956         This will go away soon.
24957         (TypeManager.MemberLookup): Use this temporary hack here; once the
24958         new MemberCache is completed, we don't need to do the DeclaredOnly
24959         looping here anymore since the MemberCache will take care of this.
24960         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
24961         (MemberCache): When creating the MemberCache for a class, get
24962         members from the current class and all its base classes.
24963         (MemberCache.CacheEntry.Container): New field.  This is a
24964         temporary hack until the Mono runtime is fixed to distinguish
24965         between ReflectedType and DeclaringType.  It allows us to use MCS
24966         with both the MS runtime and the unfixed Mono runtime without
24967         problems and without accecting performance.
24968         (MemberCache.SearchMembers): The DeclaredOnly looping from
24969         TypeManager.MemberLookup is now done here.      
24970
24971 2002-08-14  Martin Baulig  <martin@gnome.org>
24972
24973         * statement.cs (MyStructInfo.MyStructInfo): Don't call
24974         Type.GetFields on dynamic types but get the fields from the
24975         corresponding TypeContainer.
24976         (MyStructInfo.GetStructInfo): Added check for enum types.
24977
24978         * typemanager.cs (MemberList.IsSynchronized): Implemented.
24979         (MemberList.SyncRoot): Implemented.
24980         (TypeManager.FilterWithClosure): No need to check permissions if
24981         closure_start_type == closure_invocation_type, don't crash if
24982         closure_invocation_type is null.
24983
24984 2002-08-13  Martin Baulig  <martin@gnome.org>
24985
24986         Rewrote TypeContainer.FindMembers to use a member cache.  This
24987         gives us a speed increase of about 35% for the self-hosting MCS
24988         build and of about 15-20% for the class libs (both on GNU/Linux).
24989
24990         * report.cs (Timer): New class to get enhanced profiling.  This
24991         whole class is "TIMER" conditional since it remarkably slows down
24992         compilation speed.
24993
24994         * class.cs (MemberList): New class.  This is an IList wrapper
24995         which we're now using instead of passing MemberInfo[]'s around to
24996         avoid copying this array unnecessarily.
24997         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
24998         (ICachingMemberFinder, IMemberContainer): New interface.
24999         (TypeManager.FilterWithClosure): If `criteria' is null, the name
25000         has already been checked, otherwise use it for the name comparision.
25001         (TypeManager.FindMembers): Renamed to RealMemberFinder and
25002         provided wrapper which tries to use ICachingMemberFinder.FindMembers
25003         if possible.  Returns a MemberList, not a MemberInfo [].
25004         (TypeHandle): New class, implements IMemberContainer.  We create
25005         one instance of this class per type, it contains a MemberCache
25006         which is used to do the member lookups.
25007         (MemberCache): New class.  Each instance of this class contains
25008         all members of a type and a name-based hash table.
25009         (MemberCache.FindMembers): This is our new member lookup
25010         function.  First, it looks up all members of the requested name in
25011         the hash table.  Then, it walks this list and sorts out all
25012         applicable members and returns them.
25013
25014 2002-08-13  Martin Baulig  <martin@gnome.org>
25015
25016         In addition to a nice code cleanup, this gives us a performance
25017         increase of about 1.4% on GNU/Linux - not much, but it's already
25018         half a second for the self-hosting MCS compilation.
25019
25020         * typemanager.cs (IMemberFinder): New interface.  It is used by
25021         TypeManager.FindMembers to call FindMembers on a TypeContainer,
25022         Enum, Delegate or Interface.
25023         (TypeManager.finder_to_member_finder): New PtrHashtable.
25024         (TypeManager.finder_to_container): Removed.
25025         (TypeManager.finder_to_delegate): Removed.
25026         (TypeManager.finder_to_interface): Removed.
25027         (TypeManager.finder_to_enum): Removed.
25028
25029         * interface.cs (Interface): Implement IMemberFinder.
25030
25031         * delegate.cs (Delegate): Implement IMemberFinder.
25032
25033         * enum.cs (Enum): Implement IMemberFinder.
25034
25035         * class.cs (TypeContainer): Implement IMemberFinder.
25036
25037 2002-08-12  Martin Baulig  <martin@gnome.org>
25038
25039         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
25040
25041 2002-08-12  Martin Baulig  <martin@gnome.org>
25042
25043         * ecore.cs (ITypeExpression): New interface for expressions which
25044         resolve to a type.
25045         (TypeExpression): Renamed to TypeLookupExpression.
25046         (Expression.DoResolve): If we're doing a types-only lookup, the
25047         expression must implement the ITypeExpression interface and we
25048         call DoResolveType() on it.
25049         (SimpleName): Implement the new ITypeExpression interface.
25050         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25051         hack, the situation that we're only looking up types can't happen
25052         anymore when this method is called.  Moved the type lookup code to
25053         DoResolveType() and call it.
25054         (SimpleName.DoResolveType): This ITypeExpression interface method
25055         is now doing the types-only lookup.
25056         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25057         (ResolveFlags): Added MaskExprClass.
25058
25059         * expression.cs (MemberAccess): Implement the ITypeExpression
25060         interface.
25061         (MemberAccess.DoResolve): Added support for a types-only lookup
25062         when we're called via ITypeExpression.DoResolveType().
25063         (ComposedCast): Implement the ITypeExpression interface.
25064
25065         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25066         Expression.Resolve() with ResolveFlags.Type instead.
25067
25068 2002-08-12  Martin Baulig  <martin@gnome.org>
25069
25070         * interface.cs (Interface.Define): Apply attributes.
25071
25072         * attribute.cs (Attribute.ApplyAttributes): Added support for
25073         interface attributes.
25074
25075 2002-08-11  Martin Baulig  <martin@gnome.org>
25076
25077         * statement.cs (Block.Emit): Only check the "this" variable if we
25078         do not always throw an exception.
25079
25080         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25081         whether the property has a set accessor.
25082
25083 2002-08-11  Martin Baulig  <martin@gnome.org>
25084
25085         Added control flow analysis support for structs.
25086
25087         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25088         with control flow analysis turned off.
25089         (IVariable): New interface.
25090         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25091         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25092         (FieldExpr.DoResolve): Resolve the instance expression with flow
25093         analysis turned off and do the definite assignment check after the
25094         resolving when we know what the expression will resolve to.
25095
25096         * expression.cs (LocalVariableReference, ParameterReference):
25097         Implement the new IVariable interface, only call the flow analysis
25098         code if ec.DoFlowAnalysis is true.
25099         (This): Added constructor which takes a Block argument.  Implement
25100         the new IVariable interface.
25101         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25102         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25103         This does the definite assignment checks for struct members.
25104
25105         * class.cs (Constructor.Emit): If this is a non-static `struct'
25106         constructor which doesn't have any initializer, call
25107         Block.AddThisVariable() to tell the flow analysis code that all
25108         struct elements must be initialized before control returns from
25109         the constructor.
25110
25111         * statement.cs (MyStructInfo): New public class.
25112         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25113         argument to this indexer.  If non-zero, check an individual struct
25114         member, not the whole struct.
25115         (FlowBranching.CheckOutParameters): Check struct members.
25116         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25117         overloaded versions of these methods which take an additional
25118         `int field_idx' argument to check struct members.
25119         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25120         overloaded versions of these methods which take an additional
25121         `string field_name' argument to check struct member.s
25122         (VariableInfo): Implement the IVariable interface.
25123         (VariableInfo.StructInfo): New public property.  Returns the
25124         MyStructInfo instance of the variable if it's a struct or null.
25125         (Block.AddThisVariable): New public method.  This is called from
25126         Constructor.Emit() for non-static `struct' constructor which do
25127         not have any initializer.  It creates a special variable for the
25128         "this" instance variable which will be checked by the flow
25129         analysis code to ensure that all of the struct's fields are
25130         initialized before control returns from the constructor.
25131         (UsageVector): Added support for struct members.  If a
25132         variable/parameter is a struct with N members, we reserve a slot
25133         in the usage vector for each member.  A struct is considered fully
25134         initialized if either the struct itself (slot 0) or all its
25135         members are initialized.
25136
25137 2002-08-08  Martin Baulig  <martin@gnome.org>
25138
25139         * driver.cs (Driver.MainDriver): Only report an error CS5001
25140         if there were no compilation errors.
25141
25142         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25143         `UnsafeContext' property to determine whether the parent is in
25144         unsafe context rather than checking the parent's ModFlags:
25145         classes nested in an unsafe class are unsafe as well.
25146
25147 2002-08-08  Martin Baulig  <martin@gnome.org>
25148
25149         * statement.cs (UsageVector.MergeChildren): Distinguish between
25150         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25151         we return.  Added test17() and test18() to test-154.cs.
25152
25153 2002-08-08  Martin Baulig  <martin@gnome.org>
25154
25155         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25156         Family access, make sure the invoking type isn't a subclass of the
25157         queried type (that'd be a CS1540).
25158
25159         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25160         this method which takes an additional `Type invocation_type'.
25161
25162         * expression.cs (BaseAccess.DoResolve): Use the base type as
25163         invocation and query type.
25164         (MemberAccess.DoResolve): If the lookup failed and we're about to
25165         report a CS0122, try a lookup with the ec.ContainerType - if this
25166         succeeds, we must report a CS1540.
25167
25168 2002-08-08  Martin Baulig  <martin@gnome.org>
25169
25170         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25171         (MethodGroupExpr): Implement the IMemberExpr interface.
25172
25173         * expression (MemberAccess.ResolveMemberAccess): No need to have
25174         any special code for MethodGroupExprs anymore, they're now
25175         IMemberExprs.   
25176
25177 2002-08-08  Martin Baulig  <martin@gnome.org>
25178
25179         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25180         Family, FamANDAssem and FamORAssem permissions.
25181         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25182
25183 2002-08-08  Martin Baulig  <martin@gnome.org>
25184
25185         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25186         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25187         or loop block.
25188
25189 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25190
25191         * driver.cs: implemented /resource option to embed managed resources.
25192
25193 2002-08-07  Martin Baulig  <martin@gnome.org>
25194
25195         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25196         (FieldBase.HasFieldInitializer): New public property.
25197         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25198         returns the field initializer and makes sure it is only resolved once.
25199         (TypeContainer.EmitFieldInitializers): Call
25200         FieldBase.GetInitializerExpression to get the initializer, this ensures
25201         that it isn't resolved multiple times.
25202
25203         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25204         the resolving process (SimpleName/MemberLookup) that we're currently
25205         emitting a field initializer (which must not access any instance members,
25206         this is an error CS0236).
25207
25208         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25209         argument, if the `IsFieldInitializer' flag is set, we must report and
25210         error CS0236 and not an error CS0120.   
25211
25212 2002-08-07  Martin Baulig  <martin@gnome.org>
25213
25214         * ecore.cs (IMemberExpr): New public interface.
25215         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25216         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25217         if the expression is an IMemberExpr.
25218
25219         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25220         to be null, implicitly default to `this' if we're non-static in
25221         this case.  Simplified the code a lot by using the new IMemberExpr
25222         interface.  Also fixed bug #28176 here.
25223
25224 2002-08-06  Martin Baulig  <martin@gnome.org>
25225
25226         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25227         ParameterReferences during semantic analysis so that we can do a
25228         type-only search when resolving Cast, TypeOf and SizeOf.
25229         (block): Pass the `current_local_parameters' to the Block's
25230         constructor.
25231
25232         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25233         argument to the constructor.
25234         (ConstructorInitializer.Resolve): Create a temporary implicit
25235         block with the parameters.
25236
25237         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25238         references here if we aren't doing a type-only search.
25239
25240         * statement.cs (Block): Added constructor which takes a
25241         `Parameters parameters' argument.
25242         (Block.Parameters): New public property.
25243
25244         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25245         to `Parameters' and made it public readonly.
25246
25247 2002-08-06  Martin Baulig  <martin@gnome.org>
25248
25249         * ecore.cs (Expression.Warning): Made this public as well.
25250
25251         * report.cs (Report.Debug): Print the contents of collections.
25252
25253 2002-08-06  Martin Baulig  <martin@gnome.org>
25254
25255         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25256         used to tell Resolve() which kinds of expressions it may return.
25257         (Expression.Resolve): Added overloaded version of this method which
25258         takes a `ResolveFlags flags' argument.  This can be used to tell
25259         Resolve() which kinds of expressions it may return.  Reports a
25260         CS0118 on error.
25261         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25262         ResolveFlags.SimpleName.
25263         (Expression.Error118): Added overloaded version of this method which
25264         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25265         which kinds of expressions are allowed.
25266
25267         * expression.cs (Argument.ResolveMethodGroup): New public method.
25268         Resolves an argument, but allows a MethodGroup to be returned.
25269         This is used when invoking a delegate.
25270
25271         * TODO: Updated a bit.
25272
25273 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25274
25275         Fixed compilation with csc.
25276
25277         * ecore.cs: Expression.Error made public. Is this correct? Should
25278         Warning be made public too?
25279
25280         * expression.cs: use ea.Location instead of ea.loc.
25281         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25282
25283 2002-08-06  Martin Baulig  <martin@gnome.org>
25284
25285         * ecore.cs (Expression.loc): Moved the location here instead of
25286         duplicating it in all derived classes.
25287         (Expression.Location): New public property.
25288         (Expression.Error, Expression.Warning): Made them non-static and
25289         removed the location argument.
25290         (Expression.Warning): Added overloaded version which takes an
25291         `int level' argument.
25292         (Expression.Error118): Make this non-static and removed the
25293         expression and location arguments.
25294         (TypeExpr): Added location argument to the constructor.
25295
25296         * expression.cs (StaticCallExpr): Added location argument to
25297         the constructor.
25298         (Indirection, PointerArithmetic): Likewise.
25299         (CheckedExpr, UnCheckedExpr): Likewise.
25300         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25301         (StringPtr): Likewise.
25302
25303
25304 2002-08-05  Martin Baulig  <martin@gnome.org>
25305
25306         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25307
25308         * assign.cs (Assign.DoResolve): Check whether the source
25309         expression is a value or variable.
25310
25311         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25312         while resolving the corresponding blocks.
25313
25314         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25315         an error, don't silently return null.
25316
25317         * statement.cs (Block.AddVariable): Do the error reporting here
25318         and distinguish between CS0128 and CS0136.
25319         (Block.DoResolve): Report all unused labels (warning CS0164).
25320         (LabeledStatement): Pass the location to the constructor.
25321         (LabeledStatement.HasBeenReferenced): New property.
25322         (LabeledStatement.Resolve): Set it to true here.
25323
25324         * statement.cs (Return.Emit): Return success even after reporting
25325         a type mismatch error (CS0126 or CS0127), this is what csc does and
25326         it avoids confusing the users with any consecutive errors.
25327
25328 2002-08-05  Martin Baulig  <martin@gnome.org>
25329
25330         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25331
25332         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25333
25334         * expression.cs (MemberAccess.DoResolve): Silently return if an
25335         error has already been reported.
25336
25337         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25338         error has already been reported.
25339
25340 2002-08-05  Martin Baulig  <martin@gnome.org>
25341
25342         * statement.cs (UsageVector): Only initialize the `parameters'
25343         vector if we actually have any "out" parameters.
25344
25345 2002-08-05  Martin Baulig  <martin@gnome.org>
25346
25347         * expression.cs (Binary.ResolveOperator): When combining delegates,
25348         they must have the same type.
25349
25350 2002-08-05  Martin Baulig  <martin@gnome.org>
25351
25352         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25353         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25354         work with the ms runtime and we also don't need it: if we're a
25355         PropertyBuilder and not in the `indexer_arguments' hash, then we
25356         are a property and not an indexer.
25357
25358         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25359         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25360         since the latter one doesn't work with the ms runtime.
25361
25362 2002-08-03  Martin Baulig  <martin@gnome.org>
25363
25364         Fixed bugs #27998 and #22735.
25365
25366         * class.cs (Method.IsOperator): New public field.
25367         (Method.CheckBase): Report CS0111 if there's already a method
25368         with the same parameters in the current class.  Report CS0508 when
25369         attempting to change the return type of an inherited method.
25370         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25371         and it's not marked abstract or extern.
25372         (PropertyBase): New abstract base class for Property and Indexer.
25373         (PropertyBase.CheckBase): Moved here from Property and made it work
25374         for indexers.
25375         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25376         the same so we can reuse it there.
25377         (Property, Indexer): Derive from PropertyBase.
25378         (MethodSignature.inheritable_property_signature_filter): New delegate
25379         to find properties and indexers.
25380
25381         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25382         argument and improved error reporting.
25383
25384         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25385         EmptyReadOnlyParameters and made it a property.
25386
25387         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25388         version of this method which takes a `PropertyInfo indexer'.
25389         (TypeManager.RegisterIndexer): New method.
25390
25391         * class.cs: Added myself as author of this file :-)
25392
25393 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25394
25395         * class.cs: fixed compilation on windoze.
25396
25397 2002-08-03  Martin Baulig  <martin@gnome.org>
25398
25399         * interface.cs (Interface.GetInterfaceBases): Check whether all
25400         base interfaces are at least as accessible than the current one.
25401
25402         * class.cs (TypeContainer.GetClassBases): Check whether base types
25403         are at least as accessible than the current type.
25404         (TypeContainer.AsAccessible): Implemented and made non-static.
25405         (MemberBase.CheckParameters): Report errors if the accessibility
25406         checks fail.
25407
25408         * delegate.cs (Delegate.Delegate): The default visibility is
25409         internal for top-level types and private for nested types.
25410         (Delegate.Define): Report errors if the accessibility checks fail.
25411
25412         * enum.cs (Enum.Enum): The default visibility is internal for
25413         top-level types and private for nested types.
25414         (Enum.DefineType): Compute the correct visibility.
25415
25416         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25417         function which takes a `bool is_toplevel' instead of a TypeContainer.
25418
25419         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25420         builtin type.
25421
25422 2002-08-02  Martin Baulig  <martin@gnome.org>
25423
25424         * expression.cs (LocalVariableReferenc): Added constructor which
25425         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25426         (LocalVariableReference.IsReadOnly): New property.
25427         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25428         variable is readonly, use our own readonly flag to do this; you can
25429         use the new constructor to get a writable reference to a read-only
25430         variable.
25431
25432         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25433         reference to the local variable.
25434
25435 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25436
25437         * rootcontext.cs (ResolveCore): Also include System.Exception
25438
25439         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25440         we reach an EmptyStatement.
25441
25442         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25443         is also fine.
25444
25445         * expression.cs (Binary.ResolveOperator): Check error result in
25446         two places.
25447
25448         use brtrue/brfalse directly and avoid compares to null.
25449
25450 2002-08-02  Martin Baulig  <martin@gnome.org>
25451
25452         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25453         Fixes bug #28407, added test-155.cs.
25454
25455 2002-08-01  Martin Baulig  <martin@gnome.org>
25456
25457         * class.cs (Event.EmitDefaultMethod): Make this work with static
25458         events.  Fixes #28311, added verify-3.cs.
25459
25460 2002-08-01  Martin Baulig  <martin@gnome.org>
25461
25462         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25463         `is_disposable' fields.
25464         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25465         `hm.is_disposable' if we're using the collection pattern.
25466         (Foreach.EmitCollectionForeach): Use the correct type for the
25467         enumerator's local variable, only emit the try/finally block if
25468         necessary (fixes #27713).
25469
25470 2002-08-01  Martin Baulig  <martin@gnome.org>
25471
25472         * ecore.cs (Expression.report118): Renamed to Error118 and made
25473         it public static.
25474
25475         * statement.cs (Throw.Resolve): Check whether the expression is of
25476         the correct type (CS0118) and whether the type derives from
25477         System.Exception (CS0155).
25478         (Catch.Resolve): New method.  Do the type lookup here and check
25479         whether it derives from System.Exception (CS0155).
25480         (Catch.CatchType, Catch.IsGeneral): New public properties.
25481
25482         * typemanager.cs (TypeManager.exception_type): Added.
25483
25484 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25485
25486         * driver.cs: Updated About function.
25487
25488 2002-07-31  Martin Baulig  <martin@gnome.org>
25489
25490         Implemented Control Flow Analysis.
25491
25492         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25493         (EmitContext.CurrentBranching): Added.
25494         (EmitContext.StartFlowBranching): Added.
25495         (EmitContext.EndFlowBranching): Added.
25496         (EmitContext.KillFlowBranching): Added.
25497         (EmitContext.IsVariableAssigned): Added.
25498         (EmitContext.SetVariableAssigned): Added.
25499         (EmitContext.IsParameterAssigned): Added.
25500         (EmitContext.SetParameterAssigned): Added.
25501         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25502         Added control flow analysis stuff here.
25503
25504         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25505         resolve the expression as lvalue.
25506         (LocalVariableReference.DoResolve): Check whether the variable has
25507         already been assigned.
25508         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25509         the parameter as assigned here.
25510         (ParameterReference.DoResolve): Check whether the parameter has already
25511         been assigned.
25512         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25513         expression as lvalue.
25514
25515         * statement.cs (FlowBranching): New class for the flow analysis code.
25516         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25517         (LabeledStatement.IsDefined): New public property.
25518         (LabeledStatement.AddUsageVector): New public method to tell flow
25519         analyis that the label may be reached via a forward jump.
25520         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25521         flow analysis.
25522         (VariableInfo.Number): New public field.  This is used by flow analysis
25523         to number all locals of a block.
25524         (Block.CountVariables): New public property.  This is the number of
25525         local variables in this block (including the locals from all parent
25526         blocks).
25527         (Block.EmitMeta): Number all the variables.
25528
25529         * statement.cs: Added flow analysis support to all classes.
25530
25531 2002-07-31  Martin Baulig  <martin@gnome.org>
25532
25533         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25534         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25535         then use this argument.
25536
25537         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25538
25539         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25540         use this to specify /define options.
25541
25542 2002-07-29  Martin Baulig  <martin@gnome.org>
25543
25544         * statement.cs (Fixed): Moved all code that does variable lookups
25545         and resolvings from Emit to Resolve.
25546
25547         * statement.cs (For): Moved all code that does variable lookups
25548         and resolvings from Emit to Resolve.
25549
25550         * statement.cs (Using): Moved all code that does variable lookups
25551         and resolvings from Emit to Resolve.
25552
25553 2002-07-29  Martin Baulig  <martin@gnome.org>
25554
25555         * attribute.cs (Attribute.Resolve): Explicitly catch a
25556         System.NullReferenceException when creating the
25557         CustromAttributeBuilder and report a different warning message.
25558
25559 2002-07-29  Martin Baulig  <martin@gnome.org>
25560
25561         * support.cs (ParameterData.ParameterName): Added method to
25562         get the name of a parameter.
25563
25564         * typemanager.cs (TypeManager.IsValueType): New public method.
25565
25566 2002-07-29  Martin Baulig  <martin@gnome.org>
25567
25568         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25569         is a flag which specifies that it's either ref or out.
25570         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25571         the out parameter to `out Parameter.Modifier mod', also set the
25572         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25573
25574         * support.cs (InternalParameters.ParameterModifier): Distinguish
25575         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25576         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25577
25578         * expression.cs (Argument.GetParameterModifier): Distinguish
25579         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25580         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25581
25582 2002-07-29  Martin Baulig  <martin@gnome.org>
25583
25584         * expression.cs (ParameterReference.ParameterReference): Added
25585         `Location loc' argument to the constructor.
25586
25587         * cs-parser.jay: Pass location to ParameterReference.
25588
25589 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25590
25591         * statement.cs (Try): Initialize the location.
25592
25593         * cs-parser.jay: pass location to Try.
25594
25595         * expression.cs (Unary.Reduce): Change the prototype to return
25596         whether a constant fold could be performed or not.  The result is
25597         returned in an out parameters.  In the case of Indirection and
25598         AddressOf, we want to perform the full tests.
25599
25600 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25601
25602         * statement.cs (Statement.Emit): Flag dead code.
25603
25604 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25605
25606         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25607
25608 2002-07-27  Martin Baulig  <martin@gnome.org>
25609
25610         * class.cs (MethodData.Define): Put back call to
25611         TypeManager.AddMethod(), accidentally commented this out.
25612
25613         * report.cs (Debug): New public method to print debugging information,
25614         this is `[Conditional ("DEBUG")]'.
25615
25616 2002-07-26  Martin Baulig  <martin@gnome.org>
25617
25618         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25619         (switch_statement): Push the current_block to the switch_stack and
25620         pop it again when we're done with the switch.
25621         (switch_section): The new block is a child of the current_block.
25622         Fixes bug #24007, added test-152.cs.
25623
25624 2002-07-27  Martin Baulig  <martin@gnome.org>
25625
25626         * expression.cs (Invocation.EmitArguments): When calling a varargs
25627         function with only its fixed arguments, we need to pass an empty
25628         array.
25629
25630 2002-07-27  Martin Baulig  <martin@gnome.org>
25631
25632         Mono 0.13 has been released.
25633
25634 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25635
25636         * driver.cs: Rename --resource to --linkres, because that is what
25637         we do currently, we dont support --resource yet.
25638
25639         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
25640
25641 2002-07-25  Martin Baulig  <martin@gnome.org>
25642
25643         * class.cs (MethodData): New public class.  This is a `method builder'
25644         class for a method or one accessor of a Property/Indexer/Event.
25645         (MethodData.GetMethodFlags): Moved here from MemberBase.
25646         (MethodData.ApplyAttributes): Likewise.
25647         (MethodData.ApplyObsoleteAttribute): Likewise.
25648         (MethodData.ApplyConditionalAttribute): Likewise.
25649         (MethodData.ApplyDllImportAttribute): Likewise.
25650         (MethodData.CheckAbstractAndExternal): Likewise.
25651         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
25652         (MethodData.Emit): Formerly known as Method.Emit().
25653         (MemberBase): Moved everything which was specific to a single
25654         accessor/method to MethodData.
25655         (Method): Create a new MethodData and call Define() and Emit() on it.
25656         (Property, Indexer, Event): Create a new MethodData objects for each
25657         accessor and call Define() and Emit() on them.
25658
25659 2002-07-25  Martin Baulig  <martin@gnome.org>
25660
25661         Made MethodCore derive from MemberBase to reuse the code from there.
25662         MemberBase now also checks for attributes.
25663
25664         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
25665         (MemberBase.GetMethodFlags): Moved here from class Method and marked
25666         as virtual.
25667         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
25668         `CallingConventions cc' and `Attributes opt_attrs' arguments.
25669         (MemberBase.ApplyAttributes): New virtual method; applies the
25670         attributes to a method or accessor.
25671         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
25672         (MemberBase.ApplyConditionalAttribute): Likewise.
25673         (MemberBase.ApplyDllImportAttribute): Likewise.
25674         (MemberBase.CheckAbstractAndExternal): Likewise.
25675         (MethodCore.ParameterTypes): This is now a property instead of a
25676         method, it's initialized from DoDefineParameters().
25677         (MethodCore.ParameterInfo): Removed the set accessor.
25678         (MethodCore.DoDefineParameters): New protected virtual method to
25679         initialize ParameterTypes and ParameterInfo.
25680         (Method.GetReturnType): We can now simply return the MemberType.
25681         (Method.GetMethodFlags): Override the MemberBase version and add
25682         the conditional flags.
25683         (Method.CheckBase): Moved some code from Define() here, call
25684         DoDefineParameters() here.
25685         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
25686         here to avoid some larger code duplication.
25687         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
25688         ensure that abstract and external accessors don't declare a body.
25689
25690         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
25691         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
25692         lookup in the attribute's parent classes, so we need to abort as soon
25693         as we found the first match.
25694         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
25695         the attribute has no arguments.
25696
25697         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
25698         of a Method.
25699
25700 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25701
25702         * cs-parser.jay: reverted previous patch.
25703
25704 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25705
25706         * cs-parser.jay: fixed bug #22119.
25707
25708 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25709
25710         * attribute.cs: fixed compilation. The error was:
25711         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
25712         be assigned to before control leaves the current method."
25713         [FIXME:  Filed as bug #28186: MCS must report this error.]
25714
25715 2002-07-25  Martin Baulig  <martin@gnome.org>
25716
25717         * attribute.cs (Attribute.Conditional_GetConditionName): New static
25718         method to pull the condition name ouf of a Conditional attribute.
25719         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
25720         the obsolete message and error flag out of an Obsolete attribute.
25721
25722         * class.cs (Method.GetMethodFlags): New public method to get the
25723         TypeManager.MethodFlags for this method.
25724         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
25725         private methods.
25726         (Method.Define): Get and apply the Obsolete and Conditional attributes;
25727         if we're overriding a virtual function, set the new private variable
25728         `parent_method'; call the new TypeManager.AddMethod().
25729
25730         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
25731         the MethodBuilder and the Method in a PtrHashtable.
25732         (TypeManager.builder_to_method): Added for this purpose.
25733         (TypeManager.MethodFlags): Added IsObsoleteError.
25734         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
25735         Obsolete and Conditional arguments in MethodBuilders.  If we discover
25736         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
25737         the message from the attribute.
25738
25739 2002-07-24  Martin Baulig  <martin@gnome.org>
25740
25741         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
25742         preprocessor directives, ensure that the argument to #define/#undef is
25743         exactly one identifier and that it's actually an identifier.
25744
25745         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
25746         did not work ....
25747
25748 2002-07-24  Martin Baulig  <martin@gnome.org>
25749
25750         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
25751         initialize it to TypeManager.object_type in the constructor.
25752         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
25753         of the `hm.get_current' method if we're using the collection pattern.
25754         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
25755         for the explicit conversion to make it work when we're using the collection
25756         pattern and the `Current' property has a different return type than `object'.
25757         Fixes #27713.
25758
25759 2002-07-24  Martin Baulig  <martin@gnome.org>
25760
25761         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
25762         does not match, but don't report any errors.  This method is called in
25763         order for all methods in a MethodGroupExpr until a matching method is
25764         found, so we don't want to bail out if the first method doesn't match.
25765         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
25766         matches, report the 123.  Fixes #28070.
25767
25768 2002-07-24  Martin Baulig  <martin@gnome.org>
25769
25770         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
25771         TypeManager.TypeToCoreType() to the top of the method so the
25772         following equality checks will work.  Fixes #28107.
25773
25774 2002-07-24  Martin Baulig  <martin@gnome.org>
25775
25776         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
25777         operand is of type uint, and the other operand is of type sbyte,
25778         short or int, the operands are converted to type long." -
25779         Actually do what this comment already told us.  Fixes bug #28106,
25780         added test-150.cs.
25781
25782 2002-07-24  Martin Baulig  <martin@gnome.org>
25783
25784         * class.cs (MethodBase): New abstract class.  This is now a base
25785         class for Property, Indexer and Event to avoid some code duplication
25786         in their Define() and DefineMethods() methods.
25787         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
25788         generic methods for Define() and DefineMethods().
25789         (FieldBase): Derive from MemberBase, not MemberCore.
25790         (Property): Derive from MemberBase, not MemberCore.
25791         (Property.DefineMethod): Moved all the code from this method to the
25792         new MethodBase.DefineAccessor(), just call it with appropriate
25793         argumetnts.
25794         (Property.Define): Call the new Property.DoDefine(), this does some
25795         sanity checks and we don't need to duplicate the code everywhere.
25796         (Event): Derive from MemberBase, not MemberCore.
25797         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
25798         accessors, this will also make them work with interface events.
25799         (Indexer): Derive from MemberBase, not MemberCore.
25800         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
25801         (Indexer.Define): Use the new MethodBase functions.
25802
25803         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
25804         argument to the constructor.
25805         (Interface.FindMembers): Added support for interface events.
25806         (Interface.PopluateEvent): Implemented.
25807
25808         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
25809
25810 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
25811
25812         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
25813         but this is required to check for a method name being the same as
25814         the containing class.  
25815
25816         Handle this now.
25817
25818 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25819
25820         * interface.cs: initialize variable.
25821
25822 2002-07-23  Martin Baulig  <martin@gnome.org>
25823
25824         Implemented the IndexerName attribute in interfaces.
25825
25826         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
25827         name if this is an explicit interface implementation.
25828         (Indexer.InterfaceIndexerName): New public variable.  If we're
25829         implementing an interface indexer, this is the IndexerName in that
25830         interface.  Otherwise, it's the IndexerName.
25831         (Indexer.DefineMethod): If we're implementing interface indexer,
25832         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
25833         and Pending.ImplementIndexer methods.
25834         (Indexer.Define): Also define the PropertyBuilder if we're
25835         implementing an interface indexer and this is neither an explicit
25836         interface implementation nor do the IndexerName match the one in
25837         the interface.
25838
25839         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
25840         If a method is defined here, then we always need to create a proxy
25841         for it.  This is used when implementing interface indexers.
25842         (Pending.IsInterfaceIndexer): New public method.
25843         (Pending.ImplementIndexer): New public method.
25844         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
25845         This is used when implementing interface indexers to define a proxy
25846         if necessary.
25847         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
25848         define a proxy if necessary.
25849
25850         * interface.cs (Interface.IndexerName): New public variable.
25851         (Interface.PopulateIndexer): Set the IndexerName.
25852         (Interface.DefineIndexers): New private method.  Populate all the
25853         indexers and make sure their IndexerNames match.
25854
25855         * typemanager.cs (IndexerPropertyName): Added support for interface
25856         indexers.
25857
25858 2002-07-22  Martin Baulig  <martin@gnome.org>
25859
25860         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
25861         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
25862         ret if HasReturnLabel.
25863         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
25864         variables.
25865
25866         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
25867         and set the ec.LoopBeginTryCatchLevel.
25868         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
25869         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
25870         the current ec.TryCatchLevel, the branch goes out of an exception
25871         block.  In this case, we need to use Leave and not Br.
25872
25873 2002-07-22  Martin Baulig  <martin@gnome.org>
25874
25875         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
25876         block unless the block does not always return or it is contained in
25877         another try { ... } catch { ... } block.  Fixes bug #26506.
25878         Added verify-1.cs to the test suite.
25879
25880 2002-07-22  Martin Baulig  <martin@gnome.org>
25881
25882         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
25883         then we do not always return.  Fixes bug #24985.
25884
25885 2002-07-22  Martin Baulig  <martin@gnome.org>
25886
25887         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
25888         lookup on a per-class level; ie. walk up the class hierarchy until we
25889         found at least one applicable method, then choose the best among them.
25890         Fixes bug #24463 and test-29.cs.
25891
25892 2002-07-22  Martin Baulig  <martin@gnome.org>
25893
25894         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
25895         return types of the methods.  The return type is not part of the
25896         signature and we must not check it to make the `new' modifier work.
25897         Fixes bug #27999, also added test-147.cs.
25898         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
25899
25900         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
25901         on the method's return type.
25902
25903 2002-07-21  Martin Baulig  <martin@gnome.org>
25904
25905         * assign.cs: Make this work if the rightmost source is a constant and
25906         we need to do an implicit type conversion.  Also adding a few more tests
25907         to test-38.cs which should have caught this.
25908
25909         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
25910         target in the makefile for this.  The makefile.gnu is primarily intended
25911         for end-users who don't want to debug the compiler.
25912
25913 2002-07-21  Martin Baulig  <martin@gnome.org>
25914
25915         * assign.cs: Improved the Assign class so it can now handle embedded
25916         assignments (X = Y = Z = something).  As a side-effect this'll now also
25917         consume less local variables.  test-38.cs now passes with MCS, added
25918         a few new test cases to that test.
25919
25920 2002-07-20  Martin Baulig  <martin@gnome.org>
25921
25922         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
25923         instructions.  Fixes bug #27977, also added test-146.cs.
25924
25925 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25926
25927         * cs-tokenizer.cs: fixed getHex ().
25928
25929 2002-07-19  Martin Baulig  <martin@gnome.org>
25930
25931         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
25932         not Type.GetType() to lookup the array type.  This is needed when
25933         we're constructing an array of a user-defined type.
25934         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
25935         single-dimensional arrays, but also for single-dimensial arrays of
25936         type decimal.
25937
25938 2002-07-19  Martin Baulig  <martin@gnome.org>
25939
25940         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
25941         this function is called, it's not allowed to share LocalBuilders
25942         among ILGenerators.
25943
25944 2002-07-19  Martin Baulig  <martin@gnome.org>
25945
25946         * expression.cs (Argument.Resolve): Report an error 118 when trying
25947         to pass a type as argument.
25948
25949 2002-07-18  Martin Baulig  <martin@gnome.org>
25950
25951         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
25952         Conv_R_Un for the signed `long' type.
25953
25954 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
25955
25956         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
25957         `expr' for the temporary result, as that will fail if we do
25958         multiple resolves on the same expression.
25959
25960 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
25961
25962         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
25963         ec.TypeContainer for looking up aliases. 
25964
25965         * class.cs (TypeContainer): Remove LookupAlias from here.
25966
25967         * decl.cs (DeclSpace); Move here.
25968
25969 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
25970
25971         * class.cs (FindMembers): Only call filter if the constructor
25972         bulider is not null.
25973
25974         Also handle delegates in `NestedTypes' now.  Now we will perform
25975         type lookups using the standard resolution process.  This also
25976         fixes a bug.
25977
25978         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
25979         This uses Expressions (the limited kind that can be parsed by the
25980         tree) instead of strings.
25981
25982         * expression.cs (ComposedCast.ToString): Implement, used to flag
25983         errors since now we have to render expressions.
25984
25985         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
25986         FormArrayType. 
25987
25988         * ecore.cs (SimpleName.ToString): ditto.
25989
25990         * cs-parser.jay: Instead of using strings to assemble types, use
25991         Expressions to assemble the type (using SimpleName, ComposedCast,
25992         MemberAccess).  This should fix the type lookups in declarations,
25993         because we were using a different code path for this.
25994
25995         * statement.cs (Block.Resolve): Continue processing statements
25996         even when there is an error.
25997
25998 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
25999
26000         * class.cs (Event.Define): Also remove the `remove' method from
26001         the list of pending items.
26002
26003         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
26004         generate more compact code. 
26005
26006 2002-07-17  Martin Baulig  <martin@gnome.org>
26007
26008         * const.cs (Const.LookupConstantValue): Add support for constant
26009         `unchecked' and `checked' expressions.
26010         Also adding test case test-140.cs for this.
26011
26012 2002-07-17  Martin Baulig  <martin@gnome.org>
26013
26014         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
26015         check whether mi.ReturnType implements the IEnumerator interface; the
26016         `==' and the IsAssignableFrom() will fail in this situation.
26017
26018 2002-07-16  Ravi Pratap  <ravi@ximian.com>
26019
26020         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
26021         here too.
26022
26023 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26024
26025         * expression.cs: fixed bug #27811.
26026
26027 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
26028
26029         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
26030         Molaro: when we are a ref, the value already contains a pointer
26031         value, do not take the address of it.
26032
26033 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
26034         * removed mb-parser.jay and mb-tokenizer.cs
26035
26036 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26037
26038         * expression.cs: check against the building corlib void type.
26039
26040 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26041
26042         * ecore.cs: fix for valuetype static readonly fields: when 
26043         initializing them, we need their address, not the address of a copy.
26044
26045 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26046
26047         * typemanager.cs: register also enum_type in corlib.
26048
26049 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26050
26051         * class.cs: allow calling this (but not base) initializers in structs.
26052
26053 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26054
26055         * ecore.cs: make sure we compare against the building base types
26056         in GetTypeSize ().
26057
26058 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26059
26060         * typemanager.cs: fix TypeToCoreType() to handle void and object
26061         (corlib gets no more typerefs after this change).
26062
26063 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26064
26065         * expression.cs (ArrayCreation.EmitArrayArguments): use
26066         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26067
26068         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26069         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26070         array indexes, the runtime actually forbids them.
26071
26072         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26073         for array arguments here.
26074
26075         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26076         instead of the default for ValueTypes.
26077
26078         (New.DoEmit): Use IsValueType instead of
26079         IsSubclassOf (value_type)
26080         (New.DoResolve): ditto.
26081         (Invocation.EmitCall): ditto.
26082
26083         * assign.cs (Assign): ditto.
26084
26085         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26086         Statements *are* currently doing part of their resolution during
26087         Emit.  
26088
26089         Expressions do always resolve during resolve, but statements are
26090         only required to propagate resolution to their children.
26091
26092 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26093
26094         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26095
26096         (LoadAssembly): Do not add the dll if it is already specified
26097
26098         (MainDriver): Add the System directory to the link path at the end,
26099         after all the other -L arguments. 
26100
26101         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26102         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26103         ldelem.u1) and using the opposite for sbytes.
26104
26105         This fixes Digger, and we can finally run it.
26106
26107         * driver.cs (UnixParseOption): Move the option parsing here.  
26108         (CSCParseOption): Implement CSC-like parsing of options.
26109
26110         We now support both modes of operation, the old Unix way, and the
26111         new CSC-like way.  This should help those who wanted to make cross
26112         platform makefiles.
26113
26114         The only thing broken is that /r:, /reference: and /lib: are not
26115         implemented, because I want to make those have the same semantics
26116         as the CSC compiler has, and kill once and for all the confussion
26117         around this.   Will be doing this tomorrow.
26118
26119         * statement.cs (Unsafe.Resolve): The state is checked during
26120         resolve, not emit, so we have to set the flags for IsUnsfe here.
26121
26122 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26123
26124         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26125         not catch the Error_ObjectRefRequired in SimpleName (as it is
26126         possible to have a class/instance variable name that later gets
26127         deambiguated), we have to check this here.      
26128
26129 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26130
26131         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26132         make static and put into Expression.
26133
26134         (Event.Define): Register the private field of the event with the 
26135         TypeManager so that GetFieldFromEvent can get at it.
26136
26137         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26138         keep track of the private field associated with an event which
26139         has no accessors.
26140
26141         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26142         private field.
26143
26144         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26145
26146 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26147
26148         * expression.cs (Binary.EmitBranchable): this routine emits the
26149         Binary expression in a branchable context.  This basically means:
26150         we need to branch somewhere, not just get the value on the stack.
26151
26152         This works together with Statement.EmitBoolExpression.
26153
26154         * statement.cs (Statement.EmitBoolExpression): Use
26155         EmitBranchable. 
26156
26157 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26158
26159         * statement.cs (For): Reduce the number of jumps in loops.
26160
26161         (For): Implement loop inversion for the For statement.
26162
26163         (Break): We can be breaking out of a Try/Catch controlled section
26164         (foreach might have an implicit try/catch clause), so we need to
26165         use Leave instead of Br.
26166
26167         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26168         now).  If the instace expression supports IMemoryLocation, we use
26169         the AddressOf method from the IMemoryLocation to extract the
26170         address instead of emitting the instance.
26171
26172         This showed up with `This', as we were emitting the instance
26173         always (Emit) instead of the Address of This.  Particularly
26174         interesting when This is a value type, as we dont want the Emit
26175         effect (which was to load the object).
26176
26177 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26178
26179         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26180
26181         * statement.cs (Checked): Set the CheckedState during the resolve
26182         process too, as the ConvCast operations track the checked state on
26183         the resolve process, and not emit.
26184
26185         * cs-parser.jay (namespace_member_declaration): Flag that we have
26186         found a declaration when we do.  This is used to flag error 1529
26187
26188         * driver.cs: Report ok when we display the help only.
26189
26190 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26191
26192         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26193
26194 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26195
26196         * cs-tokenizer.cs (define): We also have to track locally the
26197         defines.  AllDefines is just used for the Conditional Attribute,
26198         but we also need the local defines for the current source code. 
26199
26200 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26201
26202         * statement.cs (While, For, Do): These loops can exit through a
26203         Break statement, use this information to tell whether the
26204         statement is the last piece of code.
26205
26206         (Break): Flag that we break.
26207
26208         * codegen.cs (EmitContexts): New `Breaks' state variable.
26209
26210 2002-07-03  Martin Baulig  <martin@gnome.org>
26211
26212         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26213         modifiers in method declarations in structs.  Otherwise, you won't
26214         be able to override things like Object.Equals().
26215
26216 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26217
26218         * class.cs (Method, Property, Indexer): Do not allow the public
26219         modifier to be used in explicit interface implementations.
26220
26221         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26222         override modifiers in method declarations in structs
26223
26224 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26225
26226         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26227         integer or real overflow, report an error
26228
26229 2002-07-02  Martin Baulig  <martin@gnome.org>
26230
26231         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26232         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26233         to tell the runtime about our newly created System.Object and
26234         System.ValueType types.
26235
26236 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26237
26238         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26239         struct instead of Ldarg/Starg.
26240
26241 2002-07-02  Martin Baulig  <martin@gnome.org>
26242
26243         * expression.cs (Indirection.Indirection): Call
26244         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26245
26246 2002-07-02  Martin Baulig  <martin@gnome.org>
26247
26248         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26249         ValueType, call TypeManager.TypeToCoreType() on it.
26250         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26251         the OpCodes.Newarr argument.
26252
26253 2002-07-02  Martin Baulig  <martin@gnome.org>
26254
26255         * expression.cs (Invocation.EmitCall): When compiling corlib,
26256         replace all calls to the system's System.Array type to calls to
26257         the newly created one.
26258
26259         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26260         System.Array methods.
26261         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26262         from the system's System.Array type which must be replaced.
26263
26264 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26265
26266         * typemanager.cs: load unverifiable_code_ctor so we can build
26267         corlib using the correct type. Avoid using GetTypeCode() with
26268         TypeBuilders.
26269         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26270         TypeManager.object_type to allow building corlib.
26271
26272 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26273
26274         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26275
26276 2002-07-01  Martin Baulig  <martin@gnome.org>
26277
26278         * class.cs: Make the last change actually work, we need to check
26279         whether `ifaces != null' to avoid a crash.
26280
26281 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26282
26283         * class.cs: when we build structs without fields that implement
26284         interfaces, we need to add the interfaces separately, since there is
26285         no API to both set the size and add the interfaces at type creation
26286         time.
26287
26288 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26289
26290         * expression.cs: the dimension arguments to the array constructors
26291         need to be converted if they are a long.
26292
26293 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26294
26295         * class.cs: don't emit ldarg.0 if there is no parent constructor
26296         (fixes showstopper for corlib).
26297
26298 2002-06-29  Martin Baulig  <martin@gnome.org>
26299
26300         MCS now compiles corlib on GNU/Linux :-)
26301
26302         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26303         ie. check for MethodImplOptions.InternalCall.
26304
26305         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26306         and TypeManager.attribute_type are null, so we must explicitly check
26307         whether parent is not null to find out whether it's an attribute type.
26308         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26309         and SetBuilder, not only if the property is neither abstract nor external.
26310         This is necessary to set the MethodImplOptions on the accessor methods.
26311         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26312         SetBuilder, see Property.Emit().
26313
26314         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26315         populate "System.Object", "System.ValueType" and "System.Attribute" since
26316         they've already been populated from BootCorlib_PopulateCoreTypes().
26317
26318 2002-06-29  Martin Baulig  <martin@gnome.org>
26319
26320         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26321         is the NullLiteral, we also need to make sure that target_type is not
26322         an enum type.   
26323
26324 2002-06-29  Martin Baulig  <martin@gnome.org>
26325
26326         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26327         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26328         before calling BootstrapCorlib_ResolveDelegate ().
26329
26330 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26331
26332         * statement.cs: fixed build-breaker. All tests passed ok.
26333
26334 2002-06-27  Martin Baulig  <martin@gnome.org>
26335
26336         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26337         for System.Decimal when compiling corlib.
26338
26339 2002-06-27  Martin Baulig  <martin@gnome.org>
26340
26341         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26342         switch blocks which contain nothing but a default clause.
26343
26344 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26345
26346        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26347
26348 2002-06-27  Martin Baulig  <martin@gnome.org>
26349
26350         * ecore.cs (PropertyExpr.PropertyExpr): Call
26351         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26352
26353         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26354         is already a TypeBuilder.
26355
26356 2002-06-27  Martin Baulig  <martin@gnome.org>
26357
26358         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26359         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26360         the "from an array-type to System.Array" case.  This makes it work
26361         when compiling corlib.
26362
26363 2002-06-27  Martin Baulig  <martin@gnome.org>
26364
26365         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26366         non-static PropertyExpr, set its InstanceExpression.  This makes
26367         the `ICollection.Count' property work in System/Array.cs.
26368
26369 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26370
26371         * driver.cs: Made error handling more consistent.  Errors now
26372         tracked by Report class, so many methods which used to return int
26373         now return void.  Main() now prints success/failure and 
26374         errors/warnings message.
26375
26376         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26377         the magic number return values (123 and 124).  Now, if the
26378         expected error occurs, the compiler exits with success (exit value
26379         0).  If the compilation completes without seeing that particular
26380         error, the compiler exits with failure (exit value 1).  The
26381         makefile in mcs/errors has been changed to handle the new behaviour.
26382
26383         * report.cs: Made 'expected error' number a property and renamed
26384         it from 'Probe' to 'ExpectedError'.
26385
26386         * genericparser.cs: Removed error handling support, since it is
26387         now all done by Report class.
26388
26389         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26390         class, so parse() no longer returns an int.
26391
26392         * namespace.cs: Use Report.Error instead of GenericParser.error
26393
26394 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26395
26396         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26397         TypeContainer.AddOperator): At the front of the list put the
26398         explicit implementations, so they get resolved/defined first. 
26399
26400 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26401
26402         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26403         interface type is implemented by this TypeContainer.  Used during
26404         explicit interface implementation.
26405
26406         (Property.Define, Indexer.Define, Method.Define): Validate that
26407         the given interface in the explicit implementation is one of the
26408         base classes for the containing type.
26409
26410         Also if we are explicitly implementing an interface, but there is
26411         no match in the pending implementation table, report an error.
26412
26413         (Property.Define): Only define the property if we are
26414         not explicitly implementing a property from an interface.  Use the
26415         correct name also for those properties (the same CSC uses,
26416         although that is really not needed).
26417
26418         (Property.Emit): Do not emit attributes for explicitly implemented
26419         properties, as there is no TypeBuilder.
26420
26421         (Indexer.Emit): ditto.
26422
26423         Hiding then means that we do not really *implement* a pending
26424         implementation, which makes code fail.
26425
26426 2002-06-22  Martin Baulig  <martin@gnome.org>
26427
26428         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26429         the return value of Object.GetType().  [FIXME: we need to do this whenever
26430         we get a type back from the reflection library].
26431
26432 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26433
26434         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26435
26436 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26437
26438         * attribute.cs: Return null if we can not look up the type.
26439
26440         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26441         the interface types found.
26442
26443         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26444         interface types found.
26445
26446         * typemanager.cs (GetInterfaces): Make this routine returns alll
26447         the interfaces and work around the lame differences between
26448         System.Type and System.Reflection.Emit.TypeBuilder in the results
26449         result for GetInterfaces.
26450
26451         (ExpandInterfaces): Given an array of interface types, expand and
26452         eliminate repeated ocurrences of an interface.  This expands in
26453         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26454         be IA, IB, IC.
26455
26456 2002-06-21  Martin Baulig  <martin@gnome.org>
26457
26458         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26459         on System.Enum.
26460
26461 2002-06-21  Martin Baulig  <martin@gnome.org>
26462
26463         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26464         and called with one of the core types, return the corresponding typebuilder for
26465         that type.
26466
26467         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26468         element type.
26469
26470 2002-06-21  Martin Baulig  <martin@gnome.org>
26471
26472         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26473         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26474         (Expression.ConvertReferenceExplicit): Likewise.
26475
26476         * expression.cs (ElementAccess.DoResolve): Likewise.
26477         (ElementAccess.DoResolveLValue): Likewise.
26478
26479 2002-06-10  Martin Baulig  <martin@gnome.org>
26480
26481         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26482         add the "value" parameter to the parameter list.
26483
26484         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26485         to our caller.
26486
26487 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26488
26489         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26490         the argument to an int, uint, long or ulong, per the spec.  Also
26491         catch negative constants in array creation.
26492
26493 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26494
26495         * class.cs: do not allow the same interface to appear twice in
26496         the definition list.
26497
26498 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26499
26500         * ecore.cs: don't use ldlen with System.Array.
26501
26502 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26503
26504         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26505
26506 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26507
26508         * modifiers.cs: produce correct field attributes for protected
26509         internal. Easy fix so miguel can work on ther harder stuff:-)
26510
26511 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26512
26513         * pending.cs: New file.  Move the code from class.cs here.
26514         Support clearning the pending flag for all methods (when not doing
26515         explicit interface implementation).
26516
26517 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26518
26519         * rootcontext.cs: added a couple more types needed to bootstrap.
26520
26521 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26522
26523         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26524         constructor in the type, instead of any constructor in the type
26525         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26526         a bug in the Mono runtime when applying the params attribute). 
26527
26528 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26529         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26530
26531 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26532
26533         * expression.cs (Unary.ResolveOperator): Use TypeManager
26534         to resolve the type.
26535
26536 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26537
26538         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26539         attached.
26540
26541         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26542         with each member too.
26543
26544         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26545         field builders too - this takes care of the enum member case.
26546
26547 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26548
26549         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26550         address-of operator on both value types and pointers.
26551
26552 2002-06-10  Martin Baulig  <martin@gnome.org>
26553
26554         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26555         PropertyBuilder to the `property_builders' list.
26556
26557         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26558         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26559         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26560         find any indexers which are inherited from an interface.
26561
26562 2002-06-09  Martin Baulig  <martin@gnome.org>
26563
26564         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26565         the same type as the constant if necessary.  There's also a test-130.cs
26566         for this.
26567
26568         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26569
26570         * typemanager.cs (TypeManager.ChangeType): Previously known as
26571         Enum.ChangeEnumType().
26572
26573 2002-06-09  Martin Baulig  <martin@gnome.org>
26574
26575         * expression.cs (Cast.TryReduce): Added support for consts.
26576
26577 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26578
26579         * class.cs (Accessor): Hold attributes information so we can pass
26580         it along.
26581
26582         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26583         Modify to pass in attributes attached to the methods.
26584
26585         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26586
26587         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26588         to handle the Accessor kind :-)
26589
26590         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26591
26592 2002-06-08  Martin Baulig  <martin@gnome.org>
26593
26594         * expression.cs (Unary.TryReduceNegative): Added support for
26595         ULongConstants.
26596
26597 2002-06-08  Martin Baulig  <martin@gnome.org>
26598
26599         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26600         name can't be found in the `defined_names' - the caller will do a
26601         MemberLookup in this case and thus find methods in System.Enum
26602         such as Enum.IsDefined().
26603
26604 2002-06-08  Martin Baulig  <martin@gnome.org>
26605
26606         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26607         Convert.ChangeType() which works with TypeBuilder created types.
26608         (Enum.LookupEnumValue, Enum.Define): Use it here.
26609
26610         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26611         `TypeBuilder.BaseType != null' check.
26612         (TypeContainer.FindMembers): Only lookup parent members if we
26613         actually have a parent.
26614         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26615         (ConstructorInitializer.Resolve): Likewise.
26616
26617         * interface.cs (Interface.FindMembers): Added
26618         `TypeBuilder.BaseType != null' check.
26619
26620         * rootcontext.cs (RootContext.ResolveCore): Added
26621         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26622         classes_second_stage.
26623
26624         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26625         debug_type and trace_type when compiling with --nostdlib.       
26626
26627 2002-06-07  Martin Baulig  <martin@gnome.org>
26628
26629         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26630         (AddField): Set it to true when adding a non-static field.
26631         (DefineType): Use `have_nonstatic_fields' to find out whether we
26632         have non-static fields, not `Fields != null'.
26633
26634 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26635
26636         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26637         dereferencing a null on the static-field code path)
26638
26639 2002-05-30  Martin Baulig  <martin@gnome.org>
26640
26641         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
26642         to take command line arguments.  Use reflection to call the new
26643         custom `Initialize' function on the symbol writer and pass it the
26644         command line arguments.
26645
26646         * driver.cs (--debug-args): New command line argument to pass command
26647         line arguments to the symbol writer.
26648
26649 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
26650
26651         * assign.cs (DoResolve): Forgot to do the implicit conversion to
26652         the target type for indexers and properties.  Thanks to Joe for
26653         catching this.
26654
26655 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
26656
26657         * typemanager.cs (MethodFlags): returns the method flags
26658         (Obsolete/ShouldIgnore) that control warning emission and whether
26659         the invocation should be made, or ignored. 
26660
26661         * expression.cs (Invocation.Emit): Remove previous hack, we should
26662         not do this on matching a base type, we should do this based on an attribute
26663
26664         Only emit calls to System.Diagnostics.Debug and
26665         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
26666         on the command line.
26667
26668         * rootcontext.cs: Global settings for tracing and debugging.
26669
26670         * cs-tokenizer.cs (define): New utility function to track
26671         defines.   Set the global settings for TRACE and DEBUG if found.
26672
26673 2002-05-25  Ravi Pratap  <ravi@ximian.com>
26674
26675         * interface.cs (Populate*): Pass in the TypeContainer as well as
26676         the DeclSpace as parameters so that we can create EmitContexts and
26677         then use that to apply attributes etc.
26678
26679         (PopulateMethod, PopulateEvent, PopulateProperty)
26680         (PopulateIndexer): Apply attributes everywhere.
26681
26682         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
26683         etc.
26684
26685         (ApplyAttributes): Update accordingly.
26686
26687         We now apply interface attributes for all members too.
26688
26689 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
26690
26691         * class.cs (Indexer.Define); Correctly check if we are explicit
26692         implementation (instead of checking the Name for a ".", we
26693         directly look up if the InterfaceType was specified).
26694
26695         Delay the creation of the PropertyBuilder.
26696
26697         Only create the PropertyBuilder if we are not an explicit
26698         interface implementation.   This means that explicit interface
26699         implementation members do not participate in regular function
26700         lookups, and hence fixes another major ambiguity problem in
26701         overload resolution (that was the visible effect).
26702
26703         (DefineMethod): Return whether we are doing an interface
26704         implementation. 
26705
26706         * typemanager.cs: Temporary hack until we get attributes in
26707         interfaces (Ravi is working on that) and we get IndexerName
26708         support in interfaces.
26709
26710         * interface.cs: Register the indexers as properties.
26711
26712         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
26713         warning, I have verified that this is a bug in the .NET runtime
26714         (JavaScript suffers of the same problem).
26715
26716         * typemanager.cs (MemberLookup): When looking up members for
26717         interfaces, the parent of an interface is the implicit
26718         System.Object (so we succeed in searches of Object methods in an
26719         interface method invocation.  Example:  IEnumerable x;  x.ToString
26720         ()) 
26721
26722 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
26723
26724         * class.cs (Event): Events should also register if they do
26725         implement the methods that an interface requires.
26726
26727         * typemanager.cs (MemberLookup); use the new GetInterfaces
26728         method. 
26729
26730         (GetInterfaces): The code used to lookup interfaces for a type is
26731         used in more than one place, factor it here. 
26732
26733         * driver.cs: Track the errors at the bottom of the file, we kept
26734         on going.
26735
26736         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
26737         instance if the method we are calling is static!
26738
26739 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
26740
26741         * attribute.cs (ApplyAttributes): Make this function filter out
26742         the IndexerName attribute (as that attribute in reality is never
26743         applied) and return the string constant for the IndexerName
26744         attribute. 
26745
26746         * class.cs (TypeContainer.Emit): Validate that all the indexers
26747         have the same IndexerName attribute, and if so, set the
26748         DefaultName attribute on the class. 
26749
26750         * typemanager.cs: The return value might contain other stuff (not
26751         only methods).  For instance, consider a method with an "Item"
26752         property and an Item method.
26753
26754         * class.cs: If there is a problem with the parameter types,
26755         return. 
26756
26757 2002-05-24  Ravi Pratap  <ravi@ximian.com>
26758
26759         * ecore.cs (ImplicitConversionExists): Wrapper function which also
26760         looks at user defined conversion after making a call to 
26761         StandardConversionExists - we need this for overload resolution.
26762
26763         * expression.cs : Update accordingly the various method calls.
26764
26765         This fixes 2 bugs filed against implicit user defined conversions 
26766
26767 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
26768
26769         * statement.cs: Track the result of the assignment.
26770
26771 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
26772
26773         * expression.cs (MemberAccess): Improved error reporting for
26774         inaccessible members.
26775
26776 2002-05-22  Martin Baulig  <martin@gnome.org>
26777
26778         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
26779         itself with debugging support.
26780
26781 2002-05-22  Martin Baulig  <martin@gnome.org>
26782
26783         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
26784         Removed, this isn't needed anymore.
26785
26786 2002-05-20  Martin Baulig  <martin@gnome.org>
26787
26788         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
26789         be underlying type for an enum.
26790
26791 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
26792
26793         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
26794         that splits out the loading of just the core types.
26795
26796         * rootcontext.cs (ResolveCore): Split the struct resolution in
26797         two, so we can load the enumeration underlying types before any
26798         enums are used.
26799
26800         * expression.cs (Is): Bandaid until we fix properly Switch (see
26801         bug #24985 for details).
26802
26803         * typemanager.cs (ImplementsInterface): The hashtable will contain
26804         a null if there are no interfaces implemented.
26805
26806 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
26807
26808         * cs-parser.jay (indexer_declarator): It is fine to have array
26809         parameters
26810
26811 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26812
26813         * typemanager.cs: (RegisterBuilder): New function used to register
26814         TypeBuilders that implement interfaces.  Since
26815         TypeBuilder.GetInterfaces (as usual) does not work with lame
26816         Reflection.Emit. 
26817         (AddUserType): register interfaces.
26818
26819         (ImplementsInterface): Use the builder_to_ifaces hash if we are
26820         dealing with TypeBuilder.  Also, arrays are showing up as
26821         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
26822         methods can not be invoked on them!
26823
26824         * ecore.cs (ExplicitReferenceConversionExists): Made public.
26825         (ImplicitReferenceConversionExists): Split out from
26826         StandardConversionExists. 
26827
26828         * expression.cs (As): We were only implementing one of the three
26829         cases for the as operator.  We now implement them all.
26830         (Is): Implement the various other cases for Is as well.
26831
26832         * typemanager.cs (CACHE): New define used to control if we want or
26833         not the FindMembers cache.  Seems to have a negative impact on
26834         performance currently
26835
26836         (MemberLookup): Nested types have full acess to
26837         enclosing type members
26838
26839         Remove code that coped with instance/static returns for events, we
26840         now catch this in RealFindMembers.
26841
26842         (RealFindMembers): only perform static lookup if the instance
26843         lookup did not return a type or an event.  
26844
26845 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26846
26847         * assign.cs (CompoundAssign): We pass more semantic information
26848         now to Compound Assignments than we did before: now we have all
26849         the information at hand, and now we resolve the target *before* we
26850         do the expression expansion, which allows the "CacheValue" method
26851         to have the effect we intended (before, a [x] += 1 would generate
26852         two differen ArrayAccess expressions from the ElementAccess,
26853         during the resolution process).
26854
26855         (CompoundAssign.DoResolve): Resolve target and original_source here.
26856
26857 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
26858
26859         * expression.cs (ArrayAccess): dropped debugging information. 
26860
26861         * typemanager.cs: Small bug fix: I was always returning i_members,
26862         instead of one of i_members or s_members (depending on which had
26863         the content).
26864
26865         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
26866         method is invoked before any code generation takes place, and it
26867         is a mechanism to inform that the expression will be invoked more
26868         than once, and that the method should use temporary values to
26869         avoid having side effects
26870
26871         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
26872
26873         * ecore.cs (Expression.CacheTemporaries): Provide empty default
26874         implementation.
26875
26876         * expression.cs (Indirection, ArrayAccess): Add support for
26877         CacheTemporaries in these two bad boys. 
26878
26879         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
26880         ldobj or ldind_ref.  
26881         (StoreFromPtr): Handle stobj as well.
26882
26883         * expression.cs (UnaryMutator): Share more code.
26884
26885         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
26886         down: I was not tracking the Filter function as well, which
26887         was affecting the results of the cache.
26888
26889 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
26890
26891         * attribute.cs: Remove the hack to handle the CharSet property on
26892         StructLayouts. 
26893
26894 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
26895
26896         * attribute.cs (DoResolve): More uglyness, we now only try to
26897         resolve the attribute partially, to extract the CharSet
26898         information (only if we are a StructLayout attribute).  Otherwise 
26899
26900         (GetExtraTypeInfo): Add some code to conditionally kill in the
26901         future this.   I am more and more convinced that the .NET
26902         framework has special code to handle the attribute setting on
26903         certain elements.
26904
26905         * expression.cs (IsParamsMethodApplicable): Revert my previous
26906         foreach change here, it was wrong.
26907
26908 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
26909
26910         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
26911         (pp_expr): do not abort on unknown input, just return.
26912         (eval): abort if there are pending chars.
26913
26914         * attribute.cs (Attribute.Resolve): Positional parameters are
26915         optional.  Deal with that case.
26916
26917         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
26918         the Ansi/Unicode/Auto information for the type.
26919
26920         (TypeContainer.DefineType): instantiate the EmitContext here, as
26921         we will be using it during the type definition (to resolve
26922         attributes) and during the emit phase.
26923
26924         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
26925         to pull type information out of the attributes
26926
26927         (Attribute.Resolve): track the constructor builder, and allow for
26928         multiple invocations (structs and classes will use this).
26929
26930         * ecore.cs (MemberLookupFinal): new version with all the
26931         parameters customizable.
26932
26933         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
26934         constructors.  Return if the result value is null (as the error
26935         would have been flagged already by MemberLookupFinal)
26936
26937         Do not allow instances of abstract classes or interfaces to be
26938         created.
26939
26940         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
26941         We have to compare the assembly property here when dealing with
26942         FamANDAssem and Assembly access modifiers, because we might be
26943         creating an assembly from *modules* (that means that we are not
26944         getting TypeBuilders for types defined in other modules that are
26945         part of this assembly).
26946
26947         (Method.Emit): If the method is marked abstract and has a body,
26948         emit an error. 
26949
26950         (TypeContainer.DefineMembers): If both the defined member and the
26951         parent name match are methods, then do not emit any warnings: let
26952         the Method.Define routine take care of flagging warnings.  But if
26953         there is a mismatch (method overrides something else, or method is
26954         overriwritten by something, then emit warning).
26955
26956         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
26957         set to null, this means `do not check for the return type on the
26958         signature'. 
26959
26960         (Method.Define): set the return type for the method signature to
26961         null, so that we get methods with the same name and parameters and
26962         different return types.  This is used to flag warning 114 (you are
26963         hiding a method, and you probably want to use the new/override
26964         keywords instead).
26965
26966         * typemanager.cs (MemberLookup): Implemented proper access
26967         control, closing a long standing set of bug reports.  The problem
26968         was that the Framework only has two bits: Public and NonPublic,
26969         and NonPublic includes private and protected methods, but we need
26970         to enforce the FamANDAssem, FamOrAssem and Family. 
26971
26972 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
26973
26974         * statement.cs (GotoCase): Return true: Ammounts to giving up
26975         knowledge on whether we return or not, and letting the other case
26976         be responsible for it.
26977
26978 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
26979
26980         * driver.cs: Do not load directories for each file processed, only
26981         do it if there is a pattern.
26982
26983         * ecore.cs: Report readonly assigns here as well, as we might have
26984         been resolved only by MemberAccess.
26985
26986         (SimpleName.SimpleNameResolve): Also be useful for LValue
26987         resolution.   We need this to propagate assign to local readonly variables
26988
26989         * typemanager.cs: Use a ptrhashtable for the criteria, because we
26990         do not want to reuse potential criteria memory.
26991
26992         * class.cs (MyEventBuilder): Set reflected_type;
26993
26994         * ecore.cs (Constantify): Added support for constifying bools.
26995
26996         (RootContext.LookupType): Added a cache for values looked up in
26997         the declaration space.
26998
26999         * typemanager.cs (FindMembers): Now is a front-end to
27000         RealFindMembers, and provides a two-level hashtable-based cache to
27001         the request.  
27002
27003         15% performance improvement: from 22.5 to 19.2 seconds.
27004
27005         * expression.cs (IsParamsMethodApplicable): use foreach.
27006         (Invocation.DoResolve): ditto.
27007         (New.DoResolve): ditto.
27008         (ArrayCreation.DoResolve): ditto.
27009
27010         * ecore.cs (FindMostEncompassingType): use foreach.
27011
27012         * delegate.cs (NewDelegate.DoResolve): Use foreach
27013
27014         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
27015         (RemoveMethods): use foreach.
27016
27017         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
27018         nested foreach statements instead of for, and also break out of
27019         the inner loop once a match is found.
27020
27021         (Invocation.OverloadResolve): Use foreach, simplify the code. 
27022
27023 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
27024
27025         * cfold.cs (BinaryFold): During an enumeration evaluation context,
27026         we actually unwrap the expression to allow for extra information
27027         to be extracted. 
27028
27029         * expression.cs: Use Shr_Un on unsigned operations. 
27030
27031 2002-05-08  Ravi Pratap  <ravi@ximian.com>
27032
27033         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
27034         applicable operators was not being considered correctly. This closes
27035         the bug Miguel reported.
27036
27037 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27038
27039         * attribute.cs: check that the type derives from System.Attribute
27040         and report the correct error in that case (moved the duplicate code to
27041         its own method, too).
27042
27043 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27044
27045         * attribute.cs: lookup attribute type name as the spec says: first the
27046         bare attribute name and then name + "Attribute" (nant compiles with
27047         mcs after this fix).
27048
27049 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27050
27051         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27052         Because of the way we parse things, we should try to see if a
27053         UIntConstant can fit in an integer.
27054
27055 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27056
27057         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27058         when we are in an explicit context.
27059
27060         (ConvertReferenceExplicit): When converting from Iface type S to Class
27061         T make sure the rules are implemented as an OR.
27062
27063         * parameter.cs (ParameterType): Make it a property for now although the
27064         purpose really isn't anything immediate.
27065
27066         * expression.cs (Is*Applicable): Do better checking on the parameter type
27067         of a ref/out parameter. The ones from the system assemblies are already 
27068         marked with the correct type so we don't need to do any correction.
27069
27070         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27071         the object type is standard too so include that.
27072
27073 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27074
27075         * ecore.cs (StandardConversionExists): Augment with missing code:
27076         deal with IntConstant, LongConstants and Enumerations.
27077
27078         * assign.cs: Report the error, instead of failing silently
27079
27080         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27081         typecontainer that they are declared, because the
27082         typecontainer/namespace will have the list of using clauses that
27083         need to be applied.
27084
27085         Assembly Attributes were escaping the normal registration
27086         mechanism. 
27087
27088         (EmitCode): Apply attributes within an EmitContext that represents
27089         the container they were declared on.
27090
27091         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27092
27093 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27094
27095         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27096         Revamp completely - make much cleaner as we now operate only
27097         on a set of Types.
27098
27099         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27100         to implement the logic detailed in the spec more correctly.
27101
27102         (UserDefinedConversion): Update accordingly.
27103
27104 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27105
27106         * statement.cs: Return flow analysis information up.
27107
27108         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27109         and the default.
27110
27111         (token): Do not consume an extra character before calling
27112         decimal_digits.
27113
27114 2002-05-06  Piers Haken <piersh@friskit.com>
27115
27116         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27117
27118 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27119
27120         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27121         EmitContext during the instance constructor initializer
27122         resolution, to stop access to instance variables.
27123
27124         This is mandated by the spec, last paragraph of the `constructor
27125         initializers' section. 
27126
27127 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27128
27129         * cs-parser.jay, class.cs (Accessor): new class used to represent
27130         an accessor (get or set).  In the past we used `null' to represent
27131         a missing accessor.  But this is ambiguous because there was no
27132         way to tell in abstract indexers/properties if one of them was
27133         specified.
27134
27135         Now there is a way of addressing that.
27136
27137         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27138         instead of FindMembers.
27139
27140         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27141         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27142
27143         * attribute.cs: Treat indexers and properties as the same in terms
27144         of applying attributes
27145
27146         * ecore.cs (FindMostEncompassedType): Use statically initialized
27147         EmptyExpressions()s like we do elsewhere to avoid creating useless
27148         objects (and we take this out of the tight loop).
27149
27150         (GetConversionOperators): Move the code to extract the actual
27151         operators to a separate routine to clean things up.
27152
27153 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27154
27155         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27156         events are always registered FieldBuilders.
27157
27158         * class.cs (FieldBase): New class shared by Fields 
27159
27160         * delegate.cs: If we are a toplevel delegate, use our full name.
27161         If we are a nested delegate, then only use our tail name.
27162
27163 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27164
27165         * expression.cs (IsApplicable): Ensure that we add the "&" to
27166         ref/out types before comparing it with the type of the argument.
27167
27168         (IsParamsMethodApplicable): Ditto.
27169
27170         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27171         silly me ;-)
27172
27173         * delegate.cs : Handle the case when we have more than one applicable
27174         method. Flag an error only when we finish checking all.
27175
27176 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27177
27178         * expression.cs: Add support for boolean static initializers.
27179
27180 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27181
27182         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27183
27184         * parameter.cs (ComputeParameterTypes,
27185         ComputeAndDefineParameterTypes): Better error handling: now we
27186         clear the `types' cache if we fail during any of the type lookups.
27187         We also return the status code correctly to our caller
27188
27189         * delegate.cs: If we fail to define a delegate, abort the extra
27190         steps. 
27191
27192         * expression.cs (Binary.ResolveOperator): for
27193         operator==(object,object) and operator !=(object, object) we also
27194         have to verify that there is an implicit conversion from one to
27195         the other.
27196
27197         (ArrayAccess.DoResolve): Array Access can operate on
27198         non-variables. 
27199
27200 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27201
27202         * assign.cs (CompoundAssign): A new class used as a "flag" that
27203         the assignment actually is happening as part of a compound
27204         assignment operator.
27205
27206         During compound assignment, a few new rules exist to enable things
27207         like:
27208
27209         byte b |= 1 + 2
27210
27211         From the spec:
27212
27213         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27214         to the type of x) if y is implicitly convertible to the type of x,
27215         and the operator is a builtin operator and the return type of the
27216         operator is explicitly convertible to the type of x. 
27217
27218         * rootcontext.cs: Reset warning level to 2.  4 catches various
27219         "interesting" features in mcs, we must clean this up at some
27220         point, but currently am trying to kill other bugs ;-)
27221
27222         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27223         in container classes as well.  
27224
27225         * expression.cs (Binary.ResolveOperator): Handle string case
27226         before anything else (as operator overloading does emit an error
27227         before doing anything else).
27228
27229         This code could go away when we move to a table driven model, but
27230         i could not come up with a good plan last night.
27231
27232 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27233
27234         * typemanager.cs (CSharpName): reimplementation using regex.
27235         * class.cs: added null check for fields in Emit
27236         * rootcontext.cs: set warninglevel to 4
27237
27238 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27239
27240         * typemanager.cs (CSharpName): reimplemented with Lupus
27241         suggestion.
27242
27243 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27244
27245         * statement.cs (If): correclty implement Resolve, because we were
27246         not catching sem errors in there.  The same process is needed
27247         everywhere else. 
27248         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27249
27250
27251         (Statement.Warning_DeadCodeFound): Factorize code.
27252         (While): Report dead code here too.
27253
27254         (Statement): Added Resolve virtual method to allow
27255         for resolution split from the emit code.
27256
27257 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27258
27259         * statement.cs (EmitBoolExpression): No longer try to resolve the
27260         expression here.    
27261         (MakeBoolean): New utility function that resolve, implicitly
27262         converts to boolean and tags the expression. 
27263
27264
27265         (If, Do): Implement dead code elimination.
27266         (While): Implement loop inversion
27267
27268         (Do, While, For, If): Resolve the expression prior to calling our
27269         code generation.
27270
27271 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27272
27273         * class.cs:
27274           - added method Report28 (warning: program has more than one entry point)
27275           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27276           - modified method Method.Define, the part at the end of the method
27277
27278         * rootcontext.cs: added static public Location EntryPointLocation;
27279           
27280         * ../errors/cs0028.cs : Add test case for the above warning.              
27281
27282         * typemanager.cs:
27283           - modified method CSharpName to allow arrays of primitive type to
27284             be printed nicely (e.g. instead of System.Int32[][] it now prints
27285             int[][])
27286           - added method CSharpSignature: returns the signature of a method
27287             in string format to be used in reporting errors, warnings, etc.
27288
27289         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27290         with String.Empty.
27291
27292 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27293
27294         * delegate.cs (Define): Fix extremely silly bug where I was
27295         setting the type of the 'object' parameter of the BeginInvoke
27296         method to System.IAsyncResult instead of System.Object ;-)
27297
27298 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27299
27300         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27301         here. 
27302
27303         (Constructor.Emit): return if we fail to initialize the
27304         constructor.  Another door closed!  
27305
27306         * expression.cs (New.DoResolve): Improve error message (from -6 to
27307         1501).  Use DeclaredOnly lookup to find the exact constructor.
27308
27309         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27310         loop.  This is useful.
27311
27312         * cs-parser.jay: Adjust the default parameters so that destructors
27313         have the proper signature.
27314
27315 2002-04-26  Martin Baulig  <martin@gnome.org>
27316
27317         * driver.cs (LoadAssembly): If `assembly' contains any characters
27318         which are only valid in path names and not in assembly names
27319         (currently slash, backslash and point), use Assembly.LoadFrom ()
27320         instead of Assembly.Load () on the `assembly' (before iteration
27321         over the link_paths).
27322
27323 2002-04-26  Martin Baulig  <martin@gnome.org>
27324
27325         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27326
27327 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27328
27329         * class.cs (Property): use the new typemanager.MemberLookup
27330
27331         (TypeContainer.MemberLookup): Implement using the
27332         TypeManager.MemberLookup now. 
27333
27334         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27335         and return MemberInfos, so that these can be used without an
27336         EmitContext (what we had before).
27337
27338 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27339
27340         * expression.cs: Fix the case where the argument to params if the
27341         type of the params.  I omitted handling this before.   Fixed
27342
27343 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27344
27345         * driver.cs: Call BootCorlib_PopulateCoreType
27346
27347         * class.cs (Property.CheckBase): Check for properties only, not
27348         for all members. 
27349
27350         * interface.cs: Temporary hack: try/catch around the
27351         CustomAttributeBuilder, because I am getting an exception that I
27352         do not understand.
27353
27354         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27355         types whose definitions are required to be there (attributes are
27356         defined before standard types).
27357
27358         Compute definitions as we boot the various types, as they are used
27359         immediately (value_type class will need object_type, but if we do
27360         not initialize object_type, we will pass a null, which will let
27361         the runtime pick the System.Object from the existing corlib, which
27362         is not what we want).
27363
27364 2002-04-22  Patrik Torstensson <totte@labs2.com>
27365
27366         * cs-tokenizer.cs: fixed a number of trim() issues.
27367
27368 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27369
27370         * expression.cs (Argument.Type): Ensure that we return the correct
27371         type when we have out or ref parameters [in which case we 
27372         append a "&"].
27373
27374 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27375
27376         * class.cs (Property, Indexer): Allow extern modifier in there. 
27377
27378         * typemanager.cs (InitBaseTypes): Initializes object_type and
27379         value_type, since those will be used early on during the bootstrap
27380         process to compile corlib.
27381
27382         (InitCoreTypes): Move code from here to InitBaseTypes.
27383
27384 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27385
27386         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27387         single-dimension arrays as using the ldlen opcode.  
27388
27389         Daniel Lewis discovered this optimization.  
27390
27391         * typemanager.cs: Add signature for System.Array::get_Length
27392
27393 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27394
27395         * statement.cs: report the error when the foreach does not apply to an
27396         array nor a collection.
27397
27398 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27399
27400         * expression.cs: Add implicit conversions to the operator ~.
27401
27402         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27403
27404         * typemanager.cs: Locate the decimal constructor.
27405
27406 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27407
27408         * attribute.cs: use the new property of TypeOf.
27409         * expression.cs: added 'get' property around typearg.
27410
27411         These changes fix a build breaker reported by NickD. Is this the
27412         correct way to fix?  If not, please, revert my changes and make it
27413         work :-).
27414
27415 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27416
27417         * attribute.cs: Add support for typeof in attribute invocations.
27418         I am not sure that this is right though.
27419
27420 2002-04-14  Duncan Mak  <duncan@ximian.com>
27421
27422         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27423         Binary.Operator.Division case.
27424
27425 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27426
27427         * class.cs (DefineType): Ensure that we do a proper check on
27428         attribute types and also register it with the TypeManager.
27429
27430         (TypeContainer.Targets): The default for attribute types is
27431         AttributeTargets.All.
27432
27433         * attribute.cs (ApplyAttributes): Registering the attribute type
27434         is done elsewhere, not when we discover we have a Usage attribute.
27435
27436 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27437
27438         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27439         and get rid of is_delegate parameter.
27440
27441         * everywhere : update.
27442
27443 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27444
27445         * cs-parser.jay (compilation_unit): Revamp completely to use
27446         some new ideas that I got from Rhys' grammar to solve the problems
27447         with assembly level attributes.
27448
27449         (outer_declaration): New grammar production.
27450
27451         (attribute_sections): Add.
27452
27453         (opt_attributes): Base on attribute_sections
27454
27455         (namespace_declaration): Allow opt_attributes to tackle the case
27456         when we have assembly level attributes - we are clever in this
27457         regard now ;-)
27458
27459         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27460         attributes in the non-global context.
27461
27462         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27463         instead of SetGlobalAttributes.
27464
27465         * class.cs, rootcontext.cs : Ensure we define and generate 
27466         attribute types before anything else.
27467
27468         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27469         and flag the new error -20 for the case when the attribute type
27470         does not have valid targets specified. csc does not catch this.
27471
27472         * ../errors/errors.txt : update for error # -20
27473
27474 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27475
27476         * support.cs (InternalParameters.ParameterModifier): Do some null
27477         checking and return sane values.
27478
27479         * class.cs (Method.Define): If we are a PInvoke method, ensure
27480         that we are static and extern. Report error # 601
27481
27482         * ../errors/cs0601.cs : Add test case for the above error.
27483
27484 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27485
27486         * rootcontext.cs (attribute_types): We need to keep type of
27487         all attribute types separately and emit code for them first.
27488
27489         (RegisterAttribute) : Implement.
27490
27491         * class.cs (DefineType): Check if the current Type is a custom
27492         attribute type and register it accordingly.
27493
27494         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27495         adding the first attribute twice and rename to
27496
27497         (SetGlobalAttributes): this.
27498
27499         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27500         lookups.
27501
27502         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27503         if we are processing global arguments. Hmm, I am unsure of this.
27504
27505 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27506
27507         * expression.cs: added static array of strings to avoid calling
27508         Enum.ToString () for Operator in Binary. Significant recover of
27509         performance.
27510
27511 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27512
27513         * class.cs (FindMembers): Allow the Builders of the various
27514         members to be null.  If they are skip them.  This only happens
27515         during the PInvoke declaration.
27516
27517 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27518
27519         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27520         failure, so we do not keep going afterwards.
27521
27522         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27523         wanted to pass `false' as the `is_delegate' argument.  If this is
27524         the case, why not use delegate_type == null to mean `is_delegate =
27525         false' and anything else as is_delegate = true.
27526
27527 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27528
27529         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27530         code for the section, not the beginning of the tests.
27531
27532 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27533
27534         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27535
27536         * expression.cs (Binary): same.  Warn about errors where we have
27537         Enum/Enum in operator + as well.
27538
27539 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27540
27541         * statement.cs:
27542                 - added support for switch(bool)
27543                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27544                 - add TableSwitchEmit() to handle table-based switch statements
27545
27546 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27547
27548         * expression.cs (Invocation.OverloadResolve): Factor out code which
27549         does parameter compatibility checking with arguments so that we can 
27550         re-use the code even from Delegate.VerifyApplicability
27551
27552         (VerifyArgumentsCompat): Move above code here.
27553
27554         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27555         and instead make a call to the above method.
27556
27557 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27558
27559         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27560         We use it to keep track of classes which are attribute types.
27561
27562 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27563
27564         * delegate.cs (Delegate.Define): Correctly define the types in the
27565         presence of fixed and array parameters.
27566
27567         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27568         doing FindMembers.
27569
27570         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27571         include NonPublic after the first iteration.
27572
27573         * class.cs (Indexer.CheckBase): Only check if both parents are
27574         non-null. 
27575
27576         * cs-parser.jay (accessor_body): If empty, set to null.
27577
27578         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27579         same code path here to resolve constants names that we did have in
27580         MemberAccess.DoResolve.  There is too much code duplicated here.
27581
27582 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27583
27584         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27585
27586         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27587         to MakeUnionSet.
27588
27589         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27590         tokens, numbers and strings.
27591
27592         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27593         parenthesis.
27594
27595         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27596         asyncronous parameters and the regular parameters.  
27597
27598         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27599         specify the target directory.
27600
27601         * expression.cs: (This.DoResolve): Simplify
27602         (As.Emit): Optimize, do not generate IsInst if the expression is
27603         always of the given type.
27604
27605         (Is.DoResolve): Bug fix, we were reporting both always/never for
27606         the is expression.
27607
27608         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27609         creating too many unnecessary arrays.
27610
27611 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27612
27613         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27614         fields instead of rolling our own initializer.   Takes care of all
27615         implicit conversions, and drops unnecessary static checks/argument.
27616
27617 2002-03-31  Dick Porter  <dick@ximian.com>
27618
27619         * driver.cs: use the GetDirectories() return values properly, and
27620         use "/" as path separator.
27621
27622 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27623
27624         * expression.cs (Unary): Optimize - - expr into expr.
27625         (Binary): Optimize a + (-b) into a -b.
27626
27627         * codegen.cs (CodeGen): Made all methods static.
27628
27629 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27630
27631         * rootcontext.cs: 
27632
27633         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27634         TypeBuilder property.
27635
27636         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27637         instead. 
27638
27639         * tree.cs: Removed the various RecordXXXX, and replaced with a
27640         single RecordDecl.  Removed all the accessor methods, and just
27641         left a single access point Type 
27642
27643         * enum.cs: Rename DefineEnum to DefineType.
27644
27645         * decl.cs: New abstract method `DefineType' used to unify the
27646         Defines for Enumerations, Interfaces, TypeContainers and
27647         Delegates.
27648
27649         (FindType): Moved LookupInterfaceOrClass here.  Moved the
27650         LookupBaseClasses method that used to live in class.cs and
27651         interface.cs here, and renamed to FindType.
27652
27653         * delegate.cs: Implement DefineType.  Take advantage of the
27654         refactored pattern for locating the parent builder without taking
27655         the parent_builder argument (which we know does not work if we are
27656         nested, and triggering a toplevel definition).
27657
27658 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27659
27660         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
27661         accessibility of a member has changed during override and report
27662         an error if so.
27663
27664         * class.cs (Method.Define, Property.Define): Only complain on
27665         overrides if the method is private, any other accessibility is
27666         fine (and since we just checked the permission is the same, we are
27667         good to go).
27668
27669         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
27670         and elif are processed always.  The other pre-processing
27671         directives are only processed if we are "taking" the path
27672
27673 2002-03-29  Martin Baulig  <martin@gnome.org>
27674
27675         * class.cs (Method.Emit): Only emit symbolic debugging info if the
27676         current location is not Null.
27677
27678         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
27679         a separate method so we can profile it.
27680
27681         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
27682         `span.Seconds' are just seconds, but no minutes or hours.
27683         (MainDriver): Profile the CodeGen.SaveSymbols calls.
27684
27685 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27686
27687         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
27688         Remove the gratuitous set of Final:
27689
27690                                 // If an interface implementation, then we can set Final.
27691                                 if (((flags & MethodAttributes.Abstract) == 0) &&
27692                                     implementing.DeclaringType.IsInterface)
27693                                         flags |= MethodAttributes.Final;
27694
27695         I do not know what I was smoking when I used that.
27696
27697
27698         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
27699         step into fixing the name resolution issues for delegates and
27700         unifying the toplevel name resolution.
27701
27702 2002-03-28  Martin Baulig  <martin@gnome.org>
27703
27704         * class.cs (Method.Emit): If we have a symbol writer, call its
27705         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
27706         tell it about the current method.
27707
27708         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
27709         writer that we're going to emit the first byte of IL code for a new
27710         statement (a new source line).
27711         (EmitContext.EmitTopBlock): If we have a symbol writer, call
27712         EmitContext.Mark() before emitting any code.
27713
27714         * location.cs (SymbolDocument): Return null when we're Null.
27715
27716         * statement.cs (Statement): Moved the `Location loc' variable here.
27717         (Statement.EmitBoolExpression): If we have a symbol writer, call
27718         ec.Mark() before emitting any code to tell it that we're at the
27719         beginning of a new statement.
27720         (StatementExpression): Added `Location' argument to the constructor.
27721         (Block): Added public readonly variable `StartLocation' and public
27722         variable `EndLocation'.  The latter is to be set using SetEndLocation().
27723         (Block): Added constructor which takes a start and end location.
27724         (Block.SetEndLocation): New method. This sets the end location.
27725         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
27726         local variables we create.
27727         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
27728         each statement and do also mark the begin and end of the block.
27729
27730         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
27731         tell it the current lexer.Location, use Location.Null for the end of the
27732         block.
27733         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
27734         current block, set its end location using SetEndLocation().
27735         (statement_expression): StatementExpression constructor now takes the
27736         lexer.Location as additional argument.
27737         (for_statement, declare_local_variables): Likewise.
27738         (declare_local_variables): When creating a new implicit block, use the
27739         new Block constructor and pass it the lexer.Location.
27740
27741 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27742
27743         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
27744         members also on the parent interfaces recursively.
27745
27746 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
27747
27748         * report.cs: Use new formats, since Gonzalo finished the missing
27749         bits. 
27750
27751         * expression.cs (Binary.ResolveOperator): added missing operator|
27752         operator& and operator^ for bool/bool.
27753
27754         * cs-parser.jay: CheckDef now takes a Location argument that is
27755         used to report errors more precisly (instead of reporting the end
27756         of a definition, we try to track something which is a lot closer
27757         to the source of the problem).
27758
27759         * cs-tokenizer.cs: Track global token use, so we can properly flag
27760         the use of #define/#undef after the first token has been seen.
27761
27762         Also, rename the reportXXXX to Error_DescriptiveName
27763
27764         * decl.cs (DeclSpace.IsTopLevel): Move property here from
27765         TypeContainer, so that Enum and Interface can use this too.
27766
27767         * class.cs (TypeContainer.LookupInterfaceOrClass,
27768         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
27769         `builder' argument.  Typically this was used to pass the parent
27770         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
27771         the definition).  
27772
27773         The problem is that a nested class could trigger the definition of
27774         a toplevel class, and the builder would be obviously wrong in that
27775         case. 
27776
27777         So we drop this argument, and we compute dynamically the
27778         TypeBuilder/ModuleBuilder (the correct information was available
27779         to us anyways from DeclSpace.Parent)
27780
27781         * interface.cs (Interface.DefineInterface): Drop builder
27782         parameter cleanup like class.cs
27783
27784         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
27785         like class.cs
27786
27787         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
27788         values. 
27789
27790         (Try.Emit): Propagate the returns value from the statement.
27791
27792         (Return.Emit): Even if we are leavning 
27793
27794         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
27795
27796         * modifiers.cs: Fix the computation of MethodAttributes flags.
27797
27798 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
27799
27800         * driver.cs: allow compilation of files that start with '/'.
27801         Add a default case when checking the argument of --target.
27802
27803 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
27804
27805         * interface.cs: Implement the same search algorithm for types in
27806         the interface code.
27807
27808         * delegate.cs: Do not allow multiple definition.
27809
27810         * Recovered ChangeLog that got accidentally amputated
27811
27812         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
27813
27814         * rootcontext.cs: Load manually enum to allow core classes to
27815         contain enumerations.
27816
27817         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
27818         Update to new static methods in TypeManager.
27819
27820         * typemanager.cs (GetMethod, GetConstructor): Use our
27821         implementation of FindMembers to find the members, since during
27822         corlib compilation, the types are TypeBuilders and GetMethod and
27823         GetConstructor do not work.
27824
27825         Make all methods in TypeManager static.
27826
27827         (InitCodeHelpers): Split the functionality from
27828         the InitCodeTypes function.
27829
27830         * driver.cs: Call InitCodeHelpers after we have populated the
27831         types. 
27832
27833         * cs-parser.jay (delegate_declaration): we did not used to compute
27834         the delegate name correctly for void delegates.
27835
27836 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
27837
27838         * rootcontext.cs (RootContext): Init the interface_resolve_order
27839         and type_container_resolve_order always.
27840
27841         (ResolveCore, BootstrapCorlib_ResolveClass,
27842         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
27843         compiler when compiling with --nostdlib
27844
27845         * class.cs (TypeContainer.DefineType): Check that our parent is
27846         not null.  This test is most important when we are bootstraping
27847         the core types.
27848
27849         * codegen.cs: Split out the symbol writing code.
27850
27851 2002-03-25  Martin Baulig  <martin@gnome.org>
27852
27853         * driver.cs (-g): Made -g an alias for --debug.
27854
27855 2002-03-24  Martin Baulig  <martin@gnome.org>
27856
27857         * codegen.cs (SymbolWriter): New public variable. Returns the
27858         current symbol writer.
27859         (CodeGen): Added `bool want_debugging_support' argument to the
27860          constructor. If true, tell the ModuleBuild that we want debugging
27861         support and ask it for the ISymbolWriter.
27862         (Save): If we have a symbol writer, call it's Close() method after
27863         saving the assembly.
27864
27865         * driver.c (--debug): New command line argument to create a
27866         debugger information file.
27867
27868         * location.cs (SymbolDocument): New public property. Returns an
27869         ISymbolDocumentWriter object for the current source file or null
27870         if we don't have a symbol writer.
27871
27872 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
27873
27874         * driver.cs (LoadAssembly): Correctly return when all the paths
27875         have been tried and not before.
27876
27877         * statement.cs (Switch.Emit): return the actual coverage for this
27878         statement (returns/not-returns)
27879
27880         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
27881         switch of the statement if we are the last switch section.  That
27882         kills two problems: try/catch problems (we used to emit an empty
27883         nop at the end) and switch statements where all branches would
27884         return. 
27885
27886 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
27887
27888         * driver.cs: Add default assemblies (the equivalent to the
27889         Microsoft CSC.RSP file)
27890
27891         * cs-tokenizer.cs: When updating `cols and setting it to zero,
27892         also update tokens_seen and set it to false.
27893
27894         * driver.cs: Implement --recurse for Mike.
27895
27896         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
27897         correctly splitting out the paths.
27898
27899 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
27900
27901         * interface.cs (Interface.PopulateProperty): Instead of using
27902         `parent' as the declaration space for the set parameters, use
27903         `this' 
27904
27905         * support.cs (InternalParameters): InternalParameters constructor
27906         takes a DeclSpace instead of a TypeContainer.
27907
27908         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
27909         types are being initialized, load the address of it before calling
27910         the function.  
27911
27912         (New): Provide a mechanism to disable the generation of local
27913         value type temporaries when the caller will be providing us with
27914         an address to store it.
27915
27916         (ArrayCreation.EmitDynamicInitializers): Use it.
27917
27918 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
27919
27920         * expression.cs (Invocation.EmitArguments): Only probe for array
27921         property if there is more than one argument.  Sorry about that.
27922
27923         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
27924         empty param arrays.
27925
27926         * class.cs (Method.LabelParameters): Fix incorrect code path that
27927         prevented the `ParamArrayAttribute' from being applied to the
27928         params attribute.
27929
27930 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
27931
27932         * support.cs (ReflectionParameters): Correctly compute whether the
27933         last argument is a params array.  Fixes the problem with
27934         string.Split ('a')
27935
27936         * typemanager.cs: Make the assemblies array always be non-null
27937         (empty, but non-null)
27938
27939         * tree.cs (RecordDecl): New function that abstracts the recording
27940         of names.  This reports error 101, and provides a pointer to the
27941         previous declaration.  Fixes a crash in the compiler.
27942
27943         * cs-parser.jay (constructor_declaration): Update to new grammar,
27944         and provide a constructor_body that can be empty.
27945
27946 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
27947
27948         * driver.cs: Add support for --resources.
27949
27950         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
27951         Make all types for the various array helper methods be integer.
27952
27953         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
27954         CheckState to ConvCast.
27955
27956         (ConvCast): Now it takes a `checked' state argument, to avoid
27957         depending on the emit context for the conversion, and just using
27958         the resolve time setting.
27959
27960         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
27961         instead of Invocation.EmitArguments.  We do not emit the original
27962         arguments, instead we emit those which have been converted to
27963         unsigned int expressions.
27964
27965         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
27966
27967         * codegen.cs: ditto.
27968
27969         * expression.cs (LocalVariableReference): Drop the use of the
27970         Store function that depended on the variable index.
27971
27972         * statement.cs (VariableInfo): Drop the `Idx' property from this
27973         class, as this is not taking into account the indexes for
27974         temporaries tat we generate during the execution, getting the
27975         indexes wrong.
27976
27977         * class.cs: First emit class initializers, then call the parent
27978         constructor. 
27979
27980         * expression.cs (Binary): Fix opcode emision.
27981         (UnaryMutator.EmitCode): Support checked code generation
27982
27983         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
27984         matches for events for both the Static and Instance scans,
27985         pointing to the same element.   Fix that.
27986
27987 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
27988
27989         * rootcontext.cs (ResolveTree): Always set the
27990         interface_resolve_order, because nested interfaces will be calling
27991         into us.
27992
27993         * class.cs (GetInterfaceOrClass): Track the same resolution
27994         process used by TypeManager.LookupType.  This fixes the nested
27995         type lookups in class declarations (separate path from
27996         LookupType). 
27997
27998         (TypeContainer.DefineType): Also define nested interfaces.
27999         (TypeContainer.RegisterOrder): New public function used to
28000         register the order in which child interfaces need to be closed.
28001
28002         Nested interfaces need to be closed after their parents have been
28003         created. 
28004
28005         * interface.cs (InterfaceAttr): Put all the logic for computing
28006         the interface attribute here. 
28007
28008         (DefineInterface): Register our interface order with the
28009         RootContext or with the TypeContainer depending on the case.
28010
28011 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28012
28013         * cs-parser.jay: rework foreach statement to work with the new
28014         changes to the policy on SimpleNames.
28015
28016         * report.cs: support Stacktrace on warnings as well.
28017
28018         * makefile: drop --unsafe and /unsafe from the compile.
28019
28020 2002-03-13  Ravi Pratap  <ravi@ximian.com>
28021
28022         * ecore.cs (StandardConversionExists): Modify to take an Expression
28023         as the first parameter. Ensure we do null -> reference type conversion
28024         checking.
28025
28026         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
28027         temporary Expression objects.
28028
28029 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
28030
28031         * interface.cs: workaround bug in method overloading resolution
28032         (there is already a bugzilla bug for it).
28033
28034 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28035
28036         We could also solve this problem by having a separate path for
28037         performing type lookups, instead of DoResolve, we could have a
28038         ResolveType entry point, and only participating pieces of the
28039         production (simplename, deref, array) would implement this. 
28040
28041         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
28042         signal SimpleName to only resolve type names and not attempt to
28043         resolve anything else.
28044
28045         * expression.cs (Cast): Set the flag.
28046
28047         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28048
28049         * class.cs: Only report 108 if there is no `new' modifier.
28050
28051         * cs-parser.jay: rework foreach statement to work with the new
28052         changes to the policy on SimpleNames.
28053
28054         * report.cs: support Stacktrace on warnings as well.
28055
28056         * makefile: drop --unsafe and /unsafe from the compile.
28057
28058 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28059
28060         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28061         lookups here, instead of doing that at parse time.  This means
28062         that our grammar will not introduce `LocalVariableReferences' as
28063         expressions at this point.  That solves the problem of code like
28064         this:
28065
28066         class X {
28067            static void Main ()
28068            { int X = 1;
28069             { X x = null }}}
28070
28071         This is only half the fix.  The full fix requires parameters to
28072         also be handled in this way.
28073
28074         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28075         makes the use more obvious of the DeclSpace.  The
28076         ec.TypeContainer.TypeBuilder is now only used to pull the
28077         TypeBuilder for it.
28078
28079         My theory is that I can get rid of the TypeBuilder completely from
28080         the EmitContext, and have typecasts where it is used (from
28081         DeclSpace to where it matters).  
28082
28083         The only pending problem is that the code that implements Aliases
28084         is on TypeContainer, and probably should go in DeclSpace.
28085
28086         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28087         lookups here, instead of doing that at parse time.  This means
28088         that our grammar will not introduce `LocalVariableReferences' as
28089         expressions at this point.  That solves the problem of code like
28090         this:
28091
28092         class X {
28093            static void Main ()
28094            { int X = 1;
28095             { X x = null }}}
28096
28097         This is only half the fix.  The full fix requires parameters to
28098         also be handled in this way.
28099
28100         * class.cs (Property.DefineMethod): When implementing an interface
28101         method, set newslot, when implementing an abstract method, do not
28102         set the flag (before we tried never setting it, or always setting
28103         it, which is the difference).
28104         (Indexer.DefineMethod): same.
28105         (Method.DefineMethod): same.
28106
28107         * ecore.cs: Only set the status used flag if we get back a Field.
28108
28109         * attribute.cs: Temporary hack, so Paolo can keep working.
28110
28111 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28112
28113         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28114         the unmanaged type in the case we have a MarshalAs attribute.
28115
28116         (Resolve): Handle the case when we are parsing the special MarshalAs
28117         attribute [we need to store the unmanaged type to use later]
28118
28119         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28120         MarshalAs Attribute.
28121
28122         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28123         on parameters and accordingly set the marshalling info.
28124
28125 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28126
28127         * class.cs: Optimizing slightly by removing redundant code after
28128         we switched to the `NoTypes' return value.
28129         (Property.DefineMethod): use NoTypes here too.
28130
28131         This fixes the bug I introduced in my last batch of changes.
28132
28133 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28134
28135         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28136
28137         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28138         Enums since those are types too. 
28139
28140         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28141
28142         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28143         thanks to a call during the lookup process.
28144
28145 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28146
28147         * statement.cs (Foreach): Lots of work to accomodate a particular
28148         kind of foreach statement that I had not kept in mind.  It is
28149         possible to have foreachs on classes that provide a GetEnumerator
28150         method that return objects that implement the "pattern" for using
28151         a foreach, there is no need to support GetEnumerator
28152         specifically. 
28153
28154         This is needed to compile nant.
28155
28156         * decl.cs: Only report 114 if the member is not `Finalize' and if
28157         the warning level is at least 2.
28158
28159         * class.cs: Moved the compare function from Method to
28160         MethodSignature. 
28161
28162         (MethodSignature.InheritableMemberSignatureCompare): Add new
28163         filter function that is used to extract inheritable methods from a
28164         class. 
28165
28166         (Method.Define): Use the new `inheritable_method_signature_filter'
28167         delegate
28168
28169         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28170         command. 
28171
28172 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28173
28174         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28175
28176         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28177
28178         * expression.cs: Pass location information to
28179         ConvertImplicitStandard. 
28180
28181         * class.cs: Added debugging code to track return values from
28182         interfaces. 
28183
28184 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28185
28186         * expression.cs (Is.DoResolve): If either side of the `is' is an
28187         interface, do not flag the warning.
28188
28189         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28190         for interfaces
28191
28192         * report.cs: Allow for --fatal to be used with --probe.
28193
28194         * typemanager.cs (NoTypes): Move the definition for the empty Type
28195         array here. 
28196
28197         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28198         properties. 
28199         (TypeContainer.DefineProxy): New function used to proxy to parent
28200         implementations when implementing interfaces.
28201         (TypeContainer.ParentImplements): used to lookup if our parent
28202         implements a public function that is required by an interface.
28203         (TypeContainer.VerifyPendingMethods): Hook this up.
28204
28205         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28206         `modules' and `assemblies' arraylists into arrays.  We only grow
28207         these are the very early start up of the program, so this improves
28208         the speedof LookupType (nicely measured).
28209
28210         * expression.cs (MakeByteBlob): Replaced unsafe code with
28211         BitConverter, as suggested by Paolo.
28212
28213         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28214         folding of string concatenation, but if either side is a string,
28215         and the other is not, then return null, and let the runtime use
28216         the concatenation on the string plus the object (using
28217         `Object.ToString'). 
28218
28219 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28220
28221         Constant Folding has been implemented now.
28222
28223         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28224         the error instead on types that are not supported in one's
28225         complement. 
28226
28227         * constant.cs (Constant and all children): New set of functions to
28228         perform implict and explicit conversions.
28229
28230         * ecore.cs (EnumConstant): Implement the new functions to perform
28231         conversion by proxying to the child expression.
28232
28233         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28234         own separate setting that can not be turned off from the command
28235         line using --unchecked or --checked and is only controlled using
28236         the checked/unchecked statements and expressions.  This setting is
28237         used by the constant folder to flag errors.
28238
28239         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28240         ConstantCheckState as well.   
28241
28242         During Resolve, they also have to flag the state, because the
28243         constant folder runs completely in the Resolve phase.
28244
28245         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28246         well.
28247
28248 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28249
28250         * cfold.cs: New file, this file contains the constant folder.
28251
28252         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28253         argument to track whether we are using the resulting address to
28254         load or store a value and provide better error messages. 
28255
28256         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28257         new AddressOf arguments.
28258
28259         * statement.cs (Foreach.EmitCollectionForeach): Update
28260
28261         * expression.cs (Argument.Emit): Call AddressOf with proper
28262         arguments to track usage.
28263
28264         (New.DoEmit): Call AddressOf with new arguments.
28265
28266         (Unary.Emit): Adjust AddressOf call.
28267
28268 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28269
28270         * cs-parser.jay (member_access): Change the case for pre-defined types
28271         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28272         this suggestion.
28273
28274         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28275         a method body.
28276
28277         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28278         essentially like methods and apply attributes like MethodImplOptions to them too.
28279
28280         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28281         not being null.
28282
28283         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28284         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28285         is the DeclSpace.
28286
28287         * Update code everywhere accordingly.
28288
28289         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28290
28291         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28292
28293 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28294
28295         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28296         try performing lookups against those instead of jumping straight into using
28297         the 'using' clauses.
28298
28299         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28300
28301         (LookupType): Perform lookups in implicit parents too.
28302
28303         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28304         sequence as RootContext.LookupType. 
28305
28306         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28307         the various cases of namespace lookups into this method.
28308
28309 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28310
28311         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28312         in positional arguments)
28313
28314         * class.cs (Operator): Update the AllowedModifiers to contain
28315         extern. 
28316
28317         * cs-parser.jay: Update operator declaration to allow for the
28318         operator body to be empty.
28319
28320         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28321         values. 
28322
28323 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28324
28325         * class.cs (Method.Emit): Label parameters.
28326
28327         * driver.cs: Return 1 or 0 as the program exit code.
28328
28329 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28330
28331         * expression.cs: Special case the `null' object when trying to
28332         auto-compute the type, as anything can be explicitly converted to
28333         that. 
28334
28335         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28336         spotting this Paolo.
28337
28338         (Expression.ImplicitNumericConversion): Perform comparissions of
28339         the type using the underlying type in the case of an enumeration
28340         rather than using the enumeration type for the compare.
28341
28342         Cope with the underlying == type case, which is not possible to
28343         catch before. 
28344
28345         (Expression.ConvertNumericExplicit): Perform comparissions of
28346         the type using the underlying type in the case of an enumeration
28347         rather than using the enumeration type for the compare.
28348
28349         * driver.cs: If the user does not supply an extension, assume .exe
28350
28351         * cs-parser.jay (if_statement): Rewrote so that we can track the
28352         location for the if statement.
28353
28354         * expression.cs (Binary.ConstantFold): Only concat strings when
28355         the operation is "+", not everything ;-)
28356
28357         * statement.cs (Statement.EmitBoolExpression): Take a location
28358         argument. 
28359         (If, While, Do): Track location.
28360
28361         * expression.cs (Binary.ResolveOperator): In the object + string
28362         case, I was missing a call to ConvertImplicit
28363
28364 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28365
28366         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28367         Location arguments. Ensure we use RootContext.LookupType to do our work
28368         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28369
28370         * interface.cs (PopulateMethod): Handle the type of the parameter being
28371         null gracefully.
28372
28373         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28374         have a params method with no fixed arguments and a call is made with no
28375         arguments.
28376
28377 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28378
28379         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28380         the verbatim-string-literal
28381
28382         * support.cs (InternalParameters.ParameterModifier): handle null
28383         fixed parameters.
28384         (InternalParameters.ParameterType): ditto.
28385
28386         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28387         duplicating the name of the variable parameter.
28388         (GetParameterByName): Fix bug where we were not looking up array
28389         paramters if they were the only present (thanks Paolo!).
28390         (GetParameterInfo): We only have an empty set of types if both
28391         fixed and array are set to null.
28392         (GetParameterInfo-idx): Handle FixedParameter == null
28393
28394         * cs-parser.jay: Handle the case where there is no catch
28395         statements (missing null test).
28396
28397 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28398
28399         * driver.cs (MainDriver): Be conservative on our command line
28400         handling.
28401
28402         Catch DirectoryNotFoundException when calling GetFiles.
28403
28404         (SplitPathAndPattern): Used to split the input specification into
28405         a path and a pattern that we can feed to Directory.GetFiles.
28406
28407 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28408
28409         * statement.cs (Fixed): Implement the last case of the Fixed
28410         statement (string handling).
28411
28412         * expression.cs (StringPtr): New class used to return a char * to
28413         a string;  Used by the Fixed statement.
28414
28415         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28416
28417         * expression.cs (Binary.ResolveOperator): Remove redundant
28418         MemberLookup pn parent type.
28419         Optimize union call, we do not need a union if the types are the same.
28420         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28421         type.
28422
28423         Specialize the use of MemberLookup everywhere, instead of using
28424         the default settings. 
28425
28426         (StackAlloc): Implement stackalloc keyword.
28427
28428         * cs-parser.jay: Add rule to parse stackalloc.
28429
28430         * driver.cs: Handle /h, /help, /?
28431
28432         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28433         before we supported unsafe code.
28434
28435         * makefile: add --unsafe to the self compilation of mcs.
28436
28437 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28438
28439         * expression.cs (PointerArithmetic): New class that is used to
28440         perform pointer arithmetic.
28441         (Binary.Resolve): Handle pointer arithmetic
28442         Handle pointer comparission.
28443         (ArrayPtr): Utility expression class that is used to take the
28444         address of an array.
28445
28446         (ElementAccess): Implement array access for pointers
28447
28448         * statement.cs (Fixed): Implement fixed statement for arrays, we
28449         are missing one more case before we are done.
28450
28451         * expression.cs (Indirection): Implement EmitAssign and set the
28452         ExprClass to Variable.  This allows pointer dereferences to be
28453         treated as variables, and to have values assigned to them.
28454
28455         * ecore.cs (Expression.StoreFromPtr): New utility function to
28456         store values dereferencing.
28457
28458 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28459
28460         * expression.cs (Binary.ResolveOperator): Ensure that we are
28461         not trying to operate on a void type - this fixes the reported
28462         bug.
28463
28464         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28465         the parent implementation is sealed.
28466
28467         * ../errors/cs0239.cs : Add.
28468
28469         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28470
28471         * typemanager.cs (unverifiable_code_type): Corresponds to 
28472         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28473         which have unsafe code in them.
28474
28475         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28476         unsafe context.
28477
28478 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28479
28480         * cs-tokenizer.cs: Add support for @"litreal strings"
28481
28482         Make tokenizer accept pre-processor directives
28483         on any column (remove the old C-like limitation). 
28484
28485         * rootcontext.cs (EmitCode): Emit any global attributes.
28486         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28487
28488         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28489
28490         * cs-parser.jay: Add support for global attributes.  
28491
28492 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28493
28494         * expression.cs (Indirection): New helper class.  Unary will
28495         create Indirection classes to be able to implement the
28496         IMemoryLocation interface on it.
28497
28498 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28499
28500         * cs-parser.jay (fixed_statement): reference the right statement.
28501
28502         * statement.cs (Fixed.Emit): Finish implementing the fixed
28503         statement for the &x case.
28504
28505 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28506
28507         * class.cs (Property.Define, Method.Define): Remove newslot when
28508         `implementing'.  
28509
28510         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28511         wrong.  NewSlot should only be used if the `new' keyword is present.
28512
28513         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28514         locating our system dir.  Sorry about this.
28515
28516 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28517
28518         * driver.cs (GetSystemDir): Compute correctly the location of our
28519         system assemblies.  I was using the compiler directory instead of
28520         the library directory.
28521
28522 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28523
28524         * expression.cs (BetterFunction): Put back in what Miguel commented out
28525         since it is the correct fix. The problem is elsewhere ;-)
28526
28527         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28528         parameters of the parms method are themselves compatible or not !
28529
28530         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28531         to check that a class implements an interface before saying that an implicit
28532         conversion was allowed. Use ImplementsInterface to do the checking.
28533
28534 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28535
28536         * class.cs (Method.Define): Track whether we are an explicit
28537         implementation or not.  And only call DefineMethodOverride if we
28538         are an explicit implementation.
28539
28540         (Property.DefineMethod): Ditto.
28541
28542 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28543
28544         * expression.cs (BetterFunction): Catch hideous bug which was
28545          preventing us from detecting ambiguous calls due to implicit casts i.e
28546         cs0121.
28547
28548 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28549
28550         * support.cs (Pair): Remove un-needed method.  I figured why I was
28551         getting the error in cs-parser.jay, the variable in a foreach loop
28552         is readonly, and the compiler does not really treat this as a variable.
28553
28554         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28555         instead of EQUALS in grammar.  
28556
28557         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28558
28559         * expression.cs (Unary.DoResolve): Check whether the argument is
28560         managed or not.
28561
28562 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28563
28564         * support.cs: Api for Pair to set a value.  Despite the fact that
28565         the variables are public the MS C# compiler refuses to compile
28566         code that accesses the field if the variable is part of a foreach
28567         statement. 
28568
28569         * statement.cs (Fixed): Begin implementation of the fixed
28570         statement.
28571
28572         (Block.AddVariable): Return the VariableInfo on success and null
28573         on failure instead of true/false. 
28574
28575         * cs-parser.jay (foreach): Catch errors on variables already
28576         defined (we were ignoring this value before) and properly unwind
28577         the block hierarchy
28578
28579         (fixed_statement): grammar for the fixed statement.
28580
28581 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28582
28583         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28584         pointer types to be incretemented.
28585
28586         (SizeOf): Implement.
28587
28588         * cs-parser.jay (pointer_member_access): Implement
28589         expr->IDENTIFIER production.
28590
28591         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28592         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28593         on safe contexts.
28594
28595         (Unary): Implement indirection.
28596
28597         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28598         use in non-unsafe context).
28599
28600         (SimpleName.DoResolve): Check for pointers in field access on safe
28601         contexts. 
28602
28603         (Expression.LoadFromPtr): Factor the load-indirect code in this
28604         function.  This was duplicated in UnboxCast and ParameterReference
28605
28606 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28607
28608         * expression.cs (ComposedCast): report an error if a pointer cast
28609         is used in a safe region.
28610
28611         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28612         pointer type casts in unsafe context.
28613
28614         * codegen.cs (EmitContext): Set up IsUnsafe.
28615
28616         * cs-parser.jay (non_expression_type): Add productions for pointer
28617         casts. 
28618
28619         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28620         code.  We should not use force into static mode if the method is
28621         not virtual.  Fixes bug in MIS
28622
28623         * statement.cs (Do.Emit, While.Emit, For.Emit,
28624         Statement.EmitBoolExpression): Add support to Do and While to
28625         propagate infinite loop as `I do return' semantics.
28626
28627         Improve the For case to also test for boolean constants.
28628
28629         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28630         to the list of attributes we can add.
28631
28632         Remove `EmitContext' argument.
28633
28634         * class.cs (Method.Define): Apply parameter attributes.
28635         (Constructor.Define): Apply parameter attributes.
28636         (MethodCore.LabelParameters): Move here the core of labeling
28637         parameters. 
28638
28639         * support.cs (ReflectionParameters.ParameterModifier,
28640         InternalParameters.ParameterModifier): Use IsByRef on the type and
28641         only return the OUT bit for these parameters instead of in/out/ref
28642         flags.
28643
28644         This is because I miss-understood things.  The ParameterInfo.IsIn
28645         and IsOut represent whether the parameter has the [In] and [Out]
28646         attributes set.  
28647
28648 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
28649
28650         * ecore.cs (FieldExpr.Emit): Release temporaries.
28651
28652         * assign.cs (LocalTemporary.Release): new function.
28653
28654         * codegen.cs (EmitContext.GetTemporaryStorage,
28655         EmitContext.FreeTemporaryStorage): Rework the way we deal with
28656         temporary storage.  Now we can "put back" localbuilders when we
28657         are done with them
28658
28659 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
28660
28661         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
28662         need to make a copy of the variable to generate verifiable code.
28663
28664 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
28665
28666         * driver.cs: Compute dynamically the system directory.
28667
28668         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
28669         Slower, but more generally useful.  Used by the abstract
28670         registering implementation. 
28671
28672         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
28673         the rules for the special rule on Type/instances.  First check if
28674         we have the same name, and if so, try that special static path
28675         rather than the instance path.
28676
28677 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
28678
28679         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
28680         for, while and if.
28681
28682         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
28683         Enum, ValueType, Delegate or Array for non-corlib compiles.
28684
28685         * cs-tokenizer.cs: Catch long identifiers (645)
28686
28687         * typemanager.cs (IndexerPropetyName): Ravi never tested this
28688         piece of code.
28689
28690         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
28691         fix, we were returning too early, so we were not registering
28692         pending methods from abstract classes.
28693
28694         Do not register pending methods if the class is abstract.
28695
28696         * expression.cs (Conditional.DoResolve): Report circular implicit
28697         conversions when we neecd to compute it for conditional
28698         expressions. 
28699
28700         (Is.DoResolve): If the expression is always of the provided type,
28701         flag warning 183.  If the expression can not ever be of the
28702         provided type flag warning 184.
28703
28704         * class.cs: Catch 169 as well.
28705
28706         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
28707         read. 
28708
28709 2002-01-18  Nick Drochak  <ndrochak@gol.com>
28710
28711         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
28712
28713 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
28714
28715         * interface.cs: (PopulateMethod): Check for pointers being defined
28716         only if the unsafe context is active.
28717         (PopulateProperty): ditto.
28718         (PopulateIndexer): ditto.
28719
28720         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
28721         specified.  If pointers are present, make sure that they are
28722         present in an unsafe context.
28723         (Constructor, Constructor.Define): ditto.
28724         (Field, Field.Define): ditto.
28725         (Property, Property.Define): ditto.
28726         (Event, Event.Define): ditto.
28727
28728         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
28729         hashtable if there are classes or structs defined.
28730
28731         * expression.cs (LocalVariableReference.DoResolve): Simplify this
28732         code, as the constant resolution moved.
28733
28734         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
28735         the metadata, so we can flag error 133. 
28736
28737         * decl.cs (MemberCore.UnsafeOK): New function to test that a
28738         pointer is being declared in an unsafe context.
28739
28740 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
28741
28742         * modifiers.cs (Modifiers.Check): Require a Location argument.
28743         Report error 227 for Unsafe use.
28744
28745         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
28746
28747         * statement.cs (For.Emit): If the test is null, then report that
28748         we do `return', as we wont reach anything afterwards.
28749
28750         (Switch.SwitchGoverningType): Track the expression that matched
28751         the conversion.
28752
28753         * driver.cs: Allow negative numbers as an error code to flag.
28754
28755         * cs-parser.jay: Handle 1551.
28756
28757         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
28758
28759 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28760
28761         * cs-parser.jay: Report 1518 (type declaration can only contain
28762         class, struct, interface, enum or delegate)
28763
28764         (switch_label): Report 1523 (keywords `case' or `default' must
28765         preced code)
28766
28767         (opt_switch_sections): Report 1522 (empty switch)
28768
28769         * driver.cs: Report 1515 (response file specified multiple times)
28770         Report 1516 (Source file specified multiple times).
28771
28772         * expression.cs (Argument.Resolve): Signal 1510
28773
28774         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
28775         access not allowed in static code)
28776
28777 2002-01-11  Ravi Pratap  <ravi@ximian.com>
28778
28779         * typemanager.cs (IsPointerType): Utility method which we are going
28780         to need a lot.
28781
28782         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
28783         the object type, so we take care of that.
28784
28785         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
28786
28787         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
28788         added to non-params parameters :-)
28789
28790         * typemanager.cs (CSharpName): Include 'void' type too. 
28791
28792         (void_ptr_type): Include in the set of core types.
28793
28794         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
28795         duplicating code.
28796
28797         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
28798         an unsafe context.
28799
28800         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
28801         completely forgotten about it.
28802
28803 2002-01-10  Ravi Pratap  <ravi@ximian.com>
28804
28805         * cs-parser.jay (pointer_type): Add. This begins our implementation
28806         of parsing rules for unsafe code.
28807
28808         (unsafe_statement): Implement.
28809
28810         (embedded_statement): Modify to include the above.
28811
28812         * statement.cs (Unsafe): Implement new class for unsafe blocks.
28813
28814         * codegen.cs (EmitContext.InUnsafe): Add. This determines
28815         if the current context is an unsafe one.
28816
28817         * cs-parser.jay (local_variable_pointer_type): Since local variable types
28818         are handled differently, we need separate rules for them.
28819
28820         (local_variable_declaration): Update to use local_variable_pointer_type
28821         to allow variable declarations of unmanaged pointer types.
28822
28823         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
28824         in unsafe contexts.
28825
28826         * ../errors/cs0214.cs : Add.
28827
28828 2002-01-16  Nick Drochak  <ndrochak@gol.com>
28829
28830         * makefile: remove 'response' file when cleaning.
28831
28832 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28833
28834         * cs-parser.jay: Report 1524.
28835
28836 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
28837
28838         * typemanager.cs (RegisterMethod): drop checking if we have
28839         registered this from here
28840
28841 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
28842
28843         * class.cs (Method.EmitDestructor): Implement calling our base
28844         destructor. 
28845
28846         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
28847         value of InFinally.
28848
28849         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
28850         this routine and will wrap the call in a try/catch block.  Deal
28851         with the case.
28852
28853 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
28854
28855         * ecore.cs (Expression.MemberLookup): instead of taking a
28856         parameter `same_type' that was used to tell whether we could
28857         access private members we compute our containing type from the
28858         EmitContext.
28859
28860         (FieldExpr): Added partial support for volatile fields.  This does
28861         not work for volatile fields exposed from assemblies, as I can not
28862         figure out how to extract the modreq from it.
28863
28864         Updated all the source files to use this.
28865
28866         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
28867         because it is referenced by MemberLookup very often. 
28868
28869 2002-01-09  Ravi Pratap  <ravi@ximian.com>
28870
28871         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
28872         TypeBuilder.GetCustomAttributes to retrieve what we need.
28873
28874         Get rid of redundant default_member_attr_type as this is the same as
28875         default_member_type which already exists.
28876
28877         * interface.cs, attribute.cs : Update accordingly.
28878
28879 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
28880
28881         * typemanager.cs: Enable IndexerPropertyName again.  It does not
28882         work for TYpeBuilders though.  Ravi, can you please fix this?
28883
28884         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
28885
28886         * expression.cs (Argument.Emit): Handle the case of ref objects
28887         being passed to ref functions;  
28888
28889         (ParameterReference.EmitLoad): Loads the content of the pointer
28890         without dereferencing.
28891
28892 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28893
28894         * cs-tokenizer.cs: Implemented the pre-processing expressions.
28895
28896 2002-01-08  Ravi Pratap  <ravi@ximian.com>
28897
28898         * class.cs (Indexer.DefineMethod): Incorporate the interface
28899         type in the name of the method if we are doing explicit interface
28900         implementation.
28901
28902         * expression.cs (ConversionExists): Remove as it is completely obsolete.
28903
28904         (BetterConversion): Fix extremely trivial bug where we were referring to
28905         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
28906         again !
28907
28908         * ../errors/bug16.cs : Add although we have fixed it.
28909
28910 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28911
28912         * expression.cs (BaseIndexer): Begin implementation.
28913
28914         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
28915
28916         * cs-parser.jay (indexer_declarator): Use qualified_identifier
28917         production directly to remove a shift/reduce, and implement
28918         explicit interface implementation.
28919
28920         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
28921         after a floating point suffix.
28922
28923         * expression.cs (DoNumericPromotions): Improved the conversion for
28924         uint/uint.  If we have a constant, we avoid doing a typecast to a
28925         larger type.
28926
28927         * class.cs (Indexer): Implement explicit interface implementation
28928         for indexers.
28929
28930 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28931
28932         * class.cs: make the default instance constructor public and hidebysig.
28933
28934 2001-01-03  Ravi Pratap  <ravi@ximian.com>
28935
28936         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
28937         so we can call it from elsewhere.
28938
28939         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
28940         we emit it internally if the class has a defined indexer; otherwise the user
28941         emits it by decorating the class definition with the DefaultMemberAttribute.
28942
28943         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
28944         attribute is not used on a type which defines an indexer.
28945
28946         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
28947         character when we skip whitespace.
28948
28949         * ../errors/cs0646.cs : Add.
28950
28951 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
28952
28953         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
28954         again. 
28955
28956         * makefile: Add practical target `mcs3.exe' which builds the third
28957         generation compiler. 
28958
28959         * expression.cs (New): Fix structures constructor calling.
28960
28961         * class.cs (Property, Method, Indexer): Emit Final flag on the
28962         method if we are an interface implementation and we are not
28963         abstract. 
28964
28965         * ecore.cs (PropertyExpr): New public field `IsBase', tells
28966         whether this property is referencing a `base' method.
28967
28968         * expression.cs (Invocation.EmitCall): take an extra argument:
28969         is_base, this is used to determine whether the `call' or
28970         `callvirt' opcode should be used.
28971
28972
28973         * delegate.cs: update EmitCall.
28974
28975         * class.cs (Method.Define): Set NewSlot for the cases where we are
28976         not implementing an interface method.
28977
28978         (Property.Define): ditto.
28979
28980 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
28981
28982         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
28983         'r'.  Allows mcs to parse itself fully.
28984
28985 2002-01-02  Ravi Pratap  <ravi@ximian.com>
28986
28987         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
28988         of the number of initializers that require the InitializeArray method.
28989
28990         (CheckIndices): Store the Expression in all cases - not the plain value. Also
28991         update the above field where necessary.
28992
28993         (MakeByteBlob): Update accordingly.
28994
28995         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
28996         greater than 2.
28997
28998         (EmitDynamicInitializers): Update in accordance with the new optimization.
28999
29000         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
29001         same OpCode applies.
29002
29003         * cs-parser.jay : Fix some glaring errors I introduced.
29004
29005 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
29006
29007         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
29008         so that we can check for name clashes there too.
29009
29010         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
29011         for interface indexers.
29012
29013         * interfaces.cs (Define): Emit the default member attribute.
29014
29015         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
29016         variable was being referred to while setting the value ;-)
29017
29018 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
29019
29020         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
29021         byte-by-byte information when we know the data is zero.
29022
29023         Make the block always a multiple of 4, because
29024         DefineInitializedData has a bug.
29025
29026         * assign.cs: Fix, we should assign from the temporary, not from
29027         the source. 
29028
29029         * expression.cs (MakeByteBlob): Fix my incorrect code.
29030
29031 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
29032
29033         * typemanager.cs (EnumToUnderlying): This function is used to get
29034         the underlying type from an enumeration, because it does not
29035         always work. 
29036
29037         * constant.cs: Use the I4_S form for values between -128 and 127.
29038
29039         * statement.cs (Block.LookupLabel): Looks up a label.
29040         (Block): Drop support for labeled blocks.
29041
29042         (LabeledStatement): New kind of statement that represents a label
29043         only.
29044
29045         (Goto): Finally implement this bad boy.
29046
29047         * cs-parser.jay: Update to reflect new mechanism to implement
29048         labels.
29049
29050 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29051
29052         * codegen.cs (EmitContext.This): a codegen property that keeps the
29053         a single instance of this instead of creating many different this
29054         instances. 
29055
29056         * delegate.cs (Delegate.DoResolve): Update to use the property;
29057
29058         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29059
29060         * expression.cs (BaseAccess.DoResolve): Ditto.
29061
29062 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29063
29064         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29065         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29066
29067         (InitCoreTypes): Update accordingly.
29068
29069         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29070         so we can quickly store the state.
29071
29072         (ApplyAttributes): Set the correct implementation flags
29073         for InternalCall methods.
29074
29075 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29076
29077         * expression.cs (EmitCall): if a method is not virtual, then do
29078         not use callvirt on it.
29079
29080         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29081         user defined stuff) requires the use of stobj, which takes an
29082         address on the stack instead of an array and an index.  So emit
29083         the Ldelema operation for it.
29084
29085         (EmitStoreOpcode): Use stobj for valuetypes.
29086
29087         (UnaryMutator.EmitCode): Use the right 1 value depending on
29088         whether we are dealing with int64/uint64, float or doubles.
29089
29090         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29091         constructors that I implemented last night.
29092
29093         (Constructor.IsDefault): Fix to work properly for static
29094         constructors.
29095
29096         * cs-parser.jay (CheckDef): report method signature errors.
29097         Update error number 103 to be 132.
29098
29099         * decl.cs: New AdditionResult enumeration value: MethodExists.
29100         Although we do this check for methods later on in the semantic
29101         analysis, catching repeated default constructors is so easy that
29102         we catch these here. 
29103
29104         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29105         promotions code.
29106
29107         (ParameterReference.EmitAssign, Emit): handle
29108         bools as bytes.
29109
29110         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29111         (ArrayAccess.EmitStoreOpcode): ditto.
29112
29113         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29114
29115         * expression.cs (MakeByteBlob): Complete all the missing types
29116         (uint, short, ushort, byte, sbyte)
29117
29118         * class.cs: Only init instance field initializers on instance
29119         constructors. 
29120
29121         Rename `constructors' to instance_constructors. 
29122
29123         (TypeContainer.AddConstructor): Only add constructors to the list
29124         if it is not static.
29125
29126         Make sure that we handle default_static_constructor independently
29127         everywhere where we handle instance_constructors
29128
29129 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29130
29131         * class.cs: Do not lookup or create a base initializer for a
29132         static constructor.
29133
29134         (ConstructorInitializer.Resolve): use the proper type to lookup
29135         for constructors.
29136
29137         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29138
29139         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29140         in DeclSpace. 
29141
29142         * decl.cs: CloseType is now an virtual method, the default
29143         implementation just closes this type.
29144
29145 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29146
29147         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29148         to PreserveSig by default. Also emit HideBySig on such methods.
29149
29150         Basically, set the defaults to standard values.
29151
29152         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29153         argument, if candidate is better, it can't be worse than the best !
29154
29155         (Invocation): Re-write bits to differentiate between methods being
29156         applicable in their expanded form and their normal form - for params
29157         methods of course.
29158
29159         Get rid of use_standard everywhere as only standard conversions are allowed
29160         in overload resolution. 
29161
29162         More spec conformance.
29163
29164 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29165
29166         * driver.cs: Add --timestamp, to see where the compiler spends
29167         most of its time.
29168
29169         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29170         `this' in static code.
29171
29172         (SimpleName.DoResolve): Implement in terms of a helper function
29173         that allows static-references to be passed upstream to
29174         MemberAccess.
29175
29176         (Expression.ResolveWithSimpleName): Resolve specially simple
29177         names when called by MemberAccess to implement the special
29178         semantics. 
29179
29180         (Expression.ImplicitReferenceConversion): Handle conversions from
29181         Null to reference types before others, as Null's type is
29182         System.Object. 
29183
29184         * expression.cs (Invocation.EmitCall): Handle the special case of
29185         calling methods declared on a reference type from a ValueType
29186         (Base classes System.Object and System.Enum)
29187
29188         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29189         the left hand side is a TypeExpr, not on every enumeration. 
29190
29191         (Binary.Resolve): If types are reference types, then do a cast to
29192         object on operators != and == of both arguments.
29193
29194         * typemanager.cs (FindMembers): Extract instance and static
29195         members if requested.
29196
29197         * interface.cs (PopulateProperty): Use void_type instead of null
29198         as the return type for the setter method.
29199
29200         (PopulateIndexer): ditto.
29201
29202 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29203
29204         * support.cs (ReflectionParameters): Fix minor bug where we
29205         were examining the wrong parameter for the ParamArray attribute.
29206
29207         Cope with requests for the type of the parameter at position
29208         greater than the params parameter's. We now return the element
29209         type of the params array as that makes more sense.
29210
29211         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29212         accordingly as we no longer have to extract the element type
29213         ourselves.
29214
29215         (Invocation.OverloadResolve): Update.
29216
29217 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29218
29219         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29220         against IEnumerator, test whether the return value is a descendant
29221         of the IEnumerator interface.
29222
29223         * class.cs (Indexer.Define): Use an auxiliary method to implement
29224         the other bits of the method definition.  Begin support for
29225         explicit interface implementation.
29226
29227         (Property.DefineMethod): Use TypeManager.void_type instead of null
29228         for an empty return value.
29229
29230 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29231
29232         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29233         dealing with a FieldExpr which is composed of a FieldBuilder, in
29234         the code path we did extract the constant, but we should have
29235         obtained the underlying value to be able to cast it (otherwise we
29236         end up in an infinite loop, this is what Ravi was running into).
29237
29238         (ArrayCreation.UpdateIndices): Arrays might be empty.
29239
29240         (MemberAccess.ResolveMemberAccess): Add support for section
29241         14.5.4.1 that deals with the special case of E.I when E is a type
29242         and something else, that I can be a reference to a static member.
29243
29244         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29245         handle a particular array type to create byte blobs, it is just
29246         something we dont generate byteblobs for.
29247
29248         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29249         arguments. 
29250
29251         * location.cs (Push): remove the key from the hashtable that we
29252         are about to add.   This happens for empty files.
29253
29254         * driver.cs: Dispose files after we have parsed them.
29255
29256         (tokenize): new function that only runs the tokenizer on its
29257         input, for speed testing.
29258
29259 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29260
29261         * class.cs (Event.Define): Define the private field only if there
29262         are no accessors defined.
29263
29264         * expression.cs (ResolveMemberAccess): If there is no associated
29265         field with the event, that means we have an event defined with its
29266         own accessors and we should flag error cs0070 since transforming
29267         ourselves into a field is not valid in that case.
29268
29269         * ecore.cs (SimpleName.DoResolve): Same as above.
29270
29271         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29272         and charset to sane values.
29273
29274 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29275
29276         * assign.cs (DoResolve): Perform check on events only if they 
29277         are being accessed outside the declaring type.
29278
29279         * cs-parser.jay (event_declarations): Update rules to correctly
29280         set the type of the implicit parameter etc.
29281
29282         (add_accessor, remove_accessor): Set current local parameters.
29283
29284         * expression.cs (Binary): For delegate addition and subtraction,
29285         cast the return value from the method into the appropriate delegate
29286         type.
29287
29288 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29289
29290         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29291         of these as the workaround is unnecessary.
29292
29293         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29294         delegate data - none of that is needed at all.
29295
29296         Re-write bits to extract the instance expression and the delegate method
29297         correctly.
29298
29299         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29300         on delegates too.
29301
29302         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29303         of attaching attributes instead of duplicating code everywhere.
29304
29305         * everywhere : Update code to do attribute emission using the above method.
29306
29307 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29308
29309         * expression.cs (IsParamsMethodApplicable): if there are not
29310         parameters, return immediately.
29311
29312         * ecore.cs: The 0 literal can be implicity converted to an enum
29313         type. 
29314
29315         (SimpleName.DoResolve): First lookup the type, then lookup the
29316         members. 
29317
29318         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29319         want to get its address.  If the InstanceExpression is not
29320         addressable, store the result in a temporary variable, then get
29321         the address of it.
29322
29323         * codegen.cs: Only display 219 errors on warning level or above. 
29324
29325         * expression.cs (ArrayAccess): Make it implement the
29326         IMemoryLocation interface.
29327
29328         (Binary.DoResolve): handle the operator == (object a, object b)
29329         and operator != (object a, object b) without incurring into a
29330         BoxedCast (because 5 != o should never be performed).
29331
29332         Handle binary enumerator operators.
29333
29334         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29335         value type, otherwise use Ldelem_ref.
29336
29337         Use precomputed names;
29338
29339         (AddressOf): Implement address of
29340
29341         * cs-parser.jay (labeled_statement): Fix recursive block
29342         addition by reworking the production.
29343
29344         * expression.cs (New.DoEmit): New has a special case:
29345                 
29346                  If we are dealing with a ValueType, we have a few
29347                  situations to deal with:
29348                 
29349                     * The target of New is a ValueType variable, that is
29350                       easy, we just pass this as the variable reference
29351                 
29352                     * The target of New is being passed as an argument,
29353                       to a boxing operation or a function that takes a
29354                       ValueType.
29355                 
29356                       In this case, we need to create a temporary variable
29357                       that is the argument of New.
29358
29359
29360 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29361
29362         * rootcontext.cs (LookupType): Check that current_type is not null before
29363         going about looking at nested types.
29364
29365         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29366         not implement the IAssignMethod interface any more.
29367
29368         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29369         where we tranform them into FieldExprs if they are being resolved from within
29370         the declaring type.
29371
29372         * ecore.cs (SimpleName.DoResolve): Do the same here.
29373
29374         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29375
29376         * ../errors/bug10.cs : Add.
29377
29378         * ../errors/cs0070.cs : Add.
29379
29380         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29381
29382         * assign.cs : Get rid of EventIsLocal everywhere.
29383
29384 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29385
29386         * ecore.cs (ConvertIntLiteral): finished the implementation.
29387
29388         * statement.cs (SwitchLabel): Convert the value we are using as a
29389         key before looking up the table.
29390
29391 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29392
29393         * codegen.cs (EmitTopBlock): Require a Location argument now.
29394
29395         * cs-parser.jay (constructor_declarator): We need to setup
29396         current_local_parameters before we parse the
29397         opt_constructor_initializer, to allow the variables to be bound
29398         to the constructor arguments.
29399
29400         * rootcontext.cs (LookupType): First lookup nested classes in our
29401         class and our parents before we go looking outside our class.
29402
29403         * expression.cs (ConstantFold): Extract/debox the values at the
29404         beginnning. 
29405
29406         * rootcontext.cs (EmitCode): Resolve the constants first before we
29407         resolve the types.  This is not really needed, but it helps debugging.
29408
29409         * statement.cs: report location.
29410
29411         * cs-parser.jay: pass location to throw statement.
29412
29413         * driver.cs: Small bug fix.
29414
29415         * report.cs: Updated format to be 4-zero filled digits.
29416
29417 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29418
29419         * expression.cs (CheckIndices): Fix minor bug where the wrong
29420         variable was being referred to ;-)
29421
29422         (DoEmit): Do not call EmitStaticInitializers when the 
29423         underlying type is System.Object.
29424
29425 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29426
29427         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29428         and do the usual workaround for SRE.
29429
29430         * class.cs (MyEventBuilder.EventType): New member to get at the type
29431         of the event, quickly.
29432
29433         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29434
29435         * assign.cs (Assign.DoResolve): Handle the case when the target
29436         is an EventExpr and perform the necessary checks.
29437
29438         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29439         interface.
29440
29441         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29442
29443         (EventExpr): Set the type in the constructor itself since we 
29444         are meant to be born fully resolved.
29445
29446         (EventExpr.Define): Revert code I wrote earlier.
29447                 
29448         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29449         instance expression is null. The instance expression is a This in that case
29450         or a null, depending on whether it is a static method or not.
29451
29452         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29453         refers to more than one method.
29454
29455         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29456         and accordingly flag errors.
29457
29458 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29459
29460         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29461
29462 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29463
29464         * location.cs (ToString): Provide useful rutine.
29465
29466 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29467
29468         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29469         objects, return the actual integral boxed.
29470
29471         * statement.cs (SwitchLabel): define an ILLabel for each
29472         SwitchLabel. 
29473
29474         (Switch.CheckSwitch): If the value is a Literal, extract
29475         the underlying literal.
29476
29477         Also in the unused hashtable we had, add the SwitchLabel so we can
29478         quickly look this value up.
29479
29480         * constant.cs: Implement a bunch of new constants.  Rewrite
29481         Literal based on this.  Made changes everywhere to adapt to this.
29482
29483         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29484         dereferencing array only once, and also copes with enumrations.
29485
29486         bytes are two bytes wide, not one.
29487
29488         (Cast): Perform constant conversions.
29489
29490         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29491         wrappers to the literals here.
29492
29493         * expression.cs (DoNumericPromotions): long literals can converted
29494         to ulong implicity (this is taken care of elsewhere, but I was
29495         missing this spot).
29496
29497         * ecore.cs (Expression.Literalize): Make the return type Literal,
29498         to improve type checking.
29499
29500         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29501
29502 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29503
29504         * literal.cs: Revert code from ravi that checked the bounds.  The
29505         bounds are sane by the definition of the type itself. 
29506
29507         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29508         need to actually look up in our parent hierarchy for interfaces
29509         implemented. 
29510
29511         * const.cs: Use the underlying type for enumerations
29512
29513         * delegate.cs: Compute the basename for the delegate creation,
29514         that should fix the delegate test case, and restore the correct
29515         Type Lookup semantics in rootcontext
29516
29517         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29518         referencing a nested type with the Reflection API is using the "+"
29519         sign. 
29520
29521         * cs-parser.jay: Do not require EOF token at the end.
29522
29523 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29524
29525         * rootcontext.cs (LookupType): Concatenate type names with
29526         a '.' instead of a '+' The test suite passes again.
29527
29528         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29529         field of the enumeration.
29530
29531         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29532         the case when the member is an EventExpr.
29533
29534         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29535         static has an associated instance expression.
29536
29537         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29538
29539         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29540
29541         * class.cs (Event.Define): Register event and perform appropriate checks
29542         for error #111.
29543
29544         We define the Add and Remove methods even if the use provides none because
29545         in that case, we provide default implementations ourselves.
29546
29547         Define a private field of the type of the event. This is done by the CSC compiler
29548         and we should be doing it too ;-)
29549
29550         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29551         More methods we use in code we generate.
29552
29553         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29554         is important.
29555
29556         (InitCoreTypes): Update accordingly for the above.
29557
29558         * class.cs (Event.Emit): Generate code for default accessors that we provide
29559
29560         (EmitDefaultMethod): Do the job in the above.
29561
29562         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29563         appropriate place.
29564
29565 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29566
29567         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29568         builders even if we were missing one.
29569
29570         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29571         pass the Basename as our class name instead of the Name.  The
29572         basename will be correctly composed for us.
29573
29574         * parameter.cs (Paramters): Now takes a Location argument.
29575
29576         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29577         make all the code call directly LookupType in RootContext and take
29578         this chance to pass the Location information everywhere.
29579
29580         * Everywhere: pass Location information.
29581
29582 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29583
29584         * class.cs (Constructor.Define): Updated way of detecting the
29585         length of the parameters.
29586
29587         (TypeContainer.DefineType): Use basename as the type name for
29588         nested types.
29589
29590         (TypeContainer.Define): Do not recursively define types here, as
29591         definition is taken care in order by the RootContext.
29592
29593         * tree.cs: Keep track of namespaces in a per-file basis.
29594
29595         * parameter.cs (Parameter.ComputeSignature): Update to use
29596         DeclSpace. 
29597
29598         (Parameters.GetSignature): ditto.
29599
29600         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29601         instead of a TypeContainer.
29602
29603         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29604         resolve names.  Because we need to be resolve in our context, not
29605         our parents.
29606
29607         * driver.cs: Implement response files.
29608
29609         * class.cs (TypeContainer.DefineType): If we are defined, do not
29610         redefine ourselves.
29611
29612         (Event.Emit): Emit the code for add/remove handlers.
29613         (Event.Define): Save the MethodBuilders for add/remove.
29614
29615         * typemanager.cs: Use pair here too.
29616
29617         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29618         DictionaryEntry requires the first argument to be non-null.  
29619
29620         (enum_declaration): Compute full name for registering the
29621         enumeration.
29622
29623         (delegate_declaration): Instead of using
29624         formal_parameter_list, use opt_formal_parameter_list as the list
29625         can be empty.
29626
29627         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29628         (EventParsing): New property that controls whether `add' and
29629         `remove' are returned as tokens or identifiers (for events);
29630
29631 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29632
29633         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29634         use MyEventBuilder only and let it wrap the real builder for us.
29635
29636         (MyEventBuilder): Revamp constructor etc.
29637
29638         Implement all operations that we perform on EventBuilder in precisely the same
29639         way here too.
29640
29641         (FindMembers): Update to use the EventBuilder member.
29642
29643         (Event.Emit): Update accordingly.
29644
29645 2001-12-18  Ravi Pratap  <ravi@ximian.com>
29646
29647         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
29648         by calling the appropriate methods.
29649
29650         (GetCustomAttributes): Make stubs as they cannot possibly do anything
29651         useful.
29652
29653         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
29654
29655 2001-12-17  Ravi Pratap  <ravi@ximian.com>
29656
29657         * delegate.cs (Delegate.Populate): Check that the return type
29658         and various parameters types are indeed accessible.
29659
29660         * class.cs (Constructor.Define): Same here.
29661
29662         (Field.Define): Ditto.
29663
29664         (Event.Define): Ditto.
29665
29666         (Operator.Define): Check that the underlying Method defined itself
29667         correctly - so it's MethodBuilder should not be null.
29668
29669         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
29670         expression happens to be null.
29671
29672         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
29673         members but as of now we don't seem to be able to do anything really useful with it.
29674
29675         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
29676         not the EventBuilder.
29677
29678 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
29679
29680         * cs-tokenizer.cs: Add support for defines.
29681         Add support for #if, #elif, #else, #endif
29682
29683         (eval_var): evaluates a variable.
29684         (eval): stubbed for evaluating functions.
29685
29686         * cs-parser.jay: Pass the defines information
29687
29688         * driver.cs: Add --define command line option.
29689
29690         * decl.cs: Move MemberCore here.
29691
29692         Make it the base class for DeclSpace.  This allows us to catch and
29693         report 108 and 109 for everything now.
29694
29695         * class.cs (TypeContainer.Define): Extract all the members
29696         before populating and emit the warning 108 (new keyword required
29697         to override) instead of having each member implement this.
29698
29699         (MemberCore.Define): New abstract method, we will be using this in
29700         the warning reporting engine in Populate.
29701
29702         (Operator.Define): Adjust to new MemberCore protocol. 
29703
29704         * const.cs (Const): This does not derive from Expression, it is a
29705         temporary object we use to create fields, it is a MemberCore. 
29706
29707         * class.cs (Method.Define): Allow the entry point to be in a
29708         specific class.
29709
29710         * driver.cs: Rewrite the argument handler to clean it up a bit.
29711
29712         * rootcontext.cs: Made it just an auxiliary namespace feature by
29713         making everything static.
29714
29715         * driver.cs: Adapt code to use RootContext type name instead of
29716         instance variable.
29717
29718         * delegate.cs: Remove RootContext argument.
29719
29720         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
29721         argument. 
29722
29723         * class.cs (Event.Define): The lookup can fail.
29724
29725         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
29726
29727         * expression.cs: Resolve the this instance before invoking the code.
29728
29729 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
29730
29731         * cs-parser.jay: Add a production in element_access that allows
29732         the thing to become a "type" reference.  This way we can parse
29733         things like "(string [])" as a type.
29734
29735         Note that this still does not handle the more complex rules of
29736         casts. 
29737
29738
29739         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
29740
29741         * ecore.cs: (CopyNewMethods): new utility function used to
29742         assemble the list of methods from running FindMembers.
29743
29744         (MemberLookup): Rework FindMembers so that 
29745
29746 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
29747
29748         * class.cs (TypeContainer): Remove Delegates who fail to be
29749         defined.
29750
29751         * delegate.cs (Populate): Verify that we dont get null return
29752         values.   TODO: Check for AsAccessible.
29753
29754         * cs-parser.jay: Use basename to emit error 574 (destructor should
29755         have the same name as container class), not the full name.
29756
29757         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
29758         possible representation.  
29759
29760         Also implements integer type suffixes U and L.
29761
29762 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
29763
29764         * expression.cs (ArrayCreation.DoResolve): We need to do the
29765         argument resolution *always*.
29766
29767         * decl.cs: Make this hold the namespace.  Hold the root context as
29768         well.
29769         (LookupType): Move here.
29770
29771         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
29772
29773         * location.cs (Row, Name): Fixed the code, it was always returning
29774         references to the first file.
29775
29776         * interface.cs: Register properties defined through interfaces.
29777
29778         * driver.cs: Add support for globbing on the command line
29779
29780         * class.cs (Field): Make it derive from MemberCore as well.
29781         (Event): ditto.
29782
29783 2001-12-15  Ravi Pratap  <ravi@ximian.com>
29784
29785         * class.cs (Event::Define): Check that the type of the event is a delegate
29786         type else flag error #66.
29787
29788         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
29789         same.
29790
29791         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
29792         values of EntryPoint, CharSet etc etc.
29793
29794         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
29795
29796         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
29797         be null and we should ignore this. I am not sure if this is really clean. Apparently,
29798         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
29799         which needs this to do its work.
29800
29801         * ../errors/cs0066.cs : Add.
29802
29803 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
29804
29805         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
29806         helper functions.
29807
29808         * class.cs: (MethodSignature.MethodSignature): Removed hack that
29809         clears out the parameters field.
29810         (MemberSignatureCompare): Cleanup
29811
29812         (MemberCore): New base class used to share code between MethodCore
29813         and Property.
29814
29815         (RegisterRequiredImplementations) BindingFlags.Public requires
29816         either BindingFlags.Instace or Static.  Use instance here.
29817
29818         (Property): Refactored code to cope better with the full spec.
29819
29820         * parameter.cs (GetParameterInfo): Return an empty array instead
29821         of null on error.
29822
29823         * class.cs (Property): Abstract or extern properties have no bodies.
29824
29825         * parameter.cs (GetParameterInfo): return a zero-sized array.
29826
29827         * class.cs (TypeContainer.MethodModifiersValid): Move all the
29828         method modifier validation to the typecontainer so we can reuse
29829         this on properties.
29830
29831         (MethodCore.ParameterTypes): return an empty sized array of types.
29832
29833         (Property.Define): Test property modifier validity.
29834
29835         Add tests for sealed/override too.
29836
29837         (Method.Emit): abstract or extern methods have no bodies.
29838
29839 2001-12-14  Ravi Pratap  <ravi@ximian.com>
29840
29841         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
29842         thing.
29843
29844         (Method::Define, ::Emit): Modify accordingly.
29845
29846         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
29847
29848         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
29849
29850         * makefile: Pass in /unsafe.
29851
29852 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
29853
29854         * class.cs (MakeKey): Kill routine.
29855
29856         * class.cs (TypeContainer.Define): Correctly define explicit
29857         method implementations (they require the full interface name plus
29858         the method name).
29859
29860         * typemanager.cs: Deply the PtrHashtable here and stop using the
29861         lame keys.  Things work so much better.
29862
29863         This of course broke everyone who depended on `RegisterMethod' to
29864         do the `test for existance' test.  This has to be done elsewhere.
29865
29866         * support.cs (PtrHashtable): A hashtable that avoid comparing with
29867         the object stupid Equals method (because, that like fails all over
29868         the place).  We still do not use it.
29869
29870         * class.cs (TypeContainer.SetRequiredInterface,
29871         TypeContainer.RequireMethods): Killed these two routines and moved
29872         all the functionality to RegisterRequiredImplementations.
29873
29874         (TypeContainer.RegisterRequiredImplementations): This routine now
29875         registers all the implementations required in an array for the
29876         interfaces and abstract methods.  We use an array of structures
29877         which can be computed ahead of time to reduce memory usage and we
29878         also assume that lookups are cheap as most classes will not
29879         implement too many interfaces.
29880
29881         We also avoid creating too many MethodSignatures.
29882
29883         (TypeContainer.IsInterfaceMethod): Update and optionally does not
29884         clear the "pending" bit if we find that there are problems with
29885         the declaration.
29886
29887         (TypeContainer.VerifyPendingMethods): Update to report errors of
29888         methods that look like implementations but are not.
29889
29890         (TypeContainer.Define): Add support for explicit interface method
29891         implementation. 
29892
29893 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
29894
29895         * typemanager.cs: Keep track of the parameters here instead of
29896         being a feature of the TypeContainer.
29897
29898         * class.cs: Drop the registration of parameters here, as
29899         InterfaceMethods are also interface declarations.
29900
29901         * delegate.cs: Register methods with the TypeManager not only with
29902         the TypeContainer.  This code was buggy.
29903
29904         * interface.cs: Full registation here.
29905
29906 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
29907
29908         * expression.cs: Remove reducer for binary expressions, it can not
29909         be done this way.
29910
29911         * const.cs: Put here the code that used to go into constant.cs
29912
29913         * constant.cs: Put here the code for constants, this is a new base
29914         class for Literals.
29915
29916         * literal.cs: Make Literal derive from Constant.
29917
29918 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
29919
29920         * statement.cs (Return.Emit): Report error 157 if the user
29921         attempts to return from a finally block.
29922
29923         (Return.Emit): Instead of emitting a return, jump to the end of
29924         the function.
29925
29926         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
29927         LocalBuilder to store the result of the function.  ReturnLabel is
29928         the target where we jump.
29929
29930
29931 2001-12-09  Radek Doulik  <rodo@ximian.com>
29932
29933         * cs-parser.jay: remember alias in current namespace
29934
29935         * ecore.cs (SimpleName::DoResolve): use aliases for types or
29936         namespaces
29937
29938         * class.cs (LookupAlias): lookup alias in my_namespace
29939
29940         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
29941         aliases hashtable
29942         (LookupAlias): lookup alias in this and if needed in parent
29943         namespaces
29944
29945 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
29946
29947         * support.cs: 
29948
29949         * rootcontext.cs: (ModuleBuilder) Made static, first step into
29950         making things static.  I need this to avoid passing the
29951         TypeContainer when calling ParameterType.
29952
29953         * support.cs (InternalParameters.ParameterType): Remove ugly hack
29954         that did string manipulation to compute the type and then call
29955         GetType.  Use Parameter.ParameterType instead.
29956
29957         * cs-tokenizer.cs: Consume the suffix for floating values.
29958
29959         * expression.cs (ParameterReference): figure out whether this is a
29960         reference parameter or not.  Kill an extra variable by computing
29961         the arg_idx during emission.
29962
29963         * parameter.cs (Parameters.GetParameterInfo): New overloaded
29964         function that returns whether a parameter is an out/ref value or not.
29965
29966         (Parameter.ParameterType): The type of the parameter (base,
29967         without ref/out applied).
29968
29969         (Parameter.Resolve): Perform resolution here.
29970         (Parameter.ExternalType): The full type (with ref/out applied).
29971
29972         * statement.cs (Using.Emit, Using.EmitExpression): Implement
29973         support for expressions on the using statement.
29974
29975 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
29976
29977         * statement.cs (Using.EmitLocalVariableDecls): Split the
29978         localvariable handling of the using statement.
29979
29980         (Block.EmitMeta): Keep track of variable count across blocks.  We
29981         were reusing slots on separate branches of blocks.
29982
29983         (Try.Emit): Emit the general code block, we were not emitting it. 
29984
29985         Check the type of the declaration to be an IDisposable or
29986         something that can be implicity converted to it. 
29987
29988         Emit conversions if required.
29989
29990         * ecore.cs (EmptyExpression): New utility class.
29991         (Expression.ImplicitConversionExists): New utility function.
29992
29993 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
29994
29995         * statement.cs (Using): Implement.
29996
29997         * expression.cs (LocalVariableReference): Support read only variables.
29998
29999         * statement.cs: Remove the explicit emit for the Leave opcode.
30000         (VariableInfo): Add a readonly field.
30001
30002 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
30003
30004         * ecore.cs (ConvCast): new class used to encapsulate the various
30005         explicit integer conversions that works in both checked and
30006         unchecked contexts.
30007
30008         (Expression.ConvertNumericExplicit): Use new ConvCast class to
30009         properly generate the overflow opcodes.
30010
30011 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30012
30013         * statement.cs: The correct type for the EmptyExpression is the
30014         element_type, not the variable type.  Ravi pointed this out.
30015
30016 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30017
30018         * class.cs (Method::Define): Handle PInvoke methods specially
30019         by using DefinePInvokeMethod instead of the usual one.
30020
30021         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
30022         above to do the task of extracting information and defining the method.
30023
30024 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30025
30026         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
30027         of the condition for string type.
30028
30029         (Emit): Move that here. 
30030
30031         (ArrayCreation::CheckIndices): Keep string literals in their expression
30032         form.
30033
30034         (EmitDynamicInitializers): Handle strings appropriately.
30035
30036 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30037
30038         * codegen.cs (EmitContext): Replace multiple variables with a
30039         single pointer to the current Switch statement.
30040
30041         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
30042         EmitContext.
30043
30044 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30045
30046         * statement.cs 
30047
30048         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30049         default'.
30050
30051         (Foreach.Emit): Foreach on arrays was not setting
30052         up the loop variables (for break/continue).
30053
30054         (GotoCase): Semi-implented.
30055
30056 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30057
30058         * attribute.cs (CheckAttribute): Handle system attributes by using
30059         Attribute.GetAttributes to examine information we need.
30060
30061         (GetValidPlaces): Same here.
30062
30063         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30064
30065         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30066
30067         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30068
30069         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30070
30071         (Method::Emit): Handle the case when we are a PInvoke method.
30072
30073 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30074
30075         * expression.cs: Use ResolveWithSimpleName on compound names.
30076
30077 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30078
30079         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30080         before trying to reduce it.
30081
30082         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30083
30084         * constant.cs (LookupConstantValue): Implement.
30085
30086         (EmitConstant): Use the above in emitting the constant.
30087
30088         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30089         that are user-defined by doing a LookupConstantValue on them.
30090
30091         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30092         too, like above.
30093
30094 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30095
30096         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30097
30098         (BaseAccess.DoResolve): Implement.
30099
30100         (MemberAccess.DoResolve): Split this routine into a
30101         ResolveMemberAccess routine that can be used independently
30102
30103 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30104
30105         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30106         As that share bits of the implementation.  Is returns a boolean,
30107         while As returns the Type that is being probed.
30108
30109 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30110
30111         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30112         instead of a Literal - much easier.
30113
30114         (EnumInTransit): Remove - utterly useless :-)
30115
30116         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30117
30118         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30119
30120         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30121         chain when we have no associated expression.
30122
30123 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30124
30125         * constant.cs (Define): Use Location while reporting the errror.
30126
30127         Also emit a warning when 'new' is used and there is no inherited
30128         member to hide.
30129
30130         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30131         populated.
30132
30133         (LookupEnumValue): Implement to lookup an enum member's value and define it
30134         if necessary.
30135
30136         (Populate): Re-write accordingly to use the above routine.
30137
30138 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30139
30140         * expression.cs (This): Fix prototype for DoResolveLValue to
30141         override the base class DoResolveLValue.
30142
30143         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30144         declarations) 
30145
30146         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30147         (we need to load the address of the field here).  This fixes
30148         test-22. 
30149
30150         (FieldExpr.DoResolveLValue): Call the DoResolve
30151         function to initialize the Instance expression.
30152
30153         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30154         correctly the GetEnumerator operation on a value type.
30155
30156         * cs-parser.jay: Add more simple parsing error catches.
30157
30158         * statement.cs (Switch): Add support for string switches.
30159         Handle null specially.
30160
30161         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30162
30163 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30164
30165         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30166
30167         (declare_local_constant): New helper function.
30168
30169         * statement.cs (AddConstant): Keep a separate record of constants
30170
30171         (IsConstant): Implement to determine if a variable is a constant.
30172
30173         (GetConstantExpression): Implement.
30174
30175         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30176
30177         * statement.cs (IsVariableDefined): Re-write.
30178
30179 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30180
30181         * class.cs (TypeContainer::FindMembers): Look for constants
30182         in the case when we are looking for MemberTypes.Field
30183
30184         * expression.cs (MemberAccess::DoResolve): Check that in the
30185         case we are a FieldExpr and a Literal, we are not being accessed
30186         by an instance reference.
30187
30188         * cs-parser.jay (local_constant_declaration): Implement.
30189
30190         (declaration_statement): Implement for constant declarations.
30191
30192 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30193
30194         * statement.cs (Switch): Catch double defaults.
30195
30196         (Switch): More work on the switch() statement
30197         implementation.  It works for integral values now, need to finish
30198         string support.
30199
30200
30201 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30202
30203         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30204         integer literals into other integer literals.  To be used by
30205         switch. 
30206
30207 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30208
30209         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30210         some memory.
30211
30212         (EmitDynamicInitializers): Cope with the above since we extract data
30213         directly from ArrayData now.
30214
30215         (ExpectInitializers): Keep track of whether initializers are mandatory
30216         or not.
30217
30218         (Bounds): Make it a hashtable to prevent the same dimension being 
30219         recorded for every element in that dimension.
30220
30221         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30222         from being found.
30223
30224         Also fix bug which was causing the indices to be emitted in the reverse
30225         order.
30226
30227 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30228
30229         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30230         unfinished.  They do not work, because the underlying code is
30231         sloppy.
30232
30233 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30234
30235         * cs-parser.jay: Remove bogus fixme.
30236
30237         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30238         on Switch statement.
30239
30240 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30241
30242         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30243         the same. 
30244
30245         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30246         parameter. Apparently, any expression is allowed. 
30247
30248         (ValidateInitializers): Update accordingly.
30249
30250         (CheckIndices): Fix some tricky bugs thanks to recursion.
30251
30252         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30253         I was being completely brain-dead.
30254
30255         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30256         and re-write acordingly.
30257
30258         (DelegateInvocation): Re-write accordingly.
30259
30260         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30261
30262         (MakeByteBlob): Handle types more correctly.
30263
30264         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30265         initialization from expressions but it is incomplete because I am a complete
30266         Dodo :-|
30267
30268 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30269
30270         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30271         on If.  Basically, we have to return `true' (ie, we do return to
30272         our caller) only if both branches of the if return.
30273
30274         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30275         short-circuit operators, handle them as short circuit operators. 
30276
30277         (Cast.DoResolve): Resolve type.
30278         (Cast.Cast): Take an expression as the target type.
30279
30280         * cs-parser.jay (cast_expression): Remove old hack that only
30281         allowed a limited set of types to be handled.  Now we take a
30282         unary_expression and we resolve to a type during semantic
30283         analysis.
30284
30285         Use the grammar productions from Rhys to handle casts (this is
30286         not complete like Rhys syntax yet, we fail to handle that corner
30287         case that C# has regarding (-x), but we will get there.
30288
30289 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30290
30291         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30292         field which is an array type.
30293
30294         * cs-parser.jay (declare_local_variables): Support array initialization too.
30295
30296         * typemanager.cs (MakeKey): Implement.
30297
30298         (everywhere): Use the above appropriately.
30299
30300         * cs-parser.jay (for_statement): Update for array initialization while
30301         declaring variables.
30302
30303         * ecore.cs : The error message was correct, it's the variable's names that
30304         were misleading ;-) Make the code more readable.
30305
30306         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30307         the correct type etc.
30308
30309         (ConvertExplicit): Handle Enum types by examining the underlying type.
30310
30311 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30312
30313         * parameter.cs (GetCallingConvention): Always return
30314         CallingConventions.Standard for now.
30315
30316 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30317
30318         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30319         and `r' after calling DoNumericPromotions.
30320
30321         * ecore.cs: Fix error message (the types were in the wrong order).
30322
30323         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30324         BindingFlags.Instance as well 
30325
30326         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30327         implicit int literal conversion in an empty cast so that we
30328         propagate the right type upstream.
30329
30330         (UnboxCast): new class used to unbox value types.
30331         (Expression.ConvertExplicit): Add explicit type conversions done
30332         by unboxing.
30333
30334         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30335         the target type before applying the implicit LongLiterals to ULong
30336         literal cast.
30337
30338 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30339
30340         * cs-parser.jay (for_statement): Reworked the way For works: now
30341         we declare manually any variables that are introduced in
30342         for_initializer to solve the problem of having out-of-band code
30343         emition (that is what got for broken).
30344
30345         (declaration_statement): Perform the actual variable declaration
30346         that used to be done in local_variable_declaration here.
30347
30348         (local_variable_declaration): Do not declare anything, just pass
30349         the information on a DictionaryEntry
30350
30351 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30352
30353         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30354         re-write of the logic to now make it recursive.
30355
30356         (UpdateIndices): Re-write accordingly.
30357
30358         Store element data in a separate ArrayData list in the above methods.
30359
30360         (MakeByteBlob): Implement to dump the array data into a byte array.
30361
30362 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30363
30364         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30365         into CheckIndices.
30366
30367         * constant.cs (Define): Implement.
30368
30369         (EmitConstant): Re-write fully.
30370
30371         Pass in location info.
30372
30373         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30374         respectively.
30375
30376         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30377         DictionaryEntry since we need location info too.
30378
30379         (constant_declaration): Update accordingly.
30380
30381         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30382         code into another method : UpdateIndices.
30383
30384 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30385
30386         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30387         some type checking etc.
30388
30389 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30390
30391         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30392         bits to provide dimension info if the user skips doing that.
30393
30394         Update second constructor to store the rank correctly.
30395
30396 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30397
30398         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30399         and try to implement.
30400
30401         * ../errors/cs0150.cs : Add.
30402
30403         * ../errors/cs0178.cs : Add.
30404
30405 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30406
30407         * statement.cs: Implement foreach on multi-dimensional arrays. 
30408
30409         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30410         name of the params argument.
30411
30412         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30413         initializing the array.
30414
30415         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30416         we can use this elsewhere.
30417
30418         * statement.cs: Finish implementation of foreach for single
30419         dimension arrays.
30420
30421         * cs-parser.jay: Use an out-of-band stack to pass information
30422         around, I wonder why I need this.
30423
30424         foreach_block: Make the new foreach_block the current_block.
30425
30426         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30427         function used to return a static Parameters structure.  Used for
30428         empty parameters, as those are created very frequently.
30429
30430         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30431
30432 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30433
30434         * interface.cs : Default modifier is private, not public. The
30435         make verify test passes again.
30436
30437 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30438
30439         * support.cs (ReflectionParameters): Fix logic to determine
30440         whether the last parameter is a params one. Test 9 passes again.
30441
30442         * delegate.cs (Populate): Register the builders we define with
30443         RegisterParameterForBuilder. Test 19 passes again.
30444
30445         * cs-parser.jay (property_declaration): Reference $6 instead
30446         of $$ to get at the location.
30447
30448         (indexer_declaration): Similar stuff.
30449
30450         (attribute): Ditto.
30451
30452         * class.cs (Property): Register parameters for the Get and Set methods
30453         if they exist. Test 23 passes again.
30454
30455         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30456         call to EmitArguments as we are sure there aren't any params arguments. 
30457         Test 32 passes again.
30458
30459         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30460         IndexOutOfRangeException. 
30461
30462         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30463         Test 33 now passes again.
30464
30465 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30466
30467         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30468         broke a bunch of things.  Will have to come up with a better way
30469         of tracking locations.
30470
30471         * statement.cs: Implemented foreach for single dimension arrays.
30472
30473 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30474
30475         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30476         an error.  This removes the lookup from the critical path.
30477
30478         * cs-parser.jay: Removed use of temporary_loc, which is completely
30479         broken. 
30480
30481 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30482
30483         * support.cs (ReflectionParameters.ParameterModifier): Report
30484         whether the argument is a PARAMS argument or not.
30485
30486         * class.cs: Set the attribute `ParamArrayAttribute' on the
30487         parameter argument.
30488
30489         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30490         and cons_param_array_attribute (ConstructorInfo for
30491         ParamArrayAttribute)., 
30492
30493         * codegen.cs: Emit the return using the `Return' statement, that
30494         way we can report the error correctly for missing return values. 
30495
30496         * class.cs (Method.Emit): Clean up.
30497
30498         * expression.cs (Argument.Resolve): Take another argument: the
30499         location where this argument is used.  Notice that this is not
30500         part of the "Argument" class as to reduce the size of the
30501         structure (we know the approximate location anyways).
30502
30503         Test if the argument is a variable-reference, if not, then
30504         complain with a 206.
30505
30506         (Argument.Emit): Emit addresses of variables.
30507
30508         (Argument.FullDesc): Simplify.
30509
30510         (Invocation.DoResolve): Update for Argument.Resolve.
30511
30512         (ElementAccess.DoResolve): ditto.
30513
30514         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30515         method should be virtual, as this method is always virtual.
30516
30517         (NewDelegate.DoResolve): Update for Argument.Resolve.
30518
30519         * class.cs (ConstructorInitializer.DoResolve): ditto.
30520
30521         * attribute.cs (Attribute.Resolve): ditto.
30522
30523 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30524
30525         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30526
30527         * expression.cs (ParameterReference): Drop IStackStorage and implement
30528         IAssignMethod instead. 
30529
30530         (LocalVariableReference): ditto.
30531
30532         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30533         IAssignMethod instead. 
30534
30535 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30536
30537         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30538         enumerations that are used in heavily used structures derive from
30539         byte in a laughable and pathetic attempt to reduce memory usage.
30540         This is the kind of pre-optimzations that you should not do at
30541         home without adult supervision.
30542
30543         * expression.cs (UnaryMutator): New class, used to handle ++ and
30544         -- separatedly from the other unary operators.  Cleans up the
30545         code, and kills the ExpressionStatement dependency in Unary.
30546
30547         (Unary): Removed `method' and `Arguments' from this class, making
30548         it smaller, and moving it all to SimpleCall, so I can reuse this
30549         code in other locations and avoid creating a lot of transient data
30550         strucutres when not required.
30551
30552         * cs-parser.jay: Adjust for new changes.
30553
30554 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30555
30556         * enum.cs (Enum.Populate): If there is a failure during
30557         definition, return
30558
30559         * cs-parser.jay (opt_enum_base): we used to catch type errors
30560         here, but this is really incorrect.  The type error should be
30561         catched during semantic analysis.
30562
30563 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30564
30565         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30566         current_local_parameters as expected since I, in my stupidity, had forgotten
30567         to do this :-)
30568
30569         * attribute.cs (GetValidPlaces): Fix stupid bug.
30570
30571         * class.cs (Method::Emit): Perform check on applicability of attributes.
30572
30573         (Constructor::Emit): Ditto.
30574
30575         (Field::Emit): Ditto.
30576
30577         (Field.Location): Store location information.
30578
30579         (Property, Event, Indexer, Operator): Ditto.
30580
30581         * cs-parser.jay (field_declaration): Pass in location for each field.
30582
30583         * ../errors/cs0592.cs : Add.
30584
30585 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30586
30587         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30588
30589         (InitCoreTypes): Update accordingly.
30590
30591         (RegisterAttrType, LookupAttr): Implement.
30592
30593         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30594         info about the same.
30595
30596         (Resolve): Update to populate the above as necessary.
30597
30598         (Error592): Helper.
30599
30600         (GetValidPlaces): Helper to the above.
30601
30602         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30603
30604         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30605
30606 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30607
30608         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30609
30610         * ../errors/cs0617.cs : Add.
30611
30612 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30613
30614         * enum.cs (Emit): Rename to Populate to be more consistent with what
30615         we expect it to do and when exactly it is called.
30616
30617         * class.cs, rootcontext.cs : Update accordingly.
30618
30619         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30620         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30621
30622         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30623
30624         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30625         of a fieldinfo using the above, when dealing with a FieldBuilder.
30626
30627 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30628
30629         * ../errors/cs0031.cs : Add.
30630
30631         * ../errors/cs1008.cs : Add.
30632
30633         * ../errrors/cs0543.cs : Add.
30634
30635         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30636         enum type.
30637
30638         (FindMembers): Implement.
30639
30640         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
30641         enums and delegates too.
30642
30643         (enum_types): Rename to builder_to_enum.
30644
30645         (delegate_types): Rename to builder_to_delegate.
30646
30647         * delegate.cs (FindMembers): Implement.
30648
30649 2001-11-09  Ravi Pratap  <ravi@ximian.com>
30650
30651         * typemanager.cs (IsEnumType): Implement.
30652
30653         * enum.cs (Emit): Re-write parts to account for the underlying type
30654         better and perform checking etc.
30655
30656         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
30657         of the underlying type.
30658
30659         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
30660         value
30661
30662         * enum.cs (error31): Helper to report error #31.
30663
30664         * cs-parser.jay (enum_declaration): Store location of each member too.
30665
30666         * enum.cs (member_to_location): New hashtable. 
30667
30668         (AddEnumMember): Update location hashtable.
30669
30670         (Emit): Use the location of each member while reporting errors.
30671
30672 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30673
30674         * cs-parser.jay: A for_initializer if is a
30675         local_variable_declaration really ammount to have an implicit
30676         block with the variable declaration and no initializer for for.
30677
30678         * statement.cs (For.Emit): Cope with null initializers.
30679
30680         This fixes the infinite loop on for initializers.
30681
30682 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
30683
30684         * enum.cs: More cleanup.
30685
30686         * ecore.cs: Remove dead code.
30687
30688         * class.cs (Property.Emit): More simplification.
30689         (Event.Emit): ditto.
30690
30691         Reworked to have less levels of indentation.
30692
30693 2001-11-08  Ravi Pratap  <ravi@ximian.com>
30694
30695         * class.cs (Property): Emit attributes.
30696
30697         (Field): Ditto.
30698
30699         (Event): Ditto.
30700
30701         (Indexer): Ditto.
30702
30703         (Operator): Ditto.
30704
30705         * enum.cs (Emit): Ditto.
30706
30707         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
30708         Enums too.
30709
30710         * class.cs (Field, Event, etc.): Move attribute generation into the
30711         Emit method everywhere.
30712
30713         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
30714         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
30715         as we had no way of defining nested enums !
30716
30717         * rootcontext.cs : Adjust code accordingly.
30718
30719         * typemanager.cs (AddEnumType): To keep track of enum types separately.
30720
30721 2001-11-07  Ravi Pratap  <ravi@ximian.com>
30722
30723         * expression.cs (EvalConstantExpression): Move into ecore.cs
30724
30725         * enum.cs (Enum): Rename some members and make them public and readonly
30726         according to our convention.
30727
30728         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
30729         nothing else.
30730
30731         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
30732
30733         (Enum::Emit): Write a simple version for now which doesn't try to compute
30734         expressions. I shall modify this to be more robust in just a while.
30735
30736         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
30737
30738         (TypeContainer::CloseType): Create the Enum types too.
30739
30740         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
30741
30742         * expression.cs (EvalConstantExpression): Get rid of completely.
30743
30744         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
30745         user-defined values and other cases.
30746
30747         (IsValidEnumLiteral): Helper function.
30748
30749         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
30750         out there in the case we had a literal FieldExpr.
30751
30752         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
30753
30754         (Literalize): Revamp a bit to take two arguments.
30755
30756         (EnumLiteral): New class which derives from Literal to wrap enum literals.
30757
30758 2001-11-06  Ravi Pratap  <ravi@ximian.com>
30759
30760         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
30761
30762         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
30763
30764         (Resolve): Use the above to ensure we have proper initializers.
30765
30766 2001-11-05  Ravi Pratap  <ravi@ximian.com>
30767
30768         * expression.cs (Expression::EvalConstantExpression): New method to 
30769         evaluate constant expressions.
30770
30771         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
30772
30773 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30774
30775         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
30776         in an array.
30777
30778         (Binary.ResolveOperator): Handle operator != (object a, object b)
30779         and operator == (object a, object b);
30780
30781         (Binary.DoNumericPromotions): Indicate whether the numeric
30782         promotion was possible.
30783
30784         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
30785         Implement.  
30786
30787         Made the ArrayAccess implement interface IAssignMethod instead of
30788         IStackStore as the order in which arguments are passed reflects
30789         this.
30790
30791         * assign.cs: Instead of using expr.ExprClass to select the way of
30792         assinging, probe for the IStackStore/IAssignMethod interfaces.
30793
30794         * typemanager.cs: Load InitializeArray definition.
30795
30796         * rootcontext.cs (RootContext.MakeStaticData): Used to define
30797         static data that can be used to initialize arrays. 
30798
30799 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
30800
30801         * expression.cs: Handle operator== and operator!= for booleans.
30802
30803         (Conditioal.Reduce): Implement reducer for the ?: operator.
30804
30805         (Conditional.Resolve): Implement dead code elimination.
30806
30807         (Binary.Resolve): Catch string literals and return a new
30808         concatenated string.
30809
30810         (Unary.Reduce): Implement reduction of unary expressions.
30811
30812         * ecore.cs: Split out the expression core handling here.
30813
30814         (Expression.Reduce): New method used to perform constant folding
30815         and CSE.  This is needed to support constant-expressions. 
30816
30817         * statement.cs (Statement.EmitBoolExpression): Pass true and false
30818         targets, and optimize for !x.
30819
30820 2001-11-04  Ravi Pratap  <ravi@ximian.com>
30821
30822         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
30823         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
30824         set custom atttributes.
30825
30826         * literal.cs (Literal::GetValue): New abstract method to return the actual
30827         value of the literal, cast as an object.
30828
30829         (*Literal): Implement GetValue method.
30830
30831         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
30832         expressions to the arraylist but objects of type Argument.
30833
30834         * class.cs (TypeContainer::Emit): Emit our attributes too.
30835
30836         (Method::Emit, Constructor::Emit): Ditto.
30837
30838         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
30839         to be ignoring earlier.
30840
30841 2001-11-03  Ravi Pratap  <ravi@ximian.com>
30842
30843         * attribute.cs (AttributeSection::Define): Implement to do the business
30844         of constructing a CustomAttributeBuilder.
30845
30846         (Attribute): New trivial class. Increases readability of code.  
30847
30848         * cs-parser.jay : Update accordingly.
30849
30850         (positional_argument_list, named_argument_list, named_argument): New rules
30851
30852         (attribute_arguments): Use the above so that we are more correct.
30853
30854 2001-11-02  Ravi Pratap  <ravi@ximian.com>
30855
30856         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
30857         to perform all checks for a method with a params parameter.
30858
30859         (Invocation::OverloadResolve): Update to use the above method and therefore
30860         cope correctly with params method invocations.
30861
30862         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
30863         params too.
30864
30865         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
30866         constructors in our parent too because we can't afford to miss out on 
30867         protected ones ;-)
30868
30869         * attribute.cs (AttributeSection): New name for the class Attribute
30870
30871         Other trivial changes to improve readability.
30872
30873         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
30874         use the new class names.
30875
30876 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30877
30878         * class.cs (Method::Define): Complete definition for params types too
30879
30880         (Indexer::Define): Ditto.
30881
30882         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
30883         Cope everywhere with a request for info about the array parameter.
30884
30885 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30886
30887         * tree.cs (RecordNamespace): Fix up to check for the correct key.
30888
30889         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
30890         local_variable_type to extract the string corresponding to the type.
30891
30892         (local_variable_type): Fixup the action to use the new helper method.
30893
30894         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
30895         go.
30896
30897         * expression.cs : Clean out code which uses the above.
30898
30899 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30900
30901         * typemanager.cs (RegisterMethod): Check if we already have an existing key
30902         and bale out if necessary by returning a false.
30903
30904         (RegisterProperty): Ditto.
30905
30906         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
30907         and print out appropriate error messages.
30908
30909         * interface.cs (everywhere): Ditto.
30910
30911         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
30912         location to constructor.
30913
30914         * class.cs (Property, Event, Indexer): Update accordingly.
30915
30916         * ../errors/cs111.cs : Added.
30917
30918         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
30919         of a method, as laid down by the spec.
30920
30921         (Invocation::OverloadResolve): Use the above method.
30922
30923 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30924
30925         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
30926         now take a TypeContainer and a Parameters object.
30927
30928         (ParameterData): Modify return type of ParameterModifier method to be 
30929         Parameter.Modifier and not a string.
30930
30931         (ReflectionParameters, InternalParameters): Update accordingly.
30932
30933         * expression.cs (Argument::GetParameterModifier): Same here.
30934
30935         * support.cs (InternalParameters::ParameterType): Find a better way of determining
30936         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
30937         symbol in it at all so maybe this is only for now.
30938
30939 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30940
30941         * support.cs (InternalParameters): Constructor now takes an extra argument 
30942         which is the actual Parameters class.
30943
30944         (ParameterDesc): Update to provide info on ref/out modifiers.
30945
30946         * class.cs (everywhere): Update call to InternalParameters to pass in
30947         the second argument too.
30948
30949         * support.cs (ParameterData): Add ParameterModifier, which is a method 
30950         to return the modifier info [ref/out etc]
30951
30952         (InternalParameters, ReflectionParameters): Implement the above.
30953
30954         * expression.cs (Argument::ParameterModifier): Similar function to return
30955         info about the argument's modifiers.
30956
30957         (Invocation::OverloadResolve): Update to take into account matching modifiers 
30958         too.
30959
30960         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
30961         a new SetFormalParameters object which we pass to InternalParameters.
30962
30963 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30964
30965         * expression.cs (NewArray): Merge into the ArrayCreation class.
30966
30967 2001-10-29  Ravi Pratap  <ravi@ximian.com>
30968
30969         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
30970         NewUserdefinedArray into one as there wasn't much of a use in having
30971         two separate ones.
30972
30973         * expression.cs (Argument): Change field's name to ArgType from Type.
30974
30975         (Type): New readonly property which returns the proper type, taking into 
30976         account ref/out modifiers.
30977
30978         (everywhere): Adjust code accordingly for the above.
30979
30980         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
30981         whether we are emitting for a ref or out parameter.
30982
30983         * expression.cs (Argument::Emit): Use the above field to set the state.
30984
30985         (LocalVariableReference::Emit): Update to honour the flag and emit the
30986         right stuff.
30987
30988         * parameter.cs (Attributes): Set the correct flags for ref parameters.
30989
30990         * expression.cs (Argument::FullDesc): New function to provide a full desc.
30991
30992         * support.cs (ParameterData): Add method ParameterDesc to the interface.
30993
30994         (ReflectionParameters, InternalParameters): Implement the above method.
30995
30996         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
30997         reporting errors.
30998
30999         (Invocation::FullMethodDesc): Ditto. 
31000
31001 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
31002
31003         * cs-parser.jay: Add extra production for the second form of array
31004         creation. 
31005
31006         * expression.cs (ArrayCreation): Update to reflect the above
31007         change. 
31008
31009         * Small changes to prepare for Array initialization.
31010
31011 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
31012
31013         * typemanager.cs (ImplementsInterface): interface might be null;
31014         Deal with this problem;
31015
31016         Also, we do store negative hits on the cache (null values), so use
31017         this instead of calling t.GetInterfaces on the type everytime.
31018
31019 2001-10-28  Ravi Pratap  <ravi@ximian.com>
31020
31021         * typemanager.cs (IsBuiltinType): New method to help determine the same.
31022
31023         * expression.cs (New::DoResolve): Get rid of array creation code and instead
31024         split functionality out into different classes.
31025
31026         (New::FormArrayType): Move into NewBuiltinArray.
31027
31028         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
31029         quite useless.
31030
31031         (NewBuiltinArray): New class to handle creation of built-in arrays.
31032
31033         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
31034         account creation of one-dimensional arrays.
31035
31036         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
31037
31038         (NewUserdefinedArray::DoResolve): Implement.
31039
31040         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
31041
31042         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
31043         we maintain inside the TypeManager. This is necessary to perform lookups on the
31044         module builder.
31045
31046         (LookupType): Update to perform GetType on the module builders too.     
31047
31048         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31049
31050         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31051
31052 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31053
31054         * expression.cs (New::DoResolve): Implement guts of array creation.
31055
31056         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31057
31058 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31059
31060         * expression.cs: Fix bug I introduced lsat night that broke
31061         Delegates. 
31062
31063         (Expression.Resolve): Report a 246 error (can not resolve name)
31064         if we find a SimpleName in the stream.
31065
31066         (Expression.ResolveLValue): Ditto.
31067
31068         (Expression.ResolveWithSimpleName): This function is a variant of
31069         ResolveName, this one allows SimpleNames to be returned without a
31070         warning.  The only consumer of SimpleNames is MemberAccess
31071
31072 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31073
31074         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31075         might arrive here.  I have my doubts that this is correct.
31076
31077         * statement.cs (Lock): Implement lock statement.
31078
31079         * cs-parser.jay: Small fixes to support `lock' and `using'
31080
31081         * cs-tokenizer.cs: Remove extra space
31082
31083         * driver.cs: New flag --checked, allows to turn on integer math
31084         checking. 
31085
31086         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31087         Threading.Monitor.Exit 
31088
31089 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31090
31091         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31092         Expression Class to be IndexerAccess.
31093
31094         Notice that Indexer::DoResolve sets the eclass to Value.
31095
31096 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31097
31098         * class.cs (TypeContainer::Emit): Emit code for indexers.
31099
31100         * assign.cs (IAssignMethod): New interface implemented by Indexers
31101         and Properties for handling assignment.
31102
31103         (Assign::Emit): Simplify and reuse code. 
31104
31105         * expression.cs (IndexerAccess, PropertyExpr): Implement
31106         IAssignMethod, clean up old code. 
31107
31108 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31109
31110         * typemanager.cs (ImplementsInterface): New method to determine if a type
31111         implements a given interface. Provides a nice cache too.
31112
31113         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31114         method.
31115
31116         (ConvertReferenceExplicit): Ditto.
31117
31118         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31119         various methods, with correct names etc.
31120
31121         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31122         Operator.UnaryNegation.
31123
31124         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31125         we have a unary plus or minus operator.
31126
31127         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31128         UnaryMinus.
31129
31130         * everywhere : update accordingly.
31131
31132         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31133         respectively.
31134
31135         * class.cs (Method::Define): For the case where we are implementing a method
31136         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31137         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31138
31139 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31140
31141         * interface.cs (FindMembers): Implement to work around S.R.E
31142         lameness.
31143
31144         * typemanager.cs (IsInterfaceType): Implement.
31145
31146         (FindMembers): Update to handle interface types too.
31147
31148         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31149         use IsAssignableFrom as that is not correct - it doesn't work.
31150
31151         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31152         and accordingly override EmitStatement.
31153
31154         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31155         using the correct logic :-)
31156
31157 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31158
31159         * ../errors/cs-11.cs : Add to demonstrate error -11 
31160
31161 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31162
31163         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31164         then pass this as a hint to ResolveLValue.
31165
31166         * expression.cs (FieldExpr): Add Location information
31167
31168         (FieldExpr::LValueResolve): Report assignment to readonly
31169         variable. 
31170
31171         (Expression::ExprClassFromMemberInfo): Pass location information.
31172
31173         (Expression::ResolveLValue): Add new method that resolves an
31174         LValue. 
31175
31176         (Expression::DoResolveLValue): Default invocation calls
31177         DoResolve. 
31178
31179         (Indexers): New class used to keep track of indexers in a given
31180         Type. 
31181
31182         (IStackStore): Renamed from LValue, as it did not really describe
31183         what this did.  Also ResolveLValue is gone from this interface and
31184         now is part of Expression.
31185
31186         (ElementAccess): Depending on the element access type
31187
31188         * typemanager.cs: Add `indexer_name_type' as a Core type
31189         (System.Runtime.CompilerServices.IndexerNameAttribute)
31190
31191         * statement.cs (Goto): Take a location.
31192
31193 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31194
31195         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31196         if two delegates are compatible.
31197
31198         (NewDelegate::DoResolve): Update to take care of the case when
31199         we instantiate a delegate from another delegate.
31200
31201         * typemanager.cs (FindMembers): Don't even try to look up members
31202         of Delegate types for now.
31203
31204 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31205
31206         * delegate.cs (NewDelegate): New class to take care of delegate
31207         instantiation.
31208
31209         * expression.cs (New): Split the delegate related code out into 
31210         the NewDelegate class.
31211
31212         * delegate.cs (DelegateInvocation): New class to handle delegate 
31213         invocation.
31214
31215         * expression.cs (Invocation): Split out delegate related code into
31216         the DelegateInvocation class.
31217
31218 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31219
31220         * expression.cs (New::DoResolve): Implement delegate creation fully
31221         and according to the spec.
31222
31223         (New::DoEmit): Update to handle delegates differently.
31224
31225         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31226         because of which we were printing out arguments in reverse order !
31227
31228         * delegate.cs (VerifyMethod): Implement to check if the given method
31229         matches the delegate.
31230
31231         (FullDelegateDesc): Implement.
31232
31233         (VerifyApplicability): Implement.
31234
31235         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31236         delegate invocations too.
31237
31238         (Invocation::Emit): Ditto.
31239
31240         * ../errors/cs1593.cs : Added.
31241
31242         * ../errors/cs1594.cs : Added.
31243
31244         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31245
31246 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31247
31248         * typemanager.cs (intptr_type): Core type for System.IntPtr
31249
31250         (InitCoreTypes): Update for the same.
31251
31252         (iasyncresult_type, asynccallback_type): Ditto.
31253
31254         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31255         correct.
31256
31257         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31258         too.
31259
31260         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31261         the builders for the 4 members of a delegate type :-)
31262
31263         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31264         type.
31265
31266         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31267
31268         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31269
31270 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31271
31272         * statement.cs (Break::Emit): Implement.   
31273         (Continue::Emit): Implement.
31274
31275         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31276         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31277         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31278         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31279         end loop
31280
31281         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31282         properties that track the label for the current loop (begin of the
31283         loop and end of the loop).
31284
31285 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31286
31287         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31288         use of emitting anything at all.
31289
31290         * class.cs, rootcontext.cs : Get rid of calls to the same.
31291
31292         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31293
31294         (Populate): Define the constructor correctly and set the implementation
31295         attributes.
31296
31297         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31298         have been defined.
31299
31300         (AddDelegateType): Implement.
31301
31302         (IsDelegateType): Implement helper method.
31303
31304         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31305
31306         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31307         and accordingly handle it.
31308
31309         * delegate.cs (Populate): Take TypeContainer argument.
31310         Implement bits to define the Invoke method. However, I still haven't figured out
31311         how to take care of the native int bit :-(
31312
31313         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31314         Qualify the name of the delegate, not its return type !
31315
31316         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31317         conversion.
31318
31319         (StandardConversionExists): Checking for array types turns out to be recursive.
31320
31321         (ConvertReferenceExplicit): Implement array conversion.
31322
31323         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31324
31325 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31326
31327         * cs-parser.jay (delegate_declaration): Store the fully qualified
31328         name as it is a type declaration.
31329
31330         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31331         readonly.
31332
31333         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31334         as TypeContainer::DefineType.
31335
31336         (Populate): Method in which all the definition of the various methods (Invoke)
31337         etc is done.
31338
31339         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31340         see.
31341
31342         (CloseDelegate): Finally creates the delegate.
31343
31344         * class.cs (TypeContainer::DefineType): Update to define delegates.
31345         (Populate, Emit and CloseType): Do the same thing here too.
31346
31347         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31348         delegates in all these operations.
31349
31350 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31351
31352         * expression.cs: LocalTemporary: a new expression used to
31353         reference a temporary that has been created.
31354
31355         * assign.cs: Handle PropertyAccess back here, so that we can
31356         provide the proper semantic access to properties.
31357
31358         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31359         a few more explicit conversions. 
31360
31361         * modifiers.cs: `NEW' modifier maps to HideBySig.
31362
31363         * expression.cs (PropertyExpr): Make this into an
31364         ExpressionStatement, and support the EmitStatement code path. 
31365
31366         Perform get/set error checking, clean up the interface.
31367
31368         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31369         them into toplevel access objects.
31370
31371 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31372
31373         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31374         SRE.
31375
31376         * typemanager.cs: Keep track here of our PropertyBuilders again to
31377         work around lameness in SRE.
31378
31379 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31380
31381         * expression.cs (LValue::LValueResolve): New method in the
31382         interface, used to perform a second resolution pass for LValues. 
31383
31384         (This::DoResolve): Catch the use of this in static methods.
31385
31386         (This::LValueResolve): Implement.
31387
31388         (This::Store): Remove warning, assigning to `this' in structures
31389         is 
31390
31391         (Invocation::Emit): Deal with invocation of
31392         methods on value types.  We need to pass the address to structure
31393         methods rather than the object itself.  (The equivalent code to
31394         emit "this" for structures leaves the entire structure on the
31395         stack instead of a pointer to it). 
31396
31397         (ParameterReference::DoResolve): Compute the real index for the
31398         argument based on whether the method takes or not a `this' pointer
31399         (ie, the method is static).
31400
31401         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31402         value types returned from functions when we need to invoke a
31403         method on the sturcture.
31404
31405
31406 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31407
31408         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31409         defining the type in the Modulebuilder or Typebuilder. This is to take
31410         care of nested types which need to be defined on the TypeBuilder using
31411         DefineNestedMethod.
31412
31413         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31414         methods in RootContext, only ported to be part of TypeContainer.
31415
31416         (TypeContainer::GetInterfaceOrClass): Ditto.
31417
31418         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31419
31420         * interface.cs (Interface::DefineInterface): New method. Does exactly
31421         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31422         too.
31423
31424         (Interface::GetInterfaces): Move from RootContext here and port.
31425
31426         (Interface::GetInterfaceByName): Same here.
31427
31428         * rootcontext.cs (ResolveTree): Re-write.
31429
31430         (PopulateTypes): Re-write.
31431
31432         * class.cs (TypeContainer::Populate): Populate nested types too.
31433         (TypeContainer::Emit): Emit nested members too.
31434
31435         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31436         instead just use the name argument passed in as it is already fully
31437         qualified.
31438
31439         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31440         to TypeContainer mapping to see if a type is user-defined.
31441
31442         * class.cs (TypeContainer::CloseType): Implement. 
31443
31444         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31445         the default constructor.
31446
31447         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31448         twice.
31449
31450         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31451
31452         * interface.cs (CloseType): Create the type here.
31453
31454         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31455         the hierarchy.
31456
31457         Remove all the methods which are now in TypeContainer.
31458
31459 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31460
31461         * delegate.cs (Define): Re-write bits to define the delegate
31462         correctly.
31463
31464 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31465
31466         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31467
31468         * expression.cs (ImplicitReferenceConversion): handle null as well
31469         as a source to convert to any reference type.
31470
31471         * statement.cs (Return): Perform any implicit conversions to
31472         expected return type.  
31473
31474         Validate use of return statement.  
31475
31476         * codegen.cs (EmitContext): Pass the expected return type here.
31477
31478         * class.cs (Method, Constructor, Property): Pass expected return
31479         type to EmitContext.
31480
31481 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31482
31483         * expression.cs: Make DoResolve take an EmitContext instead of a
31484         TypeContainer.
31485
31486         Replaced `l' and `location' for `loc', for consistency.
31487
31488         (Error, Warning): Remove unneeded Tc argument.
31489
31490         * assign.cs, literal.cs, constant.cs: Update to new calling
31491         convention. 
31492
31493         * codegen.cs: EmitContext now contains a flag indicating whether
31494         code is being generated in a static method or not.
31495
31496         * cs-parser.jay: DecomposeQI, new function that replaces the old
31497         QualifiedIdentifier.  Now we always decompose the assembled
31498         strings from qualified_identifier productions into a group of
31499         memberaccesses.
31500
31501 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31502
31503         * rootcontext.cs: Deal with field-less struct types correctly now
31504         by passing the size option to Define Type.
31505
31506         * class.cs: Removed hack that created one static field. 
31507
31508 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31509
31510         * statement.cs: Moved most of the code generation here. 
31511
31512 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31513
31514         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31515         seem very right.
31516
31517         (ElementAccess): Remove useless bits for now - keep checks as the spec
31518         says.
31519
31520 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31521
31522         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31523         and start performing checks according to the spec.
31524
31525 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31526
31527         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31528         rank_specifiers instead.
31529
31530         (rank_specifiers): Change the order in which the rank specifiers are stored
31531
31532         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31533
31534         * expression.cs (ElementAccess): Implement the LValue interface too.
31535
31536 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31537
31538         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31539         except that user defined conversions are not included.
31540
31541         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31542         perform the conversion of the return type, if necessary.
31543
31544         (New::DoResolve): Check whether we are creating an array or an object
31545         and accordingly do the needful.
31546
31547         (New::Emit): Same here.
31548
31549         (New::DoResolve): Implement guts of array creation.
31550
31551         (New::FormLookupType): Helper function.
31552
31553 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31554
31555         * codegen.cs: Removed most of the code generation here, and move the
31556         corresponding code generation bits to the statement classes. 
31557
31558         Added support for try/catch/finalize and throw.
31559
31560         * cs-parser.jay: Added support for try/catch/finalize.
31561
31562         * class.cs: Catch static methods having the flags override,
31563         virtual or abstract.
31564
31565         * expression.cs (UserCast): This user cast was not really doing
31566         what it was supposed to do.  Which is to be born in fully resolved
31567         state.  Parts of the resolution were being performed at Emit time! 
31568
31569         Fixed this code.
31570
31571 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31572
31573         * expression.cs: Implicity convert the result from UserCast.
31574
31575 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31576
31577         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31578         prevented it from working correctly. 
31579
31580         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31581         merely ConvertImplicit.
31582
31583 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31584
31585         * typemanager.cs: Make the LookupTypeContainer function static,
31586         and not per-instance.  
31587
31588         * class.cs: Make static FindMembers (the one that takes a Type
31589         argument). 
31590
31591         * codegen.cs: Add EmitForeach here.
31592
31593         * cs-parser.jay: Make foreach a toplevel object instead of the
31594         inline expansion, as we need to perform semantic analysis on it. 
31595
31596 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31597
31598         * expression.cs (Expression::ImplicitUserConversion): Rename to
31599         UserDefinedConversion.
31600
31601         (Expression::UserDefinedConversion): Take an extra argument specifying 
31602         whether we look for explicit user conversions too.
31603
31604         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31605
31606         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31607
31608         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31609         with the appropriate arguments.
31610
31611         * cs-parser.jay (cast_expression): Record location too.
31612
31613         * expression.cs (Cast): Record location info.
31614
31615         (Expression::ConvertExplicit): Take location argument.
31616
31617         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31618         to determine if we are doing explicit conversions.
31619
31620         (UserCast::Emit): Update accordingly.
31621
31622         (Expression::ConvertExplicit): Report an error if everything fails.
31623
31624         * ../errors/cs0030.cs : Add.
31625
31626 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31627
31628         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31629         virtual and newslot bits. 
31630
31631         * class.cs (TypeContainer::RegisterRequiredImplementations):
31632         Record methods we need.
31633
31634         (TypeContainer::MakeKey): Helper function to make keys for
31635         MethodBases, since the Methodbase key is useless.
31636
31637         (TypeContainer::Populate): Call RegisterRequiredImplementations
31638         before defining the methods.   
31639
31640         Create a mapping for method_builders_to_methods ahead of time
31641         instead of inside a tight loop.
31642
31643         (::RequireMethods):  Accept an object as the data to set into the
31644         hashtable so we can report interface vs abstract method mismatch.
31645
31646 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31647
31648         * report.cs: Make all of it static.
31649
31650         * rootcontext.cs: Drop object_type and value_type computations, as
31651         we have those in the TypeManager anyways.
31652
31653         Drop report instance variable too, now it is a global.
31654
31655         * driver.cs: Use try/catch on command line handling.
31656
31657         Add --probe option to debug the error reporting system with a test
31658         suite. 
31659
31660         * report.cs: Add support for exiting program when a probe
31661         condition is reached.
31662
31663 2001-10-03  Ravi Pratap  <ravi@ximian.com>
31664
31665         * expression.cs (Binary::DoNumericPromotions): Fix the case when
31666         we do a forcible conversion regardless of type, to check if 
31667         ForceConversion returns a null.
31668
31669         (Binary::error19): Use location to report error.
31670
31671         (Unary::error23): Use location here too.
31672
31673         * ../errors/cs0019.cs : Check in.
31674
31675         * ../errors/cs0023.cs : Check in.
31676
31677         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
31678         case of a non-null MethodInfo object with a length of 0 !
31679
31680         (Binary::ResolveOperator): Flag error if overload resolution fails to find
31681         an applicable member - according to the spec :-)
31682         Also fix logic to find members in base types.
31683
31684         (Unary::ResolveOperator): Same here.
31685
31686         (Unary::report23): Change name to error23 and make first argument a TypeContainer
31687         as I was getting thoroughly confused between this and error19 :-)
31688
31689         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
31690         (::FindMostEncompassedType): Implement.
31691         (::FindMostEncompassingType): Implement.
31692         (::StandardConversionExists): Implement.
31693
31694         (UserImplicitCast): Re-vamp. We now need info about most specific
31695         source and target types so that we can do the necessary conversions.
31696
31697         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
31698         mathematical union with no duplicates.
31699
31700 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31701
31702         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
31703         in order from base classes to child classes, so that we can in
31704         child classes look up in our parent for method names and
31705         attributes (required for handling abstract, virtual, new, override
31706         constructs: we need to instrospect our base class, and if we dont
31707         populate the classes in order, the introspection might be
31708         incorrect.  For example, a method could query its parent before
31709         the parent has any methods and would determine that the parent has
31710         no abstract methods (while it could have had them)).
31711
31712         (RootContext::CreateType): Record the order in which we define the
31713         classes.
31714
31715 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
31716
31717         * class.cs (TypeContainer::Populate): Also method definitions can
31718         fail now, keep track of this.
31719
31720         (TypeContainer::FindMembers): Implement support for
31721         DeclaredOnly/noDeclaredOnly flag.
31722
31723         (Constructor::Emit) Return the ConstructorBuilder.
31724
31725         (Method::Emit) Return the MethodBuilder. 
31726         Check for abstract or virtual methods to be public.
31727
31728         * rootcontext.cs (RootContext::CreateType): Register all the
31729         abstract methods required for the class to be complete and the
31730         interface methods that must be implemented. 
31731
31732         * cs-parser.jay: Report error 501 (method requires body if it is
31733         not marked abstract or extern).
31734
31735         * expression.cs (TypeOf::Emit): Implement.
31736
31737         * typemanager.cs: runtime_handle_type, new global type.
31738
31739         * class.cs (Property::Emit): Generate code for properties.
31740
31741 2001-10-02  Ravi Pratap  <ravi@ximian.com>
31742
31743         * expression.cs (Unary::ResolveOperator): Find operators on base type
31744         too - we now conform exactly to the spec.
31745
31746         (Binary::ResolveOperator): Same here.
31747
31748         * class.cs (Operator::Define): Fix minor quirk in the tests.
31749
31750         * ../errors/cs0215.cs : Added.
31751
31752         * ../errors/cs0556.cs : Added.
31753
31754         * ../errors/cs0555.cs : Added.
31755
31756 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31757
31758         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
31759         single integer which is really efficient
31760
31761 2001-10-01  Ravi Pratap  <ravi@ximian.com>
31762
31763         *  expression.cs (Expression::ImplicitUserConversion): Use location
31764         even in the case when we are examining True operators.
31765  
31766         * class.cs (Operator::Define): Perform extensive checks to conform
31767         with the rules for operator overloading in the spec.
31768
31769         * expression.cs (Expression::ImplicitReferenceConversion): Implement
31770         some of the other conversions mentioned in the spec.
31771
31772         * typemanager.cs (array_type): New static member for the System.Array built-in
31773         type.
31774
31775         (cloneable_interface): For System.ICloneable interface.
31776
31777         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
31778         we start resolving the tree and populating types.
31779
31780         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
31781  
31782 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31783
31784         * expression.cs (Expression::ExprClassFromMemberInfo,
31785         Expression::Literalize): Create literal expressions from
31786         FieldInfos which are literals.
31787
31788         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
31789         type casts, because they were wrong.  The test suite in tests
31790         caught these ones.
31791
31792         (ImplicitNumericConversion): ushort to ulong requires a widening
31793         cast. 
31794
31795         Int32 constant to long requires widening cast as well.
31796
31797         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
31798         for integers because the type on the stack is not i4.
31799
31800 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
31801
31802         * expression.cs (report118): require location argument. 
31803
31804         * parameter.cs: Do not dereference potential null value.
31805
31806         * class.cs: Catch methods that lack the `new' keyword when
31807         overriding a name.  Report warnings when `new' is used without
31808         anything being there to override.
31809
31810         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
31811
31812         * class.cs: Only add constructor to hashtable if it is non-null
31813         (as now constructors can fail on define).
31814
31815         (TypeManager, Class, Struct): Take location arguments.
31816
31817         Catch field instance initialization in structs as errors.
31818
31819         accepting_filter: a new filter for FindMembers that is static so
31820         that we dont create an instance per invocation.
31821
31822         (Constructor::Define): Catch errors where a struct constructor is
31823         parameterless 
31824
31825         * cs-parser.jay: Pass location information for various new
31826         constructs. 
31827
31828         * delegate.cs (Delegate): take a location argument.
31829
31830         * driver.cs: Do not call EmitCode if there were problesm in the
31831         Definition of the types, as many Builders wont be there. 
31832
31833         * decl.cs (Decl::Decl): Require a location argument.
31834
31835         * cs-tokenizer.cs: Handle properly hex constants that can not fit
31836         into integers, and find the most appropiate integer for it.
31837
31838         * literal.cs: Implement ULongLiteral.
31839
31840         * rootcontext.cs: Provide better information about the location of
31841         failure when CreateType fails.
31842
31843 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
31844
31845         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
31846         as well.
31847
31848         * expression.cs (Binary::CheckShiftArguments): Add missing type
31849         computation.
31850         (Binary::ResolveOperator): Add type to the logical and and logical
31851         or, Bitwise And/Or and Exclusive Or code paths, it was missing
31852         before.
31853
31854         (Binary::DoNumericPromotions): In the case where either argument
31855         is ulong (and most signed types combined with ulong cause an
31856         error) perform implicit integer constant conversions as well.
31857
31858 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31859
31860         * expression.cs (UserImplicitCast): Method should always be
31861         non-null. 
31862         (Invocation::BetterConversion): Simplified test for IntLiteral.
31863
31864         (Expression::ImplicitNumericConversion): Split this routine out.
31865         Put the code that performs implicit constant integer conversions
31866         here. 
31867
31868         (Expression::Resolve): Become a wrapper around DoResolve so we can
31869         check eclass and type being set after resolve.
31870
31871         (Invocation::Badness): Remove this dead function
31872
31873         (Binary::ResolveOperator): Do not compute the expensive argumnets
31874         unless we have a union for it.
31875
31876         (Probe::Emit): Is needs to do an isinst and then
31877         compare against null.
31878
31879         (::CanConvert): Added Location argument.  If the Location argument
31880         is null (Location.Null), then we do not report errors.  This is
31881         used by the `probe' mechanism of the Explicit conversion.  We do
31882         not want to generate an error for something that the user
31883         explicitly requested to be casted.  But the pipeline for an
31884         explicit cast first tests for potential implicit casts.
31885
31886         So for now, if the Location is null, it means `Probe only' to
31887         avoid adding another argument.   Might have to revise this
31888         strategy later.
31889
31890         (ClassCast): New class used to type cast objects into arbitrary
31891         classes (used in Explicit Reference Conversions).
31892
31893         Implement `as' as well.
31894
31895         Reverted all the patches from Ravi below: they were broken:
31896
31897                 * The use of `level' as a mechanism to stop recursive
31898                   invocations is wrong.  That was there just to catch the
31899                   bug with a strack trace but not as a way of addressing
31900                   the problem.
31901
31902                   To fix the problem we have to *understand* what is going
31903                   on and the interactions and come up with a plan, not
31904                   just get things going.
31905
31906                 * The use of the type conversion cache that I proposed
31907                   last night had an open topic: How does this work across
31908                   protection domains.  A user defined conversion might not
31909                   be public in the location where we are applying the
31910                   conversion, a different conversion might be selected
31911                   (ie, private A->B (better) but public B->A (worse),
31912                   inside A, A->B applies, but outside it, B->A will
31913                   apply).
31914
31915                 * On top of that (ie, even if the above is solved),
31916                   conversions in a cache need to be abstract.  Ie, `To
31917                   convert from an Int to a Short use an OpcodeCast', not
31918                   `To convert from an Int to a Short use the OpcodeCast on
31919                   the variable 5' (which is what this patch was doing).
31920
31921 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31922
31923         * expression.cs (Invocation::ConversionExists): Re-write to use
31924         the conversion cache
31925
31926         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
31927         cache all conversions done, not just user-defined ones.
31928
31929         (Invocation::BetterConversion): The real culprit. Use ConversionExists
31930         to determine if a conversion exists instead of acutually trying to 
31931         perform the conversion. It's faster too.
31932
31933         (Expression::ConvertExplicit): Modify to use ConversionExists to check
31934         and only then attempt the implicit conversion.
31935
31936 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31937
31938         * expression.cs (ConvertImplicit): Use a cache for conversions
31939         already found. Check level of recursion and bail out if necessary.
31940
31941 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31942
31943         * typemanager.cs (string_concat_string_string, string_concat_object_object):
31944         Export standard methods that we expect for string operations.
31945
31946         * statement.cs (Block::UsageWarning): Track usage of variables and
31947         report the errors for not used variables.
31948
31949         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
31950         operator. 
31951
31952 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
31953
31954         * codegen.cs: remove unnneded code 
31955
31956         * expression.cs: Removed BuiltinTypeAccess class
31957
31958         Fix the order in which implicit conversions are
31959         done.  
31960
31961         The previous fixed dropped support for boxed conversions (adding a
31962         test to the test suite now)
31963
31964         (UserImplicitCast::CanConvert): Remove test for source being null,
31965         that code is broken.  We should not feed a null to begin with, if
31966         we do, then we should track the bug where the problem originates
31967         and not try to cover it up here.
31968
31969         Return a resolved expression of type UserImplicitCast on success
31970         rather than true/false.  Ravi: this is what I was talking about,
31971         the pattern is to use a static method as a "constructor" for
31972         objects. 
31973
31974         Also, do not create arguments until the very last minute,
31975         otherwise we always create the arguments even for lookups that
31976         will never be performed. 
31977
31978         (UserImplicitCast::Resolve): Eliminate, objects of type
31979         UserImplicitCast are born in a fully resolved state. 
31980
31981         * typemanager.cs (InitCoreTypes): Init also value_type
31982         (System.ValueType). 
31983
31984         * expression.cs (Cast::Resolve): First resolve the child expression.
31985
31986         (LValue): Add new method AddressOf to be used by
31987         the `&' operator.  
31988
31989         Change the argument of Store to take an EmitContext instead of an
31990         ILGenerator, because things like FieldExpr need to be able to call
31991         their children expression to generate the instance code. 
31992
31993         (Expression::Error, Expression::Warning): Sugar functions for
31994         reporting errors.
31995
31996         (Expression::MemberLookup): Accept a TypeContainer instead of a
31997         Report as the first argument.
31998
31999         (Expression::ResolvePrimary): Killed.  I still want to improve
32000         this as currently the code is just not right.
32001
32002         (Expression::ResolveMemberAccess): Simplify, but it is still
32003         wrong. 
32004
32005         (Unary::Resolve): Catch errors in AddressOf operators.
32006
32007         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
32008         index to a byte for the short-version, or the compiler will choose
32009         the wrong Emit call, which generates the wrong data.
32010
32011         (ParameterReference::Emit, ::Store): same.
32012
32013         (FieldExpr::AddressOf): Implement.
32014
32015         * typemanager.cs: TypeManager: made public variable instead of
32016         property.
32017
32018         * driver.cs: document --fatal.
32019
32020         * report.cs (ErrorMessage, WarningMessage): new names for the old
32021         Error and Warning classes.
32022
32023         * cs-parser.jay (member_access): Turn built-in access to types
32024         into a normal simplename
32025
32026 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32027
32028         * expression.cs (Invocation::BetterConversion): Fix to cope
32029         with q being null, since this was introducing a bug.
32030
32031         * expression.cs (ConvertImplicit): Do built-in conversions first.
32032
32033 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32034
32035         * expression.cs (UserImplicitCast::Resolve): Fix bug.
32036
32037 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32038
32039         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
32040         I had introduced long ago (what's new ?).
32041
32042         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
32043         the work of all the checking. 
32044         (ConvertImplicit): Call CanConvert and only then create object if necessary.
32045         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
32046
32047         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32048         that is the right way. 
32049
32050         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32051         overloading resolution. Use everywhere instead of cutting and pasting code.
32052
32053         (Binary::ResolveOperator): Use MakeUnionSet.
32054
32055         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32056         we have to convert to bool types. Not complete yet.
32057
32058 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32059
32060         * typemanager.cs (TypeManager::CSharpName): support ushort.
32061
32062         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32063         to provide an expression that performsn an implicit constant int
32064         conversion (section 6.1.6).
32065         (Expression::ConvertImplicitRequired): Reworked to include
32066         implicit constant expression conversions.
32067
32068         (Expression::ConvertNumericExplicit): Finished.
32069
32070         (Invocation::Emit): If InstanceExpression is null, then it means
32071         that we perform a call on this.
32072
32073 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32074
32075         * expression.cs (Unary::Emit): Remove some dead code.
32076         (Probe): Implement Resolve and Emit for `is'.
32077         (Expression::ConvertImplicitRequired): Attempt to do constant
32078         expression conversions here.  Maybe should be moved to
32079         ConvertImplicit, but I am not sure.
32080         (Expression::ImplicitLongConstantConversionPossible,
32081         Expression::ImplicitIntConstantConversionPossible): New functions
32082         that tell whether is it possible to apply an implicit constant
32083         expression conversion.
32084
32085         (ConvertNumericExplicit): Started work on explicit numeric
32086         conversions.
32087
32088         * cs-parser.jay: Update operator constants.
32089
32090         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32091         (Parameters::GetSignature): Hook up VerifyArgs here.
32092         (Parameters::VerifyArgs): Verifies that no two arguments have the
32093         same name. 
32094
32095         * class.cs (Operator): Update the operator names to reflect the
32096         ones that the spec expects (as we are just stringizing the
32097         operator names).
32098
32099         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32100         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32101         previous usage did only work for our methods.
32102         (Expression::ConvertImplicit): Handle decimal implicit numeric
32103         conversions as well.
32104         (Expression::InternalTypeConstructor): Used to invoke constructors
32105         on internal types for default promotions.
32106
32107         (Unary::Emit): Implement special handling for the pre/post
32108         increment/decrement for overloaded operators, as they need to have
32109         the same semantics as the other operators.
32110
32111         (Binary::ResolveOperator): ditto.
32112         (Invocation::ConversionExists): ditto.
32113         (UserImplicitCast::Resolve): ditto.
32114
32115 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32116
32117         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32118         operator, return after emitting body. Regression tests pass again !
32119
32120         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32121         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32122         (Invocation::OverloadResolve): Ditto.
32123         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32124
32125         * everywhere : update calls to the above methods accordingly.
32126
32127 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32128
32129         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32130
32131         * expression.cs (ExpressionStatement): New base class used for
32132         expressions that can appear in statements, so that we can provide
32133         an alternate path to generate expression that do not leave a value
32134         on the stack.
32135
32136         (Expression::Emit, and all the derivatives): We no longer return
32137         whether a value is left on the stack or not.  Every expression
32138         after being emitted leaves a single value on the stack.
32139
32140         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32141         facilties of ExpressionStatement if possible.
32142
32143         * cs-parser.jay: Update statement_expression.
32144
32145 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32146
32147         * driver.cs: Change the wording of message
32148
32149 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32150
32151         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32152         the type of the expression to the return type of the method if
32153         we have an overloaded operator match ! The regression tests pass again !
32154         (Unary::ResolveOperator): Ditto.
32155
32156         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32157         to find "op_Implicit", not "implicit" ;-)
32158         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32159         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32160
32161         * everywhere : Correct calls to the above accordingly.
32162
32163         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32164         (ConvertImplicit): Do user-defined conversion if it exists.
32165
32166 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32167
32168         * assign.cs: track location.
32169         (Resolve): Use implicit conversions on assignment.
32170
32171         * literal.cs: Oops.  Not good, Emit of short access values should
32172         pass (Bytes) or the wrong argument will be selected.
32173
32174         * expression.cs (Unary::Emit): Emit code for -expr.
32175
32176         (Unary::ResolveOperator): Handle `Substract' for non-constants
32177         (substract from zero from the non-constants).
32178         Deal with Doubles as well. 
32179
32180         (Expression::ConvertImplicitRequired): New routine that reports an
32181         error if no implicit conversion exists. 
32182
32183         (Invocation::OverloadResolve): Store the converted implicit
32184         expressions if we make them
32185
32186 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32187
32188         * class.cs (ConstructorInitializer): Take a Location argument.
32189         (ConstructorBaseInitializer): Same here.
32190         (ConstructorThisInitializer): Same here.
32191
32192         * cs-parser.jay : Update all calls accordingly.
32193
32194         * expression.cs (Unary, Binary, New): Take location argument.
32195         Update accordingly everywhere.
32196
32197         * cs-parser.jay : Update all calls to the above to take a location
32198         argument.
32199
32200         * class.cs : Ditto.
32201
32202 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32203
32204         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32205         (Invocation::BetterConversion): Same here
32206         (Invocation::ConversionExists): Ditto.
32207
32208         (Invocation::ConversionExists): Implement.
32209
32210 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32211
32212         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32213         Also take an additional TypeContainer argument.
32214
32215         * All over : Pass in TypeContainer as argument to OverloadResolve.
32216
32217         * typemanager.cs (CSharpName): Update to check for the string type and return
32218         that too.
32219
32220         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32221         a given method.
32222
32223 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32224
32225         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32226         (Invocation::BetterFunction): Implement.
32227         (Invocation::BetterConversion): Implement.
32228         (Invocation::ConversionExists): Skeleton, no implementation yet.
32229
32230         Okay, things work fine !
32231
32232 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32233
32234         * typemanager.cs: declare and load enum_type, delegate_type and
32235         void_type. 
32236
32237         * expression.cs (Expression::Emit): Now emit returns a value that
32238         tells whether a value is left on the stack or not.  This strategy
32239         might be reveted tomorrow with a mechanism that would address
32240         multiple assignments.
32241         (Expression::report118): Utility routine to report mismatches on
32242         the ExprClass.
32243
32244         (Unary::Report23): Report impossible type/operator combination
32245         utility function.
32246
32247         (Unary::IsIncrementableNumber): Whether the type can be
32248         incremented or decremented with add.
32249         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32250         complemented. 
32251         (Unary::ResolveOperator): Implement ++, !, ~,
32252
32253         (Invocation::Emit): Deal with new Emit convetion.
32254
32255         * All Expression derivatives: Updated their Emit method to return
32256         whether they leave values on the stack or not.
32257
32258         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32259         stack for expressions that are statements. 
32260
32261 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32262
32263         * expression.cs (LValue): New interface.  Must be implemented by
32264         LValue objects.
32265         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32266         LValue interface.
32267
32268         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32269         interface for generating code, simplifies the code.
32270
32271 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32272
32273         * expression.cs (everywhere): Comment out return statements in ::Resolve
32274         methods to avoid the warnings.
32275
32276 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32277
32278         * driver.cs (parse): Report error 2001 if we can not open the
32279         source file.
32280
32281         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32282         not resolve it.
32283
32284         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32285         object. 
32286
32287         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32288         otherwise nested blocks end up with the same index.
32289
32290         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32291
32292         * expression.cs:  Instead of having FIXMEs in the Resolve
32293         functions, throw exceptions so it is obvious that we are facing a
32294         bug. 
32295
32296         * cs-parser.jay (invocation_expression): Pass Location information.
32297
32298         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32299         Use a basename for those routines because .NET does not like paths
32300         on them. 
32301
32302         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32303         already defined.
32304
32305 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32306
32307         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32308         are loading the correct data types (throws an exception if not).
32309         (TypeManager::InitCoreTypes): Use CoreLookupType
32310
32311         * expression.cs (Unary::ResolveOperator): return the child
32312         expression for expressions which are just +expr.
32313         (Unary::ResolveOperator): Return negative literals for -LITERAL
32314         expressions (otherwise they are Unary {Literal}).
32315         (Invocation::Badness): Take into account `Implicit constant
32316         expression conversions'.
32317
32318         * literal.cs (LongLiteral): Implement long literal class.
32319         (IntLiteral): export the `Value' of the intliteral. 
32320
32321 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32322
32323         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32324
32325         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32326         instead of 'Operator'
32327
32328         * expression.cs (Binary::ResolveOperator): Update accordingly.
32329         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32330         and 'Minus'
32331
32332         * cs-parser.jay (unary_expression): Update to use the new names.
32333
32334         * gen-treedump.cs (GetUnary): Same here.
32335
32336         * expression.cs (Unary::Resolve): Implement.
32337         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32338         operators are found instead of making noise ;-)
32339         (Unary::ResolveOperator): New method to do precisely the same thing which
32340         Binary::ResolveOperator does for Binary expressions.
32341         (Unary.method, .Arguments): Add.
32342         (Unary::OperName): Implement.   
32343         (Unary::ForceConversion): Copy and Paste !
32344
32345         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32346         a unary operator.
32347
32348         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32349         for the inbuilt operators. Only overloading works for now ;-)
32350
32351 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32352
32353         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32354         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32355
32356         * expression.cs (This::Emit): Implement. 
32357         (This::Resolve): Implement.
32358         (TypeOf:Resolve): Implement.
32359         (Expression::ResolveSimpleName): Add an implicit this to instance
32360         field references. 
32361         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32362         Bind instance variable to Field expressions.
32363         (FieldExpr::Instance): New field used to track the expression that
32364         represents the object instance.
32365         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32366         binding 
32367         (FieldExpr::Emit): Implement.
32368
32369         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32370         the last instruction contains a return opcode to avoid generating
32371         the last `ret' instruction (this generates correct code, and it is
32372         nice to pass the peverify output).
32373
32374         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32375         initializer for static and instance variables.
32376         (Constructor::Emit): Allow initializer to be null in the case of
32377         static constructors.  Only emit initializer for instance
32378         constructors. 
32379
32380         (TypeContainer::FindMembers): Return a null array if there are no
32381         matches.
32382
32383         Also fix the code for the MemberTypes.Method branch, as it was not
32384         scanning that for operators (or tried to access null variables before).
32385
32386         * assign.cs (Assign::Emit): Handle instance and static fields. 
32387
32388         * TODO: Updated.
32389
32390         * driver.cs: Stop compilation if there are parse errors.
32391
32392         * cs-parser.jay (constructor_declaration): Provide default base
32393         initializer for non-static constructors.
32394         (constructor_declarator): Do not provide a default base
32395         initializers if none was specified.
32396         Catch the fact that constructors should not have parameters.
32397
32398         * class.cs: Do not emit parent class initializers for static
32399         constructors, that should be flagged as an error.
32400
32401 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32402
32403         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32404         Move back code into TypeContainer::Populate.
32405
32406 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32407
32408         * class.cs (TypeContainer::AddConstructor): Fix the check to
32409         compare against Name, not Basename. 
32410         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32411
32412         * cs-parser.jay : Update accordingly.
32413
32414         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32415         for methods, don't forget to look into the operators too.
32416         (RegisterMethodBuilder): Helper method to take care of this for
32417         methods, constructors and operators.
32418         (Operator::Define): Completely revamp.
32419         (Operator.OperatorMethod, MethodName): New fields.
32420         (TypeContainer::Populate): Move the registering of builders into
32421         RegisterMethodBuilder.
32422         (Operator::Emit): Re-write.
32423
32424         * expression.cs (Binary::Emit): Comment out code path to emit method
32425         invocation stuff for the case when we have a user defined operator. I am
32426         just not able to get it right !
32427
32428 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32429
32430         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32431         argument. 
32432
32433         (Expression::MemberLookup): Provide a version that allows to
32434         specify the MemberTypes and BindingFlags. 
32435
32436         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32437         so it was not fetching variable information from outer blocks.
32438
32439         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32440         Beforefieldinit as it was buggy.
32441
32442         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32443         that Ravi put here.  
32444
32445         * class.cs (Constructor::Emit): Only emit if block is not null.
32446         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32447         deal with this by semantically definining it as if the user had
32448         done it.
32449
32450         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32451         constructors as we now "emit" them at a higher level.
32452
32453         (TypeContainer::DefineDefaultConstructor): Used to define the
32454         default constructors if none was provided.
32455
32456         (ConstructorInitializer): Add methods Resolve and Emit. 
32457
32458         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32459
32460 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32461
32462         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32463         the default constructor builder with our hashtable for methodbuilders
32464         to methodcores.
32465
32466         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32467         and argument_count is 0 in which case we have a match.
32468         (Binary::ResolveOperator): More null checking and miscellaneous coding
32469         style cleanup.
32470
32471 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32472
32473         * rootcontext.cs (IsNameSpace): Compare against null.
32474
32475         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32476
32477         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32478         and Unary::Operator.
32479
32480         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32481         accordingly.
32482
32483         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32484         we have overloaded operators.
32485         (Binary::ResolveOperator): Implement the part which does the operator overload
32486         resolution.
32487
32488         * class.cs (Operator::Emit): Implement.
32489         (TypeContainer::Emit): Emit the operators we have too.
32490
32491         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32492         the case when we have a user-defined operator.
32493
32494 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32495
32496         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32497
32498 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32499
32500         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32501         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32502         (Constructor::Emit): Implement.
32503         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32504         if we have no work to do. 
32505         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32506         Emit method.
32507
32508         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32509         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32510
32511         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32512         of parent.parent.
32513
32514 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32515
32516         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32517         in the source.
32518         (Tree::RecordNamespace): Method to do what the name says ;-)
32519         (Tree::Namespaces): Property to get at the namespaces hashtable.
32520
32521         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32522         keep track.
32523
32524         * rootcontext.cs (IsNamespace): Fixed it :-)
32525
32526 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32527
32528         * class.cs (TypeContainer::FindMembers): Add support for
32529         constructors. 
32530         (MethodCore): New class that encapsulates both the shared aspects
32531         of a Constructor and a Method.  
32532         (Method, Constructor): Factored pieces into MethodCore.
32533
32534         * driver.cs: Added --fatal which makes errors throw exceptions.
32535         Load System assembly as well as part of the standard library.
32536
32537         * report.cs: Allow throwing exceptions on errors for debugging.
32538
32539         * modifiers.cs: Do not use `parent', instead use the real type
32540         container to evaluate permission settings.
32541
32542         * class.cs: Put Ravi's patch back in.  He is right, and we will
32543         have to cope with the
32544
32545 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32546
32547         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32548         FamORAssem, not FamANDAssem.
32549
32550 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32551
32552         * driver.cs: Added --parse option that only parses its input files
32553         and terminates.
32554
32555         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32556         incorrect.  IsTopLevel is not used to tell whether an object is
32557         root_types or not (that can be achieved by testing this ==
32558         root_types).  But to see if this is a top-level *class* (not
32559         necessarly our "toplevel" container). 
32560
32561 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32562
32563         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32564         parent instead of a direct call to GetType.
32565
32566 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32567
32568         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32569         Modifiers.TypeAttr. This should just be a call to that method.
32570
32571         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32572         object so that we can determine if we are top-level or not.
32573
32574         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32575         TypeContainer too.
32576
32577         * enum.cs (Enum::Define): Ditto.
32578
32579         * modifiers.cs (FieldAttr): Re-write.
32580
32581         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32582         (TypeContainer::HaveStaticConstructor): New property to provide access
32583         to precisely that info.
32584
32585         * modifiers.cs (MethodAttr): Re-write.
32586         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32587
32588         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32589         of top-level types as claimed.
32590
32591 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32592
32593         * expression.cs (MemberLookup): Fruitless attempt to lookup
32594         constructors.  Maybe I need to emit default constructors?  That
32595         might be it (currently .NET emits this for me automatically).
32596         (Invocation::OverloadResolve): Cope with Arguments == null.
32597         (Invocation::EmitArguments): new function, shared by the new
32598         constructor and us.
32599         (Invocation::Emit): Handle static and instance methods.  Emit
32600         proper call instruction for virtual or non-virtual invocations.
32601         (New::Emit): Implement.
32602         (New::Resolve): Implement.
32603         (MemberAccess:Resolve): Implement.
32604         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32605         to track instances.
32606         (FieldExpr::Resolve): Set type.
32607
32608         * support.cs: Handle empty arguments.
32609                 
32610         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32611         SimpleLookup): Auxiliary routines to help parse a qualifier
32612         identifier.  
32613
32614         Update qualifier_identifier rule.
32615
32616         * codegen.cs: Removed debugging messages.
32617
32618         * class.cs: Make this a global thing, this acts just as a "key" to
32619         objects that we might have around.
32620
32621         (Populate): Only initialize method_builders_to_methods once.
32622
32623         * expression.cs (PropertyExpr): Initialize type from the
32624         PropertyType. 
32625
32626         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32627         Resolve pattern.  Attempt to implicitly convert value to boolean.
32628         Emit code.
32629
32630         * expression.cs: Set the type for the int32/int32 argument case.
32631         (Binary::ResolveOperator): Set the return type to boolean for
32632         comparission operators
32633
32634         * typemanager.cs: Remove debugging print code.
32635
32636         (Invocation::Resolve): resolve type.
32637
32638         * class.cs: Allocate a MemberInfo of the correct size, as the code
32639         elsewhere depends on the test to reflect the correct contents.
32640
32641         (Method::) Keep track of parameters, due to System.Reflection holes
32642
32643         (TypeContainer::Populate): Keep track of MethodBuilders to Method
32644         mapping here.
32645
32646         (TypeContainer::FindMembers): Use ArrayList and then copy an array
32647         of the exact size and return that.
32648
32649         (Class::LookupMethodByBuilder): New function that maps
32650         MethodBuilders to its methods.  Required to locate the information
32651         on methods because System.Reflection bit us again.
32652
32653         * support.cs: New file, contains an interface ParameterData and
32654         two implementations: ReflectionParameters and InternalParameters
32655         used to access Parameter information.  We will need to grow this
32656         as required.
32657
32658         * expression.cs (Invocation::GetParameterData): implement a cache
32659         and a wrapper around the ParameterData creation for methods. 
32660         (Invocation::OverloadResolve): Use new code.
32661
32662 2001-09-13  Ravi Pratap  <ravi@ximian.com>
32663
32664         * class.cs (TypeContainer::EmitField): Remove and move into 
32665         (Field::Define): here and modify accordingly.
32666         (Field.FieldBuilder): New member.
32667         (TypeContainer::Populate): Update accordingly.
32668         (TypeContainer::FindMembers): Implement.
32669
32670 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32671
32672         * statement.cs: (VariableInfo::VariableType): New field to be
32673         initialized with the full type once it is resolved. 
32674
32675 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
32676
32677         * parameter.cs (GetParameterInfo): Use a type cache to compute
32678         things only once, and to reuse this information
32679
32680         * expression.cs (LocalVariableReference::Emit): Implement.
32681         (OpcodeCast::Emit): fix.
32682
32683         (ParameterReference::Resolve): Implement.
32684         (ParameterReference::Emit): Implement.
32685
32686         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
32687         that are expressions need to stay as Expressions.
32688
32689         * typemanager.cs (CSharpName): Returns the C# name of a type if
32690         possible. 
32691
32692         * expression.cs (Expression::ConvertImplicit): New function that
32693         implements implicit type conversions.
32694
32695         (Expression::ImplicitReferenceConversion): Implements implicit
32696         reference conversions.
32697
32698         (EmptyCast): New type for transparent casts.
32699
32700         (OpcodeCast): New type for casts of types that are performed with
32701         a sequence of bytecodes.
32702
32703         (BoxedCast): New type used for casting value types into reference
32704         types.  Emits a box opcode.
32705
32706         (Binary::DoNumericPromotions): Implements numeric promotions of
32707         and computation of the Binary::Type.
32708
32709         (Binary::EmitBranchable): Optimization.
32710
32711         (Binary::Emit): Implement code emission for expressions.
32712
32713         * typemanager.cs (TypeManager): Added two new core types: sbyte
32714         and byte.
32715
32716 2001-09-12  Ravi Pratap  <ravi@ximian.com>
32717
32718         * class.cs (TypeContainer::FindMembers): Method which does exactly
32719         what Type.FindMembers does, only we don't have to use reflection. No
32720         implementation yet.
32721
32722         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
32723         typecontainer objects as we need to get at them.
32724         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
32725
32726         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
32727         typecontainer object.
32728
32729         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
32730         of just a Report object.
32731
32732 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32733
32734         * class.cs (Event::Define): Go back to using the prefixes "add_" and
32735         "remove_"
32736         (TypeContainer::Populate): Now define the delegates of the type too.
32737         (TypeContainer.Delegates): Property to access the list of delegates defined
32738         in the type.
32739
32740         * delegates.cs (Delegate::Define): Implement partially.
32741
32742         * modifiers.cs (TypeAttr): Handle more flags.
32743
32744 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32745
32746         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
32747         and not <=
32748         (Operator::Define): Re-write logic to get types by using the LookupType method
32749         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
32750         (Indexer::Define): Ditto.
32751         (Event::Define): Ditto.
32752         (Property::Define): Ditto.
32753
32754 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32755
32756         * class.cs (TypeContainer::Populate): Now define operators too. 
32757         (TypeContainer.Operators): New property to access the list of operators
32758         in a type.
32759         (Operator.OperatorMethodBuilder): New member to hold the method builder
32760         for the operator we are defining.
32761         (Operator::Define): Implement.
32762
32763 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32764
32765         * class.cs (Event::Define): Make the prefixes of the accessor methods
32766         addOn_ and removeOn_ 
32767
32768         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
32769         of the location being passed in too. Ideally, this should go later since all
32770         error reporting should be done through the Report object.
32771
32772         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
32773         (Populate): Iterate thru the indexers we have and define them too.
32774         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
32775         for the get and set accessors.
32776         (Indexer::Define): Implement.
32777
32778 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
32779
32780         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
32781         my previous implementation, did not work.
32782
32783         * typemanager.cs: Add a couple of missing types (the longs).
32784
32785         * literal.cs: Use TypeManager.bool_type instead of getting it.
32786
32787         * expression.cs (EventExpr): New kind of expressions.
32788         (Expressio::ExprClassFromMemberInfo): finish
32789
32790 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
32791
32792         * assign.cs: Emit stores to static fields differently.
32793
32794 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32795
32796         * Merge in changes and adjust code to tackle conflicts. Backed out my
32797         code in Assign::Resolve ;-) 
32798
32799 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32800
32801         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
32802         instead Report.Error and also pass in the location.
32803         (CSharpParser::Lexer): New readonly property to return the reference
32804         to the Tokenizer object.
32805         (declare_local_variables): Use Report.Error with location instead of plain 
32806         old error.
32807         (CheckDef): Ditto.
32808
32809         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
32810         (Operator.CheckBinaryOperator): Ditto.
32811
32812         * cs-parser.jay (operator_declarator): Update accordingly.
32813
32814         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
32815         (CheckBinaryOperator): Same here.
32816
32817         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
32818         on the name without any prefixes of namespace names etc. This is because we
32819         already might have something already fully qualified like 
32820         'System.Console.WriteLine'
32821
32822         * assign.cs (Resolve): Begin implementation. Stuck ;-)
32823
32824 2001-09-07  Ravi Pratap  <ravi@ximian.com>
32825
32826         * cs-tokenizer.cs (location): Return a string which also contains
32827         the file name.
32828
32829         * expression.cs (ElementAccess): New class for expressions of the
32830         type 'element access.'
32831         (BaseAccess): New class for expressions of the type 'base access.'
32832         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
32833         respectively.
32834
32835         * cs-parser.jay (element_access): Implement action.
32836         (base_access): Implement actions.
32837         (checked_expression, unchecked_expression): Implement.
32838
32839         * cs-parser.jay (local_variable_type): Correct and implement.
32840         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
32841
32842         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
32843
32844         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
32845         name and the specifiers.
32846
32847         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
32848
32849         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
32850         making them all public ;-)
32851
32852         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
32853         class anyways.
32854
32855 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
32856
32857         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
32858         PropertyExprs.
32859         (FieldExpr, PropertyExprs): New resolved expressions.
32860         (SimpleName::MemberStaticCheck): Perform static checks for access
32861         to non-static fields on static methods. Maybe this should be
32862         generalized for MemberAccesses. 
32863         (SimpleName::ResolveSimpleName): More work on simple name
32864         resolution. 
32865
32866         * cs-parser.jay (primary_expression/qualified_identifier): track
32867         the parameter index.
32868
32869         * codegen.cs (CodeGen::Save): Catch save exception, report error.
32870         (EmitContext::EmitBoolExpression): Chain to expression generation
32871         instead of temporary hack.
32872         (::EmitStatementExpression): Put generic expression code generation.
32873
32874         * assign.cs (Assign::Emit): Implement variable assignments to
32875         local variables, parameters and fields.
32876
32877 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
32878
32879         * statement.cs (Block::GetVariableInfo): New method, returns the
32880         VariableInfo for a variable name in a block.
32881         (Block::GetVariableType): Implement in terms of GetVariableInfo
32882
32883         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
32884         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
32885
32886 2001-09-06  Ravi Pratap  <ravi@ximian.com>
32887
32888         * cs-parser.jay (operator_declaration): Continue on my quest : update
32889         to take attributes argument.
32890         (event_declaration): Ditto.
32891         (enum_declaration): Ditto.
32892         (indexer_declaration): Ditto.
32893
32894         * class.cs (Operator::Operator): Update constructor accordingly.
32895         (Event::Event): Ditto.
32896
32897         * delegate.cs (Delegate::Delegate): Same here.
32898
32899         * enum.cs (Enum::Enum): Same here.
32900
32901 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32902
32903         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
32904
32905         * ../tests/cs0658.cs : New file to demonstrate error 0658.
32906
32907         * attribute.cs (Attributes): New class to encapsulate all attributes which were
32908         being passed around as an arraylist.
32909         (Attributes::AddAttribute): Method to add attribute sections.
32910
32911         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
32912         (struct_declaration): Update accordingly.
32913         (constant_declaration): Update.
32914         (field_declaration): Update.
32915         (method_header): Update.
32916         (fixed_parameter): Update.
32917         (parameter_array): Ditto.
32918         (property_declaration): Ditto.
32919         (destructor_declaration): Ditto.
32920
32921         * class.cs (Struct::Struct): Update constructors accordingly.
32922         (Class::Class): Ditto.
32923         (Field::Field): Ditto.
32924         (Method::Method): Ditto.
32925         (Property::Property): Ditto.
32926         (TypeContainer::OptAttribute): update property's return type.
32927
32928         * interface.cs (Interface.opt_attributes): New member.
32929         (Interface::Interface): Update to take the extra Attributes argument.
32930
32931         * parameter.cs (Parameter::Parameter): Ditto.
32932
32933         * constant.cs (Constant::Constant): Ditto.
32934
32935         * interface.cs (InterfaceMemberBase): New OptAttributes field.
32936         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
32937         the attributes as a parameter.
32938         (InterfaceProperty): Update constructor call.
32939         (InterfaceEvent): Ditto.
32940         (InterfaceMethod): Ditto.
32941         (InterfaceIndexer): Ditto.
32942
32943         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
32944         pass the attributes too.
32945         (interface_event_declaration): Ditto.
32946         (interface_property_declaration): Ditto.
32947         (interface_method_declaration): Ditto.
32948         (interface_declaration): Ditto.
32949
32950 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
32951
32952         * class.cs (Method::Define): Track the "static Main" definition to
32953         create an entry point. 
32954
32955         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
32956         EntryPoint if we find it. 
32957
32958         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
32959         (EmitContext::ig): Make this variable public.
32960
32961         * driver.cs: Make the default output file be the first file name
32962         with the .exe extension.  
32963
32964         Detect empty compilations
32965
32966         Handle various kinds of output targets.  Handle --target and
32967         rename -t to --dumper.
32968
32969         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
32970         methods inherited from Expression return now an Expression.  This
32971         will is used during the tree rewriting as we resolve them during
32972         semantic analysis.
32973
32974         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
32975         the spec.  Missing entirely is the information about
32976         accessability of elements of it.
32977
32978         (Expression::ExprClassFromMemberInfo): New constructor for
32979         Expressions that creates a fully initialized Expression based on
32980         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
32981         a Type.
32982
32983         (Invocation::Resolve): Begin implementing resolution of invocations.
32984
32985         * literal.cs (StringLiteral):  Implement Emit.
32986
32987 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32988
32989         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
32990         member.
32991
32992 2001-09-04  Ravi Pratap  <ravi@ximian.com>
32993
32994         * cs-parser.jay (attribute_arguments): Implement actions.
32995         (attribute): Fix bug in production. Implement action.
32996         (attribute_list): Implement.
32997         (attribute_target): Implement.
32998         (attribute_target_specifier, opt_target_specifier): Implement
32999         (CheckAttributeTarget): New method to check if the attribute target
33000         is valid.
33001         (attribute_section): Implement.
33002         (opt_attributes): Implement.
33003
33004         * attribute.cs : New file to handle attributes.
33005         (Attribute): Class to hold attribute info.
33006
33007         * cs-parser.jay (opt_attribute_target_specifier): Remove production
33008         (attribute_section): Modify production to use 2 different rules to 
33009         achieve the same thing. 1 s/r conflict down !
33010         Clean out commented, useless, non-reducing dimension_separator rules.
33011
33012         * class.cs (TypeContainer.attributes): New member to hold list
33013         of attributes for a type.
33014         (Struct::Struct): Modify to take one more argument, the attribute list.
33015         (Class::Class): Ditto.
33016         (Field::Field): Ditto.
33017         (Method::Method): Ditto.
33018         (Property::Property): Ditto.
33019
33020         * cs-parser.jay (struct_declaration): Update constructor call to
33021         pass in the attributes too.
33022         (class_declaration): Ditto.
33023         (constant_declaration): Ditto.
33024         (field_declaration): Ditto.
33025         (method_header): Ditto.
33026         (fixed_parameter): Ditto.
33027         (parameter_array): Ditto.
33028         (property_declaration): Ditto.
33029
33030         * constant.cs (Constant::Constant): Update constructor similarly.
33031         Use System.Collections.
33032
33033         * parameter.cs (Parameter::Parameter): Update as above.
33034
33035 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33036
33037         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
33038         (TypeContainer.delegates): New member to hold list of delegates.
33039
33040         * cs-parser.jay (delegate_declaration): Implement the action correctly 
33041         this time as I seem to be on crack ;-)
33042
33043 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
33044
33045         * rootcontext.cs (RootContext::IsNamespace): new function, used to
33046         tell whether an identifier represents a namespace.
33047
33048         * expression.cs (NamespaceExpr): A namespace expression, used only
33049         temporarly during expression resolution.
33050         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33051         utility functions to resolve names on expressions.
33052
33053 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33054
33055         * codegen.cs: Add hook for StatementExpressions. 
33056
33057         * class.cs: Fix inverted test for static flag in methods.
33058
33059 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33060
33061         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33062         to make it coincide with MS' number.
33063         (Operator::CheckBinaryOperator): Ditto.
33064
33065         * ../errors/errors.txt : Remove error numbers added earlier.
33066
33067         * ../errors/cs1019.cs : Test case for error # 1019
33068
33069         * ../errros/cs1020.cs : Test case for error # 1020
33070
33071         * cs-parser.jay : Clean out commented cruft.
33072         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33073         used anywhere - non-reducing rule.
33074         (namespace_declarations): Non-reducing rule - comment out.
33075
33076         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33077         with TypeContainer::AddEnum.
33078
33079         * delegate.cs : New file for delegate handling classes.
33080         (Delegate): Class for declaring delegates.
33081
33082         * makefile : Update.
33083
33084         * cs-parser.jay (delegate_declaration): Implement.
33085
33086 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33087
33088         * class.cs (Event::Define): Implement.
33089         (Event.EventBuilder): New member.
33090
33091         * class.cs (TypeContainer::Populate): Update to define all enums and events
33092         we have.
33093         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33094         readonly fields for all these cases ?
33095
33096 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33097
33098         * class.cs (Property): Revamp to use the convention of making fields readonly.
33099         Accordingly modify code elsewhere.
33100
33101         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33102         the Define method of the Property class.
33103
33104         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33105         trivial bug.
33106         (TypeContainer::Populate): Update to define all the properties we have. Also
33107         define all enumerations.
33108
33109         * enum.cs (Define): Implement.
33110
33111 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33112
33113         * cs-parser.jay (overloadable_operator): The semantic value is an
33114         enum of the Operator class.
33115         (operator_declarator): Implement actions.
33116         (operator_declaration): Implement.
33117
33118         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33119         validity of definitions.
33120         (Operator::CheckBinaryOperator): Static method to check for binary operators
33121         (TypeContainer::AddOperator): New method to add an operator to a type.
33122
33123         * cs-parser.jay (indexer_declaration): Added line to actually call the
33124         AddIndexer method so it gets added ;-)
33125
33126         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33127         already taken care of by the MS compiler ?  
33128
33129 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33130
33131         * class.cs (Operator): New class for operator declarations.
33132         (Operator::OpType): Enum for the various operators.
33133
33134 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33135
33136         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33137         ostensibly handle this in semantic analysis.
33138
33139         * cs-parser.jay (general_catch_clause): Comment out
33140         (specific_catch_clauses, specific_catch_clause): Ditto.
33141         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33142         (catch_args, opt_catch_args): New productions.
33143         (catch_clause): Rewrite to use the new productions above
33144         (catch_clauses): Modify accordingly.
33145         (opt_catch_clauses): New production to use in try_statement
33146         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33147         and re-write the code in the actions to extract the specific and
33148         general catch clauses by being a little smart ;-)
33149
33150         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33151         Hooray, try and catch statements parse fine !
33152
33153 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33154
33155         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33156         string from the hashtable of variables.
33157
33158         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33159         I end up making that mistake ;-)
33160         (catch_clauses): Fixed gross error which made Key and Value of the 
33161         DictionaryEntry the same : $1 !!
33162
33163 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33164
33165         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33166
33167         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33168         when the add and remove accessors are specified. 
33169
33170 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33171
33172         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33173         information about indexer_declarator.
33174         (indexer_declarator): Implement actions.
33175         (parsing_indexer): New local boolean used to keep track of whether
33176         we are parsing indexers or properties. This is necessary because 
33177         implicit_parameters come into picture even for the get accessor in the 
33178         case of an indexer.
33179         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33180
33181         * class.cs (Indexer): New class for indexer declarations.
33182         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33183         (TypeContainer::indexers): New member to hold list of indexers for the
33184         type.
33185
33186 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33187
33188         * cs-parser.jay (add_accessor_declaration): Implement action.
33189         (remove_accessor_declaration): Implement action.
33190         (event_accessors_declaration): Implement
33191         (variable_declarators): swap statements for first rule - trivial.
33192
33193         * class.cs (Event): New class to hold information about event
33194         declarations.
33195         (TypeContainer::AddEvent): New method to add an event to a type
33196         (TypeContainer::events): New member to hold list of events.
33197
33198         * cs-parser.jay (event_declaration): Implement actions.
33199
33200 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33201
33202         * cs-parser.jay (dim_separators): Implement. Make it a string
33203         concatenating all the commas together, just as they appear.
33204         (opt_dim_separators): Modify accordingly
33205         (rank_specifiers): Update accordingly. Basically do the same
33206         thing - instead, collect the brackets here.
33207         (opt_rank_sepcifiers): Modify accordingly.
33208         (array_type): Modify to actually return the complete type string
33209         instead of ignoring the rank_specifiers.
33210         (expression_list): Implement to collect the expressions
33211         (variable_initializer): Implement. We make it a list of expressions
33212         essentially so that we can handle the array_initializer case neatly too.
33213         (variable_initializer_list): Implement.
33214         (array_initializer): Make it a list of variable_initializers
33215         (opt_array_initializer): Modify accordingly.
33216
33217         * expression.cs (New::NType): Add enumeration to help us
33218         keep track of whether we have an object/delegate creation
33219         or an array creation.
33220         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33221         members to hold data about array creation.
33222         (New:New): Modify to update NewType
33223         (New:New): New Overloaded contructor for the array creation
33224         case.
33225
33226         * cs-parser.jay (array_creation_expression): Implement to call
33227         the overloaded New constructor.
33228
33229 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33230
33231         * class.cs (TypeContainer::Constructors): Return member
33232         constructors instead of returning null.
33233
33234 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33235
33236         * typemanager.cs (InitCoreTypes): Initialize the various core
33237         types after we have populated the type manager with the user
33238         defined types (this distinction will be important later while
33239         compiling corlib.dll)
33240
33241         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33242         on Expression Classification.  Now all expressions have a method
33243         `Resolve' and a method `Emit'.
33244
33245         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33246         generation from working.     Also add some temporary debugging
33247         code. 
33248
33249 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33250
33251         * codegen.cs: Lots of code generation pieces.  This is only the
33252         beginning, will continue tomorrow with more touches of polish.  We
33253         handle the fundamentals of if, while, do, for, return.  Others are
33254         trickier and I need to start working on invocations soon.
33255
33256         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33257         s.InitStatement. 
33258
33259         * codegen.cs (EmitContext): New struct, used during code
33260         emission to keep a context.   Most of the code generation will be
33261         here. 
33262
33263         * cs-parser.jay: Add embedded blocks to the list of statements of
33264         this block.  So code generation proceeds in a top down fashion.
33265
33266 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33267
33268         * statement.cs: Add support for multiple child blocks.
33269
33270 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33271
33272         * codegen.cs (EmitCode): New function, will emit the code for a
33273         Block of code given a TypeContainer and its ILGenerator. 
33274
33275         * statement.cs (Block): Standard public readonly optimization.
33276         (Block::Block constructors): Link children. 
33277         (Block::Child): Child Linker.
33278         (Block::EmitVariables): Emits IL variable declarations.
33279
33280         * class.cs: Drop support for MethodGroups here, delay until
33281         Semantic Analysis.
33282         (Method::): Applied the same simplification that I did before, and
33283         move from Properties to public readonly fields.
33284         (Method::ParameterTypes): Returns the parameter types for the
33285         function, and implements a cache that will be useful later when I
33286         do error checking and the semantic analysis on the methods is
33287         performed.
33288         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33289         and made a method, optional argument tells whether this is a class
33290         or a structure to apply the `has-this' bit.
33291         (Method::GetCallingConvention): Implement, returns the calling
33292         convention. 
33293         (Method::Define): Defines the type, a second pass is performed
33294         later to populate the methods.
33295
33296         (Constructor::ParameterTypes): implement a cache similar to the
33297         one on Method::ParameterTypes, useful later when we do semantic
33298         analysis. 
33299
33300         (TypeContainer::EmitMethod):  New method.  Emits methods.
33301
33302         * expression.cs: Removed MethodGroup class from here.
33303
33304         * parameter.cs (Parameters::GetCallingConvention): new method.
33305
33306 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33307
33308         * class.cs (TypeContainer::Populate): Drop RootContext from the
33309         argument. 
33310
33311         (Constructor::CallingConvention): Returns the calling convention.
33312         (Constructor::ParameterTypes): Returns the constructor parameter
33313         types. 
33314
33315         (TypeContainer::AddConstructor): Keep track of default constructor
33316         and the default static constructor.
33317
33318         (Constructor::) Another class that starts using `public readonly'
33319         instead of properties. 
33320
33321         (Constructor::IsDefault): Whether this is a default constructor. 
33322
33323         (Field::) use readonly public fields instead of properties also.
33324
33325         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33326         track of static constructors;  If none is used, turn on
33327         BeforeFieldInit in the TypeAttributes. 
33328
33329         * cs-parser.jay (opt_argument_list): now the return can be null
33330         for the cases where there are no arguments. 
33331
33332         (constructor_declarator): If there is no implicit `base' or
33333         `this', then invoke the default parent constructor. 
33334
33335         * modifiers.cs (MethodAttr): New static function maps a set of
33336         modifiers flags into a MethodAttributes enum
33337         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33338         MethodAttr, TypeAttr to represent the various mappings where the
33339         modifiers are used.
33340         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33341
33342 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33343
33344         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33345         method arguments.
33346
33347         * interface.cs (PopulateIndexer): Implemented the code generator
33348         for interface indexers.
33349
33350 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33351
33352         * interface.cs (InterfaceMemberBase): Now we track the new status
33353         here.  
33354
33355         (PopulateProperty): Implement property population.  Woohoo!  Got
33356         Methods and Properties going today. 
33357
33358         Removed all the properties for interfaces, and replaced them with
33359         `public readonly' fields. 
33360
33361 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33362
33363         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33364         initialize their hashtables/arraylists only when they are needed
33365         instead of doing this always.
33366
33367         * parameter.cs: Handle refs and out parameters.
33368
33369         * cs-parser.jay: Use an ArrayList to construct the arguments
33370         instead of the ParameterCollection, and then cast that to a
33371         Parameter[] array.
33372
33373         * parameter.cs: Drop the use of ParameterCollection and use
33374         instead arrays of Parameters.
33375
33376         (GetParameterInfo): Use the Type, not the Name when resolving
33377         types. 
33378
33379 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33380
33381         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33382         and instead use public readonly fields.
33383
33384         * class.cs: Put back walking code for type containers.
33385
33386 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33387
33388         * class.cs (MakeConstant): Code to define constants.
33389
33390         * rootcontext.cs (LookupType): New function.  Used to locate types 
33391
33392
33393 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33394
33395         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33396         this System.Reflection code is.  Kudos to Microsoft
33397
33398         * typemanager.cs: Implement a type cache and avoid loading all
33399         types at boot time.  Wrap in LookupType the internals.  This made
33400         the compiler so much faster.  Wow.  I rule!
33401
33402         * driver.cs: Make sure we always load mscorlib first (for
33403         debugging purposes, nothing really important).
33404
33405         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33406         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33407
33408         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33409         on namespaces that have been imported using the `using' keyword.
33410
33411         * class.cs (TypeContainer::TypeAttr): Virtualize.
33412         (Class::TypeAttr): Return attributes suitable for this bad boy.
33413         (Struct::TypeAttr): ditto.
33414         Handle nested classes.
33415         (TypeContainer::) Remove all the type visiting code, it is now
33416         replaced with the rootcontext.cs code
33417
33418         * rootcontext.cs (GetClassBases): Added support for structs. 
33419
33420 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33421
33422         * interface.cs, statement.cs, class.cs, parameter.cs,
33423         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33424         Drop use of TypeRefs, and use strings instead.
33425
33426 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33427
33428         * rootcontext.cs: 
33429
33430         * class.cs (Struct::Struct): set the SEALED flags after
33431         checking the modifiers.
33432         (TypeContainer::TypeAttr): new property, returns the
33433         TypeAttributes for a class.  
33434
33435         * cs-parser.jay (type_list): Oops, list production was creating a
33436         new list of base types.
33437
33438         * rootcontext.cs (StdLib): New property.
33439         (GetInterfaceTypeByName): returns an interface by type name, and
33440         encapsulates error handling here.
33441         (GetInterfaces): simplified.
33442         (ResolveTree): Encapsulated all the tree resolution here.
33443         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33444         types. 
33445
33446         * driver.cs: Add support for --nostdlib, to avoid loading the
33447         default assemblies.
33448         (Main): Do not put tree resolution here. 
33449
33450         * rootcontext.cs: Beginning of the class resolution.
33451
33452 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33453
33454         * rootcontext.cs: Provide better error reporting. 
33455
33456         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33457
33458         * rootcontext.cs (CreateInterface): Handle the case where there
33459         are no parent interfaces.
33460
33461         (CloseTypes): Routine to flush types at the end.
33462         (CreateInterface): Track types.
33463         (GetInterfaces): Returns an array of Types from the list of
33464         defined interfaces.
33465
33466         * typemanager.c (AddUserType): Mechanism to track user types (puts
33467         the type on the global type hash, and allows us to close it at the
33468         end). 
33469
33470 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33471
33472         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33473         RecordInterface instead.
33474
33475         * cs-parser.jay: Updated to reflect changes above.
33476
33477         * decl.cs (Definition): Keep track of the TypeBuilder type that
33478         represents this type here.  Not sure we will use it in the long
33479         run, but wont hurt for now.
33480
33481         * driver.cs: Smaller changes to accomodate the new code.
33482
33483         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33484         when done. 
33485
33486         * rootcontext.cs (CreateInterface):  New method, used to create
33487         the System.TypeBuilder type for interfaces.
33488         (ResolveInterfaces): new entry point to resolve the interface
33489         hierarchy. 
33490         (CodeGen): Property, used to keep track of the code generator.
33491
33492 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33493
33494         * cs-parser.jay: Add a second production for delegate_declaration
33495         with `VOID'.
33496
33497         (enum_body): Put an opt_comma here instead of putting it on
33498         enum_body or enum_member_declarations so we can handle trailing
33499         commas on enumeration members.  Gets rid of a shift/reduce.
33500
33501         (type_list): Need a COMMA in the middle.
33502
33503         (indexer_declaration): Tell tokenizer to recognize get/set
33504
33505         * Remove old targets.
33506
33507         * Re-add the parser target.
33508
33509 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33510
33511         * cs-parser.jay: Add precendence rules for a number of operators
33512         ot reduce the number of shift/reduce conflicts in the grammar.
33513
33514 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33515
33516         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33517         and put it here.
33518
33519         Get rid of old crufty code.
33520
33521         * rootcontext.cs: Use this to keep track of the parsed
33522         representation and the defined types available to the program. 
33523
33524         * gen-treedump.cs: adjust for new convention.
33525
33526         * type.cs: Split out the type manager, and the assembly builder
33527         from here. 
33528
33529         * typemanager.cs: the type manager will live here now.
33530
33531         * cil-codegen.cs: And the code generator here. 
33532
33533 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33534
33535         * makefile: Fixed up for easy making.
33536
33537 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33538
33539         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33540         the 
33541
33542         (unary_expression): Expand pre_increment_expression and
33543         post_decrement_expression to reduce a shift/reduce.
33544
33545 2001-07-11  Simon Cozens
33546
33547         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33548
33549         Improve allow_keyword_as_indent name.
33550
33551 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33552
33553         * Adjustments for Beta2. 
33554
33555 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33556
33557         * decl.cs: Added `Define' abstract method.
33558         (InTransit): new property, used to catch recursive definitions. 
33559
33560         * interface.cs: Implement `Define'. 
33561
33562         * modifiers.cs: Map Modifiers.constants to
33563         System.Reflection.TypeAttribute flags.
33564
33565         * class.cs: Keep track of types and user-defined types.
33566         (BuilderInit): New method for creating an assembly
33567         (ResolveType): New function to launch the resolution process, only
33568         used by interfaces for now.
33569
33570         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33571         that are inserted into the name space. 
33572
33573 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33574
33575         * ARGH.  I have screwed up my tree so many times due to the use of
33576         rsync rather than using CVS.  Going to fix this at once. 
33577
33578         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33579         load types.
33580
33581 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33582
33583         * Experiment successful: Use System.Type rather that our own
33584         version of Type.  
33585
33586 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33587
33588         * cs-parser.jay: Removed nsAliases from here.
33589
33590         Use new namespaces, handle `using XXX;' 
33591
33592         * namespace.cs: Reimplemented namespace handling, use a recursive
33593         definition of the class.  Now we can keep track of using clauses
33594         and catch invalid using clauses.
33595
33596 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33597
33598         * gen-treedump.cs: Adapted for all the renaming.
33599
33600         * expression.cs (Expression): this class now has a Type property
33601         which returns an expression Type.
33602
33603         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33604         `Type', as this has a different meaning now in the base
33605
33606 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33607
33608         * interface.cs, class.cs: Removed from all the sources the
33609         references to signature computation, as we can not do method
33610         signature computation during the parsing time, as we are not
33611         trying to solve at that point distinguishing:
33612
33613         class X {
33614                 void a (Blah x) {}
33615                 void a (NS.Blah x) {}
33616         }
33617
33618         Which depending on the context might be valid or not, as we do not
33619         know if Blah is the same thing as NS.Blah at that point.
33620
33621         * Redid everything so the code uses TypeRefs now instead of
33622         Types.  TypeRefs are just temporary type placeholders, that need
33623         to be resolved.  They initially have a pointer to a string and the
33624         current scope in which they are used.  This is used later by the
33625         compiler to resolve the reference to an actual Type. 
33626
33627         * DeclSpace is no longer a CIR.Type, and neither are
33628         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33629         are all DeclSpaces, but no Types. 
33630
33631         * type.cs (TypeRefManager): This implements the TypeRef manager,
33632         which keeps track of all the types that need to be resolved after
33633         the parsing has finished. 
33634
33635 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33636
33637         * ARGH.  We are going to have to store `foreach' as a class rather
33638         than resolving it, as we need to verify error 1579 after name
33639         resolution.   *OR* we could keep a flag that says `This request to
33640         IEnumerator comes from a foreach statement' which we can then use
33641         to generate the error.
33642
33643 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
33644
33645         * class.cs (TypeContainer.AddMethod): we now add methods to the
33646         MethodGroup instead of the method hashtable.  
33647
33648         * expression.cs: Add MethodGroup abstraction, which gets us one
33649         step closer to the specification in the way we handle method
33650         declarations.  
33651
33652         * cs-parser.jay (primary_expression): qualified_identifier now
33653         tried to match up an identifier to a local variable reference or
33654         to a parameter reference.
33655
33656         current_local_parameters is now a parser global variable that
33657         points to the current parameters for the block, used during name
33658         lookup.
33659
33660         (property_declaration): Now creates an implicit `value' argument to
33661         the set accessor.
33662
33663 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
33664
33665         * parameter.cs: Do not use `param' arguments as part of the
33666         signature, per the spec.
33667
33668 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
33669
33670         * decl.cs: Base class for classes, structs and interfaces.  This
33671         is the "Declaration Space" 
33672
33673         * cs-parser.jay: Use CheckDef for checking declaration errors
33674         instead of having one on each function.
33675
33676         * class.cs: Factor out some code for handling error handling in
33677         accordance to the "Declarations" section in the "Basic Concepts"
33678         chapter in the ECMA C# spec.
33679
33680         * interface.cs: Make all interface member classes derive from
33681         InterfaceMemberBase.
33682
33683 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
33684
33685         * Many things: all interfaces are parsed and generated in
33686         gen-treedump.  Support for member variables, constructors,
33687         destructors, properties, constants is there.
33688
33689         Beginning of the IL backend, but very little done, just there for
33690         testing purposes. 
33691
33692 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
33693
33694         * cs-parser.jay: Fix labeled statement.
33695
33696         * cs-tokenizer.cs (escape): Escape " and ' always.
33697         ref_line, ref_name: keep track of the line/filename as instructed
33698         by #line by the compiler.
33699         Parse #line.
33700
33701 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
33702
33703         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
33704         to match the values in System.CodeDOM.
33705
33706         Divid renamed to Divide.
33707
33708         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
33709         statements. 
33710         (Statements.set): remove.
33711
33712         * System.CodeDOM/CodeCatchClause.cs: always have a valid
33713         statements. 
33714
33715         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
33716         falseStatements always have valid values. 
33717
33718         * cs-parser.jay: Use System.CodeDOM now.
33719