1d712fd43d4bfe2b4ab994a7d7d1ca9699e7ac36
[mono.git] / mcs / mcs / ChangeLog
1 2010-06-02  Marek Safar  <marek.safar@gmail.com>
2
3         A fix for bug #610088
4         * nullable.cs, expression.cs, statement.cs, method.cs, ecore.cs:
5         Ignore overrides for base overload resolution as for non-base
6         expressions and convert the best candidate to closest override
7         afterwards.
8
9 2010-06-01  Marek Safar  <marek.safar@gmail.com>
10
11         A fix for bug #610139
12         * generic.cs, convert.cs: Recursively check effective base interface
13
14 2010-06-01  Marek Safar  <marek.safar@gmail.com>
15
16         * statement.cs: Handle nullable types and type parameters in using
17         statement, avoid boxing value types. Also fixes #571010
18
19 2010-06-01  Marek Safar  <marek.safar@gmail.com>
20
21         * convert.cs, expression.cs: Emit unbox for underlying nullable
22         type boxing cast.
23
24 2010-05-29  Marek Safar  <marek.safar@gmail.com>
25
26         A fix for bug #610126
27         * expression.cs: Don't use branch optimization for types bigger than
28         int.
29
30 2010-05-28  Marek Safar  <marek.safar@gmail.com>
31
32         A fix for bug #609088
33         * import.cs: Check private modifier correctly.
34
35 2010-05-28  Marek Safar  <marek.safar@gmail.com>
36
37         A fix for bug #609049
38         * ecore.cs: Don't ignore override methods when looking for base
39         member.
40
41 2010-05-27  Marek Safar  <marek.safar@gmail.com>
42
43         A fix for bugs #608007, #572540, #566130, #476358
44
45         * generic.cs, linq.cs, expression.cs, statement.cs, cs-parser.jay:
46         More tricky refactoring of implicit linq blocks.
47         
48 2010-05-25  Marek Safar  <marek.safar@gmail.com>
49
50         * linq.cs, cs-parser.jay: Keep location for all linq clauses.
51
52 2010-05-25  Marek Safar  <marek.safar@gmail.com>
53
54         * context.cs, expression.cs, cs-parser.jay: Don't store current
55         block in This expression (it's too early for linq blocks).
56
57 2010-05-21  Marek Safar  <marek.safar@gmail.com>
58
59         * expression.cs: Use constrained prefix more broadly to avoid boxing.
60
61 2010-05-20  Marek Safar  <marek.safar@gmail.com>
62
63         A fix for bug #591149
64         * nullable.cs: Don't double wrap same expression.
65         
66 2010-05-20  Marek Safar  <marek.safar@gmail.com>
67
68         A fix for bug #569827
69         * anonymous.cs: Any issued error in probing mode means no match.
70
71 2010-05-20  Marek Safar  <marek.safar@gmail.com>
72
73         * expression.cs: Search for base indexer using the closest match
74         rule.
75
76 2010-05-20  Marek Safar  <marek.safar@gmail.com>
77
78         A fix for bug #572071
79         * method.cs: Set override constraints using unexpanded interface
80         list.
81
82 2010-05-20  Marek Safar  <marek.safar@gmail.com>
83
84         A fix for bug #572071
85         * ecore.cs: Include secondary extension method lookup in probing
86         mode.
87
88 2010-05-19  Marek Safar  <marek.safar@gmail.com>
89
90         A fix for bug #515801
91         * typespec.cs (MayBecomeEqualGenericTypes): Recursively check
92         type arguments.
93
94 2010-05-19  Marek Safar  <marek.safar@gmail.com>
95
96         A fix for bug #515801
97         * pending.cs: Advance counter correctly.
98
99 2010-05-19  Marek Safar  <marek.safar@gmail.com>
100
101         A fix for bug #480139
102         * method.cs, pending.cs: Indexer override uses base name.
103         
104 2010-05-19  Marek Safar  <marek.safar@gmail.com>
105
106         A fix for bug #424064
107         * generic.cs: Replace original with inflated type parameter on
108         failure.
109
110 2010-05-19  Marek Safar  <marek.safar@gmail.com>
111
112         A fix for bug #359733
113         * parameter.cs: Extension attribute can be defined in each assembly.
114
115 2010-05-18  Marek Safar  <marek.safar@gmail.com>
116
117         A fix for bug #446507
118         * method.cs: Only one method can implement an interface.
119
120 2010-05-18  Marek Safar  <marek.safar@gmail.com>
121
122         A fix for bug #594905
123         * convert.cs, constant.cs, expression.cs, literal.cs, ecore.cs:
124         Typed null can be used as a source for expression methods.
125
126 2010-05-18  Marek Safar  <marek.safar@gmail.com>
127
128         A fix for bug #606551
129         * namespace.cs: Using directive imports only types and not nested
130         namespaces.
131
132 2010-05-17  Marek Safar  <marek.safar@gmail.com>
133
134         * typespec.cs, expression.cs, statement.cs, ecore.cs, complete.cs,
135         delegate.cs: Member instance is resolved after member overload
136         definitely resolves static/instance property of member expression.
137         Fixes #545047, #358848, #456605, #460016, #603299
138
139 2010-05-12  Marek Safar  <marek.safar@gmail.com>
140
141         A fix for bug #604981
142         * generic.cs, decl.cs, anonymous.cs: Reset more type arguments
143         details for nested anonymous methods stories.
144
145 2010-05-11  Marek Safar  <marek.safar@gmail.com>
146
147         A fix for bug #604735
148         * namespace.cs: Don't report namespace collision.
149
150 2010-05-11  Marek Safar  <marek.safar@gmail.com>
151
152         A fix for bug #604748
153         * class.cs, typespec.cs: Search full imported attribute hierarchy
154         for AttributeUsage.
155
156 2010-05-11  Marek Safar  <marek.safar@gmail.com>
157
158         * namespace.cs: Ignore missing dependencies failure at
159         initialization.
160
161 2010-05-11  Marek Safar  <marek.safar@gmail.com>
162
163         A fix for bug #604640
164         * namespace.cs: Don't resolve using constraints too early.
165
166 2010-05-11  Marek Safar  <marek.safar@gmail.com>
167
168         A fix for bug #604239
169         * generic.cs: Copy partial type constraints to partial container.
170
171 2010-05-10  Marek Safar  <marek.safar@gmail.com>
172
173         A fix for bug #557210
174         * import.cs: Relax underlying enum field rules.
175
176 2010-05-10  Marek Safar  <marek.safar@gmail.com>
177
178         A fix for bug #603476
179         * property.cs: Implement IParametersMember for indexer accessors.
180
181 2010-05-07  Marek Safar  <marek.safar@gmail.com>
182
183         A fix for bug #601141
184         * class.cs: Update all partial modifiers.
185
186 2010-05-06  Marek Safar  <marek.safar@gmail.com>
187
188         A fix for bug #601708
189         * method.cs, membercache.cs: Destructors cannot be hidden.
190
191 2010-05-06  Marek Safar  <marek.safar@gmail.com>
192
193         A fix for bug #602551
194         * class.cs: Resursive reference of type definition is allowed.
195
196 2010-05-06  Marek Safar  <marek.safar@gmail.com>
197
198         * anonymous.cs: Mutate cached storey instance types too.
199
200 2010-05-06  Marek Safar  <marek.safar@gmail.com>
201
202         A fix for bug #602443
203         * convert.cs: Explicit enum conversion cannot involve user operators
204
205 2010-05-05  Miguel de Icaza  <miguel@novell.com>
206
207         * class.cs (TypeContainer.DefineBaseTypes)
208         (TypeContainer.CheckRecursiveDefinition): check for the iface not
209         being null, as we could have failed resolution and crashed;
210         Fixes #442144
211
212         * cs-parser.jay: Productions to catch common mistakes when other
213         punctuation operators are used instead of comma.   Fixes 571702 
214
215 2010-05-05  Marek Safar  <marek.safar@gmail.com>
216
217         * anonymous.cs: Mutate correct set of constraints.
218
219 2010-05-05  Marek Safar  <marek.safar@gmail.com>
220
221         A fix for bug #602842
222         * expression.cs: Resolve all array bound arguments.
223
224 2010-05-05  Marek Safar  <marek.safar@gmail.com>
225
226         * import.cs: Don't import private fields.
227
228 2010-04-30  Marek Safar  <marek.safar@gmail.com>
229
230         Partially based on patch by <sami.lamti@gmail.com>
231
232         * eval.cs, ecore.cs: Fixed eval show methods.
233
234 2010-04-30  Marek Safar  <marek.safar@gmail.com>
235
236         * generic.cs, delegate.cs: Implement output type inference of
237         methodgroup now when the specification was cleared at least little
238         bit.
239
240 2010-04-29  Marek Safar  <marek.safar@gmail.com>
241
242         A fix for bug #575611
243         * class.cs: Fix recursive unmanaged recursice sruct check.
244         
245 2010-04-29  Marek Safar  <marek.safar@gmail.com>
246
247         A fix for bug #479776
248         * expression.cs: Implement typeof unbounded nested generic types.
249
250 2010-04-29  Marek Safar  <marek.safar@gmail.com>
251
252         A fix for bug #474953
253         * class.cs: Fix valid recursive base type definition.
254
255 2010-04-29  Marek Safar  <marek.safar@gmail.com>
256
257         A fix for bug #421737
258         * convert.cs, expression.cs: A boxing conversion exists from a
259         nullable-type to a reference type, if a boxing conversion exists
260         from the underlying non-nullable-value-type to the reference type.
261
262 2010-04-29  Marek Safar  <marek.safar@gmail.com>
263
264         A fix for bug #376875
265         * import.cs: Import volatile modifier.
266
267 2010-04-29  Marek Safar  <marek.safar@gmail.com>
268
269         A fix for bug #372412
270         * typespec.cs, expression.cs, codegen.cs: Emit readonly prefix for
271         generic arrays.
272
273 2010-04-29  Marek Safar  <marek.safar@gmail.com>
274
275         A fix for bug #568955
276         * statements.cs: Handle recursive scope initializers.
277
278 2010-04-28  Marek Safar  <marek.safar@gmail.com>
279
280         A fix for bug #566511
281         * anonymous.cs: Always get inflated version of hoisted variable
282         on generic type definition.
283
284 2010-04-28  Marek Safar  <marek.safar@gmail.com>
285
286         * import.cs, membercache.cs: Relax rules for valid properties.
287
288 2010-04-28  Marek Safar  <marek.safar@gmail.com>
289
290         * import.cs: Intern arrays used in generic arguments.
291
292 2010-04-28  Marek Safar  <marek.safar@gmail.com>
293
294         A fix for bug #600398
295         * convert.cs: Actually use effective base type for the comparison.
296
297 2010-04-28  Marek Safar  <marek.safar@gmail.com>
298
299         A fix for bug #600326
300         * ecore.cs: Pass arity to base member lookup.
301
302 2010-04-28  Marek Safar  <marek.safar@gmail.com>
303
304         A fix for bug #573385
305         * expression.cs: MemberAccess is of generic type based on right
306         arity length only.
307
308 2010-05-28  Marek Safar  <marek.safar@gmail.com>
309
310         * cs-tokenizer.cs: Made tab size configurable.
311
312 2010-05-27  Marek Safar  <marek.safar@gmail.com>
313
314         * attribute.cs: Ensure Obsolete members are defined before doing
315         ctor look-up.
316
317 2010-05-27  Marek Safar  <marek.safar@gmail.com>
318
319         * visit.cs: Add DOM visitor skeleton.
320         
321         * *.cs: Updated.
322
323 2010-05-27  Marek Safar  <marek.safar@gmail.com>
324
325         * attribute.cs, codegen.cs: Drop COMPILER_ACCESS hack.
326         
327 2010-05-27  Marek Safar  <marek.safar@gmail.com>
328
329         * *.cs: Major rewrite of compiler internals to better work with
330         unmodified System.Reflection.Emit. Some of the key changes are
331         - TypeSpec replaces reflection specific System.Type.
332         - All Type(TypeSpec) operations are now done in compiler therefore
333         no dependency on SRE to inflate generic members and types or to
334         query unclosed types.
335         - MemberCache is now the only and full hierarchical topology.
336         - Generic constraints are implemented properly.
337         - And as a bonus compilation is on average 30% faster.
338
339 2010-04-15  Jb Evain  <jbevain@novell.com>
340
341         * dmcs.exe.config: update the runtime version to .net 4.0 RTM.
342
343 2010-04-12  Marek Safar  <marek.safar@gmail.com>
344
345         * expression.cs, attribute.cs, parameter.cs: More attribute type
346         checks.
347
348 2010-04-12  Marek Safar  <marek.safar@gmail.com>
349
350         A fix for bug #593342
351
352         * generic.cs, parameter.cs, argument.cs, field.cs, property.cs,
353         decl.cs, roottypes.cs, constant.cs, nullable.cs, expression.cs,
354         method.cs, ecore.cs, class.cs, delegate.cs, attribute.cs,
355         codegen.cs: Add custom attribute encoder to deal with unfinished
356         types and easier corlib bootstrap from its own types.
357
358 2010-03-26  Marek Safar  <marek.safar@gmail.com>
359
360         * cs-parser.jay: Report invalid constraint types.
361
362 2010-03-16  Jb Evain  <jbevain@novell.com>
363
364         * Makefile: rename the net_2_1 profile to moonlight.
365
366 2010-03-11  Marek Safar  <marek.safar@gmail.com>
367
368         * statement.cs, cs-parser.jay: Use correct location for empty
369         statements.
370
371 2010-03-11  Marek Safar  <marek.safar@gmail.com>
372
373         * cs-parser.jay: Disable Location from expression.
374         
375         * generic.cs: Check constraints for overrides in the parser.
376
377 2010-03-09  Marek Safar  <marek.safar@gmail.com>
378
379         * cs-parser.jay (GetLocation): Use an expression when available.
380
381 2010-03-04  Marek Safar  <marek.safar@gmail.com>
382
383         A fix for bug #582579
384         * ecore.cs (FieldExpr): Don't optimize cross reference loads.
385
386 2010-03-04  Marek Safar  <marek.safar@gmail.com>
387
388         A patch by kornelpal@gmail.com
389         
390         * dynamic.cs, anonymous.cs, rootcontext.cs, class.cs: Don't make
391         compiler generated classes sealed by default. Emit and close top
392         level compiler generated classes as well. 
393         
394         * support.cs: Use RuntimeHelpers.GetHashCode.
395
396 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
397
398         * Makefile: We need to use the internal bootstrapping gmcs for
399         net_2_1_bootstrap too now.
400
401 2010-03-02  Raja R Harinath  <harinath@hurrynot.org>
402
403         * expression.cs (IndexerAccess.ResolveAccessor): Add CS1540 check.
404
405 2010-03-02  Marek Safar  <marek.safar@gmail.com>
406
407         * cs-tokenizer.cs: Missed few locations in previous fix.
408
409 2010-03-02  Marek Safar  <marek.safar@gmail.com>
410
411         * cs-tokenizer.cs, argument.cs, dynamic.cs, assign.cs, anonymous.cs,
412         nullable.cs, expression.cs, statement.cs, cs-parser.jay, cfold.cs:
413         Report correct location for operator errors.
414
415 2010-03-02  Marek Safar  <marek.safar@gmail.com>
416
417         * typemanager.cs (IsDynamicType): Don't check external types when
418         the attribute is not external.
419
420 2010-02-24  Marek Safar  <marek.safar@gmail.com>
421
422         A fix for bug #582579
423         * decl.cs (IsExposedFromAssembly): Use PartialContainer for parent
424         modifiers.
425
426 2010-02-24  Marek Safar  <marek.safar@gmail.com>
427
428         A fix for bug #581804
429         * ecore.cs: Fixed type comparison.
430
431 2010-02-08  Miguel de Icaza  <miguel@novell.com>
432
433         * namespace.cs (CompletionGetTypesStartingWith): Do not include
434         private types in the completion results.
435
436         * cs-parser.jay: Bubble completions after "from x in ?" and "from x
437         ... let ?"
438
439 2010-02-17  Marek Safar  <marek.safar@gmail.com>
440
441         * generic.cs, field.cs, decl.cs, cs-parser.jay: Simplify special
442         constraint parsing.
443
444 2010-02-14  Miguel de Icaza  <miguel@novell.com>
445
446         * eval.cs: Do not do the report printer dance unless the user has
447         set the DescribeTypes feature.
448
449 2010-02-10  Marek Safar  <marek.safar@gmail.com>
450
451         * argument.cs, dynamic.cs, expression.cs: Track RC API changes.
452
453 2010-02-08  Marek Safar  <marek.safar@gmail.com>
454
455         A fix for bug #577029
456         * anonymous.cs: Fixed TypeBuilder* check.
457
458 2010-02-06  Miguel de Icaza  <miguel@novell.com>
459
460         * eval.cs (CompileBlock): Also undo if there are problems during
461         semantic analysis, fixes various cases where invalid C# code would
462         be reported, but the internal changes would not be undone.
463
464 2010-02-03  Miguel de Icaza  <miguel@novell.com>
465
466         * driver.cs: Change the --fatal flag to allow a number to be
467         passed, this ignores the first N fatal errors.   Useful to debug
468         errors that do not happen on the first hit.
469
470         * cs-parser.jay (invocation_expression): accept both the
471         CLOSE_PARENS and COMPLETE_COMPLETION, this allows completions
472         inside an invocation.
473
474         * driver.cs: Expose FatalErrors.
475
476         * eval.cs: Initialize the printer's Fatal property from the
477         Driver's FatalError flag, this allows csharp --fatal to work
478         again. 
479
480         Add support for calling Describe (typeof (TYPE)) if the expression
481         entered is a TYPE.
482         
483 2010-02-02  Marek Safar  <marek.safar@gmail.com>
484
485         A fix for bug #574991
486         * rootcontext.cs, class.cs, driver.cs: Hide enhanced warnings behind
487         --lint.
488
489 2010-02-02  Marek Safar  <marek.safar@gmail.com>
490
491         A fix for bug #575986
492         * expression.cs: Don't mutate typeof type definitions.
493
494 2010-01-28  Marek Safar  <marek.safar@gmail.com>
495
496         * decl.cs: Use only one set of modifiers.
497
498 2010-01-26  Marek Safar  <marek.safar@gmail.com>
499
500         A fix for bug #573329
501         * eval.cs: Don't disable error reporting completely on silent mode.
502         
503 2010-01-25  Marek Safar  <marek.safar@gmail.com>
504
505         A fix for bug #573312
506         * constant.cs, expression.cs, ecore.cs: Emit correct offset for
507         pointer index of unknown size types greater than 2.
508
509 2010-01-15  Marek Safar  <marek.safar@gmail.com>
510
511         * *.cs: Use only 1 member kind enum.
512
513 2010-01-15  Marek Safar  <marek.safar@gmail.com>
514
515         * *.cs: Add event specification.
516
517 2010-01-14  Marek Safar  <marek.safar@gmail.com>
518
519         * membercache.cs: Extracted from decl.cs.
520         
521         * *.cs: Put more infrastructure in place.
522
523 2010-01-13  Marek Safar  <marek.safar@gmail.com>
524
525         * *.cs: Add property specification, unused yet.
526
527 2010-01-13  Marek Safar  <marek.safar@gmail.com>
528
529         * property.cs: Move all property based declarations into a new file.
530
531 2010-01-13  Marek Safar  <marek.safar at gmail.com>
532
533         * expression.cs (Conditional): Resolve reduced expression.
534
535 2010-01-13  Marek Safar  <marek.safar at gmail.com>
536
537         * *.cs: Introduced non-generic method specification.
538
539 2010-01-07  Marek Safar  <marek.safar@gmail.com>
540
541         * method.cs: Move all method based declarations into a new file.
542
543 2010-01-07  Marek Safar  <marek.safar@gmail.com>
544
545         * *.cs: Extract field specification.
546
547 2009-12-17  Marek Safar  <marek.safar@gmail.com>
548
549         * field.cs: Extracted from class.cs
550
551 2009-12-15  Marek Safar  <marek.safar@gmail.com>
552
553         * attribute.cs (GetFixedBuffer): Work on field definition only.
554
555 2009-12-15  Marek Safar  <marek.safar@gmail.com>
556
557         * *.cs: Clean up NET_4_0 conditional where possible.
558
559 2009-12-14 Rodrigo Kumpera  <rkumpera@novell.com>
560
561         support.cs (DynamicType): Assembly property returns the assembly builder.
562         This is required due to how compiler context works in corlib.
563
564 2009-12-14  Marek Safar  <marek.safar@gmail.com>
565
566         A fix for bug #564376
567         * assign.cs (LocalTemporary): Removed no longer needed special
568         by-ref handling.
569
570 2009-12-11  Marek Safar  <marek.safar@gmail.com>
571
572         * modifiers.cs, decl.cs, iterators.cs, const.cs, anonymous.cs,
573         class.cs, delegate.cs, cs-parser.jay, enum.cs: Turn modifiers into
574         enum for easier debugging.
575
576 2009-12-10  Marek Safar  <marek.safar@gmail.com>
577
578         * decl.cs, anonymous.cs, class.cs: Sealed Define it's now main entry
579         point.
580         
581         * parameter.cs, delegate.cs, dynamic.cs: Don't use builder methods
582         directly.
583
584 2009-12-10  Marek Safar  <marek.safar@gmail.com>
585
586         * cs-parser.jay, statement.cs: Handle parser error in code
587         completition.
588
589 2009-12-10  Marek Safar  <marek.safar@gmail.com>
590
591         * ecore.cs: Ignore base imported methods when they are already
592         in method bag.
593         
594         * eval.cs: Handle non-existent keys.
595         
596         * report.cs, driver.cs: Make fatal work with console printer only.
597
598 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
599
600         * typemanager.cs (MakeGenericMethod): Fix stupid mistake.
601
602 2009-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
603
604         * typemanager.cs: Add MakeGenericMethod that checks if the method
605         is really the generic method definition.
606
607         ecore.cs (MethodGroupExpr:IsApplicable): Use new TypeManager function
608         to inflate generic methods.
609
610 2009-12-08  Marek Safar  <marek.safar@gmail.com>
611
612         A fix for bug #561149
613         * anonymous.cs: Use actual type parameters when checking for generic
614         method host.
615
616 2009-12-08  Marek Safar  <marek.safar@gmail.com>
617
618         A fix for bug #561369
619         * expression.cs (DoNumericPromotion): Fixed typo.
620
621 2009-12-08  Marek Safar  <marek.safar@gmail.com>
622
623         *.cs: Moving to generics world.
624
625         cs-parser.jay: Removed current_array_type.
626
627 2009-12-07  Marek Safar  <marek.safar@gmail.com>
628
629         *.cs: Moving to generics world.
630
631 2009-12-04  Marek Safar  <marek.safar@gmail.com>
632
633         *.cs: Moving to generics world (day 2).
634
635 2009-12-03  Marek Safar  <marek.safar@gmail.com>
636
637         *.cs: Moving to generics world.
638
639 2009-12-02  Marek Safar  <marek.safar@gmail.com>
640
641         * typemanager.cs, parameter.cs, class.cs, delegate.cs, attribute.cs:
642         Encode dynamic type attribute for elements where attributes cannot
643         be used.
644
645 2009-12-01  Marek Safar  <marek.safar@gmail.com>
646
647          argument.cs, assign.cs, expression.cs, cs-parser.jay: Named
648          arguments by ref.
649
650 2009-12-01  Marek Safar  <marek.safar@gmail.com>
651
652         A fix for bug #360455
653         * class.cs: Never report a unused warning for generic events to
654         workaround wrong expression type.
655
656 2009-11-30  Marek Safar  <marek.safar@gmail.com>
657
658         A fix for bug #558305
659         * decl.cs, class.cs: Check partial method definitions using correct
660         flag.
661
662 2009-11-30  Marek Safar  <marek.safar@gmail.com>
663
664         * argument.cs: Don't cache rarely used dynamic flag.
665
666 2009-11-27  Marek Safar  <marek.safar@gmail.com>
667
668         * cs-parser.jay: Use jay global stacks (saves over 3MB for corlib).
669
670 2009-11-27  Marek Safar  <marek.safar@gmail.com>
671
672         * ecore.cs (SimpleName): Removed no longer needed in_transit as
673         Resolve is now non-reentrant (saves ~0.6MB for corlib).
674
675 2009-11-26  Marek Safar  <marek.safar@gmail.com>
676
677         A fix for bug #545081
678         * decl.cs: Check private nested types of nested types recursively.
679
680 2009-11-26  Marek Safar  <marek.safar@gmail.com>
681
682         A fix for bug #558305
683         * location.cs: Ignore self referencing #line directive
684
685 2009-11-26  Marek Safar  <marek.safar@gmail.com>
686
687         A fix for bug #558292
688         * class.cs: Allow single unsafe fixed buffer fields.
689
690 2009-11-26  Marek Safar  <marek.safar@gmail.com>
691
692         * expression: Optimize few more zero-based operations.
693
694 2009-11-26  Marek Safar  <marek.safar@gmail.com>
695
696         * cs-tokenizer.cs, cs-parser.jay: Simplify literal parsing, also
697         avoids boxing of literal values.
698
699 2009-11-26  Marek Safar  <marek.safar@gmail.com>
700
701         * cs-tokenizer.cs, argument.cs, eval.cs, linq.cs, decl.cs,
702         expression.cs, ecore.cs, location.cs, cs-parser.jay, attribute.cs,
703         codegen.cs: LocatedToken redesing to avoid excessive allocation and
704         boxing (saves ~7MB for corlib). Also fixes presise token location.
705
706 2009-11-25  Marek Safar  <marek.safar@gmail.com>
707
708         * ecore.cs, cs-parser.jay: Keep parser structures local. Share
709         common data buckers.
710
711 2009-11-24  Marek Safar  <marek.safar@gmail.com>
712
713         * expression.cs: Lower static array initializer barrier.
714         
715         * support.cs, driver.cs: Share reader buffer.
716
717 2009-11-23  Marek Safar  <marek.safar@gmail.com>
718
719         * cs-tokenizer.cs, support.cs: Some tokenizer optimizations.
720
721 2009-11-23  Marek Safar  <marek.safar@gmail.com>
722
723         * cs-tokenizer.cs, support.cs: Use Dictionary instead of Hashtable,
724         cleanup some obsolete code.
725
726 2009-11-20  Marek Safar  <marek.safar@gmail.com>
727
728         * context.cs, expression.cs, ecore.cs, complete.cs: Cleaned up
729         Expression.Resolve.
730
731 2009-11-20  Marek Safar  <marek.safar@gmail.com>
732
733         * *.cs: Resolved expressions are never resolved again, this helps to
734         uncover some not easy to find bugs and improve the performance.
735
736 2009-11-19  Marek Safar  <marek.safar@gmail.com>
737
738         * *.cs: Made constant expressions fully compatible with any other
739         expression.
740
741 2009-11-19  Marek Safar  <marek.safar@gmail.com>
742
743         * *.cs: DoResolve is a worker method and has to be protected.
744
745 2009-11-18  Marek Safar  <marek.safar@gmail.com>
746
747         * *.cs: More context specific handling.
748
749 2009-11-17  Marek Safar  <marek.safar@gmail.com>
750
751         * *.cs: More context specific handling.
752
753 2009-11-16  Marek Safar  <marek.safar@gmail.com>
754
755         * dynamic.cs, class.cs: Removed few fixed user types conversions.
756         
757         * symbolwriter.cs: Uses public ILOffset.
758
759 2009-11-13  Marek Safar  <marek.safar@gmail.com>
760
761         A fix for bug #553650
762         * generic.cs: Another missing TypeToCoreType, still too many to fix.
763
764 2009-11-13  Marek Safar  <marek.safar@gmail.com>
765
766         A fix for bug #555170
767
768         * class.cs, delegate.cs, enum.cs: Constants have to be available
769         for parameters resolve.
770
771 2009-11-12  Marek Safar  <marek.safar@gmail.com>
772
773         * typemanager.cs, argument.cs, support.cs, delegate.cs: Dynamic
774         arrays.
775
776 2009-11-12  Marek Safar  <marek.safar@gmail.com>
777
778         * argument.cs, context.cs, expression.cs, ecore.cs: Dynamic binding
779         with a statically known candidate set.
780
781 2009-11-11  Scott Peterson  <lunchtimemama@gmail.com>
782
783         * generic.cs: Made type inflation for generic constraint checks
784         recursive. This fixes BGO #553655.
785
786 2009-11-11  Marek Safar  <marek.safar@gmail.com>
787
788         * dynamic.cs, decl.cs, expression.cs, ecore.cs: More dynamic type
789         checks.
790
791 2009-11-10  Marek Safar  <marek.safar@gmail.com>
792
793         * typemanager.cs, generic.cs, parameter.cs, argument.cs, dynamic.cs,
794         linq.cs, rootcontext.cs, ecore.cs, class.cs, delegate.cs,
795         attribute.cs: Add some dynamic error checking.
796
797 2009-11-07  Marek Safar  <marek.safar@gmail.com>
798
799         A fix for bug #553465
800
801         * expression.cs: Fixed mixed version of expression tree anonymous
802         type.
803
804 2009-11-06  Marek Safar  <marek.safar@gmail.com>
805
806         A fix for bug #553031
807
808         * linq.cs, expression.cs, class.cs, cs-parser.jay: Initialize
809         expression tree version of anonymous type with members declaration.
810
811 2009-11-05  Marek Safar  <marek.safar@gmail.com>
812
813         * parameter.cs: Handle nullable parameter default expression.
814         
815         * argument.cs, dynamic.cs, expression.cs, support.cs, ecore.cs,
816         class.cs, attribute.cs: Check for wrong dynamic arguments.
817
818 2009-11-05  Marek Safar  <marek.safar@gmail.com>
819
820         * statement.cs: Dynamic statements.
821
822 2009-11-04  Marek Safar  <marek.safar@gmail.com>
823
824         * dynamic.cs, assign.cs, context.cs, expression.cs, ecore.cs:
825         Compound assignments over dynamic type.
826
827 2009-11-03  Marek Safar  <marek.safar@gmail.com>
828
829         * argument.cs, dynamic.cs, expression.cs, delegate.cs: Dynamic
830         constructor arguments.
831
832 2009-10-30  Marek Safar  <marek.safar@gmail.com>
833
834         * dynamic.cs, convert.cs, assign.cs, constant.cs, expression.cs,
835         codegen.cs: Unary mutator on dynamic member access expression.
836
837 2009-10-29  Marek Safar  <marek.safar@gmail.com>
838
839         A fix for bug #550580   
840         * convert.cs: Don't eliminate explicit precission casts.
841
842 2009-10-28  Marek Safar  <marek.safar@gmail.com>
843
844         A fix for bug #550404
845         
846         * parameter.cs, iterators.cs, context.cs, anonymous.cs,
847         expression.cs, statement.cs, ecore.cs: Quote any nested expression
848         tree.
849
850 2009-10-27  Marek Safar  <marek.safar@gmail.com>
851
852         * constant.cs, nullable.cs: Create nullable-null as LiftedNull
853         constant.
854         
855         * class.cs: Allow nullable binary user operators.
856
857 2009-10-26  Marek Safar  <marek.safar@gmail.com>
858
859         * expression.cs: Move binary expression optimization at the end of
860         resolve.
861
862 2009-10-23  Marek Safar  <marek.safar@gmail.com>
863
864         * constant.cs, nullable.cs, expression.cs, literal.cs, cfold.cs:
865         Separate NullConstant from NullLiteral.
866
867 2009-10-23  Marek Safar  <marek.safar@gmail.com>
868
869         * typemanager.cs, eval.cs, decl.cs, roottypes.cs, context.cs,
870         anonymous.cs, expression.cs, rootcontext.cs, ecore.cs, class.cs,
871         flowanalysis.cs, cs-parser.jay, driver.cs, codegen.cs: Split
872         ModuleContainer. Add common unclosed member check routine.
873
874 2009-10-22  Marek Safar  <marek.safar@gmail.com>
875
876         * argument.cs: Use literal flag for real literals only.
877
878         * dynamic.cs: Use correct return type for custom delegates.
879
880 2009-10-22  Marek Safar  <marek.safar@gmail.com>
881
882         * dynamic.cs, expression.cs: Pass logical binary flag to dynamic
883         resolver.
884
885 2009-10-22  Marek Safar  <marek.safar@gmail.com>
886
887         * dynamic.cs, ecore.cs: Dynamic invocation with void return type.
888
889 2009-10-21  Marek Safar  <marek.safar@gmail.com>
890
891         * dynamic.cs, convert.cs, expression.cs, ecore.cs: Wrap array index
892         conversion.
893
894 2009-10-21  Marek Safar  <marek.safar@gmail.com>
895
896         * typemanager.cs, dynamic.cs, expression.cs: Don't resolve runtime
897         binder flags.
898
899 2009-10-20  Marek Safar  <marek.safar@gmail.com>
900
901         * argument.cs, dynamic.cs, expression.cs: Latest API update.
902
903 2009-10-19  Marek Safar  <marek.safar@gmail.com>
904
905         * typemanager.cs, expression.cs: Dynamic array initializer.
906
907 2009-10-16  Marek Safar  <marek.safar@gmail.com>
908
909         * typemanager.cs, rootcontext.cs: Clear -nostdlib flag when object
910         is imported.
911
912 2009-10-16  Marek Safar  <marek.safar@gmail.com>
913
914         A fix for bug #493523, #507067
915         * convert.cs, nullable.cs, expression.cs: Do implicit and explicit
916         standard nullable conversion using underlying standard conversion
917         and not full conversion.
918
919 2009-10-15  Marek Safar  <marek.safar@gmail.com>
920
921         * dynamic.cs, expression.cs, ecore.cs, delegate.cs: Check return
922         type in VerifyArgumentsCompat.
923
924 2009-10-15  Marek Safar  <marek.safar@gmail.com>
925
926         * nullable.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
927         Reject variable used with type arguments.
928
929 2009-10-14  Marek Safar  <marek.safar@gmail.com>
930
931         * argument.cs, dynamic.cs, assign.cs, expression.cs, ecore.cs:
932         Implement dynamic expressions assignment.
933
934 2009-10-14  Marek Safar  <marek.safar@gmail.com>
935
936         * expression.cs: Build underlying expression when resolving unary
937         mutators.
938
939 2009-10-14  Marek Safar  <marek.safar@gmail.com>
940
941         * expression.cs: Emit enum array initializer using binary blob.
942
943 2009-10-08  Marek Safar  <marek.safar@gmail.com>
944
945         * typemanager.cs, constant.cs: Optimize decimal constants which fit
946         to long range.
947
948 2009-10-07  Marek Safar  <marek.safar@gmail.com>
949
950         * typemanager.cs: Reset object_type.
951         
952         * assign: Made SimpleAssign public.
953
954 2009-10-06  Marek Safar  <marek.safar@gmail.com>
955
956         * typemanager.cs, decl.cs, namespace.cs, ecore.cs, class.cs: Pass
957         invocation assembly to IsThisOrFriendAssembly.
958
959 2009-10-05  Marek Safar  <marek.safar@gmail.com>
960
961         * expression.cs: Equality comparison of generic parameter with
962         class constraint.
963
964 2009-10-05  Marek Safar  <marek.safar@gmail.com>
965
966         A fix for bug #543570
967         * generic.cs: Import predefined constraints correctly.
968
969 2009-10-02  Marek Safar  <marek.safar@gmail.com>
970
971         * ecore.cs: Don't crash on overloads with optional paremeters where
972         arguments count overflows.
973         
974         * parameter.cs: Import optional parameter constants using optional
975         value type.
976
977 2009-10-01  Marek Safar  <marek.safar@gmail.com>
978
979         * Makefile: Default is gmcs compiler.
980
981 2009-10-01  Marek Safar  <marek.safar@gmail.com>
982
983         * cs-parser.jay: Fixed few NRE.
984
985 2009-10-01  Marek Safar  <marek.safar@gmail.com>
986
987         * cs-parser.jay, driver.cs: Expose parser exception in verbose mode.
988
989 2009-09-30  Marek Safar  <marek.safar@gmail.com>
990
991         * linq.cs, convert.cs, assign.cs, expression.cs, ecore.cs: Add
992         ShimExpression, ImplicitCast.
993
994 2009-09-30  Marek Safar  <marek.safar@gmail.com>
995
996         A fix for bug #542959
997         * delegate.cs: Emit correct delegate instance variable when there
998         are static and non-static overloads.
999
1000 2009-09-29  Marek Safar  <marek.safar@gmail.com>
1001
1002         * dynamic.cs, linq.cs, anonymous.cs, expression.cs, statement.cs,
1003         ecore.cs, cs-parser.jay: Unary expression dynamic compiler.
1004
1005 2009-09-28  Marek Safar  <marek.safar@gmail.com>
1006
1007         A fix for bug #542487
1008         * ecore.cs: Resolve extension methods hidden by properties.
1009
1010 2009-09-25  Marek Safar  <marek.safar@gmail.com>
1011
1012         * expression.cs, ecore.cs: More dynamic binary expressions.
1013
1014 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1015
1016         * nullable.cs, expression.cs: Fixed null lifted conversion for
1017         bitwise enum operations.
1018
1019 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1020
1021         * convert.cs, ecore.cs: Fixed explicit unsafe coversion of long
1022         values in checked context.
1023
1024 2009-09-22  Marek Safar  <marek.safar@gmail.com>
1025
1026         * expression.cs, ecore.cs: Fixed array index constant conversion.
1027
1028 2009-09-20  Miguel de Icaza  <miguel@novell.com>
1029
1030         * expression.cs: Do not crash when MemberLookup returns something
1031         that is not a MemberExpr here.   Report error 582 instead. 
1032
1033         Fixes #499988.
1034
1035 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1036
1037         * decl.cs, class.cs: Check protected property accessors.
1038
1039 2009-09-18  Marek Safar  <marek.safar@gmail.com>
1040
1041         * dynamic.cs, assign.cs: Dynamic compound assignment.
1042
1043 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1044
1045         * expression.cs: Fixed compound assignment explicit conversion.
1046
1047 2009-09-17  Marek Safar  <marek.safar@gmail.com>
1048
1049         * expression.cs, ecore.cs: Cannot infer variables from method group.
1050
1051 2009-09-16  Marek Safar  <marek.safar@gmail.com>
1052
1053         * argument.cs, dynamic.cs, convert.cs, context.cs, anonymous.cs,
1054         constant.cs, nullable.cs, expression.cs, literal.cs, ecore.cs,
1055         codegen.cs: Dynamic binary operations scaffolding.
1056
1057 2009-09-15  Marek Safar  <marek.safar@gmail.com>
1058
1059         * expression.cs: Fixes nullable promotion for enum type variables.
1060
1061 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1062
1063         * driver.cs, dynamic.cs: Reset more static variables.
1064
1065 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1066
1067         * dynamic.cs, expression.cs, rootcontext.cs, namespace.cs, ecore.cs,
1068         driver.cs: Introduced Expression::MakeExpression.
1069
1070 2009-09-11  Marek Safar  <marek.safar@gmail.com>
1071
1072         * eval.cs: Exposed MessageOutput instead of cleaning up eval API.
1073
1074 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1075
1076         * eval.cs, report.cs: Use Console.Out for all eval error or warning
1077         output.
1078
1079 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1080
1081         A fix for bug #518707
1082         * expression.cs (Is): Optimize only generic parameter type
1083         expression probing value type generic parameter.
1084
1085 2009-09-09  Marek Safar  <marek.safar@gmail.com>
1086
1087         A fix for bug #532571
1088         * ecore.cs: Check for simple name type arguments used with
1089         non-generic type.
1090
1091 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1092
1093         A fix for bug #497421
1094         * generic.cs (CheckConstraint): Don't use buildin types to check for
1095         parameterless constructor.
1096
1097 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1098
1099         A fix for bug #537402
1100         * generic.cs (CheckConstraint): Correctly inflate generic type
1101         arguments when checking generic method. 
1102
1103 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1104
1105         A fix for bug #536463
1106         * decl.cs (AddToContainer): Don't report collision between explicit
1107         and parameterless non-explicit members.
1108
1109 2009-09-08  Marek Safar  <marek.safar@gmail.com>
1110
1111         * eval.cs: Reset more static stuff.
1112
1113 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1114
1115         A fix for bug #324625
1116         * expression.cs, ecore.cs: Create nested generic type expression
1117         using declaring and not current type.
1118
1119 2009-09-07  Marek Safar  <marek.safar@gmail.com>
1120
1121         * *.cs: Changed Report class to accept various output printers and
1122         be an instance class. An expression resolver can now use different
1123         message reporter for each call and Report.Error can safely throw
1124         an exception. Part of ongoing work to turn mcs into proper library.
1125
1126 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1127
1128         * statement.cs, ecore.cs: Removed error reporting from emit code.
1129
1130 2009-09-04  Marek Safar  <marek.safar@gmail.com>
1131
1132         * cs-parser.jay, parameter.cs: Moved parser check out of constructor
1133
1134 2009-09-03  Marek Safar  <marek.safar@gmail.com>
1135
1136         * anonymous.cs, expression.cs, statement.cs, cs-parser.jay: Moved
1137         parser checks out of constructors.
1138
1139 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1140
1141         * expression.cs, statement.cs, ecore.cs: Use common Report.Error.
1142
1143 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1144
1145         A fix for bug #535448
1146         * anonymous.cs, class.cs: Copy return label between all contexts.
1147
1148 2009-09-02  Marek Safar  <marek.safar@gmail.com>
1149
1150         A fix for bug #535395
1151         * namespace.cs: Resolve context can be null.
1152
1153 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1154
1155         A fix for bug #533912
1156         * generic.cs: Use correct context for constraints resolving.
1157
1158 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1159
1160         A fix for bug #532630
1161         * driver.cs: Trim conditional symbols.
1162
1163 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1164
1165         * context.cs: New file.
1166         
1167         * *.exe.sources, *.csproj: Updated.
1168
1169 2009-08-25  Marek Safar  <marek.safar@gmail.com>
1170
1171         * generic.cs, parameter.cs, decl.cs, statement.cs, namespace.cs,
1172         class.cs, generic-mcs.cs, codegen.cs: Add GetSignatureForError to
1173         IMembercontext, some small cleanups.
1174
1175 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1176
1177         * *.cs: Split ResolveContext and EmitContext.
1178
1179 2009-08-24  Marek Safar  <marek.safar@gmail.com>
1180
1181         * *.cs: Only ResolveContext implements IMemberContext.
1182
1183 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1184
1185         * *.cs: Renamed IResolveContext to IMemberContext.
1186
1187 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1188
1189         * *.cs: Detached ResolveContext from EmitContext.
1190
1191 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1192
1193         * codegen.cs: Moved flow-analysis to BlockContext.
1194
1195 2009-08-21  Marek Safar  <marek.safar@gmail.com>
1196
1197         * *.cs: Detached BlockContext from EmitContext.
1198
1199 2009-08-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1200
1201         * statement.cs: avoid nullref when the return value of GetEnumerator()
1202         does not contain any MoveNext() method.
1203
1204 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1205
1206         * *.cs: Removed IResolveContext::GenericDeclContainer.
1207
1208 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1209
1210         * class.cs, delegate.cs: Changed Delegate to be TypeContainer based.
1211
1212 2009-08-19  Marek Safar  <marek.safar@gmail.com>
1213
1214         * generic.cs, iterators.cs, expression.cs, statement.cs, ecore.cs,
1215         cs-parser.jay, attribute.cs, codegen.cs: Better error reports.
1216
1217 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1218
1219         * *.cs: Removed boolean fields from EmitContext.
1220
1221 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1222
1223         * *.cs: Add IResolveContext::IsStatic.
1224
1225 2009-08-18  Marek Safar  <marek.safar@gmail.com>
1226
1227         * *.cs: Moved TopBlock's methods from EmitContext to TopBlock.
1228
1229 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1230
1231         * *.cs: Removed DeclContainer from EmitContext.
1232
1233 2009-08-17  Marek Safar  <marek.safar@gmail.com>
1234
1235         * *.cs: Add IResolveContext::CurrentTypeParameters.
1236
1237 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1238
1239         * *.cs: Removed TypeContainer and ContainerType from EmitContext.
1240
1241 2009-08-14  Marek Safar  <marek.safar@gmail.com>
1242
1243         * decl.cs, expression.cs, namespace.cs, ecore.cs, class.cs,
1244         codegen.cs: Add IResolveContext::LookupExtensionMethod.
1245
1246 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1247
1248         * decl.cs: Look in PartialContainer for parent type parameters.
1249
1250 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1251
1252         * decl.cs, namespace.cs, ecore.cs, class.cs, attribute.cs,
1253         codegen.cs: Add IResolveContext::LookupTypeParameter.
1254
1255 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1256
1257         * lambda.cs, expression.cs, statement.cs, namespace.cs, ecore.cs:
1258         Moved resolved logic from Emit to Resolve.
1259
1260 2009-08-13  Marek Safar  <marek.safar@gmail.com>
1261
1262         * parameter.cs, decl.cs, roottypes.cs, class.cs, attribute.cs,
1263         codegen.cs: Reworked atttributes handling of ResolveContext.
1264
1265 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1266
1267         * decl.cs, ecore.cs, class.cs, attribute.cs, codegen.cs: Pushed
1268         LookupNamespaceOrType to ResolveContext.
1269
1270 2009-08-12  Marek Safar  <marek.safar@gmail.com>
1271
1272         * typemanager.cs, decl.cs, expression.cs, namespace.cs, ecore.cs,
1273         class.cs: Removed unused parameters and methods.
1274
1275 2009-08-11  Marek Safar  <marek.safar@gmail.com>
1276
1277         * generic.cs, lambda.cs, anonymous.cs, statement.cs, generic-mcs.cs,
1278         codegen.cs: Finding the best common type of a set of expressions for
1279         lambda statements.
1280
1281 2009-08-07  Marek Safar  <marek.safar@gmail.com>
1282
1283         * dynamic.cs, expression.cs: More dynamic conversions.
1284
1285 2009-08-06  Miguel de Icaza  <miguel@novell.com>
1286
1287         * generic.cs: This loop was incorrect, it was increment ii, but
1288         checking for `i'.  This was a change introduced to fix #327497,
1289         now we fix #424012.
1290  
1291         * class.cs: Catch another case for cs0533 error, fixes #324782.
1292
1293 2009-08-06 Rodrigo Kumpera  <rkumpera@novell.com>
1294
1295         * typemanager.cs (GetGenericArguments): SRE returns null for
1296         generic methods on type builder instances if they are not generic
1297         themselves. For example, for Foo<int>::Bar() it returns null, but
1298         not for Foo<int>::Bar<>() or Foo<int>::Bar<double>().
1299
1300 2009-08-05  Marek Safar  <marek.safar@gmail.com>
1301
1302         * argument.cs, dynamic.cs, expression.cs, ecore.cs, class.cs,
1303         delegate.cs: Work on dynamic binding.
1304
1305 2009-08-04  Marek Safar  <marek.safar@gmail.com>
1306
1307         A second fix for bug #525342
1308         * class.cs: Attach partial method attributes to method
1309         implementation.
1310
1311 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1312
1313         * typemanager.cs, parameter.cs, support.cs, class.cs: Dynamic type
1314         restrictions.
1315         
1316         * rootcontext.cs: Default to langversion v4.
1317
1318 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1319
1320         * pending.cs: Check return type before member info is set.
1321
1322 2009-08-03  Marek Safar  <marek.safar@gmail.com>
1323
1324         * anonymous.cs: Fully initialize generic hoisted field expression.
1325
1326 2009-08-02  Miguel de Icaza  <miguel@novell.com>
1327
1328         * cs-parser.jay: Flag variables declared on the interactive shell
1329         as used to prevent the 168 warning about local variable not being
1330         used. 
1331
1332 2009-07-31  Marek Safar  <marek.safar@gmail.com>
1333
1334         * parameter.cs, dynamic.cs, support.cs, class.cs, delegate.cs,
1335         attribute.cs: Emit dynamic export attribute.
1336
1337 2009-07-30  Marek Safar  <marek.safar@gmail.com>
1338
1339         * expression.cs: More verifier work.
1340
1341 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1342
1343         * nullable.cs: Fixed SRE crash during corlib compilation.
1344
1345 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1346
1347         * generic.cs, typemanager.cs, decl.cs, iterators.cs, convert.cs,
1348         nullable.cs, expression.cs, ecore.cs, class.cs, attribute.cs:
1349         More TypeManager.TypeToCoreType needed.
1350
1351 2009-07-29  Marek Safar  <marek.safar@gmail.com>
1352
1353         * anonymous.cs: Update after recent SRE fixes.
1354
1355 2009-07-28  Marek Safar  <marek.safar@gmail.com>
1356
1357         * typemanager.cs, expression.cs, ecore.cs, delegate.cs: Use correct
1358         version of GetFieldHandle for fields of generic types.
1359
1360 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1361
1362         * typemanager.cs, argument.cs, convert.cs, assign.cs, expression.cs,
1363         ecore.cs: Add TypeManager.IsDynamicType,
1364         PredefinedAttributes.Dynamic.
1365
1366 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1367
1368         A fix for bug #415375
1369         * expression.cs: Fixed object and reference type parameter
1370         comparison.
1371
1372 2009-07-27  Marek Safar  <marek.safar@gmail.com>
1373
1374         A fix for bug #525342
1375         * class.cs: Attach partial method attributes to method
1376         implementation.
1377
1378 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1379
1380         * argument.cs, dynamic.cs, expression.cs, class.cs, attribute.cs:
1381         Dynamic arguments.
1382
1383 2009-07-24  Marek Safar  <marek.safar@gmail.com>
1384
1385         * anonymous.cs (MutateField): Add imported types handling.
1386
1387 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1388
1389         * expression.cs, delegate.cs: Moved arguments resolve into their
1390         counterparts expressions. Removed argument resolve from
1391         CollectionElementInitializer.
1392
1393 2009-07-23  Marek Safar  <marek.safar@gmail.com>
1394
1395         A fix for bug #523683
1396         * convert.cs, delegate.cs: Use common overload mechanism for method
1397         group conversion check.
1398
1399 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1400
1401         A fix for bug #523899
1402         * generics.cs: Exact type inference with other bound types.
1403
1404 2009-07-22  Raja R Harinath  <harinath@hurrynot.org>
1405
1406         Don't complain when the same type is implemented by the output
1407         assembly as well as multiple referenced assemblies
1408         * namespace.cs (RootNamespace.LookupTypeReflection): Add
1409         'must_be_unique' flag.
1410         (GlobalRootNamespace): Update to changes.
1411         (Namespace.LookupType): Pass 'must_be_unique' only when we don't
1412         already have a type in hand.
1413
1414 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1415
1416         * expression.cs: More verifier instrumentation.
1417         
1418         * statement.cs: Do proper throw expression conversion.
1419
1420 2009-07-22  Marek Safar  <marek.safar@gmail.com>
1421
1422         A fix for bug #522789
1423         * expression.cs: Mutate invocation return type.
1424
1425 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1426
1427         * anonymous.cs: Split assignable and readonly generated variable
1428         references.
1429
1430 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1431
1432         A fix for bug #521671
1433         * statement.cs: Fixed crash when checking missing type.
1434
1435 2009-07-16  Marek Safar  <marek.safar@gmail.com>
1436
1437         * typemanager.cs, generic.cs, argument.cs, linq.cs, convert.cs,
1438         assign.cs, expression.cs, statement.cs, support.cs, ecore.cs,
1439         class.cs, driver.cs: Work on dynamic binding.
1440
1441         * dynamic.cs: New file.
1442
1443         * *.sources, *.proj: Updated.
1444
1445 2009-07-15  Marek Safar  <marek.safar@gmail.com>
1446
1447         * expression.cs (Conditional): Avoid double Resolve.
1448
1449 2009-07-13  Marcus Griep  <marcus@griep.us>
1450
1451         * ecore.cs: Fix obscure bug with resolving members of interfaces
1452         that hide parent interface members. Fixes bug #444388 and corrects
1453         bug #323096
1454
1455 2009-07-13  Marek Safar  <marek.safar@gmail.com>
1456
1457         * expression.cs (LocalVariableReference): Bounce resolve.
1458
1459 2009-07-10  Marek Safar  <marek.safar@gmail.com>
1460
1461         * typemanager.cs, lambda.cs, parameter.cs, convert.cs, anonymous.cs,
1462         expression.cs, literal.cs, ecore.cs, complete.cs: Moved internal
1463         types to new class.
1464         
1465         * support.cs: New dynamic type wrapper.
1466
1467 2009-07-08  Marek Safar  <marek.safar@gmail.com>
1468
1469         * ecore.cs, cs-parser.jay: Better error reporting for implicitly
1470         typed local variable.
1471
1472 2009-07-06  Marek Safar  <marek.safar@gmail.com>
1473
1474         A fix for bug #519005
1475         * anonymous.cs: Use null_type as no return type placeholder.
1476
1477 2009-07-02  Marek Safar  <marek.safar@gmail.com>
1478
1479         * generic.cs: Handle type inference of identical type parameters
1480         with different bounds.
1481
1482 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1483
1484         * expression.cs, class.cs: Events variance.
1485         
1486         * cs-parser.jay: Interface events error messages.
1487
1488 2009-07-01  Marek Safar  <marek.safar@gmail.com>
1489
1490         * generic.cs, argument.cs: Updated type inference logic to C# 4.0.
1491
1492 2009-06-29  Marek Safar  <marek.safar@gmail.com>
1493
1494         * parameter.cs, convert.cs, expression.cs, class.cs: Default
1495         parameter expression can be value-type New.
1496
1497         * cs-parser.jay: Clean up too many parameter modifier boolean flags.
1498
1499 2009-06-26  Marek Safar  <marek.safar@gmail.com>
1500
1501         * generic.cs, argument.cs, expression.cs, ecore.cs, cs-parser.jay:
1502         Implemented C# 4.0 named arguments.
1503
1504 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1505
1506         * typemanager.cs, parameter.cs, iterators.cs, convert.cs,
1507         expression.cs, ecore.cs, delegate.cs: Removed unnecessary ArgList
1508         parameter modifier. Also fixes bug #515497.
1509
1510 2009-06-24  Marek Safar  <marek.safar@gmail.com>
1511
1512         * *.cs: Replaced ArrayList with Arguments in need of a nonsequential 
1513         arguments expression to be implemented.
1514         
1515         *.sources: Add argument.cs
1516
1517 2009-06-23  Marek Safar  <marek.safar@gmail.com>
1518
1519         * parameter.cs: Moved GetParameterIndexByName to base class.
1520         
1521         * expression.cs, statement.cs, ecore.cs, delegate.cs: Removed
1522         unused AType. Use argument's version of GetExpressionTree.
1523
1524 2009-06-22  Marek Safar  <marek.safar@gmail.com>
1525
1526         * expression.cs, cs-parser.jay, attribute.cs, codegen.cs: Named
1527         arguments grammar.
1528
1529 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1530
1531         A fix for bug #514096
1532         * class.cs: Allow IntPtr/UIntPtr fields to be volatile.
1533
1534 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1535
1536         * expression.cs: The first multi-dimensional array nested array
1537         initializers was not checked.
1538         
1539         * statement.cs (Switch): Fixed error message to reflect 2.0 changes.
1540
1541 2009-06-17  Marek Safar  <marek.safar@gmail.com>
1542
1543         A fix for bug #513400
1544         * nullable.cs (EmitEquality): Operands emit could be simplified for
1545         built-in types when we now emit user operators differently.
1546
1547 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1548
1549         * ecore.cs: Report inaccessible delegate methods correctly.
1550
1551 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1552
1553         * parameter.cs, expression.cs, ecore.cs, class.cs, delegate.cs,
1554         cs-parser.jay: Implemented C# 4.0 optional parameters.
1555
1556 2009-06-16  Marek Safar  <marek.safar@gmail.com>
1557
1558         * driver.cs: Removed broken DefineManifestResource.
1559
1560 2009-06-16  Raja R Harinath  <harinath@hurrynot.org>
1561
1562         * Makefile [net_2_0_bootstrap]: Don't explicitly mention net_1_1.
1563         Use $(BOOTSTRAP_PROFILE) instead.
1564
1565 2009-06-12  Jb Evain  <jbevain@novell.com>
1566
1567         * rootcontext.cs: add a Platform field.
1568         * driver.cs: handle /platform.
1569         * codegen.cs: pass the proper flags according to
1570         the platform when saving the assembly.
1571
1572 2009-06-11  Marek Safar  <marek.safar@gmail.com>
1573
1574         * parameter.cs, const.cs, report.cs, cs-parser.jay, attribute.cs:
1575         Add optional parameters grammar.
1576
1577 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1578
1579         * eval.cs, anonymous.cs, report.cs, rootcontext.cs, cs-parser.jay,
1580         driver.cs: Split lang version and metadata version.
1581
1582 2009-06-10  Marek Safar  <marek.safar@gmail.com>
1583
1584         * decl.cs: Better overload ctor collision error message.
1585
1586 2009-06-05  Jb Evain  <jbevain@novell.com>
1587
1588         * driver.cs (EmbededResource): avoid using an internal method
1589         in gmcs to embed manifest resources.
1590
1591 2009-06-04  Sebastien Pouliot  <sebastien@ximian.com>
1592
1593         * generic.cs, parameter.cs: Avoid using 'var' so we can bootstrap
1594         the compiler from older mono versions (like moon's bots)
1595
1596 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1597
1598         * namespace.cs (LookupTypeReflection): Ignore collisions between
1599         forwarded types.
1600
1601 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1602
1603         * codegen.cs: Enabled generic type forwarders.
1604
1605 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1606
1607         * dmcs.*: Add another version of SRE compiler.
1608
1609 2009-06-03  Marek Safar  <marek.safar@gmail.com>
1610
1611         * generic.cs, typemanager.cs, parameter.cs, convert.cs,
1612         generic-mcs.cs: Fixed variant type conversions.
1613
1614 2009-06-02  Marek Safar  <marek.safar@gmail.com>
1615
1616         A fix for bug #507863
1617         * codegen.cs: Fixes a crash on invalid string value attribute.
1618
1619 2009-06-01  Marek Safar  <marek.safar@gmail.com>
1620
1621         A fix for bug #508334
1622         * typemanager.cs, parameter.cs, convert.cs, expression.cs, ecore.cs,
1623         cs-parser.jay: Fully import __arglist modifier.
1624
1625 2009-05-29  Marek Safar  <marek.safar@gmail.com>
1626
1627         * generic.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs,
1628         delegate.cs, generic-mcs.cs: Rewrote type variance checks to
1629         actually work with closed generic types.
1630
1631 2009-05-27  Alan McGovern  <amcgovern@novell.com>
1632
1633         * class.cs, decl.cs, delegate.cs, parameter.cs: 
1634         Fix the build by replacing the use of 'var' with the actual type.
1635
1636 2009-05-27  Marek Safar  <marek.safar@gmail.com>
1637
1638         * generic.cs, parameter.cs, decl.cs, ecore.cs, class.cs, delegate.cs
1639     cs-parser.jay, generic-mcs.cs: Report wrong variant types
1640         declarations.
1641           
1642         * driver.cs, rootcontext.cs, report.cs: Add 3.0 language version
1643         filter.
1644
1645 2009-05-26  Rodrigo Kumpera  <rkumpera@novell.com>
1646                         Marek Safar  <marek.safar@gmail.com>
1647
1648         A fix for bug #377509
1649         * parameter.cs: Use predefined and not empty name for implicit
1650         setters.
1651
1652 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1653
1654         * class.cs: Don't report wrong warnings for event fields.
1655
1656 2009-05-21  Marek Safar  <marek.safar@gmail.com>
1657
1658         A fix for bug #504667
1659         * class.cs: Check for static class using parent container instead of
1660         parent type.
1661
1662 2009-05-08  Marek Safar  <marek.safar@gmail.com>
1663
1664         A fix for bug #496922
1665         * expression.cs: Always use temporary variable when using object
1666         initializer.
1667
1668 2009-04-28  Marek Safar  <marek.safar@gmail.com>
1669
1670         A fix for bug #495112
1671         * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
1672         local cache.
1673
1674 2009-04-27  Miguel de Icaza  <miguel@novell.com>
1675
1676         * driver.cs: Add a flag to work as a replacement for CSC in VS.
1677
1678 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1679
1680         * complete.cs: No idea how gonzalo got a null in the list, but
1681         avoid crashing.
1682
1683 2009-04-24  Miguel de Icaza  <miguel@novell.com>
1684
1685         * complete.cs (CompletionElementInitializer): New completion class
1686         to support completing inside a C# 3 element initializer, so this
1687         allows completion for Silverlight situations where it is very
1688         common to do:
1689
1690         new TextBlock () { Fo<TAB>
1691
1692         (CompletionSimpleName): Expose the prefix that was
1693         passed to the simple name.
1694
1695         * cs-parser.jay (object_or_collection_initializer): Add support
1696         for element_initializers.
1697
1698         * expression.cs (CollectionOrObjectInitializers.DoResolve):
1699         special case completion expressions as this method aggressively
1700         collects data before it operates, and errors were being thrown
1701         earlier than we were able to complete.
1702
1703 2009-04-23  Miguel de Icaza  <miguel@novell.com>
1704
1705         * eval.cs: Make getcompletions silent and enable debugging output
1706         if the -v option is passed.
1707
1708         * namespace.cs (NamespaceEntry.CompletionGetTypesStartingWith):
1709         Consider looking up the namespace that matches the prefix being
1710         used. 
1711
1712         This is part of the support for allowing completions like:
1713         `System.Co<TAB>' to complete to System.Console.
1714
1715         * complete.cs (CompletionSimpleName.AppendResults): Make this
1716         routine reusable.
1717
1718 2009-04-21  Raja R Harinath  <harinath@hurrynot.org>
1719
1720         * cs-parser.jay (GetTokenName): Mark GENERATE_COMPLETION and
1721         COMPLETE_COMPLETION as internal.
1722
1723 2009-04-17  Miguel de Icaza  <miguel@novell.com>
1724
1725         * complete.cs: Include namespace resolution in simple names as
1726         well as global types and types in the using scope in the
1727         resolution. 
1728
1729         * namespace.cs: Supporting infrastrcture to provide completions
1730         based on the current using scope. 
1731
1732         * eval.cs: Introduce an entry point that allows for initialization
1733         to return a list of the files passed on the command line.
1734
1735 2009-04-14  Marek Safar  <marek.safar@gmail.com>
1736
1737         A fix for bug #494243
1738         * report.cs (SymbolRelatedToPreviousError): Fixed NRE.
1739
1740 2009-04-13  Marek Safar  <marek.safar@gmail.com>
1741
1742         A fix for bug #493887
1743         * statement.cs: Don't skip string multi-section with default or
1744         null label when populating string hashtable.
1745
1746 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1747
1748         A fix for bug #492329
1749         * expression.cs (New): Load variable when assigning type parameter
1750         to ref variable.
1751
1752 2009-04-06  Marek Safar  <marek.safar@gmail.com>
1753
1754         A fix for bug #488960
1755         * decl.cs: Compare MVAR types using non-null values.
1756
1757 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1758
1759         * typemanager.cs, expression.cs: Removed unused nullable checks.
1760
1761 2009-03-27  Marek Safar  <marek.safar@gmail.com>
1762
1763         * *.cs: Removed some gmcs conditionals.
1764
1765 2009-03-26  Marek Safar  <marek.safar@gmail.com>
1766
1767         * generic.cs, support.cs: Moved generics stuff out of support.cs
1768
1769 2009-03-24  Marek Safar  <marek.safar@gmail.com>
1770
1771         * ecore.cs, expression.cs: Use queried type for MethodGroupExpr
1772         DeclaringType.
1773
1774 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1775
1776         * attribute.cs: Consider all members for error reporting when
1777         checking named arguments.
1778
1779 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1780
1781         A fix for bug #487625
1782         * namespace.cs: Use a warning for all predefined type conflicts.
1783
1784 2009-03-23  Marek Safar  <marek.safar@gmail.com>
1785
1786         A fix for bug #485706
1787         * statement.cs: Explicitly type catch type argument to pass verifier
1788         check.
1789
1790 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1791
1792         Initial support to provide code completion facilities to consumers
1793         of the evaluator API.
1794         
1795         * cs-tokenizer.cs (CompleteOnEOF): this new property is used to
1796         support the completion engine.   When we reach the end of the
1797         input stream instead of returning EOF, when this flag is true the
1798         tokenizer instead produces:
1799
1800                 One GENERATE_COMPLETION token: this token then must be
1801                 handled in the grammar at every point where the user
1802                 would likely request a completion.
1803
1804                 As many COMPLETE_COMPLETION tokens as necessary.   These
1805                 tokens are generated to assist the parser in unwinding and
1806                 producing a valid parse tree.    
1807
1808         The parser rules do not have to be perfect, the parser needs to be
1809         augmented with judicious use of GENERATE_COMPLETION tokens to
1810         improve the areas where we can provide completion and the parser
1811         needs to add support for COMPLETE_COMPLETION tokens in productions
1812         to make them work.
1813
1814         It is common to not have enough support for COMPLETE_COMPLETION
1815         under certain rules and that even if we generated the
1816         GENERATE_COMPLETION token that the resulting tree will be invalid
1817         due to the missing rules that support COMPLETE_COMPLETION.
1818
1819         The final EOF token is produced by having the parser notify the
1820         tokenizer when it reaches the root production that the next token
1821         should be EOF.
1822
1823         * support.cs (CompletionResult): New Exception.   This exception
1824         is thrown to return the completion results when one of the special
1825         completion expressions is reached.
1826
1827         This exception is thrown by the completing ExpressionStatements
1828         classes that live in complete.cs
1829
1830         * complete.cs (CompletingExpression): a new base class for
1831         completing expressions.   This derives from the
1832         ExpressionStatement class and not from Expression as it allows
1833         completion to happen not only where expressions are expected in
1834         the grammar, but also where statements are expected.
1835
1836         (CompletionSimpleName): A new class used to provide completions
1837         for SimpleNames.     This currently only resolves to local
1838         variables from the evaluator context (GetVars call).
1839
1840         (CompletionMemberAccess): Implements support for completing member
1841         access patterns. 
1842
1843         * cs-parser.jay: Add support for completion in a few places. 
1844
1845         * eval.cs (GetCompletions): New public API for the evaluator that
1846         returns a list of possible completions given the input.   The
1847         return value is an array of completions 
1848
1849         * anonymous.cs (Compatible): If the exception thrown from the
1850         resolved expression is a CompletionResult exception let that one
1851         through instead of printing a diagnostic error in the try/catch. 
1852 <       
1853 2009-03-22  Miguel de Icaza  <miguel@novell.com>
1854
1855         * 
1856
1857         * driver.cs (Main): Use Environment.Exit to quit quickly and
1858         prevent the compiler from doing the usual wait for helper thread
1859         to terminate.  
1860
1861         This is to prevent a slowdown that was reported by Gonzalo on
1862         ASP.NET 
1863
1864 2009-03-19  Marek Safar  <marek.safar@gmail.com>
1865
1866         * ecore.cs: Load build-in types directly instead of accessing
1867         an internal field.
1868
1869 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1870
1871         * ecore.cs: Always use unbox.any when available.
1872
1873 2009-03-18  Marek Safar  <marek.safar@gmail.com>
1874
1875         * class.cs: Always set TypeAttributes.BeforeFieldInit conditionally.
1876
1877 2009-03-17  Marek Safar  <marek.safar@gmail.com>
1878
1879         * generic.cs: Removed obsolete version of type inference.
1880
1881 2009-03-16  Marek Safar  <marek.safar@gmail.com>
1882
1883         * typemanager.cs, decl.cs, roottypes.cs, anonymous.cs, nullable.cs,
1884         expression.cs, rootcontext.cs, namespace.cs, ecore.cs, class.cs,
1885         delegate.cs, flowanalysis.cs, cs-parser.jay, driver.cs,
1886         attribute.cs, codegen.cs: Changed RootTypes to be ModuleContainer.
1887
1888 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1889
1890         A fix for bug #482996
1891         * anonymous.cs: Make sure we are not infering return type when
1892         checking type compatibility.
1893
1894 2009-03-11  Marek Safar  <marek.safar@gmail.com>
1895
1896         * typemanager.cs, generic.cs, parameter.cs, decl.cs, const.cs,
1897         rootcontext.cs, namespace.cs, class.cs, delegate.cs, driver.cs,
1898         generic-mcs.cs, attribute.cs, codegen.cs: Maintain predefined
1899         attributes in their own structure. Needed when accessing their
1900         properties before they are resolved.
1901
1902 2009-03-09  Marek Safar  <marek.safar@gmail.com>
1903
1904         * cs-tokenizer.cs: Optimized GetKeyword using an array instead of
1905         hashtable (~10x faster).
1906         
1907         * driver.cs: Removed wrong Reset.
1908
1909 2009-03-08  Marek Safar  <marek.safar@gmail.com>
1910
1911         * class.cs: Use correct common base type for unmanaged delayed
1912         check.
1913
1914         * rootcontext.cs: Wrap unhandled exception.
1915
1916 2009-03-06  Raja R Harinath  <harinath@hurrynot.org>
1917
1918         Make SeekableStreamReader self-tuning and arbitrarily seekable
1919         * support.cs (SeekableStreamReader.ResetStream): New.  Allocates
1920         the buffer.
1921         (SeekableStreamReader.Position.set): Use it.  Simplify logic
1922         which, as a side-effect, makes it arbitrarily-seekable.  Tune the
1923         buffer size when the stream needs to be re-read from the beginning.
1924
1925 2009-03-05  Marek Safar  <marek.safar@gmail.com>
1926
1927         A fix for bug #480100
1928         * parameter.cs: A parameter is not hoisted when used directly as ET.
1929
1930 2009-03-04  Marek Safar  <marek.safar@gmail.com>
1931
1932         * statement.cs: Fixed an issue when using variable is of interface
1933         type.
1934
1935 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1936
1937         A fix for bug #480319
1938         * report.cs, driver.cs: Support -warnaserror-:<warning list> option.
1939
1940 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1941
1942         A fix for bug #480867
1943         * typemanager.cs, expression.cs, ecore.cs: Changed method group
1944         expression to have no valid type.
1945
1946 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1947
1948         A fix for bug #481258
1949         * class.cs: Set extension method flag in partial container.
1950
1951 2009-03-03  Marek Safar  <marek.safar@gmail.com>
1952
1953         * statement.cs, typemanager.cs: Use expression for StringEmitter.
1954         
1955         * attribute.cs: Add sanity check.
1956
1957 2009-02-27  Marek Safar  <marek.safar@gmail.com>
1958
1959         * class.cs: Add external constructor error.
1960
1961 2009-02-26  Marek Safar  <marek.safar@gmail.com>
1962
1963         A fix for bug #475354
1964         * convert.cs, nullable.cs, expression.cs, statement.cs: Emit
1965         correctly user defined nullable equality operators.
1966
1967 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1968
1969         A fix for bug #479532
1970         * expression.cs: Implement NewInitialize::AddressOf.
1971
1972 2009-02-25  Marek Safar  <marek.safar@gmail.com>
1973
1974         A fix for bug #413633
1975         * expression.cs: Iterate all base class-constraint types.
1976
1977 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1978
1979         A fix for bug #479209
1980         * literal.cs: Mutate null underlying type.
1981
1982 2009-02-24  Marek Safar  <marek.safar@gmail.com>
1983
1984         A fix for bug #476295
1985         * convert.cs: Avoid wrapping implicitly convertible reference type.
1986
1987 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1988
1989         * iterators.cs: Create MemberName correctly.
1990
1991 2009-02-23  Marek Safar  <marek.safar@gmail.com>
1992
1993         A fix for bug #478655
1994         * literal.cs: Check also underlying null type conversion.
1995
1996 2009-02-21  Marek Safar  <marek.safar@gmail.com>
1997
1998         * generic.cs, ecore.cs, class.cs: Removed redundant AsAccessible.
1999
2000 2009-02-20  Marek Safar  <marek.safar@gmail.com>
2001
2002         A fix for bug #477447
2003         * statement.cs: Add reference to correct parent storey when this
2004         is accessible from deep children storey (more than 1 level).
2005
2006 2009-02-19  Marek Safar  <marek.safar@gmail.com>
2007
2008         A fix for bug #475860 by David Mitchell <dmitchell@logos.com>
2009         * class.cs: Define base type members before setting up member cache.
2010
2011 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2012
2013         A fix for bug #477378
2014         * nullable.cs, expression.cs, statement.cs: More precise null type
2015         sanity checks.
2016
2017 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2018
2019         A fix for bug #472805
2020         * typemanager.cs, namespace.cs: Import only visible extension method
2021         types.
2022
2023 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2024
2025         A fix for bug #476895
2026         * attribute.cs: Use correct resolve context for attribute type.
2027
2028 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2029
2030         A fix for bug #476266
2031         * anonymous.cs: Mutate multi-dimensional arrays.
2032
2033 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2034
2035         A fix for bug #476400
2036         * statement.cs, expression.cs: Removed wrong Dispose optimization.
2037
2038 2009-02-18  Marek Safar  <marek.safar@gmail.com>
2039
2040         A fix for bug #476811
2041         * generics.cs: Fixed null-literal check.
2042
2043 2009-02-17  Marek Safar  <marek.safar@gmail.com>
2044
2045         * typemanager.cs, convert.cs, flowanalysis.cs, driver.cs,
2046         expression.cs, ecore.cs, rootcontext.cs, eval.cs, class.cs: More
2047         messing with static variables.
2048
2049 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2050
2051         A fix for bug #475965
2052         * generics.cs: Check generic parameter type after extracting from
2053         Expression<T>.
2054
2055 2009-02-16  Marek Safar  <marek.safar@gmail.com>
2056
2057         A fix for bug #475823
2058         * convert.cs, expression.cs, literal.cs, ecore.cs, cfold.cs: Add
2059         typed-null support.
2060
2061 2009-02-14  Marek Safar  <marek.safar@gmail.com>
2062
2063         * modifiers.cs, decl.cs, ecore.cs, class.cs, flowanalysis.cs:
2064         Simplified event field definition using backing field and not
2065         field builder directly.
2066
2067         * expression.cs (EmitLdArg): Optimize fast paths.
2068
2069 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2070
2071         A fix for bug #475327
2072         * expression.cs (ArrayCreation): Don't mutate values optimized away.
2073
2074 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2075
2076         A fix for bug #475342
2077         * cs-parser.jay: Using 'super' instead of 'base' to call base
2078         constructor crashes compiler.
2079
2080 2009-02-13  Marek Safar  <marek.safar@gmail.com>
2081
2082         A fix for bug #475354
2083         * expression.cs (Constantify): Add nullable types.
2084         
2085         * const.cs (EmitDecimalConstant): Avoid explicit cast.
2086
2087 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2088
2089         A fix for bug #475246
2090         * expression.cs: More broken flowanalysis hacking needed.
2091
2092 2009-02-12  Marek Safar  <marek.safar@gmail.com>
2093
2094         * attribute.cs: Compare only ref/out array modifiers. 
2095
2096 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2097
2098         * statement.cs: Use member cache when looking for foreach members.
2099
2100 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2101
2102         * expression.cs: Don't expose internal initializer types.
2103         
2104         * statement.cs: Check also explicit conversions for goto case.
2105
2106 2009-02-11  Marek Safar  <marek.safar@gmail.com>
2107
2108         * convert.cs, statement.cs: Removed usage of IsAssignableFrom.
2109
2110 2009-02-10  Marek Safar  <marek.safar@gmail.com>
2111
2112         * *.cs: Replace null-type with NullLiteral where appropriate.
2113
2114 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2115
2116         * expression.cs: Initializer of reference argument use temporary
2117         variable to be verifiable.
2118         
2119         * parameter.cs: Share EmitLdArg.
2120
2121 2009-02-09  Marek Safar  <marek.safar@gmail.com>
2122
2123         A fix for bug #473559
2124         * class.cs: Fixed: Not reporting error about nested class with the
2125         same name.
2126
2127 2009-02-06  Scott Peterson  <lunchtimemama@gmail.com>
2128
2129         Contributed under the MIT/X11 license.
2130
2131         * generic.cs: Added VerifyVariantTypeParameters which performs new
2132         variance verification logic. The old logic, based on the spec, was
2133         wrong because the spec is full of LIES!
2134
2135         * generic-mcs.cs: Stubbed out the VerifyVariantTypeParameters method.
2136
2137         *typemanager.cs: Moved variance verification logic to GenericTypeExpr.
2138
2139         * class.cs:
2140         * ecore.cs: Added calls to the new variance verification logic.
2141
2142         * parameter.cs:
2143         * delegate.cs: Removed calls to the old variance verification logic.
2144
2145 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2146
2147         * delegate.cs: Use cached Invoke method directly.
2148
2149 2009-02-06  Marek Safar  <marek.safar@gmail.com>
2150
2151         * expression.cs: Emit expression tree for hoisted variable access.
2152
2153 2009-02-04  Marek Safar  <marek.safar@gmail.com>
2154
2155         * namespace.cs: Add better extension class check.
2156
2157 2009-02-05  Scott Peterson  <lunchtimemama@gmail.com>
2158
2159         * generic.cs: Fixed typeo (TypeParameter.Variacne).
2160
2161 2009-02-04  Scott Peterson  <lunchtimemama@gmail.com>
2162
2163         This patch adds initial generic variance support to the compiler.
2164         It is contributed under the MIT/X11 license.
2165
2166         * typemanager.cs: Modified ImplementsInterface to check variance.
2167         Added VerifyVariantTypeParameters which checks the specified type to see
2168         if it uses a variant type parameter as a type argument (which is not
2169         allowed). Added IsVariantOf which determins if the first type is a
2170         variant of the second. NOTE: This only supports reference types at
2171         the moment to conform with the current level of VM support. When the
2172         VM supports value types, this will follow step.
2173
2174         * generic.cs: Added the Variance enum. Added a Variance property to
2175         TypeParameter and added variance support to definition phase. Added a
2176         Variance property to TypeParameterName. Also check to make sure that
2177         no variant types appear in generic method parameters.
2178
2179         * cs-tokenizer.cs: Modified parse_less_than to tokenize the variance
2180         keywords if the langversion supports it.
2181
2182         * parameter.cs: Added Parameter.VerifyNoVariantTypeParameters to ensure
2183         that variant types are only used in legal positions. Also added
2184         ParametersCompiled.VerifyNoVariantTypeParameters to check all of its
2185         parameters.
2186
2187         * decl.cs: Construct TypeParameter with the variance information.
2188
2189         * convert.cs: Checks variance in ImplicitReferenceConversionExists
2190         and ImplicitConversionStandard.
2191
2192         * rootcontext.cs: Added new "Future" language version.
2193
2194         * class.cs: In TypeContainer.DoDefineMembers, ensure that contravariant
2195         type parameters are not used as type arguments in interface inheritance.
2196         In MemberBase.DoMemberDependentChecks, ensure that contravariant type
2197         parameters are not used as method return types. In MemberBase.
2198         ResolveMemberType, ensure that variant type parameters are not used
2199         as type arguments. Also call VerifyNoVariantTypeParameters on every
2200         set of parameters which are resolved.
2201
2202         * delegate.cs: Modified Delegate.Define to ensure that variant
2203         parameters are not used as type arguments and that a contravariant
2204         parameter is not used as the return type. Also call
2205         VerifyNoVariantTypeParameters on the delegate parameters.
2206
2207         * cs-parser.jay: Modified grammar to support "in" and "out" keywords
2208         to specify generic variance.
2209
2210         * driver.cs: Added support for LanguageVersion.Future in the form of
2211         "-langversion:future".
2212
2213         * generic-mcs.cs: Stubbed out new members in generic.cs.
2214
2215 2009-02-03  Marek Safar  <marek.safar@gmail.com>
2216
2217         * class.cs, generic.cs: Emit type parameter constraints for nested
2218         types.
2219
2220 2009-02-02  Marek Safar  <marek.safar@gmail.com>
2221
2222         A fix for bug #471213
2223         * class.cs: Avoid emitting backing field for abstract event fields.
2224
2225 2009-02-01  Marek Safar  <marek.safar@gmail.com>
2226
2227         A fix for bug #359731
2228         * cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
2229         expressions.
2230
2231 2009-01-30  Marek Safar  <marek.safar@gmail.com>
2232
2233         A fix for bug #470767
2234         * statement.cs: Introduced BlockScopeExpression, needed when 
2235         expression tree conversion has to emit scope variables.
2236
2237 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2238
2239         * class.cs: Remove duplicate CallingConvention.
2240
2241 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2242
2243         *.cs: Rename Parameters to ParametersCompiled and ParametersImported
2244         when I finally found the right naming convention.
2245
2246 2009-01-29  Marek Safar  <marek.safar@gmail.com>
2247
2248         * cs-tokenizer.cs: Put back different open parens optimization.
2249
2250 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2251
2252         A fix for bug #470227
2253         * cs-tokenizer.cs: Remove too agressive parser optimization.
2254
2255 2009-01-28  Marek Safar  <marek.safar@gmail.com>
2256
2257         A fix for bug #324319
2258         * class.cs: Remove too early base type resolve.
2259
2260 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2261
2262         A fix for bug #324319
2263         * ecore.cs: Explicitly type null when assigning to type argument to
2264         make pass verifier check.
2265
2266 2009-01-27  Marek Safar  <marek.safar@gmail.com>
2267
2268         * anonymous.cs: Fixed recent regression when initializing captured 
2269         this.
2270
2271 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2272
2273         A fix for bug #469019
2274         * anonymous.cs: Use all parent type parameters when instantiating
2275         nested generic storey.
2276
2277 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2278
2279         * expression.cs: Check for null instance methodgroup expression.
2280
2281 2009-01-26  Marek Safar  <marek.safar@gmail.com>
2282
2283         A fix for bug #469244
2284         * cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
2285         instance inside a conditional expression.
2286
2287 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2288
2289         * typemanager.cs, generic.cs, parameter.cs, decl.cs, anonymous.cs,
2290         expression.cs, report.cs, ecore.cs, attribute.cs: Use common 
2291         GetElementType and HasElementType. IsValueType clean up.
2292
2293 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2294
2295         * nullable.cs: Use common EmitCall.
2296         
2297         * expression.cs: Emit constraint. for virtual calls only.
2298
2299 2009-01-23  Marek Safar  <marek.safar@gmail.com>
2300
2301         * typemanager.cs, generic.cs, eval.cs, convert.cs, const.cs, 
2302         expression.cs, statement.cs, rootcontext.cs, ecore.cs, class.cs,
2303         driver.cs, attribute.cs, enum.cs: Split IsValueType and IsStruct
2304         checks.
2305
2306 2009-01-22  Jb Evain  <jbevain@novell.com>
2307
2308         * anonymous.cs: make anonymous types' ToString implementation
2309         match what csc outputs.
2310
2311 2009-01-21  Marek Safar  <marek.safar@gmail.com>
2312
2313         * typemanager.cs, ecore.cs, iterator.cs: TypeLookupExpression clean
2314         up.
2315
2316 2009-01-17  Marek Safar  <marek.safar@gmail.com>
2317
2318         * convert.cs, ecore.cs: Explicitly casts type arguments to pass
2319         verifier checks.
2320
2321 2009-01-16  Marek Safar  <marek.safar@gmail.com>
2322
2323         * nullable.cs (LiftedBinaryOperator): Check for all possible null
2324         expressions.
2325
2326 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2327
2328         A fix for bug #466634
2329         * statement.cs: Add reference for nested storey when only this
2330         is captured.
2331
2332 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2333
2334         A fix for bug #466474
2335         * codegen.cs: Emit SecurityPermissionAttribute when -unsafe option
2336         was specified.
2337
2338 2009-01-15  Marek Safar  <marek.safar@gmail.com>
2339
2340         * iterators.cs, anonymous.cs, expression.cs, statement.cs, ecore.cs:
2341         Fixed nested stories parent referencing process. Also fixes #463985.
2342
2343 2009-01-06  Marek Safar  <marek.safar@gmail.com>
2344
2345         * decl.cs, iterators.cs, expression.cs, statement.cs, doc.cs, 
2346         class.cs, cs-parser.jay, codegen.cs: Clean up destructor
2347         implementation. Also fixes #463108.
2348
2349 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2350
2351         A fix for bug #416109
2352         * decl.cs: Issue correct CLSAttribute warning location.
2353
2354 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2355
2356         A fix for bug #456775
2357         * attribute.cs: Use attribute owner scope when resolving attribute
2358         arguments.
2359
2360 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2361
2362         A fix for bug #457257
2363         * decl.cs: Fixed incorrect member declaring type comparison.
2364
2365 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2366
2367         A fix for bug #460896
2368         * driver.cs: Handle /RES resources as embeddable.
2369
2370 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2371
2372         A fix for bug #462515
2373         * ecore.cs: Report inacessible members upwards.
2374
2375 2009-01-05  Marek Safar  <marek.safar@gmail.com>
2376
2377         A fix for bug #463190, #463192
2378         * decl.cs, namespace.cs: Also import internal extension classes.
2379
2380 2009-01-04  Marek Safar  <marek.safar@gmail.com>
2381
2382         A fix for bug #463415
2383         * generic.cs: Use right index for RemoveDependentTypes.
2384
2385 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2386
2387         A fix for bug #463196
2388         * expression.cs: Fixed enum to null comparison.
2389
2390 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2391
2392         A fix for bug #463121
2393         * nullable.cs: Fixed nullable user equality operator comparison.
2394
2395 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2396
2397         A fix for bug #462950
2398         * class.cs, decl.cs: Use full explicit name when defining automatic
2399         property backing field.
2400
2401 2009-01-02  Marek Safar  <marek.safar@gmail.com>
2402
2403         A fix for bug #462592
2404         * pending.cs: Emit type arguments for generic proxy method.
2405
2406 2008-12-30  Marek Safar  <marek.safar@gmail.com>
2407
2408         * expression.cs (As): Mutate all type arguments.
2409
2410 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2411
2412         A fix for bug #462622
2413         * anonymous.cs: Resolve anonymous type GetHashCode in unchecked
2414         context.
2415
2416 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2417
2418         A fix for bug #450782
2419         * ecore.cs: Consider more variables of form V.I to be fixed.
2420
2421 2008-12-29  Marek Safar  <marek.safar@gmail.com>
2422
2423         A fix for bug #460712
2424         * typemanager.cs: Core types could be imported.
2425
2426 2008-12-28  Marek Safar  <marek.safar@gmail.com>
2427
2428         A fix for bugs #460847, #460772, #458049, #457339, #447807
2429         * generic.cs, parameter.cs, lambda.cs, linq.cs, anonymous.cs
2430         statement.cs, ecore.cs, class.cs, delegate.cs, flowanalysis.cs
2431         cs-parser.jay, driver.cs: LINQ implementation upgrade to deal with
2432         user lambdas used inside query clauses.
2433
2434 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2435
2436         A fix for bug #460229
2437         * cs-tokenizer.cs: Ignore wrongly placed BOM markers.
2438
2439 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2440
2441         A fix for bug #459952
2442         * decl.cs, namespace.cs: Use common CheckAccessLevel.
2443
2444 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2445
2446         A fix for bug #459630
2447         * convert.cs: Enum to valuetype conversion is not allowed.
2448
2449 2008-12-18  Marek Safar  <marek.safar@gmail.com>
2450
2451         A fix for bug #457087
2452         * generic.cs: Don't crash when constraint comes from type
2453         declaration.
2454
2455 2008-12-16  Marek Safar  <marek.safar@gmail.com>
2456
2457         A fix for bug #459221
2458         * anonymous.cs, statement.cs: Delay only captured this
2459         initialization.
2460
2461 2008-12-12  Marek Safar  <marek.safar@gmail.com>
2462
2463         A fix for bug #457489
2464         * anonymous.cs, statement.cs: Split anonymous storey instantiation
2465         and initialization to capture scope initializers correctly.
2466
2467 2008-12-11  Marek Safar  <marek.safar@gmail.com>
2468
2469         * generic.cs, parameter.cs, expression.cs, statement.cs, doc.cs:
2470         ParameterReference refactoring.
2471
2472 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2473
2474         * typemanager.cs, namespace.cs, driver.cs: Allow ExtensionAttribute
2475         to be imported from any assembly.
2476
2477 2008-12-03  Marek Safar  <marek.safar@gmail.com>
2478
2479         * parameter.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs
2480         statement.cs, class.cs, cs-parser.jay: Removed duplicate parameters
2481         from anonymous method and lambda expression.
2482
2483 2008-12-01  Marek Safar  <marek.safar@gmail.com>
2484
2485         A fix for bug #448560
2486         * expression.cs (As): Box any generic type arguments to be
2487         verifiable.
2488
2489 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2490
2491         Add tripwire for implicit conversion bugs
2492         * ecore.cs (MethodGroupExpr.Error_ArgumentCountWrong): New helper
2493         for CS1501 error.
2494         (MethodGroupExpr.OverloadResolve): Add sanity check between
2495         IsApplicable and VerifyArgumentsCompat.
2496         (VerifyArgumentsCompat): Report CS1501 where appropriate.
2497
2498 2008-11-29  Raja R Harinath  <harinath@hurrynot.org>
2499
2500         Fix build break in System.Data_test
2501         * convert.cs (ImplicitConversionExists): Move NullLiteral
2502         conversions ...
2503         (ImplicitStandardConversionExists): ... here.
2504
2505 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2506
2507         * literal.cs: Emit correctly explicit null to nullable cast.
2508
2509 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2510
2511         * ecore.cs, generics.cs: Fixed crash when type arguments fail to
2512         resolve.
2513
2514 2008-11-28  Marek Safar  <marek.safar@gmail.com>
2515
2516         A fix for bug #449005
2517         * convert.cs, nullable.cs: Use only one implicit nullable
2518         conversion.
2519
2520 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2521
2522         * convert.cs, literal.cs: More Convert cleanup is needed.
2523
2524 2008-11-27  Marek Safar  <marek.safar@gmail.com>
2525
2526         * decl.cs, class.cs: Fixed misleading error message.
2527
2528 2008-11-26  Marek Safar  <marek.safar@gmail.com>
2529
2530         A fix for bug #449005
2531         * nullable.cs (EmitEquality): Disable optimization for user operator
2532         operands.
2533
2534 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2535
2536         A fix for bug #447027
2537         * anonymous.cs (HoistedVariable): Cache also outer access to deal
2538         with context variables stored as expression instances.
2539
2540 2008-11-25  Marek Safar  <marek.safar@gmail.com>
2541
2542         A fix for bug #447027
2543         * delegate.cs: Fixed delegate VerifyMethod logic.
2544
2545 2008-11-24  Marek Safar  <marek.safar@gmail.com>
2546
2547         * ecore.cs, delegate.cs: MethodGroup expressions can be applicable
2548         but not verifiable.
2549
2550 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2551
2552         * typemanager.cs, decl.cs, anonymous.cs, class.cs, enum.cs: Rewrote
2553         member type resolve to follow normal flow, instead of random
2554         property access.
2555
2556 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2557
2558         * iterators.cs (GetEnumeratorStatement): Re-use already resolved
2559         type.
2560
2561 2008-11-21  Marek Safar  <marek.safar@gmail.com>
2562
2563         * const.cs: Emit decimal array constant as literal.
2564
2565 2008-11-20  Marek Safar  <marek.safar@gmail.com>
2566
2567         * iterators.cs, ecore.cs: Removed CurrentBlock statement.
2568
2569 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2570
2571         * eval.cs, location.cs, driver.cs (Location.SourceFiles): Turned
2572         into real property (saves 8 MB for corlib compilation).
2573
2574 2008-11-19  Marek Safar  <marek.safar@gmail.com>
2575
2576         * generic.cs, lambda.cs, linq.cs, iterators.cs, anonymous.cs,
2577         nullable.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay
2578         generic-mcs.cs: Small cleanup of TypeArguments.
2579
2580 2008-11-18  Marek Safar  <marek.safar@gmail.com>
2581
2582         * generic.cs, iterators.cs, anonymous.cs, nullable.cs, ecore.cs,
2583         expression.cs, namespace.cs, generic-mcs.cs, class.cs: Small cleanup
2584         of ConstructedType expression, renamed to GenericTypeExpr.
2585
2586 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2587
2588         A fix for bug #445303
2589         * location.cs (IsConditionalDefined): Handle undefined global
2590         defines.
2591
2592 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2593
2594         A fix for bug #444678
2595         * expression.cs (TryReduceConstant): Always create new constant
2596         instance.
2597
2598 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2599
2600         A fix for bug #444673
2601         * ecore.cs: Ignore open generic types when used as generic type
2602         instance fields.
2603
2604 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2605
2606         A fix for bug #445458
2607         * expression.cs, cs-parser.jay: Don't crash when an expression
2608         statement is null.
2609
2610 2008-11-17  Marek Safar  <marek.safar@gmail.com>
2611
2612         A fix for bug #445464
2613         * expression.cs, cs-parser.jay: Fixed typeof of non-generic type
2614         inside unbound type.
2615
2616 2008-11-14  Jb Evain  <jbevain@novell.com>
2617
2618         * driver.cs: ignore empty -nowarn argument such as
2619         the one in -nowarn:12,13,,.
2620
2621 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2622
2623         A fix for bug #444271
2624         * anonymous.cs: Rescan parent storeys when best candidate was
2625         undone.
2626
2627 2008-11-13  Marek Safar  <marek.safar@gmail.com>
2628
2629         * generic.cs, expression.cs, ecore.cs, cs-parser.jay: Removed
2630         useless UnboundTypeExpression.
2631         
2632         * attribute.cs: Do check obsolete attribute on generic types.
2633
2634 2008-11-12  Marek Safar  <marek.safar@gmail.com>
2635
2636         A fix for bugs #425680, #400139
2637         * ecore.cs, expression.cs: Trying to do some almost_matched_members
2638         refactoring.
2639
2640 2008-11-11  Marek Safar  <marek.safar@gmail.com>
2641
2642         A fix for bug #435747
2643         * assign.cs, expression.cs: Cleanup New assignment to emit correcly
2644         compound value types assignment. Few micro optimizations added.
2645
2646 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2647
2648         A fix for bug #442610
2649         * anonymous.cs (MutateConstructor): More SRE hacking.
2650
2651 2008-11-10  Marek Safar  <marek.safar@gmail.com>
2652
2653         A fix for bug #442579
2654         * ecore.cs: Also initialize expanded form of a method with 1 params
2655         parameter.
2656
2657 2008-11-06  Marek Safar  <marek.safar@gmail.com>
2658
2659         * expression.cs (UnaryMutator): Do early l-side check.
2660
2661 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2662
2663         * codegen.cs (InitDynamic): also setup Assembly.Name like we do in
2664         Init, otherwise we would crash later on when checking for friend
2665         assemblies. 
2666
2667         * eval.cs: Do not hide errors from invalid calls to LoadAssembly.
2668         Otherwise we never get any meaningful information as to what
2669         failed. 
2670
2671 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2672
2673         A fix for bug #436318
2674         * driver.cs, report.cs: Add -warnaserror:Wn to command line options.
2675
2676 2008-11-05  Miguel de Icaza  <miguel@novell.com>
2677
2678         * namespace.cs: Turns out that it was a really bad idea to hide
2679         the errors for namespaces not found here in eval mode.    
2680
2681         * eval.cs: When we process using clauses, only enter those into
2682         the list of valid using clauses after they have been validated.   
2683
2684         The above change gives the proper semantics: it does not
2685         senselessly report the same errors with broken using statements by
2686         never storing them in the first place when they are invalid.
2687
2688 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2689
2690         A fix for bug #421839
2691         * cs-parser.jay: Remove expression from coalesce rule to force lower
2692         priority than the assignment operator.
2693
2694 2008-11-05  Marek Safar  <marek.safar@gmail.com>
2695
2696         A fix for bug #437875
2697         * nullable.cs: Compile correctly method group operand used with null
2698         coalescing operator.
2699
2700 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2701
2702         A fix for bug #434589
2703         * expression.cs (Binary): Ignore lifted conversions when at least
2704         one operand is of reference type.
2705
2706 2008-11-04  Marek Safar  <marek.safar@gmail.com>
2707
2708         * cs-parser.jay: Better syntax error report.
2709
2710 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2711
2712         A fix for bug #436792
2713         * cs-parser.jay: Use GetLocation to access location.
2714
2715 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2716
2717         A fix for bug #440774
2718         * cs-parser.jay: Also set current_array_type when parsing local
2719         variables types.
2720
2721 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2722
2723         A fix for bug #440785
2724         * expression.cs (As): Don't resolve self modifing expression
2725         multiple times.
2726
2727 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2728
2729         A fix for bug #439447
2730         * cs-tokenizer.cs: Tokenize surrogates only where allowed.
2731
2732 2008-11-03  Marek Safar  <marek.safar@gmail.com>
2733
2734         A fix for bug #437571
2735         * cs-parser.jay: Fixes internal error for invalid expression
2736         statements.
2737
2738 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2739
2740         * ecore.cs: Resolve correctly ambiguous params delegate methods.
2741
2742 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2743
2744         * generic.cs, anonymous.cs: Simplified GetDeclarations.
2745
2746 2008-10-17  Marek Safar  <marek.safar@gmail.com>
2747
2748         * cs-tokenizer.cs: More precise cast parsing.
2749
2750 2008-10-16  Martin Baulig  <martin@ximian.com>
2751
2752         * anonymous.cs (AnonymousMethodStorey): Put back the
2753         `hoisted_locals' hashtable and use it in EmitType().
2754
2755 2008-10-15  Marek Safar  <marek.safar@gmail.com>
2756
2757         * cs-tokenizer.cs, nullable.cs, expression.cs, statement.cs,
2758         cs-parser.jay: Tokenizer optimizations and memory reduction, saves
2759         ~5MB for corlib.
2760
2761 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2762
2763         * cs-tokenizer.cs: Add bool type to the list of valid cast tokens.
2764
2765 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2766
2767         * statement.cs: Mutate scope initializers.
2768
2769 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2770
2771         * expression.cs: Use typeless value for This constant.
2772         
2773         * ecore.cs: Access FieldInfo via GetConstructedFieldInfo.
2774
2775 2008-10-14  Marek Safar  <marek.safar@gmail.com>
2776
2777         * cs-tokenizer.cs, cs-parser.jay: Unify context sensite keyword
2778         tokenizer.
2779
2780 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2781
2782         * cs-tokenizer.cs: Add missing alias qualifier and dotted generic
2783         type to type cast.
2784
2785 2008-10-13  Marek Safar  <marek.safar@gmail.com>
2786
2787         * cs-tokenizer.cs, expression.cs, cs-parser.jay: Reworked parens
2788         parser and tokenizer. Fixes many ambiguities including #433258.
2789
2790 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2791
2792         * cs-parser.jay: Fixed missing accessor recovery.
2793
2794 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2795
2796         A fix for bug #433701
2797         * expression.cs: Better error message.
2798
2799 2008-10-10  Marek Safar  <marek.safar@gmail.com>
2800
2801         * cs-parser.jay, expression.cs: Start reporting real parser errors.
2802         
2803         * Makefile: Disabled unused debug symbols.
2804
2805         Also fixes: #320556, #321097, #321656, #321876, #351316
2806
2807 2008-10-09  Miguel de Icaza  <miguel@novell.com>
2808
2809         * eval.cs: rename "<interactive>" to "{interactive}", to work
2810         around a requirement in the compiler that this be a valid
2811         filename, and in Windows it is not (433886).
2812
2813 2008-10-09  Marek Safar  <marek.safar@gmail.com>
2814
2815         * cs-tokenizer.cs, cs-parser.jay: Fixed more subtle parser problems
2816
2817 2008-10-08  Marek Safar  <marek.safar@gmail.com>
2818
2819         * cs-tokenizer.cs, eval.cs, anonymous.cs, statement.cs, class.cs
2820         cs-parser.jay: Generic type declaration and type arguments cleanup.
2821
2822 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2823
2824         * cs-parser.jay: Allow parsing weird array creation construct.
2825
2826 2008-10-05  Marek Safar  <marek.safar@gmail.com>
2827
2828         * cs-parser.jay: Conflicts reduction.
2829
2830 2008-10-04  Marek Safar  <marek.safar@gmail.com>
2831
2832         * cs-parser.jay: Conflicts reduction.
2833
2834 2008-10-04  Raja R Harinath  <harinath@hurrynot.org>
2835
2836         Fix #398325
2837         * flowanalysis.cs (MyBitvector.MakeShared): Rename from 'Shared'
2838         property.  Add a 'count' hint about the use of the shared vector.
2839         Ensure that we don't leak out dirty bits.
2840         (UsageVector.MergeChild): Throw away information about variables
2841         in child vectors.
2842         Based on patch and analysis by Moritz Kroll <Moritz.Kroll@gmx.de>.
2843
2844 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2845
2846         A fix for bug #431746
2847         * iterators.cs, anonymous.cs: Re-initialize hoisted iterator
2848         parameters when iterator is created.
2849
2850 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2851
2852         A fix for bug #431827
2853         * expression.cs: Fixed right based pointer arithmetic operations
2854         emit.
2855
2856 2008-10-03  Marek Safar  <marek.safar@gmail.com>
2857
2858         A fix for bug #353779
2859         * assign.cs, expression.cs: Fixed compound assignment conversions.
2860
2861 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2862
2863         A fix for bug #375262
2864         * statement.cs: Refactor ArrayForeach to be usable with string
2865         indexer. Optimized single dimentional arrays foreach.
2866
2867 2008-10-02  Marek Safar  <marek.safar@gmail.com>
2868
2869         A fix for bug #431255
2870         * anonymous.cs, expression.cs: Removed broken optimization.
2871
2872 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2873
2874         * anonymous.cs: Use full type parameters of parent generic
2875         containers. Removed unnecessary AddParentStoreyReference call.
2876
2877 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2878
2879         A fix for bug #324702
2880         * class.cs: Use better shorter names for explicit interface member
2881         implementations.
2882
2883         * ecore.cs, typemanager.cs: Convert only mscorlib predefined names.
2884
2885 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2886         
2887         * expression.cs: Use new interface to check fixed expression.
2888
2889 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2890
2891         A fix for bug #421101
2892         * expression.cs, statement.cs, ecore.cs: Use IFixedExpression
2893         interface to check for fixed fixed-buffers.
2894
2895 2008-10-01  Marek Safar  <marek.safar@gmail.com>
2896
2897         A fix for bug #429264
2898         * assign.cs, anonymous.cs, ecore.cs: More type mutators added.
2899         
2900         * delegate.cs: Removed unnecessary casts.
2901
2902 2008-09-30  Marek Safar  <marek.safar@gmail.com>
2903
2904         A fix for bug #352151
2905         * decl.cs, iterators.cs, anonymous.cs, report.cs, namespace.cs,
2906         class.cs: Fixed already defined explicit interface members check.
2907
2908 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
2909
2910         cs-tokenizer.cs: Fix typo.
2911
2912 2008-09-28  Miguel de Icaza  <miguel@novell.com>
2913
2914         * eval.cs (InteractiveBase): The quit command now just sets a
2915         flag, instead of calling Environment.Exit(), it is milder on
2916         embedded hosts. 
2917
2918         CompiledMethod is now in Mono.CSharp, not nested inside
2919         the Evaluator, it was inconvenient to use.
2920
2921 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2922
2923         * eval.cs (Evaluator): Introduce Compile method, to allow compiled
2924         code to be invoked without having to reparse.
2925
2926 2008-09-27  Miguel de Icaza  <miguel@novell.com>
2927
2928         * ecore.cs: The recent changes to FieldExpr broke this as well.
2929         Fixes LINQ queries in the interactive shell.
2930
2931         * Multiple files: indentation fixing for the Mono coding
2932         guidelines for the switch statement.
2933
2934         * eval.cs: Make the Evaluator API thread safe.
2935
2936 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2937
2938         * anonymous.cs, statement.cs, class.cs, cs-parser.jay: Simplified
2939         constructor parsing.
2940
2941 2008-09-26  Marek Safar  <marek.safar@gmail.com>
2942
2943         A fix for bug #325326
2944         * statement.cs: Check possible mistaken empty statement using
2945         explicit blocks only.
2946
2947 2008-09-25  Miguel de Icaza  <miguel@novell.com>
2948
2949         * eval.cs (LoadAssembly, ReferenceAssembly): Call
2950         RootNamespace.ComputeNamespaces to update the internal list of
2951         namespaces, this is no longer done for us.
2952
2953         (InteractiveBase): Use the Evaluator APIs instead of calling into
2954         Driver directly
2955
2956 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2957
2958         A fix for bug #429264
2959         * expression.cs: Missing mutator for access to multidimensional
2960         arrays.
2961
2962 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2963
2964         * class.cs, statement: Emit DebuggerHidden attribute for iterator
2965         entry wrapper.
2966         
2967         * driver.cs: Missing input argument check.
2968
2969 2008-09-25  Marek Safar  <marek.safar@gmail.com>
2970
2971         * typemanager.cs, generic.cs, eval.cs, decl.cs, anonymous.cs,
2972         expression.cs, statement.cs, rootcontext.cs, class.cs, 
2973         cs-parser.jay, driver.cs, generic-mcs.cs, enum.cs: Removed obsolete
2974         DefineMembers.
2975
2976 2008-09-24  Miguel de Icaza  <miguel@novell.com>
2977
2978         * ecore.cs (FieldExpr): Only initialize eclass when we return a
2979         fully constructed FieldExpr, fixes the regression introduced in
2980         the last commit.
2981         
2982         * ecore.cs, expression.cs: Plug back the eclass initialization as
2983         otherwise it regresses `csharp'. 
2984
2985 2008-09-24  Marek Safar  <marek.safar@gmail.com>
2986
2987         * typemanager.cs, decl.cs, convert.cs, assign.cs, expression.cs,
2988         ecore.cs, attribute.cs: Moved obsolete method checks from emit
2989         phase to resolve phase. It resolves problems with expression trees
2990         and fixes bugs #323796, #325156.
2991
2992 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2993
2994         * codegen.cs: Report better error when symbol writer is missing.
2995
2996 2008-09-23  Marek Safar  <marek.safar@gmail.com>
2997
2998         * codegen.cs: Set .NET symbol writer.
2999         
3000         * decl.cs: Guard against null generic arguments.
3001         
3002         * report.cs: Don't report exactly same additional details.
3003
3004 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3005
3006         A fix for bug #324917
3007         * cs-parser.jay: Add missing multidimensional non-expression type
3008         ranks.
3009         
3010 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3011
3012         A fix for bug #428191
3013         * anonymous.cs: Create an outer generic fields also for non-storey
3014         anonymous methods.
3015
3016 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3017
3018         A fix for bug #378294
3019         * class.cs: Make fixed size buffers gmcs feature only.
3020
3021 2008-09-22  Marek Safar  <marek.safar@gmail.com>
3022
3023         A fix for bug #355622, #324993
3024         * assign.cs, const.cs, class.cs: Create new EmitContext for each
3025         field initializer.
3026
3027 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3028
3029         * nullable.cs, expression.cs, namespace.cs, delegate.cs: Duplicate
3030         error reporting.
3031
3032 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3033
3034         A fix for bug #416110
3035         * generic.cs: Struct constraint results in default ctor and
3036         ValueType base type constraint to be set.
3037
3038 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3039
3040         A fix for bug #423791
3041         * generic.cs: Fixed params output type type-inference.
3042
3043 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3044
3045         * cs-parser.jay, expression.cs: Fixed few expression crashes.
3046         
3047 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3048
3049         * cs-tokenizer.cs: Don't break on extra partial modifier.
3050
3051 2008-09-19  Marek Safar  <marek.safar@gmail.com>
3052
3053         A fix for bug #427592
3054         * generic.cs: Use common parameter resolve method.
3055
3056 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3057
3058         A fix for bug #414758
3059         * expression.cs, ecore.cs: Fixed crash when accessing non-static
3060         property.
3061
3062 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3063
3064         * driver.cs, namespace.cs: Read types and namespaces after all
3065         requested assemblies are loaded, fixes issues with System.Core
3066         auto-reference, and #419888.
3067
3068 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3069
3070         A fix for bug #417705
3071         * cs-parser.jay: Fixed as/is operator expression split.
3072
3073 2008-09-18  Marek Safar  <marek.safar@gmail.com>
3074
3075         * const.cs, expression.cs, statement.cs, ecore.cs, cs-parser.jay:
3076         Fixed expression tree representation of empty new expression and
3077         new initializer expression.
3078
3079 2008-09-18  Miguel de Icaza  <miguel@novell.com>
3080
3081         * eval.cs: Remove warning, keep reference to driver around.
3082
3083         * Hide fields that do not need to be public.
3084
3085 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3086
3087         A fix for bug #426385
3088         * expression.cs (ImplicitlyTypedArrayCreation): Use full implicit
3089         conversion for array elements.
3090
3091 2008-09-17  Marek Safar  <marek.safar@gmail.com>
3092
3093         * expression.cs, statement.cs, class.cs, cs-parser.jay: Fixed
3094         void parsing conflicts.
3095
3096 2008-09-15  Marek Safar  <marek.safar@gmail.com>
3097
3098         A fix for bug #425601
3099         * driver.cs, typemanager.cs, namespace.cs: Automatically reference
3100         System.Core only when there is no custom ExtensionAttribute
3101         implementation.
3102
3103 2008-09-15  Miguel de Icaza  <miguel@novell.com>
3104
3105         * namespace.cs: Do not report CS0246 (name
3106
3107 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3108
3109         A fix for bug #425669
3110         * generic.cs: Don't cache generic static anonymous method 
3111         containers.
3112
3113 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3114
3115         * generic.cs, class.cs, delegate.cs: Check recursive inherited
3116         conflicting constraints.
3117
3118 2008-09-12  Raja R Harinath  <harinath@hurrynot.org>
3119
3120         * cs-tokenizer.cs (consume_identifier): Allow partial methods in
3121         mcs too.
3122
3123 2008-09-12  Marek Safar  <marek.safar@gmail.com>
3124
3125         * literal.cs, convert.cs, expression.cs, statement.cs: More null
3126         to null pointer conversion fixes.
3127
3128 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3129
3130         * cs-parser.jay, expression.cs: An implicitly typed local variable
3131         declarator cannot use an array initializer.
3132
3133 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3134
3135         * cs-parser.jay: Reduced number of printed tokens, add sorting.
3136
3137 2008-09-11  Marek Safar  <marek.safar@gmail.com>
3138
3139         * generic.cs (InflatedConstraints): Don't crash when constraints
3140         are different.
3141         
3142         * cs-parser.jay: const_declarator is a block.
3143
3144         * constant.cs: Check for not allowed NaN conversions.
3145
3146 2008-09-10  Miguel de Icaza  <miguel@novell.com>
3147
3148         * driver.cs: Drop --shell argument, the compiler is no longer a
3149         REPL. 
3150
3151         * eval.cs: Move most of the code that deals with evaluation into
3152         this file and document the public API from repl.cs
3153
3154         * repl.cs: Remove from here.
3155         
3156 2008-09-10  Marek Safar  <marek.safar@gmail.com>
3157
3158         A fix for bug #424684
3159         * generic.cs: Generic class constraints must come first.
3160
3161 2008-09-09  Miguel de Icaza  <miguel@novell.com>
3162
3163         * cs-parser.jay: Improve error reporting for syntax errors in
3164         statements and expressions, we now report the expected tokens
3165         instead of reporting the useless "; expected".
3166
3167         Drop the strings from the token declaration, it turns out that
3168         they did not do what I thought they did.  Instead they were adding
3169         two sets of tokens to the tables.
3170
3171 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3172
3173         * typemanager.cs, generic.cs, parameter.cs, expression.cs, class.cs,
3174         delegate.cs: Share special type check.
3175
3176 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3177
3178         A fix for bug #423981
3179         * expression.cs (EmitBranchable): Correctly emit inverted float conditions.
3180
3181 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3182
3183         * ecore.cs (ReducedConstantExpression): Implemented ConvertExplicitly and
3184         ConvertImplicitly.
3185
3186 2008-09-09  Marek Safar  <marek.safar@gmail.com>
3187
3188         A fix for bugs: #324750, #335946
3189         * cs-tokenizer.cs, cs-parser.jay, expression.cs: Use a custom 
3190         lookup rule to determine ?-based tokens.
3191
3192 2008-09-08  Miguel de Icaza  <miguel@novell.com>
3193
3194         * repl.cs (OptionalAssign.EmitStatement): It is possible that some
3195         expressions (like event adding or removing) end up here, so we
3196         need to treat those as statements.
3197
3198         Add LoadAssembly method.
3199
3200 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3201
3202         * repl.cs: Add Time method.
3203
3204 2008-09-05  Marek Safar  <marek.safar@gmail.com>
3205
3206         * cs-tokenizer.cs: Fixed swaped UTF-16 surrogates parsing.
3207
3208 2008-09-05  Miguel de Icaza  <miguel@novell.com>
3209
3210         * repl.cs: Add workaround for old compilers.
3211
3212 2008-09-04  Jb Evain  <jbevain@novell.com>
3213
3214         * repl.cs (PrettyPrint): pretty print everything that
3215         implements IDictionary, as well as IEnumerables. Also,
3216         add a quit helper property.
3217
3218 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3219
3220         * constant.cs: Better error reporting for decimal literals.
3221         
3222         * class.cs, attribute.cs, typemanager.cs: Emit more fixed buffer
3223         field attributes.
3224         
3225 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3226                         Miguel de Icaza  <miguel@novell.com>
3227
3228         A fix for bug #422951
3229         * assign.cs (Assign.DoResolve): Perform the type conversions
3230         checks before we attempt to initialize `New' initializers. 
3231
3232 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3233
3234         A fix for bug #422853
3235         * delegate.cs (DelegateCreation): Add special handling for
3236         EmptyExpression.Null instance expression which is just another
3237         hack for undecided member instance exression.
3238
3239 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3240
3241         * expression.cs, ecore.cs: Emit full expression tree for reduced
3242         binary expressions.
3243
3244 2008-09-04  Marek Safar  <marek.safar@gmail.com>
3245
3246         * expression.cs (This): Guard against multi-resolving.
3247         
3248         * ecore.cs, statement.cs (Throw): Simplified.
3249         
3250         * flowanalysis.cs: Also verify event fields.
3251
3252 2008-09-04  Miguel de Icaza  <miguel@novell.com>
3253
3254         * assign.cs (Assign.DoResolve): Perform the type conversions
3255         checks before we attempt to initialize `New' initializers. 
3256
3257         * repl.cs (PrettyPrint): Add Hashtable prettyprint
3258
3259         * anonymous.cs (AnonymousTypeClass): On EvalMode make the class
3260         public. 
3261
3262         * repl.cs: Update help.
3263
3264 2008-09-03  Miguel de Icaza  <miguel@novell.com>
3265
3266         * driver.cs (ProcessDefaultConfig): Now it encapsulates all the
3267         handling of the default config handling, including the special
3268         treatment of System.Core assembly. 
3269
3270         Fixes the REPL processing for LINQ.
3271
3272 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3273
3274         A fix for bug #422507
3275         * expression.cs (UnboxCast): Add missing child expression mutator.
3276
3277 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3278
3279         * driver.cs: Don't self reference System.Core assembly.
3280
3281 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3282
3283         A fix for bug #422507
3284         * expression.cs (StringConcat): Add missing type mutator.
3285
3286 2008-09-03  Marek Safar  <marek.safar@gmail.com>
3287
3288         * generic.cs (TypeInferenceContext): Follow equality rule for
3289         constructed type lower bound type inference.
3290
3291 2008-09-02  Miguel de Icaza  <miguel@novell.com>
3292
3293         * getline.cs (CmdRefresh): Apply patch from Douglas S. Blank
3294         <dblank@cs.brynmawr.edu> which updates the cursor position on
3295         refresh.
3296         
3297 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3298
3299         A fix for bug #367145
3300         * driver.cs: Fixed import of extension methods when using -noconfig
3301         option.
3302
3303 2008-09-02  Marek Safar  <marek.safar@gmail.com>
3304
3305         * iterator.cs: Don't emit GetEnumerator method twice but call a generic
3306         version from non-generic implementation instead.
3307
3308 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3309
3310         A fix for bug #418908
3311         * class.cs: Use AddScopeStatement for field initializers.
3312
3313 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3314
3315         A fix for bug #415385
3316         * ecore.cs, convert.cs: Do method group conversion for equal group types.
3317
3318 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3319
3320         A fix for bug #421736
3321         * iterators.cs: Don't crash on unreachable iterators.
3322
3323 2008-09-01  Marek Safar  <marek.safar@gmail.com>
3324
3325         A fix for bug #421628
3326         * parameter.cs, attribute.cs: Clone also parameter attributes.
3327
3328 2008-08-30  Miguel de Icaza  <miguel@novell.com>
3329
3330         * namespace.cs (LookupType): In EvalMode, try to replace
3331         the TypeBuilder from our cache with a Type as Reflection.Emit does
3332         not  like to mix code from older assemblies emitted and new
3333         assemblies emitted. 
3334
3335         This sounds like a serious Mono bug that prevents multiple
3336         assemblies to be generated and consumed at the same time.
3337
3338         * cs-parser.jay (push_current_class): Do not make interactive
3339         classes internal or private, make them public as we currently
3340         generate each new class in a new assembly.   
3341
3342 2008-08-29  Miguel de Icaza  <miguel@novell.com>
3343
3344         * decl.cs, roottypes.cs, class.cs:: Add an infrastructure to
3345         remove types that are entered into the global namespace during
3346         parsing so that we can remove them on failure.
3347  
3348         * cs-parser.jay: Parsing: we now keep track of types that are
3349         entered into global variables and queue those in case the parsing
3350         or resolution fail.
3351  
3352         This happens in a few situations: during partial-input, we invoke
3353         the parser repeatedly for example with the string "class X", this
3354         would cause X to be registed, and we need to remove this
3355         registration so that another parse attempt later with say "class X {"
3356         would actually work.
3357  
3358         Additionally, if there is an error in the resolution phase, for
3359         example: "class X : NonExistant {}" th
3360         
3361         * cs-parser.jay: Be more precise with the errors being raised,
3362         instead of flagging all exceptions during parsing to be attributed
3363         to the parsing process, distinguish those from errors happening in
3364         the actions and hint that using -v would produce the actual
3365         exception. 
3366
3367         * repl.cs: Do not load all compiler references on each reset,
3368         doing the partial reset takes care of this.
3369         
3370 2008-08-28  Miguel de Icaza  <miguel@novell.com>
3371
3372         * repl.cs: Add support for loading all the files from
3373         ~/.config/csharp/*cs as startup scripts and ~/.config/csharp/*.dll
3374         as shell libraries.
3375
3376         Introduce a micro-parser that is able to deambiguate on its input
3377         whether we are dealing with a compilation unit (namespace, class,
3378         interface, struct, delegate) declaration or a statement.   This
3379         allows both declarations and statements to be entered. 
3380
3381         Set history size by default to 300 lines.
3382
3383         Instead of distinguishing based on the parser.InteractiveResult,
3384         have only two cases: statements were parsed, or a compilation unit
3385         was.   Always pull the Using statement additions from the
3386         compilation unit parse.
3387         
3388         * cs-tokenizer.cs: Rename tokens to better describe their intent
3389         (EvalStatementParserCharacter and EvalCompilationUnitParserCharacter).
3390         
3391         * rootcontext.cs: Split EvalMode into EvalMode and StatementMode.
3392         EvalMode is used to trigger the lookup of global variables while
3393         StatementMode is used turn variable declarations into static
3394         fields.
3395
3396         * getline.cs: Allow history size to be set.
3397         
3398 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3399
3400         A fix for bug #360755
3401         * ecore.cs (SimpleName): Exclude indexers from simple name resolve.
3402
3403 2008-08-29  Marek Safar  <marek.safar@gmail.com>
3404
3405         * generic.cs, iterators.cs, codegen.cs: Removed unused variable.
3406         
3407         * typemanager.cs, statement.cs, ecore.cs, enum.cs: Don't reconstruct enum
3408         member name, it is too confusing
3409         
3410         * decl.cs, class.cs: Don't report unused fields with attached attribute.
3411         
3412         * rootcontext.cs: Finally default to warning level 4.
3413
3414 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3415
3416         * class.cs (CheckBase): Ignore overloaded operators.
3417
3418 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3419
3420         A fix for bug #420830
3421         * expression.cs, cs-parser.jay: Put back InvocationOrCast expression.
3422
3423 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3424
3425         A fix for bug #420832
3426         * anonymous.cs, iterators.cs: Also clone hoisted this iterator variable.
3427
3428 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3429
3430         A fix for bug #420386
3431         * nullables.cs: Fixed logic of nullable user comparison operators involving
3432         null values.
3433
3434 2008-08-28  Marek Safar  <marek.safar@gmail.com>
3435         
3436         * attribute (IsClsCompliant): Use FALSE value for pointer types.
3437
3438 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3439
3440         * repl.cs: Add support for aborting the running code with C-c. 
3441
3442 2008-08-27  Raja R Harinath  <harinath@hurrynot.org>
3443
3444         * cs-parser.jay (CS1002): Dump 'yyToken' with Report.ExtraInformation.
3445
3446 2008-08-27  Miguel de Icaza  <miguel@novell.com>
3447
3448         * cs-parser.jay (interactive_statement_list): A new set of rules
3449         for hosting statements that uses the "interactive_" prefix.   
3450
3451         * repl.cs: Add support for parsing `using' as a statement or as a
3452         directive.  Deambiguating before passing this to the parser.
3453
3454         We need to distinguish statement_expressions that occur at the
3455         toplevel vs those that occur embedded into expressions.
3456
3457         * getline.cs: Applied patch from Stuart Carnie <stuart.carnie@gmail.com> 
3458         that fixes the cursor key handling, and a history bug.
3459         
3460 2008-08-26  Miguel de Icaza  <miguel@novell.com>
3461
3462         * Makefile: Drop BOOTSTRAP_COMPILER as that was masking the
3463         limitations in Console, instead the 2.0 bootstrap libraries now
3464         include the Console bits.
3465
3466         Also, remove the use of Nullables from getline.cs
3467
3468         ------------
3469         
3470         Interactive support for the C# compiler.   Use gmcs --shell to
3471         enter a read-eval-print loop shell.
3472
3473         Docs: http://www.mono-project.com/CsharpRepl
3474         
3475         * sources: include repl.cs here and getline.cs for gmcs.exe,
3476         everything else is getline.cs impaired.
3477
3478         * Makefile: when bootstrapping pass a special flag
3479         BOOTSTRAP_COMPILER which we use to prevent failures in compilation
3480         as we use NET_2_0 define to pull 2.0 APIs from System.Console.
3481         This distinguishes those two cases.
3482
3483         * repl.cs: Support for a read-eval-print loop.   Will be soon
3484         refactored into eval support and then REPL on top of it.
3485
3486         * ecore.cs: If a simplename lookup fails, before erroring out,
3487         if we are in EvalMode to resolve the name to a declaration in the
3488         Eval-land.    
3489
3490         This means that variable declarations that happened in previous
3491         classes (as repl puts every statement in a separate class) are
3492         made visible in this way.
3493
3494         * cs-parser.jay: UnexpectedEOF, a new flag that is set if we
3495         triggered an error due to the end of file being reached.   This is
3496         used to do multi-line input, and notify the caller that the user
3497         needs to provide more text before a successful parse.
3498
3499         Add new grammar rules after the INTERACTIVE_PARSER token is seen
3500         to drive the evaluation with a custom wrapper. 
3501
3502         * driver.cs: Add support for --shell, and refactor some code to be
3503         reused from repl.cs
3504         
3505         * namespace.cs: Add support for serializing the contents of the
3506         namespaces and reloading them.  
3507
3508         * getline.cs: A managed implementation of ReadLine under
3509         X11/Apache2 license terms.  Easy to embed in other applications as
3510         well.
3511
3512         * namespace.cs: Add some functions to save and restore the
3513         namespace state.
3514
3515         * rootcontext.cs: New public field.
3516
3517         * cs-tokenizer.cs: Add support for one of the possible characters
3518         we introduce into the token stream.  
3519
3520         This patch does not affect the regular tokenization process, the
3521         only performance hit would happen if there is an invalid character
3522         on the input string.
3523
3524         * support.cs: Move isatty helper routine here.
3525
3526         * codegen.cs: Small cleanup, and add a mechanism to initialize the
3527         code generator for in-memory assemblies.
3528
3529 2008-08-26  Marek Safar  <marek.safar@gmail.com>
3530
3531         * generic.cs, ecore.cs, delegate.cs, cs-parser.jay, expression.cs: A type
3532         parameter cannot be always used as a type.
3533
3534 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3535
3536         * convert.cs, expression.cs: Use single ExplicitReferenceConversion routine.
3537
3538 2008-08-21  Marek Safar  <marek.safar@gmail.com>
3539
3540         * convert.cs: Implement explicit array to IList<T> conversion.
3541
3542 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3543
3544         A fix for bug #362740
3545         * cs-tokenizer.cs: Handle UTF-16 surrogates.
3546
3547 2008-08-20  Marek Safar  <marek.safar@gmail.com>
3548         
3549         * generic.cs, support.cs, typemanager.cs, lambda.cs, parameter.cs,
3550         pending.cs, ecore.cs, linq.cs, class.cs, decl.cs, delegate.cs,
3551         flowanalysis.cs, iterators.cs, cs-parser.jay, convert.cs, anonymous.cs,
3552         expression.cs, attribute.cs, statement.cs, doc.cs: Refactored parameters
3553         handling to use just one type of infrastructure and deal with generics
3554         more effectivelly.
3555
3556 2008-07-23  Martin Baulig  <martin@ximian.com>
3557
3558         *** Merged this from trunk revision 108527 ***
3559
3560         * statement.cs
3561         (ExplicitBlock.EmitSymbolInfo): Moved to `ToplevelBlock'.
3562         (ToplevelBlock.EmitSymbolInfo): Tell the symbol writer about the
3563         scope variable.
3564
3565 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3566         
3567         * ecore.cs, linq.cs, const.cs, expression.cs, statement.cs: More robust
3568         error checks.
3569
3570 2008-08-15  Marek Safar  <marek.safar@gmail.com>
3571         
3572         * delegate.cs: Fixed compiler crash when creating delegate using partial
3573         method.
3574         
3575         * typemanager.cs: MulticastDelegate is not a delegate.
3576
3577 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3578         
3579         * expression.cs, ecore.cs, anonymous.cs, class.cs: Fixed missing error
3580         checks.
3581
3582 2008-08-14  Raja R Harinath  <harinath@hurrynot.org>
3583
3584         * cs-parser.jay (type): Allow 'var' in mcs too.
3585         (local_variable_type): Likewise.
3586
3587 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3588         
3589         * driver.cs: Removed broken -noconfig variants.
3590
3591 2008-08-14  Marek Safar  <marek.safar@gmail.com>
3592         
3593         A fix for bug #417078
3594         * expression.cs: Emit correctly left side pointer operators.
3595
3596 2008-08-13  Marek Safar  <marek.safar@gmail.com>
3597
3598         * generic.cs, lambda.cs: Inflate method generic arguments only.
3599
3600 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3601
3602         * class.cs: Fixed struct layout check regression.
3603
3604 2008-08-12  Marek Safar  <marek.safar@gmail.com>
3605
3606         * cs-parser.jay, enum.cs: Simplified enum parsing.
3607         
3608         * decl.cs: Check all type parameters conflicts.
3609         
3610         * expression.cs, statement.cs, attribute.cs: More expression checks.
3611
3612 2008-08-11  Marek Safar  <marek.safar@gmail.com>
3613
3614         * generic.cs: Add type inference types restriction.
3615         
3616         * parameter.cs, class.cs, delegate.cs, iterators.cs, cs-parser.jay,
3617         anonymous.cs, expression.cs: Allocate less accessor parameters.
3618
3619 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3620
3621         * typemanager.cs, ecore.cs: Ambiguous operators can come from different
3622         classes.
3623
3624 2008-08-08  Marek Safar  <marek.safar@gmail.com>
3625
3626         * convert.cs, delegate.cs: Fixed delegate compatibility conversion. 
3627
3628 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3629
3630         * class.cs, decl.cs, iterator.cs, ecore.cs: Refactor base type resolving.
3631         Also fixes #362146 and #381592.
3632
3633 2008-08-07  Marek Safar  <marek.safar@gmail.com>
3634
3635         * ecore.cs: Reduced constant cannot be used as an attribute value.
3636         
3637         * cs-parser.jay: Base expression has to be a type.
3638         
3639         * expression.cs (Conditional): Uses ReducedExpression.
3640
3641 2008-08-06  Marek Safar  <marek.safar@gmail.com>
3642
3643         A fix for bug #376826
3644         * parameter.cs, ecore.cs, anonymous.cs, expression.cs, statement.cs: An
3645         address of hoisted local variable or parameter cannot be taken.
3646
3647 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3648
3649         * ecore.cs, constant.cs, expression.cs, statement.cs: Resolve correctly 
3650         anonymous method inside checked/unchecked expression.
3651
3652 2008-08-05  Marek Safar  <marek.safar@gmail.com>
3653
3654         * typemanager.cs (IsEqual): Guard against null.
3655         
3656         * ecore.cs, class.cs, convert.cs, const.cs, constant.cs, expression.cs,
3657         attribute.cs, enum.cs, statement.cs: Pass EmitContext to constant conversion
3658         routine. Fixed few misleading conversion errors.
3659
3660 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3661
3662         * class.cs: Consider generics when checking cycles in struct layout.
3663
3664 2008-08-04  Raja R Harinath  <harinath@hurrynot.org>
3665
3666         * cs-tokenizer.cs (get_cmd_arg): Simplify.  Don't be too pedantic.
3667
3668 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3669
3670         A fix for bug #414165
3671         * anonymous.cs: Use same anonymous implementation method for all anonymous
3672         method emits.
3673
3674 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3675
3676         * generic.cs, anonymous.cs, statement.cs: Emit inherited anonymous method
3677         constraints.
3678
3679 2008-08-04  Marek Safar  <marek.safar@gmail.com>
3680
3681         * cs-parser.jay: Typeof argument has to be a type expression.
3682         
3683         * namespace.cs: Check alias and namespace definitions collisions.
3684         
3685         * class.cs, pending.cs: Moved explicit interface accessor implementation
3686         check.
3687         
3688         * delegate.cs, expression.cs: Verify special name invocations.
3689         
3690 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3691
3692         * cs-parser.jay: Don't choke on empty generic type arguments.
3693         
3694         * cs-tokenizer.cs: Handle escaped preprocessor directives.
3695         
3696         * expression.cs, ecore.cs: Minor expressions bugs.
3697
3698 2008-08-01  Marek Safar  <marek.safar@gmail.com>
3699
3700         * cs-parser.jay: Removed duplicate interface declaration (fixes 2 conflicts)
3701         and added more error handling.
3702         
3703         * class.cs, iterators.cs, anonymous.cs: Removed useless interface parameter.
3704         
3705         *  modifiers.cs, enum.cs: Fixed.
3706
3707 2008-07-31  Jb Evain  <jbevain@novell.com>
3708
3709         * driver.cs: remove -pkg ability of smcs.
3710
3711 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3712
3713         * statement.cs (Switch): Correctly set empty default target for single
3714         blocks.
3715
3716 2008-07-30  Marek Safar  <marek.safar@gmail.com>
3717
3718         * typemanager.cs, assign.cs, driver.cs, expression.cs, statement.cs: Rewrote
3719         string switch statement implementation to use string dictionary which
3720         significantly (2-8x) improves performance of generated code.
3721
3722 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3723
3724         A fix for bug #412880 by Atsushi Enomoto <atsushi@ximian.com>
3725         * modifiers.cs (GetDescription): Fixed FamANDAssem case.
3726         
3727 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3728
3729         A fix for bug #412595
3730         * typemanager.cs, convert.cs, expression.cs: Some types are never
3731         convertible to each other.
3732
3733 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3734
3735         * nullable.cs (CreateNullConstant): An error messages update.
3736
3737 2008-07-29  Marek Safar  <marek.safar@gmail.com>
3738
3739         A fix for bug #412595
3740         * cfold.cs: Don't cast undefined bool constant.
3741
3742 2008-07-29  Martin Baulig  <martin@ximian.com>
3743
3744         * symbolwriter.cs
3745         (SymbolWriter.Reset): New public static method.
3746
3747         * driver.cs
3748         (CompilerCallableEntryPoint.Reset): Call SymbolWriter.Reset().
3749
3750 2008-07-28  Marek Safar  <marek.safar@gmail.com>
3751
3752         * cs-tokenizer.cs (IsLambdaOpenParens): Optimized using more stop tokens.
3753         
3754         * expression.cs (ElementAccess): Exact size allocation.
3755
3756 2008-07-26  Marek Safar  <marek.safar@gmail.com>
3757
3758         * driver.cs: Replaced outdated UnixParseOption with CSCParseOption.
3759
3760 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3761
3762         * flowanalysis.cs (StructInfo): Fixed detection of dynamic types.
3763         
3764         * class.cs: Removed $PRIVATE$ field hack which caused problems during
3765         flow analysis.
3766
3767 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3768
3769         A fix for bug #412217
3770         * assign.cs: Mutate also assignment type.
3771
3772 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3773
3774         A fix for bug #323644
3775         * typemanager.cs (IsValidProperty): Verify DefaultMemberName when checking
3776         indexers.
3777
3778 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3779
3780         A fix for bug #412134
3781         * expression.cs (ResolveOperatorEnum): Do implicit conversion of
3782         non-enumerable operands when overloading equality or bitwise operators.
3783
3784 2008-07-25  Marek Safar  <marek.safar@gmail.com>
3785
3786         * anonymous.cs: Cache closed generic anonymous method delegates.
3787
3788 2008-07-24  Marek Safar  <marek.safar@gmail.com>
3789
3790         * lambda.cs, linq.cs, class.cs, iterators.cs, cs-parser.jay, assign.cs, 
3791         anonymous.cs, statement.cs: Always emit anonymous method as static method
3792         when is instance free. Use nesting for nested anynomous methods blocks.
3793         
3794 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3795
3796         * anonymous.cs (MutateGenericMethod): Added extra code path for imported
3797         types.
3798
3799 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3800
3801         * expression.cs: Removed MakeSimpleCall.
3802
3803 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3804
3805         A fix for bug #323012
3806         * class.cs, pending.cs: Emit proxy for indexers when they differ in name.
3807         Base method implementing interface has to be public.
3808
3809 2008-07-23  Marek Safar  <marek.safar@gmail.com>
3810
3811         * cs-parser.jay: Don't break on missing argument.
3812
3813 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3814
3815         A fix for bug #320993
3816         * report.cs, parameter.cs, class.cs, decl.cs, delegate.cs, attribute.cs,
3817           enum.cs, codegen.cs: Report CLS compliance errors as warnings.
3818
3819 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3820
3821         A fix for bug #320748
3822         * convert.cs: Implicit user operators cannot convert to interfaces
3823
3824 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3825
3826         A fix for bug #312686
3827         * driver.cs: Ignore empty assembly references.
3828
3829 2008-07-22  Marek Safar  <marek.safar@gmail.com>
3830
3831         A fix for bug #387040
3832         * ecore.cs: Skip constrains check for an explicit implementation.
3833
3834 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3835
3836         A fix for bug #409045
3837         * cs-tokenizer.cs, rootcontext.cs, class.cs, location.cs, delegate.cs,
3838           cs-parser.jay, driver.cs, expression.cs, attribute.cs: Conditional
3839           identifiers are file specific unless passed as input arguments.
3840
3841 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3842
3843          * typemanager.cs, parameter.cs, class.cs, attribute.cs: Use an attribute
3844          to emit UnmanagedMarshal data under 2.0 profile.
3845
3846 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3847
3848         A fix for bug #410369
3849         * parameter.cs: Clone correctly ParamsParameter.
3850
3851 2008-07-21  Marek Safar  <marek.safar@gmail.com>
3852
3853         * expression.cs (Argument): Always report type for type based expressions
3854         errors.
3855
3856 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3857
3858         A fix for bug #410666
3859         * anonymous.cs: Correctly initialize generic storey reference.
3860
3861 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3862
3863         * convert.cs: Don't box same type arguments.
3864
3865 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3866
3867         * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
3868         Finished missing generic type mutators.
3869
3870 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3871
3872         * iterators.cs, statement.cs: Finished statements CloneTo.
3873
3874 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3875
3876         * anonymous.cs: ExpressionTreeProxy is of Value type expression.
3877         
3878         * expression.cs: Emit optimized default value expressions in expression tree
3879         array initializer.
3880
3881 2008-07-18  Marek Safar  <marek.safar@gmail.com>
3882
3883         * ecore.cs, cs-parser.jay, statement.cs: Error reporting fixes.
3884
3885 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3886
3887         A fix for bug #367536
3888         * cs-parser.jay: Check static constructor of generic types for an access
3889         modifier.
3890
3891 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3892
3893         A fix for bug #353800
3894         * lambda.cs: Emit ret for contextual statements.
3895         
3896         * codegen.cs: Keep both resolved and unreachable flags, otherwise we end
3897         up emitting redundant ret for all anonymous methods with return.
3898
3899 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3900
3901         A fix for bug #365188
3902         * ecore.cs, anonymous.cs, expression.cs, codegen.cs, statement.cs: Don't
3903         create anonymous method storey in unreachable block.
3904
3905 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3906
3907         * generic.cs, typemanager.cs, cs-tokenizer.cs, parameter.cs, namespace.cs,
3908         class.cs, delegate.cs, flowanalysis.cs, iterators.cs, anonymous.cs,
3909         driver.cs, nullable.cs, expression.cs, attribute.cs, codegen.cs,
3910         statement.cs: Fixed relevant defects found by Gendarme.
3911
3912 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3913
3914         A fix for bug #325291
3915         * modifiers.cs, class.cs, cs-parser.jay, anonymous.cs, codegen.cs, 
3916         statement.cs: Replaced IAnonymousHost with top level block flag.
3917
3918 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3919
3920         * cs-parser.jay: Clean up unused open_parens.
3921
3922 2008-07-17  Marek Safar  <marek.safar@gmail.com>
3923
3924         * ecore.cs: Custom error message for a range variable assignment.
3925
3926 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3927
3928         * constant.cs, typemanager.cs: Emit empty string ("") as string.Empty field
3929         load.
3930
3931 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3932
3933         * literal.cs: Null literal is of object type.
3934
3935 2008-07-16  Marek Safar  <marek.safar@gmail.com>
3936
3937         * nullable.cs (LiftedBinaryOperator): Always lift unwrapped nullable
3938         expression of nullable equality comparison.
3939
3940 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3941
3942         * expression.cs(PointerArithmetic): Removed redundant assignment.
3943
3944 2008-07-15  Marek Safar  <marek.safar@gmail.com>
3945
3946         * decl.cs (GetSignatureForError): Report full namespace name for containers.
3947
3948 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3949
3950         A fix for bug #408361
3951         * anonymous.cs (MutateGenericMethod): Store generic type arguments before
3952         they are replaced by GetMethod.
3953
3954 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3955
3956         A fix for bug #408721 by jeremie.laval@gmail.com
3957         * expression.cs (Indirection): Implemented CloneTo.
3958
3959 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3960
3961         * statement.cs (AssignableSlots): Temporary disabled variable initialization
3962         assert check.
3963
3964 2008-07-14  Marek Safar  <marek.safar@gmail.com>
3965
3966         * report.cs (EnableReporting): Don't reinitialize 0-based values.
3967
3968 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3969
3970         * linq.cs: Reset tranparent parameter counter in probing mode.
3971
3972 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3973
3974         * anonymous.cs: Mutate anonymous method type.
3975
3976 2008-07-11  Marek Safar  <marek.safar@gmail.com>
3977
3978         * ecore.cs, anonymous.cs: Mutate field expressions.
3979
3980 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3981
3982         A fix for bug #369670
3983         * linq.cs, statement.cs: Use explicit block for query expressions variables.
3984
3985 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3986
3987         * report.cs, ecore.cs: Flush recorder only when silent mode is off.
3988
3989 2008-07-10  Raja R Harinath  <harinath@hurrynot.org>
3990
3991         Fix bug #314902
3992         * cs-tokenizer.cs (is_punct): If a generic lookahead is looking
3993         only one '>', and finds a '>>', abort the generic lookahead.
3994
3995 2008-07-10  Marek Safar  <marek.safar@gmail.com>
3996
3997         A fix for bug #319902
3998         * cs-tokenizer.cs: Always look-ahed for `>='  when tokenizing `>'.
3999
4000 2008-07-10  Marek Safar  <marek.safar@gmail.com>
4001
4002         A fix for bug #406371
4003         * statement.cs: Moved EmitSymbolInfo to Block.
4004
4005 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4006
4007         * ecore.cs: Report better error for extension method overload failures.
4008
4009 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4010
4011         * expression.cs (Is): No need to box reference values.
4012
4013 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4014
4015         * class.cs: Use event resolve context when initializing CreateEmitContext.
4016
4017 2008-07-09  Marek Safar  <marek.safar@gmail.com>
4018
4019         A fix for bug #394436
4020         * anonymous.cs, class.cs, expression.cs, lambda.cs: Emit correctly extension
4021         method used inside expression trees. Added more LINQ to expression tree
4022         conversions.
4023
4024 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4025
4026         A fix for bug #378189, #370577
4027         * lambda.cs, ecore.cs: Implemented 3.0 enhancement to better conversion
4028         from expression.
4029
4030 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4031
4032         * anonymous.cs, class.cs, decl.cs: Emit CompilerGenerated attribute
4033         hierarchically.
4034
4035 2008-07-08  Marek Safar  <marek.safar@gmail.com>
4036
4037         A fix for bug #406702
4038         * anonymous.cs: Always park anonymous method in the nearest parent storey.
4039
4040 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4041
4042         A fix for bug #406648
4043         * cs-parser.jay: Report nullable use in mcs for some cases.
4044
4045 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4046
4047         * ecore.cs: Improved argument mismatch error messages.
4048
4049 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4050
4051         * anonymous.cs: Don't cache generic delegates when reference MVAR argument.
4052
4053 2008-07-07  Marek Safar  <marek.safar@gmail.com>
4054
4055         * expression.cs (TypeOf): Mutate type argument.
4056
4057 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4058
4059         * class.cs: Report missing partial modifier for correct type.
4060
4061 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4062
4063         * ecore.cs, expression.cs (VariableReference): Variable property is 
4064         protected.
4065
4066 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4067
4068         * ecore.cs, convert.cs: Made OpcodeCast more memory efficient.
4069         
4070 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4071
4072         * anonymous.cs, class.cs, lambda.cs, iterator.cs: Cache static anonymous
4073         method delegates.
4074
4075 2008-07-04  Marek Safar  <marek.safar@gmail.com>
4076
4077         * anonymous.cs, class.cs, expression.cs, iterator.cs, statement.cs: Reduce
4078         anonymous method storey to an instance method when only "this" is hoisted.
4079
4080 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4081
4082         A fix for bug #321615
4083         * expression.cs: Pointer comparisons use unsigned operator.
4084
4085 2008-07-03  Marek Safar  <marek.safar@gmail.com>
4086
4087         * expression.cs: Fixed native pointer conversions. Also fixes #321615.
4088
4089 2008-07-02  Marek Safar  <marek.safar@gmail.com>
4090
4091         A fix for bug #404905
4092         * class.cs: Always initialize local unsafe variables.
4093
4094 2008-06-30  Marek Safar  <marek.safar@gmail.com>
4095
4096         A fix for bug #396987
4097         * expression.cs (NewInitialize): Clear local temporary variable for next run
4098
4099 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4100
4101         A fix for bug #401020
4102         * ecore.cs: Both types and modifiers have to match for ref and out arguments
4103
4104 2008-06-27  Marek Safar  <marek.safar@gmail.com>
4105
4106         A fix for bug #398319
4107         * cs-parser.jay: Implemented undocumented base access expression inside
4108         anonymous types.
4109
4110 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4111
4112         A fix for bug #404227
4113         * cs-parser.jay: Parse namespace declaration using qualified identifier.
4114
4115 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4116
4117         A fix for bug #404227
4118         * convert.cs: Fixed explicit array to interface cast.
4119
4120 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4121
4122         A fix for bug #403894
4123         * delegate.cs: Mutate DelegateInvocation type.
4124
4125 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4126
4127         A fix for bug #379348
4128         * delegate.cs: Box a load of generic parameters.
4129
4130 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4131
4132         * expression.cs: Add an array creation arguments mutate.
4133
4134 2008-06-26  Marek Safar  <marek.safar@gmail.com>
4135
4136         A fix for bug #386068
4137         * anonymous.cs, expression.cs: Emit correctly hoisted expression tree
4138         parameter.
4139
4140 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4141
4142         * ecore.cs, expression.cs: Fixed broken TypeCast clone, implemented few more
4143         CloneTo.
4144
4145 2008-06-25  Marek Safar  <marek.safar@gmail.com>
4146
4147         A fix for bug #403518
4148         * delegate.cs: Type correctly anonymous method new invocation.
4149
4150 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4151
4152         A fix for bug #394826
4153         * anonymous.cs: Fully qualify members when resolving anonymous type internal
4154         calls.
4155
4156 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4157
4158         A fix for bug #394826
4159         * anonymous.cs, iterators.cs: Construct generic storey only when is really
4160         needed.
4161
4162 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4163
4164         * class.cs: Clone indexer parameters for localized capturing.
4165
4166 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4167
4168         A fix for bug #402379
4169         * expression.cs: Don't crash when an object initializer resolve fails.
4170
4171 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4172
4173         A fix for bug #402888
4174         * expression.cs: Mutate conditional expression.
4175
4176 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4177
4178         A fix for bug #401012
4179         * class.cs: Keep StructLayout in shared container.
4180
4181 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4182
4183         A fix for bug #400438
4184         * decl.cs, class.cs: Only properties can be automatically implemented.
4185
4186 2008-06-24  Marek Safar  <marek.safar@gmail.com>
4187
4188         * statement.cs (ChangeToIterator): Copy also labels.
4189
4190 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4191
4192         * ecore.cs: Pass type argument details to parent extension method.
4193
4194 2008-06-23  Marek Safar  <marek.safar@gmail.com>
4195
4196         A fix for bug #375966
4197         * delegate.cs: Fixed IsTypeCovariant generic type conversions.
4198
4199 2008-06-23  Raja R Harinath  <harinath@hurrynot.org>
4200
4201         * Makefile (bootstrap-libs): Pass NO_DIR_CHECK to sub-make.
4202
4203 2008-06-22  Marek Safar  <marek.safar@gmail.com>
4204
4205         A fix for bug #394347
4206         * anonymous.cs: Cache compatible delegates as compatibility check produces
4207         a new method every time.
4208
4209 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4210
4211         * anonymous.cs: Propagate storey reference for single references.
4212
4213 2008-06-20  Marek Safar  <marek.safar@gmail.com>
4214
4215         A fix for bug #387615
4216         * assign.cs, expression.cs: Correctly clone compound assignment.
4217
4218 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4219
4220         A fix for bug #359611, #359604
4221         * anonymous.cs: Mutate all types of hoisted parameters.
4222
4223 2008-06-19  Marek Safar  <marek.safar@gmail.com>
4224
4225         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, linq.cs, class.cs
4226         delegate.cs, iterators.cs, cs-parser.jay, assign.cs, anonymous.cs, driver.cs
4227         expression.cs, codegen.cs, statement.cs
4228         
4229         Fixes bugs: #318652, #323223, #234779, #325069, #325476, #332532, #334465,
4230         #345907, #349190, #353276, #355256, #359617, #378542, #384584, #396530
4231         
4232         ** Anonymous methods, lambda expressions rewrite **
4233         
4234         Anonymous expressions are now resolved when an explicit block is resolved 
4235         and they don't require any registration procedure anymore. Further,
4236         anonymous methods are defined when explicit block is emitted which allows
4237         better control of whole process and opens possibilities for more
4238         optimizations as well as alternative to reverse whole process.
4239         
4240         A concept of `MutateHoistedGenericType' was introduced to keep the resolve
4241         process consistent and to correctly emit hoisted generic methods when they
4242         have at least 1 hoisted variable.
4243         
4244 2008-06-17  Martin Baulig  <martin@ximian.com>
4245
4246         * class.cs: Also emit the `[DebuggerHidden]' attribute on the main
4247         iterator method.
4248         (AbstractPropertyEventMethod.IsDebuggerHidden): New protected
4249         virtual property; check it in Emit().
4250         (PropertyMethod.IsDebuggerHidden): Override, check whether we're
4251         an iterator.
4252         (MethodOrOperator.ResolveMethods): Set `DEBUGGER_HIDDEN' if we're
4253         an iterator.
4254         (Indexer.Define): Likewise.
4255
4256 2008-06-17  Marek Safar  <marek.safar@gmail.com>
4257
4258         * convert.cs: Don't use IsInterface on type arguments.
4259         
4260         * delegate.cs: DelegateInvocation uses MethodInfo.
4261         
4262         * parameter.cs: Removed IsTypeParameter.
4263         
4264         * generic-mcs.cs: More missing stuff.
4265
4266 2008-06-16  Martin Baulig  <martin@ximian.com>
4267
4268         * modifiers.cs
4269         (Modifiers.DEBUGGER_HIDDEN): New public const.
4270
4271         * typemanager.cs
4272         (TypeManager.GetDebuggerHiddenAttribute): New public static method.
4273
4274         * class.cs
4275         (MethodOrOperator.Emit): Check `Modifiers.DEBUGGER_HIDDEN'.
4276         (AbstractPropertyEventMethod): Likewise.
4277         (Constructor.Emit): Likewise.
4278         (SourceMethod.SetCompilerGenerated): Removed.
4279
4280         * iterator.cs: Set `Modifiers.DEBUGGER_HIDDEN' everywhere except
4281         on MoveNext().
4282
4283         * anonymous.cs
4284         (RootScopeInfo.DoDefineMembers): Set `Modifiers.DEBUGGER_HIDDEN'
4285         if we're an `IteratorHost'.
4286         (AnonymousMethodMethod..ctor): Don't set
4287         `Modifiers.COMPILER_GENERATED'; csc only sets this on the class,
4288         not on the method.
4289
4290 2008-06-16  Marek Safar  <marek.safar@gmail.com>
4291
4292         * statement.cs: Clean-up foreach statements.
4293
4294 2008-06-12  Marek Safar  <marek.safar@gmail.com>
4295
4296         * class.cs: Stop using public method which should not exist
4297         (MethodBuilder.SetGenericMethodSignature).
4298
4299 2008-06-11  Martin Baulig  <martin@ximian.com>
4300
4301         * location.cs
4302         (Location.LookupFile): Add `CompilationUnit' argument; when given
4303         a relative file name, make it relative to the directory the .cs
4304         file is located in instead of using the current directory.
4305
4306 2008-06-11  Martin Baulig  <martin@ximian.com>
4307
4308         * class.cs
4309         (IMethodData.EmitExtraSymbolInfo): Added `SourceMethod' argument.
4310         (MethodOrOperator.EmitExtraSymbolInfo): Likewise.
4311         (SourceMethod.SetRealMethodName): Moved here from the symbol writer.
4312         (SourceMethod.SetCompilerGenerated): Likewise.
4313
4314 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4315
4316         * codegen.cs, driver: Only write symbol file when it's asked for.
4317
4318 2008-06-11  Marek Safar  <marek.safar@gmail.com>
4319
4320         * codegen.cs: Don't use assembly writer error handling for symbol writer.
4321
4322 2008-06-10  Martin Baulig  <martin@ximian.com>
4323
4324         * symbolwriter.cs: Reflect latest MarkSequencePoint() API changes.
4325
4326 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4327
4328         A fix for bug #316290
4329         * expression.cs: Include decimal operators in predefined table.
4330         
4331         * parameters.cs: More readonlyness.
4332
4333 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4334
4335         A fix for bug #397213
4336         * cs-parser.jay: One more missing current_local_parameters reset.
4337
4338 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4339
4340         A fix for bug #396633
4341         * class.cs: Host backing field in partial container.
4342
4343 2008-06-09  Marek Safar  <marek.safar@gmail.com>
4344
4345         A fix for bug #397068
4346         * expression.cs: Check both operand types when predefined operator is used.
4347
4348 2008-06-05  Martin Baulig  <martin@ximian.com>
4349
4350         Merged the `debugger-kahalo' branch.
4351
4352         * class.cs
4353         (MethodData.Emit): Call SymbolWriter.SetCompilerGenerated() if
4354         we're an iterator method.
4355         (SourceMethod): Reflect latest symbol writer changes;
4356         SymbolWriter.OpenMethod() now takes a `ICompileUnit' argument and
4357         now `start_row' and `end_row'.
4358         (Constructor.Emit): Fix the logic whether to emit symbol information.
4359
4360         * iterator.cs: Call SymbolWriter.SetCompilerGenerated() on all the
4361         generated methods.
4362
4363         * location.cs
4364         (CompilationUnit): New public class; derives from `SourceFile'.
4365         (SourceFileEntry.DefineSymbolInfo): New public method.
4366         (SourceFileEntry.SetChecksum): New public method.
4367         (Location): Encode hidden line numbers by using `column == 255';
4368         the .ctor now accepts `column == -1' to mark a hidden line number.
4369         (Location.Hidden): New public property.
4370         (Location.CheckPoint): Add `CompilationUnit'.
4371         (Location.SourceFiles): Change return type to `CompilationUnit[]'.
4372         (Location.Push): Add `CompilationUnit compile_unit' argument.
4373         (Location.CompilationUnit): New public property.
4374
4375         * statement.cs
4376         (ToplevelBlock.Emit): Add `ec.Mark (EndLocation)'.
4377
4378         * cs-parser.jay: `SourceFile' -> `CompilationUnit'.
4379
4380         * driver.cs: `SourceFile' -> `CompilationUnit'.
4381
4382         * cs-tokenizer.cs: `SourceFile' -> `CompilationUnit'.
4383
4384         * namespace.cs: `SourceFile' -> `CompilationUnit'.
4385
4386         * cs-tokenizer.cs: Add support for `#pragma checksum' and
4387         `#line hidden'.
4388
4389         * symbolwriter.cs
4390         (SymbolWriter.MarkSequencePoint): Take a `Location' and use the
4391         new symbol writer API to also pass the file.
4392
4393 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4394
4395         * statement.cs: Emit catch variable assignment using variable expression.
4396         
4397 2008-06-05  Marek Safar  <marek.safar@gmail.com>
4398
4399         * ecore.cs, expression.cs, statement.cs: Make TemporaryVariable compatible
4400         with other variable types.
4401
4402 2008-06-04  Marek Safar  <marek.safar@gmail.com>
4403
4404         * ecore.cs, expression.cs, statement.cs, typemanager.cs: Removed custom
4405         GetLength method emit, it breaks resolve rules.
4406         
4407 2008-06-02  Atsushi Enomoto  <atsushi@ximian.com>
4408             Marek Safar  <marek.safar@gmail.com>
4409                         
4410         A fix for bug #395542
4411         * cs-parser.jay: The trailing comma is allowed in anonymous type member
4412         declaration.
4413         
4414 2008-06-02  Marek Safar  <marek.safar@gmail.com>
4415
4416         A fix for bug #395287
4417         * class.cs, modifiers.cs: Automatic properties method base modifiers checks.
4418
4419 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4420
4421         A fix for bug #395845
4422         * class.cs, nullable.cs: User unary operator is allowed to have nullable and
4423         non-nullable parameter type.
4424         
4425 2008-05-31  Marek Safar  <marek.safar@gmail.com>
4426
4427         * class.cs: Handle contructor initializer as a statement in top-level block.
4428
4429 2008-05-30  Marek Safar  <marek.safar@gmail.com>
4430
4431         * attribute.cs: Don't mix old and new corlib types when emitting corlib
4432         security attributes.
4433
4434 2008-05-24  Marek Safar  <marek.safar@gmail.com>
4435
4436         * ecore.cs, expression.cs: Small IVariable refactoring.
4437
4438 2008-05-22  Marek Safar  <marek.safar@gmail.com>
4439
4440         * assign.cs (LocalTemporary): Implemented CreateExpressionTree.
4441
4442 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4443
4444         * cs-parser.jay: Removed redundant catch type check.
4445
4446 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4447
4448         A fix for bug #390372
4449         * nullable.cs: Set correct return type.
4450
4451 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4452
4453         A fix for bug #391062
4454         * typemanager.cs: Fixed crash when comparing null types.
4455
4456 2008-05-21  Marek Safar  <marek.safar@gmail.com>
4457
4458         A fix for bug #391871
4459         * cs-parser.jay: Better error handling for invalid catch type.
4460
4461 2008-05-20  Marek Safar  <marek.safar@gmail.com>
4462
4463         A fix for bug #392155
4464         * cs-tokenizer.cs: Fixed casting of byte and decimal expression.
4465
4466 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4467
4468         A fix for bug #390666
4469         * ecore.cs (BetterExpressionConversion): Unwrap each Expression<T>
4470         expressions.
4471
4472 2008-05-15  Marek Safar  <marek.safar@gmail.com>
4473
4474         * class.cs, expression.cs, statement.cs: Removed a hack, setting block flag
4475         in getter.
4476
4477 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4478
4479         A fix for bug #389625
4480         * delegate.cs, generic.cs: Some progress on method group return type
4481         inference.
4482
4483 2008-05-13  Marek Safar  <marek.safar@gmail.com>
4484
4485         A fix for bug #378419
4486         * namespace.cs: Inspect also parent namespaces not only namespace entries.
4487
4488 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4489
4490         * class.cs (Constructor): Added IsCompilerGenerated.
4491
4492 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4493
4494         * expression.cs: Enum binary operators can accept non-enum operand only when
4495         is implicitly convertible to underlying type.
4496
4497 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4498
4499         A fix for bug #389272
4500         * support.cs: Workaround System.InvalidOperationException for enums.
4501
4502 2008-05-12  Marek Safar  <marek.safar@gmail.com>
4503
4504         A fix for bug #389073
4505         * convert.cs: More undocumented explicit IntPtr/UIntPtr conversions.
4506
4507 2008-05-10  Marek Safar  <marek.safar@gmail.com>
4508
4509         * driver.cs: Split Parse.
4510         
4511         * location.cs (LookupFile): Uses string.Empty.
4512
4513 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4514
4515         * expression.cs, parameter.cs: Small ParameterReference clean up.
4516
4517 2008-05-07  Marek Safar  <marek.safar@gmail.com>
4518
4519         * anonymous.cs, codegen.cs, convert.cs, ecore.cs: Removed uber ugly TempEc
4520         hack. Fixes #387502.
4521
4522 2008-05-06  Martin Baulig  <martin@ximian.com>
4523
4524         * class.cs (Constructor.Emit): Fix the logic whether to emit
4525         symbol information.
4526
4527 2008-05-06  Raja R Harinath  <harinath@hurrynot.org>
4528
4529         Fix #385503
4530         * iterators.cs (Iterator.CurrentBlock.DoEmit): Don't emit
4531         InvalidOperationException when the iterator is before the start or
4532         after the end.
4533
4534 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4535
4536         * nullable.cs (NullCoalescingOperator): Result is underlying type of left,
4537         when left is nullable type.
4538
4539 2008-05-06  Marek Safar  <marek.safar@gmail.com>
4540
4541         A fix for bug #386628
4542         * expression.cs (LocalVariableReference): Continue in resolving when
4543         variable is not assigned.
4544
4545 2008-05-05  Marek Safar  <marek.safar@gmail.com>
4546
4547         * nullable.cs, statement.cs (Unwrap): Store non-variable expression in all
4548         nullable operations.
4549
4550 2008-05-04  Marek Safar  <marek.safar@gmail.com>
4551
4552         * nullable.cs, statement.cs (Unwrap): Don't duplicate variable expressions,
4553         it saves many redundant temporary variables for nullable operations.
4554
4555 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4556
4557         * assign.cs: EventAddOrRemove is a statement and cannot have a type.
4558         
4559         * cfold.cs, constant.cs, expression.cs: Share Error_OperatorCannotBeApplied
4560         method.
4561         
4562         * nullable.cs: Constant coalescing operator optimizations.
4563
4564 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4565
4566         * constant.cs: Use unsigned conversion for values which are unsigned only.
4567
4568 2008-05-03  Marek Safar  <marek.safar@gmail.com>
4569
4570         * convert.cs, literal.cs, nullabel.cs, typemanager.cs: Implemeted null 
4571         coalescing operator as it should be.
4572
4573 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4574
4575         A fix for bug #371016
4576         * expression.cs: All predefined delegate operators require implicit method
4577         group conversion.
4578         
4579 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4580
4581         * constant.cs: Emit long constant as uint when fits the range.
4582         
4583         * convert.cs, expression.cs: Fixed few unsafe conversions.
4584
4585 2008-05-02  Marek Safar  <marek.safar@gmail.com>
4586
4587         * convert.cs, literal.cs: Don't wrap implicit reference conversion to object
4588
4589 2008-05-02  Raja R Harinath  <harinath@hurrynot.org>
4590
4591         Fix #385758
4592         * convert.cs (ImplicitNumericConversion): Don't modify the type of
4593         'expr'.
4594         * ecore.cs (EmptyCast.Create): Flatten nested EmptyCasts.
4595
4596 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4597
4598         * constant.cs, literal.cs: IsLiteral property for error reporting.
4599         
4600         * ecore.cs, expression.cs: Implemented Property expression.
4601
4602 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4603
4604         * class.cs, modifiers.cs, flowanalysis.cs: New BACKING_FIELD flag.
4605         
4606         * nullable.cs: Implemented nullable coalescing null operator.
4607
4608         * ecore.cs, expression.cs: Expression trees work.
4609
4610 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4611
4612         * ecore.cs: CreateExpressionTree is finally abstract.
4613
4614         * expression.cs, linq.cs: Updated.
4615
4616 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4617
4618         * expression.cs, ecore.cs: Block base access expression inside expression
4619         tree.
4620
4621 2008-05-01  Marek Safar  <marek.safar@gmail.com>
4622
4623         A fix for bug #385058
4624         * expression.cs: User-defined operator implementations always take
4625         precedence over predefined operator implementations.
4626
4627 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4628
4629         * assign.cs, anonymous.cs, lambda.cs, nullable.cs, ecore.cs, linq.cs,
4630         class.cs, iterators.cs, expression.cs, attribute.cs: Filled a few more
4631         expression tree conversions.
4632         
4633 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4634
4635         * typemanager.cs, ecore.cs, class.cs, expression.cs, doc.cs: Merged all
4636         operators method details to Operator class.
4637
4638 2008-04-30  Marek Safar  <marek.safar@gmail.com>
4639
4640         * anonymous.cs: Pass unsafe flags to anonymous container.
4641         
4642         * ecore.cs, expression.cs, statement.cs: Block unsafe pointer operations
4643         inside expression tree.
4644
4645 2008-04-29  Martin Baulig  <martin@ximian.com>
4646
4647         * cs-tokenizer.cs (Tokenizer.Position): Added `line'.
4648         (Tokenizer.PopPosition): Also restore the `line'.
4649
4650 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4651
4652         * delegate.cs: Implemented Invoke expression.
4653
4654 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4655
4656         * expression.cs: Fixed equality reference comparison regression.
4657
4658 2008-04-29  Marek Safar  <marek.safar@gmail.com>
4659
4660         * ecore.cs: Clean up EmptyCast hack.
4661         
4662         * expression.cs, nullable.cs: Implemented enum binary and unary operations
4663         using correct conversion rules. Also fixes #383993.
4664
4665 2008-04-28  Martin Baulig  <martin@ximian.com>
4666
4667         * class.cs (Constructor.Emit): Don't emit debugging information
4668         for generated default .ctor's.
4669
4670 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4671
4672         * convert.cs: Empty-cast ushort to int conversion.
4673
4674 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4675
4676         A fix for bug #384191
4677         * ecore.cs, expression.cs: Fixed expression cloning.
4678
4679 2008-04-28  Marek Safar  <marek.safar@gmail.com>
4680
4681         * ecore.cs, delegate.cs, assign.cs: Few tweaks for recent changes.
4682
4683 2008-04-28  Raja R Harinath  <harinath@hurrynot.org>
4684
4685         Fix #381559, test-638.cs, test-639.cs
4686         * assign.cs (CompoundAssign.Helper): New wrapper.
4687         (CompoundAssign.DoResolve): Use it to wrap the nested 'target'
4688         access.
4689         * ecore.cs (MethodGroupExpr.VerifyArgumentsCompat) <params arguments>:
4690         Pass unconverted expressions to the params array creation expression.
4691         (FieldExpr.EmitAssign): Don't special-case StringConcat.
4692         (PropertyExpr.EmitAssign): Likewise.
4693         * expression.cs (ArrayCreation.ResolveArrayElement): Keep track of the
4694         element if it is of kind CompoundAssign.Helper.
4695         (ArrayCreation.Emit): If we saw a CompoundAssign.Helper, emit it
4696         first before anything else.
4697         (ArrayAccess.EmitAssign): Don't special-case StringConcat.
4698         (ArrayAccess.LoadArrayAndArguments): Simplify.
4699
4700 2008-04-27  Marek Safar  <marek.safar@gmail.com>
4701
4702         * expression.cs: Fixed cloning of typeof(void).
4703
4704 2008-04-27  Raja R Harinath  <harinath@hurrynot.org>
4705
4706         * assign.cs (Assign.DoResolve): Remove support for EventExprs.
4707         (Assign.Emit): Likewise.  Move it to ...
4708         (CompoundAssign.DoResolve): ... here and ...
4709         (CompoundAssign.Emit): ... here.
4710         (EventAddOrRemove): New helper to handle += and -= on events, and
4711         avoid the use of BinaryDelegates.
4712         * ecore.cs (EventExpr.DoResolveLValue): Emit CS0070 unconditionally.
4713         (EventExpr.EmitAddOrRemove): Improve.
4714         * delegate.cs (DelegateInvocation.DoResolve): Simplify slightly.
4715
4716         * cs-parser.jay (type) <namespace_or_type_name variant>: Don't
4717         create VarExprs for 'foo.bar.var'.
4718         * ecore.cs (VarExpr.InferType): Rename from DoResolveLValue, which
4719         is a highly inappropriate name for its functionality.
4720
4721 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4722
4723         Simplify handling of multiple assignments
4724         * assign.cs (Assign): Clear out all 'embedded assign' gunk.  Make
4725         inheritable-only.
4726         (SimpleAssign): New.  Class to be used for normal assignments.
4727         * anonymous.cs, class.cs, cs-parser.jay: Update to changes.
4728         * expression.cs, parameter.cs, statement.cs: Likewise.
4729
4730 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4731
4732         * ecore.cs, expression.cs, nullable.cs: Implemeted enum binary add operation
4733         for incompatible underlying types, more to come, uff.
4734
4735 2008-04-26  Raja R Harinath  <harinath@hurrynot.org>
4736
4737         Fix gtest-388.cs
4738         * expression.cs (VariableReference.EmitAssign) <source is NewInstance>:
4739         Handle 'leave_copy'.
4740
4741 2008-04-25  Marek Safar  <marek.safar@gmail.com>
4742
4743         * expression.cs, nullable.cs: Implemented UnaryPlus expression.
4744
4745 2008-04-24  Raja R Harinath  <harinath@hurrynot.org>
4746
4747         Fix test-636.cs.  Sprinkle a few more 'EmitSideEffect's around
4748         * expression.cs (Unary.TryReduceConstant): Unwrap SideEffectConstant.
4749         * statement.cs (While, Do, For): Allow test to have side effects.
4750         (For.DoEmit): Always emit InitStatement.
4751
4752         Fix test-635.cs
4753         * expression.cs (Binary.DoResolve) <BitwiseAnd with zero constant>:
4754         Always create SideEffectConstant.
4755         (Binary.EnumLiftUp): Don't assume that the enumeration constant is
4756         of type EnumConstant.
4757
4758         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4759         Handle 'right' being SideEffectConstant of type 'bool'.
4760
4761         * expression.cs (Binary.EmitBranchable) <Equality with constant>:
4762         Use left.EmitBranchable instead of open coding it, so as to
4763         improve optimization opportunities.
4764
4765         * constant.cs (SideEffectConstant.EmitSideEffect): Simplify slightly.
4766
4767         * ecore.cs (Expression.EmitBranchable): Document some non-obvious
4768         assumptions.
4769         (Expression.EmitSideEffect): Document.
4770
4771 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4772
4773         * expression.cs: Implemented NewArrayBounds, TypeIs, and TypeAs expressions.
4774
4775 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4776
4777         * constant.cs, statement.cs: Use EmitSideEffect for constant if statement.
4778
4779 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4780
4781         * ecore.cs, expression.cs, delegate.cs: Implemeted delegate instantiation
4782         conversion to expression tree.
4783
4784 2008-04-23  Marek Safar  <marek.safar@gmail.com>
4785
4786         * ecore.cs: Removed unused expression.
4787
4788 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4789
4790         * expression.cs: Implemented NegateChecked and New expressions.
4791
4792 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4793
4794         * convert.cs, nullable.cs, expression.cs: Implemented Negate expression.
4795
4796 2008-04-22  Raja R Harinath  <harinath@hurrynot.org>
4797
4798         Fix #351102
4799         * anonymous.cs (AnonymousMethodExpression.DoResolve): Mark as
4800         needing final 'ret' instruction.
4801
4802 2008-04-22  Marek Safar  <marek.safar@gmail.com>
4803
4804         * expression.cs: Disabled lifted binary conversion on ISO-1 profiles.
4805
4806 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4807
4808         * expression.cs: Emit ldnull and not null expression as an instance argument
4809          of static method expression calls.
4810
4811 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4812
4813         A fix for bug #378200
4814         * expression.cs: Fixed crash when creating parameterless expression tree
4815         method call.
4816
4817 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4818
4819         A fix for bug #375297
4820         * anonymous.cs: Fixed crash when inferring from null argument anonymous
4821         method.
4822
4823 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4824
4825         A fix for bug #377596
4826         * decl.cs, class.cs: Emit delegate type argument attributes.
4827
4828 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4829
4830         A fix for bug #365314
4831         * generic.cs, ecore.cs: Type parameter declaration cannot be of generic type
4832         
4833 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4834
4835         * cs-parser.jay, expression.cs: ComposedCast can work with type expressions
4836         only.
4837
4838 2008-04-21  Marek Safar  <marek.safar@gmail.com>
4839
4840         * generic.cs (TypeParameter): Removed redundant location.
4841
4842 2008-04-19  Marek Safar  <marek.safar@gmail.com>
4843
4844         * generic.cs, parameter.cs, namespace.cs, ecore.cs, class.cs, decl.cs,
4845         delegate.cs, iterators.cs, cs-parser.jay, const.cs, enum.cs: Use
4846         FullNamedExpression in all declaration type expression, statements will come
4847         later.
4848
4849 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4850
4851         * generic.cs, namespace.cs, ecore.cs, class.cs, decl.cs, generic-mcs.cs,
4852         nullable.cs, expression.cs, enum.cs, doc.cs: Cleaning up type expressions.
4853
4854 2008-04-18  Marek Safar  <marek.safar@gmail.com>
4855
4856         * parameter.cs, delegate.cs, cs-parser.jay, expression.cs: Removed unused
4857         code.
4858
4859 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4860
4861         * decl.cs, class.cs, generic.cs: Verify partial parts type parameters and
4862         constraints.
4863
4864 2008-04-17  Marek Safar  <marek.safar@gmail.com>
4865
4866         * decl.cs, class.cs, cs-parser.jay, ecore.cs, expression.cs: Unify all type
4867         name expressions.
4868         Also fixes #340463.
4869
4870 2008-04-17  Raja R Harinath  <harinath@hurrynot.org>
4871
4872         Hook up 'EmitSideEffect'
4873         * constant.cs (Constant.EmitSideEffect): New.
4874         (SideEffectConstant.Emit): Simplify.  Use EmitSideEffect.
4875         (SideEffectConstant.EmitSideEffect): New.
4876         * ecore.cs (BoxedCast.EmitBranchable): Remove.  We can't use an
4877         unconditional branch in EmitBranchable.
4878         (FieldExpr.EmitBranchable): New.
4879         * expression.cs (Unary.EmitSideEffect): New.
4880         (Binary.EmitSideEffect): New.
4881         (VariableReference.EmitSideEffect): New.  Do nothing.
4882
4883 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4884
4885         Introduce 'EmitSideEffect'
4886         * ecore.cs (Expression.EmitSideEffect): New.
4887         (TypeCast): Rename from EmptyCast.
4888         (EmptyCast): New.
4889         (EmptyCast.EmitBranchable, EmptyCast.EmitSideEffect): Implement.
4890         (BoxedCast.EmitBranchable, BoxedCast.EmitSideEffect): Implement.
4891         * convert.cs, nullable.cs: Update to changes.
4892
4893 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4894
4895         * class.cs, cs-parser.jay: Early check for base types expression.
4896
4897 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4898
4899         * decl.cs (MemberName): Declare PrettyName as obsolete.
4900
4901 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4902
4903         * namespace.cs: Use MemberName comparison.
4904
4905 2008-04-16  Raja R Harinath  <harinath@hurrynot.org>
4906
4907         Fix build break
4908         * decl.cs (MemberName.PrettyName): New.  Replaces the misnamed
4909         FullName.
4910         (MemberName.MethodName, MemberName.GetSignatureForError): Improve.
4911         (MemberName.FullyQualifiedName): New.  Provides the functionality
4912         that users assume FullName would have.
4913         * ecore.cs, namespace.cs: Update to changes.
4914
4915         * statement.cs (Using.assign): Make into ExpressionStatement.
4916         (Using.EmitPreTryBody): Simplify.
4917
4918 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4919
4920         * report.cs: ColorFormat is protected.
4921         
4922         * rootcontext.cs: Unused fields clean-up.
4923         
4924         * namespace.cs: Made UsingEntry name private.
4925
4926 2008-04-16  Marek Safar  <marek.safar@gmail.com>
4927
4928         * cs-tokenizer.cs, location.cs: Removed unused field.
4929
4930 2008-04-16  Jan Oravec <jan.oravec@6com.sk>
4931             Raja R Harinath  <harinath@hurrynot.org>
4932
4933         Fix #379822
4934         * constant.cs (SideEffectConstant.value): Rename from 'left'.
4935         (SideEffectConstant.side_effect): Rename from 'right'.
4936         (SideEffectConstant..ctor): Normalize 'side_effect'.
4937         (SideEffectConstant.Emit): Emit 'value', not 'side_effect' as the
4938         value of this constant.
4939         * cfold.cs: Update to changes.
4940
4941 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4942
4943         * cs-paser.jay: Removed unused variable.
4944         
4945         * driver.cs: Made Compile instance method.
4946
4947 2008-04-15  Raja R Harinath  <harinath@hurrynot.org>
4948
4949         * flowanalysis.cs (FlowBranching.MergeChild): Simplify.
4950
4951 2008-04-15  Marek Safar  <marek.safar@gmail.com>
4952
4953         * cs-paser.jay, namespace.cs: Simplified handling of namespace imports. 
4954
4955 2008-04-13  Jb Evain  <jbevain@novell.com>
4956
4957         * namespace.cs: update the System.Core fullname for 2.1
4958         * driver.cs: update the list of required assemblies for 2.1.
4959         Merged from the Moonlight 2 branch.
4960
4961 2008-04-11  Marek Safar  <marek.safar@gmail.com>
4962
4963         * assign.cs, ecore.cs, expression.cs, nullable.cs: More work on nullable
4964         types and user defined operators. User operators arguments has to be checked
4965         for null value before invocation, which also means no operator is called
4966         when any argument is not convertible to unwrapped nullable type.
4967         
4968 2008-04-09  Marek Safar  <marek.safar@gmail.com>
4969
4970         * convert.cs, ecore.cs, expression.cs, nullable.cs: Initial refactoring
4971         of Unary expressions to follow operator overloading rules precisely.
4972         Also fixes #321794, #323794
4973         
4974 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4975
4976         * cs-parser.jay, expression.cs: Don't wrap Indirection expression in Unary
4977         expression.
4978         
4979 2008-04-08  Marek Safar  <marek.safar@gmail.com>
4980
4981         * expression.cs, ecore.cs: Implemented MemberInit expression.
4982         
4983 2008-04-08  Raja R Harinath  <harinath@hurrynot.org>
4984
4985         Fix mono/tests/exception4.cs
4986         * statement.cs (ExceptionStatement, TryCatch): Revert to using
4987         ec.NeedReturnLabel () rather emitting a 'nop'.
4988
4989         * statement.cs (ExceptionStatement.SomeCodeFollows): A hook for a
4990         simple heuristic.
4991         (TryCatch.SomeCodeFollows): Likewise.
4992         * flowanalysis.cs (FlowBranchingException): Call 'SomeCodeFollows'
4993         for 'break', 'continue' and 'return' statements inside a try.
4994         We're fairly sure that the generated IL stream will have more
4995         instructions textually following the try.
4996         (FlowBranchingTryCatch): Likewise.
4997
4998         * statement.cs (Throw.Resolve): Move CS0156 and CS0724 testing ...
4999         * flowanalysis.cs (FlowBranching.CheckRethrow): ... here and to its
5000         overrides.
5001
5002         * statement.cs (CollectionForeach.DisposableWrapper): Make a true
5003         wrapper -- forward everything to CollectionForeach.
5004         (CollectionForeach.NonDisposableWrapper): New.
5005         (CollectionForeach.EmitFinallyBody): Use 'endfinally' instruction
5006         instead of a pop + branch to end.
5007
5008 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5009
5010         A fix for bug #377485
5011         * assign.cs, expression.cs, decl.cs, class.cs, ecore.cs, namespace.cs: 
5012         Propagate location for extension method groups. Report conversion failure at
5013         right place.
5014
5015 2008-04-07  Marek Safar  <marek.safar@gmail.com>
5016
5017         * anonymous.cs, expression.cs, ecore.cs, typemanager.cs: Implemented
5018         ListInit and Field expressions.
5019
5020 2008-04-06  Raja R Harinath  <harinath@hurrynot.org>
5021
5022         * iterators.cs (Iterator.EmitMoveNext): Remove try/fault wrapper.
5023         Since $PC is always -1 inside the body of MoveNext, the fault
5024         handler is a no-op.
5025         * flowanalysis.cs (FlowBranchingException.EmitFinally): Kill.
5026         * statement.cs (ExceptionStatement.emit_finally): Likewise.
5027         (ExceptionStatement.ResolveFinally): Drop 'branching' argument.
5028
5029         The denouement!  Fix #324708
5030         * iterators.cs (Iterator.EmitMoveNext): Reset $PC to -1 on entry.
5031         (Iterator.EmitYieldBreak): We no longer need to reset $PC.
5032         * statement.cs (ExceptionStatement.DoEmit): Actually emit the
5033         'finally' inside the finally clause.
5034
5035         * statement.cs (ExceptionStatement.DoEmit): Emit try/finally block
5036         inside an iterator.  Don't emit the body of the 'finally' inside
5037         the finally clause yet.
5038
5039         Use the ResumableStatement infrastructure for MoveNext ()
5040         * iterators.cs (Iterator.EmitMoveNext_NoResumePoints): New.
5041         (Iterator.EmitMoveNext): Use 'resume_points'.  Get rid of
5042         'old_resume_points'.  Move dispatcher upfront.
5043         (Iterator.MarkYield): Mark the 'resume_point' of a Yield.
5044         * statement.cs (ExceptionStatement.DoEmit): Emit a dispatcher if
5045         in an enumerator.  This encodes the main fix in this patch series
5046         -- we can only jump into the first instruction of a try from the
5047         outside, but we want to emit try/finally regions in iterators and
5048         resume in the middle of them.
5049
5050 2008-04-05  Raja R Harinath  <harinath@hurrynot.org>
5051
5052         * statement.cs (ExceptionStatement.ResolveFinally): Move setting
5053         of NeedReturnLabel here.
5054
5055         Introduce a common point for emitting try/finally to IL
5056         * statement.cs (ExceptionStatement.DoEmit): New.  Combines all the
5057         features of the various subclasses, which are now driven by ...
5058         (ExceptionStatement.EmitPreTryBody): ... this and ...
5059         (ExceptionStatement.EmitTryBody): ... this and the original
5060         EmitFinallyBody.
5061         (TryFinally, Lock, Using, UsingTemporary, DisposableWrapper):
5062         Remove DoEmit and update to follow above protocol.
5063
5064         * statement.cs (ExceptionStatement.EmitForDispose): If all labels
5065         of the dispatcher are the same, skip emitting the 'switch'.
5066         * iterator.cs (Iterator.EmitDispose): Update to changes.
5067
5068         Clean up handling of 'using' statement
5069         * statement.cs (UsingTemporary): New.  Carved out of ...
5070         (Using): ... this.  Simplify drastically.  Handle exactly
5071         one variable.
5072         * cs-parser.jay (using_statement): Split.  Create UsingTemporary
5073         or Using as appropriate.  If there are multiple variable declared,
5074         create nested Using statements.
5075         (resource_acquisition): Kill.
5076
5077         * statement.cs (ExceptionStatement.EmitForDispose): Use
5078         EmitFinallyBody, not EmitFinally.
5079
5080         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Remove.
5081         * iterator.cs: Update to changes.
5082
5083         Start using the ResumableStatement infrastructure
5084         * statement.cs (ResumeableStatement.PrepareForDispose): New.
5085         (ResumableStatement.EmitForDispose): New.
5086         (ExceptionStatement): Override them.
5087         * iterators.cs (Iterator.EmitDispose): Use PrepareForDispose and
5088         EmitForDispose to create the body of the Dispose method.  Don't
5089         use OldResumePoint.
5090
5091         * iterator.cs (Iterator.AddResumePoint): Move here from ...
5092         * statement.cs (Toplevel.AddResumePoint): ... here.
5093         (Toplevel.MoveNextStatement.Resolve): Create FlowBranchingIterator.
5094         * flowanalysis.cs (FlowBranchingIterator): New.
5095         * codegen.cs (EmitContext): Update to changes.
5096
5097         * iterators.cs (Iterator.OldResumePoint): Rename from ResumePoint.
5098         (Iterator.old_resume_points): Rename from 'resume_points'.
5099         (Iterator.MoveNextStatement): Remove unused class.
5100
5101         New infrastructure for try/finally in iterators (still unused)
5102         * flowanalysis.cs (FlowBranching.AddResumePoint): New.
5103         (FlowBranchingToplevel.AddResumePoint): Hook into
5104         ToplevelBlock.AddResumePoint.
5105         (FlowBranchingTryCatch): Move CS01626 and CS01631 checks here.
5106         (FlowBranchingException): Hook into ExceptionBlock.AddResumePoint.
5107         * statement.cs (ToplevelBlock.AddResumePoint): New.  Collect
5108         resume points and assign program-counter values.
5109         (ExceptionBlock.AddResumePoint): Collect resume points for
5110         de-muxer at the top of try block.
5111         * iterators.cs (Yield.CheckContext): Simplify.
5112         (Yield.Resolve): Use FlowBranching.AddResumePoint.
5113
5114 2008-04-04  Raja R Harinath  <harinath@hurrynot.org>
5115
5116         * flowanalysis.cs (FlowBranching.AddReturnOrigin): Change Location
5117         argument to an ExitStatement.
5118         (FlowBranchingException): Refactor saved origins code.
5119         * statement.cs (ExitStatement): Update to cahges.
5120         * iterator.cs (YieldBreak): Likewise.
5121
5122         * statement.cs (ResumableStatement): New.  Common base class for
5123         YieldReturn and ExceptionStatement.
5124         (ExitStatement): New.  Common base class for Return and YieldBreak.
5125         (Return): Update to changes.
5126         * iterator.cs (YieldBreak): Likewise.
5127         * lambda.cs (ContextualReturn): Likewise.
5128
5129         Fix #377028
5130         * ecore.cs (Expression.ResolveAsTypeStep): If '!silent' attempt to
5131         emit a meaningful error message.
5132
5133         Fix #324765, #319508
5134         * flowanalysis.cs (VariableInfo.IsEverAssigned): New.
5135         (VariableInfo.SetAssigned): Set it.
5136         * statement.cs (Block.UsageWarning): Use 'IsEverAssigned' to
5137         determine if CS0219 or CS0168 is appropriate.  Don't use
5138         flow-analysis information.
5139         (Block.Resolve): Use ec.EndFlowBranching, not ec.DoEndFlowBranching.
5140         * codegen.cs (EmitContext.DoEndFlowBranching): Kill.  Inline into ...
5141         (EmitContext.EndFlowBranching): ... this.
5142
5143 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5144
5145         * class.cs, typemanager.cs: Emit volatile field with IsVolatile modifier.
5146
5147 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5148
5149         A fix for bug #376508
5150         * convert.cs, expression.cs: Fixed difference between ImplicitConversion and
5151         ImplicitConversionExists.
5152
5153 2008-04-03  Marek Safar  <marek.safar@gmail.com>
5154
5155         * expression.cs (Binary): Added remaining binary operators to expression
5156         tree builder.
5157
5158         * nullable.cs: Optimize shift with null argument.
5159
5160 2008-04-03  Raja R Harinath  <harinath@hurrynot.org>
5161
5162         Fix minor IL regression
5163         * statement.cs (TryCatch..ctor): Add 'inside_try_finally' argument.
5164         (TryCatch.DoEmit): Use it to avoid creating another ExceptionBlock.
5165         * cs-parser.jay (try_statement): Update to changes.
5166
5167         * statement.cs (TryFinally.need_exc_block): Delete.
5168         (TryFinally): Update to changes.
5169
5170         Now all ExceptionStatements are unconditional
5171         * statement.cs (CollectionForeach.DisposableWrapper): New.
5172         Extract out the try/finally code into a new wrapper.
5173         (CollectionForeach.Resolve): Use it to simplify the code.
5174
5175 2008-04-02  Raja R Harinath  <harinath@hurrynot.org>
5176
5177         Start at simplifying ExceptionStatement semantics a bit
5178         * statement.cs (TryCatch, TryFinally): Split 'Try' into two pieces.
5179         * cs-parser.jay (try_statement): Update to changes.
5180         (opt_catch_clauses): Remove.
5181         * flowanalysis.cs: Update to changes.
5182         (FlowBranching.BranchingType.TryCatch): New.
5183         (FlowBranchingTryCatch): New.
5184
5185         * flowanalysis.cs (FlowBranching.BranchingType.SwitchSection): Kill.
5186         (FlowBranching.CreateBranching): Update to changes.
5187         (FlowBranchingBlock.AddSibling): Add sanity check.
5188         * codegen.cs (EmitContext.StartFlowBranching) <Block variant>:
5189         Update to changes.
5190
5191         * iterators.cs (Iterator.MarkFinally): Remove.
5192         * statement.cs (ExceptionStatement): Update to changes.
5193
5194         Add support for skipping over finally blocks at runtime.  First
5195         in a series to fix #324708
5196         * iterators.cs (Iterator.SkipFinally): New LocalBuilder.
5197         (Iterator.EmitMoveNext): Initialize it.
5198         * statement.cs (ExceptionStatement.EmitFinally): Use it to emit a
5199         branch over the body of the 'finally' clause.
5200
5201 2008-03-31  Raja R Harinath  <harinath@hurrynot.org>
5202
5203         Avoid lopsided use of Foo/DoFoo names
5204         * statement.cs (ExpressionStatement.EmitFinallyBody):
5205         Rename from EmitFinally.
5206         (ExpressionStatement.EmitFinally): Rename from DoEmitFinally.
5207         * iterator.cs: Update to changes.
5208
5209 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5210
5211         * ecore.cs, expression.cs, nullable.cs: ConditionalLogicalOperator is now
5212         based on UserOperatorCall. More binary nullable operators clean up.
5213
5214 2008-04-02  Martin Baulig  <martin@ximian.com>
5215
5216         * symbolwriter.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
5217
5218 2008-04-02  Marek Safar  <marek.safar@gmail.com>
5219
5220         * nullable.cs: Merge user and empty conversions when lifting expression
5221         trees.
5222         
5223         * expression.cs (StringConcat): Implemented expression tree representation.
5224
5225 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5226
5227         * nullable.cs: When lifting null literal and a user operator exists, no call 
5228         is made.
5229         
5230 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5231
5232         * nullable.cs, ecore.cs, expression.cs: Convert null arithmetic to lifted
5233         null.
5234
5235 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5236
5237         * nullable.cs, expression.cs: Use namespace instead heavily nested
5238         monster abstract class.
5239
5240 2008-04-01  Marek Safar  <marek.safar@gmail.com>
5241
5242         * ecore.cs, convert.cs, constant.cs, nullable.cs, expression.cs: Implemented
5243         lifting of null literal and user operators. Clean up of some temporary
5244         nullable hacks.
5245
5246 2008-03-30  Raja R Harinath  <harinath@hurrynot.org>
5247
5248         Fix #368224, test-629.cs
5249         * flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true
5250         if it crossed an unwind-protect boundary.
5251         * iterators.cs (Yield.CheckContext): Relax check for 'yield break'.
5252         (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs
5253         inside an unwind-protected region.
5254         (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise.
5255         (Iterator.MarkYield): Add 'unwind_protect' parameter.  Emit a
5256         'leave' instead of a 'br' if unwind-protected.
5257         (Iterator.EmitYieldBreak): Likewise.
5258
5259 2008-03-29  Gert Driesen  <drieseng@users.sourceforge.net>
5260
5261         * driver.cs: Only define versioninfo resources if no win32 resource
5262         file was specified.
5263
5264 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5265
5266         A fix for bug #372375
5267         * convert.cs: Fixed boxing of nullable types.
5268
5269 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5270
5271         * typemanager.cs: Initialize InternalsVisibleTo as the very first optional
5272         type.
5273
5274 2008-03-28  Marek Safar  <marek.safar@gmail.com>
5275
5276         A fix for bug #374619
5277         * nullable.cs: Fixed guarding of EmitBitwiseBoolean.
5278         
5279 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5280
5281         * lambda.cs: Check return type only for invocation.
5282         
5283 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5284
5285         A fix for bug #374214
5286         * ecore.cs: Correctly report argument type mismatch.
5287
5288 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5289
5290         * convert.cs (ImplicitReferenceConversionCore): Correctly compare enum type
5291         and not rely on broken IsEnum.
5292
5293 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5294
5295         * nullable.cs: New file, extracted from generic.cs.
5296         
5297         * generic.cs, generic-mcs.cs, *.csproj, *.sources: Updated.
5298
5299 2008-03-27  Marek Safar  <marek.safar@gmail.com>
5300
5301         * generic.cs, convert.cs, generic-mcs.cs, expression.cs: Added lifting of
5302         predefined comparison operators and null literals.
5303         
5304         * report.cs: New warning ID.
5305         
5306 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5307
5308         A fix for bug #370577
5309         * lambda.cs: Check return type too.
5310
5311 2008-03-25  Marek Safar  <marek.safar@gmail.com>
5312
5313         A fix for bug #372846
5314         * class.cs: Automatic properties can be declared as unsafe.
5315
5316 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5317
5318         * location.cs: Use string based concatenation.
5319         
5320         * expression.cs: LiftedBinaryOperator is gmcs only.
5321         
5322 2008-03-20  Marek Safar  <marek.safar@gmail.com>
5323
5324         * generic.cs, literal.cs, ecore.cs, expression.cs: Ongoing work on nullable
5325         conversions rules and expression trees.
5326
5327 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5328
5329         * delegate.cs: Use extension method source as delegate target.
5330
5331 2008-03-19  Marek Safar  <marek.safar@gmail.com>
5332
5333         * generic.cs, generic-mcs.cs, expression.cs, ecore.cs: Rewrote nullable
5334         binary operations to be purely based on binary operations and optimized
5335         emitted code (30% less in some cases). Introduced ReducedExpression for ETs
5336         and other ET refactoring.
5337         
5338         * typemanager.cs: Fixed warning.
5339         
5340 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5341
5342         * class.cs, decl.cs, delegate.cs: Do protected modifier check on each member
5343         
5344         * symbolwriter.cs: Fixed.
5345
5346 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5347
5348         * anonymous.cs, driver.cs: Reset anonymous types counters.
5349
5350 2008-03-17  Marek Safar  <marek.safar@gmail.com>
5351
5352         * ecore.cs (MethodGroupExpr): Skip first candidate, it's already the best.
5353         
5354         * class.cs: Use fullname for all type member definitions.
5355         
5356 2008-02-19  Martin Baulig  <martin@ximian.com>
5357
5358         * class.cs
5359         (IMethodData.EmitExtraSymbolInfo): New interface method.
5360         (MethodData.Emit): Call method.EmitExtraSymbolInfo().
5361         (MethodOrOperator.EmitExtraSymbolInfo): Implement this new
5362         interface method here as an empty public virtual method.
5363
5364         * anonymous.cs
5365         (AnonymousMethodMethod.ctor): Added `string real_name' argument.
5366         (AnonymousMethodMethod.EmitExtraSymbolInfo): Override and call
5367         CodeGen.SymbolWriter.SetRealMethodName().       
5368
5369 2008-02-18  Martin Baulig  <martin@ximian.com>
5370
5371         * anonymous.cs
5372         (ScopeInfo.EmitType): Override this and emit debugging
5373         information for captured variables.
5374         (RootScopeInfo.EmitType): Override this and emit symbol
5375         information for a captured `this'.
5376
5377 2008-02-15  Martin Baulig  <martin@ximian.com>
5378
5379         * iterators.cs: Emit debugging info.
5380
5381         * codegen.cs
5382         (EmitContext.Flags): Add `OmitDebuggingInfo'.
5383         (EmitContext.OmitDebuggingInfo): New public property.
5384
5385         * statement.cs
5386         (While): Override Emit() and don't emit symbol info there; do it
5387         inside DoEmit() instead.
5388         (Block.Emit): Omit symbol information while emitting the scope
5389         initializers; don't ec.Mark() the `EndLocation'.  Fix the lexical
5390         block logic.
5391         (ExplicitBlock.IsIterator): Moved here from `ToplevelBlock'.
5392         (ToplevelBlock.MakeIterator): Pass the `flags' to `ExplicitBlock's
5393         .ctor to make `IsIterator' work.
5394
5395 2008-03-14  Martin Baulig  <martin@ximian.com>
5396
5397         * symbolwriter.cs: Added the new symbol writer function from the
5398         debugger's `terrania' branch; temporarily enclose them inside
5399         `#if !DISABLE_TERRANIA_CHANGES' conditionals until I'm back from
5400         my vacations.
5401
5402 2008-03-14  Martin Baulig  <martin@ximian.com>
5403
5404         * symbolwriter.cs
5405         (SymbolWriter): Make this a public static class.
5406
5407         * codegen.cs
5408         (CodeGen.SymbolWriter): Removed; use the new static `SymbolWriter'
5409         class instead of using `if (CodeGen.SymbolWriter != null)' everywhere.
5410
5411 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5412
5413         A fix for bug #370577
5414         * statement.cs, lambda.cs: Added extra limitations when dealing with void
5415         return type.
5416         
5417 2008-03-14  Marek Safar  <marek.safar@gmail.com>
5418
5419         * typemanager.cs (CSharpName): Made 250 times faster.
5420
5421 2008-03-13  Marek Safar  <marek.safar@gmail.com>
5422
5423         * ecore.cs, expression.cs: Emit conversion for ET shift argument.
5424         
5425 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5426
5427         * generic.cs, typemanager.cs, enum.cs, codegen.cs, statement.cs: Try not to
5428         crash when predefined field does not exist.
5429         
5430 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5431
5432         * ecore.cs (PropertyExpr): Fixed IsSingleDimensionalArrayLength regression.
5433         
5434 2008-03-12  Marek Safar  <marek.safar@gmail.com>
5435
5436         * class.cs (FixedField): Don't crash when contructors are missing.
5437
5438 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5439
5440         * typemanager.cs, namespace.cs, literal.cs, ecore.cs, class.cs, decl.cs,
5441         convert.cs, constant.cs, expression.cs, statement.cs: Use same method to
5442         check internal types accessibility for internal and external types.
5443         Replaced EnumToUnderlying by GetEnumUnderlyingType.
5444
5445 2008-03-11  Marek Safar  <marek.safar@gmail.com>
5446
5447         * support.cs, typemanager.cs, pending.cs, ecore.cs, class.cs, delegate.cs
5448         convert.cs, const.cs, anonymous.cs, constant.cs, expression.cs,
5449         attribute.cs, statement: Use corect instance of predefined types (work
5450         related to #364674).
5451
5452 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5453
5454         * expression.cs (TypeOfVoid): Fixed predefined method initialization.
5455         
5456 2008-03-07  Marek Safar  <marek.safar@gmail.com>
5457
5458         * generic.cs, typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, 
5459         class.cs, delegate.cs, iterators.cs, const.cs, constant.cs, driver.cs,
5460         expression.cs, attribute.cs, codegen.cs, statement.cs: TypeManager optional
5461         predefined types clean up, delayed predefined types members initialization
5462         (work related to #364674).
5463
5464 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5465
5466         * typemanager.cs (IsFriendAssembly): InternalsVisibleTo is not mandatory.
5467         
5468 2008-03-05  Marek Safar  <marek.safar@gmail.com>
5469
5470         * typemanager.cs, parameter.cs, rootcontext.cs, ecore.cs, class.cs, decl.cs,
5471         delegate.cs, convert.cs, driver.cs, attribute.cs, codegen.cs: TypeManager
5472         predefined types clean up (work related to #364674).
5473
5474 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5475
5476         * ecore.cs: Print an error message instead of throwing exception.
5477         
5478 2008-03-04  Marek Safar  <marek.safar@gmail.com>
5479
5480         * generic.cs, typemanager.cs, literal.cs, convert.cs, cfold.cs, constant.cs,
5481         expression.cs, statement.cs: Unififed null literal representation.
5482
5483 2008-03-03  Marek Safar  <marek.safar@gmail.com>
5484
5485         * anonymous.cs, cfold.cs, convert.cs, delegate.cs, doc.cs, ecore.cs,
5486         expression.cs: Refactored binary operators resolve phase and improved speed.
5487         The nullable code is still missing and won't work correctly, more fixes
5488         required.
5489
5490         It also fixes #323726, #324312, #324248, and many other unreported issues.
5491
5492 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
5493
5494         * report.cs (FeatureIsNotAvailable): Use 'mcs1' instead of 'mcs', and 'mcs' 
5495         instead of 'gmcs'.
5496
5497 2008-02-27  Marek Safar  <marek.safar@gmail.com>
5498
5499         * ecore.cs: Clean-up and split BetterConversion.
5500         
5501 2008-02-25  Raja R Harinath  <harinath@hurrynot.org>
5502
5503         Fix #363791
5504         * enum.cs (EnumMember.Value): Only access 'value' if
5505         ResolveValue says it's ok.
5506         (EnumMember.DoResolveValue): Don't set prev_member.value.
5507         (Enum.GetDefinition): Reverse arguments of Equals --
5508         EnumMember.Value can return 'null'.
5509
5510         * statement.cs (Switch.Error_AlreadyOccurs): Fix typo in name.
5511
5512 2008-02-22  Marek Safar  <marek.safar@gmail.com>
5513
5514         * generic.cs, expression.cs: More ongoing work on expression trees.
5515         
5516 2008-02-21  Marek Safar  <marek.safar@gmail.com>
5517
5518         * class.cs, typemanager.cs: Rewrote operator matching logic to correctly
5519         handle missing matches when mutiple operators exist.
5520         
5521 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5522
5523         A fix for bug #363218
5524         * expression.cs (ArrayCreation.Clone): Deal with multi-dimensional
5525         initializers.
5526         
5527 2008-02-20  Marek Safar  <marek.safar@gmail.com>
5528
5529         * expression.cs, constant.cs, cfold.cs: Yet another side-effect constant
5530         update. This time to deal correctly with SideEffectConstant expression used
5531         as an argument for another constant folding.
5532
5533 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
5534
5535         * typemanager.cs (DropGenericMethodArguments): Ensure we get an underlying
5536         MethodBuilder.
5537
5538 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5539
5540         * constant.cs, cfold.cs: SideEffectConstant results can apply for folding.
5541
5542 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5543
5544         A fix for bug #328136
5545         * expression.cs: Do not fold immediately LogicalAnd operators when the left
5546         side is a false constant, because we still need to evaluate the right-hand
5547         side.
5548
5549         * statement.cs (If): Emit two types of boolean constants (simple constant,
5550         side-effect constant).
5551
5552 2008-02-19  Marek Safar  <marek.safar@gmail.com>
5553
5554         * constant.cs (SideEffectConstant): Don't emit boolean constant.
5555
5556         * expression.cs: Fold immediately LogicalAnd operators when both sides are
5557         constants.
5558
5559 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5560
5561         A fix for bug #361457
5562         * ecore.cs (IsApplicable): Params methods have lower priority.
5563
5564         * support.cs: Return correct parameter modifier for params types.
5565
5566 2008-02-18  Marek Safar  <marek.safar@gmail.com>
5567
5568         * generic.cs (TypeParameter): Cache attribute target name.
5569
5570         * support.cs: Removed unused variable.
5571
5572         * typemanager.cs: Removed debugging leftover.
5573
5574         * ecore.cs: Use local type instead of a property;
5575
5576         * class.cs (VerifyMembers): Consider also parent to test whether type member
5577         is local or public.
5578
5579         * expression.cs (FullMethodDesc): Removed.
5580
5581         * attribute.cs (IsValidArgumentType): Made static.
5582
5583 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
5584
5585         Cleanup to be more readable.
5586         * Makefile (GMCS_PROFILE): Remove.
5587         (COMPILER_NAME): New helper.
5588
5589 2008-02-15  Miguel de Icaza  <miguel@novell.com>
5590
5591         * cs-tokenizer.cs: if a conditional expression happens inside a
5592         (...) this also means that we do not need to de-ambiguate between
5593         an parenthesized expression and a cast.
5594
5595         Fixes 346484.
5596
5597         * constant.cs (SideEffectConstant): a constant value that happens
5598         to have a side effect.
5599
5600         Fixes the build regressions introduced by the fix for #359789
5601
5602 2008-02-14  Rodrigo Kumpera  <rkumpera@novell.com>
5603
5604         * expression.cs (Conditional.Emit): when emitting the ternary
5605         operator, use local variables to generate code verifiable code.
5606
5607         The verifier cannot infer that the type on stack before the
5608         stloc.0 is executed is of type ParentB. This happens because the
5609         stack merge algorithm uses only parent types when deciding which
5610         is the common type.  This is described in Part III 1.8.1.3 of ECMA
5611         335.
5612
5613         This code compiled with mcs is not verifiable under MS. The MS
5614         verifier picks the first common interface of Foo and Bar, which is
5615         wrong, but doesn't use a full join type of the 2 interfaces.
5616
5617         CSC uses a clever hack to compile such code in a verifiable
5618         way. It stores the intermediate values in a local variable with
5619         the expected type.
5620
5621         Fixes: #358102
5622
5623 2008-02-14  Miguel de Icaza  <miguel@novell.com>
5624
5625         * expression.cs: Do not fold BitwiseAnd operators when the left
5626         side is a false constant, because we still need to evaluate the
5627         right-hand side.
5628
5629         Fixes #359789
5630
5631         * support.cs: Instead of throwing an InternalErrorException when
5632         the position of the stream is outside the boundary of our buffer,
5633         reset the state of the reader, and restart the reading from the
5634         beginning of the file.
5635
5636 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5637
5638         * generic.cs (TypeParameter.GetMembers): Is not supported operation.
5639
5640 2008-02-14  Marek Safar  <marek.safar@gmail.com>
5641
5642         A fix for bug #361686
5643         * decl.cs: A protected types used inside a private class which parents
5644         derives from the protected class are accessible.
5645
5646 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5647
5648         * generic.cs (ConstraintChecker): Use cached member lookup when looking for
5649         the parameterless constructor.
5650
5651 2008-02-13  Marek Safar  <marek.safar@gmail.com>
5652
5653         * generic.cs, typemanager.cs, iterators.cs, codegen.cs: Refactored core
5654         lookup methods to use standard member cache when doing member lookup.
5655
5656 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5657
5658         * driver.cs: Don't report full path for referenced module as assembly error.
5659
5660 2008-02-12  Marek Safar  <marek.safar@gmail.com>
5661
5662         * Makefile: Fixed `qh' target to work on all machines.
5663
5664         * report.cs, typemanager.cs, parameter.cs, ecore.cs, class.cs, anonymous.cs,
5665         expression.cs, codegen.cs, statement.cs, doc.cs: Replaced type IsSubclassOf
5666         and HasElementType with TypeManager implementation.
5667
5668 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5669
5670         A fix for bugs #325134, #359749
5671         * expression.cs, ecore.cs: Try to resolve an extension method even if the
5672         first binds point to non-method member expression.
5673
5674 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5675
5676         * cs-parser.jay: Null coalescing operator is not part of ISO-1.
5677
5678 2008-02-08  Marek Safar  <marek.safar@gmail.com>
5679
5680         A fix for bugs #321394, #323028
5681         * generic.cs, parameter.cs, ecore.cs, class.cs, decl.cs, delegate.cs:
5682         Reworked naive IsAccessibleAs implementation to handle nested types.
5683
5684 2008-02-05  Jb Evain  <jbevain@novell.com>
5685
5686         * class.cs: use generic type comparison for parameters
5687         as well.
5688
5689 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5690
5691         A fix for bug #325372
5692         * class.cs: Use generic type comparison when testing method signatures.
5693
5694 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5695
5696         A fix for bug #357047
5697         * ecore.cs: Applied C# 3.0 changes to better conversion.
5698
5699 2008-02-05  Marek Safar  <marek.safar@gmail.com>
5700
5701         A fix for bug #358374
5702         * cs-parser.jay: Correctly set modifiers for all constructor types.
5703
5704 2008-02-04  Marek Safar  <marek.safar@gmail.com>
5705
5706         A fix for bug #355251
5707         * generic.cs: Added base class constraint based type inference.
5708
5709 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5710
5711         A fix for bug #357255
5712         * decl.cs: One more missing visibility check.
5713
5714 2008-02-01  Marek Safar  <marek.safar@gmail.com>
5715
5716         * support.cs: Fixed broken return.
5717
5718 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5719
5720         * report.cs: Correctly reset warnings count after probing.
5721
5722 2008-01-25  Martin Baulig  <martin@ximian.com>
5723
5724         * namespace.cs
5725         (NamespaceEntry.SymbolFileID): Make this work again after
5726         MemberName.ToString() is gone.
5727
5728 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5729
5730         * expression.cs: Implemented Divide, Equal, ExclusiveOr, GreaterThanOrEqual
5731         expressions.
5732
5733 2008-01-25  Marek Safar  <marek.safar@gmail.com>
5734
5735         * generic.cs: Use full implicit conversion for type inference fixing.
5736
5737 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5738
5739         * ecore.cs, expression.cs, generic.cs: Implemented Convert, ConvertChecked.
5740         Fixed user operator conversions.
5741
5742 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5743
5744         * generic.cs: Do nullable type to null comparison optimization during
5745         resolve phase.
5746
5747 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5748
5749         A fix for bug #355163
5750         * generic.cs: Enabled l-value resolve on nullable expressions.
5751
5752 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5753
5754         A fix for bug #353986
5755         * class.cs: Ingore static ctors with parameters for any further checks.
5756
5757 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5758
5759         A fix for bug #354310
5760         * namespace.cs: Removed redundant check.
5761
5762 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5763
5764         A fix for bug #354928
5765         * expression.cs: ElementInitializers can be resolved only once.
5766
5767 2008-01-24  Marek Safar  <marek.safar@gmail.com>
5768
5769         * convert.cs, ecore.cs, expression.cs, generic.cs: Implemented Coalesce and
5770         Condition expressions.
5771
5772 2008-01-23  Marek Safar  <marek.safar@gmail.com>
5773
5774         * codegen.cs: Fixed AssemblyBuilder initialization on other platforms.
5775
5776 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5777
5778         * ecore.cs, expression.cs, generic.cs: Implicit bool? to bool conversion is
5779         not allowed.
5780
5781         * generic.cs: Implemented coalesce expression.
5782
5783 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5784
5785         A fix for bug #355145
5786         * anonymous.cs, convert.cs, ecore.cs, generic.cs, lambda.cs: Implemented
5787         expression tree type inference.
5788
5789 2008-01-22  Raja R Harinath  <harinath@hurrynot.org>
5790
5791         Fix #354663
5792         * expression.cs (Binary.IsUnsignedType): Fix typo.
5793
5794 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5795
5796         * ecore.cs, expression.cs, generic.cs: Implemented NewArrayInit expression.
5797
5798 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5799
5800         A fix for bug #355161
5801         * ecore.cs, expression.cs: Wider range of extension method supported
5802         expressions.
5803
5804 2008-01-22  Gert Driesen  <drieseng@users.sourceforge.net>
5805
5806         * codegen.cs: Use magic value for AssemblyBuilderAccess to instruct
5807         AssemblyBuilder to operate in compiler context. Fixes mcs part of
5808         bug #354970.
5809
5810 2008-01-22  Marek Safar  <marek.safar@gmail.com>
5811
5812         A fix for bug #355148
5813         * ecore.cs, expression.cs: Correctly report misused ref and out modifiers.
5814
5815 2008-01-22  Miguel de Icaza  <miguel@novell.com>
5816
5817         * expression.cs (CreateExpressionTree): Add support for or and
5818         logical or, and indent following the coding conventions.
5819
5820         * typemanager.cs (LinqExpression): renamed from
5821         ExpressionTreeManager, for a shorter name.
5822
5823         Use TypeManager.CoreLookupType to lookup types from our core
5824         assemblies and turn those into "Type" variables.
5825
5826         Consumers that previously used "Namespace" and "Type" from this
5827         class should instead use the TypeExpression which is a type that
5828         is fully resolved (without involving the regular C# resolution
5829         rules). 
5830
5831         This typically looks like this:
5832
5833         TypeExpression texpr = new TypeExpression (LinqExpression.expression_type, loc);
5834         new MemberAccess (texpr, name, type_arguments, loc)
5835
5836         This avoids the problem in: #355178
5837
5838 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5839
5840         * cs-parser.jay, expression.cs: Check `namespace alias qualifier' language
5841         feature in parser only as we do in other cases.
5842         
5843 2008-01-21  Marek Safar  <marek.safar@gmail.com>
5844
5845         * attribute.cs, ecore.cs, class.cs, delegate.cs, expression.cs, linq.cs,
5846         typemanager.cs: A refactoring of params arguments to reuse existing
5847         expressions (params -> array initializer) to emit params argument instead
5848         of specialized handling.
5849         It was required by expression tree implementation and it has other benefits
5850         as well, we now apply same optimization for params arguments as we do for
5851         array initializers.
5852         
5853 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5854
5855         A fix for bug #353526
5856         * generic.cs: A type inference of params arguments may not required any
5857         temporary array creation.
5858         
5859 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5860
5861         A fix for bug #353534
5862         * generic.cs, ecore.cs, expression.cs: A method group type inference is
5863         supported for delegates only.
5864         
5865 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5866
5867         * generic.cs: Fixed 3.0 type inference fixing phase to determine a unique
5868         type for more than 1 candidates.
5869         
5870 2008-01-18  Marek Safar  <marek.safar@gmail.com>
5871
5872         * typemanager.cs, ecore.cs, expression.cs: Implemented ArrayLength and Call
5873         expressions.
5874         
5875 2008-01-16  Marek Safar  <marek.safar@gmail.com>
5876
5877         * generic.cs, typemanager.cs, lambda.cs, parameter.cs, ecore.cs, constant.cs,
5878         expression.cs: Implemented Add, And, AndAlso, and ArrayIndex (without unary
5879         operator) expressions. 
5880                 
5881 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5882
5883         * statement.cs: Avoid declaring an IL variable for this_variable since it is
5884         not accessed from the generated IL.
5885
5886 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5887
5888         * typemanager.cs, lambda.cs, parameter.cs, ecore.cs, class.cs, delegate.cs,
5889         iterators.cs, convert.cs, assign.cs, anonymous.cs, expression.cs,
5890         statement.cs: The first expression tree implementation drop, mostly
5891         infrastructure work.
5892
5893 2008-01-14  Marek Safar  <marek.safar@gmail.com>
5894
5895         * ecore.cs (IsNestedChild): Refactored.
5896
5897 2008-01-11  Marek Safar  <marek.safar@gmail.com>
5898
5899         * lambda.cs: Don't use a cast on unknown expression statement.
5900
5901 2008-01-10  Geoff Norton  <gnorton@novell.com>
5902
5903         * cs-tokenizer.cs: One more token to distinguish between method and lambda
5904         arguments
5905
5906 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5907
5908         * doc.cs: Report better /doc crash details.
5909         
5910 2008-01-09  Marek Safar  <marek.safar@gmail.com>
5911
5912         A fix for bug #352536
5913         * ecore.cs, assign.cs, codegen.cs: Check event assignments.
5914
5915 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5916
5917         A fix for bug #352287
5918         * ecore.cs, expression.cs: Do `this' access checking in all member access
5919         expressions.
5920         
5921 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5922
5923         * rootcontext.cs, driver.cs: Switch to linq mode by default.
5924         
5925         * report.cs: Reset message stacks.
5926         
5927 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5928
5929         * generic.cs (InferInPhases): Correctly calculate params position.
5930         
5931 2008-01-08  Marek Safar  <marek.safar@gmail.com>
5932
5933         * cs-tokenizer.cs: No need to parse full string when parsing lambda
5934         arguments.
5935
5936 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5937
5938         * cs-tokenizer.cs: Enabled lambda arguments micro-parser for all profiles.
5939         
5940         * decl.cs (LookupNamespaceOrType): Don't cache names which caused an error.
5941         
5942         * driver.cs: Updated --help option.
5943         
5944 2008-01-07  Marek Safar  <marek.safar@gmail.com>
5945
5946         * generic.cs (InferParamsTypeArguments): Removed.
5947         (InferInPhases): Add params type inference.
5948         (LowerBoundInference): Fixed scoring mechanism.
5949         
5950         * cs-tokenizer.cs (PreProcessPragma): Use Location instead of line.
5951         
5952 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
5953
5954         * typemanager.cs: On 2.0 profile, GetPublicKeyToken returns an empty
5955         byte array for unsigned "baked" assemblies.
5956
5957 2008-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
5958
5959         * codegen.cs: AssemblyName.GetPublicKey returns a zero-length byte
5960         array for assemblies that are not strongnamed.
5961
5962 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5963
5964         A fix for bug #351481
5965         * expression.cs (MemberAccess.ResolveNamespaceOrType): Use correct
5966         declaring type for nested generic types.
5967         
5968 2008-01-04  Marek Safar  <marek.safar@gmail.com>
5969
5970         * namespace.cs, class.cs, decl.cs, cs-parser.jay: Use GetSignatureForError
5971         instead of ToString.
5972         
5973 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5974
5975         A fix for bug #351047
5976         * expression.cs (Binary.ResolveOperator): Allow equality operators between
5977         null and structs only when equality and inequality operators are defined
5978         either as an user-operators or predefined operators.
5979         
5980 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5981
5982         A fix for bug #351047
5983         * generic.cs, typemanager.cs, class.cs: New IsReferenceType helper method.
5984         
5985 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5986
5987         A fix for bug #351257
5988         * cs-tokenizer.cs: Advance line number for '\r' correctly.
5989         
5990 2008-01-03  Marek Safar  <marek.safar@gmail.com>
5991
5992         A fix for bug #351157
5993         * class.cs (Using): Fixed yet another broken cloning.
5994         
5995         (Block): Put back more sensible default value for statements.
5996         
5997 2008-01-01  Gert Driesen  <drieseng@users.sourceforge.net>
5998
5999         * codegen.cs: Allow AssemblyVersion with only major version component.
6000         Fixes bug #351055.
6001
6002 2007-12-29  Marek Safar  <marek.safar@gmail.com>
6003
6004         A fix for bug #324654
6005         * class.cs: Use FullName property as member name.
6006
6007 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6008
6009         A fix for bug #342117
6010         * generic.cs (ConstraintChecker): Struct constraint also satisfies default
6011         constructor constraint.
6012
6013 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6014
6015         A fix for bug #338273
6016         * class.cs (ProbertyBase): Access modifier checks are required for overrides
6017         only.
6018
6019 2007-12-28  Marek Safar  <marek.safar@gmail.com>
6020
6021         A fix for bug #350839
6022         * ecore.cs (MethodroupExpr): Probing hacks are no longer required.
6023
6024 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6025
6026         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6027         GHOP:
6028         
6029         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6030
6031         * statement.cs: Changed some Hashtables to use HybridDictionaries
6032         instead. It was observed that some HashTables only contained a few
6033         items in the vast majority of cases. Since HybridDictionary is
6034         more efficient on small sets (<10 elements), "known_variables"
6035         from class ExplicitBlock as well as "labels" and "constants " from
6036         class Block were changed to HybridDictionaries. 
6037
6038         Atsai results: (56216kb->54987kb)
6039
6040         Miguel results (bootstrap of mcs): 59819kb -> 59290kb
6041
6042
6043 2007-12-27  AdTsai (http://code.google.com/u/AdTsai/)
6044
6045         Reviewed by Ben Maurer, Miguel de Icaza, patches from Google's
6046         GHOP:
6047         
6048         http://code.google.com/p/google-highly-open-participation-mono/issues/detail?id=4 
6049         
6050         * expression.cs: foreach loop to for loop, saved on allocation of
6051         enumerator (59333kb->59141kb)
6052
6053         * statement.cs. Changed foreach loops to for loops, saved on
6054         allocation of enumerator (59141kb->59006kb)
6055
6056         * decl.cs: ArrayLists in .NET 1.1 allocate 16 elements by default
6057         when constructed with no specified capacity. This was causing a
6058         few ArrayLists to allocate more memory than they would potentially
6059         need in the Block class and MemberCache class. Setting the
6060         ArrayLists to construct with a capacity of 1 saves some
6061         memory. (56216kb->55585kb)
6062
6063 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6064
6065         A fix for bug #347189 (2nd issue)
6066         * expression.cs (MemberAccess): Nested type can be found in base non-generic
6067         type.
6068
6069 2007-12-27  Miguel de Icaza  <miguel@novell.com>
6070         
6071         * report.cs: Do not use colors if stdout and stderr are not a
6072         terminal.
6073
6074 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6075
6076         A fix for bug #346998
6077         * ecore.cs (MethodGroupExpr): Implemented override filter for generic
6078         overloads.
6079
6080 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6081
6082         A fix for bug #343465
6083         * class.cs: Explicit method name for nested types uses dots only.
6084
6085 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6086
6087         A fix for bug #343707
6088         * cs-tokenizer.cs: Advance line number for mixed CR/LF files correctly.
6089
6090 2007-12-27  Marek Safar  <marek.safar@gmail.com>
6091
6092         * ecore.cs: Report type inference errors only when arguments count matches
6093         parameter count.
6094         
6095         * generic.cs (NullCoalescingOperator): Cannot be applied to null.
6096         
6097         * expression.cs, report.cs: New warning.
6098         
6099         * typemanager.cs: Catch anonymous method type too.
6100
6101 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6102
6103         A fix for bug #346379
6104         * expression.cs (UnaryMutator): Emit size of type for pointer mutator.
6105
6106 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6107
6108         A fix for bug #347359
6109         * expression.cs (Invocation): Don't resolve already resolved expression.
6110
6111 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6112
6113         A fix for bug #347189
6114         * class.cs (FixedField): Use non-dependent code only in the define phase.
6115
6116 2007-12-23  Marek Safar  <marek.safar@gmail.com>
6117
6118         A fix for bug #348076
6119         * ecore.cs (FieldExpr.DoResolve): Allow any variable based expression.
6120
6121 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6122
6123         * ecore.cs (MethodGroupExpr.OverloadResolve): Set type arguments for
6124         discovered extension methods.
6125
6126 2007-12-22  Marek Safar  <marek.safar@gmail.com>
6127
6128         * ecore.cs, namespace.cs, expression.cs: Removed broken ResolveGeneric
6129         method.
6130
6131 2007-12-21  Miguel de Icaza  <miguel@novell.com>
6132
6133         * report.cs (ErrorMessage): Add support for using colors on
6134         terminals that support it. 
6135
6136 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6137
6138         * ecore.cs: Use information about expanded params for error reporting.
6139
6140 2007-12-21  Marek Safar  <marek.safar@gmail.com>
6141
6142         * ecore.cs, generic.cs, delegate.cs: Refactoring of method overloading code
6143         and logic for params overloads.
6144         
6145 2007-12-15  Miguel de Icaza  <miguel@novell.com>
6146
6147         * generic.cs (NullCoalescingOperator.CloneTo): implement this one,
6148         as this is also created from the parser.  Fixes #349034
6149
6150 2007-12-12  Miguel de Icaza  <miguel@novell.com>
6151
6152         * statement.cs (Throw.CloneTo): it is valid to have empty
6153         expressions for throw. 
6154
6155 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6156
6157         * cs-parser.jay: Set delegate constraint parsing region correctly.
6158
6159 2007-12-03  Marek Safar  <marek.safar@gmail.com>
6160
6161         A fix for bug #345467
6162         * typemanager.cs (IsEqual): Compare generic parameters position only.
6163         
6164 2007-11-28  Marek Safar  <marek.safar@gmail.com>
6165
6166         * expression.cs (BaseAccess): Type arguments can be null.
6167
6168 2007-11-27  Raja R Harinath  <harinath@gmail.com>
6169
6170         * statement.cs (Block.Resolve): Ensure flow-branching tree is
6171         consistent even when an error has occured.
6172         (Switch.Resolve): Likewise.
6173
6174 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6175
6176         A fix for bug #334505
6177         * class.cs: Don't ignore InternalsVisibleTo attribute for internal
6178         overrides.
6179         
6180 2007-11-22  Marek Safar  <marek.safar@gmail.com>
6181
6182         * ecore.cs, typemanager.cs, delegate.cs, expression.cs: The first of 
6183         refactorings required to resolve extension methods correctly when mixing
6184         generics and non-generics members.
6185         
6186 2007-11-20  Marek Safar  <marek.safar@gmail.com>
6187
6188         A fix for bug #342584
6189         * convert.cs: Added not documented explicit IntPtr/UIntPtr to enum
6190         conversion.
6191         
6192 2007-11-19  Marek Safar  <marek.safar@gmail.com>
6193
6194         A fix for bug #342512
6195         * delegate.cs: Use delegate argument expression when is available. Don't
6196         emit virtual call when class is sealed.
6197         
6198 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6199
6200         A fix for bug #325423
6201         * assign.cs (FieldInitializer): Use resolved expression for emit.
6202         
6203         * class.cs: Print less confusing error message.
6204         
6205 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6206
6207         * cs-tokenizer.cs: Removed GMCS ifdefs.
6208         
6209         * rootcontext.cs, report.cs: Report unavailable gmcs features used by
6210         mcs.
6211         
6212         * cs-parser.jay: Disabled nullable check.
6213         
6214         * generic-mcs: Copied more generic stuff.
6215                 
6216 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6217
6218         * gcs-parser.jay: Merged to cs-parser.jay.
6219         
6220         * generic.cs, typemanager.cs, cs-tokenizer.cs, linq.cs, Makefile
6221         * *.csproj, *.sources: Updated to use only jay parser file.
6222
6223 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6224
6225         * gcs-parser.jay: Added nullable and default expression feature checks.
6226         
6227 2007-11-16  Marek Safar  <marek.safar@gmail.com>
6228
6229         * gcs-parser.jay, cs-parser.jay, class.cs: Unified parameters parsing, 
6230         it fixes many TODOs and hidden bugs.
6231         
6232         * expression: Removed duplicate error check.
6233
6234 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6235
6236         * gcs-parser.jay, statement.cs, decl.cs, ecore.cs: Try to resolve an
6237         implicitly type local variable only when it is used in a declaration.
6238
6239 2007-11-15  Marek Safar  <marek.safar@gmail.com>
6240
6241         * attribute.cs: Use CS0612 for empty strings.
6242
6243 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6244
6245         * lambda.cs, statement.cs: Contextual return may act as a statement.
6246
6247 2007-11-14  Marek Safar  <marek.safar@gmail.com>
6248
6249         A fix for a regression cause by #324222
6250         * class.cs: Don't report unused even when it implements an interface.
6251         
6252 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6253
6254         A fix for bug #341205
6255         * ecore.cs, expression.cs: Method group expression cannot do static
6256         method access with an instance reference check before overloading takes
6257         a place.
6258         
6259 2007-11-13  Marek Safar  <marek.safar@gmail.com>
6260
6261         A fix for bug #325359
6262         * class.cs: Use predictable name for automatically generated property.
6263         
6264 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6265
6266         A fix for bug #324996
6267         * expression.cs (Is): Handle case where D is nullable and T is not
6268         correctly.
6269         
6270         * generics.cs (Nullable.HasValue): Nullable HasValue expression.
6271         
6272 2007-11-12  Marek Safar  <marek.safar@gmail.com>
6273
6274         * generic.cs, literal.cs, ecore.cs, class.cs, delegate.cs, const.cs,
6275         anonymous.cs, expression.cs, attribute.cs, codegen.cs, statement.cs:
6276         Flush small error reporting changes.
6277         
6278 2007-11-09  Marek Safar  <marek.safar@gmail.com>
6279
6280         A fix for bug #324996
6281         * expression.cs: Rewrote Is expression implementation to work with
6282         generics, nullable types, anonymous method. A const result expression 
6283         uses existing infrastructure instead of custom not fully-featured one.
6284         
6285 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6286
6287         A fix for bug #340202
6288         * class.cs: Consider generics for volatile field.
6289
6290 2007-11-08  Marek Safar  <marek.safar@gmail.com>
6291
6292         A fix for bug #335594
6293         * expression.cs: Use conversion rules when handling string addition.
6294         
6295 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6296
6297         A fix for bug #336651
6298         * expression.cs: Fixed a crash when probing is on.
6299         
6300 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6301
6302         A fix for bug #324242
6303         * covert.cs: Added a conversion from any nullable-type with an 
6304         underlying enum-type to the type System.Enum.
6305         
6306 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6307
6308         A fix for bug #324222
6309         * class.cs: Report all non-used event fields.
6310         
6311 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6312
6313         A fix for bug #325161
6314         * cs-parser.jay, gcs-parser.jay, decl.cs: Implemented namespace alias
6315         qualifier for generic types.
6316         
6317 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6318
6319         A fix for bug #322971
6320         * expression.cs, ecore.cs: Added intermediate result value check for
6321         indexers. 
6322         
6323 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6324
6325         A fix for bug #324754
6326         * cs-parser.jay, gcs-parser.jay, class.cs: Try to create an interator
6327         when it was requested.
6328
6329 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6330
6331         A fix for bug #325101
6332         * expression.cs: Do type not value comparison for `is' expression.
6333
6334 2007-11-07  Marek Safar  <marek.safar@gmail.com>
6335
6336         A fix for bug #320236
6337         * convert.cs: Don't apply user conversion on underlying target type.
6338
6339 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6340
6341         * expression.cs: Don't use unresolved expression for error reporting.
6342  
6343 2007-11-06  Marek Safar  <marek.safar@gmail.com>
6344
6345         A fix for bugs #337712, #324490
6346         * ecore.cs (MethodGroupExpr): Refactored to handle delegate method
6347         overloading resolution too.
6348         
6349         * delegate.cs: Uses MethodGroupExpr for overloading resolution. It makes
6350         the process consistent and more robust.
6351         
6352         * expression.cs, linq.cs, report.cs: Update.
6353
6354 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6355
6356         A fix for bug #332909
6357         * attribute.cs: Resolve attributes in correct context using error
6358         handling procedure.
6359         
6360         * rootcontext.cs: Define Obsolete attribute members as core members.
6361         
6362 2007-11-02  Marek Safar  <marek.safar@gmail.com>
6363
6364         * statement.cs: Removed unused methods.
6365         
6366 2007-10-31  Wade Berrier  <wberrier@novell.com>
6367
6368         * Makefile:  reenable copy of gmcs.exe.config, but include it in EXTRA
6369         DIST (it doesn't get included because PROGRAM isn't defined to be gmcs
6370         during 'make dist')
6371
6372 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6373
6374         A fix for bug #338102
6375         * decl.cs (CheckExistingMembersOverloads): Workaround issue with generic
6376         methods registered as non-generics.
6377         
6378 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6379
6380         A fix for bugs #337712, #324490
6381         * delegate.cs: Delegate covariance and contravariance is not allowed for
6382         value types.
6383         
6384 2007-10-31  Marek Safar  <marek.safar@gmail.com>
6385
6386         A fix for bug #337719 
6387         * cs-tokenizer.cs: Restore identifier buffer when parsing contextual
6388         `from' keyword.
6389         
6390 2007-10-30  Marek Safar  <marek.safar@gmail.com>
6391  
6392         * Makefile (net_2_0_bootstrap/mcs.exe.config): Reverted copy gmcs.exe.config.
6393
6394 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6395  
6396         * cs-tokenizer.cs, gcs-parser.jay, driver.cs: Fixed parsing of nested
6397         query expressions.
6398
6399 2007-10-29  Raja R Harinath  <rharinath@novell.com>
6400
6401         * Makefile (net_2_0_bootstrap/mcs.exe.config): Copy gmcs.exe.config.
6402
6403 2007-10-29  Marek Safar  <marek.safar@gmail.com>
6404  
6405         A fix for bug #334652
6406         * ecore.cs (MethodGroupExpr.OverloadResolve): Do also lookup for
6407         extension methods when we have not found the best candidate in normal
6408         container.
6409
6410 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6411
6412         * AssemblyInfo.cs: Keep up-to-date.
6413
6414 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6415
6416         * Makefile: Fixed generics compiler name.
6417         
6418 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6419
6420         * lambda.test: removed, lambda parsing is done differently.
6421         
6422         * gen-il.cs, gen-treedump.cs, old-code.cs : Obsolete.
6423
6424 2007-10-27  Gert Driesen  <drieseng@users.sourceforge.net>
6425
6426         * Makefile: Removed dependency on gmcs.exe.config. Fixes build.
6427
6428 2007-10-27  Marek Safar  <marek.safar@gmail.com>
6429
6430         * Makefile, *.sources : All C# compilers are in mcs folder.
6431         
6432         * *.cs: Use existing 2_1 define for smcs.
6433
6434 2007-10-26  Marek Safar  <marek.safar@gmail.com>
6435
6436         A fix for bug #335847
6437         * assign.cs, expression.cs: Couple of changes to avoid creating a
6438         temporary variable for each object initializer assignment statement. It
6439         simplifies struct initialization too, otherwise two temporary variables
6440         would be required.
6441         Implemented optimization of redundant default element initializers.
6442         
6443 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6444
6445         A fix for bug #336766
6446         * expression.cs (Class.CheckBase): Use generic name when method is
6447         generic.
6448         
6449 2007-10-25  Marek Safar  <marek.safar@gmail.com>
6450
6451         A fix for bug #334737
6452         * expression.cs (IndexerAccess.EmitAssign): Emit local temporary
6453         variable and not variable argument for prepared copies.
6454
6455 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6456
6457         A fix for bug #325110
6458         * class.cs, expression.cs, attribute.cs: Use open generic method when
6459         checking conditional attribute.
6460         
6461 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6462
6463         * report.cs, cs-tokenizer.cs, class.cs, cs-parser.jay, anonymous.cs, 
6464         expression.cs, statement.cs: Renamed method FeatureIsNotISO to
6465         FeatureIsNotAvailable.
6466
6467 2007-10-24  Marek Safar  <marek.safar@gmail.com>
6468
6469         ** C# 3.0 Partial methods
6470         
6471         * cs-tokenizer.cs, support.cs, class.cs, decl.cs: Implemented partial
6472         methods support. Because of member cache issue with generics only
6473         non-generics partial methods are fully supported.
6474         
6475 2007-10-23  Marek Safar  <marek.safar@gmail.com>
6476         
6477         * class.cs, decl.cs: Rewrote member overloads check to cope with 
6478         generics and to use member cache for member checking. It also improves
6479         performance and fixes remaining overloads issues.
6480         
6481 2007-10-20  Marek Safar  <marek.safar@gmail.com>
6482         
6483         * class.cs, const.cs, decl.cs, delegate.cs, enum.cs, generic.cs,
6484         roottypes.cs, typemanager.cs:
6485                 
6486         A member cache creation logic changed to add members immediately and
6487         not rely on fallback. The member cache is now only prefered way
6488         how to access and find type declaration members. It saves 5 MB of memory
6489         during MWF compilation and makes code ready for more optimizations and
6490         clean-ups, it's also a pre-requirement for partial methods.
6491         
6492 2007-10-18  Raja R Harinath  <harinath@gmail.com>
6493
6494         * ecore.cs (Expression.Error_ValueCannotBeConverted): Add special
6495         handling for generic parameters.
6496
6497 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6498         
6499         * class.cs (FixedField): Removed redundant volatile check.
6500         
6501 2007-10-15  Marek Safar  <marek.safar@gmail.com>
6502         
6503         * class.cs, decl.cs: Fixed overload members verification to do only one
6504         check per possible collision.
6505         
6506 2007-10-13  Marek Safar  <marek.safar@gmail.com>
6507         
6508         A fix for bug #325478
6509         * anonymous.cs (AnonymousContainer.Compatible): Merge are flags together
6510         and create only one disposable flags container.
6511         
6512 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6513         
6514         A fix for bug #332442 by Alexandre Gomes <alexmipego@gmail.com>
6515         * statement.cs (Fixed): Fixed variables cloning.
6516         
6517 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6518         
6519         A fix for bug #333342
6520         * class.cs (EventField): Don't mark value type event as synchronized. 
6521         
6522 2007-10-12  Marek Safar  <marek.safar@gmail.com>
6523         
6524         * ecore.cs, anonymous.cs (MethodGroupExpr): Use score from type
6525         inference to identify best candidate method correctly.
6526         (ProperyExpr): A range variable is read only and cannot be modified.
6527         
6528 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6529         
6530         * ecore.cs, delegate.cs (MethodGroupExpr): Refactored best candidate
6531         logic to identify best candidate method correctly.
6532         
6533 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6534         
6535         * location.cs (Equals, GetHashCode): Removed.
6536         
6537 2007-10-11  Marek Safar  <marek.safar@gmail.com>
6538         
6539         * report.cs: Implemented message recorder. It is used mainly for lambda
6540         expressions to capture otherwise swallowed error messages.
6541         
6542         * anonymous.cs, lambda.cs.cs: Do full parameters check.
6543
6544         * ecore.cs (ExtensionMethodGroup): Report binding failure at the botton
6545         and not at the top.
6546         (MethodGroupExpr.DoResolve): Use message recorder for error handling.
6547                 
6548         * expression.cs (MemberAccess): Always report lookup failure.
6549         
6550         * location.cs: Implemented Equals, GetHashCode.
6551         
6552         * statement.cs (Return.DoResolve): Fixed hardcoded error argument.
6553         
6554 2007-10-10  Jb Evain  <jbevain@novell.com>
6555
6556         * codegen.cs: re-enable assembly version check.
6557
6558 2007-10-09  Marek Safar  <marek.safar@gmail.com>
6559         
6560         * report.cs, anonymous.cs, driver.cs, expression.cs: Added few ISO-2
6561         checks.
6562         
6563         * namespace.cs (UsingAlias): Do correct version check.
6564         
6565 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6566         
6567         * expresison.cs, ecore.cs: Issue extension method error message when
6568         appropriate.
6569         
6570         * rootcontext.cs: Added ISO_2 compiler mode option.
6571
6572 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6573         
6574         * expresison.cs (UnaryMutator.ResolveOperator): Print more useful error
6575          message.
6576         
6577 2007-10-08  Marek Safar  <marek.safar@gmail.com>
6578         
6579         * attribute.cs (GetString, GetBoolean): Work with both literal and
6580         constant.
6581         
6582         * ecore.cs, expresison.cs, delegate.cs (Invocation, MethodGroupExpr):
6583         Moved method overload specific methods to MethodGroupExpr.
6584         
6585         (IndexerAccess): Re-wrote resolving mechanism, fixed many issues and
6586         it should be less memory consuming.
6587         
6588 Mon Oct 8 09:29:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6589
6590         * codegen.cs: remove the assembly version check until the buildbot is
6591         fixed.
6592
6593 2007-10-07  Jb Evain  <jbevain@novell.com>
6594
6595         * attribute.cs (Attribute.GetString): if the value
6596         expression is a StringConstant, return its string value.
6597
6598 2007-10-07  Jb Evain  <jbevain@novell.com>
6599
6600         * typemanager.cs: add `assembly_version_attribute_type`.
6601         * codegen.cs: on attribute emission, check that the
6602         AssemblyVersionAttribute doesn't overflow.
6603
6604 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6605         
6606         A fix for bug #324677
6607         * anonymous.cs, decl.cs: Yes another anonymous container hack. Overwrite
6608         parent container of a scope container with currently resolved one. 
6609         
6610 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6611         
6612         A fix for bug #325534
6613         * class.cs (Invocation.DoResolve): Check invocation of object finalizer
6614         only.
6615         
6616 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6617         
6618         A fix for bug #327504
6619         * class.cs (Operator.Define): Refactored implicit and explicit user
6620         operator conversion rules.
6621         
6622 2007-10-05  Marek Safar  <marek.safar@gmail.com>
6623         
6624         A fix for bug #327520
6625         * ecore.cs (ExtensionMethodGroupExpr): Emit resolved extension argument.
6626         
6627 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6628         
6629         A fix for bug #328022
6630         * class.cs (MethodData.Define): Use correct method to check whether
6631         a method implementents an accessor.
6632         
6633 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6634         
6635         A fix for bug #330069
6636         * statement.cs (Fixed.Resolve): Read the first array element only when
6637         an array is instantiated. 
6638         
6639 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6640         
6641         * expression.cs, assign.cs, generics.cs: Print correct operator when
6642         compound assignment is used.
6643         
6644 2007-10-04  Marek Safar  <marek.safar@gmail.com>
6645         
6646         A fix for bug #325841
6647         * expression.cs (ArrayAccess): Use full argument cloning only for
6648         string compound concatenation.
6649         
6650 2007-10-03  Marek Safar  <marek.safar@gmail.com>
6651         
6652         A fix for bug #328774
6653         * ecore.cs (FieldExpr.EmitAssign): Fixed string concatenation compound
6654         assignment.
6655         (PropertyExpr.EmitAssign): Fixed string concatenation compound
6656         assignment.
6657
6658 2007-10-03  Raja R Harinath  <rharinath@novell.com>
6659
6660         Fix #328490
6661         * ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
6662         Event accessibility checks here.  Remove some bogus code that
6663         accidently made GenericMethods work.
6664         (PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
6665
6666 2007-09-25  Marek Safar  <marek.safar@gmail.com>
6667         
6668         * expression.cs (ArrayCreation): Fixed cloning of an implicit types.
6669         
6670         * statement.cs (Block): Refactored AddVariable to allow error handling
6671         customization.
6672         
6673         * generic.cs: New stub.
6674         
6675 2007-09-23  Marek Safar  <marek.safar@gmail.com>
6676         
6677         * anonymous.cs, codegen.cs: Changed InferReturnType to be EmitContext
6678         flag.
6679         
6680 2007-09-17  Marek Safar  <marek.safar@gmail.com>
6681
6682         * class.cs: Use partial container to record whether any partial part
6683         contains static field initializer and therefore default contructor has
6684         to be defined.
6685         
6686 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6687
6688         * class.cs (TypeContainer.AddPartial): Fixed an issue reported on
6689         mono-list when only one of two partial parts has defined accessibility
6690         modifier.
6691         
6692 2007-09-14  Marek Safar  <marek.safar@gmail.com>
6693
6694         A fix for bug #82845
6695         
6696         * class.cs (TypeContainer): Set correct resolve context for all field
6697         initializers.
6698         
6699 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6700
6701         * assign.cs: Fixed a crash when field is resolved twice with an error.
6702         
6703         * codegen.cs: Changed InFieldInitializer to be flag.
6704         
6705         * anonymous.cs, ecore.cs, expression.cs: Update after
6706         IsInFieldInitializer rename.
6707         
6708         * const.cs: Removed unused parameter.
6709         
6710         * class.cs: Changed the way how we resolve and emit field initializers.
6711         The field initilizers have to have access to contructor block to emit
6712         compiler generated code.
6713
6714 2007-09-13  Marek Safar  <marek.safar@gmail.com>
6715
6716         * expression.cs (MemberAccess.DoResolve): DeclSpace is broken by
6717         generics use TypeContainer instead.
6718         
6719 2007-09-12  Marek Safar  <marek.safar@gmail.com>
6720         
6721         * generic.cs (TypeInferenceContext.InflateGenericArgument): Stub.
6722
6723         * lambda.cs (ResolveParameters): Use more powerful
6724         InflateGenericArgument.
6725         
6726         * parameters.cs: Better exception message.
6727                 
6728 2007-09-10  Marek Safar  <marek.safar@gmail.com>
6729
6730         * anonymous.cs (AnonymousMethodExpression.CompatibleChecks): Report
6731         correct expression block type. 
6732         
6733         * ecore.cs (Expression.Error_MemberLookupFailed): Made virtual.
6734         
6735         * expression.cs (Invocation): Extracted method group resolve to
6736         DoResolveOverload.
6737         
6738 2007-09-07  Marek Safar  <marek.safar@gmail.com>
6739
6740         * ecore.cs (Expression.MemberLookupFinal): Removed unused loc parameter.
6741         (MethodGroupExpr.ResolveGeneric): Use existing method group instance.
6742         
6743         * expression.cs (MemberAccess.DoResolve): Uses generic resolver for
6744         generic extension methods.
6745
6746 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6747
6748         A fix for bug #82676 (Do I get it right now?)
6749         * convert.cs (Binary.ResolveOperator): An interface is converted to the
6750         object before a standard conversion is applied.
6751         
6752 2007-09-06  Marek Safar  <marek.safar@gmail.com>
6753
6754         * convert.cs (ImplicitReferenceConversionCore): Reverted wrong fix of
6755         #82676.
6756         
6757 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6758
6759         A fix for bug #82676
6760         * convert.cs (ImplicitReferenceConversionCore): Check both sides for
6761         non-generic interface types.
6762         
6763 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6764
6765         A fix for bug #82690
6766         * ecore.cs (PropertyExpr.EmitAssign): Leave a copy does just that.
6767         
6768 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6769
6770         A fix for bug #82571
6771         * anonymous.cs (AnonymousMethod.DoCreateMethodHost): Use internal 
6772         modifier for container based methods.
6773         
6774 2007-09-05  Marek Safar  <marek.safar@gmail.com>
6775
6776         A fix for bug #82676
6777         * convert.cs (ImplicitReferenceConversionCore): From any class-type S to
6778         any interface-type T means to any of interface type T.
6779
6780 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6781
6782         * namespace.cs: We have 2 versions of System.Core assembly.
6783
6784 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6785
6786         A fix for bug #82652
6787         * class.cs (Class.GetClassBases): Compare types and not expressions.
6788
6789 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6790
6791         A fix for bug #82620
6792         * expression.cs (Invocation.EmitArguments): Duplicate params arguments
6793         actually never worked before.
6794         (IndexerAccess): Emit prepared arguments before they are modified.
6795         
6796 2007-09-04  Marek Safar  <marek.safar@gmail.com>
6797
6798         A fix for bug #82563
6799         * assign.cs: Revert wrong fix.
6800         
6801         * expression.cs (VariableReference.EmitAssign): Handle ref reference
6802         correctly.
6803         (ArrayAccess): Changed the way we emit compound (prepared) assignments.
6804         Instead of ldelema/stdind we have to use temporary variables to handle
6805         cases like String.Concat (params string[]).
6806         
6807 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6808
6809         * class.cs: EmitAttributes to Emit rename.
6810         
6811         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Parent can be
6812         null.
6813         (MemberCore.HasClsCompliantAttribute): Don't depend on 
6814         GetClsCompliantAttributeValue execution.
6815         
6816 2007-08-31  Marek Safar  <marek.safar@gmail.com>
6817
6818         * anonymous.cs: Use shorter type prefix.
6819         
6820         * ecore.cs (SimpleName.DoSimpleNameResolve): Use transparent identifiers
6821         when exist.
6822         
6823         * expression.cs (LocalVariableReference.DoResolveBase): Don't capture
6824         variables when probing is on.
6825         
6826         * statement.cs (LocaLInfo.Clone): Clone correctly resolved and 
6827         unresolved variables.
6828         (TopLevelBlock.GetTransparentIdentifier): Default implementation doesn't
6829         handle transparent identifiers.
6830         
6831 2007-08-26  Marek Safar  <marek.safar@gmail.com>
6832
6833         * attribute.cs (IsClsCompliant): Add nullable types test.
6834         
6835 2007-08-24  Atsushi Enomoto  <atsushi@ximian.com>
6836
6837         * doc.cs : catch other types of exception than XmlException to
6838           report CS1570. Fixed bug #82565.
6839
6840 2007-08-23  Marek Safar  <marek.safar@gmail.com>
6841
6842         * anonymous.cs (AnonymousMethodExpressin.ExplicitTypeInference): 
6843         The number of delegate parameters has to match.
6844         (AnonymousMethodExpressin.VerifyParameterCompatibility): Handles generic
6845         arrays.
6846
6847 2007-08-21  Marek Safar  <marek.safar@gmail.com>
6848
6849         * anonymous.cs (AnonymousMethod): Generate private anonymous method
6850         to fix problem with private arguments.
6851
6852 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6853
6854         * anonymous.cs (AnonymousTypeClass): An anonymous type can be empty.
6855         
6856         * decl.cs (MemberName): Ignore generic type with no generic arguments. 
6857         
6858         * expression.cs (AnonymousTypeDeclaration): An anonymous type can be
6859         empty. Add cloning suport.
6860         
6861         * roottypes.cs (GetAnonymousType): Fixed argument comparison logic.
6862
6863 2007-08-20  Marek Safar  <marek.safar@gmail.com>
6864
6865         * convert.cs, ecore.cs, expression.cs, literal.cs: Use factory method 
6866         to create EmptyCast. It handles EmptyConstantCast specialization for
6867         constants.
6868         
6869 2007-08-18  Marek Safar  <marek.safar@gmail.com>
6870
6871         * expression.cs (Binary.is_unsigned): Handle unsafe types too.
6872         (EmitArrayArgument): One routine for array arguments.
6873         (ArrayCreation.MakeByteBlob): Fixed an array alignment. 
6874         
6875 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6876
6877         * cs-tokenizer.cs (GetKeyword): Handle from keyword in a different way.
6878
6879 2007-08-17  Marek Safar  <marek.safar@gmail.com>
6880
6881         * anonymous.cs: MemberLookupFinal update.
6882
6883         * class.cs (ConstructorInitializer): Is expression based.
6884         
6885         * delegate.cs: MethodGroupExpr update.
6886         
6887         * ecore.cs  (Error_MemberLookupFailed): Improved to report better error
6888         messages.
6889         (Error_MemberLookupFailed): Customizable error override.
6890         (MethodGroupExpr): Keep queried type for later usage.
6891         (MethodGroupExpr.OverloadResolve): Catch errors related to overload
6892         resolve.
6893         
6894         * expression.cs: Error_MemberLookupFailed refactoring.
6895         (New.DoResolve): Resolve as much as possible.
6896         (ElementInitializer.Error_MemberLookupFailed): Object initializer
6897         customization for invalid member types.
6898
6899         * statement.cs: MethodGroupExpr update.
6900         
6901 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6902
6903         * modifier.cs (Check): Check all modifiers and not only accessibility
6904         ones.
6905
6906 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6907
6908         * ecore.cs (Expression.Error_ValueCannotBeConverted): Report always a
6909         type and not an expression.
6910
6911 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6912
6913         * statement.cs (Catch.Clone): Type and variable can be null.
6914
6915 2007-08-16  Marek Safar  <marek.safar@gmail.com>
6916
6917         A fix for bug #81979
6918         * assign.cs (Assign.Emit): Prepare arguments for string concatenation.
6919         I am really not sure whether this is the best fix.
6920         
6921         * expression.cs (VariableReference.EmitAssign): Do prepare_load test
6922         only once.
6923         
6924 2007-08-14  Marek Safar  <marek.safar@gmail.com>
6925
6926         ** C# 3.0 Object and collection initializers (major re-write)
6927         
6928         * assign.cs (DoResolve): Initializers are not assign related.
6929         
6930         * codegen.cs (EmitContext.CurrentInitializerVariable): Holds a varible
6931         used during collection or object initialization.
6932         
6933         * expression.cs (Error_InvalidArguments): Add initializers specific
6934         messages. More will come later because it requires some general
6935         refactoring.
6936         (New.DoResolve): Better error handling for unsafe types.
6937         (EmptyExpressionStatement): New class.
6938         (ElementInitializer): An object initializer expression.
6939         (CollectionElementInitializer): A collection initializer expression.
6940         (CollectionOrObjectInitializers): A block of object or collection
6941         initializers.
6942         (NewInitialize): New expression with element/object initializers.
6943         
6944         * statement.cs: Reverted object/collection initializer hacks.
6945         
6946         * typemanager.cs (CSharpName): Filter __arglist type.
6947         
6948 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6949
6950         ** C# 3.0 Anonymous Types (update to the latest standard)
6951         
6952         * expression.cs (Binary.ResolveOperator): Threat all null based types
6953         same.
6954         (AnonymousTypeDeclaration): Renamed from AnonymousType and simplified.
6955         (AnonymousTypeParameter): Updated.
6956         
6957         * anonymous.cs (CompilerGeneratedClass): Add custom name overload.
6958         (AnonymousTypeClass): New anonymous type container.
6959         
6960         * class.cs (AddField): Return operation result.
6961         
6962         * generic.cs: Another empty TypeArguments overload.
6963         
6964         * roottypes.cs (AddAnonymousType, GetAnonymousType): Anonymous types
6965         are stored at top of normal hierarchy.
6966         
6967         * typemanager.cs (CSharpName): Filter anonymous types.
6968         
6969 2007-08-09  Marek Safar  <marek.safar@gmail.com>
6970
6971         * expression.cs (StringConcat.Append): Handle 3 and more concatenation
6972         as single Concat call. How could we miss that :-(
6973         
6974 2007-08-08  Marek Safar  <marek.safar@gmail.com>
6975
6976         * expression.cs (ArrayCreation.CloneTo): Allocate exact size.
6977         
6978 2007-08-07  Miguel de Icaza  <miguel@novell.com>
6979
6980         * expression.cs: Fix the previous commit, the creation of the
6981         arguments array list needs also to be conditional on the arguments
6982         not being null.
6983
6984         * class.cs: Add a little bit of help to help narrow down problems.
6985
6986         * expression.cs (ArrayCreation.CloneTo): Argument can be null, do
6987         not try to copy in that case. 
6988
6989         * driver.cs: When building SMCS, include a new different set of
6990         default assemblies here.   Do this here so we can control whether
6991         to include the default assemblies with /noconfig.
6992
6993 2007-08-03  Marek Safar  <marek.safar@gmail.com>
6994
6995         A fix for bug #81979
6996         * expression.cs (TypeOf.GetAttributableValue): Check for type arguments
6997         only.
6998
6999 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7000
7001         A fix for bug #82300
7002
7003         * anonymous.cs (AnonymousContainer.Define): Don't define anything when
7004         we are in probing scope.
7005
7006 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7007
7008         A fix for bug #82301
7009
7010         * statement.cs (Catch.CloneTo): Clone blocks in the right order.
7011         (Statement.CloneTo): Clone and not map children blocks.
7012
7013 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7014
7015         A fix for bug #82299
7016
7017         * expression.cs (LocalVariableReference.CloneTo): Remap local info
7018         variable too.
7019         
7020         * statement.cs (Statement.CloneTo): Clone variables before statements
7021         to allow remaping of local variables.
7022
7023 2007-08-03  Marek Safar  <marek.safar@gmail.com>
7024
7025         A fix for bug #82296
7026
7027         * anonymous.cs,
7028         * report.cs: Log crash details for future clone problems.
7029         
7030         * statement.cs (Return.Clone): Don't clone non-existent expression.
7031
7032 2007-08-03  Raja R Harinath  <harinath@gmail.com>
7033
7034         * class.cs (TypeContainer.AddBasesForPart): Make virtual.
7035         (Class.AddBasesForPart): Move CS0537 check here from ...
7036         * cs-parser.jay (class_declaration): ... here.  Move calling of
7037         'AddBasesForPart' to ...
7038         (class_bases): ... here.
7039         (struct_declaration, interface_declaration): Update to changes.
7040
7041 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7042
7043         A fix for bug #81923
7044
7045         * statement.cs (Using.ResolveLocalVariableDecls): Only non-user implicit
7046         conversion is allowed.
7047
7048 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7049
7050         A fix for bug #81564
7051
7052         * ecore.cs (EventExpr): Add IsBase handling.
7053
7054         * expression.cs (BaseAccess.CommonResolve): Events can use base accessor
7055         too.    
7056         
7057 2007-08-02  Raja R Harinath  <harinath@gmail.com>
7058
7059         Reduce some differences between cs-parser.jay in mcs/ and gmcs/.
7060         * cs-parser.jay: Some whitespace cleanups.
7061         (current_delegate): New.
7062         (type_name): New.
7063         (struct_declaration): Make similar to gmcs/cs-parser.jay -- add
7064         a dummy code block, and use 'type_name' instead of 'member_name'.
7065         (interface_declaration, class_declaration): Likewise.
7066         (delegate_declaration): Likewise.  Rearrange slightly and use
7067         'current_delegate'.
7068         * cs-tokenizer.cs (handle_where): Rename from handle_constraints.
7069         (GetKeyword): Update to change.  Use '!foo' instead of 'foo == false'.
7070
7071 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7072
7073         A fix for bug #82039
7074
7075         * ecore.cs (TypeLookup.GetSignatureForError): Use name when type is not
7076         available.
7077
7078         * typemanager.cs (CSharpName): Split to string overload.
7079
7080 2007-08-02  Marek Safar  <marek.safar@gmail.com>
7081
7082         * expression.cs,
7083         * report.cs: Updated warning CS0472.
7084
7085 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7086
7087         A fix for bug #82181
7088         * cs-parser.jay,
7089         * cs-tokenizer.cs: Ignore partial keyword inside block expression.
7090
7091 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7092
7093         A fix for bug #82277
7094         * statememnt.cs (Block.Clone): Don't clone explicit blocks twice.
7095
7096 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7097
7098         ** C# 3.0 Type Inference (major bits are working)
7099         
7100         * anonymous.cs (AnonymousMethodExpression): Removed refactored fields.
7101         (.ImplicitStandardConversionExists): Uses compatible.
7102         (.ExplicitTypeInference): Infers type arguments based on explicit arguments
7103         (.InferReturnType): New method.
7104         (.Compatible): Refactored.
7105         (.ResolveParameters): Uses factory to create resolved parameters.
7106         (.CompatibleMethod): Add probing mode support.
7107         (AnonymousContainer): Removed unused fields. Split Define and Resolve to
7108         clearly distinguish between 2 different operations.
7109         (LambdaMethod): Moved to lambda.cs.
7110         (AnonymousMethod): Removed unused fields and methods.
7111         (AnonymousDelegate): Simplified.
7112         
7113         * codegen.cs (ResolveTopBlock): Updated renamed Resolve to Define.
7114         
7115         * convert. cs (ImplicitConversionStandard): Compatible works differently.
7116         
7117         * delegate.cs (Delegate): New mehods to reduce code duplication.
7118         (.GetConstructor): New method.
7119         (.GetInvokeMethod): New method.
7120         (DelegateCreation): Updated.
7121         
7122         * ecore.cs (ResolveOverloadExtensions): Don't crash when extension method
7123         does not exist.
7124         (OverloadResolve): Made probing little bit faster.
7125         
7126         * expression.cs (ParameterReference.DoResolveLValue): Reference can be null
7127         when probing is on.
7128         
7129         * generic.cs (TypeInferenceContext): Dummy implementation.
7130         
7131         * iterators.cs: Updated after Resolve/Define rename.
7132         
7133         * lambda.cs (LambdaExpression)
7134         (.ResolveParameters): Handles both type of arguments and type inference too.
7135         
7136         * parameter.cs (ImplicitLambdaParameter.Resolve): Sanity check.
7137         (InflateTypes): Updated.
7138         
7139         * support.cs (InflateTypes): Changed signature and updated.
7140         
7141         * typemanager.cs (LookupMemberCache): Better dynamic type check.
7142         (MemberLookup_FindMembers): More MS tricks.
7143         (GetParameterData): Ditto.
7144         (GetDelegateParameters): Uses quick path for dynamic types.
7145         
7146 2007-08-01  Marek Safar  <marek.safar@gmail.com>
7147
7148         * class.cs (MethodData.Define): EmitContext is required for generic stuff
7149         only.
7150
7151 2007-07-31  Marek Safar  <marek.safar@gmail.com>
7152
7153         * statement.cs (ProcessParameters): Don't crash when parameters have wrong
7154         syntax.
7155         
7156 2007-07-26  Jb Evain  <jbevain@novell.com>
7157
7158         * typemanager.cs (TypeManager.GetConstructor): Add a method overload
7159         which takes a boolean 'report_errors', similar to the GetMethod.
7160         (InitCodeHelpers): StructLayoutAttribute.ctor(int16) is not visible
7161         in .net 2.1, do not report errors here.
7162
7163         * typemanager.cs (TypeManager.InitCoreTypes): System.ArgIterator,
7164         System.Runtime.CompilerServices.RequiredAttributeAttribute and
7165         System.Runtime.CompilerServices.TypeForwardedToAttribute are internal
7166         in .net 2.1.
7167
7168         * typemanager.cs (TypeManager.InitCoreTypes): Move the resolution
7169         of the type InternalsVisibleToAttribute before the first call
7170         to CoreLookupType which is allowed to fail (third boolean parameter
7171         to true). Because, during the resolution for a type that is not
7172         immediately found, we try to check if the type is not defined in
7173         a friend assembly, and to do so, we need the
7174         InternalVisibleToAttribute.
7175
7176 2007-07-23  Miguel de Icaza  <miguel@novell.com>
7177
7178         * expression.cs (Binary): Add support for the brain-dead CSC 2.x
7179         feature that allows structs to be compared against null and inline
7180         the result as true or false.
7181
7182         Notice that the same code is not permitted inside a generic block
7183         of code that would do:
7184
7185         class Foo<T> where T : struct {
7186             bool Eval (T x)
7187             {
7188                  return x == null;
7189             }
7190         }
7191
7192         It is only allowed if the type of T is not bound (no where
7193         clause).   In my opinion, this CSC 2 behavior is broken but people
7194         seem to be using it (IronRuby does, a few bug reports on bugzilla
7195         have it and some people have complained about it).
7196
7197         All of the users that depend on this behavior have code that is
7198         very likely broken. 
7199         
7200         * report.cs (Warning, Error): make these take object arguments,
7201         not strings, as that allows us to take advantage of Format.
7202
7203 2007-07-20  William Holmes  <billholmes54@gmail.com>
7204
7205         * decl.cs: Changed MemberName.CountTypeArguments to also check the 
7206           Left member variable for the Count.
7207         * doc.cs: Changed DocUtil.GetMethodDocCommentName to call 
7208           MemberName.CountTypeArguments to avoid a NRE. 
7209
7210         This code is contributed under the MIT X11 license
7211
7212 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7213
7214         * cs-tokenizer.cs: Improved lambda parsing and removed old code.
7215
7216 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7217
7218         * doc.cs : generic method arguments are written as ``x while generic
7219           type arguments are `x. Combined with the previous change, fixed bug
7220           #79706.
7221
7222 2007-07-18  Raja R Harinath  <rharinath@novell.com>
7223
7224         Fix #82120
7225         * expression.cs (Binary.ResolveOperator): When converting
7226         'a + (- b)' to 'a - b', ensure that the unary '-' is discarded.
7227
7228 2007-07-18  Atsushi Enomoto  <atsushi@ximian.com>
7229
7230         * doc.cs : when T: or whatever x: is specified, it does not really
7231           check the doc comment's syntax correctness. Fixed bug #82006.
7232
7233 2007-07-18  Marek Safar  <marek.safar@gmail.com>
7234
7235         * anonymous.cs (AnonymouseMethodExpression): Refactored to work with
7236         LambdaExpression better.
7237         
7238         * cs-tokenizer.cs: Changed a way how we detect lambda parameters.
7239         
7240         * driver.cs (LambdaTypeParseTest): Removed, tested method is gone.
7241         
7242         * ecore.cs (Expression.MemberLookupFailed): Don't show currect context
7243         as it can be generated.
7244         
7245         * expression.cs (Invocation.Error_InvalidArguments): Show correct
7246         modifiers.
7247         
7248         * lambda.cs (LambdaExpression): Refactored to share same code with
7249         AnonymousMethodExpression.
7250         
7251 2007-07-17  Marek Safar  <marek.safar@gmail.com>
7252
7253         * anonymous.cs (MakeName): Include host name for easier debugging.
7254         (LambdaMethod): New class for lambda spcecific stuff.
7255         
7256         * attribute.cs: Set EmitContext return type.
7257
7258         * class.cs: Set EmitContext return type.
7259         
7260         * codegen.cs (EmitContext): Return type cannot be null to stop messing
7261         with null/void meaning.
7262         
7263         * iterators.cs (ContainerType): Implemented.
7264         
7265         * rootcontext.cs: Set value of TypeManager.bool_type at early stage.
7266         
7267         * statement.cs (Return): Updated to lambda expressions.
7268         (Block.CloneTo): Parent can be null.
7269                 
7270 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7271
7272         A fix for bug #81917
7273         * attribute.cs (AttributeTester.GetFixedBuffer): More robust testing.
7274         
7275         * class.cs (FixedField): Check whether field is in unsafe scope.
7276
7277         * ecore.cs (FieldExpr.DoResolve): Create fixed buffer expression here.
7278         (FieldExpr.Emit): Fixed buffers cannot be volatile.
7279
7280         * expression.cs (ElementAccess.Resolve): Move fixed buffers resolve to
7281         FieldExpr.
7282         
7283         * statement.cs (Fixed.Resolve): Simplified fixed buffers.
7284                 
7285 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7286
7287         * cs-tokenizer.cs, class.cs, decl.cs, driver.cs, namespace.cs,
7288         rootcontext.cs, expression.cs, statement.cs: Updated to use WarningLevel
7289         from Report class.
7290
7291 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7292
7293         * ecore.cs (FieldExpr.AddressOf): Less confusing warning message.
7294         
7295 2007-07-13  Marek Safar  <marek.safar@gmail.com>
7296
7297         * anonymous.cs (AnonymousMethodExpression): Parameters are r/o.
7298         (AnonymousContainer.ResolveNoDefine): Another ec to aec flag conversion.
7299         
7300         * codegen.cs(EmitContext): Add ProbingMode flag.
7301         
7302         * delegate.cs (DelegateInvocation): Set few instance variables as r/o.
7303         
7304         * driver.cs: For now set both warning values.
7305         
7306         * ecore.cs (SimpleName): Name is readonly.
7307         (MethodGroup.OverloadResolve): One quick path for probing.
7308         
7309         * expression.cs (Unary): Set Oper r/o.
7310         (Binary): Set Oper r/o.
7311         (ParameterReference): Set few instance variables as r/o.
7312         (ParameterReference.DoResolveBase): Don't capture aruments when 
7313         the probing is on.
7314         (Invocation.CloneTo): Fixed typo, looks easy, yeah.
7315         (Arglist): arguments are private.
7316         (SizeOf): type is private and r/o.
7317         (MemberAccess): arguments are private.
7318
7319         * report.cs: Enhanced reporting on/off capabilities.
7320         
7321         * lambda.cs: Uses ec.IsInProbingMode.
7322         (ContextualReturn): Derives from return.
7323         
7324         * rootcontext.cs: For now set both warning values.
7325         
7326         * statement.cs (CloneContext.RemapBlockCopy): Remaps block to cloned
7327         copy if one exists.
7328         (Return.Resolve): Don't die immediately.
7329         (Block.Resolve): Speed-up probing.
7330         (Block.CloneTo): Clone only child blocks.
7331
7332 Fri Jul 13 11:19:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7333
7334         * iterators.cs: reverted Miguel's latest change (r81925) as it
7335         breaks the build in System.
7336
7337 2007-07-13  Miguel de Icaza  <miguel@novell.com>
7338
7339         * iterators.cs (Yield.CheckContext): Check for the iterator type
7340         also here as we can call into Yield even in codepaths that are not
7341         directly checked by
7342         (MethodOrOperator is the only path that was checked).
7343
7344         In addition to the standard check, use a more specific check for
7345         constructors to report a more verbose error. 
7346
7347 2007-07-12  Miguel de Icaza  <miguel@novell.com>
7348
7349         * ecore.cs (FieldExpr.AddressOf): Do not stop processing here,
7350         report the warning and continue 
7351
7352         * statement.cs (Using.EmitLocalVariableDecls): We were leaving
7353         values on the stack on the call to Emit.   Use EmitStatement if
7354         possible, or using Emit + Pop if not possible.   Fixes #82064
7355
7356 2007-07-12  Raja R Harinath  <rharinath@novell.com>
7357
7358         * expression.cs (Invocation.IsApplicable): Reorganize slightly to
7359         avoid try...finally in some cases.
7360
7361 2007-07-10  Marek Safar  <marek.safar@gmail.com>
7362
7363         * attribute.cs (Attribute.ResolveConstructor): Uses method group.
7364         
7365         * class.cs (ConstructorInitializer.Resolve): Use and keep method group
7366         instead of method. Re-use standard error handling.
7367         (ConstructorInitializer.Emit): Simplified.
7368         
7369         * delegate.cs: Updated after Invocation.EmitCall change.
7370         
7371         * ecore.cs (GetOperatorTrueOrFalse): Uses MethodGroupExpr only.
7372         (SimpleName.SimpleNameResolve): Set and reset in_transit flag correctly.
7373         (ExtensionMethodGroupExpr): Refactored to use same OverloadResolve
7374         method and don't permanently changing input arguments.
7375         (MethodGroupExpr): Introduced resolved best_candidate, when method group
7376         is resolved it has one of the candidates is the best one which is later
7377         used to emit. Removed a few unused method.
7378         (MethodGroupExpr.MakeUnionSet): Moved from Invocation, it belongs here.
7379
7380         * expression.cs (StaticCallExpr.MakeSimpleCall): Uses method group.
7381         (Binary.ResolveOperator): Ditto.
7382         (ConditionalLogicalOperator.DoResolve): Ditto.
7383         (Invocation): Uses method group.
7384         (Invocation.DoResolve): Simplified.
7385         (Invocation.EmitCall): Removed useless is_static.
7386         (Invocation.Emit): Delegate to method group.
7387         (Invocation.EmitStatement): Simplified.
7388         (New): Uses method group.
7389         (MemberAccess.DoResolve): Don't destroy original expression.
7390         
7391         * statement.cs (ForEach.Resolve): Use null for no method arguments.
7392         
7393 2007-07-04  Marek Safar  <marek.safar@gmail.com>
7394
7395         * ecore.cs (VarExpr.DoResolveLValue): More restriction checks.
7396         
7397         * anonymous.cs,
7398         * lambda.cs: Add custom error message type.
7399
7400 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7401
7402         * lambda.cs: Simplified little bit.
7403         
7404         * parameter.cs: Introduced ImplicitLambdaParameter.
7405         (Parameters.CreateFullyResolved): New factory instead of ctor.
7406         
7407         * anonymous.cs,
7408         * class.cs,
7409         * delegate.cs: Updated parameter creation.
7410         
7411 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7412
7413         *  ecore.cs (SimpleName.GetSignatureForError): Display correctly generic
7414         arguments.
7415         
7416         * generic.cs: Synchronized with gmcs.
7417         
7418 2007-07-03  Marek Safar  <marek.safar@gmail.com>
7419
7420         * class.cs (Indexer): Check return type as soon as possible.
7421         
7422         * cs-parser.jay: Initialize implicit_value_parameter_type for interface
7423         members too.
7424         
7425         * ecore.cs (VarExpr.DoResolveLValue): Set eclass value.
7426         
7427         * expression.cs (Invocation.Error_InvalidArguments): Show type only.
7428         
7429         * parameter.cs (Parameter): Use expression type when it is available.
7430         
7431         * support.cs (ReflectionParameters.ParameterDesc): Show an extension
7432         method modifier for the first parameter only.
7433
7434 2007-06-24  Marek Safar  <marek.safar@gmail.com>
7435
7436         A fix for bug #81938
7437         * typemanager.cs (ChangeType): Fixed couple of char conversions.
7438         
7439         * constant.cs: Tide up an exception message.
7440
7441 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7442
7443         * ecore.cs (SimpleName.DoSimpleNameResolve): Better error reporting when
7444         an uninitialized variable is used.
7445         
7446         * expression.cs (LocalVariableReference.DoResolve): Ditto.
7447
7448 2007-06-22  Marek Safar  <marek.safar@gmail.com>
7449
7450         * ecore.cs (SimpleName.TypeOrNamespaceNotFound): Allow to override type
7451         not found error handling.
7452
7453         * expression.cs (ArrayCreation): Removed redundant fields and little bit
7454         simplified.
7455         (ArrayCreation.ResolveArrayElement): To be ready to customization.
7456         (ArrayCreation.DoResolve): Simplified.
7457         (ImplicitlyTypedArrayCreation.DoResolve): Implicitly typed arrays have
7458         its own resolve process.
7459         (ImplicitlyTypedArrayCreation.ResolveArrayElement): Conversion magic.
7460
7461 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7462
7463         * namespace.cs (NamespaceEntry.Error_AmbiguousTypeReference): Print
7464         more error details.
7465         
7466 2007-06-20  Marek Safar  <marek.safar@gmail.com>
7467
7468         * cs-tokenizer.cs: Removed var related stuff.
7469         
7470         * ecore.cs (Expression.ResolveAsContextualType): Introduced new method.
7471         (VarExpr): Changed to derive from SimpleName. VarExpr now behaves as
7472         a type and a keyword at same time.
7473         
7474         * decl.cs (MembeName.GetTypeExpression): Create VarExpr when type name
7475         matches to "var".
7476         
7477         * expression.cs (ImplicitlyTypedArrayCreation): New empty class for
7478         implicitly typed arrays, more changes will follow.
7479         
7480         * statement.cs (LocalInfo.Resolve): Resolve type as contextual type.
7481         
7482 2007-06-19  Marek Safar  <marek.safar@gmail.com>
7483
7484         * ecore.cs (VarExpr): Removed Handled field.
7485         
7486         * statement.cs (Using.ResolveLocalVariableDecls): Refactored to use
7487         build-in assign functionality.
7488         (ForEach.Resolve): Removed all implicitly typed local variable code and
7489         simplified.
7490         (ArrayForeach.Resolve): Infer implicitly typed local variable here.
7491         (CollectionForeach.Resolve): Infer implicitly typed local variable here.
7492
7493 2007-06-18  Marek Safar  <marek.safar@gmail.com>
7494
7495         * assign.cs: Removed implicitly typed local variable check.
7496         
7497         * expression.cs (LocalVariableReference.DoResolve): Add check for self
7498         referencing implicitly typed local variable.
7499         (LocalVariableReference.DoResolveLValue): Infer implicitly typed local
7500         variable here.
7501         
7502         * statement.cs (Fixed): Removed unsupported implicitly typed local
7503         variable code.
7504
7505 2007-06-15  Marek Safar  <marek.safar@gmail.com>
7506
7507         * decl.cs (MemberName): Moved all Unbound stuff to parser.
7508
7509 2007-06-14  Marek Safar  <marek.safar@gmail.com>
7510
7511         A fix for bugs #81855 and #76274
7512         * attribute.cs (AttachTo): Always set owner for global attributes to
7513         prefined owner.
7514         
7515         * ecore.cs (Error_TypeDoesNotContainDefinition): A type location can be
7516         usefull too.
7517         
7518         * cs-parser.jay: Assembly and module attributes must precede all other
7519         elements except using clauses and extern alias declarations.
7520
7521 2007-06-13  Marek Safar  <marek.safar@gmail.com>
7522
7523         A fix for bug #81748
7524         * cs-tokenizer.cs,
7525         * expression.cs: More checks for non ISO-1 features.
7526
7527 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7528
7529         A fix for bug #81807
7530         * statement.cs(Switch.TableSwitchEmit): Define null label when it's not
7531         present inside switch statement and it is required by nullable check.
7532
7533 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7534
7535         A fix for bug #81840
7536         * ecore.cs (SimpleName.ResolveAsTypeStep): Look for non-generic type
7537         when type matching fails.
7538         
7539         * namespace.cs: Tiny error message change.
7540
7541 2007-06-12  Marek Safar  <marek.safar@gmail.com>
7542
7543         * decl.cs (CheckAbstractAndExtern): Moved to MemberCore for easier error
7544         reporting. Added automatic property check.
7545         
7546         * class.cs: Updated after CheckAbstractAndExtern relocation.
7547         (AEventPropertyAccessor.GetSignatureForError): Customized.
7548         
7549 2007-06-11  Marek Safar  <marek.safar@gmail.com>
7550
7551         * class.cs (DefineBaseTypes): Base type can be undefined.
7552         
7553         * ecore.cs (TypeLookup): Minor refactoring.
7554         (DoResolveAsTypeStep): Removed redundant check.
7555
7556         * namespace.cs (Lookup): Removed redundant check.
7557                 
7558         * rootcontext.cs (BootstrapCorlib_ResolveType): Uses normal 
7559         ResolveAsTypeTerminal step.
7560         (BootstrapCorlib_*): Simplified.
7561         (PopulateCoreType): Core types can be now external.
7562
7563 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7564
7565         * anonymous.cs (VerifyExplicitParameterCompatibility): Add flag to do
7566          verification only.
7567          (InferTypeArguments): Infers anonymous expression type arguments.
7568          (Compatible): Split to Compatible and InferTypeArguments. 
7569         
7570         * lambda.cs: Updated.
7571
7572 2007-06-08  Marek Safar  <marek.safar@gmail.com>
7573
7574         * anonymous.cs (AnonymousContainer): Marked as compiler generated.
7575
7576 2007-06-07  Raja R Harinath  <harinath@gmail.com>
7577
7578         Fix #80477, cs0135-2.cs, cs0135-3.cs
7579         * statement.cs (ToplevelBlock.ProcessParameters): Add parameter
7580         names to the "known" variables list.
7581         (Block.CheckInvariantMeaningInBlock): Handle the fact the
7582         parameter names are also "known".
7583         (Block.CheckError136): Remove.
7584         (ExplicitBlock.CloneTo): New.  Set 'known_variables' in target to
7585         null.
7586
7587 2007-06-07  Marek Safar  <marek.safar@gmail.com>
7588
7589         * ecore.cs (MethodGroupExpr.OverloadResolve): Print full method definition.
7590
7591 2007-06-06  Marek Safar  <marek.safar@gmail.com>
7592
7593         * ecore.cs (SimpleName.Emit): Emitting unresolved simple name is
7594         internal error not an user error.
7595          
7596         * expression.cs (IsApplicable): Refactored to make debugging easier.
7597
7598         * support.cs: More tricks for non-mono runtimes.
7599         
7600         * typemanager.cs (CoreLookupType): Made public.
7601         (InitSystemCore): All linq specific stuff moved to linq.cs
7602
7603 2007-06-05  Marek Safar  <marek.safar@gmail.com>
7604
7605         * typemanager.cs (CSharpSignature): One more missing build-in types
7606         replacement.
7607         More tricks for non-mono runtime.
7608
7609 2007-06-05  Raja R Harinath  <harinath@gmail.com>
7610
7611         * statement.cs (Block.CheckError136_InParents): Remove.
7612         (Block.AddVariable): Use GetParameterInfo instead.
7613         (ToplevelBlock.ProcessArguments): Likewise.
7614
7615 2007-06-04  Raja R Harinath  <rharinath@novell.com>
7616
7617         * statement.cs (ToplevelBlock.CloneTo): New.  Copy over parameter
7618         information too.
7619         (ToplevelBlock.GetParameterInfo): Split out of ...
7620         (ToplevelBlock.GetParameterRefernce): ... this.
7621         (ToplevelBlock.ParameterMap): Remove.
7622         * expression.cs (ParameterReference): Update to use
7623         ToplevelParameterInfo.
7624
7625         * statement.cs (ToplevelBlock.ProcessParameters): Workaround some
7626         regression.
7627
7628         * flowanalysis.cs (FlowBranching.CheckOutParameters): Move ...
7629         * statement.cs (ToplevelBlock.CheckOutParameters): ... here.
7630
7631         * statement.cs (ToplevelBlock.ResolveMeta): Move CS0136 checks ...
7632         (ToplevelBlock.ProcessParameters) ... here.
7633         (ToplevelBlock..ctor): Invoke it.
7634
7635         * statement.cs (ToplevelBlock.ResolveMeta): Add sanity checks for
7636         new parameters.
7637
7638         * statement.cs (IKnownVariable): New interface.
7639         (LocalInfo): Implement it.
7640         (ToplevelParameterInfo): New class.
7641         (ExplicitBlock.AddKnownVariable): Use IKnownVariable.
7642         (ExplicitBlock.GetKnownVariable): Likewise.  Rename from
7643         GetKnownVariableInfo.
7644
7645 2007-06-03  Raja R Harinath  <harinath@gmail.com>
7646
7647         Partly speed up CS0136 error checks.
7648         * statement.cs (ExplicitBlock.GetKnownVariableInfo): Remove
7649         'recurse' parameter.
7650         (Block.DoCheckError136): Only check errors in parameters.  Move
7651         local variable checks ...
7652         (Block.AddVariable): ... here, and ...
7653         (ToplevelBlock.ResolveMeta): ... here.
7654
7655 2007-06-02  Raja R Harinath  <harinath@gmail.com>
7656
7657         * statement.cs (Block.IsChildOf): Remove.
7658
7659         * statement.cs (Statement.Clone): Move special case code ...
7660         (Block.CloneTo): ... here.
7661
7662 2007-05-29  Raja R Harinath  <rharinath@novell.com>
7663
7664         * statement.cs (ToplevelBlock.container): Remove field.  It's
7665         redundant with 'Parent'.
7666         (ToplevelBlock.ContainerBlock): Remove accessor.
7667         (ToplevelBlock..ctor): Update to changes.  Register anonymous
7668         child with parent here, ...
7669         * cs-parser.jay (end_anonymous): ... not here.  Don't modify
7670         current_block.
7671         (start_anonymous): Don't save current_block.
7672         (top_current_block): Remove.
7673
7674         * statement.cs (Block.Flags): Remove IsExplicit and IsToplevel flags.
7675         (Block.Resolve): Update to changes.
7676         (Block..ctor): Move setting of "correct" 'Toplevel'
7677         and 'Explicit' fields to ...
7678         (ExplicitBlock..ctor, ToplevelBlock..ctor): ... here.
7679
7680 2007-05-27  Raja R Harinath  <harinath@gmail.com>
7681
7682         Kill Block.Implicit
7683         * statement.cs (Block.Implicit): Remove.
7684         (Block): Update to changes.
7685         * flowanalysis.cs: Likewise.
7686
7687         Mildly speed up CheckInvariantMeaningInBlock
7688         * statement.cs (ExplicitBlock.AddKnownVariable): Move here from Block.
7689         Recursively call AddKnownVariable to all enclosing blocks.
7690         (ExplicitBlock.GetKnownVariableInfo): Move here from Block.
7691         Remove recursive calls.
7692         (Block): Update to changes.
7693
7694         New ExplicitBlock invariants
7695         * statement.cs (Block.Explicit): New field.  It points to the
7696         immediately enclosing non-implicit block.
7697         (Block..ctor): Maintain the invariant.
7698         * cs-parser.jay: Take advantage of invariant.
7699
7700         Introduce ExplicitBlock
7701         * statement.cs (ExplicitBlock): New.
7702         (ToplevelBlock): Derive from it.
7703         (Block.Flags.IsExplicit): Rename from '...Implicit' and invert
7704         sense of flag.
7705         (Block.Implicit): Update to changes.
7706         * cs-parser.jay: Update to changes.
7707
7708         Remove unused field
7709         * codegen.cs (EmitContext.IsLastStatement): Remove.
7710         * statement.cs (Block.DoEmit): Update to changes.
7711
7712 2007-05-25  Raja R Harinath  <rharinath@novell.com>
7713
7714         * cs-parser.jay: Use 'start_block' and 'end_block' rather than
7715         modifying current_block directly.
7716
7717 2007-05-23  Scott Peterson  <lunchtimemama@gmail.com>
7718         
7719         * class.cs: Implemented automatic properties (C# 3.0)
7720           Thanks to Marek for the help.
7721
7722 2007-05-23  Raja R Harinath  <rharinath@novell.com>
7723
7724         * flowanalysis.cs (VariableInfo.SetAssigned): When noting a
7725         variable as assigned, note also that all its components are
7726         assigned too.
7727         (MyBitVector.SetRange): New.  Function to set multiple bits to true.
7728
7729 2007-05-19  Marek Safar  <marek.safar@gmail.com>
7730
7731         * anonymous.cs, class.cs: Emit Compiler generated attribute when
7732         member is marked as compiler generated.
7733         
7734         * decl.cs (MemberCore): Refactored ModFlags into property.
7735
7736         * modifiers.cs: Add new modifier (COMPILER_GENERATED).
7737         (Check): Check only accessibility modifiers.
7738
7739 2007-05-18  Raja R Harinath  <rharinath@novell.com>
7740
7741         Track all assignable slots in one bit array
7742         * statement.cs (ToplevelBlock.ParameterMap): Convert into array.
7743         (ToplevelBlock.ResolveMeta): Don't create a VariableMap.  Move
7744         logic from VariableMap constructor here.  Use the same 'offset'
7745         variable that's later used for computing offsets of local
7746         variables.
7747         * flowanalysis.cs (UsageVector.parameters): Remove.
7748         (UsageVector): Update to changes.
7749         (VariableMap): Remove.
7750
7751         Avoid creating ParameterMap in every block
7752         * statement.cs (Block.ParameterMap): Move ...
7753         (ToplevelBlock.ParameterMap): ... here.
7754         (ToplevelBlock.ResolveMeta): Create VariableMap for parameters
7755         only once.
7756         * flowanalysis.cs (FlowBranching.param_map): Remove.
7757         (FlowBranching.UsageVector): Update to changes.
7758         (FlowBranchingToplevel.CheckOutParameters): Likewise.
7759
7760         * statement.cs (Block.CloneTo): Clone Toplevel field too.
7761
7762         * expression.cs (ParameterReference): Distinguish between block
7763         where parameter was referenced and declared.
7764
7765 2007-05-18  Marek Safar  <marek.safar@gmail.com>
7766
7767         * flowanalysis.cs, statement.cs: Put back improved error handling.
7768
7769 2007-05-15  Scott Peterson  <lunchtimemama@gmail.com>
7770         
7771         * assign.cs:
7772         * expression.cs:
7773           Imporved object and collection initialization (C# 3.0).
7774
7775 2007-05-15  Marek Safar  <marek.safar@gmail.com>
7776
7777         A fix for bug #81380
7778         * expression.cs (Is.DoResolve): Only value types have constant `is'
7779         behaviour.
7780
7781 2007-05-15  Raja R Harinath  <rharinath@novell.com>
7782
7783         * statement.cs (ToplevelBlock.child): Remove.
7784
7785 2007-05-15  Raja R Harinath  <harinath@gmail.com>
7786
7787         Rationalize ResolveMeta: refactoring
7788         (Block.ResolveMeta): Remove wrong or superfluous comments.  Carve
7789         out constant handling code into ...
7790         (Block.DoResolveConstants): ... this.
7791
7792         Rationalize ResolveMeta: kill local_map
7793         * statement.cs (Block.local_map, Block.LocalMap): Remove.
7794         (Block.AssignableSlots): New.
7795         (Block.ResolveMeta): Make protected.  Don't create a VariableMap
7796         for locals -- move code from VariableMap here.  Avoid unnecessary
7797         allocations.
7798         * flowanalysis.cs (FlowBranching.local_map): Remove.
7799         (FlowBranching..ctor): Use Block.AssignableSlots.
7800         (VariableMap): Remove unused constructors.
7801
7802 2007-05-11  Raja R Harinath  <rharinath@novell.com>
7803
7804         * Makefile [PROFILE=net_2_0_bootstrap]: Add special-case rules.
7805
7806 2007-05-11  Marek Safar  <marek.safar@gmail.com>
7807
7808         * typemanager.cs (IsFriendAssembly): Should not be called for building
7809         assembly.
7810
7811 2007-05-09  Marek Safar  <marek.safar@gmail.com>
7812
7813         * literal.cs (NullConstant): Print null in all cases.
7814         
7815         * expression.cs (Binary.ResolveOperator): Implemented delegate
7816          comparison based on C# 2.0 changes.
7817
7818 2007-04-28  Scott Peterson  <lunchtimemama@gmail.com>
7819
7820         This code is contributed under the MIT X11 license
7821         
7822         The following enables support for several C# 3.0 language features:
7823         
7824         * cs-tokenizer.cs: Added support for the "var" keyword.
7825         
7826         * ecore.cs: Refactored TypeLookupExpression.DoResolveAsTypeStep().
7827           Added VarExpr class to facilitate type inferencing.
7828         
7829         * class.cs: Added IDictionary field AnonymousTypes to TypeContainer
7830           to support anonymous types.
7831         
7832         * assign.cs: Added support for type inferencing and initialization.
7833         
7834         * anonymous.cs: Added AnonymousClass class to enable anonymous types.
7835         
7836         * expression.cs: Added implicit array support to ArrayCreation.
7837           Added 5 types and 1 interface:
7838           
7839           IInitializable                Implementing classes can inject initializing
7840                                         statements after object instantiation.
7841           
7842           Initializer                   Stores data for object initialization.
7843           
7844           AnonymousType                 An expression for anonymous types.
7845           
7846           AnonymousTypeParameter        Stores data about an anonymous type's field.
7847           
7848           NewInitialize                 An expression for object initialization.
7849           
7850           CollectionInitialize          An expression for collection initialization.
7851         
7852         * statement.cs: Added "var" keyword support to the foreach, using, and fixed
7853           statements.
7854
7855 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7856
7857         A fix for bug #81500
7858         * cs-tokenizer.cs: Add special handling for coalescing operator.
7859
7860 2007-05-06  Marek Safar  <marek.safar@gmail.com>
7861
7862         A fix for bug #81529
7863         * attribute.cs (GetAttributeUsage): AttributeUsage attribute inherits
7864         its value from base class until it is redefined.
7865
7866 2007-05-02  Raja R Harinath  <rharinath@novell.com>
7867
7868         Fix regression in cs0631-3.cs
7869         * cs-parser.jay (operator_declarator): Add opt_attributes to error
7870         fallback.  Make error fallback catch more cases.
7871
7872 2007-05-01  Miguel de Icaza  <miguel@novell.com>
7873
7874         * cs-parser.jay: Allow parameters in operator declarations to have
7875         attributes. 
7876
7877 2007-04-27  Miguel de Icaza  <miguel@novell.com>
7878
7879         * statement.cs (If.CloneTo): Only clone the FalseStatement if it
7880         exists. 
7881
7882         * lambda.cs (ContextualReturn.Resolve): An expression is valid
7883         inside the ContextualReturn, it does not have to be an
7884         ExpressionStatement. 
7885
7886 2007-04-24  Miguel de Icaza  <miguel@novell.com>
7887
7888         * lambda.cs (ContextualReturn.Resolve): if the return type is not
7889         set, set it.
7890
7891 2007-04-23  Miguel de Icaza  <miguel@novell.com>
7892
7893         * anonymous.cs (AnonymousContainer): split the virtual Resolve
7894         method in two methods: ResolveNoDefine and Resolve.
7895
7896         ResolveNoDefine will stop just after ResolveTopBlock has been
7897         called.   
7898
7899         Resolve will then continue by creating a method and issuing the
7900         call to method.Define ().
7901
7902         (AnonymousMethod): Split and implement the new Resolve and
7903         ResolveNoDefine as well.
7904
7905         * lambda.cs (LambdaExpression): Split the anonymous method
7906         resolution code into a separate routine (CoreCompatibilityTest)
7907         from DoCompatibleTest.
7908
7909         (LambdaExpression.TryBuild): New method, this method tries to
7910         build the LambdaExpression with the given set of types to be used
7911         as the types for the various parameters of the lambda expression. 
7912
7913         If the compilation succeed with the given types, the infered type
7914         of the Anonymous method is returned, otherwise null is returned.
7915
7916 2007-04-23  Marek Safar  <marek.safar@gmail.com>
7917
7918         A fix for bug #81414
7919         * delegate.cs: Better fix, moved ApplyAttributes from Define to Emit.
7920
7921 2007-04-22  Miguel de Icaza  <miguel@novell.com>
7922
7923         * cs-tokenizer.cs: Change various identifiers here from the
7924         camelCasing to the recommended Linux-like style for instance
7925         variables from the Coding Guidelines. 
7926
7927 2007-04-19  Martin Baulig  <martin@ximian.com>
7928
7929         * convert.cs
7930         (Convert.ImplicitReferenceConversionCore): Allow conversions from
7931         System.Enum to System.ValueType.
7932
7933 2007-04-13  Martin Baulig  <martin@ximian.com>
7934
7935         Rewrote implicit reference conversions.  We need to distinguish
7936         between implicit reference conversions (13.1.4) and implicit
7937         boxing conversions (13.1.5).
7938
7939         According to the spec, there's an an implicit conversion
7940         "From a one-dimensional array-type S[] to IList<T> and base
7941         interfaces of this interface, provided there is an implicit
7942         reference conversion from S to T."  Note that this does not
7943         include boxing conversions.
7944
7945         * convert.cs
7946         (Convert.ImplicitTypeParameterBoxingConversion): New method.
7947         (Convert.ImplicitReferenceConversion): Split into
7948         ImplicitReferenceConversionCore() and
7949         ImplicitBoxingConversionExist().
7950         (Convert.ImplicitReferenceConversionExists): Use the new
7951         ImplicitReferenceConversionCore() and ImplicitBoxingConversionExists().
7952
7953 2007-04-12  Martin Baulig  <martin@ximian.com>
7954
7955         * convert.cs (Convert.ImplicitReferenceConversion): Move the
7956         `TypeManager.null_type' checks up to the top of the method.
7957
7958 2007-04-11  Marek Safar  <marek.safar@gmail.com>
7959
7960         A fix for bug #81350
7961         * class.cs, decl.cs, ecore.cs, namespace.cs: The optimization for private
7962         extension methods.
7963
7964 2007-04-11  Martin Baulig  <martin@ximian.com>
7965
7966         * statement.cs (Foreach.CollectionForeach.ProbeCollectionType):
7967         Use `TypeManager.GetInterfaces(t)' rather than `t.GetInterfaces()'
7968         to make this work for generic classes; fixes #79561.
7969
7970 2007-04-11  Martin Baulig  <martin@ximian.com>
7971
7972         * expression.cs (As): Add support for nullable types; fixes #79371.
7973
7974 2007-04-11  Martin Baulig  <martin@ximian.com>
7975
7976         * doc.cs (DocUtil.GetSignatureForDoc): Don't crash if
7977         `type.FullName' is null; fixes #80243.
7978
7979 2007-04-11  Martin Baulig  <martin@ximian.com>
7980
7981         * expression.cs (Invocation.IsApplicable): Don't modify the method
7982         if type inference succeeded, but the method was not applicable.
7983         Fixes #81250.
7984
7985 2007-04-10  Marek Safar  <marek.safar@gmail.com>
7986
7987         A fix for bug #81324
7988         * namespace.cs (Namespace.LookupExtensionMethod): Always inspect both
7989         internal and external namespaces containers.
7990
7991 2007-04-10  Martin Baulig  <martin@ximian.com>
7992
7993         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Use
7994         TypeManager.DropGenericMethodArguments() so we also call
7995         IMethodData.SetMemberIsUsed() for generic methods.  Fixes #80357.
7996
7997 2007-04-10  Martin Baulig  <martin@ximian.com>
7998
7999         * iterators.cs (Iterator.CreateIterator): Don't crash if
8000         `method.ReturnType' is null.  This happens if something went wrong
8001         while resolving that typ (we already reported an error in this case).
8002
8003 2007-04-10  Martin Baulig  <martin@ximian.com>
8004
8005         * expression.cs (New.DoResolve): Don't call CheckComImport() on
8006         generic interfaces; report the CS0144 directly.
8007
8008 2007-04-10  Martin Baulig  <martin@ximian.com>
8009
8010         * ecore.cs (MemberExpr.ResolveMemberExpr): If `left' is a
8011         `TypeExpr', call ResolveAsTypeTerminal() on it; fixes #81180.
8012
8013 2007-04-10  Martin Baulig  <martin@ximian.com>
8014
8015         * expression.cs (New.DoEmitTypeParameter): Fix #81109.
8016
8017 2007-04-09  Raja R Harinath  <rharinath@novell.com>
8018
8019         A better fix
8020         * flowanalysis.cs (UsageVector.MergeChild): Handle child.Block == null.
8021         * statement.cs: Use KillFlowBranching only in ResolveUnreachable.
8022
8023         Fix #81338
8024         * statement.cs (For.Resolve): If resolution fails, use
8025         KillFlowBranching.
8026
8027 2007-04-08  Marek Safar  <marek.safar@gmail.com>
8028
8029         * anonymous.cs (MakeName): Make faster and zero-based.
8030         (VerifyExplicitParameterCompatibility): Back to mode where generic
8031         parameter is ignored.
8032         (AnonymousMethodMethod.Emit): Decorate method as compiler generated.
8033
8034         * class.cs (EmitType): Method can emit another new method.
8035
8036         * cs-tokenizer.cs (IsLinqEnabled): Fixes static cctor race.
8037
8038         * driver.cs: Updated.
8039
8040         * lambda.cs: Reuse predefined empty parameters.
8041
8042         * parameter.cs: Updated
8043
8044         * support.cs: Implemented InflateTypes.
8045
8046         * typemanager.cs (GetFullName): Don't use FullName as it can be null.
8047         (InitSystemCore): Introduced to isolate 3.0 dependencies.
8048
8049 2007-04-03  Martin Baulig  <martin@ximian.com>
8050
8051         Fix #80632.
8052
8053         * statement.cs (Foreach.CollectionForeach.TryType): Use a custom
8054         version of TypeManager.IsOverride() which also works with generic
8055         types.  
8056
8057 2007-04-03  Martin Baulig  <martin@ximian.com>
8058
8059         Fix #81044.
8060
8061         * convert.cs
8062         (Convert.ExplicitReferenceConversion): We need to cast when
8063         converting from IList<T> to S[].
8064
8065 2007-04-01  Marek Safar  <marek.safar@gmail.com>
8066
8067         * decl.cs (FindExtensionMethods): Consider all candidates with same name
8068         at this level.
8069         
8070         * expression.cs (MemberAccess.DoResolve): Cache resolved expression.
8071
8072 2007-03-31  Marek Safar  <marek.safar@gmail.com>
8073
8074         * anonymous.cs (AnonymousMethodExpression.Compatible): Handles both
8075         argument and return type inferring.
8076
8077         * codegen.cs (InferReturnType): Flag whether return can be inferred.
8078         (ReturnType): Turned to property.
8079
8080         * statement.cs (Return): Implemented return type inferring.
8081
8082         * support.cs (ReflectionParameters): Use local types if possible.
8083
8084 2007-03-30  Raja R Harinath  <rharinath@novell.com>
8085
8086         * flowanalysis.cs (FlowBranching.Reachability): Remove.
8087         (FlowBranching.UsageVector): Update to changes.
8088
8089         Prepare to kill 'Reachability'
8090         * flowanalysis.cs (UsageVector): Remove 'Reachability' from
8091         argument of constructor.
8092
8093 2007-03-29  Raja R Harinath  <rharinath@novell.com>
8094
8095         Prepare to kill 'Reachability'
8096         * flowanalysis.cs (UsageVector.is_unreachable): New.
8097         (UsageVector): Update to maintain 'is_unreachable' in parallel to
8098         'reachability', and verify they're consistent.
8099
8100         Fix #81121
8101         * expression.cs (New.EmitStatement): Handle type parameters here too.
8102
8103 2007-03-29  Martin Baulig  <martin@ximian.com>
8104
8105         Fix #79148.
8106
8107         * anonymous.cs
8108         (ScopeInfo.ctor): Use `Modifiers.PUBLIC' if we're a nested
8109         CompilerGeneratedClass.
8110         (ScopeInfo.EmitScopeInstance): Make this protected.
8111         (CapturedVariable.EmitInstance): Use `Ldarg_0' if
8112         `ec.CurrentAnonymousMethod.Scope == Scope'.
8113
8114         * statement.cs (Block.ScopeInfo): Make this a property.
8115
8116 2007-03-27  Raja R Harinath  <harinath@gmail.com>
8117
8118         Prepare to kill 'Reachability'
8119         * flowanalysis.cs (FlowBranching.Reachability): Make class private.
8120         (FlowBranching.UsageVector.Reachability): Remove property.
8121         (FlowBranching.UsageVector.IsUnreachable): New property.
8122         (FlowBranching.UsageVector.ResetBarrier): New.
8123         (FlowBranching.UsageVector, FlowBranchingLabeled): Update to changes.
8124         * codegen.cs, statement.cs: Update to changes.
8125
8126 2007-03-27  Martin Baulig  <martin@ximian.com>
8127
8128         Fix #81209.
8129
8130         * decl.cs
8131         (DeclSpace.LookupNestedTypeInHierarchy): Correctly handle nested
8132         generic types.
8133
8134 2007-03-26  Raja R Harinath  <rharinath@novell.com>
8135
8136         * flowanalysis.cs (FlowBranching.Reachability): Use a boolean
8137         instead of TriState.  Remove all mention of TriState.
8138
8139         * flowanalysis.cs (FlowBranching.Reachability): Prepare to be
8140         replaced by a boolean.  Add boolean 'is_unreachable' field, check
8141         and maintain invariants.
8142
8143 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8144
8145         * anonymous.cs: Restored checks disabled for uninflated anonymous methods.
8146
8147 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8148
8149         * expression.cs: Stop using obsolete 2.0 opcodes.
8150
8151 2007-03-25  Marek Safar  <marek.safar@gmail.com>
8152
8153         * enum.cs (EnumMember.Define): Fixed regression and slowdown caused by
8154         one of the latests Martin's fixes.
8155
8156 2007-03-23  Miguel de Icaza  <miguel@novell.com>
8157
8158         * expression.cs: On BigEndian systems, swap the bytes, temporary
8159         solution until we get a new bitconverter class.
8160
8161 2007-03-23  Martin Baulig  <martin@ximian.com>
8162
8163         Fix #81158.
8164
8165         * decl.cs (MemberCache.AddMembers): Add generic methods both as
8166         "Method" and "Method`1".  Normally, a cache lookup is done on the
8167         "Method" form (ie. without the generic arity), but this one makes
8168         lookups on the full form work as well.
8169
8170 2007-03-22  Raja R Harinath  <rharinath@novell.com>
8171
8172         * flowanalysis.cs (Reachability): Reorganize slightly, and remove
8173         unused properties.
8174
8175 2007-03-20  Bill Holmes  <billholmes54@gmail.com>
8176         * class.cs: 
8177         Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
8178         ordered_member_list, to TypeBuilder to store members to be defined
8179         in the order they were parsed in.
8180         - ordered_explicit_member_list contains all properties indexers
8181           and methods that are defined as explicit implementation of an
8182           interface or base class.
8183         - ordered_member_list contains all properties indexers and methods
8184           that are not defined as explicit implementation of an interface
8185           or base class.
8186
8187         Removed MethodArrayList and IndexerArrayList from TypeBuilder.  The 
8188         functionality in these removed classes has been replaced with 
8189         ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and 
8190         CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
8191
8192         Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
8193         to CheckForDuplications inside GetMethod and SetMethod Define Method
8194         to handle method property and indexer name conflicts.
8195
8196         Fixes #79434
8197
8198         All code is contributed under the MIT/X11 license.
8199
8200 2007-03-20  Martin Baulig  <martin@ximian.com>
8201
8202         * class.cs (TypeContainer.Interfaces): Removed; they're now
8203         included in `TypeContainer.Types'.
8204
8205 2007-03-20  Martin Baulig  <martin@ximian.com>
8206
8207         Fix #77963, #80314 and #81019.  Added gtest-317, ..., gtest-320.
8208
8209         * class.cs (TypeContainer.CreateType): New public method.  This is
8210         now called before DefineType() to create the TypeBuilders.
8211         (TypeContainer.DefineType): Don't create the TypeBuilder here; it
8212         has already been created by CreateType().
8213         (TypeContainer.DefineTypeBuilder): Renamed into CreateTypeBuilder();
8214         don't resolve our base classes here; this has been moved into
8215         DefineBaseTypes().  We're now called from CreateType().
8216         (TypeContainer.DefineBaseTypes): New private method; resolve our
8217         base classes here.  We're now called from DefineType().
8218
8219         * rootcontext.cs
8220         (RootContext.ResolveTree): Call TypeContainer.CreateType() on all
8221         our types first to create all the TypeBuilders.  After that, call
8222         TypeContainer.DefineType() on all the types which'll resolve their
8223         base classes and setup the resolve order.
8224
8225 2007-03-20  Martin Baulig  <martin@ximian.com>
8226
8227         * class.cs (TypeContainer.Enums): Removed; they're now included in
8228         `TypeContainer.Types'.  
8229
8230 2007-03-20  Martin Baulig  <martin@ximian.com>
8231
8232         * class.cs
8233         (TypeContainer.DefineType): Don't call ResolveMembers() here.
8234         (TypeContainer.DoResolveMembers): Call DefineType() on our
8235         `compiler_generated' classes; moved here from DefineNestedTypes().
8236
8237         * rootcontext.cs
8238         (RootContext.ResolveTree): Call ResolveMembers() on all
8239         TypeContainer's in the `type_container_resolve_order'.
8240
8241 2007-03-19  Marek Safar  <marek.safar@gmail.com>
8242
8243         * class.cs: Use corlib to handle InternalMethodImplAttribute.
8244
8245 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8246
8247         * class.cs (EventFieldAccessor.EmitMethod): Don't override existing
8248         implementation flags.
8249
8250 2007-03-17  Marek Safar  <marek.safar@gmail.com>
8251
8252         * class.cs: More optimizations for type parameters.
8253
8254 2007-03-15  Marek Safar  <marek.safar@gmail.com>
8255
8256         * anonymous.cs (AnomymousMethod): Can be now hosted in generic container.
8257
8258         * ecore.cs, parameter.cs: More common code for both corlibs.
8259
8260         * typemanager.cs (IsGenericMethod): Simplified.
8261
8262 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8263
8264         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8265         'returns'.
8266         * statement.cs, iterators.cs, lambda.cs: Update to changes.
8267
8268         * statement.cs (Lock.Resolve): Invoke 'ec.NeedReturnLabel'
8269         unconditionally.  Simplify explanation.
8270         (Try.Resolve, Using.Resolve): Likewise.
8271
8272 2007-03-15  Martin Baulig  <martin@ximian.com>
8273
8274         Fix #80731.
8275
8276         * decl.cs (DeclSpace): If we're a partial class, use our
8277         `PartialContainer's `TypeParameters' and `CurrentTypeParameters'.
8278
8279 2007-03-15  Raja R Harinath  <rharinath@novell.com>
8280
8281         * flowanalysis.cs (FlowBranching.Reachability): Remove handling of
8282         'throws'.
8283         (FlowBranching.UsageVector): Update to changes.
8284         (FlowBranching.MergeSiblings): Likewise.
8285         * statement.cs: Likewise.
8286
8287 2007-03-15  Martin Baulig  <martin@ximian.com>
8288
8289         Fix #79302.
8290
8291         * decl.cs
8292         (MemberCache): Added a special .ctor for type parameters.
8293
8294         * typemanager.cs
8295         (TypeManager.MemberLookup_FindMembers): `TypeParameter' now has a
8296         `MemberCache'.  
8297
8298 2007-03-09  Martin Baulig  <martin@ximian.com>
8299
8300         * enum.cs (Enum): Make this a TypeContainer.
8301         (EnumMember): Derive from `Const'.
8302
8303         * const.cs
8304         (Const.DoResolveValue): New protected virtual method; move most of
8305         the functionality of ResolveValue() here so we can override it in
8306         `EnumMember'.
8307         (Const.CreateConstantReference): Make this virtual.
8308
8309         * class.cs (Kind): Add `Kind.Enum'.
8310         (TypeContainer.Emit): Don't emit the enums here; they're already
8311         in the `RootContext.typecontainer_resolve_order'.
8312
8313         * rootcontext.cs (RootContext.EmitCode): Don't emit the enums
8314         here; they're already in the `typecontainer_resolve_order'.
8315
8316         * ecore.cs (EnumConstant.ConvertImplicitly): Add
8317         TypeManager.DropGenericTypeArguments().
8318
8319         * typemanager.cs
8320         (TypeManager.CSharpEnumValue): Add DropGenericTypeArguments().
8321         (TypeManager.IsEnumType): Likewise.
8322         (TypeManager.EnumToUnderlying): Likewise.
8323         (TypeManager.IsEqual): Add support for enums.
8324
8325 2007-03-12  Raja R Harinath  <rharinath@novell.com>
8326
8327         * typemanager.cs (InitCoreTypes) [NET_2_0]: Allow
8328         DefaultParameterValueAttribute to be undefined, say if System.dll
8329         is not referenced.
8330
8331 2007-03-11  Marek Safar  <marek.safar@gmail.com>
8332
8333         * ecore.cs, parameter.cs, typemanager.cs: Another gmcs fix to work with
8334         any mscorlib.
8335
8336 2007-03-10  Marek Safar  <marek.safar@gmail.com>
8337
8338         * class.cs, parameter.cs: Unified parameters verification.
8339
8340 2007-03-08  Martin Baulig  <martin@ximian.com>
8341
8342         * cs-parser.jay (constructor_header): Pass the location to the
8343         newly created TopLevelBlock.
8344
8345 2007-03-07  Martin Baulig  <martin@ximian.com>
8346
8347         * statement.cs (Block.Resolve): Don't crash on error; bug #80715.
8348
8349 2007-03-06  Miguel de Icaza  <miguel@novell.com>
8350
8351         * convert.cs (ExplicitReferenceConversionExists): Sync this method
8352         with the changes from David, fixes the build.
8353
8354 2007-03-05  David Mitchell  <dmitchell@logos.com>
8355
8356         * convert.cs: Implement From System.Collecitons.Generic.IList<T>
8357         and its base interfaces to a one-dimensional array type S[],
8358         provided there is an implicit or explicit reference conversion
8359         from S to T.
8360
8361 2007-03-03  Marek Safar  <marek.safar@gmail.com>
8362
8363         * cs-tokenizer.cs: Implemented basic linq grammar.
8364
8365         * driver.cs: Set linq lang version on demand.
8366
8367 2007-02-26  Marek Safar  <marek.safar@gmail.com>
8368
8369         * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
8370
8371 2007-02-25  Marek Safar  <marek.safar@gmail.com>
8372
8373         * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation
8374         (Fixes #80455)
8375
8376         * class.cs (InterfaceMemberBase): Share common `extern' modifier checks
8377         here.
8378         Check property and event extern attributes.
8379
8380         * codegen.cs (ModuleClass): HasDefaultCharSet when module defined global
8381         charset.
8382
8383 2007-02-24  Marek Safar  <marek.safar@gmail.com>
8384
8385         A fix for bug #80407
8386         * ecore.cs: Don't report ambiguity error when methods have same parent.
8387
8388 2007-02-23  Marek Safar  <marek.safar@gmail.com>
8389
8390         A fix for bug #80878
8391         * class.cs, cs-parser.jay: Event property can host anonymous methods.
8392
8393 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8394
8395         * attribute.cs: Enable ExtensionAttribute presence test.
8396
8397 2007-02-22  Marek Safar  <marek.safar@gmail.com>
8398
8399         * class.cs: Warn about missing GetHashCode only when Equals is override.
8400
8401         * decl.cs: Check accessibility of type arguments.
8402
8403         * typemanager.cs: Correctly report nullable array.
8404
8405 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8406
8407         * class.cs, report.cs: Capture more details when things go wrong.
8408
8409 2007-02-20  Marek Safar  <marek.safar@gmail.com>
8410
8411         A fix for bug #80650
8412         * cs-parser.jay: Anonymous container starts at constructor declaration
8413         and not at block beginning because it has to be usable in constructor
8414         initializer.
8415
8416         * statement.cs: Use context location and not block one for error reporting.
8417
8418 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8419
8420         A fix for bug #78712
8421         * class.cs.cs, decl.cs, ecore.cs: LookupAnyGeneric inspects nested types
8422         too.
8423
8424 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8425
8426         A fix for bug #80493 by Atsushi Enomoto
8427         * cs-parser.jay: Ignore invalid attribute target.
8428
8429 2007-02-18  Marek Safar  <marek.safar@gmail.com>
8430  
8431         * cs-tokenizer.cs: Ignore '\0' as white space character.
8432
8433 2007-02-17  Miguel de Icaza  <miguel@novell.com>
8434
8435         * cs-parser.jay: Add support for lambda expressions to the mcs
8436         compiler as well.
8437
8438         * lambda.cs: Only clone when we are probing, not on the final call
8439         (Compatible is the final call). 
8440
8441         * statement.cs (CloneContext): Introduce class to provide block
8442         remapping during clone.
8443
8444         All statements Clone themselves now.
8445
8446         (Clone): special handling for blocks, when we clone a block, we
8447         register the block inside this routine, as children of the block
8448         might trigger a lookup. 
8449         
8450         * expression.cs: Add support for CloneContext in all expressions. 
8451         
8452 2007-02-17  Marek Safar  <marek.safar@gmail.com>
8453  
8454         A fix for bug #80493
8455         * statement.cs: Report ambiguous warning when interfaces are not related.
8456
8457 2007-02-15  Marek Safar  <marek.safar@gmail.com>
8458
8459         C# 3.0 extension methods.
8460
8461         * attribute.cs (Error_MisusedExtensionAttribute): Extension attribute
8462         cannot be used directly.
8463
8464         * class.cs (Class.Emit): Emit extension attribute if any class method
8465         is extension method.
8466         (Method.Define): Add basic extension method validation conditions.
8467         (Method.Emit): Emit extension attribute for method.
8468
8469         * codegen.cs (AssemblyClass): Emit extension attribute if at least one
8470         extension method exists. Currently we follow same approach as Microsoft
8471         does, emit even if a method or a class are private but this can change
8472         later.
8473
8474         * cs-parser.jay: Add handling of `this' keyword in method parameters
8475         context.
8476
8477         * decl.cs (DeclSpace.IsStaticClass): New property.
8478         (MemberCache.FindExtensionMethods): Looks for extension methods with
8479         defined name and extension type.
8480
8481         * doc.cs: Updated after OverloadResolve changes.
8482
8483         * driver.cs: Add new soft reference to System.Core.dll.
8484
8485         * ecore.cs (MethodLookup): Can return only MethodGroupExpr.
8486         (ExtensionMethodGroupExpr): Represents group of extension methods.
8487
8488         * expression.cs (Invocation): Moved methods BetterConversion, MoreSpecific,
8489         BetterFunction, IsOverride, IsAncestralType, OverloadResolve
8490         to MethodGroupExpr and made non-static for easier customization.
8491         (Invocation.DoResolve): Add extension method lookup when no standard
8492         method was found.
8493         (MemberAccess.DoResolve): Try extension methods if no member exists.
8494
8495         * modifiers.cs: Add METHOD_EXTENSION modifier.
8496
8497         * namespace.cs (RegisterExtensionMethodClass): Register class namespace
8498         as well as candidate extension type.
8499         (ComputeNamespaces): When assembly constains extension methods registers
8500         them.
8501         (Namespace.RegisterExternalExtensionMethodClass): Register type for later
8502         extension method lookup.
8503         (Namespace.LookupExtensionMethod): Looks for extension method in this
8504         namespace.
8505         (NamespaceEntry.LookupExtensionMethod): Does extension methods lookup to
8506         find a method which matches name and extensionType.
8507
8508         * parameter.cs (Parameter): Add This modifer.
8509         (HasExtensionMethodModifier): New property.
8510         (Resolve): Add extension parameter check.
8511         (ModFlags): turned to property to exclude this modifier as it is not real
8512         parameter modifier.
8513         (Parameters): Implemented ExtensionMethodType and HasExtensionMethodType.
8514
8515         * support.cs (ParameterData): Add ExtensionMethodType.
8516         (ReflectionParameters): Implemented ExtensionMethodType interface property.
8517
8518         * typemanager.cs: Add type and ctor extension attribute type.
8519
8520 2007-02-15  Miguel de Icaza  <miguel@novell.com>
8521
8522         * report.cs (DisableErrors, EnableErrors): used to prevent error
8523         output when we are "trying" to compile various methods with
8524         different types. 
8525
8526         * ecore.cs (Expression): Add Clone method that calls the virtual
8527         CloneTo method.  The current CloneTo method in Expression throws
8528         an exception so we can track down all the places where this must
8529         be implemented (not using abstract, because that would be a lot of
8530         up-front-work before we can start testing the implementation
8531         idea). 
8532
8533         Important: we only need Clone capabilities for expressions created
8534         by the parser, as the expressions we will be cloning are
8535         expressions in the pre-resolved state.   This vastly simplifies
8536         the work required. 
8537         
8538         (SimpleName): Add CloneTo that does nothing.
8539         (EmptyCast): Add CloneTo.
8540         
8541         * expression.cs (Binary): Implement CloneTo.
8542         (Invocation.IsApplicable): Store the current ec in
8543         EmitContext.TempEc and restore it on return.  This is used so we
8544         do not have to sprinkle hundres of methods with an extra
8545         EmitContext, we know that the only user is the lambda expression
8546         ImplicitConversionExists code. 
8547         
8548         (Argument): Add Cloning capabilities.
8549         (LocalVariableReference, ParenthesizedExpression, Unary, Probe,
8550         Cast, Conditional, ArrayCreation, InvocationOrCast, Invocation,
8551         ArglistAccess, ArgList, TypeOf, SizeOf, CheckedExpr,
8552         UnCheckedExpr, ElementAccess, BaseAccess, BaseIndexerAccess,
8553         IndexerAccess): Add Clone capability.
8554
8555         (LocalVariableReference, This): TODO: needs cloned Block mapping.
8556
8557         (Argument): Add cloning capability.
8558
8559         * assign.cs (Assign): Implement CloneTo.
8560
8561         * anonymous.cs (ImplicitStandardConversionExists): Make virtual.
8562         
8563         * lambda.cs (ImplicitStandardConversionExists): Implement lambda
8564         version by calling Convert with the EmitContext (that we are
8565         currently storing in ec, this is not great, but will do for now,
8566         to avoid passing EmitContext parameters to hundreds of functions
8567         that do not need them now).
8568
8569         (SetExpression): Remove, it is not needed.
8570         
8571         (ContextualReturn): Implement CloneTo.
8572
8573         * statement.cs (Statement): Implement cloning infrastructure,
8574         similar to expressions.
8575
8576         (Block): Partial implementation of Clone for statements.
8577
8578         (Return): Implement clone.
8579         
8580         * constant.cs (Constant.CloneTo): New method, does nothing.
8581
8582         * codegen.cs (TempEc): Add a static EmitContext as a temporary
8583         solution, until we decide how to exactly do this.  
8584         
8585 2007-02-14  Marek Safar  <marek.safar@gmail.com>
8586  
8587         A fix for bug #80493
8588         * class.cs (FindOutBaseMethod): When the base accessor does not exist and
8589         a property is override we need to use second accessor.
8590
8591 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8592  
8593         A fix for bug #80418
8594         * attribute.cs, class.cs: Use correct calling conventions for pinvoke
8595         methods.
8596
8597 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8598
8599         Another fix for bug #80749
8600         * pending.cs: Abstract class has priority over interfaces.
8601
8602 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8603
8604         Another fix for bug #80749
8605         * pending.cs: Abstract class has priority over interfaces.
8606
8607 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8608
8609         Another fix for bug #80749
8610         * pending.cs: Abstract class has priority over interfaces.
8611
8612 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8613
8614         Another fix for bug #80749
8615         * pending.cs: Abstract class has priority over interfaces.
8616
8617 2007-02-13  Marek Safar  <marek.safar@gmail.com>
8618
8619         * class.cs Better error message.
8620
8621         * driver.cs: Add shorter versions of -optimize option.
8622
8623 2007-02-13  Martin Baulig  <martin@ximian.com>
8624
8625         * class.cs (Constructor.Emit): Check the return value of
8626         ec.ResolveTopBlock() and return on error.
8627
8628 2007-02-13  Raja R Harinath  <rharinath@novell.com>
8629
8630         * ecore.cs (Error_InvalidExpressionStatement): Add a comma to error
8631         message to fix error message regression.
8632
8633 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8634
8635         * delegate.cs: Delegate creation expression cannot be of Nullable type.
8636
8637 2007-02-12  Marek Safar  <marek.safar@gmail.com>
8638
8639         A fix for bug #80749
8640         * assign.cs (FieldInitializer): FieldInitializer has to keep track of
8641         its parent container.
8642
8643         * class.cs (DefineFieldInitializers): Each initializer can has different
8644         resolve context.
8645
8646         * const.cs: Updated.
8647
8648 2007-02-11  Miguel de Icaza  <miguel@novell.com>
8649
8650         * lambda.cs (LambdaExpression.Compatible): Remove some early code,
8651         now all the heavy lifting to check that embedded statements or
8652         expressions have the right form is done in the ContextualReturn.
8653
8654         (ContextualReturn): New class.  
8655
8656         * ecore.cs (Error_InvalidExpressionStatement): Make a helper
8657         method that can be invoked to report 201, so we do not replicate
8658         this everywhere.
8659
8660         * cs-parser.jay: Reuse Error_InvalidExpressionStatement.
8661         
8662         * cs-tokenizer.cs (xtoken): Correctly compute the column, it was
8663         treating tabs as spaces. 
8664
8665 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8666
8667         A fix for bug #80315 by martin.voelkle@gmail.com (Martin Voelkle)
8668         * assign.cs: Use full implicit conversion for right side check.
8669
8670 2007-02-09  Marek Safar  <marek.safar@gmail.com>
8671
8672         * statement.cs (Switch): Switch over boolean type is not standardized.
8673
8674 2007-02-08  Marek Safar  <marek.safar@gmail.com>
8675
8676         A fix for bug #80755
8677         * decl.cs (FindBaseEvent): Don't use method cache for events.
8678
8679 2007-02-07  Marek Safar  <marek.safar@gmail.com>
8680
8681         * cs-parser.jay: Better syntax error handling.
8682
8683         * ecore.cs, enum.cs, statement.cs, typemanager.cs: Print enum member name
8684         instead of underlying type value.
8685
8686 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8687
8688         * driver.cs: Check define identifier before is registered.
8689
8690         * namespace.cs: Use existing error message.
8691
8692         * report.cs: New warning.
8693
8694 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8695
8696         A fix for bug #80742
8697         * expression.cs: Delegate Invoke method can be called directly.
8698
8699 2007-02-06  Marek Safar  <marek.safar@gmail.com>
8700
8701         A fix for bug #80676
8702         * class.cs (IsEntryPoint): The Main method can have params modifier.
8703
8704 2007-02-04  Miguel de Icaza  <miguel@novell.com>
8705
8706         * parameter.cs (Parameter, Parameters): Add Clone method.
8707
8708         * anonymous.cs (Compatible): Turn method into virtual method, so
8709         LambdaExpression can implement a different behavior.
8710
8711         (CompatibleChecks, VerifyExplicitParameterCompatibility): Factor
8712         out the basic checking here, so it can be used by
8713         LambdaExpressions.
8714         
8715         * lambda.cs: Introduce "Compatible" function that will do the
8716         heavy lifting.
8717
8718 2007-02-02  Marek Safar  <marek.safar@gmail.com>
8719
8720         * attribute.cs: Unified one error message.
8721
8722         * class.cs (Class): Use type attributes and not properties to test static
8723         class.
8724         (IsEntryPoint): Don's pass local variable.
8725
8726         * convert.cs: Removed duplicate check.
8727
8728         * decl.cs, doc.cs, ecore.cs (LookupType): Renamed to LookupNamespaceOrType.
8729
8730         * driver.cs: Don't crash when soft reference does not exist.
8731
8732         * namespace.cs (EnsureNamespace): Renamed to RegisterNamespace.
8733         (UsingEntry): Removed redundant allocation.
8734
8735         * parameter.cs: Add fast path for type parameters.
8736
8737         * support.cs: Don't allocate attribute when it's not used.
8738
8739 2007-01-30  Miguel de Icaza  <miguel@novell.com>
8740
8741         * anonymous.cs
8742         (AnonymousMethodExpression.ImplicitStandardConversionExists): turn
8743         this into a virtual method, so we can override it in LambdaExpression.
8744
8745         * driver.cs: Improve diagnostics in case of failure. 
8746
8747         * cs-tokenizer.cs: Instead of trying to parse a type and a name,
8748         write a function that is slightly more complex and that parses:
8749
8750         type identifier [, type identifier]* )
8751
8752         The old function would return incorrectly a OPEN_PARENS_LAMBDA for
8753         this expression:
8754
8755                 (canEmpty ? i >= 0 : i > 0)
8756
8757 2007-01-30  Raja R Harinath  <rharinath@novell.com>
8758
8759         * cs-tokenizer.cs (parse_namespace_or_typename): Don't throw an
8760         exception on possibly valid code.
8761
8762 2007-01-29  Raja R Harinath  <rharinath@novell.com>
8763
8764         * cs-tokenizer.cs (is_punct) ['<']: Update to changes in
8765         Push/PopPosition.
8766         (parse_opt_type_arguments): Remove.  It's almost the same as
8767         parse_less_than.
8768         (parse_namespace_or_typename): Use parse_less_than.
8769
8770 2007-01-28  Miguel de Icaza  <miguel@novell.com>
8771
8772         * cs-tokenizer.cs: Typo fix, its not GMCS_SOURCES but GMCS_SOURCE,
8773         this bug took a few hours to find, because the state saved and
8774         restored by PushPosition and PopPosition was ignoring the state of
8775         parse_generic_less_than.
8776
8777         I can also now remove the handling of OP_LT and OP_GT, this solves
8778         the big mistery.
8779         
8780         * cs-tokenizer.cs: store the location for the ARROW token, we use
8781         that in the parser.
8782
8783         (PushPosition, PopPosition): save/restore also `current_token',
8784         restore `parse_generic_less_than' (was missing).
8785
8786         (parse_opt_type_arguments): use parse_type, not
8787         parse_namespace_or_typename to parse types.
8788
8789         * lambda.cs: Empty new file, will eventually have the lambda
8790         expression implementation.
8791
8792         * lambda.test: used to test the internal tokenizer. 
8793
8794         * report.cs (FeatureIsNotISO1): Rename from
8795         FeatureIsNotStandardized, because it was about the language level
8796         (1 vs 2) it was not about standarization.
8797
8798         (FeatureRequiresLINQ): New.
8799
8800         * support.cs (SeekableStreamReader): Only require that the reader
8801         is a TextReader, not a StreamReader, so we can plug StringReader. 
8802
8803         * cs-tokenizer.cs (parse_type_and_parameter): Returns true if at a
8804         given position in the input stream the following tokens can be
8805         parsed as a type followed by an identifier.
8806
8807         (is_punct): after a '(' if parse_type_and_parameter returns true,
8808         then return a special token OPEN_PARENS_LAMBDA which is used to
8809         avoid reduce/reduce errors in the grammar for the
8810         lambda_expression rules.
8811
8812         (parse_type): implement a type parser inside the
8813         tokenizer, the parser only returns true or false depending on
8814         whether the input at a given position can be parsed as a type.
8815
8816         (peek_token): new method used during type parsing.
8817
8818 2007-01-28  Raja R Harinath  <rharinath@novell.com>
8819
8820         Fix #80531
8821         * anonymous.cs (ScopeInfo.InflateParameters): New.
8822         (AnonymousContainer.Resolve): Use it to redirect types of
8823         delegate parameters.
8824
8825 2007-01-27  Raja R Harinath  <rharinath@novell.com>
8826
8827         Fix #80530
8828         * expression.cs (Error_InvalidArguments): Don't use two different
8829         messages for CS1503.  Use ExtraInformation and
8830         SymbolRelatedToPreviousError instead.
8831
8832         Fix #80358
8833         * decl.cs (DeclSpace.initialize_type_params): Don't access
8834         'type_params' of a partial class directly.
8835
8836 2007-01-26  Miguel de Icaza  <miguel@novell.com>
8837
8838         * constant.cs: Removed a handful of out-of-range checks that were
8839         not necessary. 
8840
8841 2007-01-25  Marek Safar  <marek.safar@gmail.com>
8842
8843         * expression.cs (CheckUselessComparison): Add additional check for char
8844         constants.
8845
8846         * namespace.cs: Fixed typo.
8847
8848 2007-01-23  Miguel de Icaza  <miguel@novell.com>
8849
8850         * constant.cs: Bloat removal, CheckRange and CheckUnsigned are
8851         gone, instead we inline the test, preventing the needless casts to
8852         longs, ulongs and doubles for the parameters, avoiding calls to
8853         methods that overchecked stuff, and instead inlined things
8854         nicely. 
8855
8856 2007-01-20  Marek Safar  <marek.safar@gmail.com>
8857
8858         * cs-parser.jay: Better parameter error handling.
8859
8860 2007-01-17  Marek Safar  <marek.safar@gmail.com>
8861
8862         A fix for bug #80368, #80522
8863         * expression.cs (ArrayCreation.only_constant_initializers): Indicates
8864         whether array initializer contains constants only.
8865         (ArrayCreation.Emit): Use better formula to decide when
8866         are array initializers for static initialization.
8867         (ArrayCreation.EmitDynamicInitializers): When the array is small enough we
8868         have to emit even constants otherwise they are pre-initialized.
8869
8870 2007-01-17  Bill Holmes  <bill.holmes@ansys.com>
8871             Raja R Harinath  <rharinath@novell.com>
8872
8873         Fix emit order of 'get' vs. 'set'.
8874         * support.cs (Accessors): New.
8875         * cs-parser.jay (accessor_declarations): Use it instead of 'Pair'.
8876         Note the order in which accessors are declared in the source.
8877         * class.cs (PropertyBase.DefineGet, PropertyBase.DefineSet): New.
8878         Refactored from Property.Define and Indexer.Define.
8879         (PropertyBase.DefineAccessors): New helper that calls the above in
8880         appropriate order as noted by the parser.
8881         (Property.Define, Indexer.Define): Update to changes.
8882         (PropertyBase.SetMethod.PropertyInfo): Don't return a null.
8883
8884 2007-01-17  Raja R Harinath  <rharinath@novell.com>
8885
8886         Fix cs0029-6.cs and gcs0029-2.cs (regression)
8887         * ecore.cs (EmptyConstantCast.ConvertImplicitly): Check that
8888         there's an implicit conversion from the current type to the target
8889         type before converting the underlying constant.
8890
8891 2007-01-16  Marek Safar  <marek.safar@gmail.com>
8892
8893         * const.cs (ResolveValue): Updated after constant conversion was made more
8894         generic.
8895
8896         * constant.cs (GetAttributableValue): constant to object conversion is
8897         used for attributes only.
8898         (IntConstant.ConvertImplicitly): Moved from convert to be used in all
8899         constant conversions.
8900         (LongConstant.ConvertImplicitly): Ditto.
8901
8902         * convert.cs (ImplicitNumericConversion): Extracted constant bussiness.
8903         (ImplicitConversionStandard): Handle constant conversion as extra step.
8904         It solves the issue when constant conversion was called indirectly like
8905         inside array initializer and constant folding was skipped.
8906
8907         * literal.cs (NullLiteral.ConvertImplicitly): Fixed an issue exposed by
8908         this change.
8909
8910         * statement.cs(ImplicitConversionStandard): Updated after constant
8911         conversion was made more generic.
8912
8913 2007-01-16  Sergey P. Kondratyev <se@unicom.tomica.ru>
8914
8915         * expression.cs (As.DoResolve): Use GenericConstraints instead of
8916         Constraints, solves the problem where the compiler incorrectly
8917         reported that a type parameter was not constrained to a class (Bug
8918         80518)
8919
8920 2007-01-14  Marek Habersack  <grendello@gmail.com>
8921
8922         * doc-bootstrap.cs: Fix a compilation problem in the bootstrap phase.
8923
8924 2007-01-14  Marek Safar  <marek.safar@gmail.com>
8925
8926         A fix for bug #80368
8927         * assign.cs (FieldInitializer): New class implements field
8928         initializer statement.
8929
8930         * attribute.cs: Update after FieldMember rename.
8931
8932         * class.cs (PropertyBasedMember): New common class for property based
8933         types.
8934         (InterfaceMemberBase): New base class for all members which can be used as
8935         an interface members.
8936         (MethodCore): Moved really common code to InterfaceMemberBase.
8937         (Method.Define): Equal and GetHasCode detection is relevant for methods
8938         only.
8939         (MethodData.Define): Don't assume that public event implements an
8940         interface automatically.
8941         (MethodData.DefineMethodBuilder): Issue an error even if only extern
8942         modifier is used.
8943         (MemberBase): Moved all interface speficic code to InterfaceMemberBase.
8944         (FieldMember): Merged with FieldBase.
8945         (EventProperty.AEventPropertyAccessor): New specialization to check whether
8946         event extern modifier can be used.
8947         (EventField.EventFieldAccessor): Moved event field specific code here.
8948         (Event.AllowedModifiers): Even event can be extern.
8949         (Event.FindOutBaseMethod): New override specific to events.
8950         (Indexer.parameters): Reintroduce parameters because base class holds
8951         only properties common data.
8952         (Indexer.CheckForDuplications): Indexers are threated as methods so we
8953         need do extra parameters check.
8954
8955         * const.cs: Update after FieldMember rename.
8956
8957         * decl.cs (MemberCache.FindBaseEvent): New method.
8958
8959         * doc.cs (GetMethodDocCommentName): Accept parameters as extra argument
8960         to reflect that indexer is now derived from PropertyBased.
8961
8962         * ecore.cs (GetMemberType): Made public.
8963         (EventExpr.ResolveMemberAccess): Use right event cache and checks for
8964         obsolete event.
8965
8966         * flowanalysis.cs, statement.cs: Update after FieldMember rename.
8967         
8968         * typemanager.cs (CSharpSignature): Correctly print event accessors.
8969         (RegisterEvent): Removed.
8970         (RegisterPrivateFieldOfEvent): Renamed to RegisterEventField.
8971         (GetPrivateFieldOfEvent): Renamed to GetEventField.
8972
8973 2007-01-11  Raja R Harinath  <rharinath@novell.com>
8974
8975         Fix #80249
8976         * statement.cs (CollectionForeach.TryType): Prefer generic
8977         GetEnumerator over non-generic variant.  Fix code to follow comments.
8978
8979 2007-01-09  Raja R Harinath  <rharinath@novell.com>
8980
8981         Fix #80446
8982         * support.cs (ReflectionParameter): Don't use an invalid index on
8983         the generic parameter data.
8984
8985 2007-01-08  Miguel de Icaza  <miguel@novell.com>
8986
8987         * driver.cs: Just add a tiny bit of infrastructure.
8988
8989 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8990
8991         * class.cs (VerifyMembers): Fixed an crash reported on mono mailing list
8992         where field type is struct from current assembly.
8993         
8994         * ecore.cs (EnumConstant.AsString): Report an enum member name whenever
8995         it is possible.
8996
8997 2007-01-02  Marek Safar  <marek.safar@gmail.com>
8998
8999         A fix for bug #80381
9000         * attribute.cs (AttributeTester.RegisterNonObsoleteType): Registers
9001         the core types.
9002
9003         * namespace.cs (GlobalRootNamespace.LookupTypeReflection): Better error
9004         messages.
9005         (Namespace.LookupType): Always use core types from corlib when speficied.
9006
9007         * report.cs: A new warning.
9008
9009         * rootcontext.cs (BootstrapCorlib_ResolveInterface,
9010         BootstrapCorlib_ResolveClass): Register type as non-obsolete type.
9011         (ResolveCore): Add missing System.Runtime.InteropServices._Attribute.
9012
9013         * typemanager.cs (CoreLookupType): Register type as non-obsolete type.
9014         (InitCoreTypes): Set expression type of object_type and value_type
9015         immediately after lookup.
9016
9017 2007-01-01  Miguel de Icaza  <miguel@novell.com>
9018
9019         * cs-tokenizer.cs: Accept Pc class characters (Connector
9020         Punctuation) as valid identifiers.  Fixes #78259
9021
9022         * expression.cs (Invocation.DoResolve): Moved the check for the
9023         use of `this' for doing method calls to the Invocation resolution
9024         step, after overload resolution has taken place instead of doing
9025         the check at the low-level `This.DoResolve' level.
9026
9027         The `This.DoResolve'(appens before overload resolution, so it has
9028         no way of knowing if the method that will be called will be
9029         instace or static, triggering an erroneous report for cs0188 (Bug
9030         78113).
9031
9032         We now do the check for instance method invocations after we know
9033         what method will be called.
9034
9035         (This.CheckThisUsage): Move the actual use of this structure
9036         checking into its own method and expose it. 
9037
9038         * Everywhere that called Error_ValueCannotBeConverted: pass a new
9039         EmitContext.
9040
9041         Exceptions: Null.ConvertImplicitly,
9042         Constant.ImplicitConversionRequired as there are too many call
9043         sites for passing the ec. 
9044
9045         * ecore.cs (Expression.Error_ValueCannotBeConverted): Take an
9046         EmitContext, if the value is null, then we do not try to provide
9047         the extra information from the error (If a userdefined conversion
9048         exists, as UserDefinedConversion requires a non null-EmitContext).
9049
9050         Fixes: #80347
9051
9052 2006-12-30  Raja R Harinath  <rharinath@novell.com>
9053
9054         * flowanalysis.cs (MyBitVector): Document some invariants.
9055         (MyBitVector.Or, MyBitVector.And): Reimplement the optimizations
9056         introduced below, and add a couple of others, 
9057
9058 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9059
9060         * attribute.cs (GetMethodObsoleteAttribute): Uses new
9061         GetPropertyFromAccessor and GetEventFromAccessor.
9062         
9063         * class.cs (MethodCore.CheckBase): A new warning when obsolete member
9064         overrides non-obsolete one.
9065         (Indexer.Define): Error message has been moved to the parser.
9066
9067         * cs-parser.jay: Better syntax errors handling.
9068
9069         * delegate.cs (NewDelegate.DoResolve): Issue less confusing error message
9070         when an invocation has no arguments.
9071
9072         * ecore.cs: Removed not used caching.
9073
9074         * expression.cs (IsSpecialMethodInvocation): Reuses TypeManager
9075         implementation.
9076
9077         * report.cs: Add a new warning.
9078
9079         * support.cs (ReflectionParameters): Implements Equals, GetHashCode.
9080
9081         * typemanager.cs (enumeration_type): Removed.
9082         (CSharpSignature): Reuses IsSpecialMethod.
9083         (IsEqual): Hack for MS BCL.
9084         (GetPropertyFromAccessor): New method.
9085         (GetEventFromAccessor): New method.
9086         (IsSpecialMethod): Fixed to handle more cases.
9087
9088 2006-12-30  Marek Safar  <marek.safar@gmail.com>
9089
9090         * cs-tokenizer.cs (PreProcessDefinition, handle_preprocessing_directive):
9091         Made white spaces array static.
9092
9093         * ecore.cs (RemoveGenericArity): Optimized.
9094
9095         * flowanalysis.cs (MyBitVector.Or, MyBitVector.And): Optimized (up to
9096         10 times faster).
9097         (MyBitVector.initialize_vector): Simplified.
9098
9099 2006-12-22  Miguel de Icaza  <miguel@novell.com>
9100
9101         * ecore.cs: Am not entirely happy with this hack, but it seems to
9102         address the issue in 80257 (a small test case for
9103         CreativeDocs.NET). 
9104
9105         I set the MethodGroupExpr.Type to an internal compiler type
9106         (itself in this case) to force the resolution to take place.   Why
9107         it does not take place with a null is beyond me.
9108
9109 2006-12-20  Marek Safar  <marek.safar@gmail.com>
9110
9111         A fix for bug #80288
9112         * expression.cs (ResolveOperator): Consider user defined conversion for
9113         logical and operator too.
9114         (EmitBranchable): Optimization for logical and when full constant folding
9115         could not be applied but one operand is constant.
9116
9117 2006-12-19  Marek Safar  <marek.safar@gmail.com>
9118
9119         * class.cs (GetClassBases): Write 5 times every day, will never use
9120         FullName for error reporting.
9121
9122         * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
9123
9124 2006-12-19  Martin Baulig  <martin@ximian.com>
9125
9126         * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
9127         the symbol file info here.
9128
9129 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9130
9131         * cs-tokenizer.cs (handle_preprocessing_directive): When previous section
9132         of `elseif' is taking then following sections are not taking.
9133         Fixes an issue reported on mono mailing list.
9134
9135 2006-12-18  Marek Safar  <marek.safar@gmail.com>
9136
9137         A fix for bug #80300
9138         * cs-tokenizer.cs (PreProcessDefinition): Do no define/undefine when
9139         a caller is not taking.
9140
9141 2006-12-18  Raja R Harinath  <rharinath@novell.com>
9142
9143         * anonymous.cs: Change several TypeContainer declarations to DeclSpace.
9144         (CompilerGeneratedClass): Use parent.PartialContainer unconditionally.
9145         (RootScopeInfo, AnonymousMethodMethod): Update to changes.
9146         * iterator.cs: Change several TypeContainer declarations to DeclSpace.
9147         * class.cs: Update to changes.
9148
9149 2006-12-17  Marek Safar  <marek.safar@gmail.com>
9150
9151         A fix for bug #79934
9152         * anonymous.cs (CompilerGeneratedClass): Register class in a shared
9153         partial container.
9154
9155         * class.cs (ResolveMembers): Register an iterator in current container and
9156         not in shared one.
9157
9158 2006-12-16  Raja R Harinath  <rharinath@novell.com>
9159
9160         Fix test-543.cs
9161         * expression.cs (VerifyArgumentsCompat): Allow zero arguments to
9162         satisfy a params annotated parameter.
9163
9164 2006-12-16  Marek Safar  <marek.safar@gmail.com>
9165
9166         A fix for bug #77014
9167         * expression.cs (Invocation.BetterFunction): Fixed to cope with dynamic
9168         paramters correctly and not rely on hacks in Parameters class.
9169         (Invocation.IsParamsMethodApplicable): Changed to accept params parameter
9170         at any possition.
9171         (Invocation.VerifyArgumentsCompat): Ditto.
9172         (Invocation.EmitArguments): Changed to correctly emit params arguments at
9173         any possition.
9174
9175         * parameter.cs (HasParams): Don't assume that params is the last one.
9176
9177         * support.cs (ReflectionParameters.ctor): Look for params attribute
9178         correctly.
9179         (ReflectionParameters.ParameterType): Removed hack when we returned last
9180         parameter for out of range parameters.
9181         (ParameterName, ParameterModifier): Ditto.
9182
9183 2006-12-14  Marek Safar  <marek.safar@gmail.com>
9184
9185         A fix for bug #79987
9186         * decl.cs (DeclSpace.VerifyClsCompliance): External names cache is null
9187         when assembly is not CLS compliant but type is. I have no idea why is this
9188         allowed.
9189
9190         * typemanager.cs (Reset): Invalidate AllClsTopLevelTypes cache.
9191
9192 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9193
9194         * class.cs (ConstructorInitializer.Resolve): Allow for ":this()"
9195         in struct constructors, they are basically no-ops.
9196
9197 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9198
9199         * cs-tokenizer.cs (Position): Save preprocessor status too.
9200
9201 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9202
9203         A fix for bug #77794
9204         * cs-tokenizer.cs (consume_identifier): Check for correct partial context.
9205
9206 2006-12-12  Marek Safar  <marek.safar@gmail.com>
9207
9208         * cs-tokenizer.cs (get_cmd_arg): Support CR as the line terminator.
9209         Fixes #69299.
9210         (pp_expr): Report error for an invalid expression.
9211         (handle_preprocessing_directive): Simplified; add more error checking.
9212
9213 2006-12-11  Marek Safar  <marek.safar@gmail.com>
9214
9215         A fix for bug #74939
9216         * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
9217         directives handling.
9218
9219 2006-12-10  Marek Safar  <marek.safar@gmail.com>
9220
9221         A fix for bugs #80093, and #75984
9222         * cs-tokenizer.cs (handle_preprocessing_directive): Fixed #if/#else/#endif
9223         logic, it seems to me as it worked before "by coincidence".
9224         (xtoken): Simplified to use reworked handle_preprocessing_directive.
9225         (cleanup): Enabled endif check.
9226
9227 2006-12-09  Marek Safar  <marek.safar@gmail.com>
9228
9229         A fix for bug #80162
9230         * statement.cs (CollectionForeach.TryType): Generics and non-generics
9231         enumerators are never ambiguous.
9232
9233 2006-12-08  Raja R Harinath  <rharinath@novell.com>
9234
9235         Fix #80060
9236         * cs-tokenizer.cs (parse_less_than): Recognize double-colons too.
9237
9238 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9239
9240         A fix for bug #80144
9241         * class.cs (EventProperty.Define): Explicit implementation means
9242         that an even is used.
9243
9244 2006-12-06  Marek Safar  <marek.safar@gmail.com>
9245
9246         Fixes the operators implementation (part II)
9247
9248         * cfold.cs (DoConstantNumericPromotions): Renamed to
9249         DoBinaryNumericPromotions and simplified.
9250         (BinaryFold): Couple of conversion fixes; simplified.
9251
9252         * constant.cs, ecore.cs, literal.cs
9253         (ToType): Renamed to ConvertImplicitly.
9254         (Reduce): Renamed to ConvertExplicitly.
9255
9256         * class.cs, convert.cs: Updated.
9257
9258         * expression.cs: TryReduce doesn't throw an exception.
9259
9260 2006-12-01  Marek Safar  <marek.safar@gmail.com>
9261
9262         A fix for bug #80108
9263         * ecore.cs (EventExpr.EmitAddOrRemove): Don't crash when right side is not
9264         compatible.
9265
9266 2006-11-30  Marek Safar  <marek.safar@gmail.com>
9267
9268         Fixes unary operators implementation (part I)
9269         Also fixes #80026
9270
9271         * cfold.cs (Error_CompileTimeOverflow): Made internal
9272
9273         * const.cs (IConstant): Changed to use reference to constant and
9274         not constant itself.
9275         Updated IConstant implementations.
9276
9277         * constant.cs (CreateConstant): New factory method.
9278         Updated IConstant implementation.
9279
9280         * convert.cs (ImplicitStandardConversionExists): Uses compiler Equals.
9281
9282         * ecore.cs: Updated to use CreateConstantReference.
9283
9284         * enum.cs: Reflects IConstant changes.
9285
9286         * expression.cs (Unary): Reimplemented +,-,~ to conform C# standard.
9287
9288         * literal.cs (NullConstant): Change to be independently usable.
9289
9290 2006-11-29  Martin Baulig  <martin@ximian.com>
9291
9292         * class.cs (Constructor.Emit): Correctly handle anonymous methods;
9293         we need to emit the scope initializer before calling the base .ctor.
9294
9295         * anonymous.cs: Merged back from the new anonymous methods branch.
9296         (AnonymousMethodHost): Renamed to `RootScopeInfo'.
9297
9298         * expression.cs (ParameterReference.DoResolveBase): Create a
9299         "normal" ScopeInfo when capturing parameters rather than using the
9300         root scope; this makes things work with anonymous methods having
9301         parameters.
9302
9303         * statement.cs
9304         (ToplevelBlock.AnonymousMethodHost): Renamed into `RootScope'.
9305
9306 2006-11-22  Marek Safar  <marek.safar@gmail.com>
9307
9308         A fix for bug #79987
9309         * class.cs (VerifyClsCompliance): Move redundant CLS compliance attribute
9310         check to a base class.
9311         * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be tested
9312         only when assembly has missing attribute.
9313         * report.cs: Update.
9314
9315 2006-11-21  Marek Safar  <marek.safar@gmail.com>
9316
9317         * cs-tokenizer.cs: Merged with gmcs version.
9318
9319 2006-11-20  Marek Safar  <marek.safar@gmail.com>
9320
9321         * cs-tokenizer.cs,
9322         * cs-parser.jay: Better error message when partial keyword is misplaced.
9323
9324 2006-11-19  Gert Driesen  <drieseng@users.sourceforge.net>
9325
9326         A fix for bug #79810
9327         report.cs: CS1058 only applies to 2.0 profile (gmcs).
9328         codegen.cs: on 2.0 profile, non-exception throwables are wrapped in
9329         a RuntimeWrappedException by default.
9330
9331 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9332
9333         A fix for bug #79843
9334         * delegate.cs (Delegate.VerifyMethod): Fixed covariance and contravariance
9335         implementation.
9336         (DelegateCreation.Error_NoMatchingMethodForDelegate): Ditto.
9337
9338 2006-11-18  Marek Safar  <marek.safar@gmail.com>
9339
9340         * driver.cs, namespace.cs: Uses faster IndexOf version.
9341
9342 2006-11-17  Marek Safar  <marek.safar@gmail.com>
9343
9344         A fix for bug #79941
9345         * class.cs (MemberCore.IsDuplicateImplementation): Add more tricks for
9346         operators.
9347         (Operator.Define): Implicit/Explicit operator of same type is duplicate
9348         even if internal name is different.
9349         * convert.cs (GetConversionOperator): Replaced EmitContext with parentType.
9350         (UserDefinedConversion): Simplified as the operators cannot be internal.
9351         * ecore.cs (Error_ValueCannotBeConverted): Take account of user
9352         conversions.
9353         (MethodLookup): Replaced EmitContext with parentType.
9354         * expression.cs: Updated.
9355
9356 2006-11-09  Raja R Harinath  <rharinath@novell.com>
9357
9358         * driver.cs (BadAssembly): Handle all the ugliness of
9359         DefineDynamicAssembly.
9360
9361 2006-11-08  Raja R Harinath  <rharinath@novell.com>
9362
9363         Address parts of #58244 -- most of what's left is in the runtime
9364         * driver.cs (LoadAssembly): Simplify slightly.  Add CS0009 and
9365         CS1509 error checks, and handle them for all assembly loads, not
9366         just the first invocation.
9367         (LoadModule): Likewise.  Move handling of 'adder_method' ...
9368         * codegen.cs (AssemblyClass.AddModule): ... here.
9369
9370 2006-11-02  Marek Safar  <marek.safar@gmail.com>
9371
9372         * statement.cs.cs (CollectionForeach.TryType): Issue a error when
9373         IEnumerable<T> is ambiguous.
9374
9375 2006-10-31  Marek Safar  <marek.safar@gmail.com>
9376
9377         A fix for bug #67689
9378         * statement.cs.cs (CollectionForeach.TryType): Issue a warning when
9379         GetEnumerator is ambiguous.
9380
9381         * report.cs: Add new warning.
9382
9383 2006-10-29  Marek Safar  <marek.safar@gmail.com>
9384
9385         A fix for bug #78602
9386         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9387         to protected member can be nested type.
9388
9389 2006-10-28  Marek Safar  <marek.safar@gmail.com>
9390
9391         A fix for bug #78965
9392         ecore.cs (PropertyExpr.InstanceResolve): The qualifier for access
9393         to protected member must derive from current type.
9394
9395 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9396
9397         assign.cs: Reuses error method.
9398
9399         ecore.cs (Expression.Error_ValueCannotBeConverted): Report a value
9400         instead of type for constants.
9401         (Expression.Error_ValueAssignment): Common error method.
9402
9403         * expression.cs (UnaryMutator.ResolveOperator): Value cannot be used
9404         for any assignment.
9405
9406 2006-10-27  Marek Safar  <marek.safar@gmail.com>
9407
9408         A fix for bug #79081
9409         * expression.cs (MemberAccess.DoResolve): Check nested type
9410         accessibility.
9411
9412 2006-10-27  Atsushi Enomoto  <atsushi@ximian.com>
9413
9414         * doc.cs : nested delegates were not handled. Fixed bug #79754.
9415
9416 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9417
9418         A fix for bug #76591
9419         * cs-tokenizer.cs (IsCastToken): Enable a cast of anonymous method.
9420
9421 2006-10-26  Marek Safar  <marek.safar@gmail.com>
9422
9423         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Don't allow to have
9424         type forwarder of the same type multiple times.
9425
9426 2006-10-26  Raja R Harinath  <rharinath@novell.com>
9427
9428         Fix #78820
9429         * ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
9430         instance as an rvalue, even when we later resolve as an lvalue.
9431
9432 2006-10-25  Martin Baulig  <martin@ximian.com>
9433
9434         * anonymous.cs: Fix #79673.
9435
9436 2006-10-24  Marek Safar  <marek.safar@seznam.cz>
9437
9438         A fix for bug #79666
9439         expression.cs (ArrayCreation.GetAttributableValue): An initializer can be
9440         ignored when is optimized (= default value) as its value is already set.
9441
9442 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9443
9444         A fix for bug #79724
9445         * report.cs (SymbolRelatedToPreviousError): Uses DeclSpace instead of
9446         TypeContainer for type lookup.
9447
9448 2006-10-23  Marek Safar  <marek.safar@seznam.cz>
9449
9450         A fix for bug #79231
9451         * ecore.cs (ResolveAsBaseTerminal): Removed redundant error test.
9452         * expression.cs (OverloadResolve): Always convert type name for
9453         an error message.
9454         (ResolveNamespaceOrType): Don't confuse a nested type with any 
9455         other member.
9456
9457 2006-10-18  Martin Baulig <martin@ximian.com>
9458
9459         * anonymous.cs: Propagate the IsStatic state, fixes the crasher in banshee.
9460
9461 2006-10-17  Miguel de Icaza  <miguel@novell.com>
9462
9463         * convert.cs: Fix typo, fixes the test-535.cs, we were casting to
9464         an int32, but requesting an int64 from the conversion
9465
9466 2006-10-12  Martin Baulig  <martin@ximian.com>
9467
9468         * anonymous.cs
9469         (AnonymousContainer.Resolve): Inflate the `ReturnType'.  Fixes #79592.
9470         
9471 2006-10-12  Martin Baulig  <martin@ximian.com>
9472
9473         * statement.cs
9474         (Using.EmitLocalVariableDeclFinally): Small fix for iterators.
9475
9476 2006-10-11  Miguel de Icaza  <miguel@novell.com>
9477
9478         * convert.cs: Remove broken code: I was doing the "Existance"
9479         tests for Implicit conversions.
9480
9481 2006-10-10  Miguel de Icaza  <miguel@novell.com>
9482
9483         * convert.cs: Added one missing case in
9484         ImplicitStandardConversionExists uint64 to intptr.
9485
9486         Fixes #59800
9487         
9488         * typemanager.cs (uintptr_type): another core known type.   
9489
9490         * ecore.cs (OperatorCast): routine used to do cast operations that
9491         depend on op_Explicit.  We could change some of the Decimal
9492         conversions to use this.
9493
9494         This one has a probe mechanism that checks both types for an op_
9495         which it coudl be used to eliminate two classes: CastToDecimal
9496         and CastFromDecimal.
9497
9498         * convert.cs: Implement the conversions documented in #59800
9499         
9500 2006-10-10  Martin Baulig  <martin@ximian.com>
9501
9502         * iterators.cs (Iterator.Resolve): Call RootScope.ResolveType()
9503         before RootScope.ResolveMembers().
9504
9505         * anonymous.cs (ScopeInfo.CapturedScope.ctor): Use the child's
9506         `CurrentType' if appropriate.
9507
9508 2006-10-09  Marek Safar  <marek.safar@seznam.cz>
9509
9510         A fix for bug #78568
9511         * cs-tokenizer.cs (Deambiguate_CloseParens): Expression cannot be cast
9512         when contains binary operators.
9513         * cs-parser.jay: Updated.
9514
9515 2006-10-09  Martin Baulig  <martin@ximian.com>
9516
9517         * delegate.cs
9518         (Delegate.DefineType): Don't call TypeParameter.Resolve() here;
9519         moved that into Define() and also do the other type parameter
9520         checks there.  Fixes #79094.  Added gtest-292.cs.
9521
9522         * expression.cs
9523         (ArrayCreation.EmitDynamicInitializers): Use `etype.IsValueType'
9524         since that doesn't include type parameters; don't use `Ldelema'
9525         for type parameters.  Fixes #78980.  Added gtest-293.cs.
9526
9527 2006-10-08  Marek Safar  <marek.safar@seznam.cz>
9528
9529         A fix for #77796
9530         * convert.cs (ExplicitReferenceConversion): Only enum to enum value
9531         conversion is allowed.
9532
9533 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9534
9535         * ecore.cs (Expression.MemberLookup): Don't register any symbol for
9536         error reporting when no error occurs.
9537
9538 2006-10-06  Marek Safar  <marek.safar@seznam.cz>
9539
9540         * cfold.cs (ConstantFold.BinaryFold): Report an error when the conversion
9541         does not exist.
9542
9543 2006-10-06  Raja R Harinath  <rharinath@novell.com>
9544
9545         Fix #79584
9546         * class.cs (DefineTypeBuilder): Check circular dependencies before
9547         setting the parent of the TypeBuilder.
9548         (CheckRecursiveDefinition): Don't use 'BaseType', since
9549         it may not be valid until after DefineTypeBuilder.  Use
9550         'base_type' instead.
9551
9552 2006-10-04  Martin Baulig  <martin@ximian.com>
9553
9554         Merged the Anonymous Methods patch.
9555
9556         * anonymous.cs, iterators.cs: The new anonymous methods code.
9557
9558         * statement.cs (Variable): New public abstract class.
9559         (LocalInfo.Variable): New public property.
9560         (LocalInfo.ResolveVariable): New public method.
9561         (Block.Flags): Add `IsIterator'.
9562         (Block.AddVariable): Improved the CS0136 check.
9563         (Block.AnonymousChildren): New public property.
9564         (Block.AddAnonymousChild): New public method.
9565         (ToplevelBlock): Update to use the new anonymous method framework.
9566         (ToplevelBlock.ctor): `container' is now a `Block' and not a
9567         `ToplevelBlock'; this is required to correctly implement the
9568         CS0136 check.
9569         (Fixed, Using): Use `TemporaryVariable' instead of directly
9570         creating the `LocalBuilder'.
9571
9572         * parameter.cs (Parameter.ResolveVariable): New public method.
9573         (Parameters.ResolveVariable): Likewise.
9574
9575         * ecore.cs (TemporaryVariable): Use the new `Variable' framework.
9576
9577         * class.cs (TypeContainer): Replaced the `iterators' list and
9578         corresponding methods with a list of `CompilerGeneratedClass'es.
9579         (TypeContainer.ResolveMembers): New public method.
9580         (Method): `IIteratorContainer' has been replaced by
9581         `IAnonymousHost'.
9582
9583         * expression.cs (VariableReference): New public abstract base
9584         class for `LocalVariableReference', `ParameterReference' and
9585         `This'.
9586
9587         * codegen.cs (EmitContext): Removed `capture_context',
9588         `HaveCaptureInfo', `EmitScopeInitFromBlock()' and `Capture*()'.
9589         (EmitContext.EmitThis): Removed.
9590
9591         * cs-parser.jay: Replace `iterator_container' with
9592         `anonymous_host'.       
9593
9594 2006-10-04  Martin Baulig  <martin@ximian.com>
9595
9596         * generic.cs (GenericMethod): Don't make this abstract.
9597         (Constraints.Clone): Added dummy implementation.
9598
9599 2006-10-04  Raja R Harinath  <harinath@gmail.com>
9600
9601         Fix #79577
9602         * namespace.cs (LookForAnyGenericType): Avoid nullref on
9603         'declspaces'.  Avoid allocating arrays willy-nilly.
9604
9605         Fix #79553
9606         * cfold.cs (BinaryFold): Move boolean Equality and Inequality
9607         cases out of the switch.
9608
9609 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9610
9611         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Better error
9612         message when non-generic type is used with the type arguments.
9613         * expression.cs: Updated.
9614
9615 2006-09-28  Raja R Harinath  <rharinath@novell.com>
9616
9617         Fix #79013
9618         * convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
9619         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
9620         Change semantics slightly.  Don't insist on having only one
9621         temporary EmptyExpression -- just throttle the creation of new ones.
9622
9623         Fix #79451
9624         * ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
9625         non-interfaces too.  If no methods are found, don't try to create
9626         a MethodGroupExpr.
9627
9628 2006-09-28  Marek Safar  <marek.safar@seznam.cz>
9629
9630         * ecore.cs (ResolveAsTypeStep): Print better error when type can be
9631         generic type.
9632
9633         * namespace.cs (Namespace.LookForAnyGenericType): New method to help
9634         us produce better error message.
9635
9636 2006-09-27  Marek Safar  <marek.safar@seznam.cz>
9637
9638         * expression.cs (Binary.ResolveOperator): Warn about a side effect
9639         of the `|' operator.
9640
9641         * report.cs: A new warning added.
9642
9643 2006-09-27  Martin Baulig  <martin@ximian.com>
9644
9645         * generic.cs (GenericMethod): Don't make this abstract.
9646
9647 2006-09-27  Martin Baulig  <martin@ximian.com>
9648
9649         * report.cs
9650         (InternalErrorException): Added overloaded ctor taking a params array.
9651
9652 2006-09-26  Marek Safar  <marek.safar@seznam.cz>
9653
9654         * class.cs, codegen.cs, const.cs, cs-tokenizer.cs, driver.cs, ecore.cs:
9655         Fixed the cases when same error was reported twice.
9656
9657         * report.cs (SymbolRelatedToPreviousError): Simplified as all our messages
9658         now report symbol information.
9659
9660 2006-09-25  Martin Baulig  <martin@ximian.com>
9661
9662         * class.cs: Completely unified with the gmcs version.
9663
9664 2006-09-25  Martin Baulig  <martin@ximian.com>
9665
9666         * typemanager.cs (TypeManager.IsNullableType): New public function.
9667         (TypeManager.IsNullableTypeOf): Likewise.
9668         (TypeManager.IsNullableValueType): Likewise.
9669
9670         * class.cs (MethodCore): Added the `GenericMethod' argument from
9671         gmcs and also unified all classes derived from `MethodCore' with gmcs.
9672
9673 2006-09-24  Raja R Harinath  <harinath@gmail.com>
9674
9675         * convert.cs: Unify with gmcs version.
9676
9677 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9678
9679         * decl.cs (DeclSpace.VerifyClsCompliance): When type has type parameters
9680         verify them as well.
9681
9682         * report.cs: New warning.
9683
9684 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9685
9686         * anonymous.cs (AnonymousMethod.Compatible): Cannot generate arguments
9687         for anonymous block with out argument.
9688
9689 2006-09-24  Marek Safar  <marek.safar@seznam.cz>
9690
9691         * class.cs (ClassOrStruct.VerifyMembers): Fixed to report correctly
9692         not used private events only.
9693
9694 2006-09-23  Marek Safar  <marek.safar@seznam.cz>
9695
9696         * cfold.cs (BinaryFold): On the guest to unify empty constant cast.
9697
9698         * const.cs (Const.Define): Check for constant type.
9699         (Const.IsConstantTypeValid): Looks for valid constant types.
9700
9701         * convert.cs (ImplicitReferenceConversion): NullCast to EmptyConstantCast.
9702
9703         * ecore.cs (EmptyConstantCast): New common class for all constant based
9704         EmptyCast(s).
9705
9706         * expression.cs (Is.DoResolve): Handle null constant especially.
9707         (New.DoResolve): Check for new void().
9708         (MemberAccess.DoResolve): Cope with all kind of nulls.
9709
9710         * literal.cs (NullConstant): Uses EmptyConstantCast.
9711         (NullDefault): Based on EmptyConstantCast.
9712         (NullLiteral): Uses EmptyConstantCast.
9713
9714         * statement.cs (Block.ResolveMeta): Check for constant type.
9715
9716 2006-09-22  Martin Baulig  <martin@ximian.com>
9717
9718         * delegate.cs, attribute.cs: Merged with the gmcs versions.
9719
9720 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9721
9722         * literal.cs (NullDefault): The type of default(IFoo) is 'IFoo',
9723         not the null type.
9724
9725         Fix part of #79451
9726         * typemanager.cs (Closure.Filter): Consider PrivateScope attributes.
9727         * decl.cs (DeclSpace.FindMemberToOverride): Likewise.  Reorganize
9728         code slightly.
9729
9730 2006-09-22  Martin Baulig  <martin@ximian.com>
9731
9732         * ecore.cs: Merged with the gmcs version.
9733
9734         * generic.cs (ConstructedType): New dummy class.
9735         (TypeArguments): Don't make this abstract.
9736
9737         * typemanager.cs
9738         (TypeManager.IsGenericTypeDefinition): New method.
9739         (TypeManager.GetGenericFieldDefinition): Moved here from gmcs.
9740
9741 2006-09-22  Raja R Harinath  <rharinath@novell.com>
9742
9743         * expression.cs (ComposedCast): Check for arrays of TypedReference
9744         before creating the type, not after.
9745
9746 2006-09-21  Marek Safar  <marek.safar@seznam.cz>
9747
9748         * cfold.cs, const.cs, enum.cs, statement.cs: Updated
9749         after ToType change.
9750
9751         * constant.cs (Constant.ImplicitConversionRequired): Designed to used
9752         when constant must be implicitly convertible.
9753
9754         * convert.cs (ImplicitReferenceConversion): Reuse ToType.
9755
9756         * ecore.cs (NullCast): Derives from NullConstant.
9757
9758         * expression.cs (Is.DoResolve): Removed useless variables.
9759         (Conditional.DoResolve): Quick hack for `Foo () ? null : null'.
9760         (New.Constantify): Add enum support.
9761         (MemberAccess.DoResolve): Add warning when accessing null constant or
9762         variable.
9763
9764         * generic.cs (GenericConstraints.IsReferenceType): Another dummy
9765         property.
9766
9767         * literal.cs (NullConstant): New abstract class with common
9768         functionality for all null specializations.
9769         (NullDefault): Represents default(X) when result can be
9770         reduced to null.
9771         (NullLiteral): Updated.
9772
9773         * report.cs: Add new warning.
9774
9775 2006-09-21  Martin Baulig  <martin@ximian.com>
9776
9777         * generic.cs (GenericTypeParameterBuilder): Removed this ugly hack.
9778
9779 2006-09-21  Martin Baulig  <martin@ximian.com>
9780
9781         * generic.cs (GenericConstraints): New dummy class.
9782         (Constraints): Likewise.
9783         (TypeParameter): Likewise.
9784         (TypeParameterName): Likewise.
9785         (GenericMethod): Likewise.
9786
9787         * typemanager.cs (TypeManager.GetGenericArguments): New method.
9788
9789         * decl.cs: Merged with the gmcs version.
9790
9791 2006-09-21  Raja R Harinath  <rharinath@novell.com>
9792
9793         * generic.cs (TypeParameter): Implement IMemberContainer.
9794         (GenericTypeParameterBuilder): New.  An abominable repugnant hack.
9795
9796         * rootcontext.cs: Unify with gmcs version.
9797
9798         * report.cs: Unify with gmcs version.
9799         * typemanager.cs (AddTypeParameter, LookupTypeParameter): Move
9800         from gmcs/generics.cs.
9801         * generics.cs (TypeParameter): New dummy class.
9802
9803         * support.cs: Unify with gmcs version.
9804
9805 2006-09-20  Raja R Harinath  <rharinath@novell.com>
9806
9807         * ecore.cs (MethodGroupExpr.ResolveGeneric): New dummy method.
9808         * expression.cs (MemberAccess, BaseAccess): Remove GMCS_SOURCE #ifdef.
9809
9810         * decl.cs (MemberName): Unify with gmcs, except for GetTypeExpression.
9811         * generic.cs (TypeArguments): New dummy class to help avoid #ifdefs.
9812         * mcs.exe.sources: Add generic.cs.
9813
9814         * codegen.cs: Unify with gmcs version.
9815
9816         * codegen.cs (IResolveContent.GenericDeclContainer): Copy from gmcs.
9817         (EmitContext): Add GenericDeclContainer implementation.
9818         * decl.cs (MemberCore, DeclSpace): Likewise.
9819         * namespace.cs: Remove #ifdef GMCS_SOURCE.
9820
9821         * namespace.cs (GetTypeInAssembly): Remove #ifdef GMCS_SOURCE.
9822         MCS TypeManager has a corresponding dummy method.
9823
9824 2006-09-19  Martin Baulig  <martin@ximian.com>
9825
9826         * expression.cs: Completely merged with the gmcs version.
9827
9828 2006-09-19  Martin Baulig  <martin@ximian.com>
9829
9830         * expression.cs (Invocation): Merged with the gmcs version.
9831         (ArrayAccess.GetStoreOpcode): Likewise.
9832
9833 2006-09-19  Martin Baulig  <martin@ximian.com>
9834
9835         * typemanager.cs
9836         (TypeManager.IsGenericMethod): Moved here from ../gmcs/generic.cs.
9837         (TypeManager.IsGenericMethodDefinition): Likewise.
9838
9839 2006-09-19  Martin Baulig  <martin@ximian.com>
9840
9841         * typemanager.cs
9842         (TypeManager.IsEqual): Moved the gmcs implementation here.
9843         (TypeManager.DropGenericTypeArguments): Likewise.
9844         (TypeManager.DropGenericMethodArguments): Likewise.
9845         (TypeManager.GetTypeArguments): Moved here from gmcs.
9846         (TypeManager.HasGenericArguments): Likewise.
9847
9848 2006-09-19  Martin Baulig  <martin@ximian.com>
9849
9850         * expression.cs (Binary): Merged with the gmcs version.
9851
9852 2006-09-19  Martin Baulig  <martin@ximian.com>
9853
9854         * expression.cs (Probe, As, Is): Merged with the gmcs version.
9855
9856 2006-09-19  Martin Baulig  <martin@ximian.com>
9857
9858         * typemanager.cs: Merged with the gmcs version.
9859
9860 2006-09-16  Raja R Harinath  <rharinath@novell.com>
9861
9862         * AssemblyInfo.cs [GMCS_SOURCE]: Unify with gmcs source.
9863         * driver.cs: Likewise.
9864
9865 2006-09-16  Marek Safar  <marek.safar@seznam.cz>
9866
9867         A fix for #79401
9868         * class.cs (MethodCore.VerifyClsCompliance): Do check for abstract members
9869         only if parent type is class.
9870         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Fixed missing cache
9871         update.
9872
9873 2006-09-15  Marek Safar  <marek.safar@seznam.cz>
9874
9875         * cs-parser.jay,
9876         * expression.cs(MemberAccess.DoResolve): Don't crash when not allowed
9877         keywords are used.
9878         * typemanager.cs(CSharpName): Converts NullType to null.
9879
9880 2006-09-15  Martin Baulig  <martin@ximian.com>
9881
9882         * typemanager.cs
9883         (TypeManager.GetMethodName): Added mcs implementation.
9884         (TypeManager.IsEqual): Likewise.
9885
9886         * ecore.cs
9887         (SimpleName.RemoveGenericArity): Added dummy implementation.
9888
9889         * pending.cs: Merged with the gmcs version.     
9890
9891 2006-09-15  Martin Baulig  <martin@ximian.com>
9892
9893         * statement.cs: Merge with the gmcs version.
9894
9895 2006-09-15  Martin Baulig  <martin@ximian.com>
9896
9897         * statement.cs (Switch): Merge with the gmcs implementation
9898         (without nullables), which is newer.
9899
9900 2006-09-15  Martin Baulig  <martin@ximian.com>
9901
9902         * statement.cs (Block.Variables): Make this public.
9903         (ToplevelBlock.Parameters): Make this a property.
9904         (Throw.Resolve): Use `TypeManager.IsSubclassOf ()'.
9905
9906 2006-09-15  Martin Baulig  <martin@ximian.com>
9907
9908         * namespace.cs: Merge with the gmcs version.
9909
9910 2006-09-15  Martin Baulig  <martin@ximian.com>
9911
9912         * decl.cs (MemberName): Minor code cleanups.
9913
9914 2006-09-15  Martin Baulig  <martin@ximian.com>
9915
9916         * parameter.cs: Merge with the gmcs version.
9917
9918 2006-09-15  Martin Baulig  <martin@ximian.com>
9919
9920         * enum.cs: Merge with the gmcs version: 3005 is a warning in gmcs
9921         and an error in mcs.
9922
9923 2006-09-15  Martin Baulig  <martin@ximian.com>
9924
9925         * flowanalysis.cs: Merged from GMCS; added the generics code into
9926         a `GMCS_SOURCE' conditional so we can share this file.
9927
9928 2006-09-08  Martin Baulig  <martin@ximian.com>
9929
9930         * typemanager.cs (TypeManager.interlocked_type): New public field.
9931         (TypeManager.int_interlocked_compare-exchange): New public field.
9932         (TypeManager.InitEnumUnderlyingTypes): Also initialize the
9933         enumerator types here and call InitGenericCoreTypes().
9934         (TypeManager.InitCoreTypes): Call InitEnumeratorTypes() right
9935         after calling InitEnumUnderlyingTypes().
9936
9937         * rootcontext.cs
9938         (RootContext.ResolveCore): Added `System.Threading.Interlocked' to
9939         `classes_second_stage'. 
9940
9941 2006-09-14  Marek Safar  <marek.safar@seznam.cz>
9942
9943         * assign.cs, ecore.cs, expression.cs: Share error message text.
9944         * class.cs (FieldMember.Define): Check for varible of static type.
9945         * driver.cs (LoadAssembly): Uses error output for errors.
9946         * statement.cs: Updated.
9947
9948 2006-09-08  Marek Safar  <marek.safar@seznam.cz>
9949
9950         * expression.cs (Error_OperatorCannotBeApplied): Report type instead of
9951         type instance.
9952
9953 2006-09-07  Martin Baulig  <martin@ximian.com>
9954
9955         * driver.cs
9956         (MainDriver): Revert r62663 from Marek; see #70506 for details.
9957
9958 2006-08-29  Miguel de Icaza  <miguel@novell.com>
9959
9960         * cs-parser.jay: Turn 1522 into a warning, instead of an error #79210
9961         
9962 2006-08-17  Miguel de Icaza  <miguel@novell.com>
9963
9964         * cs-tokenizer.cs: Apply patch from Atsushi Enomoto that fixes
9965         #52019 and #79064, the use of the \uXXXX sequence in source code
9966         to represent unicode characters.
9967
9968 2006-08-15  Marek Safar  <marek.safar@seznam.cz>
9969
9970         * expression.cs (SizeOf.DoResolve): Check for void type. Fixed enum types
9971         support.
9972         * class.cs, ecore.cs, statement.cs: Merged to one error message.
9973
9974 2006-08-13  Miguel de Icaza  <miguel@novell.com>
9975
9976         * assign.cs: Catch attempts to assign to a method groups in += and
9977         report as 1656
9978
9979 2006-08-13  Marek Safar  <marek.safar@seznam.cz>
9980
9981         A fix for #79056
9982         * cs-parser.jay: Don't destroy current array type by typeof of array's.
9983
9984 2006-08-12  Marek Safar  <marek.safar@seznam.cz>
9985
9986         * class.cs (Method.Define): Issue a warning when generic method looks like
9987         an entry point.
9988         * decl.cs (MemberCore.GetSignatureForError): Print member type arguments
9989         as well.
9990
9991 2006-08-09  Marek Safar  <marek.safar@seznam.cz>
9992  
9993         * anonymous.cs(AnonymousDelegate.Emit): Uses Constructor filter when
9994         looking for ctor.
9995         * decl.cs (MemberCache.FindMembers): When container is interface we need to
9996         search all base interfaces as a member can be ambiguous.
9997         * delegate.cs (Delegate.FindMembers): Fixed to return valid data for
9998         Constructor member type filter. 
9999         (Delegate.ResolveConstructorMethod) Uses Constructor filter.
10000         * ecore.cs: (Expression.MemberLookup): Implemented ambiguity error/warning
10001         reporting for returned memberinfos.
10002         * report.cs: Updated.
10003         * typemanager.cs (TypeManager.LookupBaseInterfacesCache): Uses TypeManager
10004         version to work on all runtimes.
10005         (TypeManager.RealMemberLookup): Removed members filtering.
10006
10007 2006-08-08  Raja R Harinath  <rharinath@novell.com>
10008
10009         * ecore.cs (FieldExpr.EmitAssign): Release temporary.
10010         (PropertyExpr.EmitAssign): Likewise.
10011         * expression.cs (Indirection.EmitAssign): Likewise.
10012         (LocalVariableReference.EmitAssign): Likewise.
10013         (ParameterReference.EmitAssign): Likewise.
10014         (Invocation.EmitArguments): Likewise.
10015         (ArrayAccess.EmitAssign): Likewise.
10016         (IndexerAccess.EmitAssign): Likewise.
10017         (This.EmitAssign): Likewise.
10018         (ConditionalLogicalOperator.Emit): Likewise.
10019
10020         Fix #79026
10021         * codegen.cs (EmitContext.GetTemporaryLocal): Simplify.  Use Stack
10022         instead of ArrayList.  If the hashtable has a LocalBuilder, don't
10023         leave it in after returning it.
10024         (EmitContext.FreeTemporaryLocal): Simplify.  Update to changes.
10025
10026 2006-08-06  Marek Safar  <marek.safar@seznam.cz>
10027
10028         * expresssion.cs (IndexerAccess.DoResolve): Fixed to report correct error
10029         message.
10030
10031 2006-08-03  Raja R Harinath  <rharinath@novell.com>
10032
10033         Fix cs0146-3.cs and cs0146-4.cs.
10034         * class.cs (TypeManager.CheckRecursiveDefinition): Check that
10035         enclosing types don't depend on the current type.
10036
10037 2006-08-02  Raja R Harinath  <rharinath@novell.com>
10038
10039         Fix #77963
10040         * class.cs (TypeContainer.DoDefineMembers): Use
10041         FindBaseMemberWithSameName on Parent, since we're interested in
10042         whether we hide inherited members or not.
10043         (FindBaseMemberWithSameName): Make slightly more robust.
10044
10045         Fix the non-generic testcase from #77396
10046         * decl.cs (DeclSpace.DeclContainer): Remove override.
10047
10048         * namespace.cs (NamespaceEntry.Doppelganger): Create slave
10049         declspaces for doppelgangers too.
10050         (UsingEntry): Implement IResolveContext.
10051         (UsingEntry.Resolve): Don't set ToplevelTypes.Namespace.  Use
10052         'this' as the resolve context.
10053         (LocalAliasEntry): Likewise.
10054
10055         Implement parts of #77403
10056         * roottypes.cs (RootDeclSpace): New.  Used to represent the
10057         toplevel declaration space.  Each namespace declaration introduces
10058         a "partial" root declaretion space.
10059         * namespace.cs (NamespaceEntry.SlaveDeclSpace): New.
10060         (NamespaceEntry.ctor): Create a SlaveDeclSpace if necessary.
10061         * cs-parser.jay (CSharpParser.ctor): Initialize 'current_class'
10062         from 'current_namespace.SlaveDeclSpace'.
10063         (namespace_declaration): Likewise.
10064         * class.cs (TypeContainer.ctor): Remove parent==ToplevelTypes
10065         check.  It can't happen now.
10066         * decl.cs (DeclSpace.LookupType): Likewise.
10067         * driver.cs (MainDriver): Sanity check.
10068
10069 2006-08-01  Raja R Harinath  <rharinath@novell.com>
10070
10071         * decl.cs (DeclSpace.FindNestedType): Remove.
10072         (DeclSpace.LookupNestedTypeINHierarchy): Use PartialContainer and
10073         LookupTypeContainer to get the container of the nested type.
10074         * class.cs (TypeContainer.FindNestedType): Make non-override.
10075
10076 2006-07-31  Raja R Harinath  <rharinath@novell.com>
10077
10078         * decl.cs (DeclSpace.PartialContainer): Move field from ...
10079         * class.cs (TypeContainer.PartialContainer): ... here.
10080         (TypeContainer.AddBasesForPart): New helper.
10081         (MemberBase.ParentContainer): Remove.  Use Parent.PartialContainer
10082         instead.
10083         * cs-parser.jay (current_class): Convert to DeclSpace.
10084         (struct_declaration, interface_declaration, class_declaration):
10085         Use AddBasesForPart instead of .Bases directly.
10086         * const.cs, iterators.cs: Update to changes.
10087
10088 2006-07-28  Raja R Harinath  <rharinath@novell.com>
10089
10090         * class.cs (TypeContainer.AddMemberType): Rename from
10091         AddToTypeContainer.
10092         (TypeContainer.AddMember): Rename from AddToMemberContainer.
10093         (AddTypeContainer): New.  Combine AddClassOrStruct and
10094         AddInterface.
10095         (AddPartial): Update.  Add 'is_partial' argument.
10096         * roottypes.cs: Update to changes.
10097         * cs-parser.jay (push_current_class): New helper for handling
10098         current_container and current_class.
10099         (struct_declaration, interface_declaration, class_declaration):
10100         Use it.
10101
10102 2006-07-26  Raja R Harinath  <rharinath@novell.com>
10103
10104         * roottypes.cs: Rename from tree.cs.
10105
10106         Rename RootContext.Tree.Types to RootContext.ToplevelTypes.
10107         * tree.cs (Tree, ITreeDump): Remove types.
10108         * rootcontext.cs (tree, Tree): Remove fields.
10109         (root, ToplevelTypes): New.
10110         * *.cs: Update to rename.
10111
10112         * tree.cs (Tree.RecordDecl): Remove.
10113         (RootTypes.AddToTypeContainer): Record the toplevel type in its
10114         namespace here.
10115         * class.cs, cs-parser.jay: Remove mention of RecordDecl.
10116
10117 2006-07-23  Raja R Harinath  <harinath@gmail.com>
10118
10119         * codegen.cs (EmitContext.Flags): Move InCatch, InFinally,
10120         DoFlowAnalysis and OmitStructFlowAnalysis here.
10121         (ec.With): Rename from WithUnsafe and generalize.
10122         (ec.WithCheckState): Remove.  All users can be handled by 'With'.
10123         (ec.WithFlowAnalyis): New.
10124         * ecore.cs, expression.cs, statement.cs: Update.
10125
10126 2006-07-22  Raja R Harinath  <harinath@gmail.com>
10127
10128         * statement.cs (Block.ResolveMeta): Simplify slightly.
10129
10130         * codegen.cs (EmitContext.Flags): New enum.  Used to represent the
10131         multiple boolean fields.  Convert InUnsafe, constant_check_state,
10132         check_state to flags.
10133         (CheckState, ConstantCheckState): Update.
10134         (InUnsafe): New read-only property.
10135         (FlagsHandle): Rename from CheckStateHandle and convert to handle
10136         arbitrary flags.
10137         (WithUnsafe): New helper similar to WithCheckState.
10138         * statement.cs (Block.ResolveMeta): Use WithUnsafe.
10139         (Unsafe.Resolve, Unsafe.DoEmit): Likewise.
10140
10141 2006-07-21  Raja R Harinath  <rharinath@novell.com>
10142
10143         Make comparisons use the same IL irrespective of whether they're
10144         in a 'checked' or 'unchecked' context: one of the issues in #78899
10145         * codegen.cs (EmitContext.CheckState): Make read-only property.
10146         (EmitContext.ConstantCheckState): Likewise.
10147         (EmitContext.CheckStateHandle, EmitContext.WithCheckState): New
10148         helper that implement a save/restore stack for CheckState
10149         values.  This is the only way to change check-state.
10150         * ecore.cs (Expression.ExpressionToArrayArgument): Use WithCheckState.
10151         * expression.cs (CheckedExpr.DoResolve, CheckedExpr.Emit): Likewise.
10152         (CheckedExpr.EmitBranchable): New forwarding method.
10153         (UnCheckedExpr): Likewise.
10154         * statement.cs (Block.ResolveMeta): Use WithCheckState.
10155         (Unchecked.Resolve, Unchecked.DoEmit): Likewise.
10156         (Checked.Resolve, checked.DoEmit): Likewise.
10157
10158 2006-07-20  Miguel de Icaza  <miguel@novell.com>
10159
10160         * anonymous.cs: Cache the resolved anonymous delegate, and return
10161         this so that the ResolveTopBlock is only triggered once, not
10162         twice.
10163
10164         Currently we trigger ResolvetopBlock twice due to a first pass of
10165         argument check compatibility, and a second pass that does the
10166         actual resolution.   
10167         
10168 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10169
10170         * annonymous.cs (AnonymousMethod.CreateScopeType): Fixed nested type
10171         modifiers.
10172         * rootcontext.cs (Reset): Add helper_classes.
10173
10174 2006-07-15  Marek Safar  <marek.safar@seznam.cz>
10175
10176         A fix for #78860
10177         * statement.cs (Switch.SimpleSwitchEmit): Handle case null at any position
10178         correctly.
10179
10180 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10181
10182         * statement.cs (Lock): Handle expressions of type
10183         TypeManager.null_type specially.  Fixes #78770
10184
10185 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10186
10187         * expression.cs (Binary.ResolveOperator): Don't crash when null is assigned
10188         to an event.
10189
10190 2006-07-08  Marek Safar  <marek.safar@seznam.cz>
10191
10192         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
10193         for accessors as well.
10194         * ecore.cs (EventExpr): Add AccessorTable.
10195
10196 2006-07-01  Marek Safar  <marek.safar@seznam.cz>
10197
10198         A fix for #78738
10199         * attribute.cs, class.cs, ecore.cs : Add missing location of related symbol
10200         for CS0122 where appropriate.
10201         * typemanager.cs (IsNestedChildOf): Type can be null in the case of top
10202         level attributes.
10203         (Filter): Assembly can be null in the case of top level attributes.
10204
10205 2006-06-25  Marek Safar  <marek.safar@seznam.cz>
10206
10207         A fix for #78690
10208
10209         * ecore.cs (Expression.MemberLookupFailed): Don't crash when failed lookup
10210         is done at global level.
10211
10212 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10213
10214         A fix for #77002, Implemented TypeForwarder support.
10215
10216         * attribute.cs (Attribute.GetArgumentType): Reads type argument.
10217         * expression.cs (TypeOf.TypeArgument): Exposes typeof type.
10218         * typemanager.cs (): Add type_forwarder_attr_type.
10219
10220 2006-06-24  Marek Safar  <marek.safar@seznam.cz>
10221
10222         * report.cs: Add CS0469 warning.
10223
10224 2006-06-21  Martin Baulig  <martin@ximian.com>
10225
10226         * codegen.cs (CodeGen.Save): Moved the symbol file generation into
10227         the `try'-block, so we also report CS0016 etc. there.
10228
10229 2006-06-21  Martin Baulig  <martin@ximian.com>
10230
10231         * delegate.cs
10232         (Delegate.VerifyMethod): Allow `params' methods; fixes #78678.
10233
10234 2006-06-21  Martin Baulig  <martin@ximian.com>
10235
10236         * expression.cs (Unary.ResolveOperator): In `Operator.AddressOf',
10237         also report CS1686 for parameters.
10238
10239 2006-06-21  Martin Baulig  <martin@ximian.com>
10240
10241         * statement.cs (GotoCase.Resolve): Report a warning (CS0469)
10242         instead of an error if the value is not implicitly convertible to
10243         the switch types; fixes #77964.
10244
10245 2006-06-21  Raja R Harinath  <rharinath@novell.com>
10246
10247         Fix #78673
10248         * class.cs (FieldBase.ResolveInitializer): Stop resolution if
10249         FieldBuilder is null.
10250
10251         Fix #78662
10252         * expression.cs (Binary.CheckShiftArguments): Don't overwrite original
10253         'left' and 'right' before error-checking.
10254
10255 2006-06-16  Juraj Skripsky  <js@hotfeet.ch>
10256
10257         * ecore.cs (SimpleName.Error_ObjectRefRequired): Do not truncate the name.
10258         Fixed bug #78601.
10259         (MemberExpr.EmitInstance): Use GetSignatureForError () to get full name.
10260         (FieldExpr.DoResolve): likewise.
10261         (PropertyExpr.InstanceResolve): likewise.
10262         (EventExpr.InstanceResolve): likewise. 
10263
10264 2006-06-04  Marek Safar  <marek.safar@seznam.cz>
10265
10266         * parameter.cs (Parameter.ApplyAttributeBuilder): More DefaultValue
10267         attribute applicable tests for attribute argument.
10268
10269 2006-06-02  Raja R Harinath  <rharinath@novell.com>
10270
10271         Fix #78079
10272         * expression.cs (Binary.DoNumericPromotions): Remove and rewrite.
10273         (Binary.OverloadResolve_PredefinedIntegral): New.
10274         (Binary.OverloadResolve_PredefinedFloating): New.
10275         (Binary.OverloadResolve_PredefinedString): New.
10276         (Binary.ResolveOperator): Use those instead of DoNumericPromotions.
10277         Follow the standard more closely, and treat numeric promotions in
10278         terms of overload resolution.
10279         (Binary.CheckShiftArguments): Simplify.
10280
10281 2006-06-01  Raja R Harinath  <rharinath@novell.com>
10282
10283         * flowanalysis.cs (MyBitVector): Simplify representation.
10284         (MyBitVector.Clone): Avoid allocating BitArray.
10285         (MyBitVector.operator&): Rename from MyBitVector.And and make symmetric.
10286         (MyBitVector.operator|): Likewise, with MyBitVector.Or.
10287         (*): Update.  Change all references to MyBitVector.And and
10288         MyBitVector.Or to &= and |=.
10289
10290 2006-05-29  Raja R Harinath  <rharinath@novell.com>
10291
10292         Fix cs0231-[34].cs.
10293         * cs-parser.jay (formal_parameter_list): Extend the pattern below
10294         to param arguments too.
10295
10296 2006-05-26  Miguel de Icaza  <miguel@novell.com>
10297
10298         * cs-parser.jay: Catch another parsing form for arglist being
10299         followed by other arguments.  Fixes #78313.
10300
10301 2006-05-24  Raja R Harinath  <rharinath@novell.com>
10302
10303         * flowanalysis.cs (FlowBranchingToplevel.AddReturnOrigin): Move
10304         checking of out parameters to ...
10305         (FlowBranchingToplevel.Merge): ... here.
10306         (FlowBranchingException.AddBreakOrigin): If 'finally_vector' is
10307         set, propagate the origin upward, and only complain if there was
10308         no other error.
10309         (FlowBranchingException.AddContinueOrigin): Likewise.
10310         (FlowBranchingException.AddReturnOrigin): Likewise.
10311         (FlowBranchingException.AddGotoOrigin): Likewise.       
10312
10313 2006-05-23  Raja R Harinath  <rharinath@novell.com>
10314
10315         * flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
10316         unreachable, skip it.
10317         (FlowBranchingException.Merge): Always propagate jumps, even if
10318         the finally block renders subsequent code unreachable.
10319
10320 2006-05-18  Raja R Harinath  <rharinath@novell.com>
10321
10322         Fix #77601
10323         * statement.cs (Goto.Resolve): Move responsibility for resolving
10324         'goto' to FlowBranching.AddGotoOrigin.
10325         (Goto.SetResolvedTarget): New.  Callback to set the
10326         LabeledStatement that's the target of the goto.
10327         (Goto.DoEmit): Use Leave instead of Br when crossing an
10328         unwind-protect boundary.
10329         * flowanalysis.cs (FlowBranching.AddGotoOrigin): Rename from
10330         LookupLabel and adjust to new semantics.
10331         (FlowBranchingToplevel.AddGotoOrigin): Likewise.
10332         (FlowBranchingBlock.AddGotoOrigin): Likewise. Use
10333         Goto.SetResolvedTarget to update target.
10334         (FlowBranchingLabeled.AddGotoOrigin): Likewise.
10335         (FlowBranchingException.AddGotoOrigin): Rewrite to be similar to
10336         AddBreakOrigin & co.  Delay propagation until ...
10337         (FlowBranchingException.Merge): ... this.
10338
10339         * statement.cs (Block.Resolve): Always depend on flow-branching to
10340         determine unreachability.  Kill workaround that originally emitted
10341         only one statement after an "unreachable" label (see infloop in
10342         test-515.cs).
10343
10344         Fix #77869, #76148, #77755, #75255 and a host of other bugs.
10345         This is still "wrong", but anything better would probably need a
10346         multi-pass algorithm.
10347         * flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
10348         usage vector.  Force current usage vector to be reachable, to
10349         optimistically signify backward jumps.
10350         (FlowBranchingLabeled.LookupLabel): Note if a backward jump is
10351         detected.
10352         (FlowBranchingLabeled.Merge): New.  If no backward jump was
10353         detected, return the original salted-away usage vector instead,
10354         updated with appropriate changes.  Print unreachable warning if
10355         necessary.
10356         * statement.cs (Block.Resolve): Don't print unreachable warning on
10357         a labeled statement.
10358
10359 2006-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
10360
10361         * driver.cs: Pass filename without path to AssemblyBuilder's 
10362         AddResourceFile. Fixes bug #78407.
10363
10364 2006-05-17  Raja R Harinath  <rharinath@novell.com>
10365
10366         * statement.cs (LabeledStatement.Resolve): Move merging of origins ...
10367         * flowanalysis.cs (FlowBranchingLabeled): ... here.
10368         (FlowBranching.MergeChild): Overwrite
10369         reachability information from Labeled branchings too.
10370
10371 2006-05-16  Raja R Harinath  <rharinath@novell.com>
10372
10373         * statement.cs (Goto.Resolve): Merge jump origins here ...
10374         * flowanalysis.cs (FlowBranching.Label): ... rather than here.
10375
10376         * flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
10377         (FlowBranchingToplevel.LookupLabel): ... here.  Add CS1632 check.
10378         (FlowBranchingGoto.LookupLabel): New.  Handle back jumps.
10379         (FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
10380         here, ...
10381         * statement.cs (Goto.Resolve): ... not here.
10382         (Goto.Emit): Remove CS1632 check.
10383
10384 2006-05-14  Marek Safar  <marek.safar@seznam.cz>
10385
10386         * ecore.cs (Expression.ResolveAsTypeTerminal): Fixed type in the obsolete
10387         error message.
10388
10389 2006-05-11  Raja R Harinath  <rharinath@novell.com>
10390
10391         * flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
10392         (FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
10393         (FlowBranchingException.Label): Likewise.
10394
10395         * flowanalysis.cs (MyBitVector.SetAll): New.  Sets all bits to the
10396         given value.
10397         (MyBitVector.Or): Use it to avoid losing information (Count).
10398         (FlowBranching.MergeOrigins): Likewise.
10399
10400         * flowanalysis.cs (UsageVector.IsDirty): Remove.
10401         (UsageVector.Parameters, UsageVector.ParameterVector): Likewise.
10402         (UsageVector.Locals, UsageVector.LocalVector): Likewise.
10403         (UsageVector.ToString): Simplify.
10404         (UsageVector.MergeSiblings): Move here from ...
10405         (FlowBranching.Merge): ... here.
10406         (FlowBranchingToplevel.CheckOutParameters): Take an UsageVector,
10407         not a MyBitVector.
10408
10409 2006-05-10  Raja R Harinath  <rharinath@novell.com>
10410
10411         * flowanalysis.cs (UsageVector.MergeOrigins): Simplify, now that a
10412         null bitvector is treated as all-true.
10413
10414         * flowanalysis.cs (MyBitVector.And, MyBitVector.Or): Make lazier.
10415         (MyBitVector): Rationalize invariants.  'vector != null' implies
10416         that we have our own copy of the bitvector.  Otherwise,
10417         'InheritsFrom == null' implies all inherited bits are true.
10418
10419 2006-05-09  Marek Safar  <marek.safar@seznam.cz>
10420
10421         * statement.cs (LocalInfo): Add IsConstant.
10422         (LocalInfo.DeclareLocal): Moved from EmitMeta and changed to don't emit
10423         local variable for constants.
10424
10425 2006-05-09  Raja R Harinath  <rharinath@novell.com>
10426
10427         * flowanalysis.cs (MyBitVector.Empty): New.
10428         (MyBitVector): Don't allow InheritedFrom to be null.
10429         (MyBitVector.And, MyBitVector.Or): Treat 'null' as all-ones.
10430         (UsageVector, FlowBranching): Update to changes.
10431
10432         * flowanalysis.cs (FlowBranching.InTryWithCatch): Don't terminate
10433         recursion.  The 'Parent == null' condition isn't sufficient for
10434         anonymous methods.
10435         (FlowBranching.AddBreakOrigin): Likewise.
10436         (FlowBranching.AddContinueOrigin): Likewise.
10437         (FlowBranching.AddReturnOrigin): Likewise.
10438         (FlowBranching.StealFinallyClauses): Likewise.
10439         (FlowBranching.MergeTopBlock): Move to FlowBranchingToplevel.
10440         (FlowBranching.CheckOutParameters): Likewise.
10441         (FlowBranchingToplevel): Terminate all the above recursions here.
10442         (FlowBranchingToplevel.End): Rename from MergeTopBlock.
10443         * codegen.cs (EmitContext.ResolveTopBlock): Update to changes.
10444
10445         * flowanalysis.cs (BranchingType.Toplevel): New.  Represents a
10446         toplevel block.
10447         (FlowBranchingToplevel): New.  Empty for now.
10448         (FlowBranching.MergeTopBlock): Update.
10449         * codegen.cs (EmitContext.ResolveTopBlock): Create a Toplevel
10450         branching for the anonymous delegate.
10451         (EmitContext.StartFlowBranching): Add ToplevelBlock variant.
10452
10453         * flowanalysis.cs (UsageVector.MergeOrigins): Reorganize.
10454         (UsageVector.MergeJumpOrigins): Don't ignore current reachability
10455         information at the start of the merge.  Reorganize.
10456
10457 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10458
10459         * class.cs (MethodData.Define): Method cannot implement interface accessor.
10460
10461 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10462
10463         * expression.cs (QualifiedAliasMember.ResolveAsTypeStep): Pass location
10464         to newly introduced ctor.
10465
10466         * namespace.cs (Namespace.Error_NamespaceDoesNotExist): Moved an error
10467         message to one place.
10468         (GlobalRootNamespace.Error_NamespaceDoesNotExist): Custom message for
10469         global namespace.
10470
10471 2006-05-07  Marek Safar  <marek.safar@seznam.cz>
10472
10473         * const.cs (Const.Error_ExpressionMustBeConstant): Better error message.
10474
10475         * ecore.cs (Expression.ResolveAsConstant): Updated.
10476
10477         * statement.cs (ResolveMeta): Updated.
10478
10479 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10480
10481         * cs-parser.jay: __arglist cannot be used in initializer.
10482
10483 2006-05-06  Marek Safar  <marek.safar@seznam.cz>
10484
10485         A fix for #77879
10486         * namespace.cs (LocalAliasEntry.DoResolve): Don't allow to access nested
10487         private types.
10488
10489 2006-05-05  Raja R Harinath  <rharinath@novell.com>
10490
10491         * statement.cs (EmptyStatement.ResolveUnreachable): Override.
10492         (LabeledStatement): Add 'name' parameter.
10493         (LabeledStatement.Name, LabeledStatement.JumpOrigins): New.
10494         (Block.AddLabel): Update to changes.
10495         * cs-parser.jay (labeled_statement): Likewise.
10496
10497         * flowanalysis.cs (BranchingType.Labeled): New.
10498         (UsageVector.MergeOrigins): Remove unused 'branching' argument.
10499         (FlowBranchingLabeled): New.  Does nothing for now, but will
10500         eventually handle 'goto' flows.
10501         * codegen.cs (StartFlowBranching): Add new LabeledStatement variant.
10502         * statement.cs (LabeledStatement.Resolve): Create a FlowBranching
10503         that's terminated ...
10504         (Block.Resolve): ... here.
10505
10506         * flowanalysis.cs (UsageVector.MergeFinally): Remove.
10507         (UsageVector.MergeFinallyOrigins): Likewise.
10508         (FlowBranching.InTryOrCatch): Likewise.
10509         (FlowBranching.AddFinallyVector): Likewise.
10510         (FlowBranchingException): Update to changes.
10511
10512         Fix #78290
10513         * statement.cs (Return.Resolve): Move error checking to ...
10514         * flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
10515         (FlowBranchingException): Handle return origins like break and
10516         continue origins.
10517         (FlowBranching.UsageVector.CheckOutParameters): Remove.
10518
10519 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10520
10521         A fix for #76122
10522         * class.cs (TypeContainer.FindMembers): Includes event method in the methods
10523         filter.
10524
10525 2006-05-04  Marek Safar  <marek.safar@seznam.cz>
10526
10527         A fix for #77543
10528         * class.cs (MethodData.Define): Do public accessor check only when method
10529         implements an interface.
10530
10531 2006-05-04  Raja R Harinath  <rharinath@novell.com>
10532
10533         Remove special handling of 'break'
10534         * flowanalysis.cs (Reachability): Remove all mention of 'breaks'.
10535         (Reachability.Meet): Simplify.  Remove 'do_breaks' argument.
10536         (UsageVector.Break): Remove.
10537         (FlowBranching.Merge): Use 'Reachable.IsUnreachable' to determine
10538         reachability.
10539         (FlowBranchingBreakable.Merge): Don't ResetBreaks.
10540
10541         * statement.cs (Break.Resolve): Call UsageVector.Goto (), not
10542         UsageVector.Breaks ().  Don't set NeedsReturnLabel.
10543
10544 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10545
10546         A fix for #75726
10547         * pending.cs (PendingImplementation.BaseImplements): A found member cannot
10548         be the interface member.
10549
10550 2006-05-03  Marek Safar  <marek.safar@seznam.cz>
10551
10552         A fix for #60069
10553         * constant.cs (LongConstant.EmitLong): Fixed to catch also negative values
10554         for emitting small (int) values.
10555
10556 2006-05-03  Raja R Harinath  <rharinath@novell.com>
10557
10558         Fix #59427
10559         * flowanalysis.cs (FlowBranchingException.Merge): Ensure
10560         control-flow passes through the 'finally' after merging-in all the
10561         control-flows from 'try' and the 'catch' clauses.
10562
10563         * flowanalysis.cs (FlowBranching.IsLoop): Remove.
10564         (FlowBranching.IsTryOrCatch): Remove 'is_return' parameter.  It's
10565         always true at the only non-recursive entry point.
10566         (FlowBranching.CreateBranching) [BranchingType.Loop]: Return a
10567         FlowBranchingBreakable.
10568         (FlowBranchingLoop): Remove.
10569         * statement.cs (Return.DoResolve): Update to changes.
10570
10571         Fix #76471, #76665
10572         * flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
10573         (FlowBranching.CreateBranching): Handle it: create a
10574         FlowBranchingContinuable.
10575         (FlowBranching.BreakCrossesExceptionBoundary): Remove.
10576         (FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
10577         except that it handles the 'continue' command.
10578         (FlowBranching.UsageVector.MergeOrigins): Rename from
10579         MergeBreakOrigins.
10580         (FlowBranchingContinuable): Similar to FlowBranchingBreakable,
10581         except that it overrides AddContinueOrigin.
10582         (FlowBranchingException): Override AddContinueOrigin, similar to
10583         AddBreakOrigin.
10584         * statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
10585         Create a new branching around the embedded statement.
10586         (Do.Resolve, For.Resolve): Likewise.  Do reachability analysis for
10587         control flow after the embedded statement.
10588         (Continue.Resolve): Move all error checking to AddContinueOrigin.
10589
10590         * flowanalysis.cs (FlowBranching.IsSwitch): Remove.
10591         (FlowBranching.CreateBranching) [BranchingType.Switch]: Create a
10592         FlowBranchingBreakable.
10593         (FlowBranchingSwitch): Remove.
10594
10595         Fix test-503.cs
10596         * statement.cs (Break.Resolve): Simplify.  Move responsibility for
10597         error reporting to ...
10598         * flowanalysis.cs (FlowBranching.AddBreakOrigin) ... this.
10599         Rename from 'AddBreakVector'.  Add new location argument.  Return
10600         a bool indicating whether the 'break' crosses an unwind-protect.
10601         (FlowBranchingException.AddBreakOrigin): Add.
10602         (FlowBranchingException.Merge): Propagate 'break's to surrounding
10603         flowbranching after updating with the effects of the 'finally'
10604         clause.
10605         (FlowBranchingBreakable): New common base class for
10606         FlowBranchingLoop and FlowBranchingSwitch.
10607
10608         * statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
10609         embedded statement.
10610         (Foreach.CollectionForeach.Resolve): Remove extraneous flowbranching.
10611
10612 2006-05-02  Raja R Harinath  <rharinath@novell.com>
10613
10614         * statement.cs (Do.Resolve): If the loop is infinite, set the
10615         barrier.
10616         (While.Resolve, For.Resolve): Set a barrier after the embedded
10617         statement.  There's no direct control flow that goes from the end
10618         of the embedded statement to the end of the loop.
10619         * flowanalysis.cs (FlowBranching.Infinite): Remove.
10620         (FlowBranchingLoop.Merge): Don't look at 'Infinite'.  The changes
10621         above ensure that the reachability is correctly computed.
10622
10623         * flowanalysis.cs (Reachability.ResetBarrier): Remove.
10624         (UsageVector.MergeBreakOrigins): If the current path is
10625         unreachable, treat it as if all parameters/locals are initialized.
10626         (FlowBranchingLoop.Merge): Don't clear any barriers.  Handle
10627         infinite loops before merging-in break origins.
10628
10629         * flowanalysis.cs (Reachability.Meet): Simplify code handling 'returns'.
10630         (Reachability.Reachable): Split part into ...
10631         (Reachability.Unreachable): ... this.  Simplify.
10632         (Reachability.IsUnreachable): Use 'Unreachable' instead.
10633
10634         * flowanalysis.cs (Reachability.SetReturnsSometimes): Remove.
10635         (Reachability.SetThrowsSometimes): Likewise.
10636         (FlowBranchingBlock.MergeTopBlock): Don't compare against
10637         TriState.Always, use corresponding property.
10638         * statement.cs (Lock.Resolve, Try.Resolve, Using.Resolve): Likewise.
10639         (Block.Resolve): Likewise.  Remove some redundant checks.
10640
10641 2006-05-02  Raja R Harinath  <harinath@gmail.com>
10642
10643         * flowanalysis.cs (UsageVector.Throw): Set barrier too.
10644         (Reachability.Meet): Don't bother checking AlwaysThrows --
10645         barrier is always set.
10646         (FlowBranchingBlock.Merge): Likewise.
10647
10648 2006-05-01  Raja R Harinath  <harinath@gmail.com>
10649
10650         * codegen.cs (EmitContext.ResolveTopBlock): Remove redundant
10651         checks for unreachable.
10652
10653 2006-05-01  Marek Safar  <marek.safar@seznam.cz>
10654
10655         A fix for #77980
10656         * flowanalysis.cs (UsageVector.IsAssigned): Add flag to ignore short path.
10657
10658         * statement.cs (Block.UsageWarning): Uses newly introduced flag to detect
10659         whether field is really assigned.
10660
10661 2006-04-30  Raja R Harinath  <harinath@gmail.com>
10662
10663         * flowanalysis.cs (Reachability): Make 4-argument constructor
10664         private.
10665         (Reachability.Meet): Rename from 'And'.  Remove static variant.
10666         (Reachability.Always): Rename from the highly misleading
10667         'Reachability.Never'.
10668         (FlowBranching.Merge): Update to changes.  Mark an impossible
10669         situation with a 'throw'.
10670         (*): Update to changes.
10671
10672 2006-04-29  Raja R Harinath  <harinath@gmail.com>
10673
10674         * flowanalysis.cs (TriState): Rename from FlowBranching.FlowReturns.
10675         Remove 'Undefined'.
10676         (FlowBranching.TriState_Meet): Rename from AndFlowReturns. Simplify.
10677         (FlowBranching.TriState_Max): Rename from OrFlowReturns. Simplify.
10678         (*): Update to changes.
10679         * statement.cs: Update to changes.
10680
10681 2006-04-28  Marek Safar  <marek.safar@seznam.cz>
10682
10683         A fix for #78049
10684         *class.cs (Method.FindOutBaseMethod): Base method cannot be property method.
10685
10686 2006-04-28  Raja R Harinath  <harinath@gmail.com>
10687
10688         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't create a
10689         dummy UsageVector.
10690
10691         * flowanalysis.cs (UsageVector.MergeChild): Change FlowBranching
10692         argument to two arguments: an usage-vector and a bool.  Move call
10693         to FlowBranching.Merge () ...
10694         (FlowBranching.MergeChild, FlowBranching.MergeTopBlock): ... here.
10695
10696         * flowanalysis.cs (UsageVector.MergeChild): Move special-case
10697         handling of loop and switch reachability to ...
10698         (FlowBranchingLoop.Merge, FlowBranchingSwitch.Merge): ... these.
10699
10700 2006-04-27  Raja R Harinath  <harinath@gmail.com>
10701
10702         * flowanalysis.cs (FlowBranching.InLoop): Move special-case
10703         handling to FlowBranchingLoop.InLoop.
10704         (FlowBranching.InSwitch): Likewise, to FlowBranchingSwitch.
10705
10706 2006-04-26  Marek Safar  <marek.safar@seznam.cz>
10707
10708         A fix for #78115
10709         * anonymous.cs (AnonymousMethod.DoResolve): Moved the check whether
10710         anonymous method is allowed from AnonymousContainer here.
10711
10712         * attribute.cs, codegen.cs (EmitContext): Add IsAnonymousMethodAllowed.
10713
10714 2006-04-24  Raja R Harinath  <rharinath@novell.com>
10715
10716         Fix #78156
10717         * flowanalysis.cs (MyBitVector.Or): Add null check on argument.
10718
10719 2006-04-23  Marek Safar  <marek.safar@seznam.cz>
10720
10721         A fix for #49011.
10722         * constant.cs (FloatConstant.Reduce): Add range checking for checked context.
10723         (DoubleConstant.Reduce): Ditto.
10724
10725 2006-04-23  Raja R Harinath  <rharinath@novell.com>
10726
10727         * expression.cs (LocalVariableReference.DoResolveBase): Simplify.
10728         Remove 'lvalue_right_side' argument.  Move parts to ...
10729         (LocalVariableReference.ResolveLocalInfo, LocalVariable.DoResolve)
10730         (LocalVariable.DoResolveLValue): ... these.
10731
10732 2006-04-21  Raja R Harinath  <rharinath@novell.com>
10733
10734         Fix cs1655.cs
10735         * codegen.cs (EmitContext.InRefOutArgumentResolving): Remove.
10736         * expression.cs (EmptyExpression.LValueMemberOutAccess): New.
10737         (LocalVariableReference.DoResolveBase): Use it to implement new
10738         CS1655 check.
10739         (IndexerAccess.DoResolveLValue): Handle LValueMemberOutAccess.
10740         (Argument.Resolve): Simplify.  Move CS1510 check ...
10741         * ecore.cs (Expression.ResolveLValue): ... here.
10742         (UnboxCast.DoResolveLValue): Handle LValueMemberOutAccess.
10743         (PropertyExpr.DoResolveLValue): Likewise.
10744         (FieldExpr.Report_AssignToReadonly): Likewise.
10745         (FieldExpr.DoResolve): Add 'out_access' argument.  Use
10746         LValueMemberAccess or LValueMemberOutAccess on instance depending
10747         on it.
10748         (FieldExpr.DoResolveLValue): Pass 'out_access' argument to
10749         DoResolve as appropriate.
10750
10751 2006-04-20  Raja R Harinath  <rharinath@novell.com>
10752
10753         Fix #75800
10754         * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
10755         implicit conversions on 'out' and 'ref' arguments.
10756
10757         * expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
10758         improve clarity.  Remove dead code.
10759
10760         Fix #66031
10761         * statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
10762         (Catch.Resolve): Resolve VarBlock if it exists.
10763
10764 2006-04-19  Miguel de Icaza  <miguel@novell.com>
10765
10766         * statement.cs (Foreach.EmitFinally): Do not emit the enumerator
10767         twice, this was some residual code, the enumerator was emitted
10768         properly in the two branche of if later.
10769
10770 2006-04-19  Raja R Harinath  <rharinath@novell.com>
10771
10772         * expression.cs (Cast.ResolveLValue): Remove.  The result of a
10773         cast is never an lvalue.
10774         (Cast.DoResolve, Cast.ResolveRest): Combine.
10775         (Argument.Emit): Simplify slightly.  Move 'Expr is
10776         IMemoryLocation' check ...
10777         (Argument.Resolve): ... here.
10778         (Argument.Error_LValueRequired): Remove.  Inline into only user.
10779
10780         Simplifications.  Fix cs0191-2.cs
10781         * ecore.cs (FieldExpr.DoResolve): Move handling of CS0192, CS0198,
10782         CS1649 and CS1651 to ...
10783         (FieldExpr.Report_AssignToReadonly): ... this.  Simplify by moving
10784         the actual selection of the error code and message to a lookup
10785         table.  Add a dummy return value to simplify callsites.
10786         (FieldExpr.ResolveLValue): Don't allow a constructor to write to
10787         readonly fields of other instances of the same type.  Move CS0197
10788         warning from ...
10789         * expression.cs (Argument.Resolve): ... here.  Simplify code.
10790         Ensure that ec.InRefOutArgumentResolving is only set during LValue
10791         resolution of an out or ref argument.  The code simplification
10792         above uses this invariant.
10793
10794 2006-04-18  Raja R Harinath  <rharinath@novell.com>
10795
10796         Possibly fix #77752.  Fix cs1690-[4-7].cs.
10797         * ecore.cs (Expression.CheckMarshalByRefAccess): Renamed from
10798         CheckMarshallByRefAccess.  Drop parameter.
10799         (FieldExpr.CheckMarshalByRefAccess): Update.  Change CS1690 to a
10800         warning.
10801         (FieldExpr.DoResolve): Call CheckMarshalByRefAccess on
10802         InstanceExpression.
10803         * report.cs (AllWarnings): Add CS1690.
10804         * expression.cs (Argument.Resolve): Use EmptyExpression.OutAccess
10805         for ref access too.
10806         (LocalVariableReference.DoResolveBase): Update.
10807
10808 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10809
10810         * class.cs (MethodOrOperator): Moved common parts from method class.
10811         detect obsolete attributes.
10812         (Method.Define): Simplified as it reuses code from base.
10813         (Constructor.ValidAttributeTargets): Fixed issue found during
10814         refactoring.
10815         (Destructor.ValidAttributeTargets): Fixed issue found during
10816         refactoring.
10817         (Operator): Finished refactoring set off by #78020. Operator class is now
10818         ordinary method class.
10819
10820         * anonymous.cs: Updated.
10821
10822         * decl.cs (DeclSpace): Add IsGeneric
10823
10824 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10825
10826         * class.cs (Constructor.Emit): Don't emit the attributes twice.
10827
10828 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10829
10830         * class.cs (Operator.Emit): Extracted code from MethodData to correctly
10831         detect obsolete attributes.
10832         (Method.CreateEmitContext): Moved to MethodOrOperator.
10833
10834 2006-04-09  Marek Safar  <marek.safar@seznam.cz>
10835
10836         A fix for #78048.
10837         * class.cs (TypeContainer.MemberCoreArrayList.DefineContainerMembers): Throw
10838         customized exception to make crash detection easier.
10839         (MethodOrOperator): Started to work on new base class for methods and
10840         operators.
10841         (Method): Derives from MethodOrOperator.
10842         (Constructor.Emit): Emits its own attributes.
10843         (AbstractPropertyEventMethod.Emit): Ditto.
10844         (Operator): Derives from MethodOrOperator, will refactor fully in extra
10845         patch.
10846         (Operator.Emit): It's temporary more tricky than should be.
10847         
10848         * doc.cs (GetMethodDocCommentName): Updated after operator changes.
10849
10850         * report.cs (InternalErrorException): Add ctor with inner exception.
10851
10852 2006-04-08  Marek Safar  <marek.safar@seznam.cz>
10853
10854         A fix for #76744.
10855         * ecore.cs (SimpleName.ResolveAsTypeStep): Report better error when type is
10856         only not visible.
10857
10858 2006-04-07  Marek Safar  <marek.safar@seznam.cz>
10859
10860         A fix for #77916.
10861         * expression.cs (ArrayCreation.GetAttributableValue): Creates correctly typed
10862         array.
10863
10864 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10865
10866         * class.cs (Class.ApplyAttributeBuilder): Report an error when ComImport
10867         attribute is present and Guid not.
10868         (Interface.ApplyAttributeBuilder): Ditto.
10869
10870         * attribute.cs: Add error message.
10871
10872 2006-04-06  Marek Safar  <marek.safar@seznam.cz>
10873
10874         A fix for #78020.
10875
10876         * attribute.cs (Attribute.AttachTo): The attribute can have multiple
10877         sources (it's composite) so hold them in extra array as they are used in
10878         Emit phase only. It worked in the previous versions by mistake.
10879         (Attribute.Emit): Emit attribute for more owners when exist.
10880
10881         * codegen.cs, class.cs: Updated to don't re-attach attribute twice as now
10882         it has now different behaviour.
10883
10884 2006-04-04  Marek Safar  <marek.safar@seznam.cz>
10885
10886         * constant.cs (Constant.IsDefaultInitializer): New method.
10887
10888         * class.cs: Updated.
10889
10890         * expression.cs (ArrayCreation.CheckIndices): Add an optimization to don't
10891         re-initialize default values. It saves KBs almost for every assembly.
10892         Thanks Zoltan for the idea.
10893         (ArrayCreation.ResolveInitializers): Renamed from ValidateInitializers.
10894         (ArrayCreation.DoResolve): Resolve only once.
10895         (ArrayCreation.Emit): Emit static initializer only when it is faster.
10896         (ArrayCreation.GetAttributableValue): Cope with optimized values.
10897
10898 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10899
10900         * report.cs (Warning, Error): Add 0-, 1-, and 2- argument specializations.
10901         From #77961.
10902
10903 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10904
10905         * assign.cs (Assign.DoResolve): Assignment to same variable can occur
10906         in an embedded statement too.
10907
10908 2006-04-01  Raja R Harinath  <rharinath@novell.com>
10909
10910         Fix #77958
10911         * statement.cs (Switch.EmitObjectInteger) [ulong]: Remove bad cast.
10912
10913 2006-04-01  Marek Safar  <marek.safar@seznam.cz>
10914
10915         A fix for #77966.
10916
10917         * class.cs (TypeContainer.AddPartial): Don't report an error when modifier
10918         was not specified.
10919
10920         * modifiers.cs: Add DEFAULT_ACCESS_MODIFER.
10921
10922 2006-03-31  Marek Safar  <marek.safar@seznam.cz>
10923
10924         * assign.cs (LocalTemporary): Don't require ILGenerator in the resolve
10925         phase.
10926
10927         * anonymous.cs, assign.cs, ecore.cs, expression.cs: Updated after
10928         LocalTemporary change.
10929
10930         * class.cs (ClassOrStruct.DefineDefaultConstructor): Moved from
10931         TypeContainer.
10932         (ClassOrStruct.DefineFieldInitializers): Implemented static field
10933         initializers optimization.
10934         (ClassOrStruct.TypeAttr): Moved from modifiers.
10935         (Constructor.CheckBase): Don't crash when static ctor has parameters.
10936         (FieldBase.ResolveInitializer): Resolves initializer.
10937         (FieldBase.HasDefaultInitializer): New property.
10938
10939         * cs-parser.jay: Removed message.
10940
10941         * expression.cs (CompilerGeneratedThis): New specialization.
10942
10943         * modifiers.cs (TypeAttr): Moved to ClassOrStruct.TypeAttr
10944
10945 2006-03-28  Marek Safar  <marek.safar@seznam.cz>
10946
10947         * cs-parser.jay, cs-tokenizer.cs: On demand Stack allocation.
10948
10949 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10950
10951         * ecore.cs (Expression.ResolveAsConstant): Clean up, enum constants should
10952         be now EnumConstants only.
10953
10954 2006-03-27  Marek Safar  <marek.safar@seznam.cz>
10955
10956         * attribute.cs, driver.cs: Reset more caches.
10957
10958 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10959
10960         * cs-tokenizer.cs (adjust_real): Uses float.Parse for float literals.
10961
10962 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10963
10964         * constant.cs (Constant.Reduce): Replaced EmitContext with single bool
10965         for easier reuse. Updated all overrides.
10966         (IntegralConstant): New base class for all integral constants.
10967         (IntegralConstant.Error_ValueCannotBeConverted): When assigned value if out
10968         of the constant range, report custom error.
10969         (UIntConstant.Reduce): Fixed uint conversion.
10970
10971         * ecore.cs, literal.cs: Reduce updates.
10972
10973 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10974
10975         A fix for #75813.
10976
10977         * class.cs (Constructor.Define): Removed extra if for default ctors.
10978         A patch from Atsushi Enomoto.
10979
10980 2006-03-26  Marek Safar  <marek.safar@seznam.cz>
10981
10982         * attribute.cs (Attribute.ResolveConstructor): Conversion was moved to
10983         GetAttributableValue.
10984
10985         * constant.cs (Constant.GetAttributableValue): Does implicit conversion
10986         when required.
10987
10988         * convert.cs (ImplicitConversionRequired): Error message moved to
10989         DoubleLiteral.
10990
10991         * ecore.cs (Expression.GetAttributableValue): Add type parameter for
10992         automatic implicit conversion of an output value.
10993         (EnumConstant.GetAttributableValue): Don't reduce the enum constants.
10994
10995         * expression.cs (ArrayCreation.GetAttributableValue): Add element type
10996         conversion.
10997         (TypeOf.GetAttributableValue): Add extra handling for object type.
10998
10999         * literal.cs (DoubleLiteral.Error_ValueCannotBeConverted): Doubles can have
11000         special error message.
11001
11002 2006-03-25  Marek Safar  <marek.safar@seznam.cz>
11003
11004         * class.cs (Constructor.Emit): Don't crash when struct ctor is
11005         InternalCall.
11006         (Constructor.ApplyAttributeBuilder): Transform MethodImplAttribute to be
11007         compatible with MS runtime.
11008
11009 2006-03-23  Marek Safar  <marek.safar@seznam.cz>
11010
11011         * attribute.cs (Attribute.ResolveConstructor): Check for an invalid
11012         attribute arguments here.
11013
11014         * class.cs (Indexer.Define): The check was moved to attribute class.
11015
11016 2006-03-22  Marek Safar  <marek.safar@seznam.cz>
11017
11018         * assign.cs, class.cs, codegen.cs, convert.cs, decl.cs, ecore.cs,
11019         expression.cs, typemanager.cs: Minor changes from gmcs to make merging
11020         easier.
11021
11022 2006-03-22  Raja R Harinath  <rharinath@novell.com>
11023
11024         Support ParameterDefaultValueAttribute in gmcs.  Also applied to
11025         mcs to keep code differences small.
11026         * attribute.cs (Attribute.GetParameterDefaultValue): New.
11027         * typemanager.cs (parameter_default_value_attribute_type): New.
11028         * parameter.cs (Parameter.ApplyAttributeBuilder): Use them.  Add
11029         CS1908 check.
11030
11031 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11032
11033         * expression.cs (StringConcat.Append): Reverted back to no warning state.
11034
11035 2006-03-21  Marek Safar  <marek.safar@seznam.cz>
11036
11037         * const.cs (Error_ConstantCanBeInitializedWithNullOnly): Share a message.
11038
11039         * statement.cs (Block.ResolveMeta): Look for wrong object constants in
11040         the blocks too.
11041
11042 2006-03-21  Atsushi Enomoto  <atsushi@ximian.com>
11043
11044         * doc-bootstrap.cs : fix build.
11045
11046 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11047
11048         * expression.cs (StringConcat.Append): Issue a warning when empty string
11049         is going to append.
11050
11051 2006-03-20  Marek Safar  <marek.safar@seznam.cz>
11052
11053         * assign.cs (CompoundAssign.ResolveSource): Removed.
11054
11055         * attribute.cs (ResolvePossibleAttributeType): Updated after MemberAccess
11056         clean up.
11057
11058         * class.cs (TypeContainer.FindMethods): Removed.
11059         (TypeContainer.CheckMemberUsage): Made static.
11060
11061         * codegen.cs (GetAssemblyName): Uses Length for empty string test.
11062
11063         * constant.cs (CheckRange): Removed unused type argument.
11064         (CheckUnsigned): Removed unused type argument.
11065
11066         * cs-parser.jay: Updated after MemberAccess clean up.
11067         Uses Length for empty string test.
11068
11069         * cs-tokenizer.cs: Uses Length for empty string test.
11070         (IsCastToken): Made static.
11071         (is_hex): Made static.
11072         (real_type_suffix): Made static.
11073
11074         * decl.cs (SetupCache): Made static.
11075         (OnGenerateDocComment): Removed unused ds argument.
11076
11077         * delegate.cs (VerifyDelegate): Removed unused argument.
11078
11079         * doc.cs: Uses Length for empty string test.
11080
11081         * driver.cs: Uses Length for empty string test.
11082
11083         * enum.cs (IsValidEnumType): Made static
11084
11085         * expression.cs (EnumLiftUp): Removed unused argument.
11086         (ResolveMethodGroup): Ditto.
11087         (BetterConversion): Ditto.
11088         (GetVarargsTypes): Ditto.
11089         (UpdateIndices): Ditto.
11090         (ValidateInitializers): Ditto.
11091         (MemberAccess.ctor): Ditto.
11092         (GetIndexersForType): Ditto.
11093
11094         * flowanalysis.cs: (MergeFinally): Removed unused argument.
11095
11096         * iterators.cs: Updated after MemberAccess clean up.
11097
11098         * location.cs: Uses Length for empty string test.
11099
11100         * namespace.cs: Uses Length for empty string test.
11101
11102          * report.cs (CheckWarningCode): Made static.
11103
11104         * statement.cs (LabeledStatement): Removed unused argument.
11105
11106         * typemanager.cs (FilterNone): Removed.
11107
11108 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11109
11110         * codegen.cs (EmitContext.TestObsoleteMethodUsage): Removed as it become
11111         obsolete.
11112
11113         * class.cs: Updated.
11114
11115 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11116
11117         * cs-parser.jay.cs: __arglist is not allowed for delegates.
11118
11119 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11120
11121         A fix for #77822.
11122
11123         * expression.cs (VerifyArgumentsCompat): Reverted to double error
11124         reporting, it's more tricky than I thought.
11125
11126 2006-03-18  Marek Safar  <marek.safar@seznam.cz>
11127
11128         A fix for #77816.
11129
11130         * anonymous.cs.cs (AnonymousMethod): Add host to allow access to 
11131         host container.
11132         (AnonymousMethod.ImplicitStandardConversionExists): New method.
11133         (AnonymousMethod.Compatible): Moved parameter resolving to DoResolve.
11134         Add more error reporting; Fixed issue with params.
11135
11136         * convert.cs (ImplicitStandardConversionExists): Returned conversion check.
11137
11138         * cs-parser.jay: AnonymousMethod requires host container.
11139
11140         * delegate.cs (NewDelegate.DoResolve): Updated after Compatible changes.
11141
11142 2006-03-18  Raja R Harinath  <harinath@gmail.com>
11143
11144         * class.cs: Change 'TypeContainer ds' constructor argument to
11145         'DeclSpace parent'.  Some classes were missed below due to
11146         different naming convention.
11147
11148         * class.cs (MemberCore.Parent): Delete.  This makes the
11149         ParentContainer changes below enforceable by the compiler.
11150
11151         Treat pointers to enclosing declaration space as 'DeclSpace', not
11152         'TypeContainer'.
11153         * class.cs, const.cs, delegate.cs, enum.cs, iterator.cs: Change
11154         'TypeContainer parent' constructor argument to 'DeclSpace parent'.
11155
11156         * statement.cs (LocalInfo..ctor): Use DeclSpace argument instead
11157         of TypeContainer.
11158         (Block.AddThisVariable): Likewise.
11159         * class.cs (MethodData.Define, MethodData.Emit): Likewise.
11160         (AbstractPropertyEventMethod.Emit): Likewise.
11161         (AbstractPropertyEventMethod.EmitMethod): Likewise.
11162         (GetMethod.Define, SetMethod.Define): Likewise.
11163         (PropertyMethod.Define, DelegateMethod.Define): Likewise.
11164         (DelegateMethod.EmitMethod): Likewise.
11165
11166         Fix regression test-partial-13.cs.
11167         Rationalize use of PartialContainer.  Ensure that the partial
11168         class semantics can be tied to type-correctness, i.e., any
11169         violation will cause a compile error.
11170         * class.cs, const.cs: Access all fields that belong to class
11171         TypeContainer via ParentContainer.  Arguments of EmitContexts and
11172         Resolve()-like functions still use 'Parent'.
11173
11174         * class.cs (SourceMethod): Use DeclSpace, not TypeContainer.
11175         (*.CreateEmitContext): Change TypeContainer argument to DeclSpace.
11176         (PropertyMethod.CheckModifiers): Remove unused argument.
11177         * codegen.cs (EmitContext..ctor): Change TypeContainer argument to
11178         DeclSpace.
11179
11180 2006-03-17  Raja R Harinath  <harinath@gmail.com>
11181
11182         Make semantics of PartialContainer simpler.
11183         * decl.cs (DeclSpace.IsPartial): Remove.
11184         * class.cs (TypeContainer.IsPartial): Likewise.
11185         (TypeContainer..ctor): Set PartialContainer to point to self.
11186         (TypeContainer.GetClsCompliantAttributeValue): Don't use IsPartial.
11187         (TypeContainer.FindNestedType): Likewise.
11188         (MemberCore.ParentContainer): Simplify.  Remove deprecation.
11189
11190 2006-03-17  Marek Safar  <marek.safar@seznam.cz>
11191
11192         * typemanager.cs.cs (GetInterfaces): Don't recreate 0-sized arrays.
11193
11194 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11195
11196         * class.cs (FieldMember.Emit): ParentContainer is real parent for partial
11197         classes.
11198
11199 2006-03-15  Marek Safar  <marek.safar@seznam.cz>
11200
11201         * class.cs (Operator.Define): An error for base conversion was not
11202         reported correctly.
11203
11204 2006-03-14  Atsushi Enomoto  <atsushi@ximian.com>
11205
11206         * iterator.cs : yield break is allowed in try statement which has
11207           catch clauses. Fixed bug #77767.
11208
11209 2006-03-13  Marek Safar  <marek.safar@seznam.cz>
11210
11211         A fix for #77593, #77574.
11212
11213         * class.cs (MethodCore.CheckBase): Another if for operator.
11214
11215 2006-03-09  Marek Safar  <marek.safar@seznam.cz>
11216
11217         * anonymous.cs (AnonymousMethod.Compatible): Don't crash when parameters
11218         were not resolved
11219
11220         * delegate.cs (Delegate.GetInvokeMethod): Use emitcontext free MemberLookup.
11221         (DelegateCreation.ImplicitStandardConversionExists): New method for just
11222         conversion test.
11223         
11224         *ecore.cs (Expression.MemberLookup): Don't ask for emitcontext when it's
11225         not needed.
11226
11227         * assign.cs, constant.cs, convert.cs, delegate.cs, expression.cs:
11228         Updated after another emitcontext usage was clean up. It should help us to
11229         synchronize with gmcs easier.
11230
11231 2006-03-04  Marek Safar  <marek.safar@seznam.cz>
11232
11233         A fix for #77353.
11234
11235         * class.cs (SetMethod.DefineParameters): Uses new parameters type ctor.
11236         (Event.Define): ditto
11237         (SetIndexerMethod.DefineParameters): Uses Parameters.MergeGenerated.
11238
11239         * delegate.cs (Delegate.Define): Uses Parameters.MergeGenerated.
11240         Removed redundant code and set NewSlot for Invoke method too.
11241
11242         * parameter.cs (Parameters.ctor): Add custom, type ctor.
11243         (Parameters.MergeGenerated): New method. Use this method when you merge
11244         compiler generated argument with user arguments.
11245
11246 2006-03-03  Marek Safar  <marek.safar@seznam.cz>
11247
11248         * attribute.cs (ResolveAsTypeTerminal): Removed.
11249
11250         * ecore.cs (Expression.ResolveAsTypeTerminal): Make virtual to allow
11251         specialization for predefined types; 30% speed up.
11252         Finally placed obsolete check to right place.
11253         (Expression.ResolveType): Removed.
11254
11255         * enum.cs, expression.cs, parameter.cs, statement.cs, typemanager.cs:
11256         Updated after ResolveType was removed.
11257
11258         * expression.cs (Cast.ctor): Check void cast.
11259         (Binary.ResolveAsTypeTerminal): Is never type.
11260         (Conditional.ResolveAsTypeTerminal): Is never type.
11261
11262         * rootcontext.cs (ResolveCore): Set base type to simplify some code later.
11263
11264 2006-03-01  Raja R Harinath  <rharinath@novell.com>
11265
11266         Fix #77679.
11267         * expression.cs (ParameterReference.DoResolveBase): Change return
11268         type to bool.
11269         (ParameterReference.DoResolve, ParameterReference.DoResolveLValue):
11270         Update.
11271
11272         Fix #77628.
11273         * ecore.cs (PropertyExpr.InstanceResolve): Fix CS1540 check.
11274
11275         Fix #77642.
11276         * typemanager.cs (GetFullNameSignature): Don't nullref on
11277         protected accessors.
11278
11279 2006-02-27  Marek Safar  <marek.safar@seznam.cz>
11280
11281         * attribute.cs (Attribute.PosArguments, Attribute.NamedArguments): Use
11282         these two separated members to simplify the code.
11283         (Attribute.Resolve): Refactored to use new fields and methods.
11284         (Attribute.ResolveConstructor): Extracted from ResolveArguments and
11285         implemented obsolete attribute checking.
11286         (Attribute.ResolveNamedArguments): Extracted from ResolveArguments and
11287         implemented obsolete checking again. It look line never ending quest ;-)
11288         (GlobalAttribute.ResolveConstructor): Need to override as the rest.
11289
11290         * cfold.cs (BinaryFold): TryReduce throws an exception to indicate error.
11291
11292         * constanct.cs (TryReduce): Throws OverflowException to indicate error.
11293
11294         *class.cs (Property.Define): Add RegisterProperty call.
11295
11296         * cs-parser.jay: Replaced ArrayList with fixed array for attribute
11297         argument groups (only 2).
11298
11299         * ecore.cs (Expression.GetAttributableValue): New virtual method used for
11300         encoding expression to arguments.
11301         (Expression.ExprClassToResolveFlags): Just turned to property.
11302
11303         * expression.cs (ArrayCreation.ValidateInitializers): Slightly optimized.
11304         (ArrayCreation.GetAttributableValue): Renamed from EncodeAsAttribute and
11305         optimized as well as implemented support for zero-length attributes.
11306
11307         * typemanager.cs (TypeManager.RegisterProperty, TypeManager.GetProperty):
11308         Add caching of PropertyInfo's.
11309
11310 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11311
11312         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Don't report
11313         error multiple times.
11314
11315 2006-02-25  Marek Safar  <marek.safar@seznam.cz>
11316
11317         New partial class implementation.
11318         A fix for #77027, #77029, #77403
11319
11320         * attribute.cs (Attributable): Made attributes protected.
11321
11322         * class.cs (TypeContainer): Add PartialContainer and partial_parts as
11323         the replacements of ClassPart and PartialContainer.
11324         (TypeContainer.AddClassOrStruct): Call RecordDecl here.
11325         (TypeContainer.AddInterface): Ditto.
11326         (TypeContainer.AddPartial): The main method for partial classes. It checks
11327         for errors and merges ModFlags and attributes. At the end class is added to
11328         partial_parts list.
11329         (TYpeContainer.DefineDefaultConstructor): Checks whether default ctor is
11330         required here.
11331         (TypeContainer.GetClsCompliantAttributeValue): Cope with partial class too.
11332         (TypeContainer.GetNormalPartialBases): Resolves base classes and interfaces
11333         from the rest of partial classes.
11334         (TypeContainer.GetClassBases): Simplified.
11335         (TypeContainer.DefineTypeBuilder): New method, mostly extracted from
11336         DefineType.
11337         (TypeContainer.DefineDefaultConstructor): Is used by derived classes.
11338         (TypeContainer.HasExplicitLayout): Uses Flags now.
11339         (PartialContainer): Removed.
11340         (ClassOrStruct.AddToContainer): Moved enclosing member name check here.
11341         (StaticClass): Was merged with Class.
11342         (Class.GetClassBases): class and static class bases are verified here.
11343         (Class.TypeAttr): Added static attributes when class is static.
11344         (Struct.RegisterFieldForInitialization): Moved from TypeContainer.
11345         (MemberBase): In some cases we need to call parent container for partial
11346         class. It should be eliminated but it's not easy now.
11347
11348         * cs-parser.jay: Replaced all PartialContainer with AddPartial.
11349
11350         * decls.cs (MemberCore.DocComment): Introduced new property as is used by
11351         partial classed to accumulate class comments.
11352         (MemberCore.GetClsCompliantAttributeValue): Moved from TypeContainer.
11353
11354         * doc.cs (GenerateTypeDocComment): Partial classes clean up.
11355
11356         * driver.cs (MainDriver): Tree.GetDecl was removed.
11357
11358         * modifiers.cs (Modifiers): Add partial modifier.
11359
11360         * tree.cs (Tree.decl): Removed.
11361         (RootTypes): Started to use this class more often for root types
11362         specializations.
11363
11364 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11365
11366         A fix for #77615
11367
11368         * attribute.cs (AttributeTester.GetCoClassAttribute): Don't crash when
11369         external interface does not have an attribute.
11370
11371 2006-02-22  Marek Safar  <marek.safar@seznam.cz>
11372
11373         Another prerequisites for new partial classs implementation.
11374         
11375         * attribute.cs (Attribute.Equal): Implemented.
11376         (Attribute.Emit): Changed as attributes can be applied more than twice.
11377         (Attributes.Emit): Check for duplicate attributes here.
11378
11379         * class.cs, decl.cs, delegate.cs, doc.cs, enum.cs: Don't pass DeclSpace
11380         as a parameter, clean-up.
11381
11382 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11383
11384         A fix for #77485
11385
11386         * class.cs (TypeContainer.DefineType): Cannot use ResolveType because it
11387         contains obsolete attribute check which can in some cases look for base
11388         type of current class which is not initialized yet.
11389         (TypeContainer.BaseType): Replacement of ptype.
11390
11391         * decl.cs (MemberCore.CheckObsoleteType): Reuse existing code.
11392
11393 2006-02-11  Marek Safar  <marek.safar@seznam.cz>
11394
11395         First of prerequisites for new partial classs implemention.
11396         
11397         * attribute.cs (Attributable): Extended by ResolveContext;
11398         Attributes finally have correct context for resolving in all cases.
11399         (AttachTo): Attribute owner is assigned here.
11400
11401         * codegen.cs (IResolveContext): Introduce new interface to hold
11402         all information needed in resolving phase.
11403         (EmitContext): Implements IResolveContext; more clean-up needed here.
11404         
11405         * decl.cs (MemberCore): Implemented IResolveContext.
11406
11407         * anonymous.cs, attribute.cs, class.cs, codegen.cs, const.cs,
11408         decl.cs, ecore.cs, enum.cs, expression.cs, iterators.cs, namespace.cs,
11409         parameter.cs, statement.cs, tree.cs, typemanager.cs:
11410         Refactored to use new IResolveContext instead of EmitContext; cleanup
11411
11412 2006-02-06  Miguel de Icaza  <miguel@novell.com>
11413
11414         * codegen.cs (EmitScopeInitFromBlock): check here the
11415         capture_context, there is no need to make two calls to the
11416         EmitContext. 
11417
11418         * anonymous.cs: Add some debugging messages that might help me
11419         track other instances of this problem in the future (the
11420         regression of test 467).
11421
11422         * cs-parser.jay: track the variable block, as we need to initalize
11423         any captured variables declared in this block for the "catch"
11424         portion of the "Try" statement.
11425
11426         * statement.cs (Try.Emit): If the "Catch" has a VarBlock, emit any
11427         scope initialization for captured variables. 
11428
11429         Also, move the emit for the variables after the block location has
11430         been marked.
11431
11432 2006-02-06  Marek Safar  <marek.safar@seznam.cz>
11433
11434         * ecore.cs (PropertyExpr.FindAccessors): Just made flags const.
11435
11436 2006-02-02  Miguel de Icaza  <miguel@novell.com>
11437
11438         * anonymous.cs (CaptureContext.EmitInitScope): I was wrong in the
11439         commit yesterday, the initialization for the roots is necessary.
11440         What is not necessary is the scope activation.
11441
11442 2006-02-02  Raja R Harinath  <rharinath@novell.com>
11443
11444         * ecore.cs (PropertyExpr.DoResolveLValue): Add CS0206 check.
11445         * expression.cs (IndexerAccess.DoResolveLValue): Add CS1612 and
11446         CS0206 checks.
11447         (Argument.Resolve): Remove CS0206 checks.
11448
11449 2006-02-01  Miguel de Icaza  <miguel@novell.com>
11450
11451         * anonymous.cs (CaptureContext.EmitInitScope): Do not emit the
11452         scopes for all the roots, the scopes will now be emitted when the
11453         Blocks are entered.   [This change was wrong, fixed on 2006-02-02]
11454
11455         (CaptureContext.EmitScopeInitFromBlock): Simply emit the ScopeInfo
11456         code.  This reduces a lot of existing cruft.
11457         
11458         * statement.cs (Block.Emit): Call EmitScopeInitFromBlock here, so
11459         that the ScopeInfo is generated as we enter the scope, not at the
11460         time of use, which is what we used to do before.
11461
11462         * codegen.cs (EmitScopeInitFromBlock): New routine, this is called
11463         every time a Block is about to be emitted if we have a
11464         CaptureContext. 
11465
11466 2006-02-01  Raja R Harinath  <rharinath@novell.com>
11467
11468         * typemanager.cs (NoTypes, NoTypeExprs): Remove.
11469         (Reset): Update.
11470         * *.cs: Use Type.EmptyTypes instead of TypeManager.NoTypes.
11471
11472         * typemanager.cs (cons_param_array_attribute): Make private.
11473         (Reset): Set it to null.
11474         (InitCoreHelpers): Don't initialize it.
11475         (ConsParamArrayAttribute): New.  Initialize it as needed.
11476         * parameter.cs (ParamsParameter.ApplyAttribute): Update to change.
11477
11478 2006-01-31  Miguel de Icaza  <miguel@novell.com>
11479
11480         * expression.cs: There might be errors reported during the
11481         selection of applicable methods.  If there are errors, do not
11482         continue execution as it will lead the compiler to crash.
11483
11484 2006-01-30  Miguel de Icaza  <miguel@novell.com>
11485
11486         * expression.cs: Member access is not allowed on anonymous
11487         methods.  Fixes #77402.
11488
11489 2006-01-30  Raja R Harinath  <rharinath@novell.com>
11490
11491         Fix #77401
11492         * cs-parser.jay (VariableDeclaration): Don't set
11493         current_array_type to null.
11494         (field_declaration, event_declaration, declaration_statement):
11495         Set it to null here.
11496
11497 2006-01-28  Raja R Harinath  <harinath@gmail.com>
11498
11499         * typemanager.cs (GenericParameterPosition): New.
11500         * doc.cs: Use it.
11501
11502 2006-01-28  Atsushi Enomoto  <atsushi@ximian.com>
11503
11504         * doc.cs : To process "include" elements, first we should create
11505           another list than XmlNodeList, because it could result in node
11506           removal, which could result in that the XmlNodeList gives up
11507           yielding next node.
11508
11509           (Also made code identical to gmcs again.)
11510
11511 2006-01-25  Miguel de Icaza  <miguel@novell.com>
11512
11513         * ecore.cs: Introduce an error report that we were not catching
11514         before, if not silent, we must report the error.  Gonzalo ran into
11515         it.
11516
11517 2006-01-23  Miguel de Icaza  <miguel@novell.com>
11518
11519         A fix for bug: #76957
11520         
11521         * iterators.cs (MoveNextMethod.CreateMethodHost): call
11522         ComputeMethodHost before creating the method, this is a new
11523         requirement. 
11524
11525         * anonymous.cs (AnonymousContainer): Now we track all the scopes
11526         that this method references (RegisterScope).  The actual scope
11527         where the method is hosted is computed with the ComputeMethodHost
11528         before we create the method.
11529
11530         Moved the Deepest routine here.
11531
11532         (AnonymousContainer.ComputeMethodHost): New routine used to
11533         compute the proper ScopeInfo that will host the anonymous method.
11534
11535         (ScopeInfo): Deal with multiple roots.  The problem was that we
11536         did not have a unique root where all ScopeInfos could be hanged
11537         from.   Remove `topmost' ScopeInfo, and instead keep an arraylist
11538         of roots.  
11539
11540         Remove AdjustMethodScope which is now computed at the end.  Remove
11541         LinkScope which did a partial link, instead link all ScopeInfos
11542         before code generation from the new "LinkScopes" routine. 
11543
11544         Simplify all the Add* routines as they no longer need to maintain
11545         the tree, they just need to record that they are using variables
11546         from a ScopeInfo.
11547
11548         (IsAncestor, GetAncestorScopes, GetParentScope, LinkScope): New
11549         routines to produce the forest of ScopeInfo trees.
11550
11551         * class.cs (TypeContainer.AppendMethod): This is just like
11552         AddMethod, but ensures that an interface implementation method
11553         (IEnumerable.XXX) is not inserted at the beginning of the queue of
11554         methods, but at the end.
11555
11556         We use this functionality to ensure that the generated MoveNext
11557         method in the iterator class is resolved/emitted before the
11558         enumerator methods created.   
11559
11560         This is required because the MoveNext method computes the right
11561         ScopeInfo for the method.  And the other methods will eventually
11562         need to resolve and fetch information computed from the anonymous
11563         method. 
11564
11565 2006-01-21  Raja R Harinath  <harinath@gmail.com>
11566             Carlos Alberto Cortez  <calberto.cortez@gmail.com>
11567
11568         Fix rest of #76995.
11569         * namespace.cs (NamespaceEntry.UsingExternalAliases): Don't add to
11570         the 'aliases' hash.
11571         (NamespaceEntry.LookupAlias): Lookup 'extern_aliases' hash too.
11572         (NamespaceEntry.VerifyUsing): Resolve external aliases too.
11573
11574 2006-01-18  Raja R Harinath  <rharinath@novell.com>
11575
11576         Fix #76656, cs0231-2.cs.
11577         * cs-parser.jay (formal_parameter_list): Make error case catch
11578         more issues.
11579         (parenthesized_expression_0): Add CS1026 check.
11580         (invocation_expression): Remove unused { $$ = lexer.Location }.
11581
11582 2006-01-17  Raja R Harinath  <rharinath@novell.com>
11583
11584         Fix #76824.
11585         * cs-parser.jay (statement_expression): Don't list out the
11586         individual statement-expressions.  Convert syntax error into
11587         CS0201 check.
11588
11589 2006-01-16  Raja R Harinath  <rharinath@novell.com>
11590
11591         Fix #76874.
11592         * ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
11593         (UnboxCast.DoResolveLValue): New.  Move CS0445 check from
11594         CheckIntermediateModification.
11595         (FieldExpr.DoResolve): Add new two-argument version that
11596         allows us to resolve the InstanceExpression as an lvalue.
11597         The one-argument variant is now just a wrapper.
11598         (FieldExpr.DoResolveLValue): Use two-argument DoResolve.
11599         Resolve the lhs as an lvalue if the it has a value type.
11600         (FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
11601         from Assign.DoResolve.
11602         (PropertyExpr.InstanceResolve): Allow InstanceExpression to be
11603         resolved as an lvalue.
11604         (PropertyExpr.DoResolve): Update.
11605         (PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
11606         has a value type.  Move CS1612 check here from
11607         CheckIntermediateModification.
11608         * assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
11609         * expression.cs (EmptyExpression.OutAccess): New.  Used as the
11610         'right_side' of a ResolveLValue on an 'out' argument.
11611         (EmptyExpression.LValueMemberAccess): New.  Used as the
11612         'right_side' of a propagated ResolveLValue on a value type.
11613         (LocalVariableReference.DoResolveBase): Recognize
11614         EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
11615         Add CS1654 check.
11616         (Argument.Resolve): Use EmptyExpression.OutAccess rather than
11617         EmptyExpression.Null.
11618
11619 2006-01-16  Atsushi Enomoto  <atsushi@ximian.com>
11620
11621         * typemanager.cs : added IsGenericParameter(). In mcs it always
11622           return false.
11623         * doc.cs : for generic parameters, use GenericParameterPosition,
11624           not FullName.
11625
11626 2006-01-12  Ben Maurer  <bmaurer@andrew.cmu.edu>
11627
11628         * expression.cs: Fix Console.WriteLine ((this = x).foo);
11629
11630 2006-01-12  Miguel de Icaza  <miguel@novell.com>
11631
11632         This fixes the problem where we used ldfld instead of ldflda to
11633         load the "THIS" pointer on captured parameters, when THIS is a
11634         value type.  See bug #77205.
11635         
11636         * iterators.cs (CapturedThisReference.Emit): Pass false to
11637         EmitThis (we do not need the address).
11638
11639         * codegen.cs (EmitThis): it needs to know whether we need the
11640         address of `this' or not.  This is used by value types.  
11641
11642         * expression.cs (This.AddressOf): Pass true to the EmitThis call,
11643         every other call passes false.
11644
11645 2006-01-12  Raja R Harinath  <rharinath@novell.com>
11646
11647         Fix #77221.
11648         * typemanager.cs (TryGetBaseDefinition): Rename from the mis-named
11649         GetOverride.
11650         * expression.cs (Invocation.OverloadResolve): Update.
11651         (Invocation.DoResolve): Avoid double resolution of invocation.
11652
11653 2006-01-11  Raja R Harinath  <rharinath@novell.com>
11654
11655         Fix #77180.
11656         * expression.cs (Unary.Emit): When in /checked+ mode, don't emit
11657         unary negation of floating point types as 0-expr; negation cannot
11658         overflow in floating point types.
11659
11660         Fix #77204.
11661         * expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
11662         on operands of 'void' type.
11663
11664         Fix #77200.
11665         * cfold.cs (BinaryFold): Implement folding of BinaryOr, BinaryAnd
11666         and ExclusiveOr for boolean constants too.
11667
11668 2006-01-09  Raja R Harinath  <rharinath@novell.com>
11669
11670         Fix #75636.
11671         * expression.cs (Invocation.OverloadResolve): Replace reflected
11672         override methods with their base virtual methods, rather than
11673         skipping over them.
11674         * typemanager.cs (TypeManager.GetOverride): New.
11675
11676 2006-01-05  Jb Evain  <jbevain@gmail.com>
11677
11678         * class.cs (Property.Define, Indexer.Define): do not tag the
11679         properties as SpecialName | RTSpecialName.
11680
11681 2006-01-04  Miguel de Icaza  <miguel@novell.com>
11682
11683         * class.cs (MethodCore.IsDuplicateImplementation): This method was
11684         doing a low-level comparission of parameter types.  It was lacking
11685         a check for __argslist. 
11686
11687 2005-12-30  Miguel de Icaza  <miguel@novell.com>
11688
11689         * expression.cs (ParameterReference.DoResolveBase): Allow
11690         reference parameters if they are local to this block. 
11691
11692         This allows the ref and out parameters of a delegate to be used in
11693         an anonymous method, for example:
11694
11695         delegate void set (out int x);
11696
11697         set s = delegate (out int x){
11698                 x = 0;
11699         };
11700
11701         This is used by functionality introduced late in the C# language.
11702         
11703         * anonymous.cs (AnonymousMethod.Compatible): Allow anonymous
11704         method that take ref and out parameters. 
11705
11706         Fixes #77119 which was a late change in the spec.
11707
11708 2005-12-23  Miguel de Icaza  <miguel@novell.com>
11709
11710         * anonymous.cs (ScopeInfo.LinkScope): Do not link the scope to its
11711         parent if its the same scope.  Fixes #77060.
11712
11713 2005-12-21  Miguel de Icaza  <miguel@novell.com>
11714
11715         * driver.cs: Report the case of no source files and no -out:
11716         argument provided.
11717
11718 2005-12-20  Raja R Harinath  <rharinath@novell.com>
11719
11720         Fix #77035.
11721         * expression.cs (ComposedCast.GetSignatureForError): Define.
11722
11723 2005-12-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11724
11725         Fix #76995
11726
11727         * namespace.cs (NamespaceEntry): Add extern_aliases as a
11728         ListDictionary, to contain the ExternAliasEntry entries (in
11729         addition to the NamespaceEntry.aliases hashtable). This field is
11730         shared between the original entry and its doppelganger (bodyless 
11731         copy of it).
11732         (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
11733         extern_aliases field.
11734         (NamespaceEntry.Lookup): Move the IsImplicit check after the
11735         lookup in extern_aliases.
11736
11737 2005-12-16  Raja R Harinath  <rharinath@novell.com>
11738
11739         Fix #77006.
11740         * class.cs (TypeContainer.Mark_HasEquals): New.
11741         (TypeContainer.Mark_HasGetHashCode): New.
11742         (ClassPart): Override them.
11743         (MethodCore.CheckBase): Use them instead of referring to Parent.Methods.
11744
11745         Fix #77008.
11746         * enum.cs (EnumMember.EnumMember): Pass the parent_enum as the
11747         'parent' argument to the base constructor.
11748
11749         Remove all mention of TypeContainer from decl.cs.
11750         * decl.cs (MemberCore.Parent): Change into a DeclSpace.
11751         (MemberCore.MemberCore): Change type of 'parent' argument to DeclSpace.
11752         (DeclSpace.DeclSpace): Likewise.
11753         (DeclSpace.DefineMembers): Remove unused argument.
11754         * cs-parser.jay (pop_current_class): Update to changes.  Simplify
11755         debugging check -- we don't care if the debug code throws an
11756         InvalidCastException instead of an InternalErrorException.
11757         * class.cs (TypeContainer.DefineMembers): Update to changes.
11758         (TypeContainer.DoDefineMembers): Likewise.
11759         (TypeContainer.GetMethods): Likewise.
11760         (PropertyMember.Define): Likewise.
11761         (MemberBase.Parent): New property that forwards to
11762         MemberCore.Parent, but ensures that we get a TypeContainer.
11763         * rootcontext.cs (RootContext.PopulateCoreType): Update to changes.
11764         (RootContext.PopulateTypes): Likewise.  Remove special case code
11765         for !RootContext.StdLib: DefineMembers is idempotent.
11766
11767 2005-12-14  Miguel de Icaza  <miguel@novell.com>
11768
11769         * convert.cs (ExplicitConversionCore): Check the return value from
11770         ExplicitConversionCore which can return null on failure.  Fixes #76914
11771
11772 2005-12-13  Marek Safar  <marek.safar@seznam.cz>
11773
11774         * class.cs (Method.ApplyAttributeBuilder): Test out modifier properly.
11775
11776 2005-12-11  Atsushi Enomoto  <atsushi@ximian.com>
11777
11778         * doc.cs : The search for referenced namespace was insufficient to
11779           get global one as it used to do. Fixed bug #76965.
11780
11781 2005-12-10  Atsushi Enomoto  <atsushi@ximian.com>
11782
11783         * doc.cs : check name in cref in the last phase that whether it is
11784           namespace or not.
11785
11786 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11787
11788         * cs-tokenizer.cs : reverted the latest change: it somehow broke
11789           Mono.C5.
11790
11791 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11792
11793         * doc.cs : so it turned out that we cannot skip override check for 
11794           interface members. Fixed bug #76954.
11795
11796 2005-12-09  Atsushi Enomoto  <atsushi@ximian.com>
11797
11798         * cs-tokenizer.cs : fixed bug #75984:
11799           - #warning and #error should not be handled when the source line
11800             is disabled.
11801           - #line is not checked strictly when the source line is disabled.
11802           - #define and #undef is on the other hand checked strictly at any
11803             state.
11804
11805 2005-12-08  Atsushi Enomoto  <atsushi@ximian.com>
11806
11807         * cs-tokenizer.cs : missing Location (actually, filename) in one of
11808           CS1027 report.
11809
11810 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11811
11812         * attribute.cs (GlobalAttribute.ctor): Pass NamespaceEntry only.
11813
11814         * class.cs (EmitFieldInitializers): Simplified and fixed to work with
11815         event initializers.
11816         (FieldBase.EmitInitializer): Moved from TypeContainer and simplified.
11817         (FieldBase.Initializer): Initializer is now optional.
11818         (EventField.Define): Only event field can have initializer.
11819
11820         * codegen.cs (EmitContext): DeclSpace is not readonly (small hack).
11821
11822         * const.cs (Const): Reuse initializer.
11823
11824         * cs-parser.jay: Updated after FieldBase changes.
11825         Added current_array_type to simplify array initializers.
11826
11827         * ecore.cs (NullCast.IsDefaultValue): Implemented.
11828
11829         * expression.cs, iterators.cs: Updated.
11830
11831         * namespace.cs (NamespaceEntry): Made UsingFound private.
11832
11833 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11834
11835         * parameterCollection.cs: Obsolete, removed.
11836         * parser.cs: Obsolete, removed.
11837
11838 2005-12-05  Marek Safar  <marek.safar@seznam.cz>
11839
11840         Fix #76849.
11841         * class.cs (Constructor.Emit): Set obsolete checking for whole context.
11842
11843         * enum.cs (Enum.Define): Set obsolete context here.
11844
11845 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11846
11847         * doc.cs :
11848           - FindDocumentedMember() now expects 1) paramList as null
11849             when "we don't have to check the number of parameters" and
11850             2) Type.EmptyTypes when "there is no arguments".
11851           - Introduced FoundMember struct to hold the exact type which was
11852             used to find the documented member (the above change broke
11853             test-xml-044; it might be better just to use DeclaringType than
11854             what MS does, like this change does, but it depends on usage.)
11855
11856 2005-12-05  Atsushi Enomoto  <atsushi@ximian.com>
11857
11858         * doc.cs : documented member might be from DeclaringType for nested
11859           types. Fixed bug #76782.
11860
11861 2005-12-03  Ben Maurer  <bmaurer@ximian.com>
11862
11863         * anonymous.cs: Have the param code handle leaving copies on the
11864         stack etc. Allows anonymous params to take part in the assignment
11865         code (++, +=, etc). Fixes bug #76550
11866
11867         * expression.cs: Handle the prepare_for_load/leave_copy by passing
11868         it down to the anon code.
11869
11870         * iterators.cs: Use dummy var here
11871
11872         * codegen.cs: Handle new vars
11873
11874 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11875
11876         Fix #76849.
11877         * class.cs (MethodData.Define): Set proper Obsolete context.
11878
11879         * ecore.cs (FieldExpr.ResolveMemberAccess): Don't check [Obsolete] in
11880         obsolete context.
11881         (FieldExpr.DoResolve): Ditto.
11882
11883 2005-12-01  Marek Safar  <marek.safar@seznam.cz>
11884
11885         Fix #76849.
11886         * class.cs (MethodCore.DoDefineParameters): Test [Obsolete] only when
11887         parent is not obsolete.
11888
11889 2005-12-01  Atsushi Enomoto  <atsushi@ximian.com>
11890
11891         * doc.cs : (FindDocumentedMember) find parameterless members first
11892           and get CS0419 in the early stage. Fixed first case of bug #76727.
11893
11894 2005-11-30  Marek Safar  <marek.safar@seznam.cz>
11895
11896         Fix #76859.
11897         * ecore.cs (Expression.ResolveAsConstant): Report constant error only when
11898         no error was reported.
11899
11900         *expression.cs (Binary.DoResolve): left can be null.
11901
11902 2005-11-22  Marek Safar  <marek.safar@seznam.cz>
11903
11904         Fix #76783.
11905         * class.cs (MethodData.Emit): Parameters should be labeled first.
11906
11907 2005-11-21  Marek Safar  <marek.safar@seznam.cz>
11908
11909         Fix #76761.
11910         * parameter.cs (Parameter.ApplyAttributeBuilder): Fixed `ref' detection.
11911
11912 2005-11-18  Marek Safar  <marek.safar@seznam.cz>
11913
11914         * attribute.cs (AreParametersCompliant): Moved to Parameter.
11915
11916         * class.cs (MethodCore): Parameter clean up.
11917         (IMethodData): Added ParameterInfo.
11918         (MethodData): Parameter clean up.
11919         (Indexer.Define): Parameter clean up.
11920
11921         * anonymous.cs,
11922         * codegen.cs,
11923         * cs-parser.jay,
11924         * decl.cs,
11925         * doc.cs,
11926         * ecore.cs,
11927         * flowanalysis.cs,
11928         * iterators.cs,
11929         * pending.cs,
11930         * statement.cs,
11931         * typemanager.cs: Parameter clean up.
11932
11933         * delegate.cs (Define): Get rid of duplicated code.
11934
11935         * expression.cs (ParameterReference): Removed useless parameters
11936         and simplified.
11937         (Invocation): Ditto.
11938
11939         * parameter.cs (ParamsParameter): New class, params specialization.
11940         (ArglistParameter): Attemp to separate arglist.
11941         (Parameter): Refactored to be reusable and faster.
11942         (Parameter.Modifier): Made understandable.
11943         (Parameters): Changed to be used as a class for `this' assembly
11944         parameters. Refactored to use new specialized classes.
11945
11946         * support.cs (ParameterData): Added Types property.
11947         (InternalParameters): Deleted.
11948
11949 2005-08-20  Martin Baulig  <martin@ximian.com>
11950
11951         Merging this patch from GMCS to fix #75867.
11952
11953         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
11954         scope if we don't already have it.
11955
11956 2005-11-17  Martin Baulig  <martin@ximian.com>
11957
11958         * anonymous.cs
11959         (CaptureContext.EmitMethodHostInstance): Use `Ldarg_0' if we
11960         inherit the scope from our parent.  Fixes #76653.
11961
11962 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11963
11964         * doc.cs : the previous patch does not actually fix the bug.
11965           PropertyInfo override check is now implemented and really fixed it.
11966         * expression.cs : Invocation.IsAncestralType() is used from doc.cs.
11967
11968 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11969
11970         * doc.cs : apply "override filter" also to properties.
11971           Fixed bug #76730.
11972
11973 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
11974
11975         * doc.cs : renamed FindMembers() to FindMethodBase(). For interfaces,
11976           no need to check overrides. For classes, omit those results from 
11977           interfaces since they must exist in the class. Fixed bug #76726.
11978
11979 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11980
11981         * typemanager.cs : (GetFullNameSignature) differentiate indexers
11982           with different parameters. Fixed the second problem in #76685.
11983
11984 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11985
11986         * doc.cs : (FindDocumentedMember) pass invocation_type as well (to
11987           get expected 'protected' access in CheckValidFamilyAccess()).
11988           Fixed bug #76692.
11989
11990 2005-11-15  Atsushi Enomoto  <atsushi@ximian.com>
11991
11992         * doc.cs : (GenerateTypeDocComment) Fields could be FixedField.
11993           Fixed bug #76705.  CS1569 was incorrectly commented out.
11994
11995 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
11996
11997         * doc.cs : use Invocation.IsOverride() to do real override check.
11998         * expression.cs : made Invocation.IsOverride() internal.
11999
12000 2005-11-14  Atsushi Enomoto  <atsushi@ximian.com>
12001
12002         * doc.cs : use TypeManager.FindMembers() instead of (possible)
12003           TypeBuilder.FindMembers() and filter overriden base members out.
12004           Fixed bug #76990.
12005
12006 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12007
12008         * doc.cs : ref/out parameters are represented as '@' (instead of
12009           '&' in type FullName). Fixed bug #76630 (additionally crefs).
12010
12011 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12012
12013         * doc.cs : when there was no '.' in cref to methods in doc comment,
12014           then parameters were missing in the output. Fixed bug #76691.
12015
12016 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12017
12018         * driver.cs : don't output docs when there is an error.
12019           Fixed bug #76693.
12020
12021 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12022
12023         * doc.cs :
12024           Now it should detect indexers. Fixed primary concern in bug #76685.
12025           Fixed CS0419 message to not show the identical member signature in
12026           the message.
12027
12028 2005-11-13  Atsushi Enomoto  <atsushi@ximian.com>
12029
12030         * doc.cs : (FindDocumentedMember) use TypeManager.MemberLookup()
12031           instead of Type.FindMembers() since it does not handle events.
12032           Fixed bug #71604.
12033
12034 2005-11-12  Gert Driesen  <drieseng@users.sourceforge.net>
12035
12036         * codegen.cs: Fixed typo (speficied -> specified).
12037
12038 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12039
12040         Fix #76369.
12041         * doc.cs (FindDocumentedTypeNonArray): Don't resolve again.
12042
12043 2005-11-11  Marek Safar  <marek.safar@seznam.cz>
12044
12045         * attribute.cs: Changed error message.
12046
12047         * cs-tokenizer.cs: One more check.
12048
12049 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12050
12051         * statement.cs (Block.Resolve): Ignore empty statement.
12052
12053 2005-11-10  Marek Safar  <marek.safar@seznam.cz>
12054
12055         * report.cs: Made error/warning methods more strict to avoid
12056         their misuse.
12057
12058         * anonymous.cs, attribute.cs, class.cs, codegen.cs, constant.cs,
12059         convert.cs, cs-parser.jay, cs-tokenizer.cs, decl.cs, delegate.cs,
12060         doc.cs, driver.cs, ecore.cs, expression.cs, location.cs,
12061         namespace.cs, parameter.cs, statement.cs, typemanager.cs: Updated.
12062
12063 2005-11-08  Marek Safar  <marek.safar@seznam.cz>
12064
12065         * attribute.cs (Attribute.GetCoClassAttributeValue): New method.
12066         (AttributeTester.GetCoClassAttribute): Get CoClassAttribute.
12067
12068         * class.cs (TypeContainer.IsComImport): New property.
12069         (Constructor.Define): Create proper ctor for ComImport types.
12070
12071         * expression.cs (New.CheckComImport): Fixed.
12072
12073 2005-11-07  Miguel de Icaza  <miguel@novell.com>
12074
12075         * anonymous.cs (CaptureContext.AddParameterToContext): The fact
12076         that a parameter has been captured does not mean that we do not
12077         have to do the rest of the processing.  This fixes the second part
12078         of #76592.  If there was another anonymous method capturing
12079         values in the past, the Scope would never be set for the second
12080         method that captured the same parameter.
12081
12082         (CaptureContext.EmitAssignParameter): When `leave_copy' is passed,
12083         properly manipulate the stack.   Second part of fix for #76592.
12084
12085         * expression.cs (New): Add support for invoking "new" on
12086         interfaces that have been flagged with the ComImport attribute and
12087         the CoClass.  Fixes #76637 
12088
12089         * statement.cs (Try.DoEmit): When a variable is captured, do not
12090         try to emit the vi.LocalBuilder variable as it has been captured.
12091         Create a temporary variable and store the results on the
12092         FieldBuilder.  Fixes #76642
12093
12094 2005-11-07  Marek Safar  <marek.safar@seznam.cz>
12095
12096         * class.cs (CheckPairedOperators): Made compilable with csc 2.0.
12097
12098         * ecore.cs (InstanceResolve): Fixed CS1540 detection.
12099
12100         * expression.cs (Binary.DoResolve): Added && optimalization.
12101     
12102         * typemanager.cs (AddUserType): Removed useless argument.
12103
12104 2005-11-04  Marek Safar  <marek.safar@seznam.cz>
12105
12106         * statement.cs (Block.variables): Uses ListDictionary.
12107
12108 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12109
12110         Fix #75969.
12111         * class.cs (PartialContainer.EmitType): Customized to emit
12112         security attributes.
12113         (ClassPart.ApplyAttributeBuilder): Transform security attribute
12114         for partial classes.
12115
12116 2005-11-03  Marek Safar  <marek.safar@seznam.cz>
12117
12118         Fix #76599.
12119         * expression.cs (ElementAccess.DoResolveLValue): Fixed buffer
12120         access has to be fixed.
12121         
12122         * typemanager.cs (IsUnmanagedType): Wrong common field type.
12123
12124 2005-11-01  Marek Safar  <marek.safar@seznam.cz>
12125
12126         Fix #76590.
12127         * ecore.cs (NullCast.Reduce): Implemented.
12128
12129         * expression.cs (ArrayCreation.CheckIndices): Correcly check
12130         constant type.
12131         
12132         * statement.cs (SwitchLabel.ResolveAndReduce): Catch null
12133         properly.
12134         (Foreach.Resolve): Catch null properly.
12135
12136 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12137  
12138         * cs-tokenizer.cs: Warning text fix.
12139
12140         * driver.cs: AllWarningNumbers exposed on public interface.
12141
12142         * report.cs (): Reviewed warning numbers.
12143         (IsValidWarning): Use binary search.
12144
12145 2005-10-29  Marek Safar  <marek.safar@seznam.cz>
12146  
12147         * driver.cs: Implemeted resource visibility.
12148         (Resources): New class for code sharing between /res: and
12149         /linkres:
12150  
12151 2005-10-28  Marek Safar  <marek.safar@seznam.cz>
12152
12153         Fix #76568.
12154         * cfold.cs (ConstantFold.BinaryFold): Implemented null cast
12155         folding.
12156         
12157         * convert (Convert.ImplicitReferenceConversion): NullCast holds
12158         contants only.
12159         
12160         * ecore.cs (NullCast): Child is contant only.
12161         
12162         * literal.cs (NullLiteral.Reduce): null can be converted to any
12163         reference type.
12164
12165 2005-10-28  Kornél Pál  <kornelpal@hotmail.com>
12166
12167         * driver.cs: Use Encoding.Default as default code page instead
12168           of ISO-28591.
12169
12170 2005-10-27  Raja R Harinath  <rharinath@novell.com>
12171
12172         Fix #76085.
12173         * expression.cs (Invocation.Error_InvalidArguments): Handle
12174         __arglist parameters.
12175         (Invocation.VerifyArgumentsCompat): Likewise.
12176         * support.cs (ReflectionParameters.GetSignatureForError): Print
12177         __arglist parameters.
12178         (InternalParamters.GetSignatureForError): Likewise.
12179         * parameter.cs (Parameters.GetSignatureForError): Likewise.
12180
12181 2005-10-26  Marek Safar  <marek.safar@seznam.cz>
12182
12183         * attribute.cs (GetPropertyValue): Made public.
12184
12185         * codegen.cs (AssemblyClass): ResolveClsCompliance renamed to
12186         Resolve.
12187         Add new property WrapNonExceptionThrows to handle 2.0 assembly
12188         attribute.
12189         (AssemblyClass.Emit): Emit RuntimeCompatibilityAttribute when it
12190         is not defined.
12191         
12192         * driver.cs: Reflect method name change.
12193         
12194         * statement.cs (Try.Resolve): Warn when try has both general
12195         exception handlers.
12196         
12197         * typemanager.cs: runtime_compatibility_attr_type new predefined
12198         type.
12199
12200 2005-10-26  Raja R Harinath  <harinath@gmail.com>
12201
12202         Fix #76419.
12203         * pending.cs (InterfaceMethod): Allow tm.args [i] to be null --
12204         treat it as an empty parameter list.
12205
12206 2005-10-26  Raja R Harinath  <rharinath@novell.com>
12207
12208         Fix #76271.     
12209         * ecore.cs (SimpleName.DoSimpleNameResolve): Make fall-back 
12210         ResolveAsTypeStep silent.
12211         * statement.cs (Block.AddConstant): Mark block as used.
12212         (Block.ResolveMeta): Avoid piling on error messages
12213         if a constant initializer resolution fails.
12214
12215 2005-10-25  Raja R Harinath  <rharinath@novell.com>
12216
12217         * namespace.cs (RootNamespace.VerifyUsingForAll, Namespace.VerifyUsing):
12218         Remove.
12219         (NamespaceEntry.VerifyAllUsing): New.
12220         (NamespaceEntry.AliasEntry.Resolve): New.  Handles common error
12221         behaviour.  Delegates actual resolution of alias to ...
12222         (NamespaceEntry.DoResolve): ... this.  Renamed from Resolve.
12223         (NamespaceEntry.LocalAliasEntry, NamespaceEntry.ExternAliasEntry):
12224         Update.
12225         * driver.cs (Driver.MainDriver): Update.
12226         
12227         * namespace.cs (NamespaceEntry.DefineNamespace): Remove.
12228         (NamespaceEntry.SymbolFileID): Make into a on-demand computed
12229         property.
12230         (Namespace.DefineNamespaces, RootNamespace.DefineNamespacesForAll):
12231         Remove.
12232         * symbolwriter.cs (SymbolWriter.Initialize): Don't call
12233         RootNamespace.DefineNamespacesForAll.
12234
12235 2005-10-24  Raja R Harinath  <harinath@gmail.com>
12236
12237         * typemanager.cs (assemblies, external_aliases, modules)
12238         (AddAssembly, AddExternAlias, AddModule GetAssemblies, Modules)
12239         (ComputeNamespaces, GetRootNamespace): Remove extra staging
12240         overhead.  Move resposibility ...
12241         * namespace.cs (GlobalRootNamespace): ... here.  Update to changes.
12242         * driver.cs, attribute.cs, codegen.cs: Update to changes.
12243
12244 2005-10-23  Raja R Harinath  <harinath@gmail.com>
12245
12246         * namespace.cs (RootNamespace.all_namespaces): Renamed from
12247         cached_namespaces.  Improve usage.
12248         (RootNamespace.Reset, RootNamespace.RegisterNamespace)
12249         (RootNamespace.VerifyUsingForAll, RootNamespace.DefineNamespacesForAll):
12250         Move from GlobalRootNamespace and simplify.
12251         (RootNamespace.Global): Make instance variable.
12252         (RootNamespace.RootNamespace): Add "alias name" parameter.
12253         (GlobalRootNamespace): Simplify drastically.
12254         (Namespace.Lookup): Don't use GetNamespace.
12255         * typemanager.cs (GetRootNamespace): Rename from
12256         ComputeNamespaceForAlias.
12257         (NamespaceClash): Use Global.IsNamespace instead of GetNamespace.
12258
12259 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12260
12261         * anonymous.cs (AnonymousContainer): Don't crash when container
12262         doesn't exist.
12263
12264 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12265
12266         * expression.cs (Binary.DoResolve): Warn when comparing same
12267         values.
12268
12269 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
12270
12271         Fix #76486.
12272         * expression.cs (Binary.DoResolve): It looks like there are no
12273         convetsion rules in enum context.
12274
12275 2005-10-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
12276
12277         Add support for extern alias qualifiers.
12278         * typemanager.cs: Move some LookupTypeReflection code
12279         to namespace.cs, to have cleaner code. Added some methods
12280         to help us keep track of the extern aliased references.
12281         * driver.cs: Add suport for extern alias assemblies on command
12282         line and check for their warnings/errors. Also keep track of the
12283         extern aliased assemblies.
12284         * namespace.cs: Move the global functionality of Namespace
12285         to GlobalRootNamespace/RootNamespace. Now the global namespace
12286         is GlobalRootNamespace.Globa. Also the code moved from 
12287         typemanager.cs lives in GlobalRootNames.cs/RootNamespace.cs. 
12288         Finally added LocalAliasEntry (AliasEntry before) and
12289         ExternAliasEntry, to handle alias statements.
12290         * cs-parser.jay: Add support in the grammar for extern alias
12291         statement.
12292         * doc.cs, delegate.cs, expression.cs ecore.cs, symbolwriter.cs: 
12293         Update callings to Namespace (now in GlobalRootNamespace).
12294
12295 2005-10-18  Raja R Harinath  <rharinath@novell.com>
12296
12297         Fix #76371.
12298         * class.cs (TypeContainer.DefineType): Move updating of
12299         topological sort earlier in the code.
12300         * decl.cs (DeclSpace.ResolveBaseTypeExpr): Don't use TypeBuilder.
12301
12302 2005-10-18  Marek Safar  <marek.safar@seznam.cz>
12303
12304         Fix #76273.
12305         * cfold.cs (BinaryFold): Reduce constant in enum conversion.
12306         
12307         * constant.cs (Constant.TryReduce): Moved from Cast class.
12308         (Reduce): Made little bit more OO and fixed missing conversions.
12309         
12310         * ecore.cs (Reduce): Implemented.
12311         (Binary.EnumLiftUp): New method to upgrade values to enum values.
12312         
12313         * literal.cs (Reduce): Implemented.
12314         
12315         * class.cs: Reverted Miguel's wrong commit.
12316
12317 2005-10-14  Miguel de Icaza  <miguel@novell.com>
12318
12319         * ecore.cs (GetMemberType): Report the correct mapping for the MemberCore
12320
12321 2005-10-14  Atsushi Enomoto  <atsushi@ximian.com>
12322
12323         * cs-parser.jay, expression.cs : CS0214 was missing error location
12324           for constants. Fixed bug #76404.
12325
12326 2005-10-11  Marek Safar  <marek.safar@seznam.cz>
12327
12328         Fix #76370.
12329         * convert.cs (ExplicitConversionCore): Fixed object->enum
12330         conversion.
12331
12332 2005-10-10  Raja R Harinath  <rharinath@novell.com>
12333
12334         * ecore.cs (PropertyExpr.Emit): Use Invocation.EmitCall to emit
12335         InstanceExpression.
12336         (PropertyExpr.EmitCall): Likewise.
12337         * expression.cs (Invocation.EmitArguments): Handle case where
12338         arguments == null.
12339         (Invocation.EmitCall): Avoid allocating temporary variable if
12340         there are no arguments.
12341
12342 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12343
12344         Fix #76323.
12345         * convert.cs (ImplicitConversionStandard): Move conversion of
12346         void* to arbitrary pointer types ...
12347         (ExplicitConversionStandard): .. here.
12348         * ecore.cs (Expression.Error_ValueCannotBeConverted): Fix CS0266
12349         error to always print typenames.
12350
12351 2005-10-07  Raja R Harinath  <rharinath@novell.com>
12352
12353         * convert.cs (GetConversionOperator): Rename from
12354         GetConversionOperators.  Move operator selection code from ...
12355         (UserDefinedConversion): ... here.
12356
12357 2005-10-06  Marek Safar  <marek.safar@seznam.cz>
12358
12359         * convert.cs (ExplicitConversionCore): Removed duplicate enum
12360         conversion.
12361
12362 2005-10-05  Marek Safar  <marek.safar@seznam.cz>
12363
12364         * assign.cs (Assign.DoResolve): Error method changed.
12365
12366         * cfold.cs (DoConstantNumericPromotions): Error method changed.
12367         
12368         * const.cs (ResolveValue): Reset in_transit immediately.
12369         
12370         * constant.cs: Error method changed.
12371         
12372         * convert.cs: Removed useless location parameter.
12373         (ExplicitNumericConversion): Don't do double enum check.
12374         (ExplicitConversionCore): Renamed from ExplicitConversion.
12375         (ExplicitUnsafe): Extracted from ExplicitConversion.
12376         (ExplicitConversion): Uses for error reporting.
12377         
12378         * ecore.cs (Error_ValueCannotBeConverted): More logic for more
12379         error messages.
12380         (ResolveBoolean): Uses common error method.
12381         (CastToDecimal): Get rid of ec.
12382         (CastFromDecimal): Optimized.
12383         (ConvCast): Get rid of ec.
12384         
12385         * enum.cs (ResolveValue): Reset in_transit immediately.
12386         (Emit): Return after first error.
12387         
12388         * expression.cs: Convert changes.
12389         
12390         * literal.cs: Error method changed.
12391         
12392         * statement.cs: Error method changed.
12393
12394 2005-10-03  Raja R Harinath  <rharinath@novell.com>
12395
12396         * support.cs (SeekableStreamReader.Position): Don't error out when
12397         the requested position is just beyond the end of the current
12398         buffered data.
12399
12400 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12401
12402         * support.cs (SeekableStreamReader): Simplify drastically.  Don't
12403         try to keep in sync with the byte count of the underlying Stream.
12404         However, this limits us to a window size of 2048 characters: i.e.,
12405         the maximum lookahead of our lexer/parser can be 2048 characters.
12406
12407 2005-09-28  Marek Safar  <marek.safar@seznam.cz>
12408
12409         Fix #76255.
12410         * driver.cs: Fix compilation files with full root path.
12411
12412 2005-09-25  Miguel de Icaza  <miguel@novell.com>
12413
12414         * report.cs (SymbolRelatedToPreviousError): Format the output so
12415         it does not use an open parenthesis that is never closed. 
12416
12417         * driver.cs: Follow coding guidelines
12418
12419 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12420
12421         Fix #72930.
12422         * const.cs (Const.ResolveValue): Check for assigning non-null
12423         value to reference type.
12424
12425 2005-09-27  Marek Safar  <marek.safar@seznam.cz>
12426
12427         * anonymous.cs: Implemented ExprClassName.
12428         
12429         * assign.cs (Assign.DoResolve): Don't chrash when type is not
12430         delegate.
12431         
12432         * attribute.cs (ResolveArguments): Enabled MethodImplOptions
12433         check.
12434         
12435         * class.cs (StaticClass.DefineContainerMembers): Report protected
12436         members as error.
12437         
12438         * codegen.cs: if(ed) PRODUCTION.
12439         
12440         * convert.cs (Error_CannotImplicitConversion): Better error
12441         distinction.
12442         
12443         * cs-parser.jay: More error checks.
12444         
12445         * cs-tokenizer.cs (consume_identifier): Fixed Miguel's revert.
12446         
12447         * driver.cs (CSCParseOption): Enabled wrong option check.
12448         
12449         * ecore.cs (Expression.ExprClassName): Turned to property.
12450         (MemberExpr.CheckIntermediateModification): For checking boxed
12451         value types     modification.
12452         
12453         * statement.cs (Fixed.Resolve): Expression type must be
12454         convertible to fixed type.
12455         (CollectionForeach.GetEnumeratorFilter,TryType):
12456         Small refactoring for easier error checking.
12457
12458 2005-09-26  Marek Safar  <marek.safar@seznam.cz>
12459
12460         * attribute.cs (Attribute.Resolve): Check Obsolete attribute for
12461         attributes.
12462         
12463         * class.cs (GeneratedBaseInitializer): New class for customization
12464         compiler generated initializers.
12465         (MemberBase.DoDefine): Check Obsolete attribute here.
12466         (FieldMember.DoDefine): Ditto.
12467         
12468         * const.cs (ExternalConstant.CreateDecimal): Builder for decimal
12469         constants.
12470         
12471         * decl.cs (MemberCore.EmitContext): Returns valid current ec.
12472         (MemberCore.GetObsoleteAttribute): Removed argument.
12473         (MemberCore.CheckObsoleteness): Obsolete attributes are hierarchic.
12474         (MemberCore.CheckObsoleteType): New helper.
12475         
12476         * delegate.cs,
12477         * enum.cs,
12478         * statement.cs: Updates after MemberCore changes.
12479         
12480         * ecore.cs (TypeExpr.ResolveType): Check type obsoleteness here.
12481         (FieldExpr.ResolveMemberAccess): Fixed decimal constants checks.
12482         
12483         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't check
12484         obsolete attribute for compiler construct.
12485         (As.DoResolve): Cache result.
12486         
12487         * iterators.cs (Define_Constructor): Use GeneratedBaseInitializer.
12488
12489 2005-09-26  Raja R Harinath  <rharinath@novell.com>
12490
12491         Fix #76133.
12492         * expression.cs (This.VerifyFixed): In a value type T, the type of
12493         'this' is T&, iow, 'this' is either an out or ref parameter.  In a
12494         value type R, 'this' is treated as a value parameter.
12495
12496 2005-09-22  Miguel de Icaza  <miguel@novell.com>
12497
12498         * statement.cs (Lock): Use the TemporaryVariable class instead of
12499         manually using local variables as those do not work when variables
12500         are captured.
12501
12502         * ecore.cs: Moved the TemporaryVariable class from being a nested
12503         class inside Foreach to be a public class that can be employed in
12504         other places. 
12505
12506 2005-09-19  Marek Safar  <marek.safar@seznam.cz>
12507
12508         * cs-parser.jay: interface_accessors replaced by
12509         accessor_declarations.
12510
12511         * ecore.cs, literal.cs, statement.cs: NullLiteral holds null
12512         location.
12513         
12514         * statement.cs (GotoCase.Resolve): Convert null constant to
12515         null case.
12516         (SwitchLabel.ResolveAndReduce): Ditto.
12517         (SwitchLabel.NullStringCase): Custom null stamp.
12518         (Switch.SimpleSwitchEmit): Fix from NullLiteral to NullStringCase.
12519         
12520         typemanager.cs (CSharpSignature): Don't skip first argument
12521         for full names.
12522
12523 2005-09-18  Miguel de Icaza  <miguel@novell.com>
12524
12525         * driver.cs: Set InEmacs based on the environment variable EMACS. 
12526
12527         * location.cs (InEmacs): in this mode, do not report column
12528         location as it confuses Emacs.
12529
12530 2005-09-16  Marek Safar  <marek.safar@seznam.cz>
12531
12532         * cfold.cs, constant.cs, convert.cs, ecore.cs,
12533         expression.cs, iterators.cs, literal.cs: Store constants and
12534         literals location.
12535         
12536         * class.cs (MemberBase.ShortName): Pass location.
12537         
12538         * cs-parser.jay: Some location fixes.
12539         
12540         * ecore.cs (Expression.Location): Made virtual.
12541
12542 2005-09-05  Miguel de Icaza  <miguel@novell.com>
12543
12544         * expression.cs (Cast.TryReduce): Only reduce to an EnumConstant
12545         if the underlying types are the same, otherwise we need to produce
12546         code that will do the proper cast.
12547
12548         This was exposed by Marek's constant rewrite which produced
12549         invalid code for the call site:
12550
12551         enum X : long { a }
12552         void Method (X v) {}
12553
12554         Method ((X) 5)
12555
12556         This fixes test-49.cs
12557
12558 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12559
12560         * attribute.cs : (Attribute.IsValidArgumentType): array of string/
12561           Type/Object should be allowed as well. Fixed bug #75968.
12562
12563 2005-09-05  Atsushi Enomoto  <atsushi@ximian.com>
12564
12565         * expression.cs : (Binary.DoResolve): when one is enum constant and
12566           another is constant 0, then return enum one *as enum type*.
12567           Fixed bug 74846.
12568
12569 2005-09-02  Raja R Harinath  <rharinath@novell.com>
12570
12571         * attribute.cs (GetMarshal): Work even if "DefineCustom" is
12572         internal.
12573
12574         Fix #75941.
12575         * ecore.cs (SimpleNameResolve.DoSimpleNameResolve): Disable
12576         flow-branching for LocalVariableReferences in case we were invoked
12577         from a MemberAccess.
12578         * expression.cs (LocalVariableReference.VerifyAssigned): New.
12579         Carved out of ...
12580         (LocalVariableReference.DoResolveBase): ... this.
12581         (MemberAccess.Resolve): Do the check that was disabled during
12582         SimpleNameResolve.
12583
12584 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12585
12586         * class.cs :
12587           (PartialContainer.Create): check abstract/sealed/static strictly
12588           but abstract/sealed can exist only at one side. Fixed bug #75883.
12589
12590 2005-09-01  Kornél Pál  <kornelpal@hotmail.com>
12591
12592         Fix #75945.
12593         * attribute.cs (Attribute.GetMarshal): If ArraySubType is not
12594         specified, don't default to UnmanagedType.I4.
12595
12596 2005-09-01  Atsushi Enomoto  <atsushi@ximian.com>
12597
12598         * expression.cs : conditional operator should check possibly
12599           incorrect assign expression. Fixed bug #75946.
12600
12601 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12602
12603         * cs-tokenizer.cs, cs-parser.jay, driver.cs, support.cs :
12604           Reverting the change. gmcs is much complex than mcs on this matter.
12605
12606 2005-08-31  Atsushi Enomoto  <atsushi@ximian.com>
12607
12608         * cs-tokenizer.cs : To read another token ahead of the actual 
12609           consumption, use new SavedToken and cache token instead of moving
12610           back the stream with SeekableStreamReader (it seemed problematic).
12611         * cs-parser.jay,
12612           driver.cs : Thus use StreamReader directly.
12613         * support.cs : Thus removed SeekableStreamReader.
12614
12615 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12616
12617         Fix #75934.
12618         * anonymous.cs (ScopeInfo.MakeFieldName): New helper.
12619         (ScopeInfo.EmitScopeType): Use it to construct field names from
12620         names of captured locals.
12621
12622         Fix #75929.
12623         * ecore.cs (BoxedCast.BoxedCast) [1-argument variant]: Remove.
12624         * convert.cs (ImplicitReferenceConversion, TryImplicitIntConversion):
12625         Pass 'target_type' to BoxedCast.  Don't default to 'object'.
12626         (ExplicitConversion): Remove enum cases already handled by
12627         implicit conversion.  Move implicit conversion check to the beginning.
12628         * delegate.cs (DelegateCreation.ResolveMethodGroupExpr): Update.
12629         * expression.cs (ArrayCreation.EmitDynamicInitializers):
12630         Don't treat System.Enum as a struct.
12631
12632 2005-08-30  Jb Evain  <jbevain@gmail.com>
12633
12634         * attribute.cs: handles as expression in parameters.
12635
12636 2005-08-30  Raja R Harinath  <rharinath@novell.com>
12637
12638         Fix #75802.
12639         * class.cs (TypeContainer.VerifyClsName): Don't use a
12640         PartialContainer when verifying CLS compliance.
12641         (AbstractPropertyEventMethod): Set Parent here, ...
12642         (PropertyMethod): ... not here.
12643
12644 2005-08-30  Atsushi Enomoto  <atsushi@ximian.com>
12645
12646         * attribute.cs : escaped attribute name should not be allowed to be
12647           resolved (e.g. @class as classAttribute). Fixed bug #75930.
12648
12649 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12650
12651         Fix #75927.
12652         * convert.cs (ImplicitStandardConversionExists): Allow zero also
12653         when converting a long constant to unsigned long.
12654         * expression.cs (Invocation.OverloadResolve): Add sanity check to
12655         detect where IsApplicable and VerifyArgumentsCompat disagree.
12656
12657 2005-08-29  Raja R Harinath  <rharinath@novell.com>
12658         and Carlos Alberto Cortez  <carlos@unixmexico.org>
12659
12660         Fix #75848.
12661         * class.cs (TypeContainer.CanElideInitializer): New helper.
12662         (TypeContainer.EmitFieldInitializers): Use it to determine if we
12663         can safely emitting the initializer of a field.
12664
12665 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12666
12667         * statement.cs : (Continue.Resolve()) Unlike break, continue is not
12668           allowed inside a switch (without loop). Fixed bug #75433.
12669
12670 2005-08-26  Kornél Pál  <kornelpal@hotmail.com>
12671
12672         * AssemblyInfo.cs: Using Consts.MonoVersion instead of MonoVersion.cs.
12673         * mcs.exe.sources: Using Consts.MonoVersion instead of MonoVersion.cs.
12674
12675 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12676
12677         * driver.cs : kinda reverting the default encoding changes (not exact 
12678           revert since I noticed that "codepage:reset" might not work fine).
12679
12680 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12681
12682         * class.cs : (AbstractPropertyEventMethod) SetupName() now takes
12683           Location. Now getter and setter store location correctly.
12684           (errors/cs0111-12.cs now reports the expected location.)
12685
12686 2005-08-25  Atsushi Enomoto  <atsushi@ximian.com>
12687
12688         * driver.cs : Use default encoding on the environment.
12689           Removed (now that) extra parameter for SeekableStreamReader.
12690         * support.cs : (SeekableStreamReader) third .ctor() argument for
12691           StreamReader is not required (always true). preamble size could
12692           be acquired in simpler and safe way.
12693
12694 2005-08-24  Atsushi Enomoto  <atsushi@ximian.com>
12695
12696         * cs-parser.jay: report CS0642 at warning level 3
12697           and report CS0642 for an if else statement also
12698           fixes bug #74745. Patch by John Luke (and a bit
12699           modified by me).
12700           Removed extra CS0642 warning check for "while",
12701           "for" and "fixed".
12702         * statement.cs: In Block.Resolve(), CS0642 check
12703           is reimplemented to check a sequence of an empty
12704           statement and a block.
12705
12706           Both fix bug #66777.
12707
12708 2005-08-24  Marek Safar  <marek.safar@seznam.cz>
12709
12710         * attribute.cs (GetMethodObsoleteAttribute): Disabled obsolete properties
12711         detection until I fix it.
12712         
12713         * cs-tokenizer.cs: Changed error message.
12714         
12715         * cs-parser.jay: Fixed 2 error locations.
12716         
12717         * ecore.cs (Error_TypeDoesNotContainDefinition): Share error message.
12718         (PropertyExpr.Error_PropertyNotFound): First attempt to detect non C#
12719         properties.
12720         
12721         * enum.cs (GetSignatureForError): Fixed.
12722         
12723         * expression.cs (Invocation.IsSpecialMethodInvocation): Improved special
12724         method detection.
12725         
12726         * class.cs,
12727         * typemanager.cs (RegisterProperty): Removed.
12728         
12729         * statement.cs (CheckInvariantMeaningInBlock): Changed error message.
12730
12731 2005-08-24  Raja R Harinath  <rharinath@novell.com>
12732
12733         Fix #75874.
12734         * expression.cs (ArrayAccess.EmitLoadOpcode): Emit ldelem.i for pointers.
12735         (ArrayAccess.GetStoreOpcode): Return stelem.i for pointers.
12736
12737 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12738
12739         * expression.cs : tiny fix is required for not warning positive ulong.
12740           See test-441.cs.
12741
12742 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12743
12744         * expression.cs : add CS0652 check for constant and integral
12745           expression. Fixed bug #53974.
12746
12747 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12748
12749         * expression.cs : in DoNumericPromotions(), check if there is implicit
12750           conversion overload for string (to check CS0034). Fixed bug #52492.
12751
12752 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12753
12754         * cs-tokenizer.cs : Check newline in char constant. Fixed bug #75245.
12755
12756 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12757
12758         * ecore.cs : report location when it is *not* Null.
12759
12760 2005-08-23  Atsushi Enomoto  <atsushi@ximian.com>
12761
12762         * codegen.cs,
12763           ecore.cs,
12764           flowanalysis.cs,
12765           expression.cs:
12766           Added OmitStructFlowAnalysis to EmitContext to handle CS0165 check
12767           correctly. Fixed bug #75721.
12768
12769 2005-08-23  Raja R Harinath  <rharinath@novell.com>
12770
12771         * support.cs (SeekableStreamReader.Position): Avoid an expensive
12772         loop that performs 'min (pos, char_count)'.
12773
12774         Fix #75862.
12775         * expression.cs (Unary.ResolveOperator): Don't discard implicit
12776         converted value in Operator.OnesComplement.
12777
12778 2005-08-22  Ben Maurer  <bmaurer@ximian.com>
12779
12780         * anonymous.cs: If the anon method is pulled into a helper class,
12781         it needs to be `internal' not `private'. Fixes runtime behavior on
12782         msft. bug #75704
12783
12784 2005-08-20  Martin Baulig  <martin@ximian.com>
12785
12786         * anonymous.cs (CaptureContext.CaptureThis): Create the topmost
12787         scope if we don't already have it.
12788
12789         * expression.cs (Invocation.EmitCall): Use `ec.EmitThis ()' rather
12790         than `ig.Emit (OpCodes.Ldarg_0)' to make it work inside iterators;
12791         fixes #75867.
12792
12793 2005-08-17  Marek Safar  <marek.safar@seznam.cz>
12794
12795         Fix #75803
12796         * decl.cs (DeclSpace.VerifyClsCompliance): Skip when collision object
12797         is a partial class.
12798
12799 2005-08-16  Marek Safar  <marek.safar@seznam.cz>
12800
12801         The big constants rewrite
12802         Fix #75746, #75685 and more
12803         As a side effect saved 1MB for MWF ;-)
12804         
12805         * attribute.cs (GetAttributeArgumentExpression): Use ToType, GetTypedValue.
12806         (GetMarshal, GetMethodImplOptions, GetLayoutKindValue): Values are not
12807         enum based for corlib compilation.
12808         
12809         * cfold.cs (BinaryFold): Convert operand for enum additions. Fixed enum
12810         subtractions.
12811         
12812         * class.cs (FixedField.Define): Use ResolveAsConstant.
12813         
12814         * const.cs (IConstant): Interface constants and enums.
12815         (Const.ResolveValue): New method for constant resolvning.
12816         (ExternalConstant): Constants from imported assemblies.
12817         
12818         * constant.cs (Constant.GetTypedValue): Used to get constant with forced
12819         conversion; like enums.
12820         (Constant.ToType): Converts this constant to different type.
12821         (Constant.Increment): Adds 1.
12822         
12823         * convert.cs (ImplicitConversionRequired): Simplified.
12824         
12825         * cs-parser.jay: Create EnumMember directly.
12826         
12827         * decl.cs (MemberCore.CheckObsoleteness): Checks for ObsoleteAttribute presence.
12828         
12829         * doc.cs (GenerateEnumDocComment): Removed.
12830         
12831         * ecore.cs (Expression.ResolveAsConstant): New constant specific method.
12832         (ConvertIntLiteral): Removed.
12833         (FieldExpr.ResolveMemberAccess): Refactored to remove constant specific if(s).
12834         
12835         * enum.cs (EnumMember): Implement IConstant.
12836         (Enum.IsValidEnumConstant): Removed.
12837         (Enum.GetNextDefaultValue): Removed.
12838         (Enum.FindMembers): Updated.
12839         (Enum.GenerateDocComment): Iterate enum members.
12840         
12841         * expression.cs (Cast.TryReduce): Handle enums correctly.
12842         (New.Constantify): Made public.
12843         (MemberAccess.DoResolve): Removed contant specific if(s).
12844         
12845         * literal.cs (NullLiteral): Implement new abstract methods.
12846         
12847         * statement.cs (GotoCase.Resolve): Use new constant methods.
12848         (SwitchLabel.ResolveAndReduce): Use new constant methods.
12849         
12850         * typemanager.cs (LookupEnum): Removed.
12851         (IsEnumType): Fixed to work with corlib.
12852         (RegisterConstant): Removed.
12853         (LookupConstant): Removed.
12854         (GetConstant): Changed to work with IConstant.
12855
12856 2005-08-04  Atsushi Enomoto  <atsushi@ximian.com>
12857
12858         * location.cs : Fixed overflown (>255) column number.
12859
12860 2005-08-03  Raja R Harinath  <rharinath@novell.com>
12861
12862         First cut of the qualified-alias-member feature.
12863         * cs-tokenizer.cs (Tokenizer.is_punct): Recognize the double-colon
12864         token.
12865         * cs-parser.jay (DOUBLE_COLON): New token.
12866         (namespace_or_type_name): Add rule for recognizing
12867         qualified-alias-members.
12868         (primary_expression): Likewise.
12869         (element_access): Allow QualifiedAliasMember as a possible
12870         type-bearing expression.
12871         (local_variable_type, local_variable_pointer_type): Likewise.
12872         * namespace.cs (NamespaceEntry.LookupAlias): New.  Looks up
12873         aliases in the current and enclosing namespace declarations.
12874         (NamespaceEntry.UsingAlias): Add CS0440 warning.
12875         * decl.cs (MemberName.is_double_colon): New.
12876         (MemberName.MemberName): Add new constructor for alias-member.
12877         (MemberName.GetTypeExpression): Generate QualifiedAliasMember too.
12878         * expression.cs (QualifiedAliasMember): New expression type.
12879
12880 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12881
12882         * location.cs : it borked when no argument was specified.
12883
12884 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12885
12886         * location.cs : tiny ToString() format fix.
12887
12888 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12889
12890         * statement.cs : oops, it was missing.
12891
12892 2005-08-02  Atsushi Enomoto  <atsushi@ximian.com>
12893
12894         A set of fixes for precise line/column location.
12895
12896         * location.cs :
12897           "token" field now holds a file/line "delta", a line number offset 
12898           from the segment, and a column number. See also:
12899           http://lists.ximian.com/pipermail/mono-devel-list/2004-
12900           December/009508.html
12901           Removed static IsNull. Use instance IsNull property instead.
12902         * cs-tokenizer.cs :
12903           For some tokens it stores Location. For Identifier it stores
12904           LocatedToken which is a pair of string name and location.
12905           Column numbers are adjusted only at getChar().
12906         * report.cs :
12907           Use Location.ToString() for reporting (it now contains column).
12908         * cs-parser.jay :
12909           Largely modified to use LocatedToken instead of
12910           string (IDENTIFIER), and to acquire Location from some tokens.
12911         * namespace.cs, decl.cs, ecore.cs, class.cs, delegate.cs,
12912           iterators.cs, const.cs, anonymous.cs, tree.cs, enum.cs,
12913           codegen.cs :
12914           Now MemberName holds Location. DeclSpace.ctor() receives Location
12915           as a parameter. Removed extra parameters to all derived classes.
12916           Replaced Location.IsNull() with instance property.
12917         * assign.cs, expression.cs :
12918           Added .ctor() overload that omits Location.
12919         * attribute.cs :
12920           Added "nameEscaped" flag that indicates the identifier was escaped
12921           in the source file. This fixes bug #57047.
12922
12923 2005-08-02  Marek Safar  <marek.safar@seznam.cz>
12924
12925         * attribute.cs (AttributeTester.GetImportedIgnoreCaseClsType):
12926         New method, looking for lo-case imported cls type.
12927
12928         * decl.cs (DeclSpace.VerifyClsCompliance): Check CS3005 for types
12929         here.
12930
12931         * driver.cs: Removed VerifyTopLevelNameClsCompliance usage.
12932
12933         * enum (Enum.VerifyClsCompliance): Hardcode non-compliant types.
12934
12935         * typemanager.cs (TypeManager.AllClsTopLevelTypes): Renamed from
12936         all_imported_types.
12937         (TypeManager.LoadAllImportedTypes): Lo-case imported types.
12938
12939         Optimized to save 3.5 MB for SWF compilation.
12940
12941 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12942
12943         * class.cs (AddToTypeContainer): Use inheritance insted of if(s).
12944         (PartialContainer.Create): Moved logic AddToContainer.
12945         (PartialContainer.MarkForDuplicationCheck): Shares name.
12946         
12947         * decl.cs (DeclSpace.AddToContainer): Check name collisions at one
12948         place.
12949         
12950         * namespace.cs (Namespace.AddDeclSpace): Lazy declspaces
12951         initialization.
12952         (Namespace.GetSignatureForError): New method.
12953         
12954         * tree.cs (Tree.RecordDecl): Moved to AddToContainer.
12955         (RootTypes.AddToTypeContainer): se inheritance insted of if(s).
12956
12957 2005-08-01  Raja R Harinath  <rharinath@novell.com>
12958
12959         Fix #75669.
12960         * ecore.cs (Expression.MemberLookupFailed): Use queried_type for
12961         member lookup rather than qualifier_type, since qualifier_type can
12962         be null.
12963
12964 2005-08-01  Marek Safar  <marek.safar@seznam.cz>
12965
12966         * enum.cs (Enum.VerifyClsName): Fixed to allow not CLSCompliant
12967         enum member.
12968
12969 2005-07-31  Miguel de Icaza  <miguel@novell.com>
12970
12971         * statement.cs: Copy the local exception into the exception
12972         captured local.  Fixes 75674
12973
12974 2005-07-31  Raja R Harinath  <harinath@gmail.com>
12975
12976         Fix #75658.
12977         * expression.cs (Invocation.OverloadResolve): Don't report error
12978         CS1501 if error CS1502 has been reported.
12979         (New.DoResolve): Delegate CS1501 reporting to
12980         Invocation.OverloadResolve.
12981
12982         Fix #75656.
12983         * statement.cs (Block.CheckInvariantMeaningInBlock): Verify
12984         invariant-meaning-in-block property in an enclosing block if
12985         necessary.
12986
12987 2005-07-29  Marek Safar  <marek.safar@seznam.cz>
12988
12989         * statement.cs (SwitchLabel.ResolveAndReduce): Refactored.
12990         (SwitchLabel.Erorr_AlreadyOccurs): Share error message.
12991         (Switch.CheckSwitch): Just save 50kb for SWF.
12992
12993 2005-07-27  Martin Baulig  <martin@ximian.com>
12994
12995         * anonymous.cs (CaptureContext.AddField): Added
12996         `AnonymousContainer am' argument; compute its toplevel scope if
12997         it's not already computed.  Fixes #75649.
12998
12999 2005-07-26  Raja R Harinath  <rharinath@novell.com>
13000
13001         Fix #75628.
13002         * class.cs (Constructor.Emit): Reset block to null if the block
13003         resolve fails.
13004
13005 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13006
13007         * class.cs (TypeContainer.VerifyMembers): Be compatible in warning 169.
13008
13009 2005-07-25  Marek Safar  <marek.safar@seznam.cz>
13010
13011         * class.cs (MethodData.Define): Check whether accessor implementing
13012         interface is public.
13013
13014         * driver.cs (Driver.parse): Try to be smart and check for `MZ' header.
13015
13016 2005-07-22  Marek Safar  <marek.safar@seznam.cz>
13017
13018         Fix #57245
13019         * namespace.cs (LookupType): Moved same type check to...
13020         
13021         * typemanager.cs (LookupTypeReflection): Don't allow to import more types
13022         with the same name.
13023
13024 2005-07-21  Raja R Harinath  <rharinath@novell.com>
13025
13026         * namespace.cs (NamespaceLookupType): Avoid a string allocation when we
13027         already found a typebuilder.
13028         * class.cs (MethodCore.IsDuplicateImplementation): Compare
13029         MemberNames, not strings.
13030
13031         * const.cs (Error_ExpressionMustBeConst): 
13032         Rename from Error_EpressionMustBeConst.
13033         * const.cs, class.cs, statement.cd: Update.
13034
13035 2005-07-21  Marek Safar  <marek.safar@seznam.cz>
13036
13037         Fix #65573
13038
13039         * const.cs (Const.LookupConstantValue): Report missing contant expression
13040         everytime.
13041         (Error_EpressionMustBeConstant): Only one error method.
13042
13043         * class.cs, statement.c: Updated.
13044
13045 2005-07-20  Raja R Harinath  <rharinath@novell.com>
13046
13047         * statement.cs (Block.Flags): Add back HasVarargs.
13048         (Block.flags): Make protected.
13049         (ToplevelBlock.HasVarargs): Convert to a property that updates flags.
13050
13051         * typemanager.cs (types, typecontainers, user_types): Remove.
13052         (UserTypes, TypeContainers): Likewise.
13053         (HandleDuplicate, AddDelegateType, AddEnumType): Likewise.
13054         (CleanUp, Reset): Update.
13055         (AddUserType): Combine variants.  Now, only updates builder_to_declspace.
13056         (GetNestedType): Use Type.GetNestedType.
13057         (CoreLookupType): Take two arguments, the namespace and the
13058         basename of the type.  Update to use the Namespace.Lookup
13059         mechanism.
13060         (InitEnumUnderlyingTypes, InitCoreTypes): Update.
13061         (RealMemberLookup): Use IsNestedChildOf instead of playing with
13062         string concatenation and substring matches.
13063         * class.cs, enum.cs, delegate.cs: Update to changes.
13064
13065 2005-07-20  Marek Safar  <marek.safar@seznam.cz>
13066
13067         * constant.cs (Constant.Error_ConstantValueCannotBeConverted): Moved from
13068         Expression and made virtual.
13069
13070         * convert.cs (ImplicitReferenceConversionExists): Skip for value types.
13071         (ImplicitStandardConversionExists): Fixed `byte' typo ?
13072
13073         * ecore.cs (Expression.Error_ConstantValueCannotBeConverted): Moved.
13074
13075         * literal.cs (NullLiteral.Error_ConstantValueCannotBeConverted): Customize
13076         error message.
13077
13078         * convert.cs, ecore.cs, enum.cs: Reflect Error_ConstantValueCannotBeConverted
13079         change.
13080
13081 2005-07-18  Marek Safar  <marek.safar@seznam.cz>
13082
13083         Fix #57707
13084         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Check whether
13085         AssemblyCultureAttribute is not used on executable.
13086
13087         * rootcontext.cs,
13088         * typemanager.cs: Add System.Reflection.AssemblyCultureAttribute.
13089
13090 2005-07-16  Raja R Harinath  <rharinath@novell.com>
13091
13092         Fix #60638.
13093         * expression.cs (Binary.Warning_UnintendeReferenceComparison):
13094         New.  Reports CS0252/CS0253.
13095         Mostly taken from preliminary patch by Duncak Mak.
13096         (Binary.DoResolveOperator): Store results of operator lookup.
13097         Use them to detect if we need to warn about unintended reference
13098         comparisons.
13099
13100 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13101
13102         Fix #72969.
13103         * namespace.cs (Namespace.Lookup): Add back location parameter.
13104         (Namespace.LookupType): Add CS0436 report.  Add location parameter.
13105         * delegate.cs, ecore.cs, expression.cs: Update to changes.
13106
13107         * codegen.cs (EmitContext.DeclSpace): Make readonly.
13108         * namespace.cs (Namespace.Lookup): Carve out type lookup into ...
13109         (Namespace.LookupType): ... this.
13110         (NamespaceEntry.GetUsingTable): Allocate only one zero-sized array
13111         of namespaces.
13112         * typemanager.cs (LookupTypeReflection): Remove buggy code that
13113         purported to handle pointers.
13114         (char_ptr_type, void_ptr_type): Use GetPointerType rather than
13115         CoreLookupType.
13116
13117 2005-07-15  Marek Safar  <marek.safar@seznam.cz>
13118
13119         * expression.cs (MemberAccess.ResolveNamespaceOrType): Don't report nested
13120         type as namespace.
13121
13122 2005-07-15  Raja R Harinath  <rharinath@novell.com>
13123
13124         * namespace.cs (Namespace.Lookup): Drop location parameter.
13125         (NamespaceEntry.LookupAlias): Remove.  Merge into ...
13126         (NamespaceEntry.Lookup): ... this.
13127         (NamespaceEntry.Error_AmbiguousTypeReference):
13128         Move here from DeclSpace.
13129         (NamespaceEntry.LookupNamespaceOrType): Move support for dotted
13130         names ...
13131         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): ... here.
13132         * decl.cs (DeclSpace.ErrorAmbiguousTypeReference):
13133         Move to NamespaceEntry.
13134         * delegate.cs, expression.cs: Update to changes.
13135
13136 2005-07-14  Marek Safar  <marek.safar@seznam.cz>
13137
13138         * attribute.cs (Attribute.ResolveAttributeType): Renamed from
13139         CheckAttributeType and refactored.
13140         (Attribute.ResolvePossibleAttributeType): Changed to reuse
13141         ResolveAsTypeTerminal error handling.
13142         (ResolveAsTypeTerminal): Introduced because of global attributes extra
13143         handling.
13144         (GetSignatureForError): Print errors in same way.
13145
13146         * class.cs,
13147         * codegen.cs: Reflect attribute GetSignatureForError change.
13148
13149         * ecore.cs,
13150         * expression.cs: Add silent parameter to ResolveAsTypeStep.
13151
13152         * namespace.cs (UsingEntry): Refactored to make fields private.
13153
13154         * assign.cs,
13155         statement.cs: Error_UnexpectedKind has extra parameter.
13156
13157 2005-07-14  Raja R Harinath  <rharinath@novell.com>
13158
13159         * ecore.cs (IAlias): Remove.
13160         * decl.cs (DeclSpace): Don't derive from IAlias.  Remove members
13161         that implement the interface.
13162         * namespace.cs (Namespace): Likewise.
13163         (Namespace.declspaces): Renamed from 'defined_names'.
13164         (Namespace.AddDeclSpace): Renamed from 'DefineName'.  Take a
13165         DeclSpace instead of an IAlias.
13166         * tree.cs (Tree.AddDecl): Update.
13167
13168 2005-07-12  Raja R Harinath  <rharinath@novell.com>
13169
13170         * statement.cs (Block.Flags); Remove HasVarargs.
13171         (Block.HasVarargs): Move to ToplevelBlock.
13172         (Block.ThisVariable, Block.AddThisVariable): Likewise.
13173         (Block.Variables): Make protected.  Initialize variable hashtable
13174         if necessary.
13175         (Block.AddVariable): Update.
13176         (Block.Resolve): Update to changes.
13177         (ToplevelBlock.HasVarargs): New boolean.
13178         (ToplevelBlock.ThisVariable): Move here from Block.
13179         (ToplevelBlock.AddThisVariable): Likewise.
13180         (ToplevelBlock.IsThisAssigned): New.  Forwards call to this_variable.
13181         * expression.cs (This.ResolveBase): Update to changes.
13182         (ArglistAccess.DoResolve): Likewise.
13183
13184 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13185
13186         Fix #75321
13187         * ecore.cs, class.cs: Use SetAssigned instead of direct access.
13188
13189         * class.cs (TypeContainer.VerifyMembers): Distinguish between
13190         not used and not used & assigned.
13191         (FieldBase.ASSIGNED): Moved to MemberCore.Flags.
13192
13193 2005-07-11  Marek Safar  <marek.safar@seznam.cz>
13194
13195         Fix #75053
13196         * expression.cs (Is.DoResolve): null is never provided type.
13197
13198 2005-07-08  Marek Safar  <marek.safar@seznam.cz>
13199
13200         Fix #52496
13201         * cs-parser.jay: Less strict event error rule to catch more errors.
13202
13203 2005-07-08  Martin Baulig  <martin@ximian.com>
13204
13205         Fix test-iter-10.cs - distinguish whether we `yield' in a property
13206         gettter (allowed) or setter (not allowed).
13207
13208         * class.cs (Accessor): Implement IIteratorContainer.
13209         (Accessor.Yields): New public field.
13210         (PropertyBase.PropertyMethod.Define): Handle iterators on a
13211         per-accessor basis.
13212
13213         * cs-parser.jay
13214         (get_accessor_declaration, set_accessor_declaration): Set the
13215         `yields' flag on the accessor, not the property.
13216         (property_declaration): Do the iterators check on a per-accessor
13217         basis and not for the whole property.
13218
13219 2005-07-08  Martin Baulig  <martin@ximian.com>
13220
13221         * anonymous.cs (CaptureContext.EmitParameterInstance): Correctly
13222         handle parameters in nested scopes; fixes #74808; see gtest-188.cs.
13223
13224 2005-07-07  Marek Safar  <marek.safar@seznam.cz>
13225
13226         Fix #74975
13227         * attribute.cs (orig_sec_assembly): Holds original version of assembly.
13228         (ExtractSecurityPermissionSet): Cope with self referencing security
13229         attributes properly.
13230
13231         * driver.cs (SetOutputFile): Made public property OutputFile.
13232
13233 2005-07-07  Raja R Harinath  <rharinath@novell.com>
13234
13235         Fix #75486.
13236         * class.cs (TypeContainer.first_nonstatic_field): Rename from
13237         has_nonstatic_fields.  Make into a FieldBase pointer.
13238         (TypeContainer.AddField): Add CS0282 check.
13239         (TypeContainer.EmitType): Update.
13240
13241 2005-07-06  Miguel de Icaza  <miguel@novell.com>
13242
13243         * cs-tokenizer.cs (consume_identifier): Do not create strings to
13244         compare if they start with __.
13245
13246 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13247
13248         * statement.cs (Switch.SwitchGoverningType): Only look at
13249         UserCasts that don't need implicit standard conversions to one of
13250         the allowed switch types (Fixes test-322.cs).
13251         (LocalInfo.Resolve): Re-enable sanity-test.
13252
13253 2005-07-06  Marek Safar  <marek.safar@seznam.cz>
13254
13255         * cs-tokenizer.cs (consume_identifier): Detect double undescores
13256         
13257         * ecore.cs (FieldExpr.AddressOf): Changed volatile error to warning.
13258         
13259         * expression.cs (Invocation.DoResolve): Report error CS0245 here.
13260
13261 2005-07-06  Raja R Harinath  <rharinath@novell.com>
13262
13263         Fix #75472.
13264         * ecore.cs (SimpleName.GetSignatureForError): Add.
13265         * expression.cs (MemberAccess.DoResolve): Don't clobber 'expr' field.
13266         (MemberAccess.GetSignatureForError): Add.
13267
13268 2005-07-05  Marek Safar  <marek.safar@seznam.cz>
13269  
13270         The big error and warning messages review.
13271         
13272         * anonymous.cs,
13273         * assign.cs,
13274         * attribute.cs,
13275         * class.cs,
13276         * codegen.cs,
13277         * convert.cs,
13278         * cs-parser.jay,
13279         * cs-tokenizer.cs,
13280         * decl.cs,
13281         * delegate.cs,
13282         * doc.cs,
13283         * driver.cs,
13284         * ecore.cs,
13285         * enum.cs,
13286         * expression.cs,
13287         * flowanalysis.cs,
13288         * iterators.cs,
13289         * literal.cs,
13290         * location.cs,
13291         * modifiers.cs,
13292         * namespace.cs,
13293         * parameter.cs,
13294         * pending.cs,
13295         * report.cs,
13296         * rootcontext.cs,
13297         * statement.cs,
13298         * support.cs,
13299         * tree.cs,
13300         * typemanager.cs: Updated.
13301         
13302         * class.cs: (MethodCore.SetYields): Moved here to share.
13303         (PropertyMethod.Define): Moved iterator setup here.
13304         
13305         * iterators.cs: Add orig_method to have full access to parent
13306         container.
13307
13308 2005-07-05  Raja R Harinath  <rharinath@novell.com>
13309
13310         Make 'fixed variable' handling standards compliant. Fix #70807, #72729.
13311         * ecore.cs (IVariable.VerifyFixed): Remove 'is_expression' parameter.
13312         (FieldExpr.VerifyFixed): Ensure that the field is part of a fixed
13313         variable of struct type.
13314         * expression.cs (Unary.ResolveOperator): Update to change.
13315         (Indirection.VerifyFixed): Likewise.
13316         (LocalVariableReference.VerifyFixed): A local variable is always fixed.
13317         (ParameterReference.VerifyFixed): Value parameters are fixed.
13318         (This.VerifyFixed): Treat 'this' as a value parameter.
13319         * statement.cs (LocalInfo.IsFixed): Remove.
13320
13321 2005-07-01  Martin Baulig  <martin@ximian.com>
13322
13323         * iterators.cs (Iterator.CapturedThisReference.Emit): Use
13324         `ec.EmitThis ()' to get the correct scope.
13325
13326 2005-07-01  Martin Baulig  <martin@ximian.com>
13327
13328         * ecore.cs (FieldExpr.DoResolve): Don't capture the field if it's
13329         instance is a ParameterReference; fixes #75299.
13330
13331 2005-07-01  Martin Baulig  <martin@ximian.com>
13332
13333         Reverted Marek's latest patch (r46725):
13334         - it contains structural changes which are neither mentioned in
13335           the ChangeLog nor explained anywhere; for example the additional
13336           argument of EmitContext's and Iterator's .ctor's and the
13337           TypeContainer.DefineMembers() change.
13338         - structural changes like this should go in in seperate patches
13339           and not be hidden in a huge patch which just seems to affect
13340           warnings and errors.
13341           a big and hard to understand patch.
13342         - it breaks iterators and causes regressions, for instance in
13343           test-iter-03.cs.      
13344
13345 2005-06-30  Raja R Harinath  <rharinath@novell.com>
13346
13347         Fix #75412.
13348         * expression.cs (Indexers.map): Remove.
13349         (Indexers.Append): Filter out inaccessible setters and getters.
13350         (IndexerAccess.DoResolve, IndexerAccess.DoResolveLValue): Update.
13351
13352         Fix #75283.
13353         * ecore.cs (MemberExpr.EmitInstance): New.  Add CS0120 check.
13354         Refactored from ...
13355         (FieldExpr.EmitInstance, PropertyExpr.EmitInstance): ... these.
13356         (FieldExpr.Emit, PropertyExpr.Emit): Update.
13357         (FieldExpr.EmitAssign, PropertyExpr.EmitAssign): Update.
13358         * expression.cs (Invocation.EmitCall): Add CS0120 check.
13359
13360 2005-06-30  Marek Safar  <marek.safar@seznam.cz>
13361
13362         Fix #75322
13363         * class.cs (FieldBase.GetInitializerExpression): One more field
13364         for backup.
13365
13366 2005-06-28  Miguel de Icaza  <miguel@novell.com>
13367
13368         * pending.cs: Do not define a proxy if the base method is virtual,
13369         it will be picked up by the runtime (bug 75270).
13370
13371 2005-06-08  Martin Baulig  <martin@ximian.com>
13372
13373         The big Iterators rewrite :-)
13374
13375         * iterators.cs: Rewrite this to use the anonymous methods framework.
13376
13377         * rootcontext.cs (RootContext.DefineTypes): Define Delegates
13378         before the TypeContainers; see 2test-21.cs.
13379
13380         * class.cs
13381         (TypeContainer.DefineType): Don't create a new EmitContext if we
13382         already have one (this only happens if we're an Iterator).
13383         (TypeContainer.Define): Also call Define() on all our iterators.
13384         (Method.CreateEmitContext): Added support for iterators.
13385
13386         * anonymous.cs
13387         (AnonymousContainer): New abstract base class for `AnonymousMethod'.
13388         (AnonymousContainer.CreateMethodHost): Moved here from
13389         AnonymousMethod and made abstract.
13390         (AnonymousContainer.CreateScopeType): New abstract method.
13391         (AnonymousContainer.IsIterator): New public property.
13392         (ScopeInfo.EmitScopeType): Call CreateScopeType() on our Host to
13393         get the ScopeTypeBuilder rather than manually defining it here. 
13394         (ScopeInfo.EmitScopeInstance): New public method; correctly handle
13395         iterators here.
13396
13397         * driver.cs (Driver.MainDriver): Call TypeManager.InitCodeHelpers()
13398         before RootContext.DefineTypes().
13399
13400         * codegen.cs (EmitContext.RemapToProxy): Removed.
13401         (EmitContext.CurrentAnonymousMethod): Changed type from
13402         AnonymousMethod -> AnonymousContainer.
13403         (EmitContext.ResolveTopBlock): Protect from being called twice.
13404         (EmitContext.MapVariable, RemapParameter(LValue)): Removed.
13405         (EmitContext.EmitThis): Removed the iterators hacks; use the
13406         anonymous methods framework for that.
13407
13408         * statement.cs
13409         (ToplevelBlock.Container): Make this a property, not a field.
13410         (ToplevelBlock.ReParent): New public method; move the
13411         ToplevelBlock into a new container.
13412         (Foreach.TemporaryVariable): Simplify.
13413
13414 2005-06-05  Martin Baulig  <martin@ximian.com>
13415
13416         * statement.cs (LocalInfo.CompilerGenerated): New flag.
13417         (Block.AddTemporaryVariable): New public method; creates a new
13418         `LocalInfo' for a temporary variable.
13419         (Block.EmitMeta): Create the LocalBuilders for all the temporary
13420         variables here.
13421         (Foreach.TemporaryVariable): Use Block.AddTemporaryVariable() for
13422         non-iterator variables.
13423
13424 2005-06-05  Martin Baulig  <martin@ximian.com>
13425
13426         * statement.cs (Foreach.TemporaryVariable): Create the
13427         LocalBuilder in the Emit phase and not in Resolve since in some
13428         situations, we don't have an ILGenerator during Resolve; see
13429         2test-19.cs for an example.
13430
13431 2005-06-04  Martin Baulig  <martin@ximian.com>
13432
13433         **** Merged r45395 from GCS ****
13434
13435         The big Foreach rewrite - Part II.
13436
13437         * typemanager.cs (TypeManager.object_getcurrent_void): Replaced
13438         with `PropertyInfo ienumerator_getcurrent'.
13439
13440         * codegen.cs (VariableStorage): Removed.
13441
13442         * statement.cs
13443         (Foreach): Derive from Statement, not ExceptionStatement.
13444         (Foreach.CollectionForeach): New nested class.  Moved all the code
13445         dealing with collection foreach here.
13446         (Foreach.ForeachHelperMethods): Removed.
13447         (Foreach.TemporaryVariable): Implement IMemoryLocation.
13448
13449 2005-05-23  Martin Baulig  <martin@ximian.com>
13450
13451         * statement.cs (Try.DoResolve): Don't create a `finally' if we
13452         don't need to.  Fix #75014.
13453
13454 2005-05-20  Martin Baulig  <martin@ximian.com>
13455
13456         Merged r44808 from GMCS.
13457
13458         * class.cs (TypeContainer.CircularDepException): Removed.
13459         (TypeContainer.DefineType): Removed the `InTransit' stuff.
13460         (TypeContainer.CheckRecursiveDefinition): Check for circular class
13461         (CS0146) and interface (CS0529) dependencies here.
13462
13463 2005-06-21  Raja R Harinath  <rharinath@novell.com>
13464
13465         * expression.cs (Invocation.EmitCall): Fix initialization
13466         'this_call' to reflect current behaviour.  Fix indentation.
13467
13468         * convert.cs (FindMostEncompassedType): Add two trivial special
13469         cases (number_of_types == 0 || number_of_types == 1).
13470         (FindMostEncompasingType): Likewise.
13471
13472 2005-06-17  Raja R Harinath  <rharinath@novell.com>
13473
13474         Some cleanups preparing for the fix of #75283.
13475         * ecore.cs (PropertyExpr.InstanceResolve): Tighten conditions for
13476         error testing.
13477         (EventExpr.InstanceResolve): Likewise.
13478         (EventExpr.DoResolve): Remove redundant checks.
13479
13480 2005-06-10  Duncan Mak  <duncan@novell.com>
13481
13482         * cs-tokenizer.cs (process_directives): New flag for controlling
13483         the processing of preprocessor directives.
13484         (x_token): After seeing a '#', return Token.NONE instead of going
13485         to handle_preprocessing_directive() when not processing
13486         directives. This avoids unnecessary processing during the token peek in
13487         is_punct().
13488
13489         This fixes #74939.
13490
13491         * cs-tokenizer.cs (handle_preprocessing_directive, xtoken): Use
13492         the existing error reporting methods instead of Report.Error.
13493
13494         * convert.cs (priv_fmt_expr): Remove. It's not needed anymore
13495         after Raja's rewrite.
13496
13497 2005-06-08  Miguel de Icaza  <miguel@novell.com>
13498
13499         * class.cs: Small fix.
13500
13501 2005-06-08  Raja R Harinath  <rharinath@novell.com>
13502
13503         Fix #75160.
13504         * class.cs (GetPartialBases): Fix return value check of
13505         part.GetClassBases.
13506
13507 2005-06-07  Raja R Harinath  <rharinath@novell.com>
13508
13509         Ensure that partial classes are registered in their enclosing
13510         namespace.  Initial part of fix of #75160.
13511         * tree.cs (Tree.RecordDecl): Add new namespace argument.
13512         Register declspace with namespace here, not in
13513         DeclSpace.RecordDecl.
13514         * cs-parser.jay: Pass namespace to RecordDecl.
13515         * class.cs (PartialContainer.Create): Likewise.
13516         (ClassPart.DefineType): New sanity-check.  Throws an exception if
13517         called.
13518         * decl.cs (Declspace.RecordDecl): Remove.
13519         * namespace.cs (NamespaceEntry.DefineName): Remove.
13520
13521 2005-06-06  Marek Safar  <marek.safar@seznam.cz>
13522
13523         * rootcontext.cs: Reset TargetExt as well.
13524
13525 2005-06-03  Raja R Harinath  <rharinath@novell.com>
13526
13527         * ecore.cs (Expression.Resolve): Emit CS0654 error when
13528         -langversion:ISO-1.
13529
13530 2005-06-02  Raja R Harinath  <rharinath@novell.com>
13531
13532         Fix #75080, cs0119.cs.
13533         * ecore.cs (Expression.ExprClassToResolveFlags): New.  Broken out
13534         of ...
13535         (Expression.Resolve): ... this.  Use it.  Remove bogus code
13536         allowing ExprClass.Type and ExprClass.Namespace for
13537         ResolveFlags.VariableOrValue.
13538         (Expression.Resolve) [1-argument variant]: Change default resolve
13539         flags based on language version.
13540         (Expression.Error_UnexpectedKind): Use a simple string array
13541         rather than an ArrayList.
13542         * expression.cs (TypeOf.DoResolve): Set eclass to ExprClass.Value,
13543         not ExprClass.Type.
13544         (TypeOfVoid.DoResolve): Likewise.
13545         (MemberAccess.DoResolve) [3-argument variant]: Make private.  Drop
13546         flags argument -- it always has the same value.
13547
13548 2005-05-31  Raja R Harinath  <rharinath@novell.com>
13549
13550         Fix #75081.
13551         * ecore.cs (Expression.ResolveLValue): Add a Location parameter.
13552         Use it in the error message.
13553         * assign.cs, expression.cs, statement.cs: Update.
13554
13555 2005-05-30  Raja R Harinath  <rharinath@novell.com>
13556
13557         Fix #75088.
13558         * ecore.cs (Expression.MemberLookupFailed): Add CS0122 check in
13559         the "almostMatchedMember" case too.
13560         * typemanager.cs (Closure.CheckValidFamilyAccess): Add anything
13561         that failed the accessibility checks to 'almost_match'.
13562
13563 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
13564
13565         * attribute.cs: Use internal MethodBuilder methods to set
13566         ExactSpelling and SetLastError on PInvoke methods, instead
13567         of passing them via charset.  Fixes #75060.
13568
13569 2005-05-27  Raja R Harinath  <rharinath@novell.com>
13570
13571         * parameter.cs (Parameter): Remove TODO comment.
13572         (Parameter.DefineParameter): Remove Location parameter.
13573         (Parameters.LabelParameters): Likewise.
13574         * class.cs (Constructor.Emit): Update to change.
13575         (MethodData.Emit): Likewise.
13576         * anonymous.cs (AnonymousMethod.EmitMethod): Likewise.  
13577         * delegate.cs (Delegate.Define, Delegate.Emit): Likewise.
13578
13579 2005-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13580
13581         * parameter.cs,
13582           Removed Parameters.Location and added Parameter.Location instead.
13583           Removed Location parameter from Emit() and GetSignature().
13584         * anonymous.cs,
13585           class.cs,
13586           cs-parser.jay,
13587           delegate.cs,
13588           iterators.cs,
13589           statement.cs :
13590           Modified all related calls.
13591
13592 2005-05-26  Raja R Harinath  <rharinath@novell.com>
13593
13594         Improve user-defined conversion handling.
13595         * convert.cs (GetConversionOperators): Rewrite.  Return only the
13596         applicable operators.
13597         (AddConversionOperators): New.  Helper for GetConversionOperators.
13598         (FindMostEncompassedType, FindMostEncompassingType): Verify that
13599         there is only one most encompassed/encompassing type.
13600         (FindMostSpecificSource, FindMostSpecificTarget): Remove
13601         "applicable operator" handling.
13602         (UserConversion): Move cache here from GetConversionOperators.
13603         Directly cache the chosen operator, rather than the whole
13604         MethodGroup.
13605         (ExplicitNumericConversion): Fix buggy implementation of Decimal
13606         case.  Allow conversion of decimal to sbyte and byte too.
13607         * expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
13608         New static methods.  Used to avoid allocating EmptyExpressions in
13609         convert.cs.
13610
13611 2005-05-24  Duncan Mak  <duncan@novell.com>
13612
13613         * ecore.cs (CastFromDecimal): New class for casting a decimal to
13614         another class, used in Convert.ExplicitNumericConversion.
13615         (CastToDecimal): New class, similar to above, but casts to
13616         System.Decimal, used in Convert.ImplicitNumericConversion and also
13617         in explicit convesion from double/float to decimal.
13618
13619         * convert.cs (ImplicitNumericConversion): Handle implicit
13620         conversions to System.Decimal.
13621         (ExplicitNumericConversion): handle explicit conversions to
13622         System.Decimal.
13623
13624         This fixes #68711.
13625         
13626 2005-05-20  Miguel de Icaza  <miguel@novell.com>
13627
13628         * typemanager.cs (EnumToUnderlying): Do not throw if we do not
13629         know the type at this stage, just break through.   Fixes #75008 
13630
13631 2005-05-19  Martin Baulig  <martin@ximian.com>
13632
13633         * delegate.cs
13634         (ImplicitDelegateCreation.Check): Added `bool check_only' argument
13635         to disable error reporting.
13636
13637         * convert.cs (Convert.ImplicitStandardConversionExists): Use it
13638         here since we don't want to report an error; see the new test-336.cs.
13639
13640 2005-05-19  Raja R Harinath  <rharinath@novell.com>
13641
13642         * statement.cs (ToplevelBlock.GetParameterReference)
13643         (ToplevelBlock.IsParameterReference,ToplevelBlock.IsLocalParameter):
13644         Move here from class Block.
13645         * ecore.cs (SimpleName.SimpleNameResolve): Update to changes.
13646         * expression.cs (ParameterReference.DoResolveBase): Likewise.
13647
13648 2005-05-18  Martin Baulig  <martin@ximian.com>
13649
13650         Fix #74978.
13651
13652         * flowanalysis.cs
13653         (FlowBranching.Reachability): Add non-static public And() and Or()
13654         methods.
13655         (FlowBranchingSwitch): New class; do the `break_origins' thing
13656         like in FlowBranchingLoop.
13657         (FlowBranching.UsageVector.MergeBreakOrigins): Also merge the
13658         reachability, not just locals and parameters.
13659         (FlowBranching.MergeChild): Remove some of the hacks for loop and
13660         switch; MergeBreakOrigins() now takes care of that.
13661
13662 2005-05-18  Martin Baulig  <martin@ximian.com>
13663
13664         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
13665         a loop and may leave it, reset the barrier; fixes #74974.
13666
13667 2005-05-17  Marek Safar  <marek.safar@seznam.cz>
13668         
13669         * attribute.cs (Attribute.ResolveArguments): GuidAttribute check
13670         is back.
13671         
13672         * cs-parser.jay: Catch more lexical errors.
13673         
13674         * report.cs: Add one more Error method.
13675         
13676         * rootcontext.cs,
13677         * typemanager.cs: Register System.Runtime.InteropServices.GuidAttribute
13678
13679 2005-05-17  Martin Baulig  <martin@ximian.com>
13680
13681         * expression.cs (Argument.Resolve): Turn on flow analysis; fix
13682         #70970. 
13683
13684 2005-05-16  Raja R Harinath  <rharinath@novell.com>
13685
13686         Fix test-382.cs.  Emit values of decimal constants.
13687         * class.cs (TypeContainer.RegisterFieldForInitialization): New.
13688         Carved out of ...
13689         (TypeContainer.AddField): ... this.
13690         (TypeContainer.EmitFieldInitializers): Allow the list of fields
13691         with initializers to include 'Const's.
13692         (ClassPart.RegisterFieldForInitialization): Forward to
13693         PartialContainer.
13694         * const.cs (Const.Const): Pass initializer to base class.
13695         (Const.Define): In case of decimal constants, register them for
13696         initialization in a static constructor.
13697
13698 2005-05-14  Martin Baulig  <martin@ximian.com>
13699
13700         * statement.cs (Block.Resolve): Correctly handle unreachable code;
13701         do not call ResolveUnreachable() on unreachable statements in
13702         here, see the comment in the source code.
13703
13704 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13705
13706         Fix #74934.
13707         * expression.cs (BinaryResolveOperator): If one of the operands of
13708         an equality comparison is 'null' and the other is a pointer type,
13709         convert the null to a NullPointer.
13710         * convert.cs (ImplicitReferenceConversion): If the expression is a
13711         NullLiteral and the target type is a pointer type, return a
13712         NullPointer instead.
13713         (ImplicitConversionStandard): Likewise.
13714
13715 2005-05-13  Marek Safar  <marek.safar@seznam.cz>
13716         
13717         * cs-parser.jay: Set readonly context based on special constructs.
13718         
13719         * expression.cs (LocalVariableReference.DoResolveBase): Improved
13720         readonly variable error handling.
13721         
13722         * rootcontext.cs (EmitCode): Don't verify members when error
13723         occurred.
13724         
13725         * statement.cs (LocalInfo): Add reaodnly context information.
13726         (SetReadOnlyContext, GetReadOnlyContext): New methods.
13727
13728 2005-05-13  Raja R Harinath  <rharinath@novell.com>
13729
13730         * statement.cs (Block.Resolve): Revert change below.  Modify fix
13731         for #74041 to initialize 'resolved' to false only for explicit
13732         blocks.  Fixes #74873.
13733
13734 2005-05-12  Raja R Harinath  <harinath@gmail.com>
13735
13736         Fix #74920.
13737         * typemanager.cs (unmanaged_enclosing_types): New.
13738         (IsUnmanagedType): Avoid infloops by using
13739         'unmanaged_enclosing_types' to talk with recursive invocations.
13740
13741 2005-05-13  Martin Baulig  <martin@ximian.com>
13742
13743         * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
13744         instance variable, not a local.  Fix #74873.
13745         (Block.ResolveUnreachable): Set it to true here.
13746
13747 2005-05-11  Duncan Mak  <duncan@novell.com>
13748
13749         * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
13750         continuing to process for 'arg'.
13751         (handle_preprocessing_directive): Check the argument of the #endif
13752         directive and report error CS1025 if there are any trailing
13753         characters.
13754
13755         According to the C# spec, having even whitespace after the #endif
13756         directive is illegal; however, because we call arg.TrimEnd ()
13757         beforehand, we have the same behavior as csc, allowing whitespace
13758         after the directive.
13759
13760         Fixes #74892.
13761
13762 2005-05-11  Marek Safar  <marek.safar@seznam.cz>
13763
13764         Fix #74863.
13765         
13766         * class.cs (ConstructorInitializer.GetOverloadedConstructor): Removed.
13767         (Constructor.GetObsoleteAttribute): Implemented correctly.
13768
13769 2005-05-10  Martin Baulig  <martin@ximian.com>
13770
13771         * support.cs (ReflectionParameters.ParameterModifier): Use
13772         `Parameter.Modifier.REF' if we both have `ParameterAttributes.Out'
13773         and `ParameterAttributes.In'.  Fixes #74884.
13774
13775 2005-05-10  Marek Safar  <marek.safar@seznam.cz>
13776
13777         * class.cs (Method.Define): Catch attempt for Finalizer declaration.
13778         
13779         * expression.cs (Argument.GetParameterModifier): Turned to property.
13780         (Invocation.Error_InvalidArguments): Add more descriptive errors.
13781         
13782         * parameter.cs (Parameter.GetModifierSignature): Translates modifier to
13783         its C# equivalent.
13784         
13785 2005-05-09  Raja R Harinath  <rharinath@novell.com>
13786
13787         Fix #74852.
13788         * decl.cs (MemberCache.AddMethods): Register override methods,
13789         rather than non-override methods.
13790         * typemanager.cs (RegisterOverride): New.
13791         (IsOverride): Update.
13792
13793 2005-05-09  Marek Safar  <marek.safar@seznam.cz>
13794
13795         Fix #73105.
13796         
13797         * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
13798         recursive declaration.
13799         
13800         * statement.cs (Block.ResolveMeta): Report any error in resolving.
13801         
13802 2005-05-06  Marek Safar  <marek.safar@seznam.cz>
13803
13804         * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.
13805         
13806         * expression.cs (Binary.DoResolve): (x && 0) is always 0.
13807
13808 2005-05-05  Raja R Harinath  <rharinath@novell.com>
13809
13810         Fix #74797.
13811         * decl.cs (DeclSpace.FamilyAccessible): 
13812         Use TypeManager.IsNestedFamilyAccessible.
13813
13814         Fix reopened #64812.
13815         * typemanager.cs (Closure.Filter): Introduce checks for 'protected
13816         internal'.
13817
13818 2005-05-04  Raja R Harinath  <rharinath@novell.com>
13819             Abin Thomas  <projectmonokochi@rediffmail.com>
13820             Anoob V E  <projectmonokochi@rediffmail.com>
13821             Harilal P R  <projectmonokochi@rediffmail.com>
13822
13823         Fix #64812.
13824         * typemanager.cs (Closure.CheckValidFamilyAccess): Don't blindly
13825         allow access to all static members.
13826
13827 2005-05-04  Martin Baulig  <martin@ximian.com>
13828
13829         * ecore.cs (FieldExpr.DoResolveLValue): Always call fb.SetAssigned().
13830
13831 2005-05-04  Martin Baulig  <martin@ximian.com>
13832
13833         Fix #74655.
13834
13835         * statement.cs (Switch.SimpleSwitchEmit): Always emit the default
13836         section at the end; make things work if `default' is not the last
13837         section.        
13838
13839 2005-05-04  Martin Baulig  <martin@ximian.com>
13840
13841         Fix #70400.
13842
13843         * statement.cs (Switch): Replaced the `got_default' field with a
13844         `default_section' one.
13845         (Switch.CheckSwitch): Set `default_section' here.
13846         (Switch.Resolve): If we're a constant switch and the constant is
13847         not found, use the default section.
13848
13849 2005-05-03  Martin Baulig  <martin@ximian.com>
13850
13851         * expression.cs (ArrayAccess.EmitGetLength): New public method.
13852
13853         * statement.cs (Foreach.ArrayForeach): New nested class.
13854         (Foreach.TemporaryVariable): New nested class.
13855         (Foreach.EmitArrayForeach): Removed; this is now in the new
13856         ArrayForeach class.
13857
13858 2005-05-03  Raja R Harinath  <rharinath@novell.com>
13859
13860         * pending.cs (BaseImplements): Move the #74773 fix here.  This is
13861         more conservative.
13862         (VerifyPendingMethods): Revert change below.
13863
13864         * typemanager.cs (IsOverride, RegisterNonOverride): New.
13865         * decl.cs (MemberCache.AddMethod): Register "non-override" methods
13866         that used to trigger warning -28.  Remove warning -28.
13867         * expression.cs (Invocation.OverloadResolve): Use
13868         TypeManager.IsOverride to distinguish override methods.
13869
13870         Fix #74773.
13871         * pending.cs (VerifyPendingMethods): If a base type implements the
13872         requested interface, don't bother checking individual methods of
13873         the base type.  As a side-effect, this prevents the creation of
13874         unnecessary proxies.
13875
13876 2005-05-02  Martin Baulig  <martin@ximian.com>
13877
13878         Fix #70182.
13879
13880         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
13881         Also `And' the locals if the old vector is null.
13882         (FlowBranching.UsageVector.BitVector.And): Allow `vector' being
13883         null; in this case we basically reset all the variables.        
13884
13885 2005-05-02  Martin Baulig  <martin@ximian.com>
13886
13887         Fix #74529.
13888
13889         * flowanalysis.cs (FlowBranching.UsageVector.MergeBreakOrigins):
13890         Added `FlowBranching branching' argument; always `and' the
13891         variables instead of `or'ing them unless we're an infinite loop.
13892
13893         * statement.cs (While.Resolve): Create a new sibling unless we're
13894         infinite.       
13895
13896 2005-05-02  Martin Baulig  <martin@ximian.com>
13897
13898         Fix #70140.
13899
13900         * class.cs (ConstructorInitializer.Resolve): Added `Block block'
13901         arguments; use it instead of creating a new TopLevelBlock.
13902         (Constructor.Emit): Call `block.ResolveMeta ()' before resolving
13903         our ConstructorInitializer.
13904
13905         * statement.cs
13906         (TopLevelBlock.TopLevelBranching): New public property.
13907         (TopLevelBlock.ResolveMeta): New public method; call ResolveMeta()
13908         and create our `TopLevelBranching'.
13909
13910         * codegen.cs (EmitContext.ResolveTopBlock): If we're not an
13911         anonymous method host, use `block.TopLevelBranching' rather than
13912         creating a new branching.
13913
13914 2005-04-20  Miguel de Icaza  <miguel@novell.com>
13915
13916         * anonymous.cs (ScopeInfo.AddChild): when adding a new child to
13917         a ScopeInfo, if any of the current children is a child of the new
13918         entry, move those children there.
13919
13920 2005-04-30  Martin Baulig  <martin@ximian.com>
13921
13922         * statement.cs (Switch.SimpleSwitchEmit): Reset `default_at_end'
13923         at the beginning of a SwitchSection.  Fix #73335.
13924
13925 2005-04-27  Marek Safar  <marek.safar@seznam.cz>
13926
13927         Fix #74378
13928         * class.cs (EmitFieldInitializers): Use FieldExpr in initializer.
13929         
13930         * ecore.cs (FieldExpr): Add a new ctor with in_initializer.
13931         (FieldExpr.DoResolve): Obsolete members are ignored for field
13932         initializers.
13933         
13934 2005-04-26  Marek Safar  <marek.safar@seznam.cz>
13935
13936         * attribute.cs (AreOverloadedMethodParamsClsCompliant): Add array
13937         of arrays detection.
13938
13939         * class.cs (Interface.VerifyClsCompliance): Add base interfaces
13940         verification.
13941         (Field.VerifyClsCompliance): Volatile fields are not compliant.
13942
13943         * decl.cs (MemberCache.VerifyClsParameterConflict): Add array of
13944         arrays report.
13945
13946 2005-04-25  Ben Maurer  <bmaurer@ximian.com>
13947
13948         * cs-parser.jay: Use the prefered version of -unsafe in error
13949         message.
13950
13951 2005-04-22  Marek Safar  <marek.safar@seznam.cz>
13952
13953         * driver.cs (CompilerCallableEntryPoint.Invoke): Reset under any
13954         circumstances.
13955
13956 2005-04-20  John Luke  <john.luke@gmail.com>
13957
13958         * driver.cs: fix typo in error message, --outout to --output
13959
13960 2005-04-20  Marek Safar  <marek.safar@seznam.cz>
13961
13962         * codegen.cs (InRefOutArgumentResolving): New field.
13963         
13964         * ecore.cs (FieldExpr.DoResolve): Check for assigning to readonly
13965         fields outside contructor.
13966         
13967         * expression.cs (Argument.Resolve): Set InRefOutArgumentResolving.
13968         
13969 2005-04-19  Miguel de Icaza  <miguel@novell.com>
13970
13971         * anonymous.cs (CaptureContext.EmitParameterInstance): The
13972         parameter code was not completed ever, so it was not as up-to-date
13973         as local variables.  Must finish it.
13974
13975         The bug fix was to compare the Toplevel of the block, not the
13976         current block.  Thanks for Ben for pointing this out. 
13977
13978 2005-04-19  Raja R Harinath  <rharinath@novell.com>
13979
13980         * decl.cs (AddMethods): Use the declaring type of the problem
13981         method to determine if we want to squash a warning.
13982
13983 2005-04-19  Marek Safar  <marek.safar@seznam.cz>
13984
13985         * attribute.cs: Removed debug output.
13986
13987         * decl.cs (MemberCache.AddMethods): Fixed Finalize ignoring.
13988         
13989         * driver.cs (Driver.parse): Synchronize parser ErrorOutput with
13990         Report.Stderr.
13991         
13992 2005-04-18  Raja R Harinath  <rharinath@novell.com>
13993
13994         Fix #74481.
13995         * expression.cs (Binary.EqualsNullIsReferenceEquals): New.
13996         (Binary.DoResolveOperator): Use it to avoid blindly optimizing out
13997         all null comparisons against reference types.
13998
13999 2005-04-18  Marek Safar  <marek.safar@seznam.cz>
14000
14001         Fix# 74565
14002         * class.cs (TypeContainer.CircularDepException) New nested
14003         exception class.
14004         (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
14005         (TypeContainer.DefineType): Removed error, reset InTransit before
14006         exit.
14007         (Class.DefineType): Throw exception when is in Transit.
14008         Catch exception and report error.
14009         (Struct.DefineType): Throw exception when is in Transit.
14010         Catch exception and report error.
14011         (Interface.DefineType): Throw exception when is in Transit.
14012         Catch exception and report error.
14013
14014         * codegen.cs: Add InCatch,InFinally to EmitContext to easily
14015         handle nested exception handlers.
14016
14017         * flowanalysis.cs (InTryWithCatch): New method, search for try with
14018         a catch.
14019
14020         * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
14021         InFinally and InCatch storage.
14022
14023         * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
14024         (Catch.Resolve): Set and Restore ec.InCatch.
14025         (Try.Resolve): Set and Restore ec.InFinally.
14026         (Try.HasCatch): True when try has catch.
14027
14028 2005-04-17  Atsushi Enomoto  <atsushi@ximian.com>
14029
14030         * doc.cs : In some cases FilterName returns MonoEvent and MonoField
14031           for the same event member, so exclude such cases from warning 419.
14032           Fixed bug #74633.
14033
14034 2005-04-16  Miguel de Icaza  <miguel@novell.com>
14035
14036         * expression.cs (Binary.ResolveOperator): Apply patch from John
14037         Luke to fix bug 59864: operators &, | and ^ on enumerations
14038         require that the same enum type on both sides.
14039
14040         * driver.cs: Add warnings to old flag usage, this is to assist
14041         people who produce Makefiles and hope that the Makefiles will be
14042         used on Windows.
14043
14044         * class.cs (TypeContainer.EmitType): Moved the definition of the
14045         special $PRIVATE$ field from the resolve phase to the Emit phase.
14046         During resolve we do not know if we are a struct with
14047         HasExplicitLayout, we know this only after the attributes for the
14048         type are emitted.
14049
14050         Set the FieldOffset to zero on the dummy field that we create for
14051         the class.   Fixes 74590.
14052
14053 2005-04-16  Raja R Harinath  <rharinath@novell.com>
14054
14055         Fix #73834.
14056         * ecore.cs (PropertyExpr.resolved): New.
14057         (DoResolve): Use it to handle a case of double resolution here.
14058         Handle a case of identical-name-and-type-name.
14059         * expression.cs (ArrayCreation.CheckIndices): Avoid double
14060         resolution by storing the results of expression resolution back
14061         into the "probes" array.
14062
14063 2005-04-15  Raja R Harinath  <rharinath@novell.com>
14064
14065         Fix cs0208-7.cs and cs0208-8.cs.
14066         * typemanager.cs (IsUnmanagedType): Arrays are not allowed
14067         (cf. ECMA standard, behaviour of CSC 1.1 and CSC 2.0).  Improve
14068         error reporting to point out the reason a struct is not unmanaged.
14069
14070 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14071
14072         * doc.cs : In FindDocumentedType(), avoid TypeExpr.ResolveType() and 
14073           just use TypeExpr.Type. This fixes bug #74595 when merged to gmcs.
14074
14075 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14076
14077         Fix #74528.
14078         * ecore.cs (PropertyExpr.InstanceResolve): Handle a case of
14079         IdenticalNameAndTypeName here.
14080         (EventExpr.InstanceResolve): Likewise.
14081
14082 2005-04-13  Marek Safar  <marek.safar@seznam.cz>
14083
14084         C# 2.0 DefaultCharSetAttribute implementation
14085         
14086         * attribute.cs (Attribute.ResolveAsTypeStep): New protected method
14087         which allows us to set GlobalNamespace for every resolve.
14088         (Attribute.ResolveArguments): Cut from Resolve.
14089         (Attribute.GetCharSetValue): Returns CharSet named argument.
14090         (Attribute.DefinePInvokeMethod): Gets default charset from
14091         module settings.
14092         (GlobalAttribute.ResolveAsTypeStep): Override.
14093         (GlobalAttribute.ResolveArguments): Override.
14094         
14095         * class.cs (TypeAttr): Is protected.
14096         
14097         * codegen.cs (ModuleClass.DefaultCharSet): New member.
14098         (ModuleClass.DefaultCharSetType): New memeber.
14099         (ModuleClass.ResolveAttributes): Resolves DefaultCharSetAttribute.
14100         
14101         * decl.cs (Decl.TypeAttr): New protected virtual. Returns default
14102         charset from module.
14103         
14104         * delegate.cs (TypeAttr): Override.
14105         (Delegate.DefineType): Use this TypeAttr.
14106         
14107         * driver.cs (Driver.MainDriver): Call Module.ResolveAttributes
14108         at very early stage (before types are defined) to resolve model
14109         module attributes. It will probably not work with corlib but it
14110         should be ok.
14111         
14112         * enum.cs (Enum.TypeAttr): New protected virtual. Returns default
14113         charset from module.
14114         
14115         * typemanager.cs (default_charset_type): New type.
14116
14117 2005-04-13  Raja R Harinath  <rharinath@novell.com>
14118
14119         * decl.cs (MemberCache.AddMethods): Don't warn if
14120         System.Object.Finalize has buggy MethodAttributes.
14121
14122         * typemanager.cs (IsUnmanagedType): Restore !IsValueType check
14123         removed below.
14124
14125 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14126
14127         * doc.cs : detect ambiguous reference to overloaded members.
14128           Fixed bug #71603. MS 1.1 csc does not detect it.
14129
14130 2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
14131
14132         * doc.cs : delegates must not be referenced with parameters.
14133           Fixed bug #71605.
14134
14135 2005-04-12  Miguel de Icaza  <miguel@novell.com>
14136
14137         * typemanager.cs (IsUnmanagedType): Arrays are allowed.
14138
14139 2005-04-10  Miguel de Icaza  <miguel@novell.com>
14140
14141         * driver.cs (MainDriver): Stop processing if the CLS stage found
14142         errors. 
14143
14144         (CompilerCallableEntryPoint.InvokeCompiler): Always
14145         reset after execution;   Take a TextWriter argument for the
14146         output.
14147
14148         * report.cs: Use the error stream instead of hardcoding stderr. 
14149
14150 2005-04-09  Miguel de Icaza  <miguel@novell.com>
14151
14152         * class.cs: Reduce code paths to test, too small of an
14153         optimization to make it worth the extra testing.  Always perform
14154         it. 
14155
14156 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14157
14158         Fix #74510.
14159         * class.cs (OperatorArrayList.CheckPairedOperators): Skip
14160         operators that had errors reported on them.
14161
14162 2005-04-08  Marek Safar  <marek.safar@seznam.cz>
14163
14164         * attribute.cs (Attribute.IsValidArgumentType): Test valid named
14165         argument types.
14166         (Attribute.Resolve): Add named argument type checking.
14167         
14168         * class.cs (FixedField.Define): Use IsPrimitiveType
14169         
14170         * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
14171         
14172         * iterators.cs (Iterator.DefineIterator): Add check for arglist and
14173         unsafe parameter types.
14174         
14175         * statement.cs (Using.ResolveExpression): Add better error description.
14176         
14177         * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
14178         
14179 2005-04-08  Raja R Harinath  <rharinath@novell.com>
14180
14181         Fix #74484.
14182         * attribute.cs (Attribute.GetAttributeUsage): Resolve
14183         AttributeUsageAttribute in the emitcontext of the attribute class,
14184         not in the emitcontext of the attributable entity it was attached to.
14185         * cs-parser.jay: Use 'current_class', not 'current_container',
14186         when creating a GlobalAttribute.
14187
14188 2005-04-08  Alp Toker  <alp@atoker.com>
14189
14190         * pending.cs: The fix to #58413 failed to compile methods implementing
14191         interfaces with/without params modifiers and vice versa, even though
14192         params modifiers aren't part of the signature. Make the modifier check
14193         less strict as in csc.
14194
14195 2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
14196             Anoob V E  <projectmonokochi@rediffmail.com>
14197             Harilal P R  <projectmonokochi@rediffmail.com>
14198
14199         Fix #58413.
14200         * pending.cs (TypeAndMethods.mods): New.  Store the parameter
14201         modifiers of pending methods.
14202         (PendingImplementation.PendingImplementation): Initialize it.
14203         Add Parameter.Modifier [][] mods and initialize it with ParameterData.
14204         (PendingImplementation.InterFaceMethod): Repalce Type[] argument
14205         with ParameterData.  Add check for modifiers.
14206         * class.cs (MethodData.Define): Update to changes.
14207
14208 2005-04-07  Raja R Harinath  <rharinath@novell.com>
14209
14210         * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
14211
14212 2005-04-07  Marek Safar  <marek.safar@seznam.cz>
14213
14214         * class.cs (PropertyMethod.Define): Check private accessor in abstract
14215         property.
14216         
14217         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
14218         
14219         * rootcontext.cs,
14220         * typemanager.cs: Registered RequiredAttributeAttribute.
14221         
14222 2005-04-06  Marek Safar  <marek.safar@seznam.cz>
14223
14224         * class.cs (VerifyMembers): Doesn't need EmitContext argument.
14225         Warning CS0169 is back at level 3.
14226         (IMethodData.SetMemberIsUsed): New method.
14227         
14228         * decl.cs (IsUsed): New value; moved from FieldBase.Status
14229         (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
14230         
14231         * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
14232
14233         * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
14234         contants.
14235         (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
14236         is used.
14237         
14238         * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
14239         is used.
14240         
14241         * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
14242         to avoid the problems with nested types.
14243
14244 2005-04-05  Abin Thomas  <projectmonokochi@rediffmail.com>
14245             Anoob V.E  <projectmonokochi@rediffmail.com>
14246             Harilal P.R  <projectmonokochi@rediffmail.com>
14247             Raja R Harinath  <rharinath@novell.com>
14248
14249         Fix #73820.
14250         * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
14251         attribute.
14252         * typemanager (GetConstructor): Make public.
14253
14254 2005-04-05  John Luke  <john.luke@gmail.com>
14255             Raja R Harinath  <rharinath@novell.com>
14256
14257         Fix #62232.
14258         * typemanager.cs (IsUnmanagedType): Check non-public fields of a
14259         struct too.  Return false quicker in a few cases.
14260         (VerifyUnManaged): Use it.
14261
14262 2005-04-05  Raja R Harinath  <rharinath@novell.com>
14263
14264         Fix #74041.
14265         * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
14266         not 'unreachable_seen'.
14267
14268 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
14269
14270         * attribute.cs (Attribute.GetValue): Removed unused.
14271         
14272         * codegen.cs (CodeGen.TrimExt): Removed unused.
14273         
14274         * cs-parser.jay (output): Removed unused.
14275         
14276         * cs-tokenizer.cs (hex_digits): Removed unused.
14277         
14278         * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
14279         
14280         * expression.cs (Indirection.LoadExprValue): Removed unused.
14281         (ArrayCreation.ExpressionToArrayArgument): Removed unused.
14282         
14283         * iterators.cs (Iterator.param_types): Removed unused.
14284         
14285         * statement.cs (Goto.block): Removed unused.
14286         (ToplevelBlock.did): Removed unused.
14287         (Switch.ResolveConstantSwitch): Removed unused.
14288
14289 2005-04-01  Ben Maurer  <bmaurer@ximian.com>
14290
14291         * rootcontext.cs: Allow mcs to bootstrap with the compilation
14292         resetting thingy.
14293
14294 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14295
14296         Fix #74232 and cs0208-3.cs.
14297         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
14298         * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
14299         unmanaged type.  Don't use FieldBuilders when 't' is a
14300         TypeBuilder.  Use ModFlags and MemberType fields.
14301         * class.cs (MemberBase.member_type): Rename from MemberType.
14302         (MemberBase.MemberType): New property.  Determines member_type on
14303         demand.
14304         (MemberBase.DoDefine): Don't initialize MemberType here.
14305         (FieldMember.Define): Likewise.
14306
14307 2005-04-01  Marek Safar  <marek.safar@seznam.cz>
14308
14309         Fix #74241
14310         * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
14311         Attributes are emitted there.
14312         
14313 2005-04-01  Raja R Harinath  <rharinath@novell.com>
14314
14315         * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
14316         keyword in 'partial enum' too.
14317         * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
14318         is not allowed).
14319         Report from Kamil Skalski <nazgul@omega.pl>.
14320
14321         Fix #74309.
14322         * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
14323         have partial containers too.
14324
14325         * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
14326         in block' checks to Block.CheckInvariantMeaningInBlock.
14327         * statement.cs (Block.GetKnownVariableInfo): Make private.
14328         (Block.IsVariableUsedInChildBlock): Remove.
14329         (Block.IsVariableUsedInBlock): Likewise.
14330         (Block.CheckInvariantMeaningInBlock): New.  Show location of
14331         conflicting declaration.
14332         (Block.AddVariable): Make error messages less long-winded and more
14333         specific.  Show location of conflicting declaration.
14334         * parameter.cs (Parameters.Location): New readonly property.
14335
14336 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14337
14338         Clean up semantics of invoking ResolveMemberAccess.
14339         * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
14340         can have an instance, ensure that we pass in a non-TypeExpression
14341         to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
14342         (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
14343         argument.  Update to changes and simplify.
14344         (FieldExpr.Emitinstance): Remove CS0120 check.
14345         (PropertyExpr.EmitInstance): Likewise.
14346         * expression.cs (Argument.Resolve): Likewise.
14347         (Invocation.DoResolve): Update to changes in semantics of
14348         InstanceExpression.
14349
14350 2005-03-31  Marek Safar  <marek.safar@seznam.cz>
14351
14352         Fix #74241
14353         * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
14354         customization.
14355         
14356         * decl.cs (MemberCache.AddMethods): Fix infinite loop.
14357
14358 2005-03-31  Raja R Harinath  <rharinath@novell.com>
14359
14360         Fix difference in behaviour with commandline invocation.
14361         * driver.cs (Driver.Reset): New.
14362         (CompilerCallableEntryPoint): Call it.
14363
14364         * statement.cs (If.Resolve): Avoid spurious "uninitialized
14365         variable" warnings if the boolean expression failed to resolve.
14366
14367 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
14368
14369         * attribute.cs: Fix the union of several permissions when some of them
14370         are unrestricted (so the result isn't an unrestricted permission set).
14371         Fix #74036.
14372
14373 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14374
14375         * ecore.cs (MemberExpr): New class.  Convert from interface
14376         IMemberExpr.
14377         (MemberExpr.ResolveMemberAccess): Refactor and move here from
14378         MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
14379         error checks.
14380         (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
14381         (MethodGroupExpr.IsExplicitImpl): Remove.
14382         (Expression.GetFieldFromEvent): Remove.
14383         (SimpleName.MemberStaticCheck): Remove.
14384         (SimpleName.DoSimpleNameResolve): Update to changes.
14385         * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
14386         (MemberAccess.IdenticalNameAndTypeName): Remove.
14387         (MemberAccess.error176): Move to MemberExpr.
14388         (MemberAccess.DoResolve): Update to changes.
14389         (BaseAccess.DoResolve): Likewise.
14390
14391 2005-03-30  Marek Safar  <marek.safar@seznam.cz>
14392
14393         C# 2.0 Conditional attribute class implementation
14394         
14395         * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
14396         Analyzes class whether it has attribute which has ConditionalAttribute
14397         and its condition is not defined.
14398         
14399         * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
14400         (Class.IsExcluded): New method. Search for at least one defined
14401         condition in ConditionalAttribute of attribute class.
14402
14403 2005-03-30  Raja R Harinath  <rharinath@novell.com>
14404
14405         * ecore.cs (PropertyExpr): Derive from Expression, not
14406         ExpressionStatement.
14407         (PropertyExpr.EmitStatement): Remove.
14408
14409 2005-03-29  Raja R Harinath  <rharinath@novell.com>
14410
14411         Fix #74060.
14412         * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
14413         internal field "value__" of an enum be private.  The examples for
14414         "value__" that I found on MSDN all used FieldAttributes.Private.
14415
14416         * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
14417         Don't mention IL method attribute names.
14418
14419         Fix #47991.  Remove a TODO.
14420         * statement.cs (Block.Toplevel): Make into a field.
14421         (Block.Parameters): Move into ToplevelBlock.
14422         (Block.known_variables): Rename from child_variable_names.
14423         (Block.Block): Remove variants that take Parameters.  Initialize
14424         'Toplevel' with the immediately surrounding toplevel block.
14425         (Block.AddKnownVariable): Rename from AddChildVariableName.  Add a
14426         LocalInfo parameter.
14427         (Block.GetKnownVariableInfo): New.
14428         (Block.IsVariableNameUsedInChildBlock): Update.
14429         (Block.IsVariableNameUsedInBlock): New.  Checks if a name is used in
14430         the block, even though it may not be in scope.
14431         (Block.AddVariable): Remove Parameters parameter.  Use
14432         Toplevel.Parameters instead.
14433         (Block.AddConstant): Remove Parameters parameter.
14434         (Block.GetParameterReference): Update to use Toplevel.Parameters.
14435         (Block.IsParamaterReference): Likewise.
14436         (Block.IsLocalParameter): Likewise.  Simplify a lot.
14437         (ToplevelBlock.Parameters): New.  Moved from Block.
14438         (ToplevelBlock.ToplevelBlock): Update to changes.  Always
14439         initialize Parameters to a non-null value.
14440         * cs-parser.jay: Update to changes.
14441         * ecore.cs (SimpleName.SimpleNameResolve): Emit cs0136 error for
14442         simple names that mean different things in the same block.  Use
14443         Block.IsVariableNameUsedInBlock.
14444
14445 2005-03-28  Raja R Harinath  <rharinath@novell.com>
14446
14447         * typemanager.cs (TypeHandle.BaseType): Make into an IMemberContainer.
14448         (TypeHandle.TypeHandle): Use LookupMemberCache rather than
14449         GetTypeHandle.  It is possible for a reflected type to derive from
14450         a TypeBuilder (e.g., int[] derives from the TypeBuilder
14451         System.Array during mscorlib compilation).
14452         * decl.cs (MemberCache.MemberCache): If the base cache doesn't
14453         contain a method_hash, don't create one either.  Don't create a
14454         deep copy of the base cache's method_hash.
14455         (MemberCache.SetupCache): Rename back from DeepCopy.
14456         (MemberCache.AddMethods): Rewrite, now that method_hash isn't
14457         already initialized.  If we see an override function, add its
14458         underlying base virtual function to the member_hash too.
14459
14460         * enum.cs (Enum.LookupEnumValue): Remove debugging code.
14461
14462 2005-03-26  Raja R Harinath  <harinath@acm.org>
14463
14464         Fix #73038.
14465         * assign.cs (Assign.DoResolve): When the RHS of an assignment
14466         fails to resolve, ensure that the LHS is still resolved as an
14467         lvalue.
14468
14469 2005-03-25  Raja R Harinath  <harinath@acm.org>
14470
14471         * enum.cs (Enum.DefineType): Set ec.InEnumContext and
14472         ec.ContainerType.
14473         (Enum.current_ec): Remove.
14474         (Enum.LookupEnumValue): Remove EmitContext argument.
14475         Just uses the one created during DefineType.
14476         (Enum.FindMembers): Update.
14477         * expression.cs (MemberAccess.DoResolve): Update.
14478
14479 2005-03-22  Marek Safar  <marek.safar@seznam.cz>
14480
14481         * assign.cs (Assign.DoResolve): Check for CS1717 when
14482         source and target are same (uses Equals).
14483
14484         * expression.cs (LocalVariableReference, ParameterReference,
14485         This): Implemented Equals, GetHashCode.
14486
14487         * statement.cs (Block.GetParameterReference): Removed useless
14488         local variable.
14489
14490 2005-03-22  Raja R Harinath  <rharinath@novell.com>
14491
14492         Fix cs0128.cs
14493         * statement.cs (Block.AddVariable): Ensure that we skip implicit
14494         blocks before deciding whether the error is cs0136 or cs0128.
14495
14496         * cs-parser.jay: Pass MemberName to RootContext.Tree.RecordDecl.
14497         (using_alias_directive, using_namespace_directive): Pass
14498         MemberName, not an expression to Namespace.UsingAlias and
14499         Namespace.Using.
14500         (MakeName): Use the MemberName of the namespace.
14501         * namespace.cs (Namespace.MemberName): New.
14502         (UsingEntry.UsingEntry): Take a MemberName, not an expression.
14503         (AliasEntry.AliasEntry, Namespace.Using, Namespace.UsingAlias):
14504         Likewise.
14505         * decl.cs (MemberName.Name): Make readonly.
14506         (MemberName.FromDotted): New "constructor".
14507         (MemberName.Equals, MemberName.GetHashCode): Implement overrides.
14508         (MemberCore.Name): Compute from MemberName on demand.
14509         (MemberCore.SetMemberName): Provide a way to change the
14510         MemberName.
14511         (MemberCore.AddToContainer): Don't take a fullname parameter.
14512         * class.cs (TypeContainer.AddToMemberContainer): Don't add the
14513         fully qualified name of the container to the member name.
14514         (TypeContainer.AddToTypeContainer): Use a fully qualified name
14515         only if the type is a member of the root container.
14516         (TypeContainer.AddMethod, TypeContainer.AddProperty): Use
14517         MemberName.Left rather than searching for an embedded ".".
14518         (PartialContainer.CreatePart): Update to changes in RootContext.
14519         (MemberBase.ShortName): Turn into a property.  Use
14520         MemberCore.SetMemberName.
14521         (MemberBase.ExplicitInterfaceName): Remove.
14522         (MemberBase.UpdateMemberName): Remove.
14523         (AbstractPropertyEventMethod.UpdateName): Use SetMemberName.
14524         (PropertyBase.SetMemberName): New override.
14525         * tree.cs (Tree.RecordDecl): Take a MemberName and use it as hash key.
14526         (Tree.GetDecl): New.
14527         (Tree.AllDecls): Rename from Decls.
14528         * attribute.cs, enum.cs, report.cs: Update to changes.
14529         * driver.cs (MainDriver): Use MemberName.FromDotted on
14530         RootContext.MainClass.
14531
14532 2005-03-21  Marek Safar  <marek.safar@seznam.cz>
14533
14534         * class.cs (FixedField.Define): Check for CS1664 and more sanity
14535         checks.
14536
14537         * expression.cs (ElementAccess.DoResolveLValue): Check for CS1708.
14538
14539 2005-03-18  Marek Safar  <marek.safar@seznam.cz>
14540
14541         * modifiers.cs (Modifiers.PROPERTY_CUSTOM): New constant for
14542         property accessor modifiers.
14543
14544         * class.cs (FieldMember.ApplyAttributeBuilder): Don't allow apply
14545         fixed buffer attribute (CS1716).
14546         (PropertyMethod.HasCustomAccessModifier): When property accessor
14547         has custom modifier.
14548
14549         * ecore (PropertyExpr.DoResolve): Add CS0271 for custom accessor
14550         modifiers.
14551         (PropertyExpr.DoResolveLValue): Add CS0272.
14552
14553 2005-03-17  Miguel de Icaza  <miguel@novell.com>
14554
14555         * convert.cs: When converting to a pointer, use the proper Conv.U
14556         or Conv.I depending on the source data type.
14557
14558         * cs-tokenizer.cs: Make the size for large decimal constants,
14559         fixes #72957.
14560
14561 2005-03-17  Martin Baulig  <martin@ximian.com>
14562
14563         * anonymous.cs (AnonymousMethod.method_modifiers): Change default
14564         from `Modifiers.INTERNAL' to `Modifiers.PRIVATE'.  Fixes #73260.
14565
14566 2005-03-17  Martin Baulig  <martin@ximian.com>
14567
14568         * anonymous.cs (AnonymousMethod.EmitMethod): Changed return type
14569         to bool so we can return an error condition.
14570         (AnonymousDelegate.Emit): Check whether AnonymousMethod.EmitMethod()
14571         returned an error.
14572
14573 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14574
14575         * attribute.cs: Encode ThrowOnUnmappableChar and BestFitMapping
14576         attributes.
14577
14578 2005-03-16  Raja R Harinath  <rharinath@novell.com>
14579
14580         Remove TypeManager.LookupType and TypeManager.LookupTypeDirect.
14581         Refactor to avoid traversing the list of assemblies, and to avoid
14582         string concatenation.
14583         * typemanager.cs (guid_attr_type): Remove.
14584         (negative_hits, pointers, references): Remove hashes.
14585         (type_hash): New.
14586         (GetConstructedType): New.  Uses type_hash to handle constructed
14587         types (arrays, references, pointers).
14588         (GetReferenceType, GetPointerType): Use it.
14589         (GetNestedType): New.  Uses type_hash to handle nested types of
14590         reflected types.
14591         (LookupType, LookupTypeDirect): Remove.
14592         (CoreLookupType): Inline parts of old LookupTypeDirect code.  Use
14593         'types' hash and LookupTypeReflection directly.
14594         (params_string, params_object): Use GetConstructedType.
14595         * namespace.cs (Namespace.cached_types): New.  Cache of reflected
14596         top-level types.
14597         (Namespace.Lookup): Use cached_types.
14598         (NamespaceEntry.LookupNamespaceOrType): Inline the functionality
14599         provided by old TypeManager.LookupType.
14600         * rootcontext.cs (MakeFQN): Remove.
14601         * decl.cs (DeclSpace.MakeFQN): Likewise.
14602         (DeclSpace.LookupType): Use TypeManager.GetNestedType.
14603         * expression.cs (ComposedCast.DoResolveAsTypeStep): Use
14604         TypeManager.GetConstructedType.
14605         * tree.cs (decl_ns_hash, LookupByNamespace): Remove.
14606
14607 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
14608
14609         * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
14610         indexers.
14611
14612         * cs-parser.jay: Reports CS1527 for any namespace element.
14613
14614         * delegate.cs (DelegateCreation.Error_NoMatchingMethodForDelegate):
14615         Added CS0407.
14616
14617         * expression.cs (ParameterReference.IsAssigned): Changed error to
14618         CS0269.
14619         (Error_WrongNumArguments): Moved CS0245 detection here.
14620
14621         * statement.cs (Return.Resolve): Add CS1622 report.
14622
14623 2005-03-11  Marek Safar  <marek.safar@seznam.cz>
14624
14625         * class.cs (StaticClass.DefineContainerMembers): Added CS0720.
14626
14627 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14628
14629         * attribute.cs expression.cs: Get rid of some allocations.
14630
14631 2004-03-11  Atsushi Enomoto  <atsushi@ximian.com>
14632
14633         * doc.cs : just eliminate the latest change.
14634
14635 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14636
14637         * doc.cs : commented out the latest change. It breaks xml-030.cs
14638
14639 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14640
14641         * doc.cs : When TypeBuilder did not create Type yet, GetEvents() will
14642           fail. So invoke CreateType() in FindDocumentedType().
14643
14644 2004-03-10  Atsushi Enomoto  <atsushi@ximian.com>
14645
14646         * cs-tokenizer.cs : added IsKeyword().
14647         * doc.cs : Detect keyword incorrectly used as identifier.
14648           Allow identifiers prefixed by @.
14649
14650 2005-03-10  Marek Safar  <marek.safar@seznam.cz>
14651
14652         * attributes.cs (Attributes.Emit): Continue after CheckTargets.
14653         It caused exception in namespace resolving (again!).
14654         
14655         * class.cs (Class.ctor): Removed exit.
14656         (PropertyMethod.ctor): ditto.
14657         
14658         * codegen.cs (Codegen.Reset): Reset static data.
14659         (Codegen.ResolveTopBlock): Forward error status from ResolveMeta.
14660         
14661         * cs-tokenizer.cs (Cleanup): Removed.
14662         
14663         * driver.cs (GetSystemDir): Rewrote to one line command.
14664         It caused problem with unloaded dynamic modules.
14665         (UnixParseOption): Removed Exit.
14666         (CompilerCallableEntryPoint.InvokeCompiler): Make static.
14667         (CompilerCallableEntryPoint.Reset): Reset suitable static data.
14668         Now can be mcs used as library.
14669         
14670         * ecore.cs (Expression.ResolveBoolean): Use Location.Null for
14671         empty location.
14672         
14673         * location.cs (Reset): Reset static data.
14674         
14675         * namespace.cs (Reset): Reset static data.
14676         
14677         * report.cs (Report.Reset): Reset static data.
14678         
14679         * rootcontext.cs (RootContext.Reset): Reset static data.
14680         
14681         * tree.cs (RootTypes.ctor): Use Location.Null
14682         
14683         * typemanager.cs (TypeManager.Reset): Reset static data.
14684         (CoreLookupType): Removed Exit.
14685         (TypeHandle.Reset): Reset static data.
14686         
14687 2005-03-10  Raja R Harinath  <rharinath@novell.com>
14688
14689         Fix #73516.
14690         * typemanager.cs (ComputeNamespaces): Import namespaces from
14691         referenced modules too.
14692
14693 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14694
14695         * class.cs (TypeContainer.AddToMemberContainer): Use "." rather
14696         than '.'.
14697
14698 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14699
14700         * decl.cs (DeclSpace.LookupType): Don't loop but recurse into
14701         enclosing DeclSpace.  This ensures that a name-lookup populates
14702         more caches and there are fewer 'TypeExpression's.  Carve out
14703         nested type lookup into ...
14704         (LookupNestedTypeInHierarchy): ... this.
14705
14706 2005-03-09  Raja R Harinath  <rharinath@novell.com>
14707
14708         Clean up a few partial-class semantics.  
14709         Fixes test-357.cs and cs1618-2.cs.
14710         * cs-parser.jay (struct_declaration): Use 'current_class' as
14711         parent of newly-created struct.  Remove call to Register ().
14712         Use 'pop_current_class' to complete handing the current struct.
14713         (interface_declaration): Likewise.
14714         (class_declaration): Likewise.
14715         (enum_declaration): Use 'current_class' as parent of newly created
14716         enum.
14717         (delegate_declaration): Likewise.
14718         (pop_current_class): New function.  This is used to handle closing
14719         up the 'current_class' and 'current_container', and pointing them
14720         to the enclosing class/container.
14721         (CSharpParser): Initialize 'current_class' too.
14722         * decl.cs (MemberCore): Add check for invariant: a partial
14723         container is not a parsed entity, and thus does not enclose any
14724         parsed members.
14725         (DeclSpace.TypeResolveEmitContext): Expose 'type_resolve_ec'.
14726         (DeclSpace.BaseTypeExpr): Use it.
14727         (DeclSpace.LookupType): Add check for invariant.
14728         * class.cs (TypeContainer): Add check for invariant: a nested
14729         class should have the same NamespaceEntry as its enclosing class.
14730         (TypeContainer.EmitFieldInitializers): Make virtual.
14731         (TypeContainer.DefineDefaultConstructor): Adhere to invariant in
14732         MemberCore.
14733         (TypeContainer.Register): Remove.
14734         (TypeContainer.DefineType): Set the 'ec' of a PartialContainer to
14735         null.  Use TypeResolveEmitContext for resolving base types and
14736         interfaces.  Move initialization of Parts.TypeBuilder here from
14737         ...
14738         (TypeContainer.DefineNestedTypes): ... here.
14739         (PartialContainer): Take a Namespace not a NamespaceEntry.
14740         (PartialContainer.Create): Don't use Register.  Call the
14741         appropriate Add... function directly.
14742         (ClassPart): Take both the PartialContainer and the enclosing
14743         class as constructor arguments.
14744         (ClassPart.EmitFieldInitializers): Override.
14745         (ClassPart.PartFindNestedTypes): Remove.
14746         (FieldBase.GetInitializerExpression): Resolve the initializer
14747         expression in the emit context of the enclosing class.
14748         * tree.cs (RootTypes): Remove Register ().
14749         
14750 2005-03-08  Marek Safar  <marek.safar@seznam.cz>
14751
14752         * cs-parser.jay: Removed CS0134.
14753         
14754         * driver.cs: Removed CS1901.
14755         
14756         * expression.cs (SizeOf.DoResolve): Don't report CS0233
14757         for predefined types.
14758
14759 2005-03-07  Duncan Mak  <duncan@novell.com>
14760
14761         * codegen.cs (Save):  Catch UnauthorizedAccessException as
14762         well. Fixes bug #73454.
14763
14764 2005-03-07  Marek Safar  <marek.safar@seznam.cz>
14765
14766         * cs-tokenizer.cs (xtoken): Add CS1035.
14767         
14768         * class.cs (MethodData.Define): Add CS0683.
14769         (FieldMember.ctor): Add CS0681.
14770
14771 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14772
14773         * ecore.cs (SimpleName.DoResolve): Rename from
14774         SimpleName.DoResolveAllowStatic.
14775         (SimpleName.DoSimpleNameResolve): Remove 'allow_static' argument.
14776         Pass 'intermediate' flag to MemberStaticCheck.
14777         (SimpleName.MemberStaticCheck): Skip "static check" only in case
14778         of "intermediate" lookups via MemberAccess.
14779         (SimpleName.IdenticalNameAndTypeName): New.  Carved out of ...
14780         * expression.cs (MemberAccess.IdenticalNameAndTypeName): ... this.
14781
14782 2005-03-07  Raja R Harinath  <rharinath@novell.com>
14783
14784         Fix #73394.
14785         * ecore.cs (FieldExpr.EmitInstance): Catch cases of CS0120 that
14786         slipped in because of variable names that are identical to a
14787         builtin type's BCL equivalent ('string String;', 'int Int32;').
14788         (PropertyExpr.EmitInstance): Likewise.
14789
14790 2005-03-04  Marek Safar  <marek.safar@seznam.cz>
14791
14792         * cs-tokenizer.cs (PreProcessPragma): Add warning 1633, 1635.
14793         
14794         * report.cs (warning_ignore_table): Made public.
14795
14796 2005-03-04  Raja R Harinath  <rharinath@novell.com>
14797
14798         Fix #73282.
14799         * class.cs (MethodData.Emit): Pass 'container' to
14800         container.GetObsoleteAttribute instead of 'container.Parent'.
14801
14802 2005-03-03  Marek Safar  <marek.safar@seznam.cz>
14803
14804         * cs-parser.jay: Add 1534 error test.
14805
14806         * iterators.cs (Yield.CheckContext): Add error 1629.
14807         (Iterator.ctor): Save unsafe modifier.
14808         (MoveNextMethod.DoEmit): Restore unsafe context.
14809
14810         * namespace.cs (UsingAlias): Better error message.
14811
14812 2005-03-03  Dan Winship  <danw@novell.com>
14813
14814         * convert.cs (Error_CannotImplicitConversion): fix two bugs in
14815         the warning message [#73219]
14816
14817 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14818
14819         Fix compile with MCS 1.0.0.0.
14820         * cs-tokenizer.cs (PreProcessPragma): Simplify w_disable and
14821         w_restore to not depend on string constant folding.
14822
14823 2005-03-03  Raja R Harinath  <rharinath@novell.com>
14824
14825         * decl.cs (DeclSpace.LookupType): Remove 'silent' argument.  Move
14826         CS0246 check to users who passed 'silent = false'.
14827         * ecore.cs (TypeLookupExpression.DoResolveAsTypeStep): Add CS0246
14828         check.
14829         (SimpleName.SimpleNameResolve): Update.
14830         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0246 check.
14831         (MemberAccess.IdenticalNameAndTypeName): Update.
14832         * doc.cs (FindDocumentedTypeNonArray): Update.
14833
14834 2005-03-03  Raja R Harinath  <rharinath@novell.com>     
14835
14836         * codegen.cs (EmitContext): Remove ResolvingTypeTree.
14837         * parameters.cs (ComputeAndDefineParameters): Remove.
14838         * decl.cs (ResolveBaseTypeExpr): Don't set ResolvingTypeTree.
14839         * delegate.cs (Define): Don't invoke ComputeAndDefineParameters.
14840         Use GetParameterInfo.
14841
14842 2005-03-02  Marek Safar  <marek.safar@seznam.cz>
14843
14844         * report.cs (StaticClass.DefineContainerMembers): Add warning 628.
14845
14846 2005-03-02  Raja R Harinath  <rharinath@novell.com>
14847
14848         Unify DeclSpace.LookupType and DeclSpace.FindType.
14849         * decl.cs (DeclSpace.FindNestedType): New virtual function.  This
14850         is in charge of defining nested types on demand.
14851         (DeclSpace.LookupType): Use it when the current_type is a
14852         TypeBuilder.  Use LookupTypeDirect for reflected types.
14853         (DeclSpace.FindType): Remove.
14854         (DeclSpace.LookupInterfaceOrClass): Likewise.
14855         (DeclSpace.DefineTypeAndParents): Likewise.
14856         * ecore.cs (SimpleName.ResolveAsTypeStep): Just call
14857         DeclSpace.LookupType.
14858         * doc.cs (FindDocumentedTypeNonArray): Use DeclSpace.LookupType.
14859         * typemanager.cs (LookupType): Simplify.
14860         (AddUserType): Remove type from negative_hits.
14861         * namespace.cs (Namespace.Lookup): Use TypeManager.LookupTypeDirect.
14862         * class.cs (TypeContainer.FindMembers): Move handling of nested
14863         types ...
14864         (TypeContainer.FindMembers_NestedTypes): ... here.
14865         (TypeContainer.FindNestedType): Implement override.
14866         (ClassPart.FindNestedType): Delegate to PartialContainer.
14867         (ClassPart.PartFindNestedType): Looks up the nested types of the
14868         part alone.
14869
14870 2005-03-02  Martin Baulig  <martin@ximian.com>
14871
14872         * class.cs (TypeContainer.DoDefineMembers): We also need a default
14873         static constructor in static classes.
14874
14875 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
14876
14877         * attribute.cs: Pass -1 to DefineLPArrayInternal if sizeConst or
14878         sizeParamIndex is not specified.
14879
14880 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
14881
14882         Fix #73117
14883         * report.cs (WarningMessage.IsEnabled): Missing null check.
14884
14885 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14886
14887         * attribute.cs (DefinePInvokeMethod): Fix, all data are stored
14888         in the fields and not in the properties.
14889
14890 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
14891
14892         * attribute.cs (GetMarshal): Marshal SizeConst and SizeParamIndex 
14893         fields as well.
14894
14895 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14896
14897         * attribute.cs: Small refactoring (improved robustness).
14898         (ImplOptions, UnmanagedType, UsageAttribute): Removed members.
14899         (ValidateGuid): Removed.
14900         (Resolve): Removed referenced to above mentioned.
14901         (GetAttributeUsage): Made private and changed to work without
14902         class assistance.
14903         (GetIndexerAttributeValue): Don't crash.
14904         (GetConditionalAttributeValue): Ditto.
14905         (GetClsCompliantAttributeValue): Ditto.
14906         (ExtractSecurityPermissionSet): All attributes exceptions are
14907         error 648.
14908         (GetPropertyValue): New helper.
14909         (GetMethodImplOptions): New method.
14910         (DefinePInvokeMethod): Reuse common code. Implemented handling of
14911         some missing properties.
14912         
14913         * class.cs (ClassOrStruct.ApplyAttributeBuilder): Updated.
14914         (Method.ApplyAttributeBuilder): Updated.
14915         
14916         * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't catch shared
14917         exception.
14918
14919 2005-02-28  Raja R Harinath  <rharinath@novell.com>
14920
14921         Fix #73052.
14922         * report.cs (Report.SymbolRelatedToPreviousError): Handle
14923         non-simple types (array, pointer, reference).
14924
14925 2005-02-28  Marek Safar  <marek.safar@seznam.cz>
14926
14927         * cs-parser.jay: Add errors 1617, 650, 1007, 531, 547, 548
14928
14929         * class.cs (MethodCore.IsDuplicateImplementation): Special error
14930         for operators.
14931         (Method.CheckBase): Catch wrong destructor here.
14932         (MethodData.Define): Add errors 550, 668.
14933
14934         * cs-tokenizer.cs (PreProcessPragma): Add warning 1634.
14935
14936         * ecore.cs (PropertyExpr.DoResolveLValue): Fixed wrong error code.
14937
14938         * pending.cs (VerifyPendingMethods): Add error 551.
14939
14940         * typemanager.cs (CSharpName): Next error report helper.
14941
14942 2005-02-25  Marek Safar  <marek.safar@seznam.cz>
14943
14944         * attribute.cs (Atttribute.Resolve): Add cache for parameter-less
14945         attributes. Removed useless attribute double check.
14946         It saves almost 2MBs for corlib.
14947
14948 2005-02-25  Raja R Harinath  <rharinath@novell.com>
14949
14950         Fix #72924.
14951         * statement.cs (ExpressionStatement.Resolve): Make robust to being
14952         called twice in case of error.
14953
14954 2005-02-23  Chris Toshok  <toshok@ximian.com>
14955
14956         Fix compiler portions of #72827.
14957         * statement.cs (Block.Emit): call Begin/EndScope on the
14958         EmitContext instead of the ILGenerator.
14959
14960         * codegen.cs (EmitContext.BeginScope): new method, call
14961         ILGenerator.BeginScope as well as the SymbolWriter's OpenScope (if
14962         we have one.)
14963         (EmitContext.BeginScope): same, but EndScope and CloseScope
14964
14965         * symbolwriter.cs (SymbolWriter.OpenScope): get the current il
14966         offset and call the superclass's OpenScope(int) with it.
14967         (SymbolWriter.CloseScope): get the current il
14968         offset and call superclass's CloseScope(int) with it.
14969
14970 2005-02-23  Marek Safar  <marek.safar@seznam.cz>
14971
14972         * anonymous.cs (AnonymousMethod.Compatible): Fixed to report
14973         CS1677 for out and ref as well.
14974
14975         * class.cs (Method.Define): Add error CS1599 detection.
14976         
14977         * cs-parser.jay: Add CS1609, CS1670, CS1627 detection.
14978         
14979         * cs-tokenizer.cs (xtoken): Add error CS1646 detection.
14980         
14981         * delegate.cs (Delegate.Define): Add error CS1599 detection.
14982         
14983         * support.cs.cs (ModifierDesc): New helper method.
14984
14985 2005-02-23  Raja R Harinath  <rharinath@novell.com>
14986             Abin Thomas  <projectmonokochi@rediffmail.com>
14987             Anoob V E  <projectmonokochi@rediffmail.com>
14988             Harilal P R  <projectmonokochi@rediffmail.com>
14989
14990         Fix #57851, #72718.
14991         * class.cs (ConstructorBuilder.Resolve): Make sure that the second
14992         MemberLookup (used for error reporting) actually returns a result.
14993         Fix error report number (122, not 112).
14994
14995 2005-02-22  Abin Thomas  <projectmonokochi@rediffmail.com>
14996             Anoob V E  <projectmonokochi@rediffmail.com>
14997             Harilal P R  <projectmonokochi@rediffmail.com>
14998
14999         Fix #71134.
15000         * pending.cs (PendingImplementation.GetAbstractMethods):
15001         Find NonPublic members too.
15002
15003 2005-02-22  Marek Safar  <marek.safar@seznam.cz>
15004
15005         * expression.cs.cs (ConditionalLogicalOperator.DoResolve):
15006         Fixed error 217.
15007         
15008         * class.cs (MethodCore.CheckMethodAgainstBase):
15009         Add error 239 report.
15010
15011 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15012
15013         Fix #68955.
15014         * expression.cs (Invocation.IsApplicable): Make public.
15015         (Invocation.IsParamsMethodApplicable): Likewise.
15016         * delegate.cs (Delegate.VerifyApplicability): Don't use
15017         Invocation.VerifyArgumentCompat for parameter applicability
15018         testing.  Use Invocation.IsApplicable and
15019         Invocation.IsParamsMethodApplicable.
15020
15021 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15022
15023         * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
15024         
15025         * class.cs (Operator.Define): Add error 217 report.
15026         
15027 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15028
15029         * namespace.cs (UsingEntry.Resolve): Undo change below.
15030
15031 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15032
15033         Fix #72756.
15034         * ecore.cs (Expression.MemberLookupFailed): Add argument to
15035         disable the error message when the extended MemberLookup also
15036         fails.
15037         (Expression.MemberLookupFinal): Update.
15038         (SimpleName.DoSimpleNameResolve): Update.
15039         * expression.cs (MemberAccess.ResolveNamespaceOrType):
15040         Don't use MemberLookupFinal.
15041         (New.DoResolve): Update.
15042         (BaseAccess.CommonResolve): Update.
15043
15044 2005-02-21  Raja R Harinath  <rharinath@novell.com>
15045
15046         Fix #72732.
15047         * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
15048         occured previously, don't resolve again.
15049
15050 2005-02-21  Marek Safar  <marek.safar@seznam.cz>
15051
15052         Fix #69949
15053         * attribute.cs (Attribute.GetAttributeUsage): Add EmitContext
15054         argument. Call ResolveAttributeUsage for unresolved.
15055         when types doesn't match ctor arguments.
15056         
15057         * class.cs (DoDefineMembers.TypeContainer): Removed safety check
15058         for nested attribute classes.
15059         (Class.attribute_usage): Removed.
15060         (Class.ResolveAttributeUsage): Resolves AttributeUsageAttribute
15061         for attribute class.
15062         
15063         * ecore.cs (IsAttribute): Removed.
15064         
15065         * namespace.cs (UsingEntry.Resolve): Don't destroy NamespaceEntry.
15066         
15067         * rootcontext.cs (RegisterAttribute): Removed, attributes are
15068         now normal types.
15069         (attribute_types): Removed.
15070         (EmitCode): Global attributes are emited as the latest.
15071
15072 2005-02-18  Marek Safar  <marek.safar@seznam.cz>
15073
15074         * class.cs (EmitFieldInitializers): Don't emit field initializer
15075         for default values when optimilization is on.
15076         
15077         * constant.cs (Constant.IsDefaultValue): New property.
15078         
15079         * driver.cs: Add /optimize handling.
15080         
15081         * constant.cs,
15082         * ecore.cs,
15083         * literal.cs: Implement new IsDefaultValue property.
15084         
15085         * rootcontext.cs (Optimize): New field, holds /optimize option.
15086
15087 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15088
15089         Fix crasher in re-opened #72347.
15090         * namespace.cs (Namespace.Lookup): Return null if
15091         DeclSpace.DefineType returns null.
15092
15093         Fix #72678.
15094         * expression.cs (Argument.Resolve): Handle a case of CS0120 here.
15095
15096 2005-02-18  Raja R Harinath  <rharinath@novell.com>
15097
15098         Fix remainder of #63202.  Change semantics of DoResolveLValue: it
15099         now returns null if it cannot resolve to an lvalue.
15100         * ecore.cs (Expression.DoResolveLValue): Return 'null' by default.
15101         (Expression.ResolveLValue): Emit CS0131 error if DoResolveLValue
15102         returned null.  Remove check for SimpleName.
15103         (EventExpr.DoResolveLValue): New.
15104         * iterators.cs (Iterator.FieldExpression.DoResolveLValue): New.
15105         * expression.cs (Argument.Error_LValueRequired): New.  Move CS1510
15106         error from ...
15107         (Argument.Resolve): ... here.  Use it.  Use DoResolveLValue to
15108         avoid CS0131 error.
15109         (Unary.ResolveOperator): Move CS0211 check ...
15110         (Unary.DoResolve): ... here.  Use DoResolveLValue to avoid
15111         CS0131 error.
15112         (Unary.DoResolveLValue): Simplify.
15113         (AddressOf.DoResolveLValue): New.
15114         (ArrayAccess.DoResolveLValue): New.
15115
15116 2005-02-16  Marek Safar  <marek.safar@seznam.cz>
15117
15118         * attribute.cs (Attribute.Resolve): Add arguments casting for
15119         when types doesn't match ctor arguments.
15120
15121 2005-02-16  Raja R Harinath  <rharinath@novell.com>
15122
15123         Fix parts of #63202.
15124         * expression.cs (UnaryMutator.ResolveOperator): Remove redundant
15125         lookup of operator in base type.  Ensure that all checks happen
15126         when the operator resolves to an "op_..." method.
15127
15128 2005-02-15  Raja R Harinath  <rharinath@novell.com>
15129
15130         Fix #71992.
15131         * namespace.cs (NamespaceEntry.LookupNamespaceOrType): Add
15132         'ignore_cs0104' parameter.  Pass it to ...
15133         (NamespaceEntry.Lookup): ... this.
15134         * decl.cs (DeclSpace.LookupType): Add 'ignore_cs0104' parameter.
15135         * ecore.cs (SimpleName.ResolveAsTypeStep): Update.
15136         (TypeLookupExpression.DoResolveAsTypeStep): Update.
15137         * expression.cs (MemberAccess.IdenticalNameAndTypeName):
15138         Update.  Request that cs0104 errors be ignored.
15139         (ComposedCast.ResolveAsTypeStep): Update.
15140
15141 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15142
15143         Fix #59209.
15144         * expression.cs (Invocation.BetterFunction): Remove support for
15145         comparing virtual functions and their overrides.
15146         (Invocation.IsOverride): New.
15147         (Invocation.OverloadResolve): Don't consider 'override' functions
15148         during candidate selection.  Store them in a lookaside list.
15149         If the selected method is a 'virtual' function, use the list to
15150         find any overrides that are closer to the LHS type.
15151
15152 2005-02-14  Marek Safar  <marek.safar@seznam.cz>
15153
15154         * expression.cs (New.DoResolve): Add complex core type reduction.
15155         (New.Constantify): Converts complex core type syntax like 'new int ()'
15156         to simple constant.
15157         
15158 2005-02-14  Raja R Harinath  <rharinath@novell.com>
15159
15160         * decl.cs (EntryType.EntryType): New constructor to create an
15161         updated copy of a cache entry.
15162         (MemberCache.AddMethods): Use it.
15163         (MemberCache.ClearDeclaredOnly): Remove.
15164         (MemberCache.MemberCache): Update.
15165
15166 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15167
15168         * codegen.cs (EmitContext): Introduce the `MethodIsStatic'
15169         variable.  This one is represents the actual low-level declaration
15170         of the method, as opposed to the semantic level `IsStatic'.   
15171
15172         An anonymous method which is hosted into a static method might be
15173         actually an instance method.  IsStatic would reflect the
15174         container, while MethodIsStatic represents the actual code
15175         generated.
15176
15177         * expression.cs (ParameterReference): Use the new MethodIsStatic
15178         instead of IsStatic.
15179
15180         * anonymous.cs (AnonymousMethod.Compatible): Pass the
15181         Modifiers.STATIC to the Anonymous' Method EmitContext if static is
15182         set on the current EmitContext. 
15183
15184         * expression.cs (Cast): Overload DoResolveLValue so we can pass
15185         resolve our casted expression as an LValue.  This triggers the
15186         proper LValue processing that is later required by Assign.
15187
15188         This fixes 72347.
15189
15190         * cs-tokenizer.cs (pp_and): recurse on pp_and, fixes #61903.
15191
15192 2005-02-11  Marek Safar  <marek.safar@seznam.cz>
15193
15194         C# 2.0 Fixed buffer implementation
15195
15196         * anonymous.cs: Update after RegisterHelperClass renaming.
15197
15198         * attribute.cs (AttributeTester.fixed_buffer_cache):
15199         Cache of external fixed buffers.
15200         (AttributeTester.GetFixedBuffer): Returns IFixedBuffer
15201         implementation if field is fixed buffer else null.
15202
15203         * class.cs
15204         (TypeContainer.AddField): Accept FieldMember instead of Field.
15205         (FieldBase.IsFieldClsCompliant): Extracted code from
15206         VerifyClsCompliance descendant customization.
15207         (FixedField): New class handles fixed buffer fields.
15208         (FixedFieldExternal): Keeps information about imported fixed
15209         buffer.
15210         (IFixedField): Make access to internal or external fixed buffer
15211         same.
15212
15213         * cs-parser.jay: Add fixed buffer parsing.
15214
15215         * ecore.cs (FieldExpr.Emit): Add special emit case for fixed
15216         buffer.
15217
15218         * expression.cs (Indirection): Extended implementation to accept
15219         fixed buffer field.
15220         (PointerArithmetic.Emit): Get element from fixed buffer as well.
15221         (ElementAccess.MakePointerAccess): Get type as parameter.
15222         (DoResolve): Add fixed buffer field expression conversion.
15223         (DoResolveLValue): Ditto.
15224         (FixedBufferPtr): New class. Moved most of original ArrayPtr.
15225         (ArrayPtr): Derives from FixedBufferPtr.
15226         (ArrayPtr.Emit): Add extra emit for array elements.
15227
15228         * flowanalysis.cs.cs (StructInfo): Use FieldMember.
15229
15230         * rootcontext.cs (CloseTypes): Emit CompilerGenerated attribute
15231         for compiler generated types.
15232         (RegisterCompilerGeneratedType): Renamed from RegisterHelperClass.
15233
15234         * statement.cs (Fixed): Refactored to be easier add fixed buffer
15235         and consume less memory.
15236         (Fixed.Resolve): Add fixed buffer case.
15237
15238         * typemanager.cs (compiler_generated_attr_ctor,
15239         fixed_buffer_attr_ctor): Add new 2.0 compiler attributes.
15240         (HasElementType): Add our own implementation to work on every
15241         runtime.
15242
15243 2005-02-11  Miguel de Icaza  <miguel@novell.com>
15244
15245         * anonymous.cs (CaptureContext): Track whether `this' has been
15246         referenced.   
15247
15248         * expression.cs (This.ResolveBase): Call CaptureThis.  Before we
15249         only captured `this' if it was implicitly done (instance
15250         methods/variables were used). 
15251
15252         * codegen.cs (EmitContext.CaptureThis): New method to flag that
15253         `this' must be captured.
15254
15255 2005-01-30  Miguel de Icaza  <miguel@novell.com>
15256  
15257         * anonymous.cs (CreateMethodHost): If there Scope.ScopeTypeBuilder
15258         is null it means that there has been no need to capture anything,
15259         so we just create a sibling.
15260
15261         Renamed `EmitHelperClasses' to `EmitAnonymousHelperClasses'
15262
15263         Just a partial fix.  The other half is fairly elusive.
15264         
15265 2005-02-10  Raja R Harinath  <rharinath@novell.com>
15266
15267         Fix #52586, cs0121-4.cs.
15268         * decl.cs (MemberCache.DeepCopy): Rename from SetupCache.  Take
15269         and return a hashtable.
15270         (MemberCache.ClearDeclaredOnly): New.
15271         (MemberCache.MemberCache): Update to change.  Make a deep copy of
15272         the method_hash of a base type too.
15273         (MemberCache.AddMethods): Adapt to having a deep copy of the base
15274         type methods.  Overwrite entries with the same MethodHandle so
15275         that the ReflectedType is correct.  The process leaves in base
15276         virtual functions and their overrides as distinct entries.
15277         (CacheEntry): Now a class instead of a struct.  It shouldn't alter
15278         matters since it was boxed in a ArrayList before.
15279         (CacheEntry.Member, CacheEntry.EntryType): Remove 'readonly'
15280         modifier.
15281         * expression.cs (Invocation.BetterFunction): Simplify.  Handle the
15282         case of a virtual function and its override (choose the overload
15283         as better).
15284         (Invocation.OverloadResolve): Avoid 'override' members during
15285         'applicable_type' calculation.
15286
15287 2005-02-09  Raja R Harinath  <rharinath@novell.com>
15288
15289         Combine two near-redundant caches.
15290         * typemanager.cs (method_params): Rename from method_internal_params.
15291         (TypeManager.GetParameterData): New.  Replace
15292         Invocation.GetParameterData.
15293         (TypeManager.LookupParametersByBuilder): Remove.
15294         * expression.cs (Invocation.method_parameter_cache): Remove.
15295         (Invocation.GetParameterData): Remove.
15296         Update to changes.
15297         * anonymous.cs, attribute.cs, convert.cs, delegate.cs:
15298         Update to changes.
15299
15300 2005-02-08  Raja R Harinath  <rharinath@novell.com>
15301
15302         Fix #72015.
15303         * delegate.cs (Delegate.DefineType): When bootstrapping corlib, if
15304         TypeManager.multicast_delegate_type is null, resolve it by looking
15305         up "System.MulticastDelegate".
15306         * rootcontext.cs (RootContext.ResolveCore): Simplify.
15307
15308 2005-02-07  Abin Thomas (NOSIP)  <projectmonokochi@rediffmail.com>
15309             Anoob V.E (NOSIP)  <projectmonokochi@rediffmail.com>
15310             Harilal P.R (NOSIP)  <projectmonokochi@rediffmail.com>
15311
15312         Fix cs0164.cs.
15313         * statement.cs (LabeledStatement.Resolve): Don't set 'referenced'.
15314         (LabeledStatement.AddReference): New.  Set 'referenced'.
15315         (Goto.Resolve): Use it.
15316
15317 2005-02-05  John Luke  <john.luke@gmail.com>
15318
15319         * driver.cs: remove duplicate -doc line in Usage ()
15320
15321 2005-02-04  Raja R Harinath  <rharinath@novell.com>
15322
15323         * location.cs (Location.AddFile): Fix CS2002 error report.
15324
15325 2005-02-02  Martin Baulig  <martin@ximian.com>
15326
15327         * delegate.cs (Delegate.DefineType): Report an internal error if
15328         TypeManager.multicast_delegate_type is null.  See bug #72015 for
15329         details.        
15330
15331 2005-02-02  Raja R Harinath  <rharinath@novell.com>
15332
15333         Fix a crasher in a variant of #31984.
15334         * const.cs (Constant.CheckBase): New override that defers the
15335         new-or-override check in case the base type hasn't been populated
15336         yet.
15337         (Constant.Define): Ensure the new-or-override check is performed.
15338
15339 2005-02-01  Duncan Mak  <duncan@ximian.com>
15340
15341         * const.cs (LookupConstantValue): Check that `ce' is not null
15342         before calling GetValue ().
15343
15344 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15345
15346         Fix test-334.cs (#69519).
15347         * cs-parser.jay (using_alias_directive): Pass in an expression to
15348         NamespaceEntry.UsingAlias.
15349         (using_namespace_directive): Pass in an expression to
15350         NamespaceEntry.Using.
15351         (namespace_name): Don't flatten to a string.
15352         * namespace.cs (NamespaceEntry.AliasEntry): Store an expression.
15353         (NamespaceEntry.AliasEntry.Resolve): Lookup using
15354         ResolveAsTypeStep.
15355         (NamespaceEntry.UsingEntry): Likewise.
15356         (NamespaceEntry.Using,NamespaceEntry.UsingAlias): Update to
15357         changes.
15358         (NamespaceEntry.LookupForUsing): Remove.
15359         (NamespaceEntry.LookupNamespaceOrType): Add support for dotted
15360         names.
15361         (NamespaceEntry.Lookup): Remove support for dotted names.
15362
15363 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15364
15365         * namespace.cs (NamespaceEntry.NamespaceEntry): Simplify, and
15366         split into two.
15367         (NamespaceEntry.ImplicitParent): Compute on demand.
15368         (NamespaceEntry.Doppelganger): New implicit namespace-entry that
15369         parallels the current.
15370         (NamespaceEntry.LookupForUsing): Use it.
15371         (NamespaceEntry.Lookup): If the current namespace-entry is
15372         implicit, don't search aliases and using tables.
15373
15374 2005-02-01  Raja R Harinath  <rharinath@novell.com>
15375
15376         Fix #31984.
15377         * class.cs (TypeContainer.DoDefineMembers): Don't initialize
15378         BaseCache here.
15379         (TypeContainer.BaseCache): Compute on demand.
15380         (TypeContainer.FindMembers): Define constants and types if they're
15381         not already created.
15382         (FieldMember.Define): Move resetting of ec.InUnsafe before error
15383         check.
15384         * const.cs (Constant.Define): Make idempotent.
15385
15386 2005-01-29  Miguel de Icaza  <miguel@novell.com>
15387
15388         * pending.cs: Produce better code (no nops produced by using Ldarg
15389         + value).
15390         
15391         * pending.cs (PendingImplementation.DefineProxy): It was not `arg
15392         i - 1' it should be arg + 1.
15393
15394         Fixes bug #71819.
15395
15396 2005-01-28  Raja R Harinath  <rharinath@novell.com>
15397
15398         * attribute.cs (Attribute.CheckAttributeType): Make private
15399         non-virtual.
15400         (Attribute.ResolveType): Make virtual.
15401         (GlobalAttribute.ResolveType,GlobalAttribute.Resolve): Simplify
15402         handling of RootContext.Tree.Types.
15403
15404 2005-01-27  Raja R Harinath  <rharinath@novell.com>
15405
15406         Update attribute-handling to use the SimpleName/MemberAccess
15407         mechanisms.
15408         * cs-parser.jay (attribute): Pass in an expression to the
15409         constructors of Attribute and GlobalAttribute.
15410         * attribute.cs (Attribute): Take an expression for the name.
15411         (Attribute.ResolvePossibleAttributeTypes): New.  Resolves the
15412         passed in attribute name expression.
15413         (Attribute.CheckAttributeType): Use it.
15414         * ecore.cs (FullNamedExpression.ResolveAsTypeStep): New.
15415         * expression.cs (MemberAccess.ResolveAsTypeStep): Move body to ...
15416         (MemberAccess.ResolveNamespaceOrType): ... here.  Add 'silent'
15417         argument to prevent error messages if the lookup fails.
15418
15419 2005-01-27  Marek Safar  <marek.safar@seznam.cz>
15420
15421         * expression.cs (Indirection): Implemented IVariable interface
15422         to support indirection in AddressOf operator.
15423         (PointerArithmetic.Emit): Add optimalization for case where
15424         result can be precomputed.
15425
15426 2005-01-26  Martin Baulig  <martin@ximian.com>
15427
15428         * class.cs (TypeContainer.AttributeTargets): Return the correct
15429         AttributeTargets depending on our `Kind' instead of throwing an
15430         exception; fixes #71632.
15431
15432 2005-01-26  Marek Safar  <marek.safar@seznam.cz>
15433
15434         Fix #71257
15435         * expression.cs (MemberAccess.ResolveMemberAccess): Add CS0176 test for
15436         constant members.
15437
15438 2005-01-25  Raja R Harinath  <rharinath@novell.com>
15439
15440         Fix #71602.
15441         * expression.cs (MemberAccess.DoResolve): Don't complain with
15442         cs0572 when the LHS of a member access has identical name and type
15443         name.
15444
15445 2005-01-25  Marek Safar  <marek.safar@seznam.cz>
15446
15447         Fix #71651, #71675
15448         * attribute.cs (ExtractSecurityPermissionSet): Catch exceptions from
15449         CreatePermission.
15450         Create custom PermissionSet only for PermissionSetAttribute.
15451
15452 2005-01-24  Marek Safar  <marek.safar@seznam.cz>
15453
15454         Fix #71649
15455         * class.cs (StaticClass.DefineContainerMembers): Enable enums and
15456         delegates in static class.
15457
15458 2005-01-24  Martin Baulig  <martin@ximian.com>
15459
15460         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
15461         merging an implicit block, just use its reachability.
15462
15463         * statement.cs (Block.Resolve): Make the unreachable code check
15464         work wrt. implicit blocks; see test-337 from #63842.
15465
15466 2005-01-21  Alp Toker  <alp@atoker.com>
15467  
15468         * cs-parser.jay: destructor_declaration's container is PartialContainer
15469         not Class when partial types are used, so use Kind prop instead of
15470         'is'.
15471         
15472 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
15473
15474         * cs-parser.jay: Improve error reporting when an interface
15475         declares new types.
15476
15477 2005-01-20  Dick Porter  <dick@ximian.com>
15478
15479         * support.cs: SeekableStreamReader fix from Sandor Dobos
15480         (dobos_s@ibcnet.hu) to cope with Position setting when multibyte
15481         chars are read.  Fixes bug 70369.
15482
15483 2005-01-20  Raja R Harinath  <rharinath@novell.com>
15484
15485         * cs-parser.jay (catch_clause): Simplify current_block handling
15486         somewhat.
15487
15488 2005-01-17  Miguel de Icaza  <miguel@ximian.com>
15489
15490         * convert.cs (ImplicitStandardConversionExists): Synchronize the
15491         code with ImplicitStandardConversion to handle the implicit
15492         conversion of method groups into valid delegate invocations. 
15493
15494         The problem is that in parameter handling we were using this code
15495         path.  Fixes bug #64698
15496
15497 2005-01-19  Raja R Harinath  <rharinath@novell.com>
15498
15499         * cs-parser.jay: Fix several infelicities.
15500         - Avoid assigning to the parser value stack.  Code like 
15501           '$3 = null' is unclean.  Synthesize a value for the code block
15502           instead. 
15503         - Avoid using oob_stack for storing location information.  Use ...
15504         (_mark_): ... this.  New (empty) rule.  Saves the current location
15505         in $$.
15506         (foreach_statement): Avoid using oob_stack for current_block
15507         handling.  Use technique used in for_statement and
15508         using_statement.  Synthesize a value for the code block to store
15509         additional intermediate information.
15510
15511 2005-01-13  Miguel de Icaza  <miguel@ximian.com>
15512
15513         * ecore.cs (IsAccessorAccessible): Accessibility to private fields
15514         of a different type is only allowed to private fields of a
15515         containing type, not on fields of a base class.
15516
15517         See test-174.cs and error cs0122-9.cs
15518
15519 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15520
15521         Fix test-335.cs (bug #58126).
15522         * cs-parser.jay (argument): Split out non-expression parts of the
15523         rule into 'non_simple_argument'.
15524         (invocation_expression): Support parenthesized invocations with
15525         multiple arguments, and with single non-simple arguments.
15526
15527 2005-01-13  Raja R Harinath  <rharinath@novell.com>
15528
15529         * cs-tokenizer.cs (xtoken): Reset 'comments_seen' in a couple more
15530         places.
15531
15532 2005-01-12  Raja R Harinath  <rharinath@novell.com>
15533
15534         Fix cs0038-1.cs, cs1640-6.cs.
15535         * ecore.cs (Expression.Resolve): Remove special-case for
15536         SimpleName in error-handling.
15537         (Expression.almostMatchedMembers): Relax access permission to
15538         protected.
15539         (Expression.MemberLookupFailed): Handle duplicates in
15540         almostMatchedMembers list.
15541         (SimpleName.DoSimpleNameResolve): Catch CS0038 errors earlier.
15542         * expression.cs (New.DoResolve): Report CS1540 for more cases.
15543         * typemanager.cs (GetFullNameSignature): Use the MethodBase
15544         overload if the passed in MemberInfo is a MethodBase.
15545
15546 2005-01-12  Marek Safar  <marek.safar@seznam.cz>
15547
15548         Fix #70749
15549         * attribute.cs (ExtractSecurityPermissionSet): Don't report error
15550         for non-CAS & merge permission sets properly.
15551
15552 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15553
15554         Improve standard-compliance of simple name and member access 
15555         resolution.  Fixes bugs #52697, #57200, #67520, #69519.
15556         * ecore.cs (FullNamedExpression): New abstract base class 
15557         for Namespaces and TypeExpressions.
15558         (ResolveFlags.SimpleName): Remove.
15559         (SimpleName): Remove support for dotted names.
15560         (SimpleName.ResolveAsTypeStep): Simplify.  Now just a wrapper to 
15561         DeclSpace.FindType and DeclSpace.LookupType.
15562         (SimpleName.DoSimpleNameResolve): Remove support for dotted names.
15563         (Expression.ExprClassName): Make member function.
15564         * expression.cs (MemberAccess.ResolveAsTypeStep): Support LHS being
15565         a namespace.  Remove creation of dotted "SimpleName"s.
15566         (MemberAccess.DoResolve): Likewise.
15567         * decl.cs (DeclSpace.Cache): Make private.
15568         (DeclSpace.LookupInterfaceOrClass): Return a FullNamedExpression.
15569         (DeclSpace.FindType): Update.
15570         (DeclSpace.LookupType): Move here from RootContext.  Return a 
15571         FullNamedExpression.
15572         * namespace.cs (Namespace): Derive from FullNamedExpression
15573         so that it can be part of expression resolution.
15574         (Namespace.Lookup): Return an FullNamedExpression.
15575         (NamespaceEntry.LookupAlias): Lookup aliases only in current
15576         namespace.
15577         * rootcontext.cs (NamespaceLookup): Remove.
15578         (LookupType): Move to DeclSpace.
15579         * attribute.cs (CheckAttributeType): Update.
15580         * doc.cs (FindDocumentedType): Remove allowAlias argument.
15581         (FindDocumentedTypeNonArray): Likewise.
15582
15583 2005-01-11  Raja R Harinath  <rharinath@novell.com>
15584
15585         Fix cs0509.cs, cs1632.cs.
15586         * class.cs (TypeContainer.GetNormalBases): Don't assume !IsClass
15587         is the same as IsInterface.
15588         (TypeContainer.GetClassBases): Likewise.
15589         * statement.cs (LabeledStatement.ig): New field.
15590         (LabeledStatement.LabelTarget): Save ILGenerator which created the
15591         label.
15592         (LabeledStatement.DoEmit): Check that the label was created with
15593         the same ILGenerator.
15594
15595 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15596
15597         Fix #71058
15598         * attribute.cs (GetMethodObsoleteAttribute): Need to transform
15599         accessors to its properties.
15600
15601         * ecore.cs (PropertyExpr): Add AccessorTable to help track back
15602         from accessors to property.
15603         
15604 2005-01-10  Marek Safar  <marek.safar@seznam.cz>
15605
15606         Fix #70722
15607         * class.cs (MethodCore.CheckBase): Test base method obsoleteness
15608         only for overrides.
15609         
15610 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
15611
15612         * attribute.cs: Check for null and empty strings.  
15613
15614         I have lost another battle to Paolo.
15615
15616 2005-01-07  Marek Safar  <marek.safar@seznam.cz>
15617
15618         Fix #70942
15619         * class.cs (PropertyMethod): Set Parent field in ctors.
15620         (SetMethod.InternalParameters): Add unsafe switch hack.
15621         Override MarkForDuplicationCheck where it is appropriate.
15622
15623         * decl.cs (MemberCore.MarkForDuplicationCheck): New method.
15624         It says whether container allows members with the same name.
15625         Base default is no.
15626         (DeclSpace.AddToContainer): Use MarkForDuplicationCheck.
15627         Removed is_method parameter.
15628
15629 2005-01-06  Duncan Mak  <duncan@ximian.com>
15630
15631         * cs-tokenizer.cs (xtoken): Redo the work for signaling CS1040
15632         because the previous change led to incorrect reporting of CS1032
15633         ("Cannot define/undefine preprocessor symbols after first token in
15634         file"). Instead of using `tokens_seen' as the only flag that
15635         triggers CS1040, introduce `comments_seen'. This new flag is used
15636         to signify having seen comments on the current line, so it is
15637         unset after a newline.
15638
15639 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15640
15641         * doc.cs : When searching for a type, find nested type too.
15642           This fixes bug #71040.
15643
15644 2005-01-06  Atsushi Enomoto  <atsushi@ximian.com>
15645
15646         * doc.cs :
15647           - Warn missing member comment on those classes which also does not
15648             have doc comments. Fixed bug #71041.
15649           - Don't warn missing doc comment on default constructor.
15650             Fixed bug #71042.
15651
15652 2005-01-06  Duncan Mak  <duncan@ximian.com>
15653
15654         * cs-tokenizer.cs (xtoken): After handling traditional C-style
15655         comments, set `tokens_seen' to true. This allows us to detect
15656         misplaced preprocessor directives (i.e. not at the beginning of
15657         the a line, nor after whitespaces). In that case, report error
15658         CS1040. This fixes bug #56460.
15659
15660         * cs-parser.jay (interface_member_declaration): Add checks for
15661         IsExplicitImpl, and report CS0541 error if an interface member is
15662         defined as an explicit interface declaration.
15663
15664 2005-01-06  Marek Safar  <marek.safar@seznam.cz>
15665
15666         Fix #70817
15667         * class.cs (PropertyMethod): Set Parent field in ctors.
15668         (SetMethod.InternalParameters): Add unsafe switch hack.
15669         
15670         * decl.cs (MemberCore.Parent): Cannot be readonly.
15671
15672 2005-01-06  Raja R Harinath  <rharinath@novell.com>
15673
15674         * decl.cs (DeclSpace.ResolveType): Remove.
15675         (DeclSpace.ResolveBaseTypeExpr): Rename from ResolveTypeExpr.
15676         Merge in code from ...
15677         (DeclSpace.GetTypeResolvingEmitContext): ... here.  Remove.
15678         * class.cs, enum.cs: Update to changes.
15679
15680 2005-01-06  Miguel de Icaza  <miguel@ximian.com>
15681
15682         * anonymous.cs: Ensure that we init the scope of our parent if it
15683         has not been initialized yet.
15684
15685 2004-12-30  Duncan Mak  <duncan@ximian.com>
15686
15687         * typemanager.cs (TypeManager.CheckStructCycles): Don't crash here
15688         if field.FieldBuilder is null. Fixes #70758.
15689
15690         * convert.cs: Fixed some typos and updated some of the comments.
15691         (ImplicitStandardConversionExists):
15692         (TryImplicitIntConversion): If `target_type' is an interface and
15693         the type of `ic' implements this interface, return true or a new
15694         BoxedCast instead of null. This fixes #70468.
15695
15696 2004-12-29  Duncan Mak  <duncan@ximian.com>
15697
15698         * expression.cs (Argument.Emit): Check that Expr is
15699         IMemoryLocation before casting to it, and report CS1510 otherwise.
15700
15701         This fixes #70402.
15702
15703 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15704
15705         * statement.cs (Block.ThisVariable): remove the recursion here, to
15706         make the --profile more sane.
15707
15708 2004-12-17  Carlos Cortez <calberto.cortez@gmail.com>
15709
15710         * driver.cs: Patch to handle a xsp bug that prevents to reference an .exe
15711         assembly, by JB Evain.
15712
15713 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15714
15715         * class.cs, decl.cs, ecore.cs, iterators.cs, pending.cs, 
15716           rootcontext.cs, typemanager.cs: Make nomenclature consistent.
15717         "parent" refers to enclosing type/class.  "base" refers to superclass.
15718
15719 2004-12-17  Raja R Harinath  <rharinath@novell.com>
15720
15721         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15722         Ensure that we only have GlobalAttributes.
15723         * attribute.cs (Attribute.Emit): Make non-virtual.
15724         (GlobalAttribute.Emit): Remove.
15725         (Attribute.Resolve): Make virtual.
15726         (GlobalAttribute.Resolve): New.  Set Rootcontext.Tree.Types.NamespaceEntry.
15727         (Attribute.GetConditionalAttributeValue): Take an EmitContext as
15728         the argument. Don't create one.
15729         (Attribute.GetObsoleteAttribute): Likewise.
15730         (Attribute.GetClsCompliantAttributeValue): Likewise.
15731         * class.cs, decl.cs: Update to changes.
15732
15733 2004-12-17  Marek Safar  <marek.safar@seznam.cz>
15734
15735         * delegate.cs (NewDelegate.DoResolve): Add error 149 report.
15736         
15737         * ecore.cs (Expression.MemberLookupFailed): Fixed error 143.
15738         
15739         * statement.cs (Foreach.Resolve): Add error 186 report.
15740
15741 2004-12-16  Marek Safar  <marek.safar@seznam.cz>
15742
15743         * expression.cs (Conditional.DoResolve): Add warning 429.
15744         
15745         * statement.cs (If.Resolve): Add warning 665.
15746
15747 2004-12-16  Raja R Harinath  <rharinath@novell.com>
15748
15749         New invariant: RootContext.Tree.Types.NamespaceEntry == null
15750         except when in the parser, and in GlobalAttribute.
15751         * driver.cs (MainDriver): Reset RootContext.Tree.Types.NamespaceEntry.
15752         * attribute.cs (GlobalAttribute.CheckAttributeType): Reset
15753         RootContext.Tree.Types.NamespaceEntry once work is done.
15754         (GlobalAttribute.Emit): New.  Wrapper for Attribute.Emit, but sets
15755         and resets RootContext.Tree.Types.NamespaceEntry.
15756
15757 2004-12-15  Marek Safar  <marek.safar@seznam.cz>
15758
15759         * cs-parser.jay: Don't create a block for every variable.
15760
15761 2004-12-14  Miguel de Icaza  <miguel@ximian.com>
15762
15763         * location.cs: Provide extra information.
15764
15765         * statement.cs: The instance is not `ldarg_0.THIS' when accessing
15766         variables from the captured environment, it is the ldarg_0.
15767
15768 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15769
15770         * cs-parser.jay: Changed warning level for 642 to 4 until Miguel
15771         find a conclusion.
15772         
15773         * class.cs: Changed warning level for 169 to avoid developer
15774         displeasure from warning flooding. It will be changed back when they
15775         fix most of current BCL warnings.
15776         
15777         * RootContext.cs: Pushed default WarningLevel to 3.
15778         
15779         * statement.cs: Removed unused variable.
15780
15781 2004-12-14  Marek Safar  <marek.safar@seznam.cz>
15782
15783         * class.cs (TypeContainer.GetClassBases): Add error 1521 report.
15784         (TypeContainer.MethodModifiersValid): Refactored to use MemberCore.
15785         Add error 502 report.
15786         (StaticClass.DefineType): Add error 441 report.
15787         (Class.AllowedModifiersProp): New virtual property as temporary
15788         extension to AllowedModifiers.
15789         (Class.DefineType): Add error 418 report. Moved ModFlags check here
15790         to share implementation with StaticClass and don't call virtual
15791         methods from ctor.
15792         
15793         * driver.cs (MainDriver): Add error 1558 test.
15794
15795         * parameter.cs (Parameter.ApplyAttributeBuilder): Add error 662
15796         report. Moved error 36 test here.
15797
15798         * statement.cs (Throw.Resolve): Add error 724 report.
15799
15800         * typemanager.cs: Add out_attribute_type core type.
15801         
15802 2004-12-13  Marek Safar  <marek.safar@seznam.cz>
15803
15804         * class.cs (TypeContainer.VerifyClsCompliance): Add error
15805         3018 report.
15806         (PropertyBase.VerifyClsCompliance): Add errror 3025 report.
15807
15808         * codegen.cs (ModuleClass.ApplyAttributeBuilder): Add error
15809         3017 report.
15810         
15811         * decl.cs (MemberCore.VerifyClsCompliance): Add warning 3021.
15812
15813         * parameter.cs (ReturnParameter.ApplyAttributeBuilder): 
15814         Add error 3023 report.
15815         (Parameter.ApplyAttributeBuilder): Add error 3022 report.
15816
15817         * tree.cs (RootTypes.IsClsCompliaceRequired): Add fake
15818         implementation.
15819
15820 2004-12-12  John Luke  <john.luke@gmail.com>
15821
15822         * driver.cs (AddArgs): take -- into account when
15823         adding arguments, fixes bug 65710 
15824
15825 2004-12-12  Martin Baulig  <martin@ximian.com>
15826
15827         * expression.cs (Unary.TryReduceNegative): Added support for
15828         SByteConstant and ByteConstant.
15829         (Unary.Reduce): Check error values from TryReduceNegative().
15830
15831 2004-12-10  Marek Safar  <marek.safar@seznam.cz>
15832
15833         * attributes.cs (Attribute.Resolve): Avoid multiple error report
15834         and report exception as error 182.
15835
15836 2004-12-10  Raja R Harinath  <rharinath@novell.com>
15837
15838         * driver.cs (Main): Fix message when there are warnings.
15839
15840 2004-12-09  Miguel de Icaza  <miguel@ximian.com>
15841
15842         * delegate.cs: Fixed my fix from yesterday, sorry about that.
15843
15844 2004-12-09  Marek Safar  <marek.safar@seznam.cz>
15845
15846         * anonymous.cs, class.cs, convert.cs, doc.cs, support.cs: 
15847         Reduced number of warnings.
15848         
15849         * class.cs (TypeContainer.VerifyClsCompliance): One if is enough.
15850
15851 2004-12-08  Miguel de Icaza  <miguel@ximian.com>
15852
15853         * driver.cs: Removed message.
15854
15855         * delegate.cs: Fix bug introduced in 1.1.x: 70219.
15856
15857 2004-12-08    <vargaz@freemail.hu>
15858
15859         * cs-tokenizer.cs: Add workaround for NET 2.0 beta 1 csc bug.
15860
15861 2004-12-08  Martin Baulig  <martin@ximian.com>
15862
15863         * class.cs (TypeContainer.VerifyClsCompliance): Report a CS3003
15864         instead of a CS3002 for properties and indexer.
15865
15866 2004-12-08  Martin Baulig  <martin@ximian.com>
15867
15868         * decl.cs (MemberName.ToString): Make this work again.
15869
15870 2004-12-08  Marek Safar  <marek.safar@seznam.cz>
15871
15872         * attribute.cs (Resolve): Add error 591 detection.
15873
15874         * class.cs (FieldMember.Define): Add error 1547 detection.
15875         (Indexer.Define): Add error 620 detection.
15876         (Operator.Define): Add error 590 detection.
15877
15878         * ecore.cs: Missing argument for error 79.
15879
15880         * expression.cs (ComposedCast.DoResolveAsTypeStep): Add error 611
15881         detection.
15882
15883 2004-12-07  Marek Safar  <marek.safar@seznam.cz>
15884
15885         Fix #70106
15886         * assign.cs.cs (Assign.DoResolve): Reports error 1648 for value types
15887         only.
15888
15889 2004-12-07  Atsushi Enomoto  <atsushi@ximian.com>
15890
15891         * cs-parser.jay : handle doc comments on implicit/explicit operators.
15892           Some operator comments were suppressed.
15893         * doc.cs : Implicit/explicit operator name in doc comments are like
15894           "op_Explicit(type)~returnType", so added suffix handling.
15895
15896 2004-12-07  Martin Baulig  <martin@ximian.com>
15897
15898         * decl.cs
15899         (MemberCore.GetObsoleteAttribute): Don't create a new EmitContext.
15900         (MemberCore.GetClsCompliantAttributeValue): Likewise.
15901         (DeclSpace.ec): New protected field; store the EmitContext here.
15902         (DeclSpace.EmitContext): New public property; moved here from
15903         `TypeContainer'.
15904         (DeclSpace.GetClsCompliantAttributeValue): Don't create a new
15905         EmitContext.
15906
15907         * enum.cs (Enum.Define): Store the EmitContext in the `ec' field.
15908         (Enum.Emit): Don't create a new EmitContext.
15909
15910         * delegate.cs (Delegate.DefineType): Always create the
15911         EmitContext.
15912
15913         * iterators.cs (Iterators.DefineIterator): Create a new
15914         EmitContext and store it in `ec'.
15915
15916 2004-08-24  Martin Baulig  <martin@ximian.com>
15917
15918         * typemanager.cs
15919         (TypeManager.IsSubclassOf): Renamed to IsFamilyAccessible; use
15920         this for accessibility checks.
15921         (TypeManager.IsSubclassOrNestedChildOf): Renamed to
15922         IsNestedFamilyAccessible.
15923         (TypeManager.IsSubclassOf): New method, do what the name actually
15924         says.   
15925
15926 2004-12-06  Raja R Harinath  <rharinath@novell.com>
15927
15928         Fix crash on cs0657-17.cs.
15929         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
15930         Use RootContext.Tree.Types, not 'new RootTypes ()'.
15931         * attribute.cs (GlobalAttribute.CheckAttributeType): Narrow down
15932         the case where the NamespaceEntry gets overwritten.
15933
15934 2004-12-06  Marek Safar  <marek.safar@seznam.cz>
15935
15936         Fixed #69195, #56821
15937         * ecore.cs (ResolveBoolean): Tiny refactoring.
15938
15939         * expression.cs (Binary.DoResolve): Add warning 429 and skipping
15940         of right expression resolving when left is false constant and
15941         operator is LogicalAnd OR true constant and operator is LogicalOr.
15942
15943         * statement.cs (ResolveUnreachable): Always reports warning.
15944
15945 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
15946
15947         * class.cs: Distinguish between 1721 and 1722 (just a little help
15948         for the programmer).
15949
15950 2004-12-03  Miguel de Icaza  <miguel@ximian.com>
15951
15952         * delegate.cs: Only allow this on new versions of the language. 
15953
15954 2004-12-02  Duncan Mak  <duncan@ximian.com>
15955
15956         * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
15957         Expression class.
15958         (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
15959         here as a static method. Take an additional bool out parameter
15960         `must_do_cs1540_check' for signaling to InstanceResolve.
15961         (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
15962         member field from PropertyExpr class and made it an argument of
15963         the method instead.
15964         (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
15965         check for MarshalByRefObject, and report CS0122 instead of CS1540.
15966         (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
15967         and `remove_accessor' as well as InstanceResolve: report CS0122
15968         where applicable.
15969
15970         Fixes #70129.
15971
15972 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15973
15974         Fix test-327.cs, test-328.cs, and put in early infrastructure
15975         for eventually fixing #52697.
15976         * namespace.cs (NamespaceEntry.LookupForUsing): New method.
15977         (NamespaceEntry.LookupNamespaceOrType): New method, refactored
15978         from other methods.
15979         (NamespaceEntry.Lookup): Remove 'ignore_using' flag.
15980         (AliasEntry.Resolve, UsingEntry.Resolve): Use 'LookupForUsing'.
15981         (VerifyUsing, error246): Update.
15982         * rootcontext.cs (RootContext.NamespaceLookup): Just use
15983         'NamespaceEntry.LookupNamespaceOrType'.
15984
15985 2004-12-03  Martin Baulig  <martin@ximian.com>
15986
15987         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
15988         method as our child, call AnonymousMethod.Compatible() on it.
15989
15990 2004-12-03  Raja R Harinath  <rharinath@novell.com>
15991
15992         Disable XML documentation support in 'basic' profile.
15993         * decl.cs, class.cs [BOOTSTRAP_WITH_OLDLIB]: Don't import System.Xml.
15994         Redirect XmlElement to System.Object.
15995         * driver.cs, enum.cs, rootcontext.cs: Don't reference System.Xml.
15996         * doc.cs [BOOTSTRAP_WITH_OLDLIB]: Disable compile.
15997         * mcs.exe.sources: Add doc-bootstrap.cs.
15998         * doc-bootstrap.cs: New file.  Contains empty stub implementation
15999         of doc.cs.
16000
16001 2004-12-03  Atsushi Enomoto  <atsushi@ximian.com>
16002
16003         * cs-tokenizer.cs : Only '////' is rejected. Other non-whitespace
16004           comments are allowed.
16005
16006 2004-12-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16007
16008         * delegate.cs: Add checks for subtypes in paramaters and return values
16009         in VerifyMethod () to add support for Covariance/Contravariance
16010         in delegates.
16011         
16012 2004-12-02  Miguel de Icaza  <miguel@ximian.com>
16013
16014         * report.cs: Remove extra closing parenthesis.
16015
16016         * convert.cs (Error_CannotImplicitConversion): If the name of the
16017         types are the same, provide some extra information.
16018
16019         * class.cs (FieldBase): Use an unused bit field from the field to
16020         encode the `has_offset' property from the FieldMember.  This saves
16021         a couple of Ks on bootstrap compilation.
16022
16023         * delegate.cs (NewDelegate.DoResolve): If we have an anonymous
16024         method as our child, return the AnonymousMethod resolved
16025         expression.
16026
16027         * expression.cs (New.DoResolve): Allow return values from
16028         NewDelegate to also include AnonymousMethods.
16029
16030         Fixes #70150.
16031
16032 2004-12-02  Marek Safar  <marek.safar@seznam.cz>
16033
16034         Fix bug #70102
16035         * attribute.cs (Resolve): Improved implementation of params
16036         attribute arguments.
16037
16038         * support.cs (ParameterData): Add HasParams to be faster.
16039
16040 2004-12-02  Atsushi Enomoto  <atsushi@ximian.com>
16041
16042         all things are for /doc support:
16043
16044         * doc.cs: new file that supports XML documentation generation.
16045         * mcs.exe.sources: added doc.cs.
16046         * driver.cs:
16047           Handle /doc command line option.
16048           Report error 2006 instead of 5 for missing file name for /doc.
16049           Generate XML documentation when required, after type resolution.
16050         * cs-tokenizer.cs:
16051           Added support for picking up documentation (/// and /** ... */),
16052           including a new XmlCommentState enumeration.
16053         * cs-parser.jay:
16054           Added lines to fill Documentation element for field, constant,
16055           property, indexer, method, constructor, destructor, operator, event
16056           and class, struct, interface, delegate, enum.
16057           Added lines to warn incorrect comment.
16058         * rootcontext.cs :
16059           Added Documentation field (passed only when /doc was specified).
16060         * decl.cs:
16061           Added DocComment, DocCommentHeader, GenerateDocComment() and
16062           OnGenerateDocComment() and some supporting private members for
16063           /doc feature to MemberCore.
16064         * class.cs:
16065           Added GenerateDocComment() on TypeContainer, MethodCore and Operator.
16066         * delegate.cs:
16067           Added overriden DocCommentHeader.
16068         * enum.cs:
16069           Added overriden DocCommentHeader and GenerateDocComment().
16070
16071 2004-12-01  Miguel de Icaza  <miguel@ximian.com>
16072
16073         * cfold.cs (ConstantFold.DoConstantNumericPromotions): After
16074         unwrapping the enumeration values, chain to
16075         DoConstantNumericPromotions again, so we can promote things to the
16076         fundamental types (takes care of enums that are bytes, sbytes).
16077
16078         Fixes bug #62054.
16079
16080 2004-12-01  Raja R Harinath  <rharinath@novell.com>
16081
16082         * attribute.cs (Attribute.CheckAttributeType): Remove complain flag.
16083         Fix long-standing bug in type-lookup.  Use FindType instead of
16084         LookupType when ec.ResolvingTypeTree.
16085         (Attribute.ResolveType, Attribute.Resolve)
16086         (Attribute.DefinePInvokeMethod,GlobalAttribute.CheckAttributeType):
16087         Update to changes.
16088         (Attributes.Search): Remove internal version.  Update.
16089         (Attributes.SearchMulti): Update.
16090         (Attributes.GetClsCompliantAttribute): Remove.
16091         (Attributes.GetIndexerNameAttribute): Remove.
16092         * decl.cs (MemberCore.GetClsCompliantAttributeValue): Update to changes.
16093         (DeclSpace.GetClsCompliantAttributeValue): Likewise.
16094         * class.cs (Indexer.Define): Likewise.
16095
16096 2004-12-01  Marek Safar  <marek.safar@seznam.cz>
16097
16098         Fix bug #68790
16099         * ecore.cs: CheckMarshallByRefAccess new virtual method for testing
16100         MarshallByReference members access.
16101
16102         * expression.cs: Use CheckMarshallByRefAccess;
16103         Better error CS0197 message.
16104
16105         * report.cs: Print whole related error message.
16106
16107 2004-11-30  Raja R Harinath  <rharinath@novell.com>
16108
16109         * Makefile (mcs.exe) [PROFILE=default]: Keep a copy of mcs.exe in
16110         the current directory to help debugging.
16111
16112 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16113
16114         * class (GetClassBases): Better error 60 report.
16115         (EventProperty): Disabled warning 67 detection.
16116
16117 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16118
16119         Fix bug #60324
16120         * cfold.cs (Assign.DoResolve): Add subtraction for DecimalConstant.
16121
16122         * constant.cs (DecimalConstant.Emit): Don't use int ctor for
16123         precise values.
16124
16125 2004-11-29  Marek Safar  <marek.safar@seznam.cz>
16126
16127         Fix bug #49488
16128         * assign.cs (Assign.DoResolve): Add error 1648, 1650 report.
16129
16130         * decl.cs (MemberCore.MemberName): Error 1648 in compiler.
16131
16132 2004-11-26  Miguel de Icaza  <miguel@ximian.com>
16133
16134         * attribute.cs (Attribute.Resolve): Refine error reporting and
16135         report a cs0117 if the identifier does not exist, to distinguish
16136         from 0617 which is a miss-use of the actual identifier.
16137
16138         * ecore.cs (EventExpr.Emit): Refine error report and distinguish
16139         between cs0070 and cs0079.
16140
16141         * class.cs (MemberBase.DoDefine): When reporting a wrong
16142         accessibility level, we use MethodCore to compare instead of
16143         Method (this was a regression in some refactoring effort).
16144
16145         So now we correctly report cs0056 again.
16146
16147         * convert.cs (ImplicitReferenceConversion): Corrected typo, I was
16148         testing the target_type (which was known to be object_type) and
16149         not the source type (which is anonymous_method).
16150
16151         Fixed reporting of error cs1660.
16152
16153         * expression.cs (UserCast.Source): Expose the underlying cast.
16154
16155         * statement.cs (Switch.SwitchGoverningType): Sort the list of
16156         allowed types to find a match to int32 first (most common).
16157
16158         In addition, it ignores any ImplicitUserConversions that did an
16159         internal implicit conversion (as the switch statement allows only
16160         one integral conversion to exist).
16161
16162         * class.cs (PartialContainer.Create): rename `name' to
16163         `member_name' for clarity.  Then replace the string calls with a
16164         call to MemberName.GetPartialName, as now using
16165         MemberName.ToString is an error (this is due to the side effects
16166         it had, that were fixed in the past).
16167
16168         This will restore the error reporting on a number of partial class
16169         errors that were missusing this (and getting an exception as a
16170         results, which is now just a plain textual warning, because
16171         yyparse debug output would crash otherwise).
16172
16173 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16174
16175         * Makefile (PROGRAM_INSTALL_DIR): Remove.
16176
16177 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16178
16179         * rootcontext.cs (LookupType): Make sure to cache lookups that
16180         don't give us a negative result. This saves about 5% of corlib
16181         compilation time.
16182
16183 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16184
16185         * report.cs (AbstractMessage.Print): messages are sent to stderr
16186
16187         * class.cs (TypeContainer.GetClassBases): It is an error to have a
16188         non-interface in the list of interfaces (at this point, either
16189         parent was properly set, or a base class is being listed in the
16190         interfaces section).
16191
16192         This flags error 1722, and resolves the crash from bug 69259.
16193
16194 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
16195
16196         * statement.cs (Using.EmitExpressionFinally): make this work right
16197         for valuetypes. Fixes 69926.
16198
16199 2004-11-25  Miguel de Icaza  <miguel@ximian.com>
16200
16201         * const.cs (Const.ChangeType): Cope with the "0 literal can be
16202         converted to an enum" here, before we try to change the underlying
16203         type.  This code exists, but it is a different code path than the
16204         one used while encoding constants.
16205
16206         * convert.cs (ImplicitReferenceConversionExists): A surprisingly
16207         old bug: when converting from the null literal to a pointer,
16208         return an EmptyCast, not the NullLiteral.
16209
16210         This fixes #69921, the recent null_type changes probably made this
16211         bug more prominent.
16212
16213         (ImplicitReferenceConversionExists): In addition, resynchronized
16214         the code here, so it matches the same code in
16215         ImplicitReferenceConversionExists for the `from any class-type S
16216         to any interface-type T'.
16217         
16218
16219 2004-11-25  Marek Safar  <marek.safar@seznam.cz>
16220
16221         * cfold.cs (BinaryFold): Add addition for DecimalConstant.
16222
16223 2004-11-24  Miguel de Icaza  <miguel@ximian.com>
16224
16225         * cs-parser.jay: Use verbosity accordingly. 
16226
16227 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16228
16229         * expression.cs (Unary.ResolveOperator): Do not report warning;
16230         AddressOf reads from variable.
16231         
16232         (LocalVariableReferences.DoResolveBase): Improved my previous fix.
16233
16234 2004-11-24  Marek Safar  <marek.safar@seznam.cz>
16235
16236         Fix bug #69462
16237
16238         * attribute.cs (Attributable): Removed CheckTargets.
16239         (Attributes.Emit): Explicit attribute targets are tested here.
16240
16241         * class.cs (EventField.ValidAttributeTargets): Explicit target "field" is
16242         not enabled for interfaces.
16243
16244         * codegen.cs (CommonAssemblyModulClass.AddAttributes): Removed CheckTargets.
16245         (GetAssemblyName): Ouch next bug there.
16246
16247 2004-11-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16248
16249         * expression.cs: Error 275 added.
16250         
16251 2004-11-23  Marek Safar  <marek.safar@seznam.cz>
16252
16253         Fix bug #69177 (Implemented decimal constant support)
16254
16255         * cfold.cs (DoConstantNumericPromotions: Add DecimalConstant.
16256         (BinaryFold): Add DecimalConstant.
16257
16258         * const.cs (Define): Decimal constant 
16259         (is not constant.
16260         (ChangeType): Add decimal type handling.
16261         (LookupConstantValue): Don't set value for decimal type but
16262         emit DecimalConstantAttribute. Needed for constant optimization.
16263
16264         * constant.cs (ToDecimal): New method.
16265         (ConvertToDecimal): New method.
16266         (IntConstant): Implemented ConvertToDecimal.
16267         (DecimalConstant.Emit): Emit optimized version for decimals in
16268         int range.
16269
16270         * expression.cs (ResolveOperator): Changed order of constant
16271         reduction to work correctly with native types which have
16272         overloaded operators.
16273         (ResolveMemberAccess): Extract constant value from attribute
16274         for decimal type.
16275
16276         * rootcontext.cs (ResolveCore): Add DecimalConstantAttribute.
16277
16278         * typemanager.cs (TypeManager): Add decimal_constant_attribute_type,
16279         void_decimal_ctor_int_arg, decimal_constant_attribute_ctor.
16280         (ChangeType): Decimal is special.
16281         (TypeToCoreType): Add decimal type.
16282
16283 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16284
16285         * convert.cs (ImplicitConversionRequired): Add error cs0642 for
16286         decimal types.
16287
16288 2004-11-22  Marek Safar  <marek.safar@seznam.cz>
16289
16290         * class.cs (EventField.ApplyAttributeBuilder): Fix error
16291         test cs1667-5.cs.
16292
16293 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16294
16295         * class.cs (MemberBase.DoDefine): Fix error cs0508 report.
16296
16297         * pending.cs (PendingImplementation): Grab only interfaces.
16298
16299 2004-11-19  Marek Safar  <marek.safar@seznam.cz>
16300
16301         * statement.cs (ForeachHelperMethods): Add location member and
16302         error 202 detection.
16303
16304 2004-11-19  Raja R Harinath  <rharinath@novell.com>
16305
16306         * Makefile (EXTRA_DISTFILES): Remove mcs.exe.config.  It's
16307         automatically handled by executable.make.
16308         (PROGRAM): Make profile-specific.
16309
16310 2004-11-18  Marek Safar  <marek.safar@seznam.cz>
16311
16312         * expression.cs (DoResolveBase): Fixed wrong warning for out
16313         variables.
16314
16315 2004-11-18  Martin Baulig  <martin@ximian.com>
16316
16317         Merged latest changes into gmcs.  Please keep this comment in
16318         here, it makes it easier for me to see what changed in MCS since
16319         the last time I merged.
16320
16321 2004-11-17  Raja R Harinath  <rharinath@novell.com>
16322
16323         * typemanager.cs (TypeHandle.GetTypeHandle): Make private.
16324         (TypeHandle.GetMemberCache): New.
16325         (TypeHandle.TypeHandle): Update.
16326         (TypeManager.LookupMemberCache): Rewritten from LookupMemberContainer.
16327         (TypeManager.LookupParentInterfacesCache):
16328         Rename from LookupInterfaceCache.  Optimize slightly.
16329         (TypeManager.MemberLookup_FindMembers): Update.
16330         * decl.cs (MemberCache.MemberCache): Set Container to null in the
16331         multi-type variant.
16332         (AddCacheContents): Rename from AddHashtable.
16333         * class.cs (TypeContainer.parent_container): Remove.
16334         (TypeContainer.VerifyClsCompliance): Don't use parent_container.
16335         (TypeContainer.DoDefineMembers): Don't initialize it.
16336         Update to name changes.
16337         
16338 2004-11-17  Miguel de Icaza  <miguel@ximian.com>
16339
16340         * class.cs (MethodCore.CheckAccessModifiers): New helper routine
16341         that factors the code to check access modifiers on override.  
16342
16343         (PropertyBase): Use the code here.
16344
16345         Patch from Lluis S'anchez, fixes bug #69361.
16346
16347 2004-11-15  Miguel de Icaza  <miguel@ximian.com>
16348
16349         * anonymous.cs (AnonymousMethod.Error_AddressOfCapturedVar): New
16350         routine that is used to report the use of a captured variable
16351         whose address has been taken.
16352
16353         There are two checks: one when variables are being captured and
16354         the other check is when the address of a variable is taken. 
16355         
16356         (because an anonymous methods might be resolved before *or* after
16357         the address has been taken) and 
16358
16359         * expression.cs (Conditional.DoResolve): Remove the special
16360         casing that Martin added to trueExpr and falseExpr being both
16361         NullLiteral.  We get the right behavior now just by introducing
16362         the null_type into the compiler. 
16363
16364         * convert.cs (ExplicitConversion): Change the code to use
16365         null_type instead of testing `expr is NullLiteral'.
16366         (ImplicitConversionStandard): use null_type too.
16367         (ImplicitReferenceConversionExists): use null_type too.
16368         (ImplicitReferenceConversion): use null_type too.
16369
16370         * literal.cs: The type of `NullLiteral' is now null_type instead
16371         of object_type. 
16372         (Resolve): Set the type here.
16373
16374         * typemanager.cs: Introduce null_type.
16375
16376 2004-11-17  Martin Baulig  <martin@ximian.com>
16377
16378         * decl.cs (MemberCache.AddHashtable): Add entries in the opposite
16379         direction, like FindMembers() does.  Fixes #69546, testcase is in
16380         test-315.cs.    
16381
16382 2004-11-16  Martin Baulig  <martin@ximian.com>
16383
16384         This is based on a patch from Marek Safar, see bug #69082.
16385         Fixes bugs #63705 and #67130.
16386
16387         * typemanager.cs (TypeManager.LookupInterfaceCache): New public
16388         method; create a MemberCache for an interface type and cache the
16389         result.
16390
16391         * decl.cs (IMemberContainer.ParentContainer): Removed.
16392         (IMemberContainer.ParentCache): New property.
16393         (MemberCache.SetupCacheForInterface): Removed.
16394         (MemberCache..ctor): Added .ctor which takes a `Type[]'; use this
16395         to create a cache for an interface's "parent".
16396
16397         * class.cs (TypeContainer.DoDefineMembers): Setup cache for
16398         interfaces too.
16399
16400 2004-11-16  Martin Baulig  <martin@ximian.com>
16401
16402         Merged back from gmcs; these changes already went into gmcs a
16403         couple of weeks ago.
16404
16405         * typemanager.cs
16406         (TypeManager.AddUserType): Removed the `ifaces' argument.
16407         (TypeManager.RegisterBuilder): Take a `Type []' instead of a
16408         `TypeExpr []'.
16409         (TypeManager.AddUserInterface): Removed.
16410         (TypeManager.ExpandInterfaces): Return a `Type []' instead of a
16411         `TypeExpr []'.
16412         (TypeManager.GetInterfaces): Likewise.
16413         (TypeManager.GetExplicitInterfaces): Likewise.
16414
16415         * ecore.cs (TypeExpr.GetInterfaces): Removed.
16416
16417         * class.cs (TypeContainer.base_class_type): Replaced with `ptype'.
16418         (TypeContainer.base_inteface_types): Replaced with `ifaces'.
16419
16420 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
16421
16422         * statement.cs: Avoid adding bools to a hashtable.
16423
16424 2004-11-07  Miguel de Icaza  <miguel@ximian.com>
16425
16426         * expression.cs (Invocation.OverloadResolve): Flag error if we are
16427         calling an unsafe method from a safe location.
16428
16429 2004-11-06  Marek Safar  <marek.safar@seznam.cz>
16430
16431         Fix #69167
16432         * codegen.cs (ApplyAttributeBuilder): Do not return; it is only warning.
16433
16434 2004-11-06  Miguel de Icaza  <miguel@ximian.com>
16435
16436         * namespace.cs (VerifyUsing): use GetPartialName instead of
16437         ToString. 
16438
16439 2004-11-05  Miguel de Icaza  <miguel@ximian.com>
16440
16441         * statement.cs (Return.Resolve): Fix regression in typo: if
16442         `in_exc', we have to request a NeedReturnLabel, this was a typo
16443         introduced in the anonymous method check-in.  Fixes #69131.
16444
16445         * Indexers were using the ShortName when defining themselves,
16446         causing a regression in the compiler bootstrap when applying the
16447         patch from 2004-11-02 (first part), now they use their full name
16448         and the bug is gone.
16449
16450 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
16451
16452         * driver.cs: Strip the path from the names of embedded resources. Fixes
16453         #68519.
16454
16455 2004-11-04  Raja R Harinath  <rharinath@novell.com>
16456
16457         Fix error message regression: cs0104-2.cs.
16458         * namespace.cs (NamespaceEntry.Lookup): Remove 'silent' flag.
16459         (AliasEntry.Resolve): Update.
16460         * rootcontext.cs (RootContext.NamespaceLookup): Update.  Remove
16461         'silent' flag.
16462         (RootContext.LookupType): Update.
16463
16464 2004-11-03  Carlos Alberto Cortez <carlos@unixmexico.org>
16465
16466         * cs-parser.jay: Add support for handling accessor modifiers
16467         * class: Add support port accessor modifiers and error checking,
16468         define PropertyMethod.Define as virtual (not abstract anymore)
16469         * ecore.cs: Add checking for proeprties access with access modifiers
16470         * iterators.cs: Modify Accessor constructor call based in the modified
16471         constructor
16472 2004-11-02  Ben Maurer  <bmaurer@ximian.com>
16473
16474         * expression.cs (StringConcat): Handle being called twice,
16475         as when we have a concat in a field init with more than two
16476         ctors in the class
16477
16478 2004-11-02  Miguel de Icaza  <miguel@ximian.com>
16479
16480         * class.cs (Event.Define, Indexer.Define, Property.Define): Do not
16481         special case explicit implementations, we should always produce
16482         the .property or .event declaration.
16483         
16484         * decl.cs (MemberName): Renamed GetFullName to GetPartialName
16485         since it will not return correct data if people use this
16486         unresolved in the presence of using statements (see test-313).
16487
16488         * class.cs (MethodData.Define): If we are an explicit interface
16489         implementation, set the method name to the full name of the
16490         interface plus the name of the method.  
16491
16492         Notice that using the method.MethodName.GetFullName() does not
16493         work, as it will only contain the name as declared on the source
16494         file (it can be a shorthand in the presence of using statements)
16495         and not the fully qualifed type name, for example:
16496
16497         using System;
16498
16499         class D : ICloneable {
16500                 object ICloneable.Clone ()  {
16501                 }
16502         }
16503
16504         Would produce a method called `ICloneable.Clone' instead of
16505         `System.ICloneable.Clone'.
16506
16507         * namespace.cs (Alias.Resolve): Use GetPartialName.
16508         
16509 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16510
16511         * cs-parser.jay: Add error 1055 report.
16512
16513 2004-11-01  Miguel de Icaza  <miguel@ximian.com>
16514
16515         * assign.cs (Assign.DoResolve): Only do the transform of
16516         assignment into a New if the types are compatible, if not, fall
16517         through and let the implicit code deal with the errors and with
16518         the necessary conversions. 
16519
16520 2004-11-01  Marek Safar  <marek.safar@seznam.cz>
16521
16522         * cs-parser.jay: Add error 1031 report.
16523
16524         * cs-tokenizer.cs: Add location for error 1038.
16525
16526 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16527
16528         * cs-parser.jay: Add error 1016 report.
16529
16530 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16531
16532         * cs-parser.jay: Add errors 1575,1611 report.
16533
16534 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16535
16536         * cs-parser.jay: Add error 1001 report.
16537
16538 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16539
16540         Fix #68850
16541         * attribute.cs (GetMarshal): Add method argument for
16542         caller identification.
16543
16544         * class.cs, codegen.cs, enum.cs, parameter.cs: Added
16545         agument for GetMarshal and RuntimeMissingSupport.
16546
16547 2004-10-31  Marek Safar  <marek.safar@seznam.cz>
16548
16549         * attribute.cs (ExtractSecurityPermissionSet): Removed
16550         TypeManager.code_access_permission_type.
16551
16552         * typemanager.cs: Removed TypeManager.code_access_permission_type.
16553
16554 2004-10-27  Miguel de Icaza  <miguel@ximian.com>
16555
16556         * expression.cs (LocalVariableReference.DoResolveLValue): Check
16557         for obsolete use of a variable here.   Fixes regression on errors
16558         cs0619-25 and cs0619-26.
16559
16560 2004-10-27  Marek Safar  <marek.safar@seznam.cz>
16561
16562         Fix #62358, implemented security attribute encoding.
16563
16564         * attribute.cs (Attribute.CheckSecurityActionValididy): New method.
16565         Tests permitted SecurityAction for assembly or other types.
16566         (Assembly.ExtractSecurityPermissionSet): New method. Transforms
16567         data from SecurityPermissionAttribute to PermisionSet class.
16568
16569         * class.cs (ApplyAttributeBuilder): Added special handling
16570         for System.Security.Permissions.SecurityAttribute based types.
16571
16572         * codegen.cs (AssemblyClass.ApplyAttributeBuilder): Added
16573         special handling for System.Security.Permissions.SecurityAttribute
16574         based types.
16575
16576         * enum.cs (ApplyAttributeBuilder): Added special handling
16577         for System.Security.Permissions.SecurityAttribute based types.
16578
16579         * parameter.cs (ApplyAttributeBuilder): Added special handling
16580         for System.Security.Permissions.SecurityAttribute based types.
16581
16582         * rootcontext.cs: Next 2 core types.
16583
16584         * typemanager.cs (TypeManager.security_permission_attr_type):
16585         Built in type for the SecurityPermission Attribute.
16586         (code_access_permission_type): Build in type.
16587
16588 2004-10-17  Miguel de Icaza  <miguel@ximian.com>
16589
16590         * expression.cs (LocalVariableReference.DoResolveBase, Emit):
16591         Remove the tests for `ec.RemapToProxy' from here, and encapsulate
16592         all of this information into
16593         EmitContext.EmitCapturedVariableInstance.
16594         
16595         * codegen.cs (EmitCapturedVariableInstance): move here the
16596         funcionality of emitting an ldarg.0 in the presence of a
16597         remapping.   This centralizes the instance emit code.
16598
16599         (EmitContext.EmitThis): If the ScopeInfo contains a THIS field,
16600         then emit a load of this: it means that we have reached the
16601         topmost ScopeInfo: the one that contains the pointer to the
16602         instance of the class hosting the anonymous method.
16603
16604         * anonymous.cs (AddField, HaveCapturedFields): Propagate field
16605         captures to the topmost CaptureContext.
16606
16607 2004-10-12  Miguel de Icaza  <miguel@ximian.com>
16608
16609         * expression.cs (LocalVariableReference): Move the knowledge about
16610         the iterators into codegen's EmitCapturedVariableInstance.
16611
16612 2004-10-11  Miguel de Icaza  <miguel@ximian.com>
16613
16614         * codegen.cs (EmitContext.ResolveTopBlock): Emit a 1643 when not
16615         all code paths return a value from an anonymous method (it is the
16616         same as the 161 error, but for anonymous methods).
16617
16618 2004-10-08  Miguel de Icaza  <miguel@ximian.com>
16619
16620         The introduction of anonymous methods in the compiler changed
16621         various ways of doing things in the compiler.  The most
16622         significant one is the hard split between the resolution phase
16623         and the emission phases of the compiler.
16624
16625         For instance, routines that referenced local variables no
16626         longer can safely create temporary variables during the
16627         resolution phase: they must do so from the emission phase,
16628         since the variable might have been "captured", hence access to
16629         it can not be done with the local-variable operations from the runtime.
16630         
16631         * statement.cs 
16632
16633         (Block.Flags): New flag `IsTopLevel' to indicate that this block
16634         is a toplevel block.
16635
16636         (ToplevelBlock): A new kind of Block, these are the blocks that
16637         are created by the parser for all toplevel method bodies.  These
16638         include methods, accessors and anonymous methods.
16639
16640         These contain some extra information not found in regular blocks:
16641         A pointer to an optional CaptureContext (for tracking captured
16642         local variables and parameters).  A pointer to the parent
16643         ToplevelBlock.
16644         
16645         (Return.Resolve): Catch missmatches when returning a value from an
16646         anonymous method (error 1662).
16647         Invoke NeedReturnLabel from the Resolve phase instead of the emit
16648         phase.
16649
16650         (Break.Resolve): ditto.
16651
16652         (SwitchLabel): instead of defining the labels during the
16653         resolution phase, we now turned the public ILLabel and ILLabelCode
16654         labels into methods called GetILLabelCode() and GetILLabel() that
16655         only define the label during the Emit phase.
16656
16657         (GotoCase): Track the SwitchLabel instead of the computed label
16658         (its contained therein).  Emit the code by using
16659         SwitchLabel.GetILLabelCode ().
16660
16661         (LocalInfo.Flags.Captured): A new flag has been introduce to track
16662         whether the Local has been captured or not.
16663
16664         (LocalInfo.IsCaptured): New property, used to tell whether the
16665         local has been captured.
16666         
16667         * anonymous.cs: Vastly updated to contain the anonymous method
16668         support.
16669
16670         The main classes here are: CaptureContext which tracks any
16671         captured information for a toplevel block and ScopeInfo used to
16672         track the activation frames for various local variables.   
16673
16674         Each toplevel block has an optional capture context associated
16675         with it.  When a method contains an anonymous method both the
16676         toplevel method and the anonymous method will create a capture
16677         context.   When variables or parameters are captured, they are
16678         recorded on the CaptureContext that owns them, for example:
16679
16680         void Demo () {
16681              int a;
16682              MyDelegate d = delegate {
16683                  a = 1;
16684              }
16685         }
16686
16687         Here `a' will be recorded as captured on the toplevel
16688         CapturedContext, the inner captured context will not have anything
16689         (it will only have data if local variables or parameters from it
16690         are captured in a nested anonymous method.
16691
16692         The ScopeInfo is used to track the activation frames for local
16693         variables, for example:
16694
16695         for (int i = 0; i < 10; i++)
16696                 for (int j = 0; j < 10; j++){
16697                    MyDelegate d = delegate {
16698                         call (i, j);
16699                    }
16700                 }
16701
16702         At runtime this captures a single captured variable `i', but it
16703         captures 10 different versions of the variable `j'.  The variable
16704         `i' will be recorded on the toplevel ScopeInfo, while `j' will be
16705         recorded on a child.  
16706
16707         The toplevel ScopeInfo will also track information like the `this'
16708         pointer if instance variables were referenced (this is necessary
16709         as the anonymous method lives inside a nested class in the host
16710         type of the method). 
16711
16712         (AnonymousMethod): Expanded to track the Toplevel, implement
16713         `AnonymousMethod.Compatible' to tell whether an anonymous method
16714         can be converted to a target delegate type. 
16715
16716         The routine now also produces the anonymous method content
16717
16718         (AnonymousDelegate): A helper class that derives from
16719         DelegateCreation, this is used to generate the code necessary to
16720         produce the delegate for the anonymous method that was created. 
16721
16722         * assign.cs: API adjustments for new changes in
16723         Convert.ImplicitStandardConversionExists.
16724
16725         * class.cs: Adjustments to cope with the fact that now toplevel
16726         blocks are of type `ToplevelBlock'. 
16727
16728         * cs-parser.jay: Now we produce ToplevelBlocks for toplevel blocks
16729         insteda of standard blocks.
16730
16731         Flag errors if params arguments are passed to anonymous methods.
16732
16733         * codegen.cs (EmitContext): Replace `InAnonymousMethod' with
16734         `CurrentAnonymousMethod' which points to the current Anonymous
16735         Method.  The variable points to the AnonymousMethod class that
16736         holds the code being compiled.  It is set in the new EmitContext
16737         created for the anonymous method.
16738
16739         (EmitContext.Phase): Introduce a variable and an enumeration to
16740         assist in enforcing some rules about when and where we are allowed
16741         to invoke certain methods (EmitContext.NeedsReturnLabel is the
16742         only one that enfonces this right now).
16743
16744         (EmitContext.HaveCaptureInfo): new helper method that returns
16745         whether we have a CapturedContext initialized.
16746
16747         (EmitContext.CaptureVariable): New method used to register that a
16748         LocalInfo must be flagged for capturing. 
16749
16750         (EmitContext.CapturedParameter): New method used to register that a
16751         parameters must be flagged for capturing. 
16752         
16753         (EmitContext.CapturedField): New method used to register that a
16754         field must be flagged for capturing. 
16755
16756         (EmitContext.HaveCapturedVariables,
16757         EmitContext.HaveCapturedFields): Return whether there are captured
16758         variables or fields. 
16759
16760         (EmitContext.EmitMethodHostInstance): This is used to emit the
16761         instance for the anonymous method.  The instance might be null
16762         (static methods), this (for anonymous methods that capture nothing
16763         and happen to live side-by-side with the current method body) or a
16764         more complicated expression if the method has a CaptureContext.
16765
16766         (EmitContext.EmitTopBlock): Routine that drives the emission of
16767         code: it will first resolve the top block, then emit any metadata
16768         and then emit the code.  The split is done so that we can extract
16769         any anonymous methods and flag any captured variables/parameters.
16770         
16771         (EmitContext.ResolveTopBlock): Triggers the resolution phase,
16772         during this phase, the ILGenerator should not be used as labels
16773         and local variables declared here might not be accessible to any
16774         code that is part of an anonymous method.  
16775
16776         Exceptions to this include the temporary variables that are
16777         created by some statements internally for holding temporary
16778         variables. 
16779         
16780         (EmitContext.EmitMeta): New routine, in charge of emitting all the
16781         metadata for a cb
16782
16783         (EmitContext.TemporaryReturn): This method is typically called
16784         from the Emit phase, and its the only place where we allow the
16785         ReturnLabel to be defined other than the EmitMeta.  The reason is
16786         that otherwise we would have to duplicate a lot of logic in the
16787         Resolve phases of various methods that today is on the Emit
16788         phase. 
16789
16790         (EmitContext.NeedReturnLabel): This no longer creates the label,
16791         as the ILGenerator is not valid during the resolve phase.
16792
16793         (EmitContext.EmitThis): Extended the knowledge in this class to
16794         work in anonymous methods in addition to iterators. 
16795
16796         (EmitContext.EmitCapturedVariableInstance): This emits whatever
16797         code is necessary on the stack to access the instance to a local
16798         variable (the variable will be accessed as a field).
16799
16800         (EmitContext.EmitParameter, EmitContext.EmitAssignParameter,
16801         EmitContext.EmitAddressOfParameter): Routines to support
16802         parameters (not completed at this point). 
16803         
16804         Removals: Removed RemapLocal and RemapLocalLValue.  We probably
16805         will also remove the parameters.
16806
16807         * convert.cs (Convert): Define a `ConstantEC' which points to a
16808         null.  This is just to prefity some code that uses
16809         ImplicitStandardConversion code and do not have an EmitContext
16810         handy.
16811
16812         The idea is to flag explicitly that at that point in time, it is
16813         known that the conversion will not trigger the delegate checking
16814         code in implicit conversions (which requires a valid
16815         EmitContext). 
16816
16817         Everywhere: pass new EmitContext parameter since
16818         ImplicitStandardConversionExists now requires it to check for
16819         anonymous method conversions. 
16820
16821         (Convert.ImplicitStandardConversionExists): If the type of an
16822         expression is the anonymous_method_type, and the type is a
16823         delegate, we invoke the AnonymousMethod.Compatible method to check
16824         whether an implicit conversion is possible. 
16825
16826         (Convert.ImplicitConversionStandard): Only do implicit method
16827         group conversions if the language level is not ISO_1.
16828
16829         * delegate.cs (Delegate.GetInvokeMethod): Common method to get the
16830         MethodInfo for the Invoke method.  used by Delegate and
16831         AnonymousDelegate.
16832
16833         * expression.cs (Binary.DoNumericPromotions): only allow anonymous
16834         method conversions if the target type is a delegate.
16835
16836         Removed extra debugging nops.
16837
16838         (LocalVariableReference): Turn the `local_info' into a public
16839         field. 
16840
16841         Add `prepared' field, the same hack used for FieldExprs to cope
16842         with composed assignments, as Local variables do not necessarily
16843         operate purely on the stack as they used to: they can be captured
16844         fields. 
16845
16846         Add `temp' for a temporary result, like fields.
16847
16848         Refactor DoResolve and DoResolveLValue into DoResolveBase.
16849
16850         It now copes with Local variables that are captured and emits the
16851         proper instance variable to load it from a field in the captured
16852         case. 
16853
16854         (ParameterReference.DoResolveBase): During the resolve phase,
16855         capture parameters if we are in an anonymous method.
16856
16857         (ParameterReference.Emit, ParameterReference.AddressOf): If in an
16858         anonymous method, use the EmitContext helper routines to emit the
16859         parameter reference.
16860
16861         * iterators.cs: Set RemapToProxy to true/false during the
16862         EmitDispose class.
16863
16864         * parameters.cs (GetParameterByName): New helper method. 
16865
16866         * typemanager.cs (anonymous_method_type) a new type that
16867         represents an anonyous method.  This is always an internal type,
16868         used as a fencepost to test against the anonymous-methodness of an
16869         expression. 
16870         
16871 2004-10-20  Marek Safar  <marek.safar@seznam.cz>
16872
16873         * class.cs (MethodCore.CheckBase): Add errors 505, 533, 544,
16874         561 report.
16875         (PropertyBase.FindOutParentMethod): Add errors 545, 546 report.
16876
16877 2004-10-18  Martin Baulig  <martin@ximian.com>
16878
16879         * statement.cs (Fixed.Resolve): Don't access the TypeExpr's
16880         `Type' directly, but call ResolveType() on it.
16881         (Catch.Resolve): Likewise.
16882         (Foreach.Resolve): Likewise.
16883
16884 2004-10-18  Martin Baulig  <martin@ximian.com>
16885
16886         * expression.cs (Cast.DoResolve): Don't access the TypeExpr's
16887         `Type' directly, but call ResolveType() on it.
16888         (Probe.DoResolve): Likewise.
16889         (ArrayCreation.LookupType): Likewise.
16890         (TypeOf.DoResolve): Likewise.
16891         (SizeOf.DoResolve): Likewise.
16892
16893 2004-10-18  Martin Baulig  <martin@ximian.com>
16894
16895         * expression.cs (Invocation.BetterFunction): Put back
16896         TypeManager.TypeToCoreType().
16897
16898 2004-10-18  Raja R Harinath  <rharinath@novell.com>
16899
16900         * class.cs (FieldMember.DoDefine): Reset ec.InUnsafe after doing
16901         the ResolveType.
16902
16903 2004-10-18  Martin Baulig  <martin@ximian.com>
16904
16905         * parameter.cs (Parameter.Resolve):  Don't access the TypeExpr's
16906         `Type' directly, but call ResolveType() on it.
16907
16908 2004-10-18  Martin Baulig  <martin@ximian.com>
16909
16910         * class.cs (FieldMember.Define): Don't access the TypeExpr's
16911         `Type' directly, but call ResolveType() on it.
16912         (MemberBase.DoDefine): Likewise.
16913
16914         * expression.cs (New.DoResolve): Don't access the TypeExpr's
16915         `Type' directly, but call ResolveType() on it.
16916         (ComposedCast.DoResolveAsTypeStep): Likewise.
16917
16918         * statement.cs (LocalInfo.Resolve): Don't access the TypeExpr's
16919         `Type' directly, but call ResolveType() on it.
16920
16921 2004-10-17  John Luke  <john.luke@gmail.com>
16922
16923         * class.cs (Operator.GetSignatureForError): use CSharpName
16924
16925         * parameter.cs (Parameter.GetSignatureForError): Returns
16926         correct name even if was not defined.
16927
16928 2004-10-13  Raja R Harinath  <rharinath@novell.com>
16929
16930         Fix #65816.
16931         * class.cs (TypeContainer.EmitContext): New property.
16932         (DefineNestedTypes): Create an emitcontext for each part.
16933         (MethodCore.DoDefineParameters): Use container's emitcontext.
16934         Pass type array to InternalParameters.
16935         (MemberBase.DoDefine): Use container's emitcontext.
16936         (FieldMember.Define): Likewise.
16937         (Event.Define): Likewise.
16938         (SetMethod.GetParameterInfo): Change argument to EmitContext.
16939         Pass type array to InternalParameters.
16940         (SetIndexerMethod.GetParameterInfo): Likewise.
16941         (SetMethod.Define): Pass emitcontext to GetParameterInfo.
16942         * delegate.cs (Define): Pass emitcontext to
16943         ComputeAndDefineParameterTypes and GetParameterInfo.  Pass type
16944         array to InternalParameters.
16945         * expression.cs (ParameterReference.DoResolveBase): Pass
16946         emitcontext to GetParameterInfo.
16947         (ComposedCast.DoResolveAsTypeStep): Remove check on
16948         ec.ResolvingTypeTree.
16949         * parameter.cs (Parameter.Resolve): Change argument to
16950         EmitContext.  Use ResolveAsTypeTerminal.
16951         (Parameter.GetSignature): Change argument to EmitContext.
16952         (Parameters.ComputeSignature): Likewise.
16953         (Parameters.ComputeParameterTypes): Likewise.
16954         (Parameters.GetParameterInfo): Likewise.
16955         (Parameters.ComputeAndDefineParameterTypes): Likewise.
16956         Re-use ComputeParameterTypes.  Set ec.ResolvingTypeTree.
16957         * support.cs (InternalParameters..ctor): Remove variant that takes
16958         a DeclSpace.
16959         * typemanager.cs (system_intptr_expr): New.
16960         (InitExpressionTypes): Initialize it.
16961
16962 2004-10-12  Chris Toshok  <toshok@ximian.com>
16963
16964         * cs-parser.jay: fix location for try_statement and catch_clause.
16965
16966 2004-10-11  Martin Baulig  <martin@ximian.com>
16967
16968         * report.cs: Don't make --fatal abort on warnings, we have
16969         -warnaserror for that.
16970
16971 2004-10-07  Raja R Harinath  <rharinath@novell.com>
16972
16973         More DeclSpace.ResolveType avoidance.
16974         * decl.cs (MemberCore.InUnsafe): New property.
16975         * class.cs (MemberBase.DoDefine): Use ResolveAsTypeTerminal 
16976         with newly created EmitContext.
16977         (FieldMember.Define): Likewise.
16978         * delegate.cs (Delegate.Define): Likewise.
16979         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup with alias
16980         only if normal name-lookup fails.
16981         (TypeExpr.DoResolve): Enable error-checking.
16982         * expression.cs (ArrayCreation.DoResolve): Use ResolveAsTypeTerminal.
16983         (SizeOf.DoResolve): Likewise.
16984         (ComposedCast.DoResolveAsTypeStep): Likewise.
16985         (StackAlloc.DoResolve): Likewise.
16986         * statement.cs (Block.Flags): Add new flag 'Unsafe'.
16987         (Block.Unsafe): New property.
16988         (Block.EmitMeta): Set ec.InUnsafe as appropriate.
16989         (Unsafe): Set 'unsafe' flag of contained block.
16990         (LocalInfo.Resolve): Use ResolveAsTypeTerminal.
16991         (Fixed.Resolve): Likewise.
16992         (Catch.Resolve): Likewise.
16993         (Using.ResolveLocalVariableDecls): Likewise.
16994         (Foreach.Resolve): Likewise.
16995
16996 2004-10-05  John Luke <john.luke@gmail.com>
16997
16998         * cs-parser.jay: add location to error CS0175
16999
17000 2004-10-04  Miguel de Icaza  <miguel@ximian.com>
17001
17002         * ecore.cs (Expression.Constantity): Add support for turning null
17003         into a constant.
17004
17005         * const.cs (Const.Define): Allow constants to be reference types
17006         as long as the value is Null.
17007
17008 2004-10-04  Juraj Skripsky  <js@hotfeet.ch>
17009
17010         * namespace.cs (NamespaceEntry.Using): No matter which warning
17011         level is set, check if this namespace name has already been added.
17012
17013 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
17014
17015         * expression.cs: reftype [!=]= null should always use br[true,false].
17016         # 67410
17017
17018 2004-10-03  Marek Safar  <marek.safar@seznam.cz>
17019
17020         Fix #67108
17021         * attribute.cs: Enum conversion moved to 
17022         GetAttributeArgumentExpression to be applied to the all
17023         expressions.
17024
17025 2004-10-01  Raja R Harinath  <rharinath@novell.com>
17026
17027         Fix #65833, test-300.cs, cs0122-5.cs, cs0122-6.cs.
17028         * class.c (TypeContainer.DefineType): Flag error if
17029         base types aren't accessible due to access permissions.
17030         * decl.cs (DeclSpace.ResolveType): Move logic to
17031         Expression.ResolveAsTypeTerminal.
17032         (DeclSpace.ResolveTypeExpr): Thin layer over
17033         Expression.ResolveAsTypeTerminal.
17034         (DeclSpace.CheckAccessLevel, DeclSpace.FamilyAccess):
17035         Refactor code into NestedAccess.  Use it.
17036         (DeclSpace.NestedAccess): New.
17037         * ecore.cs (Expression.ResolveAsTypeTerminal): Add new
17038         argument to silence errors.  Check access permissions.
17039         (TypeExpr.DoResolve, TypeExpr.ResolveType): Update.
17040         * expression.cs (ProbeExpr.DoResolve): Use ResolveAsTypeTerminal.
17041         (Cast.DoResolve): Likewise.
17042         (New.DoResolve): Likewise.
17043         (InvocationOrCast.DoResolve,ResolveStatement): Likewise.
17044         (TypeOf.DoResolve): Likewise.
17045
17046         * expression.cs (Invocation.BetterConversion): Return the Type of
17047         the better conversion.  Implement section 14.4.2.3 more faithfully.
17048         (Invocation.BetterFunction): Make boolean.  Make correspondence to
17049         section 14.4.2.2 explicit.
17050         (Invocation.OverloadResolve): Update.
17051         (Invocation): Remove is_base field.
17052         (Invocation.DoResolve): Don't use is_base.  Use mg.IsBase.
17053         (Invocation.Emit): Likewise.
17054
17055 2004-09-27  Raja R Harinath  <rharinath@novell.com>
17056
17057         * README: Update to changes.
17058
17059 2004-09-24  Marek Safar  <marek.safar@seznam.cz>
17060
17061         * cs-parser.jay: Reverted 642 warning fix.
17062
17063 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17064
17065         Fix bug #66615
17066         * decl.cs (FindMemberWithSameName): Indexer can have more than
17067         1 argument.
17068
17069 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17070
17071         * expression.cs (LocalVariableReference.DoResolveLValue):
17072         Do not report warning 219 for out values.
17073         (EmptyExpression.Null): New member to avoid extra allocations.
17074
17075 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17076
17077         * cs-parser.jay: Fix wrong warning 642 report.
17078
17079         * cs-tokenizer.cs (CheckNextToken): New helper;
17080         Inspect next character if is same as expected.
17081
17082 2004-09-23  Martin Baulig  <martin@ximian.com>
17083
17084         * convert.cs (Convert.ImplicitReferenceConversion): Some code cleanup.
17085         (Convert.ImplicitReferenceConversionExists): Likewise.
17086
17087 2004-09-23  Marek Safar  <marek.safar@seznam.cz>
17088
17089         * class.cs (Operator.Define): Add error 448 and 559 report.
17090
17091 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17092
17093         * class.cs (MemberBase.IsTypePermitted): New protected
17094         method for checking error CS0610.
17095
17096 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17097
17098         * class.cs (TypeContainer.HasExplicitLayout): New property
17099         Returns whether container has StructLayout attribute set Explicit.
17100         (FieldMember): New abstract class for consts and fields.
17101         (FieldMember.ApplyAttributeBuilder): Add error 636 and 637 report.
17102         (Field): Reuse FieldMember.
17103
17104         * const.cs (Const): Reuse FieldMember.
17105
17106         * rootcontext.cs: EmitConstants call moved to class.
17107
17108 2004-09-22  Martin Baulig  <martin@ximian.com>
17109
17110         Thanks to Peter Sestoft for this bug report.
17111
17112         * expression.cs (Conditional): If both the `trueExpr' and the
17113         `falseExpr' is a NullLiteral, return a NullLiteral.
17114
17115 2004-09-22  Martin Baulig  <martin@ximian.com>
17116
17117         * statement.cs (Foreach.EmitCollectionForeach): If we're in an
17118         iterator, use `enumerator.EmitThis()' instead of `ec.EmitThis()'
17119         for the "get_Current" call.
17120
17121 2004-09-22  Martin Baulig  <martin@ximian.com>
17122
17123         Marek and me just fixed one of our oldest bugs: #28562 :-)
17124
17125         * ecore.cs (EnumConstant.GetValueAsEnumType): New public method.
17126
17127         * attribute.cs (Attribute.GetAttributeArgumentExpression): If
17128         we're an EnumConstant, just return that.
17129         (Attribute.Resolve): GetAttributeArgumentExpression() may give us
17130         an EnumConstant.  In this case, we need to use GetValueAsEnumType()
17131         to get the value which'll actually be written into the attribute.
17132         However, we have to use GetValue() to access the attribute's value
17133         in the compiler.        
17134
17135 2004-09-22  Marek Safar  <marek.safar@seznam.cz>
17136
17137         * constant.cs (Constant.IsNegative): New abstract property
17138         IsNegative.
17139
17140         * expression.cs (ArrayAccess.DoResolve): Add warning 251.
17141         (StackAlloc.DoResolve): Reused IsNegative.
17142
17143 2004-09-21  Martin Baulig  <martin@ximian.com>
17144
17145         * codegen.cs (VariableStorage): Don't store the ILGenerator here;
17146         if we're used in an iterator, we may be called from different
17147         methods.
17148
17149         * statement.cs (Foreach.EmitFinally): Only emit an `Endfinally' if
17150         we actually have an exception block.
17151
17152 2004-09-20  John Luke <jluke@cfl.rr.com>
17153
17154         * class.cs, cs-parser.jay: Improve the error report for 1520:
17155         report the actual line where the error happens, not where the
17156         class was declared.
17157
17158         * assign.cs, delegate.cs, ecore.cs, expression.cs, statement.cs:
17159         Pass location information that was available elsewhere.
17160
17161 2004-09-19  Sebastien Pouliot  <sebastien@ximian.com>
17162
17163         * codegen.cs: Fix bug #56621. It is now possible to use MCS on the MS
17164         runtime to delay sign assemblies.
17165
17166 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17167
17168         * cs-parser.jay: Do not report the stack trace, this is barely
17169         used nowadays.
17170
17171 2004-08-22  John Luke  <john.luke@gmail.com>
17172  
17173         * driver.cs : check that a resource id is not already used
17174         before adding it, report CS1508 if it is, bug #63637
17175
17176 2004-09-19  Miguel de Icaza  <miguel@ximian.com>
17177
17178         * ecore.cs: Removed dead code.
17179
17180 2004-09-18  Marek Safar  <marek.safar@seznam.cz>
17181
17182         * class.cs: Do not report warning CS0067 on the interfaces.
17183
17184 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17185
17186         * cs-parser.jay: Add error 504 report.
17187
17188 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17189
17190         * rootcontext.cs: WarningLevel is 4 by default now.
17191
17192         * statement.cs (Fixed.Resolve): Do not null
17193         VariableInfo.
17194
17195 2004-09-16  Marek Safar  <marek.safar@seznam.cz>
17196
17197         Fixed bug #55780
17198         * ecore.cs (PropertyExpr.FindAccessors): Do not perform
17199         deep search when property is not virtual.
17200         (PropertyExpr.ResolveAccessors): Make one call for both
17201         accessors.
17202
17203 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17204
17205         Fixed bug #65766
17206         * statement.cs: Error 152 report constains also location.
17207
17208 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17209
17210         Fixed bug #65766
17211         * const.cs: Explicitly set constant as static.
17212
17213 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17214
17215         Fixed bug #64226
17216         * cs-parser.jay: Add error 1017 report.
17217
17218 2004-09-15  Marek Safar  <marek.safar@seznam.cz>
17219
17220         Fixed bug #59980, #64224
17221         * expression.cs (Invocation.DoResolve): Fixed error CS0571 test.
17222
17223         * typemanager.cs (IsSpecialMethod): Simplified
17224
17225 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17226
17227         * decl.cs (MemberCore.Emit): Resuscitated VerifyObsoleteAttribute
17228         condition with better params.
17229
17230 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17231
17232         Fixed bug #65238
17233         * attribute.cs (Resolve): Property has to have both
17234         accessors.
17235
17236 2004-09-14  Martin Baulig  <martin@ximian.com>
17237
17238         * decl.cs (MemberCore.Emit): Always call VerifyObsoleteAttribute().
17239
17240 2004-09-14  Marek Safar  <marek.safar@seznam.cz>
17241
17242         Fixed bug #61902
17243         * codegen.cs (TestObsoleteMethodUsage): Trace when method is
17244         called and is obsolete then this member suppress message
17245         when call is inside next [Obsolete] method or type.
17246
17247         * expression.cs: Use TestObsoleteMethodUsage member.
17248
17249 2004-09-14  Martin Baulig  <martin@ximian.com>
17250
17251         * cs-parser.jay: Sync a bit with the GMCS version.
17252
17253 2004-09-14  Martin Baulig  <martin@ximian.com>
17254
17255         * cs-parser.jay (CSharpParser): Don't derive from GenericsParser.
17256         (CSharpParser.yacc_verbose_flag): New public field.
17257
17258         * genericparser.cs: Removed.
17259
17260 2004-09-14  Raja R Harinath  <rharinath@novell.com>
17261
17262         * cs-parser.jay (event_declaration): Re-enable cs0071 error.
17263
17264 2004-09-13  Marek Safar  <marek.safar@seznam.cz>
17265
17266         * class.cs (MethodCore.CheckBase): Fix bug #65757.
17267
17268 2004-09-10  Martin Baulig  <martin@ximian.com>
17269
17270         Backported my MemberName changes from GMCS into MCS.
17271
17272         - we are now using a special `MemberName' class instead of using
17273         strings; in GMCS, the `MemberName' also contains the type
17274         arguments.
17275
17276         - changed the grammar rules a bit:
17277           * the old `member_name' is now a `namespace_or_type_name':
17278             The rule is that we use `namespace_or_type_name' everywhere
17279             where we expect either a "member name" (GetEnumerator) or a
17280             "member name" with an explicit interface name
17281             (IEnumerable.GetEnumerator).
17282             In GMCS, the explicit interface name may include type arguments
17283             (IEnumerable<T>.GetEnumerator).
17284           * we use `member_name' instead of just `IDENTIFIER' for
17285             "member names":
17286             The rule is that we use `member_name' wherever a member may
17287             have type parameters in GMCS.       
17288
17289         * decl.cs (MemberName): New public class.
17290         (MemberCore.MemberName): New public readonly field.
17291         (MemberCore.ctor): Take a `MemberName' argument, not a string.
17292         (DeclSpace): Likewise.
17293
17294         * delegate.cs (Delegate.ctor): Take a MemberName, not a string.
17295         * enum.cs (Enum.ctor): Likewise.
17296
17297         * namespace.cs (AliasEntry.Alias): Changed type from Expression to
17298         MemberName.     
17299         (AliasEntry.ctor): Take a MemberName, not an Expression.
17300         (AliasEntry.UsingAlias): Likewise.
17301
17302         * class.cs (TypeContainer.ctor): Take a MemberName, not a string.
17303         (IMethodData.MemberName): Changed type from string to MemberName.
17304         (MemberBase.ExplicitInterfaceName): Likewise.
17305         (AbstractPropertyEventMethod.SetupName): Make this private.
17306         (AbstractPropertyEventMethod.ctor): Added `string prefix'
17307         argument; compute the member name here.
17308         (AbstractPropertyEventMethod.UpdateName): Recompute the name based
17309         on the `member.MemberName' and the `prefix'.
17310
17311         * cs-parser.jay (attribute_name): Use `namespace_or_type_name',
17312         not `type_name'.
17313         (struct_declaration): Use `member_name' instead of `IDENTIFIER';
17314         thus, we get a `MemberName' instead of a `string'.  These
17315         declarations may have type parameters in GMCS.
17316         (interface_method_declaration, delegate_declaration): Likewise.
17317         (class_declaration, interface_declaration): Likewise.
17318         (method_header): Use `namespace_or_type_name' instead of
17319         `member_name'.  We may be an explicit interface implementation.
17320         (property_declaration, event_declaration): Likewise.
17321         (member_name): This is now just an `IDENTIFIER', not a
17322         `namespace_or_type_name'.
17323         (type_name, interface_type): Removed.
17324         (namespace_or_type_name): Return a MemberName, not an Expression.
17325         (primary_expression): Use `member_name' instead of `IDENTIFIER';
17326         call GetTypeExpression() on the MemberName to get an expression.
17327         (IndexerDeclaration.interface_type): Changed type from string to
17328         MemberName.
17329         (MakeName): Operate on MemberName's instead of string's.
17330
17331 2004-09-13  Raja R Harinath  <rharinath@novell.com>
17332
17333         Fix bug #55770.
17334         * namespace.cs (AliasEntry.Resolve): Implement section 16.3.1.
17335         (NamespaceEntry.Lookup): Add new argument to flag if we want the
17336         lookup to avoid symbols introduced by 'using'.
17337         * rootcontext.cs (NamespaceLookup): Update.
17338
17339 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17340
17341         * class.cs (TypeContainer.DoDefineMembers): Do not call
17342         DefineDefaultConstructor for static classes.
17343
17344 2004-09-12  Marek Safar  <marek.safar@seznam.cz>
17345
17346         * attribute.cs (Attribute.Resolve): Add error 653 report.
17347
17348         * class.cs (Class.ApplyAttributeBuilder): Add error 641
17349         report.
17350         (Method.ApplyAttributeBuilder): Add error 685 report.
17351         (Operator.Define): Add error 564 report.
17352
17353         * cs-tokenizer.cs (handle_hex): Add error 1013 report.
17354
17355         * expression.cs (Invocation.DoResolve): Add error
17356         245 and 250 report.
17357
17358         * parameter.cs (Parameter.ApplyAttributeBuilder): Add
17359         error 674 report.
17360
17361 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17362
17363         * class.cs (ConstructorInitializer.Resolve):
17364         Wrong error number (515->516).
17365
17366 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17367
17368         * class.cs (Indexer.Define): Add error 631 report.
17369
17370 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17371
17372         * ecore.cs (Error_NegativeArrayIndex): Fix 248 error.
17373
17374 2004-09-11  Marek Safar  <marek.safar@seznam.cz>
17375
17376         * expression.cs (Probe.DoResolve): Add error CS0241 report.
17377
17378 2004-09-10  Marek Safar  <marek.safar@seznam.cz>
17379
17380         * cs-parser.jay: Added error CS0241 report.
17381
17382 2004-09-10  Raja R Harinath  <rharinath@novell.com>
17383
17384         * cs-parser.jay (fixed_statement): Introduce a scope for the
17385         declaration in the 'fixed' statement.
17386
17387 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17388
17389         * cs-parser.jay: Added CS0230 error report.
17390
17391 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17392
17393         * cs-parser.jay: Added errors CS0231 and CS0257 report.
17394
17395 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17396
17397         * expression.cs (Argument.Resolve): Added error CS0192 and
17398         CS0199 report.
17399
17400 2004-09-09  Marek Safar  <marek.safar@seznam.cz>
17401
17402         C# 2.0 #pragma warning feature
17403
17404         * cs-tokenizer.cs (PreProcessPragma): New method; 
17405         Handles #pragma directive.
17406
17407         * report.cs (WarningRegions): New class; Support
17408         class for #pragma warning directive. It tests whether
17409         warning is enabled for a given line.
17410
17411 2004-09-08  Miguel de Icaza  <miguel@ximian.com>
17412
17413         * const.cs: Add more descriptive error report, tahnks to
17414         Sebastien. 
17415
17416 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
17417
17418         * ecore.cs (FieldExpr.DoResolveLValue): Fixed CS0198 report.
17419
17420 2004-09-07  Miguel de Icaza  <miguel@ximian.com>
17421
17422         * expression.cs: Apply patch from Ben: Remove dead code from
17423         ArrayCreation, and remove the TurnintoConstant call in const.cs,
17424         as that code just threw an exception anwyays.
17425
17426         * const.cs: Remove the call to the turnintoconstant, for details
17427         see bug: #63144
17428         
17429         * literal.cs: The type of the null-literal is the null type;  So
17430         we use a placeholder type (literal.cs:System.Null, defined here)
17431         for it.
17432
17433         * expression.cs (Conditional.DoResolve): Remove some old code that
17434         is no longer needed, conversions have been fixed.
17435
17436         (ArrayCreationExpression.DoResolve): Return false if we fail to
17437         resolve the inner expression.
17438
17439 2004-09-07  Raja R Harinath  <rharinath@novell.com>
17440
17441         Fix test-290.cs.
17442         * cs-parser.jay (delegate_declaration): Record a delegate
17443         declaration as a type declaration.
17444         Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
17445
17446 2004-09-06  Miguel de Icaza  <miguel@ximian.com>
17447
17448         * parameter.cs: Do not crash if the type can not be resolved. 
17449
17450         * expression.cs: Report errors with unsafe pointers, fixes #64896
17451
17452 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
17453
17454         * expression.cs: Pointer arith always needs to do a conv.i
17455         if the operand is a long. fix 65320
17456
17457 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17458
17459         Fixed cs0619-37.cs, cs0619-38.cs
17460
17461         * enum.cs (GetObsoleteAttribute): Removed.
17462
17463         * expression.cs (MemberAccess.DoResolve): Test for [Obsolete]
17464         on Enum member is double staged. The first is tested member
17465         and then enum.
17466
17467 2004-09-04  Marek Safar  <marek.safar@seznam.cz>
17468
17469         Fixed #56986, #63631, #65231
17470
17471         * class.cs: (TypeContainer.AddToMemberContainer): New method,
17472         adds member to name container.
17473         (TypeContainer.AddToTypeContainer): New method, adds type to
17474         name container.
17475         (AddConstant, AddEnum, AddClassOrStruct, AddDelegate, AddMethod,
17476         AddConstructor, AddInterface, AddField, AddProperty, AddEvent,
17477         AddOperator): Simplified by reusing AddToMemberContainer.
17478         (TypeContainer.UserDefinedStaticConstructor): Changed to property
17479         instead of field.
17480         (Method.CheckForDuplications): Fixed implementation to test all
17481         possibilities.
17482         (MemberBase): Detection whether member is explicit interface
17483         implementation is now in constructor.
17484         (MemberBase.UpdateMemberName): Handles IndexerName.
17485         (Accessor): Changed to keep also location information.
17486         (AbstractPropertyEventMethod): Is derived from MemberCore.
17487         (AbstractPropertyEventMethod.IsDummy): Says whether accessor
17488         will be emited or not.
17489         (PropertyBase.AreAccessorsDuplicateImplementation):
17490         Tests whether accessors are not in collision with some method.
17491         (Operator): Is derived from MethodCore to simplify common
17492         operations.
17493
17494         * decl.cs (Flags.TestMethodDuplication): Test for duplication
17495         must be performed.
17496         (DeclSpace.AddToContainer): Adds the member to defined_names
17497         table. It tests for duplications and enclosing name conflicts.
17498
17499         * enum.cs (EnumMember): Clean up to reuse the base structures
17500
17501 2004-09-03  Martin Baulig  <martin@ximian.com>
17502
17503         * class.cs (TypeContainer.DefineDefaultConstructor): Put this back
17504         into TypeContainer, to make partial classes work again.
17505
17506 2004-09-03  Martin Baulig  <martin@ximian.com>
17507
17508         * rootcontext.cs (RootContext.V2): Removed.
17509
17510 2004-03-23  Martin Baulig  <martin@ximian.com>
17511
17512         * expression.cs (Invocation.OverloadResolve): Added `bool
17513         may_fail' argument and use it instead of the Location.IsNull() hack.
17514
17515 2004-09-03  Martin Baulig  <martin@ximian.com>
17516
17517         Merged latest changes into gmcs.  Please keep this comment in
17518         here, it makes it easier for me to see what changed in MCS since
17519         the last time I merged.
17520
17521 2004-09-03  Raja R Harinath  <rharinath@novell.com>
17522
17523         Fix #61128.
17524         * expression.cs (BetterConversion): Don't allow either conversion 
17525         to be null.  Remove redundant implicit conversion test when 'q ==
17526         null' -- when this function is invoked, we already know that the
17527         implicit conversion exists.
17528         (BetterFunction): Assume that 'best' is non-null.  Remove
17529         redundant reimplementation of IsApplicable when 'best' is null.
17530         (IsParamsMethodApplicable, IsApplicable): Add new parameter for
17531         number of arguments.
17532         (IsAncestralType): Extract from OverloadResolve.
17533         (OverloadResolve): Make robust to the MethodGroupExpr being
17534         unsorted.  Implement all the logic of Section 14.5.5.1, and
17535         support overloading of methods from multiple applicable types.
17536         Clean up logic somewhat.  Don't pass null methods to BetterFunction.
17537
17538         * report.cs (SymbolRelatedToPreviousError): Cleanup output.
17539         (RealError, Warning): Append type of report to related symbol.
17540
17541 2004-09-03  Marek Safar  <marek.safar@seznam.cz>
17542
17543         * enum.cs: Fixed CLS-Compliance checks for enum members.
17544         Error tests cs3008-8.cs, cs3014-8.cs
17545
17546 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17547
17548         Fixed bug #62342, #63102
17549         * class.cs: ImplementIndexer uses member.IsExplicitImpl
17550         like ImplementMethod.
17551
17552 2004-09-02  Marek Safar  <marek.safar@seznam.cz>
17553
17554         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17555         Fixed bug #65170.
17556
17557 2004-09-02  Martin Baulig  <martin@ximian.com>
17558
17559         * statement.cs (Using.EmitLocalVariableDeclFinally): Use
17560         TypeManager.GetArgumentTypes() rather than calling GetParameters()
17561         on the MethodBase.
17562
17563 2004-09-01  Marek Safar  <marek.safar@seznam.cz>
17564
17565         C# 2.0 Static classes implemented
17566
17567         * class.cs (TypeContainer): instance_constructors,
17568         initialized_fields, initialized_static_fields,
17569         default_constructor, base_inteface_types are protected to be
17570         accessible from StaticClass.
17571         (TypeContainer.DefineDefaultConstructor): New virtual method
17572         for custom default constructor generating
17573         (StaticClass): New class to handle "Static classes" feature.
17574
17575         * cs-parser.jay: Handle static keyword on class like instance
17576         of StaticClass.
17577
17578         * driver.cs: Added "/langversion" command line switch with two
17579         options (iso-1, default).
17580
17581 2004-08-31  Marek Safar  <marek.safar@seznam.cz>
17582
17583         * ecore.cs (FieldExpr.Resolve): Fixed bug #64689.
17584
17585 2004-08-31  Miguel de Icaza  <miguel@ximian.com>
17586
17587         * delegate.cs: Style.
17588
17589 2004-08-31 Ben Maurer  <bmaurer@users.sourceforge.net>
17590
17591         * delegate.cs: Add seperate instance expr field for miguel.
17592
17593 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17594
17595         * PointerArithmetic (Resolve): make sure we are not doing
17596         pointer arith on void*. Also, make sure we are resolved
17597         by not setting eclass until resolve.
17598
17599         All callers: Make sure that PointerArithmetic gets resolved.
17600
17601 2004-08-29 Ben Maurer  <bmaurer@users.sourceforge.net>
17602
17603         * ArrayCreation (LookupType): If the type does not resolve 
17604         to an array, give an error.
17605
17606 2004-08-27  Marek Safar  <marek.safar@seznam.cz>
17607
17608         * statement.cs (Try.Resolve): Fixed bug #64222
17609
17610 2004-08-27  Martin Baulig  <martin@ximian.com>
17611
17612         * class.cs
17613         (TC.OperatorArrayList.OperatorEntry.CheckPairedOperators): Don't
17614         crash here.     
17615
17616 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17617
17618         * ecore.cs (Constantify): Get underlying type via
17619         System.Enum.GetUnderlyingType to avoid StackOverflow on the
17620         Windows in special cases.
17621
17622 2004-08-26  Marek Safar  <marek.safar@seznam.cz>
17623
17624         * typemanager.cs (GetAddMethod): Used GetAddMethod (true)
17625         for obtaining also private methods.
17626         (GetRemoveMethod): Used GetRemoveMethod (true)
17627         for obtaining also private methods.
17628
17629 2004-08-24  Martin Baulig  <martin@ximian.com>
17630
17631         * class.cs (Method.Define): Set MethodAttributes.SpecialName and
17632         MethodAttributes.HideBySig for operators.
17633
17634 2004-08-23  Martin Baulig  <martin@ximian.com>
17635
17636         Back to the old error reporting system :-)
17637
17638         * report.cs (Message): Removed.
17639         (Report.MessageData, ErrorData, WarningData): Removed.
17640         (Report.Error, Warning): Back to the old system.
17641
17642 2004-08-23  Martin Baulig  <martin@ximian.com>
17643
17644         * decl.cs (IMemberContainer.Parent): Renamed to ParentContainer.
17645
17646         * class.cs (TypeContainer.ParentContainer): New public virtual
17647         method; replaces the explicit interface implementation.
17648         (ClassPart.ParentContainer): Override.
17649
17650 2004-08-23  Martin Baulig  <martin@ximian.com>
17651
17652         * statement.cs (Switch): Added support for constant switches; see
17653         #59428 or test-285.cs.
17654
17655 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17656
17657         Fixed bug #62740.
17658         * statement.cs (GetEnumeratorFilter): Removed useless
17659         logic because C# specs is strict. GetEnumerator must be
17660         public.
17661
17662 2004-08-22  Martin Baulig  <martin@ximian.com>
17663
17664         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
17665         a switch and may break, reset the barrier.  Fixes #59867.
17666
17667 2004-08-22  Marek Safar  <marek.safar@seznam.cz>
17668
17669         CLS-Compliance speed up (~5% for corlib)
17670
17671         * attribute.cs (AttributeTester.VerifyTopLevelNameClsCompliance):
17672         New method. Tests container for CLS-Compliant names
17673
17674         * class.cs (TypeContainer.VerifyClsName): New method.
17675         Checks whether container name is CLS Compliant.
17676         (Constructor): Implements IMethodData.
17677
17678         * decl.cs (MemberCache.GetPublicMembers ): New method. Builds
17679         low-case table for CLS Compliance test.
17680         (MemberCache.VerifyClsParameterConflict): New method.
17681         Checks method parameters for CS3006 error.
17682
17683         * enum.cs (EnumMember): Is derived from MemberCore.
17684         (Enum.VerifyClsName): Optimized for better performance.
17685
17686 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17687
17688         * report.cs: Renamed Error_T to Error and changed all
17689         references.
17690
17691 2004-08-06  Marek Safar  <marek.safar@seznam.cz>
17692
17693         * class.cs (TypeContainer.IndexerArrayList): New inner class
17694         container for indexers.
17695         (TypeContainer.DefaultIndexerName): New constant for default
17696         indexer name. Replaced all "Item" with this constant.
17697         (TypeContainer.DefineIndexers): Moved to IndexerArrayList class.
17698
17699         * typemanager.cs (TypeManager.default_member_ctor): Cache here
17700         DefaultMemberAttribute constructor.
17701
17702 2004-08-05  Martin Baulig  <martin@ximian.com>
17703
17704         * flowanalysis.cs (FlowBranching.UsageVector.MergeJumpOrigins):
17705         Fix bug #59429.
17706
17707 2004-08-05  Marek Safar  <marek.safar@seznam.cz>
17708
17709         * mcs.exe.sources: $(EXTRA_SOURCES) are now here to avoid
17710         multi platforms problem.
17711
17712         * compiler.csproj: Included shared files.
17713
17714 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17715
17716         Fix bug 60333, 55971 in the more general way
17717         * attribute.cs (Attribute.GetAttributeArgumentExpression):
17718         Added arg_type argument for constant conversion.
17719         (Attribute.Resolve): Reuse GetAttributeArgumentExpression.
17720
17721 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17722
17723         Fix bug #59760
17724         * class.cs (TypeContainer ): New inner classes MethodArrayList, 
17725         OperatorArrayList, MethodCoreArrayList for typecontainer
17726         containers. Changed class member types to these new types.
17727         (MethodArrayList.DefineMembers): Added test for CS0659.
17728
17729 2004-08-04  Miguel de Icaza  <miguel@ximian.com>
17730
17731         * cfold.cs: Synchronize the folding with the code in expression.cs
17732         Binary.DoNumericPromotions for uint operands.
17733
17734         * attribute.cs: Revert patch from Raja, it introduced a regression
17735         while building Blam-1.2.1 (hard to isolate a test case).
17736
17737 2004-08-04  Marek Safar  <marek.safar@seznam.cz>
17738
17739         Fix for #55382
17740         * class.cs:
17741         (TypeContainer.Define): Renamed to DefineContainerMembers because of
17742         name collision.
17743         (MethodCore.parent_method): New member. The method we're overriding
17744         if this is an override method.
17745         (MethodCore.CheckBase): Moved from Method class and made common.
17746         (MethodCore.CheckMethodAgainstBase): Moved from MemberBase and made
17747         private.
17748         (MethodCore.CheckForDuplications): New abstract method. For custom
17749         member duplication search in a container
17750         (MethodCore.FindOutParentMethod): New abstract method. Gets parent
17751         method and its return type.
17752         (Event.conflict_symbol): New member. Symbol with same name in the
17753         parent class.
17754
17755         * decl.cs:
17756         (MemberCache.FindMemberWithSameName): New method. The method
17757         is looking for conflict with inherited symbols.
17758
17759 2004-08-04  Martin Baulig  <martin@ximian.com>
17760
17761         * codegen.cs (VariableStorage.EmitLoadAddress): New public method.
17762
17763         * statement.cs (Foreach.EmitFinally): Make this work for valuetypes.
17764
17765 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17766
17767         * report.cs (Message): New enum for better error, warning reference in
17768         the code.
17769         (MessageData): New inner abstract class. It generally handles printing of
17770         error and warning messages.
17771         Removed unused Error, Warning, Message methods.
17772
17773 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17774
17775         Fix for cs0592-8.cs test
17776         * attribute.cs
17777         (Attributable.ValidAttributeTargets): Made public.
17778         (Attribute.ExplicitTarget): New member for explicit target value.
17779         (Attribute.CheckTargets): Now we translate explicit attribute
17780         target to Target here.
17781
17782 2004-08-03  Ben Maurer  <bmaurer@ximian.com>
17783
17784         * ecore.cs (MethodGroupExpr): new IsBase property.
17785
17786         * expression.cs (BaseAccess): Set IsBase on MethodGroupExpr.
17787
17788         * delegate.cs (DelegateCreation): store a MethodGroupExpr
17789         rather than an instance expr.
17790
17791         (DelegateCreation.Emit): Use the method group rather than
17792         the instance expression. Also, if you have base.Foo as the
17793         method for a delegate, make sure to emit ldftn, not ldftnvirt.
17794
17795         (ResolveMethodGroupExpr): Use the MethodGroupExpr. 
17796
17797         (NewDelegate.DoResolve): Only check for the existance of Invoke
17798         if the method is going to be needed. Use MethodGroupExpr.
17799
17800         (NewDelegate.Emit): Remove, DelegateCreation implements this.   
17801
17802         * expression.cs: For pointer arith., make sure to use
17803         the size of the type, not the size of the pointer to
17804         the type.
17805
17806 2004-08-03  Marek Safar  <marek.safar@seznam.cz>
17807
17808         Fix for #60722
17809         * class.cs (Class): Added error CS0502 test.
17810
17811 2004-08-03  John Luke  <jluke@cfl.rr.com>
17812             Raja R Harinath  <rharinath@novell.com>
17813
17814         Fix for #60997.
17815         * attribute.cs (Attribute.complained_before): New flag.
17816         (Attribute.ResolveType, Attribute.Resolve),
17817         (Attribute.DefinePInvokeMethod): Set it.
17818         (Attributes.Search): Pass 'complain' to Attribute.ResolveType.
17819         
17820 2004-08-03  Martin Baulig  <martin@ximian.com>
17821
17822         * expression.cs (Binary.ResolveOperator): Don't abort if we can't
17823         use a user-defined operator; we still need to do numeric
17824         promotions in case one argument is a builtin type and the other
17825         one has an implicit conversion to that type.  Fixes #62322.
17826
17827 2004-08-02  Martin Baulig  <martin@ximian.com>
17828
17829         * statement.cs (LocalInfo.Flags): Added `IsThis'.
17830         (LocalInfo.IsThis): New public property.
17831         (Block.EmitMeta): Don't create a LocalBuilder for `this'.
17832
17833 2004-08-01  Martin Baulig  <martin@ximian.com>
17834
17835         * class.cs (TypeContainer.GetClassBases): Don't set the default
17836         here since we may get called from GetPartialBases().
17837         (TypeContainer.DefineType): If GetClassBases() didn't return a
17838         parent, use the default one.
17839
17840 2004-07-30  Duncan Mak  <duncan@ximian.com>
17841
17842         * Makefile (mcs2.exe, mcs3.exe): add $(EXTRA_SOURCES).
17843
17844 2004-07-30  Martin Baulig  <martin@ximian.com>
17845
17846         * Makefile (EXTRA_SOURCES): List the symbol writer's sources here.
17847
17848         * class.cs (SourceMethod): New public class, derive from the
17849         symbol writer's ISourceMethod.
17850         (Method): Use the new symbol writer API.
17851
17852         * codegen.cs (CodeGen.InitializeSymbolWriter): Take the filename
17853         as argument and use the new symbol writer.
17854
17855         * location.cs
17856         (SourceFile): Implement the symbol writer's ISourceFile.
17857         (Location.SymbolDocument): Removed.
17858         (Location.SourceFile): New public property.
17859
17860         * symbolwriter.cs: Use the new symbol writer API.
17861
17862 2004-07-30  Raja R Harinath  <rharinath@novell.com>
17863
17864         * Makefile (install-local): Remove.  Functionality moved to
17865         executable.make.
17866
17867 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17868
17869         * Makefile: Install mcs.exe.config file together with mcs.exe.
17870         * mcs.exe.config: Added supportedRuntime entry to make sure it runs in the
17871         correct runtime version.
17872         
17873 2004-07-25  Martin Baulig  <martin@ximian.com>
17874
17875         * class.cs
17876         (TypeContainer.RegisterOrder): Removed, this was unused.
17877         (TypeContainer, interface_order): Removed.
17878         (TypeContainer.AddClass, AddStruct, AddInterface): Take a
17879         TypeContainer as argument since we can also be called with a
17880         `PartialContainer' for a partial class/struct/interface.
17881         (TypeContainer.IsInterface): Use `Kind == Kind.Interface' instead
17882         of checking whether we're an `Interface' - we could be a
17883         `PartialContainer'.
17884         (PartialContainer.Register): Override; call
17885         AddClass()/AddStruct()/AddInterface() on our parent.
17886
17887         * cs-parser.jay (interface_member_declaration): Add things to the
17888         `current_container', not the `current_class'.
17889
17890         * rootcontext.cs (RegisterOrder): The overloaded version which
17891         takes an `Interface' was unused, removed.
17892
17893         * typemanager.cs (TypeManager.LookupInterface): Return a
17894         `TypeContainer', not an `Interface'.
17895         (TypeManager.IsInterfaceType): The `builder_to_declspace' may
17896         contain a `PartialContainer' for an interface, so check it's
17897         `Kind' to figure out what it is.
17898
17899 2004-07-25  Martin Baulig  <martin@ximian.com>
17900
17901         * class.cs (Class.DefaultTypeAttributes): New public constant.
17902         (Struct.DefaultTypeAttributes): Likewise.
17903         (Interface.DefaultTypeAttributes): Likewise.
17904         (PartialContainer.TypeAttr): Override this and add the
17905         DefaultTypeAttributes.
17906
17907 2004-07-25  Martin Baulig  <martin@ximian.com>
17908
17909         * decl.cs (DeclSpace.Emit): Removed the `TypeContainer' argument,
17910         we can just use the `Parent' field instead.
17911
17912 2004-07-25  Martin Baulig  <martin@ximian.com>
17913
17914         * class.cs (TypeContainer.Emit): Renamed to EmitType().
17915
17916 2004-07-25  Martin Baulig  <martin@ximian.com>
17917
17918         * class.cs (TypeContainer.DefineMembers): Call DefineMembers() on
17919         our parts before defining any methods.
17920         (TypeContainer.VerifyImplements): Make this virtual.
17921         (ClassPart.VerifyImplements): Override and call VerifyImplements()
17922         on our PartialContainer.
17923
17924 2004-07-25  Martin Baulig  <martin@ximian.com>
17925
17926         * iterators.cs (Iterator.Define): Renamed to DefineIterator().
17927
17928         * decl.cs (DeclSpace.Define): Removed the `TypeContainer'
17929         argument, we can just use the `Parent' field instead.
17930
17931         * class.cs
17932         (MemberBase.CheckBase): Removed the `TypeContainer' argument.   
17933         (MemberBase.DoDefine): Likewise.
17934
17935 2004-07-24  Martin Baulig  <martin@ximian.com>
17936
17937         * decl.cs (MemberCore.Parent): New public field.
17938         (DeclSpace.Parent): Moved to MemberCore.
17939
17940         * class.cs (MethodCore.ds): Removed; use `Parent' instead.
17941         (MemberBase.ctor): Added TypeContainer argument, pass it to our
17942         parent's .ctor.
17943         (FieldBase, Field, Operator): Likewise.
17944         (EventProperty.ctor): Take a TypeContainer instead of a DeclSpace.
17945         (EventField, Event): Likewise.
17946
17947 2004-07-23  Martin Baulig  <martin@ximian.com>
17948
17949         * class.cs (PartialContainer): New public class.
17950         (ClassPart): New public class.
17951         (TypeContainer): Added support for partial classes.
17952         (TypeContainer.GetClassBases): Splitted some of the functionality
17953         out into GetNormalBases() and GetPartialBases().
17954
17955         * cs-tokenizer.cs (Token.PARTIAL): New token.
17956         (Tokenizer.consume_identifier): Added some hacks to recognize
17957         `partial', but only if it's immediately followed by `class',
17958         `struct' or `interface'.
17959
17960         * cs-parser.jay: Added support for partial clases.
17961
17962 2004-07-23  Martin Baulig  <martin@ximian.com>
17963
17964         * class.cs (MethodCore.ds): Made this a `TypeContainer' instead of
17965         a `DeclSpace' and also made it readonly.
17966         (MethodCore.ctor): Take a TypeContainer instead of a DeclSpace.
17967         (Method.ctor, Constructor.ctor, Destruktor.ctor): Likewise.
17968         (PropertyBase.ctor, Property.ctor, Indexer.ctor): Likewise.
17969
17970         * cs-parser.jay: Pass the `current_class', not the
17971         `current_container' (at the moment, this is still the same thing)
17972         to a new Method, Property, Event, Indexer or Constructor.
17973
17974 2004-07-23  Martin Baulig  <martin@ximian.com>
17975
17976         * cs-parser.jay (CSharpParser): Added a new `current_class' field
17977         and removed the `current_interface' one.
17978         (struct_declaration, class_declaration, interface_declaration):
17979         Set `current_class' to the newly created class/struct/interface;
17980         set their `Bases' and call Register() before parsing their body.
17981
17982 2004-07-23  Martin Baulig  <martin@ximian.com>
17983
17984         * class.cs (Kind): New public enum.
17985         (TypeContainer): Made this class abstract.
17986         (TypeContainer.Kind): New public readonly field.
17987         (TypeContainer.CheckDef): New public method; moved here from
17988         cs-parser.jay.
17989         (TypeContainer.Register): New public abstract method.
17990         (TypeContainer.GetPendingImplementations): New public abstract
17991         method.
17992         (TypeContainer.GetClassBases): Removed the `is_class' and
17993         `is_iface' parameters.
17994         (TypeContainer.DefineNestedTypes): Formerly known as
17995         DoDefineType().
17996         (ClassOrStruct): Made this class abstract.
17997
17998         * tree.cs (RootTypes): New public type. 
17999
18000 2004-07-20  Martin Baulig  <martin@ximian.com>
18001
18002         * tree.cs (Tree.RecordNamespace): Removed.
18003         (Tree.Namespaces): Removed.
18004
18005         * rootcontext.cs (RootContext.IsNamespace): Removed.
18006
18007         * cs-parser.jay (namespace_declaration): Just create a new
18008         NamespaceEntry here.
18009
18010 2004-07-20  Martin Baulig  <martin@ximian.com>
18011
18012         * statement.cs (ExceptionStatement): New abstract class.  This is
18013         now used as a base class for everyone who's using `finally'.
18014         (Using.ResolveLocalVariableDecls): Actually ResolveLValue() all
18015         our local variables before using them.
18016
18017         * flowanalysis.cs (FlowBranching.StealFinallyClauses): New public
18018         virtual method.  This is used by Yield.Resolve() to "steal" an
18019         outer block's `finally' clauses.
18020         (FlowBranchingException): The .ctor now takes an ExceptionStatement
18021         argument.
18022
18023         * codegen.cs (EmitContext.StartFlowBranching): Added overloaded
18024         version which takes an ExceptionStatement.  This version must be
18025         used to create exception branchings.
18026
18027         * iterator.cs
18028         (Yield.Resolve): "Steal" all `finally' clauses from containing blocks.
18029         (Iterator.EmitMoveNext): Added exception support; protect the
18030         block with a `fault' clause, properly handle 'finally' clauses.
18031         (Iterator.EmitDispose): Run all the `finally' clauses here.
18032
18033 2004-07-20  Martin Baulig  <martin@ximian.com>
18034
18035         * iterator.cs: This is the first of a set of changes in the
18036         iterator code.  Match the spec more closely: if we're an
18037         IEnumerable, then GetEnumerator() must be called.  The first time
18038         GetEnumerator() is called, it returns the current instance; all
18039         subsequent invocations (if any) must create a copy.
18040
18041 2004-07-19  Miguel de Icaza  <miguel@ximian.com>
18042
18043         * expression.cs: Resolve the constant expression before returning
18044         it. 
18045
18046 2004-07-19  Martin Baulig  <martin@ximian.com>
18047
18048         * iterators.cs (Iterator.MapVariable): Don't define fields twice.
18049         (Iterator.MoveNextMethod.DoEmit): Use `TypeManager.int32_type' as
18050         the return type of the new EmitContext.
18051
18052 2004-07-18  Martin Baulig  <martin@ximian.com>
18053
18054         * class.cs (Property.Define): Fix iterators.
18055
18056         * iterators.cs (Iterator.Define): Moved the
18057         `container.AddInterator (this)' call here from the .ctor; only do
18058         it if we resolved successfully.
18059
18060 2004-07-17  Miguel de Icaza  <miguel@ximian.com>
18061
18062         * cs-tokenizer.cs (handle_preprocessing_directive): Do not return
18063         `true' for preprocessing directives that we parse.  The return
18064         value indicates whether we should return to regular tokenizing or
18065         not, not whether it was parsed successfully.
18066
18067         In the past if we were in: #if false ... #line #endif, we would
18068         resume parsing after `#line'.  See bug 61604.
18069
18070         * typemanager.cs: Removed an old hack from Gonzalo to get corlib
18071         building: IsEnumType should return true only for enums, not for
18072         enums or System.Enum itself.  This fixes #61593.
18073
18074         Likely what happened is that corlib was wrong: mcs depended on
18075         this bug in some places.  The bug got fixed, we had to add the
18076         hack, which caused bug 61593.
18077
18078         * expression.cs (ArrayAccess.GetStoreOpCode): Remove an old hack
18079         that was a workaround for the older conditions.
18080
18081 2004-07-16  Ben Maurer  <bmaurer@ximian.com>
18082
18083         * assign.cs: IAssignMethod has a new interface, as documented
18084         inline. All assignment code now uses this new api.
18085
18086         * ecore.cs, expression.cs: All classes which implement
18087         IAssignMethod now use the new interface.
18088
18089         * expression.cs (Invocation): add a hack to EmitCall so that
18090         IndexerAccess can be the target of a compound assignment without
18091         evaluating its arguments twice.
18092
18093         * statement.cs: Handle changes in Invocation api.
18094
18095 2004-07-16  Martin Baulig  <martin@ximian.com>
18096
18097         * iterators.cs: Rewrote this.  We're now using one single Proxy
18098         class for both the IEnumerable and the IEnumerator interface and
18099         `Iterator' derives from Class so we can use the high-level API.
18100
18101         * class.cs (TypeContainer.AddIterator): New method.
18102         (TypeContainer.DoDefineType): New protected virtual method, which
18103         is called from DefineType().
18104         (TypeContainer.DoDefineMembers): Call DefineType() and
18105         DefineMembers() on all our iterators.
18106         (TypeContainer.Emit): Call Emit() on all our iterators.
18107         (TypeContainer.CloseType): Call CloseType() on all our iterators.
18108
18109         * codegen.cs (EmitContext.CurrentIterator): New public field.
18110
18111 2004-07-15  Martin Baulig  <martin@ximian.com>
18112
18113         * typemanager.cs
18114         (TypeManager.not_supported_exception_type): New type.   
18115
18116 2004-07-14  Martin Baulig  <martin@ximian.com>
18117
18118         * iterators.cs: Use real error numbers.
18119
18120 2004-07-14  Martin Baulig  <martin@ximian.com>
18121
18122         * iterator.cs (IteratorHandle.IsIEnumerable): The spec explicitly
18123         requires this to be a System.Collection.IEnumerable and not a
18124         class implementing that interface.
18125         (IteratorHandle.IsIEnumerator): Likewise, for IEnumerator.      
18126
18127 2004-07-13  Marek Safar  <marek.safar@seznam.cz>
18128
18129         * class.cs: Fixed previous fix, it broke some error tests.
18130
18131 2004-07-12  Martin Baulig  <martin@ximian.com>
18132
18133         * enum.cs (Enum.Define): Call Emit() to emit the attributes.
18134         Fixes #61293.
18135
18136 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
18137
18138         * assign.cs (LocalTemporary): Add new argument: is_address,If
18139         `is_address' is true, then the value that we store is the address
18140         to the real value, and not the value itself.
18141         
18142         * ecore.cs (PropertyExpr): use the new local temporary
18143         stuff to allow us to handle X.Y += z (where X is a struct)
18144
18145 2004-07-08  Martin Baulig  <martin@ximian.com>
18146
18147         * statement.cs (Lock.Resolve): Set ec.NeedReturnLabel() if we do
18148         not always return, just like we're doing in Using.Resolve().
18149
18150 2004-07-07  Miguel de Icaza  <miguel@ximian.com>
18151
18152         * cs-parser.jay (fixed_statement): flag this as Pinned.
18153
18154 2004-07-06  Miguel de Icaza  <miguel@ximian.com>
18155
18156         * typemanager.cs (TypeManager): Removed MakePinned method, this
18157         mechanism is replaced with the .NET 2.x compatible mechanism of
18158         calling `ILGenerator.DeclareLocal (Type t, bool pinned)'.
18159
18160         * statement.cs (LocalInfo): Remove MakePinned, add Pinned property 
18161         Rename `Fixed' to `Pinned' as a flag, to distinguish from the
18162         `IsFixed' property which has a different meaning.
18163
18164 2004-07-02  Raja R Harinath  <rharinath@novell.com>
18165
18166         * ecore.cs (DoSimpleNameResolve): Expand CS0038 check to all names
18167         visible from inside a nested class, not just the names of the
18168         immediately enclosing class.
18169         Fix for bug #60730.
18170
18171 2004-06-24  Raja R Harinath  <rharinath@novell.com>
18172
18173         * expression.cs (BetterConversion): Remove buggy special-case
18174         handling of "implicit constant expression conversions".  At this
18175         point, we already know that the conversion is possible -- we're
18176         only checking to see which is better.
18177
18178 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18179
18180         * cs-parser.jay: Added error CS0210 test.
18181
18182 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18183
18184         * cs-parser.jay: Added error CS0134 test.
18185
18186 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18187
18188         Fix bug #52507
18189         * cs-parser.jay: Added error CS0145 test.
18190
18191 2004-06-24  Marek Safar  <marek.safar@seznam.cz>
18192
18193         * class.cs (Operator.Define): Added test for errors CS0553, CS0554.
18194
18195 2004-06-23  Ben Maurer  <bmaurer@ximian.com>
18196         
18197         * expression.cs (StackAlloc.Resolve): The argument may not
18198         be a constant; deal with this case.
18199         
18200 2004-06-23  Marek Safar  <marek.safar@seznam.cz>
18201
18202         * attribute.cs (IndexerName_GetIndexerName): Renamed to
18203         GetIndexerAttributeValue.
18204         (ScanForIndexerName): Renamed to GetIndexerNameAttribute.
18205
18206         * class.cs (Indexer.Define): Added error tests for CS0415,
18207         CS0609.
18208
18209 2004-06-23  Miguel de Icaza  <miguel@ximian.com>
18210
18211         * attribute.cs (Attribute.Resolve): Keep field code in sync with
18212         property code.
18213
18214 2004-06-23  Martin Baulig  <martin@ximian.com>
18215
18216         * flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
18217         neither return nor throw, reset the barrier as well.  Fixes #60457.
18218
18219 2004-06-22  Atsushi Enomoto  <atsushi@ximian.com>
18220
18221         * class.cs : EventAttributes is now set to None by default.
18222           This fixes bug #60459.
18223
18224 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18225
18226         Fix bug #60219
18227         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18228         Don't throw exception but return null (it's sufficient now).
18229
18230 2004-06-18  Marek Safar  <marek.safar@seznam.cz>
18231
18232         * typemanager.cs (GetArgumentTypes): Faster implementation.
18233
18234 2004-06-18  Martin Baulig  <martin@ximian.com>
18235
18236         * attribute.cs (Attribute.Resolve): Check whether we're an
18237         EmptyCast which a Constant child.  Fixes #60333.
18238
18239 2004-06-17  Ben Maurer  <bmaurer@ximian.com>
18240
18241         * statement.cs (EmitCollectionForeach): Account for the fact that
18242         not all valuetypes are in areas which we can take the address of.
18243         For these variables, we store to a temporary variable. Also, make
18244         sure that we dont emit a `callvirt' on a valuetype method.
18245
18246 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18247
18248         * expression.cs (StackAlloc.DoReSolve): Added test for
18249         negative parameter (CS0247).
18250
18251 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18252
18253         Fix bug #59792
18254         * class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.
18255
18256 2004-06-15  Marek Safar  <marek.safar@seznam.cz>
18257
18258         Fix bug #59781
18259         * expression.cs: (Binary.DoNumericPromotions): Added conversion for
18260         ulong.
18261
18262 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18263
18264         Fix bug #58254 & cs1555.cs, cs1556.cs
18265         * driver.cs (MainDriver): Added tests for errors CS1555, CS1556.
18266
18267 2004-06-14  Marek Safar  <marek.safar@seznam.cz>
18268
18269         * cs-parser.jay: Added error CS1669 test for indexers.
18270
18271 2004-06-11  Martin Baulig  <martin@ximian.com>
18272
18273         * expression.cs (Invocation.IsParamsMethodApplicable): We need to
18274         call this twice: for params and varargs methods.
18275
18276 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18277
18278         * class.cs:
18279         (FieldBase.DoDefine, PropertyBase.DoDefine): Added error test CS0610.
18280
18281 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18282
18283         * attribute.cs (Attribute.GetValidTargets): Made public.
18284
18285         * class.cs: 
18286         (AbstractPropertyEventMethod): New class for better code sharing.
18287         (AbstractPropertyEventMethod.ApplyAttributeBuilder): Add error
18288         CS1667 report.
18289         (PropertyMethod, DelegateMethod): Derived from AbstractPropertyEventMethod
18290
18291 2004-06-11  Raja R Harinath  <rharinath@novell.com>
18292
18293         Fix bug #59477.
18294         * ecore.cs (ResolveFlags): Add new 'Intermediate' flag to tell
18295         that the call to Resolve is part of a MemberAccess.
18296         (Expression.Resolve): Use it for SimpleName resolution.
18297         (SimpleName.SimpleNameResolve, SimpleName.DoResolveAllowStatic):
18298         Add 'intermediate' boolean argument.
18299         (SimpleName.DoSimpleNameResolve): Likewise.  Use it to disable an
18300         error message when the SimpleName can be resolved ambiguously
18301         between an expression and a type.
18302         * expression.cs (MemberAccess.IdenticalNameAndTypeName): Make
18303         public.
18304         (MemberAccess.Resolve): Pass 'Intermediate' flag to the Resolve()
18305         call on the left-side.
18306
18307 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18308
18309         * class.cs:
18310         (MethodCore.VerifyClsCompliance): Added test for error CS3000.
18311
18312 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18313
18314         * attribute.cs (Attribute.Emit): Fixed error CS0579 reporting.
18315
18316 2004-06-11  Martin Baulig  <martin@ximian.com>
18317
18318         * expression.cs (Invocation.EmitCall): Use OpCodes.Callvirt for
18319         varargs methods if applicable.
18320
18321 2004-06-11  Martin Baulig  <martin@ximian.com>
18322
18323         * expression.cs (Invocation.EmitCall): Don't use
18324         `method.CallingConvention == CallingConventions.VarArgs' since the
18325         method could also have `CallingConventions.HasThis'.
18326
18327 2004-06-11  Marek Safar  <marek.safar@seznam.cz>
18328
18329         * class.cs (Event.GetSignatureForError): Implemented.
18330         Fixed crash in error test cs3010.cs
18331
18332 2004-06-10  Miguel de Icaza  <miguel@ximian.com>
18333
18334         * cs-tokenizer.cs: Change the way we track __arglist to be
18335         consistent with the other keywords.
18336
18337 2004-06-09  Miguel de Icaza  <miguel@ximian.com>
18338
18339         * codegen.cs: FAQ avoider: turn 1577 into a warning for now until
18340         tomorrow.
18341
18342 2004-06-09  Sebastien Pouliot  <sebastien@ximian.com>
18343
18344         * codegen.cs: Check that all referenced assemblies have a strongname
18345         before strongnaming the compiled assembly. If not report error CS1577.
18346         Fix bug #56563. Patch by Jackson Harper.
18347         * typemanager.cs: Added a method to return all referenced assemblies.
18348         Fix bug #56563. Patch by Jackson Harper.
18349
18350 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18351
18352         * class.cs:
18353         (Method.ApplyAttributeBuilder): Moved and added conditional
18354         attribute error tests (CS0577, CS0578, CS0243, CS0582, CS0629).
18355
18356         * delegate.cs:
18357         (DelegateCreation.ResolveMethodGroupExpr): Added error CS1618 test.
18358
18359 2004-06-08  Marek Safar  <marek.safar@seznam.cz>
18360
18361         Fixed #59640
18362         * class.cs: (EventField.attribute_targets): Changed default target.
18363
18364 2004-06-08  Martin Baulig  <martin@ximian.com>
18365
18366         * expression.cs (Invocation.EmitCall): Enable varargs methods.
18367
18368 2004-06-08  Martin Baulig  <martin@ximian.com>
18369
18370         * rootcontext.cs (ResolveCore): Added "System.RuntimeArgumentHandle".
18371
18372 2004-06-07  Martin Baulig  <martin@ximian.com>
18373
18374         Added support for varargs methods.
18375
18376         * cs-tokenizer.cs (Token.ARGLIST): New token for the `__arglist'
18377         keyword.
18378
18379         * cs-parser.jay: Added support for `__arglist'.
18380
18381         * decl.cs (MemberCache.AddMethods): Don't ignore varargs methods.
18382
18383         * expression.cs (Argument.AType): Added `ArgList'.
18384         (Invocation): Added support for varargs methods.
18385         (ArglistAccess): New public class.
18386         (Arglist): New public class.
18387
18388         * parameter.cs (Parameter.Modifier): Added `ARGLIST'.
18389
18390         * statement.cs (Block.Flags): Added `HasVarargs'.  We set this on
18391         a method's top-level block if the method has varargs.
18392
18393         * support.cs (ReflectionParameters, InternalParameters): Added
18394         support for varargs methods.    
18395
18396 2004-06-07  Miguel de Icaza  <miguel@ximian.com>
18397
18398         * class.cs: Provide location in indexer error report.
18399
18400         * driver.cs: Use standard names.
18401
18402         * namespace.cs: Catch the use of using after a namespace has been
18403         declared also on using aliases.
18404
18405 2004-06-03  Raja R Harinath  <rharinath@novell.com>
18406
18407         Bug #50820.
18408         * typemanager.cs (closure_private_ok, closure_invocation_type)
18409         (closure_qualifier_type, closure_invocation_assembly)
18410         (FilterWithClosure): Move to ...
18411         (Closure): New internal nested class.
18412         (Closure.CheckValidFamilyAccess): Split out from Closure.Filter.
18413         (MemberLookup, RealMemberLookup): Add new almost_match parameter.
18414         * ecore.cs (almostMatchedMembers): New variable to help report CS1540.
18415         (MemberLookup, MemberLookupFailed): Use it.
18416         * expression.cs (New.DoResolve): Treat the lookup for the
18417         constructor as being qualified by the 'new'ed type.
18418         (Indexers.GetIndexersForTypeOrInterface): Update.
18419
18420 2004-06-03  Marek Safar  <marek.safar@seznam.cz>
18421
18422         * attribute.cs
18423         (GetConditionalAttributeValue): New method. Returns
18424         condition of ConditionalAttribute.
18425         (SearchMulti): New method.  Returns all attributes of type 't'.
18426         Use it when attribute is AllowMultiple = true.
18427         (IsConditionalMethodExcluded): New method.
18428
18429         * class.cs
18430         (Method.IsExcluded): Implemented. Returns true if method has conditional
18431         attribute and the conditions is not defined (method is excluded).
18432         (IMethodData): Extended interface for ConditionalAttribute support.
18433         (PropertyMethod.IsExcluded): Implemented.
18434
18435         * decl.cs
18436         (MemberCore.Flags): Excluded_Undetected, Excluded new caching flags.
18437
18438         * expression.cs
18439         (Invocation.IsMethodExcluded): Checks the ConditionalAttribute
18440         on the method.
18441
18442 2004-06-02 Ben Maurer  <bmaurer@users.sourceforge.net>
18443
18444         * expression.cs (ArrayCreationExpression): Make this just an
18445         `expression'. It can't be a statement, so the code here was
18446         dead.
18447
18448 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18449
18450         Fixed #59072
18451         * typemanager.cs (GetFullNameSignature): New method for
18452         MethodBase types.
18453
18454 2004-06-02  Marek Safar  <marek.safar@seznam.cz>
18455
18456         Fixed #56452
18457         * class.cs (MemberBase.GetSignatureForError): New virtual method.
18458         Use this method when MethodBuilder is null.
18459         (MethodData.DefineMethodBuilder): Encapsulated code to the new method.
18460         Added test for error CS0626 (MONO reports error for this situation).
18461         (IMethodData.GetSignatureForError): Extended interface.
18462
18463 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18464
18465         * attribute.cs
18466         (AttributeTester.GetObsoleteAttribute): Returns instance of
18467         ObsoleteAttribute when type is obsolete.
18468
18469         * class.cs
18470         (TypeContainer.VerifyObsoleteAttribute): Override.
18471         (Method.GetSignatureForError): New method for usage when MethodBuilder is null.
18472         (MethodCode.VerifyObsoleteAttribute): Override.
18473         (MemberBase.VerifyObsoleteAttribute): Override.
18474
18475         * decl.cs
18476         (MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
18477         and report proper error.
18478
18479         *delegate.cs
18480         Delegate.VerifyObsoleteAttribute): Override.
18481
18482         * ecore.cs
18483         (Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
18484         and report proper error.
18485         (FieldExpr.DoResolve): Added tests for ObsoleteAttribute.
18486
18487         * enum.cs
18488         (Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
18489         and enum member.
18490
18491         * expression.cs
18492         (Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
18493         New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
18494         Added test for ObsoleteAttribute.
18495
18496         * statement.cs
18497         (Catch): Derived from Statement.
18498
18499 2004-06-01  Marek Safar  <marek.safar@seznam.cz>
18500  
18501         Fixed bug #59071 & cs0160.cs
18502  
18503         * statement.cs (Try.Resolve): Check here whether order of catch
18504         clauses matches their dependencies.
18505
18506 2004-05-31  Miguel de Icaza  <miguel@ximian.com>
18507
18508         * Reverted patch to namespace.cs (Use lookuptypedirect).  This
18509         caused a regression: #59343.  Referencing nested classes from an
18510         assembly stopped working.
18511
18512 2004-05-31  Martin Baulig  <martin@ximian.com>
18513
18514         MCS is now frozen for beta 2.
18515
18516 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18517
18518         * convert.cs: add a trivial cache for overload operator resolution.
18519
18520 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18521
18522         * decl.cs: If possible, use lookuptypedirect here. We can only do
18523         this if there is no `.' after the namespace. Avoids using
18524         LookupType, which does lots of slow processing.
18525         (FindNestedType) New method, does what it says :-).
18526         * namespace.cs: use LookupTypeDirect.
18527         * rootcontext.cs: use membercache, if possible.
18528         * typemanager.cs (LookupTypeDirect): Cache negative hits too.
18529
18530 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18531
18532         * expression.cs:
18533         According to the spec, 
18534
18535         In a member access of the form E.I, if E is a single identifier,
18536         and if the meaning of E as a simple-name (§7.5.2) is a constant,
18537         field, property, localvariable, or parameter with the same type as
18538         the meaning of E as a type-name (§3.8), then both possible
18539         meanings of E are permitted.
18540
18541         We did not check that E as a simple-name had the same type as E as
18542         a type name.
18543
18544         This trivial check gives us 5-7% on bootstrap time.
18545
18546 2004-05-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18547
18548         * expression.cs (Invocation.OverloadResolve): Avoid the
18549         use of hashtables and boxing here by allocating on demand.
18550
18551 2004-05-30  Martin Baulig  <martin@ximian.com>
18552
18553         * rootcontext.cs (RootContext.LookupType): Don't cache things if
18554         we're doing a silent lookup.  Don't try to lookup nested types in
18555         TypeManager.object_type (thanks to Ben Maurer).
18556
18557 2004-05-30  Martin Baulig  <martin@ximian.com>
18558
18559         Committing a patch from Ben Maurer.
18560
18561         * rootcontext.cs (RootContext.LookupType): Cache negative results.
18562
18563 2004-05-29  Martin Baulig  <martin@ximian.com>
18564
18565         * class.cs (IMethodData.ShouldIgnore): New method.
18566
18567         * typemanager.cs (TypeManager.MethodFlags): Don't take a
18568         `Location' argument, we don't need it anywhere.  Use
18569         `IMethodData.ShouldIgnore ()' instead of
18570         `MethodData.GetMethodFlags ()'.
18571         (TypeManager.AddMethod): Removed.
18572         (TypeManager.AddMethod2): Renamed to AddMethod.
18573
18574 2004-05-29  Martin Baulig  <martin@ximian.com>
18575
18576         Committing a patch from Benjamin Jemlich <pcgod@gmx.net>.
18577
18578         * convert.cs (Convert.ImplicitReferenceConversion): If we're
18579         converting from a class type S to an interface type and we already
18580         have an object on the stack, don't box it again.  Fixes #52578.
18581
18582 2004-05-29  Martin Baulig  <martin@ximian.com>
18583
18584         * class.cs (ConstructorInitializer.GetOverloadedConstructor):
18585         Added support for `params' parameters.  Fixes #59267.
18586
18587 2004-05-29  Martin Baulig  <martin@ximian.com>
18588
18589         * literal.cs (NullPointer): Provide a private .ctor which sets
18590         `type' to TypeManager.object_type.  Fixes #59048.
18591
18592 2004-05-29  Martin Baulig  <martin@ximian.com>
18593
18594         * expression.cs (MemberAccess.ResolveMemberAccess): If we're an
18595         EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.
18596
18597         * ecore.cs (EventExpr.instance_expr): Make the field private.
18598
18599 2004-05-26  Marek Safar  <marek.safar@seznam.cz>
18600
18601         Fixed bug #50080 & cs0214-2.cs
18602         * expression.cs (Cast.DoResolve): Check unsafe context here.
18603         
18604         * statement.cs (Resolve.DoResolve): Likewise.
18605
18606 2004-05-26  Martin Baulig  <martin@ximian.com>
18607
18608         * namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.
18609
18610         * rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
18611         (RootContext.LookupType): Pass down the `silent' flag.
18612
18613 2004-05-25  Martin Baulig  <martin@ximian.com>
18614
18615         * expression.cs
18616         (MethodGroupExpr.IdenticalTypeName): New public property.
18617         (Invocation.DoResolve): Don't report a CS0176 if the "instance"
18618         expression actually refers to a type.
18619
18620 2004-05-25  Martin Baulig  <martin@ximian.com>
18621
18622         * expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
18623         for #56176 and made it actually work.
18624
18625 2004-05-25  Martin Baulig  <martin@ximian.com>
18626
18627         * ecore.cs (Expression.CacheTemporaries): Make this virtual.
18628         (FieldExpr, PropertyExpr): Override and implement
18629         CacheTemporaries.  Fixes #52279.
18630
18631 2004-05-25  Miguel de Icaza  <miguel@ximian.com>
18632
18633         * location.cs: In the new compiler listing a file twice is a
18634         warning, not an error.
18635
18636 2004-05-24  Martin Baulig  <martin@ximian.com>
18637
18638         * enum.cs (Enum.DefineType): For the `BaseType' to be a
18639         TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.
18640
18641 2004-05-24  Martin Baulig  <martin@ximian.com>
18642
18643         * decl.cs (DeclSpace.FindType): Try doing an alias lookup before
18644         walking the `using' list.  Fixes #53921.
18645
18646 2004-05-24  Martin Baulig  <martin@ximian.com>
18647
18648         * const.cs (Const.LookupConstantValue): Added support for
18649         EmptyCast's; fixes #55251.
18650
18651 2004-05-24  Martin Baulig  <martin@ximian.com>
18652
18653         * ecore.cs (SimpleName.SimpleNameResolve): Renamed to
18654         DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
18655         which does the CS0135 check.  The reason is that we first need to
18656         check whether the variable actually exists.
18657
18658 2004-05-24  Martin Baulig  <martin@ximian.com>
18659
18660         * class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
18661         than RootContext.LookupType() to find the explicit interface
18662         type.  Fixes #58584.
18663
18664 2004-05-24  Raja R Harinath  <rharinath@novell.com>
18665
18666         * Makefile: Simplify.  Use executable.make.
18667         * mcs.exe.sources: New file.  List of sources of mcs.exe.
18668
18669 2004-05-24  Anders Carlsson  <andersca@gnome.org>
18670
18671         * decl.cs:
18672         * enum.cs:
18673         Use the invariant culture when doing String.Compare for CLS case
18674         sensitivity.
18675         
18676 2004-05-23  Martin Baulig  <martin@ximian.com>
18677
18678         * decl.cs (DeclSpace.FindType): Only check the `using' list if we
18679         don't have any dots.  Fixes #52622, added cs0246-8.cs.
18680
18681         * namespace.cs (NamespaceEntry.Lookup): Likewise.
18682         
18683 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18684
18685         * class.cs (MemberBase.Define): Reuse MemberType member for 
18686         resolved type. Other methods can use it too.
18687
18688 2004-05-23  Martin Baulig  <martin@ximian.com>
18689
18690         * ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
18691         the variable also exists in the current block (otherwise, we need
18692         to report a CS0103).  Fixes #58670.
18693
18694 2004-05-23  Martin Baulig  <martin@ximian.com>
18695
18696         * flowanalysis.cs (Reachability.Reachable): Compute this
18697         on-the-fly rather than storing it as a field.
18698
18699 2004-05-23  Martin Baulig  <martin@ximian.com>
18700
18701         * flowanalysis.cs (Reachability.And): Manually compute the
18702         resulting `barrier' from the reachability.      
18703        
18704 2004-05-23  Marek Safar  <marek.safar@seznam.cz>
18705
18706         Fix bug #57835
18707         * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
18708         instance of ObsoleteAttribute when symbol is obsolete.
18709
18710         * class.cs
18711         (IMethodData): Extended interface for ObsoleteAttribute support.
18712
18713 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18714
18715         * attribute.cs: Fix bug #55970
18716
18717 2004-05-22  Marek Safar  <marek.safar@seznam.cz>
18718
18719         Fix bug #52705
18720         * attribute.cs
18721         (GetObsoleteAttribute): New method. Creates the instance of
18722         ObsoleteAttribute.
18723         (AttributeTester.GetMemberObsoleteAttribute): Returns instance of
18724         ObsoleteAttribute when member is obsolete.
18725         (AttributeTester.Report_ObsoleteMessage): Common method for
18726         Obsolete error/warning reporting.
18727
18728         * class.cs
18729         (TypeContainer.base_classs_type): New member for storing parent type.
18730
18731         * decl.cs
18732         (MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
18733         for this MemberCore.
18734
18735 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18736
18737         * attribute.cs, const.cs: Fix bug #58590
18738
18739 2004-05-21  Martin Baulig  <martin@ximian.com>
18740
18741         * flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
18742         out parameters if the end of the method is unreachable.  Fixes
18743         #58098. 
18744
18745 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18746
18747         * codegen.cs, cs-parser.jay: Removed SetAttributes method.
18748         Hari was right, why extra method.
18749
18750 2004-05-21  Marek Safar  <marek.safar@seznam.cz>
18751
18752         * attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.
18753
18754 2004-05-20  Martin Baulig  <martin@ximian.com>
18755
18756         Merged this back from gmcs to keep the differences to a minumum.
18757
18758         * attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
18759         instead of a Declspace.
18760         (Attribute.ResolveType): Likewise.
18761         (Attributes.Search): Likewise.
18762         (Attributes.Contains): Likewise.
18763         (Attributes.GetClsCompliantAttribute): Likewise.
18764
18765         * class.cs (TypeContainer.VerifyMembers): Added EmitContext
18766         argument.
18767         (MethodData.ApplyAttributes): Take an EmitContext instead of a
18768         DeclSpace.
18769
18770 2004-05-19  Marek Safar  <marek.safar@seznam.cz>
18771
18772         Fix bug #58688 (MCS does not report error when the same attribute
18773         is assigned twice)
18774
18775         * attribute.cs (Attribute.Emit): Distinction between null and default.
18776
18777 2004-05-19  Raja R Harinath  <rharinath@novell.com>
18778
18779         * cs-parser.jay (attribute): Create a GlobalAttribute for the case
18780         of a top-level attribute without an attribute target.
18781         * attribute.cs (Attribute.Error_AttributeConstructorMismatch): 
18782         Make non-static.
18783         (Attribute.Conditional_GetConditionName), 
18784         (Attribute.Obsolete_GetObsoleteMessage): Update.
18785         (Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
18786         part of ScanForIndexerName.
18787         (Attribute.CanIgnoreInvalidAttribute): New function.
18788         (Attribute.ScanForIndexerName): Move to ...
18789         (Attributes.ScanForIndexerName): ... here.
18790         (Attributes.Attrs): Rename from now-misnamed AttributeSections.
18791         (Attributes.Search): New internal variant that can choose not to
18792         complain if types aren't resolved.  The original signature now
18793         complains.
18794         (Attributes.GetClsCompliantAttribute): Use internal variant, with
18795         complaints suppressed.
18796         (GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
18797         only if it not useful.
18798         (CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
18799         top-level for attributes that are shared between the assembly
18800         and a top-level class.
18801         * parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
18802         * class.cs: Update to reflect changes.
18803         (DefineIndexers): Fuse loops.
18804         * codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
18805         a couple more variants of attribute names.
18806
18807 2004-05-18  Marek Safar  <marek.safar@seznam.cz>
18808
18809         Fix bug #52585 (Implemented explicit attribute declaration)
18810
18811         * attribute.cs:
18812         (Attributable.ValidAttributeTargets): New abstract method. It gets
18813         list of valid attribute targets for explicit target declaration.
18814         (Attribute.Target): It holds target itself.
18815         (AttributeSection): Removed.
18816         (Attribute.CheckTargets): New method. It checks whether attribute
18817         target is valid for the current element.
18818
18819         * class.cs:
18820         (EventProperty): New class. For events that are declared like
18821         property (with add and remove accessors).
18822         (EventField): New class. For events that are declared like field.
18823         class.cs
18824
18825         * cs-parser.jay: Implemented explicit attribute target declaration.
18826
18827         * class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:        
18828         Override ValidAttributeTargets.
18829
18830         * parameter.cs:
18831         (ReturnParameter): Class for applying custom attributes on 
18832         the return type.
18833         (ParameterAtribute): New class. Class for applying custom
18834         attributes on the parameter type.
18835
18836 2004-05-17  Miguel de Icaza  <miguel@ximian.com>
18837
18838         * class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
18839         definitions. 
18840
18841         (Method): Allow UNSAFE here.
18842
18843         * modifiers.cs: Support unsafe reporting.
18844
18845 2004-05-17  Marek Safar  <marek.safar@seznam.cz>
18846
18847         * decl.cs: Fix bug #58478.
18848
18849 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18850
18851         * statement.cs: When checking for unreachable code on an EmptyStatement,
18852         set the location. Fixes bug #58488.
18853
18854 2004-05-13  Miguel de Icaza  <miguel@ximian.com>
18855
18856         * driver.cs: Add -pkg handling.
18857
18858         From Gonzalo: UseShelLExecute=false
18859
18860 2004-05-12  Marek Safar  <marek.safar@seznam.cz>
18861
18862         * attribute.cs:
18863         (Attribute.GetAttributeTargets): New method. Gets AttributeTargets
18864         for attribute.
18865         (Attribute.IsClsCompliaceRequired): Moved to base for better
18866         accesibility.
18867         (Attribute.UsageAttribute): New property for AttributeUsageAttribute
18868         when attribute is AttributeUsageAttribute.
18869         (Attribute.GetValidTargets): Simplified.
18870         (Attribute.GetAttributeUsage): New method returns AttributeUsage
18871         attribute for this type.
18872         (Attribute.ApplyAttributes): Method renamed to Emit and make
18873         non-static.
18874         (GlobalAttributeSection): New class for special handling of global
18875         attributes (assembly, module).
18876         (AttributeSection.Emit): New method.
18877
18878         * class.cs: Implemented Attributable abstract methods.
18879         (MethodCore.LabelParameters): Moved to Parameter class.
18880         (Accessor): Is back simple class.
18881         (PropertyMethod): Implemented Attributable abstract class.
18882         (DelegateMethod): Implemented Attributable abstract class.
18883         (Event): New constructor for disctintion between normal Event
18884         and Event with accessors.
18885
18886         * cs-parser.jay: Used new Event ctor and GlobalAttributeSection.
18887
18888         * codegen.cs, const.cs, decl.cs, delegate.cs:
18889         (CommonAssemblyModulClass): Implemented Attributable abstract class
18890         and simplified.
18891
18892         * enum.cs: Implement IAttributeSupport interface.
18893         (EnumMember): New class for emum members. Implemented Attributable
18894         abstract class
18895
18896         * parameter.cs:
18897         (ParameterBase): Is abstract.
18898         (ReturnParameter): New class for easier [return:] attribute handling.
18899
18900         * typemanager.cs: Removed builder_to_attr.
18901
18902 2004-05-11  Raja R Harinath  <rharinath@novell.com>
18903
18904         Fix bug #57151.
18905         * attribute.cs (Attribute.GetPositionalValue): New function.
18906         * class.cs (TypeContainer.VerifyMembers): New function.
18907         (TypeContainer.Emit): Use it.
18908         (ClassOrStruct): New base class for Class and Struct.
18909         (ClassOrStruct.ApplyAttributeBuilder): New function.  Note if 
18910         StructLayout(LayoutKind.Explicit) was ascribed to the struct or
18911         class.
18912         (ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
18913         then each non-static field should have a FieldOffset attribute.
18914         Otherwise, none of the fields should have a FieldOffset attribute.
18915         * rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout 
18916         and FieldOffset attributes.
18917         * typemanager.cs (TypeManager.struct_layout_attribute_type)
18918         (TypeManager.field_offset_attribute_type): New core types.
18919         (TypeManager.InitCoreTypes): Initialize them.
18920
18921 2004-05-11  Michal Moskal  <malekith@pld-linux.org>
18922
18923         * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
18924         Return correct type.
18925         From bug #58270.
18926
18927 2004-05-09  Miguel de Icaza  <miguel@ximian.com>
18928
18929         * expression.cs (Binary.DoNumericPromotions): 0 long constant can
18930         be implicitly converted to ulong.
18931         
18932         * expression.cs: The logic for allowing operator &, | and ^ worked
18933         was wrong, it worked before because we did not report an error in
18934         an else branch.  Fixes 57895.
18935
18936         * class.cs: Applied patch from iain@mccoy.id.au Iain McCoy to
18937         allow volatile fields to be reference types.
18938
18939 2004-05-07  Miguel de Icaza  <miguel@ximian.com>
18940
18941         * driver.cs: Add support for /debug-
18942
18943 2004-05-07  Raja R Harinath  <rharinath@novell.com>
18944
18945         * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType): 
18946         Add a 'complain' parameter to silence errors.
18947         (Attribute.Resolve): Update to changes.  Put in sanity check to catch
18948         silently overlooked type-resolutions.
18949         (Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
18950         to reflect changes.
18951         (Attributes.Search): New function.
18952         (Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
18953         (Attributes.GetAttributeFullName): Remove hack.
18954         * class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes): 
18955         Update to reflect changes.
18956         * codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
18957         Use Attributes.Search instead of nested loops.
18958
18959 2004-05-07  Marek Safar  <marek.safar@seznam.cz>
18960
18961         * decl.cs:
18962         (MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
18963         (MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
18964         (DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.
18965
18966         * report.cs: (Report.Warning): Renamed to Warning_T because of
18967         parameter collision.
18968
18969 2004-05-05  Raja R Harinath  <rharinath@novell.com>
18970
18971         * expression.cs (MemberAccess.ResolveMemberAccess):
18972         Exit with non-zero status after Report.Error.
18973         * rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
18974         Likewise.
18975         * typemanager.cs (TypeManager.CoreLookupType): Likewise.
18976
18977 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18978
18979         * support.cs: Don't hang when the file is empty.
18980
18981 2004-05-04  Lluis Sanchez Gual  <lluis@ximian.com>
18982
18983         * support.cs: In SeekableStreamReader, compute the preamble size of the
18984           underlying stream. Position changes should take into account that initial
18985           count of bytes.
18986
18987 2004-05-03  Todd Berman  <tberman@sevenl.net>
18988
18989         * driver.cs: remove unused GetSysVersion function.
18990
18991 2004-05-03  Todd Berman  <tberman@sevenl.net>
18992
18993         * driver.cs: Remove the hack from saturday, as well as the hack
18994         from jackson (LoadAssemblyFromGac), also adds the CWD to the
18995         link_paths to get that bit proper.
18996
18997 2004-05-01  Todd Berman  <tberman@sevenl.net>
18998
18999         * driver.cs: Try a LoadFrom before a Load, this checks the current
19000         path. This is currently a bug in mono that is be fixed, however, this
19001         provides a workaround for now. This will be removed when the bug
19002         is fixed.
19003
19004 2004-05-01  Sebastien Pouliot  <sebastien@ximian.com>
19005
19006         * CryptoConvert.cs: Updated to latest version. Fix issue with 
19007         incomplete key pairs (#57941).
19008
19009 2004-05-01  Todd Berman  <tberman@sevenl.net>
19010
19011         * driver.cs: Remove '.' from path_chars, now System.* loads properly
19012         from the GAC
19013
19014 2004-04-30  Jackson Harper  <jackson@ximian.com>
19015
19016         * codegen.cs: Open keys readonly.
19017         
19018 2004-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19019
19020         * typemanager.cs: don't report cyclic struct layout when a struct
19021         contains 2 or more fields of the same type. Failed for Pango.AttrShape
19022         which has 2 Pango.Rectangle fields.
19023
19024 2004-04-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19025
19026         * expression.cs: Handle IntPtr comparisons with IL code
19027         rather than a method call.
19028
19029 2004-04-29  Martin Baulig  <martin@ximian.com>
19030
19031         * ecore.cs (PropertyExpr.FindAccessor): New private method.  Walk
19032         the list of PropertyInfo's in class hierarchy and find the
19033         accessor.  Fixes #56013.
19034
19035 2004-04-29  Martin Baulig  <martin@ximian.com>
19036
19037         * typemanager.cs (TypeManager.CheckStructCycles): Fixed.
19038
19039 2004-04-29  Martin Baulig  <martin@ximian.com>
19040
19041         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19042
19043         * ecore.cs (FieldExpr.AddressOf): Make this work for valuetypes.
19044
19045 2004-04-29  Martin Baulig  <martin@ximian.com>
19046
19047         * class.cs (ConstructorInitializer.Resolve): Check whether the
19048         parent .ctor is accessible.  Fixes #52146.
19049
19050 2004-04-29  Martin Baulig  <martin@ximian.com>
19051
19052         Applying a patch from Benjamin Jemlich <pcgod@gmx.net>.
19053
19054         * statement.cs (Using.EmitLocalVariableDecls): Use
19055         TypeManager.idisposable_type, not typeof (IDisposable).
19056         (Foreach.EmitCollectionForeach): Added support for valuetypes.
19057
19058 2004-04-29  Martin Baulig  <martin@ximian.com>
19059
19060         * class.cs (Event.Define): Don't emit the field and don't set
19061         RTSpecialName and SpecialName for events on interfaces.  Fixes
19062         #57703. 
19063
19064 2004-04-29  Raja R Harinath  <rharinath@novell.com>
19065
19066         Refactor Attribute.ApplyAttributes.
19067         * attribute.cs (Attributable): New base class for objects that can
19068         have Attributes applied on them.
19069         (Attribute): Make AttributeUsage fields public.
19070         (Attribute.GetFieldValue, Attribute.GetMarshal): Make non-static.
19071         (Attribute.IsInternalCall): New property.
19072         (Attribute.UsageAttr): Convert to a public read-only property.
19073         (Attribute.CheckAttributeType): Use a DeclSpace, not an EmitContext.
19074         (Attribute.ResolveType, Attribute.Resolve)
19075         (Attribute.ScanForIndexerName): Update to reflect changes.
19076         (Attribute.CheckAttributeTarget): Re-format.
19077         (Attribute.ApplyAttributes): Refactor, to various
19078         Attributable.ApplyAttributeBuilder methods.
19079         * decl.cs (MemberCore): Make Attributable.
19080         * class.cs (Accessor): Make Attributable.
19081         (MethodData.ApplyAttributes): Use proper attribute types, not
19082         attribute names.
19083         (TypeContainer.LabelParameters): Pass Parameter to ApplyAttributes.
19084         (TypeContainer.ApplyAttributeBuilder)
19085         (Method.ApplyAttributeBuilder, Constructor.ApplyAttributeBuilder)
19086         (Field.ApplyAttributeBuilder, Accessor.ApplyAttributeBuilder)   
19087         (PropertyBase.ApplyAttributeBuilder, Event.ApplyAttributeBuilder)
19088         (Operator.ApplyAttributeBuilder): New factored-out methods.
19089         * const.cs (Const.ApplyAttributeBuilder): Likewise.
19090         * delegate.cs (Delegate.ApplyAttributeBuilder): Likewise.
19091         * enum.cs (Enum.ApplyAttributeBuilder): Likewise.
19092         * parameter.cs (ParameterBase): New Attributable base class
19093         that can also represent Return types.
19094         (Parameter): Update to the changes.
19095
19096 2004-04-29  Jackson Harper  <jackson@ximian.com>
19097
19098         * driver.cs: Prefer the corlib system version when looking for
19099         assemblies in the GAC. This is still a hack, but its a better hack
19100         now.
19101         
19102 2004-04-29  Marek Safar  <marek.safar@seznam.cz>
19103
19104         * decl.cs, enum.cs: Improved error 3005 reporting.
19105   
19106         * report.cs (SymbolRelatedToPreviousError): New method for error reporting.
19107         (related_symbols): New private member for list of symbols
19108         related to reported error/warning.
19109         
19110         * tree.cs: Do not use now obsolete Report.LocationOfPreviousError.
19111
19112 2004-04-29  Martin Baulig  <martin@ximian.com>
19113
19114         * ecore.cs (Expression.Constantify): If we're an enum and
19115         TypeManager.TypeToCoreType() doesn't give us another type, use
19116         t.UnderlyingSystemType.  Fixes #56178.  
19117
19118 2004-04-29  Martin Baulig  <martin@ximian.com>
19119
19120         * decl.cs (MemberCache.SetupCacheForInterface): Look over all our
19121         interfaces and for each interface, only add members directly
19122         declared in that interface.  Fixes #53255.
19123
19124 2004-04-28  Martin Baulig  <martin@ximian.com>
19125
19126         * expression.cs (ConditionalLogicalOperator): Use a temporary
19127         variable for `left' to avoid that we evaluate it more than once;
19128         bug #52588.
19129
19130 2004-04-28  Martin Baulig  <martin@ximian.com>
19131
19132         * expression.cs (ComposedCast.DoResolveAsTypeStep): Don't allow
19133         `void[]' (CS1547).
19134
19135 2004-04-28  Martin Baulig  <martin@ximian.com>
19136
19137         * statement.cs (LocalInfo.Resolve): Check whether the type is not
19138         void (CS1547).
19139
19140         * class.cs (MemberBase.CheckParameters, FieldBase.DoDefine): Check
19141         whether the type is not void (CS1547).
19142
19143 2004-04-28  Martin Baulig  <martin@ximian.com>
19144
19145         * expression.cs (Unary.DoResolveLValue): Override this and report
19146         CS0131 for anything but Operator.Indirection.
19147
19148 2004-04-28  Martin Baulig  <martin@ximian.com>
19149
19150         Committing a patch from Ben Maurer; see bug #50820.
19151
19152         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19153         check for classes.
19154
19155         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19156         classes.        
19157
19158 2004-04-28  Martin Baulig  <martin@ximian.com>
19159
19160         Committing a patch from Ben Maurer; see bug #50820.
19161
19162         * typemanager.cs (TypeManager.FilterWithClosure): Added CS1540
19163         check for classes.
19164
19165         * ecore.cs (Expression.MemberLookupFailed): Added CS1540 check for
19166         classes.        
19167
19168 2004-04-28  Martin Baulig  <martin@ximian.com>
19169
19170         * statement.cs (Block.LookupLabel): Also lookup in implicit child blocks.
19171         (Block.AddLabel): Call DoLookupLabel() to only search in the
19172         current block.
19173
19174 2004-04-28  Martin Baulig  <martin@ximian.com>
19175
19176         * cfold.cs (ConstantFold.BinaryFold): Added special support for
19177         comparing StringConstants and NullLiterals in Equality and Inequality.
19178
19179 2004-04-28  Jackson Harper  <jackson@ximian.com>
19180
19181         * driver.cs: Attempt to load referenced assemblies from the
19182         GAC. This is the quick and dirty version of this method that
19183         doesnt take into account versions and just takes the first
19184         canidate found. Will be good enough for now as we will not have more
19185         then one version installed into the GAC until I update this method.
19186
19187 2004-04-28  Martin Baulig  <martin@ximian.com>
19188
19189         * typemanager.cs (TypeManager.CheckStructCycles): New public
19190         static method to check for cycles in the struct layout.
19191
19192         * rootcontext.cs (RootContext.PopulateTypes): Call
19193         TypeManager.CheckStructCycles() for each TypeContainer.
19194         [Note: We only need to visit each type once.]
19195
19196 2004-04-28  Martin Baulig  <martin@ximian.com>
19197
19198         * constant.cs (StringConstant.Emit): Emit Ldnull if we're null.
19199
19200         * const.cs (Const.LookupConstantValue): Return a `bool' signalling
19201         success and added `out object value'.  Use a `bool resolved' field
19202         to check whether we've already been called rather than
19203         `ConstantValue != null' since this breaks for NullLiterals.
19204
19205 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19206
19207         * driver.cs (Driver.MainDriver) [IsModuleOnly]: Open code the
19208         setting of this flag, since the 'set' method may be non-public.
19209
19210 2004-04-28  Raja R Harinath  <rharinath@novell.com>
19211
19212         * flowanalysis.cs (FlowBranchingException.LookupLabel): Add a null
19213         check on current_vector.Block.
19214
19215 2004-04-27  Martin Baulig  <martin@ximian.com>
19216
19217         * expression.cs (BaseAccess.CommonResolve): Don't allow `base' in
19218         a field initializer.  Fixes #56459.
19219
19220 2004-04-27  Martin Baulig  <martin@ximian.com>
19221
19222         * ecore.cs (PropertyExpr.DoResolve/DoResolveLValue): Check whether
19223         we're not attempting to use an indexer.  Fixes #52154.
19224
19225 2004-04-27  Martin Baulig  <martin@ximian.com>
19226
19227         * statement.cs (Return): Don't create a return label if we don't
19228         need it; reverts my change from January 20th.  Thanks to Ben
19229         Maurer for this.
19230
19231 2004-04-27  Martin Baulig  <martin@ximian.com>
19232
19233         According to the spec, `goto' can only leave a nested scope, but
19234         never enter it.
19235
19236         * statement.cs (Block.LookupLabel): Only lookup in the current
19237         block, don't recurse into parent or child blocks.
19238         (Block.AddLabel): Check in parent and child blocks, report
19239         CS0140/CS0158 if we find a duplicate.
19240         (Block): Removed this indexer for label lookups.
19241         (Goto.Resolve): Call LookupLabel() on our current FlowBranching;
19242         this already does the error reporting for us.
19243
19244         * flowanalysis.cs
19245         (FlowBranching.UsageVector.Block): New public variable; may be null.
19246         (FlowBranching.CreateSibling): Added `Block' argument.
19247         (FlowBranching.LookupLabel): New public virtual method.  Lookup a
19248         label for the target of a `goto' and check whether we're not
19249         leaving a `finally'.
19250
19251 2004-04-27  Martin Baulig  <martin@ximian.com>
19252
19253         * flowanalysis.cs (FlowBranching.UsageVector.MergeChild): If we're
19254         a finite loop block, also do the ALWAYS->SOMETIMES for throws (not
19255         just for returns).
19256
19257 2004-04-27  Martin Baulig  <martin@ximian.com>
19258
19259         * statement.cs (Block.AddLabel): Also check for implicit blocks
19260         and added a CS0158 check.
19261
19262 2004-04-27  Martin Baulig  <martin@ximian.com>
19263
19264         * flowanalysis.cs (FlowBranchingLoop): New class.
19265         (FlowBranching.UsageVector.MergeJumpOrigins): Take a list of
19266         UsageVector's instead of an ArrayList.
19267         (FlowBranching.Label): Likewise.
19268         (FlowBranching.UsageVector.MergeBreakOrigins): New method.
19269         (FlowBranching.AddBreakVector): New method.
19270
19271 2004-04-27  Miguel de Icaza  <miguel@ximian.com>
19272
19273         * attribute.cs: Small regression fix: only convert the type if we
19274         the type is different, fixes System.Drawing build.
19275
19276 2004-04-27  Martin Baulig  <martin@ximian.com>
19277
19278         * attribute.cs (Attribute.Resolve): If we have a constant value
19279         for a named field or property, implicity convert it to the correct
19280         type.
19281
19282 2004-04-27  Raja R Harinath  <rharinath@novell.com>
19283
19284         * statement.cs (Block.Block): Implicit blocks share
19285         'child_variable_names' fields with parent blocks.
19286         (Block.AddChildVariableNames): Remove.
19287         (Block.AddVariable): Mark variable as "used by a child block" in
19288         every surrounding block.
19289         * ecore.cs (SimpleName.SimpleNameResolve): If the name has already
19290         been used in a child block, complain about violation of "Invariant
19291         meaning in blocks" rule.
19292         * cs-parser.jay (declare_local_variables): Don't use
19293         AddChildVariableNames.
19294         (foreach_statement): Don't create an implicit block: 'foreach'
19295         introduces a scope.
19296
19297 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19298
19299         * convert.cs (ImplicitNumericConversion): 0 is also positive when
19300         converting from 0L to ulong.  Fixes 57522.
19301
19302 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19303
19304         * decl.cs (FindMemberToOverride): Fix wrong warning for case when
19305         derived class hides via 'new' keyword field from base class (test-242.cs).
19306         TODO: Handle this in the more general way.
19307         
19308         * class.cs (CheckBase): Ditto.
19309
19310 2004-04-22  Marek Safar  <marek.safar@seznam.cz>
19311
19312         * decl.cs (caching_flags): New member for storing cached values
19313         as bit flags.
19314         (MemberCore.Flags): New enum where bit flags for caching_flags
19315         are defined.
19316         (MemberCore.cls_compliance): Moved to caching_flags.
19317         (DeclSpace.Created): Moved to caching_flags.
19318
19319         * class.cs: Use caching_flags instead of DeclSpace.Created
19320         
19321 2004-04-21  Miguel de Icaza  <miguel@ximian.com>
19322
19323         * ecore.cs (PropertyExpr.GetAccesor): Only perform the 1540 check
19324         if we are only a derived class, not a nested class.
19325
19326         * typemanager.cs: Same as above, but do this at the MemberLookup
19327         level (used by field and methods, properties are handled in
19328         PropertyExpr).   Allow for the qualified access if we are a nested
19329         method. 
19330
19331 2004-04-21  Marek Safar  <marek.safar@seznam.cz>
19332
19333         * class.cs: Refactoring.
19334         (IMethodData): New inteface; Holds links to parent members
19335         to avoid member duplication (reduced memory allocation).
19336         (Method): Implemented IMethodData interface.
19337         (PropertyBase): New inner classes for get/set methods.
19338         (PropertyBase.PropertyMethod): Implemented IMethodData interface
19339         (Event): New inner classes for add/remove methods.
19340         (Event.DelegateMethod): Implemented IMethodData interface.
19341
19342         * cs-parser.jay: Pass DeclSpace to Event class for creation of valid
19343         EmitContext (related to class.cs refactoring).
19344
19345 2004-04-21  Raja R Harinath  <rharinath@novell.com>
19346
19347         * delegate.cs (Delegate.VerifyApplicability): If the number of
19348         arguments are the same as the number of parameters, first try to
19349         verify applicability ignoring  any 'params' modifier on the last
19350         parameter.
19351         Fixes #56442.
19352
19353 2004-04-16  Raja R Harinath  <rharinath@novell.com>
19354
19355         * class.cs (TypeContainer.AddIndexer): Use
19356         'ExplicitInterfaceName' to determine if interface name was
19357         explicitly specified.  'InterfaceType' is not initialized at this time.
19358         (TypeContainer.DefineIndexers): Remove use of temporary list.  The
19359         Indexers array is already in the required order.  Initialize
19360         'IndexerName' only if there are normal indexers.
19361         (TypeContainer.DoDefineMembers): Don't initialize IndexerName.
19362         (TypeContainer.Emit): Emit DefaultMember attribute only if
19363         IndexerName is initialized.
19364         Fixes #56300.
19365
19366 2004-04-15  Benjamin Jemlich  <pcgod@gmx.net>
19367
19368         * enum.cs (Enum.DefineType): Don't allow char as type for enum.
19369         Fixes #57007
19370
19371 2004-04-15  Raja R Harinath  <rharinath@novell.com>
19372
19373         * attribute.cs (Attribute.CheckAttributeType): Check for ambiguous
19374         attributes.
19375         Fix for #56456.
19376
19377         * attribute.cs (Attribute.Resolve): Check for duplicate named
19378         attributes.
19379         Fix for #56463.
19380
19381 2004-04-15  Miguel de Icaza  <miguel@ximian.com>
19382
19383         * iterators.cs (MarkYield): track whether we are in an exception,
19384         and generate code accordingly.  Use a temporary value to store the
19385         result for our state.
19386
19387         I had ignored a bit the interaction of try/catch with iterators
19388         since their behavior was not entirely obvious, but now it is
19389         possible to verify that our behavior is the same as MS .NET 2.0
19390
19391         Fixes 54814
19392
19393 2004-04-14  Miguel de Icaza  <miguel@ximian.com>
19394
19395         * iterators.cs: Avoid creating temporaries if there is no work to
19396         do. 
19397
19398         * expression.cs (ArrayAccess.EmitLoadOpcode): If dealing with
19399         Enumerations, use TypeManager.EnumToUnderlying and call
19400         recursively. 
19401
19402         Based on the patch from Benjamin Jemlich (pcgod@gmx.net), fixes
19403         bug #57013
19404
19405         (This.Emit): Use EmitContext.EmitThis to emit our
19406         instance variable.
19407
19408         (This.EmitAssign): Ditto.
19409
19410         * ecore.cs (FieldExpr.Emit): Remove RemapToProxy special
19411         codepaths, we will move all the functionality into
19412         Mono.CSharp.This 
19413
19414         (FieldExpr.EmitAssign): Ditto.
19415
19416         This fixes several hidden bugs that I uncovered while doing a code
19417         review of this today.
19418
19419         * codegen.cs (EmitThis): reworked so the semantics are more clear
19420         and also support value types "this" instances.
19421
19422         * iterators.cs: Changed so that for iterators in value types, we
19423         do not pass the value type as a parameter.  
19424
19425         Initialization of the enumerator helpers is now done in the caller
19426         instead of passing the parameters to the constructors and having
19427         the constructor set the fields.
19428
19429         The fields have now `assembly' visibility instead of private.
19430
19431 2004-04-11  Miguel de Icaza  <miguel@ximian.com>
19432
19433         * expression.cs (Argument.Resolve): Check if fields passed as ref
19434         or out are contained in a MarshalByRefObject.
19435
19436         * typemanager.cs, rootcontext.cs: Add System.Marshalbyrefobject as
19437         another compiler type.
19438
19439 2004-04-06 Ben Maurer  <bmaurer@users.sourceforge.net>
19440
19441         * class.cs (Indexer.Define): use the new name checking method.
19442         Also, return false on an error.
19443         * cs-tokenizer.cs (IsValidIdentifier): Checks for a valid identifier.
19444         (is_identifier_[start/part]_character): make static.
19445
19446 2004-04-10  Miguel de Icaza  <miguel@ximian.com>
19447
19448         * expression.cs (Binary.ResolveOperator): Do no append strings
19449         twice: since we can be invoked more than once (array evaluation)
19450         on the same concatenation, take care of this here.  Based on a fix
19451         from Ben (bug #56454)
19452
19453 2004-04-08  Sebastien Pouliot  <sebastien@ximian.com>
19454
19455         * codegen.cs: Fix another case where CS1548 must be reported (when 
19456         delay-sign isn't specified and no private is available #56564). Fix
19457         loading the ECMA "key" to delay-sign an assembly. Report a CS1548 
19458         error when MCS is used on the MS runtime and we need to delay-sign 
19459         (which seems unsupported by AssemblyBuilder - see #56621).
19460
19461 2004-04-08  Marek Safar  <marek.safar@seznam.cz>
19462
19463         * typemanager.cs (TypeManager.TypeToCoreType): Handle IntPtr too.
19464         (TypeManager.ComputeNamespaces): Faster implementation for
19465         Microsoft runtime.
19466
19467         * compiler.csproj: Updated AssemblyName to mcs.
19468
19469 2004-04-07  Miguel de Icaza  <miguel@ximian.com>
19470
19471         * rootcontext.cs: Add new types to the boot resolution.
19472
19473         * ecore.cs (TypeExpr.CanInheritFrom): Inheriting from
19474         MulticastDelegate is not allowed.
19475
19476         * typemanager.cs: Add new types to lookup: System.TypedReference
19477         and ArgIterator.
19478
19479         * paramter.cs (Parameter.Resolve): if we are an out/ref parameter,
19480         check for TypedReference or ArgIterator, they are not allowed. 
19481
19482         * ecore.cs (BoxedCast): Set the eclass to ExprClass.Value, this
19483         makes us properly catch 1510 in some conditions (see bug 56016 for
19484         details). 
19485
19486 2004-04-06  Bernie Solomon  <bernard@ugsolutions.com>
19487
19488         * CryptoConvert.cs: update from corlib version
19489         with endian fixes.
19490
19491 2004-04-05  Miguel de Icaza  <miguel@ximian.com>
19492
19493         * class.cs (Indexer.Define): Check indexername declaration
19494
19495 2004-04-05  Marek Safar  <marek.safar@seznam.cz>
19496
19497         * attribute.cs (IsClsCompliant): Fixed problem with handling
19498         all three states (compliant, not-compliant, undetected).
19499
19500 2004-03-30  Marek Safar  <marek.safar@seznam.cz>
19501
19502         * attribute.cs (Attribute): Location is now public.
19503         (Resolve): Store resolved arguments (pos_values) in attribute class.
19504         Attribute extractors (now GetClsCompliantAttributeValue) can reuse them.
19505         (GetClsCompliantAttributeValue): New method that gets
19506         CLSCompliantAttribute value.
19507         (GetClsCompliantAttribute): Returns CLSCompliantAttribute for DeclSpace
19508         if exists else null.
19509         (AttributeTester): New class for CLS-Compliant verification routines.
19510
19511         * class.cs (Emit): Add CLS-Compliant verification.
19512         (Method.GetSignatureForError): Implemented.
19513         (Constructor.GetSignatureForError): Implemented
19514         (Constructor.HasCompliantArgs): Returns if constructor has
19515         CLS-Compliant arguments.
19516         (Constructor.Emit): Override.
19517         (Construcor.IsIdentifierClsCompliant): New method; For constructors
19518         is needed to test only parameters.
19519         (FieldBase.GetSignatureForError): Implemented.
19520         (TypeContainer): New member for storing base interfaces.
19521         (TypeContainer.FindMembers): Search in base interfaces too.
19522
19523         * codegen.cs (GetClsComplianceAttribute): New method that gets
19524         assembly or module CLSCompliantAttribute value.
19525         (ResolveClsCompliance): New method that resolve CLSCompliantAttribute
19526         for assembly.
19527         (ModuleClass.Emit): Add error 3012 test.
19528
19529         * const.cs (Emit): Override and call base for CLS-Compliant tests.
19530
19531         * decl.cs (ClsComplianceValue): New enum that holds CLS-Compliant
19532         state for all decl types.
19533         (MemberCore.Emit): Emit is now virtual and call VerifyClsCompliance
19534         if CLS-Compliant tests are required.
19535         (IsClsCompliaceRequired): New method. Analyze whether code
19536         must be CLS-Compliant.
19537         (IsExposedFromAssembly): New method. Returns true when MemberCore
19538         is exposed from assembly.
19539         (GetClsCompliantAttributeValue): New method. Resolve CLSCompliantAttribute
19540         value or gets cached value.
19541         (HasClsCompliantAttribute): New method. Returns true if MemberCore
19542         is explicitly marked with CLSCompliantAttribute.
19543         (IsIdentifierClsCompliant): New abstract method. This method is
19544         used to testing error 3005.
19545         (IsIdentifierAndParamClsCompliant): New method. Common helper method
19546         for identifier and parameters CLS-Compliant testing.
19547         (VerifyClsCompliance): New method. The main virtual method for
19548         CLS-Compliant verifications.
19549         (CheckAccessLevel): In one special case (System.Drawing) was TypeBuilder
19550         null. I don't know why is null (too many public members !).
19551         (GetClsCompliantAttributeValue). New method. Goes through class hierarchy
19552         and get value of first CLSCompliantAttribute that found.
19553
19554         * delegate.cs (Emit): Override and call base for CLS-Compliant tests.
19555         (VerifyClsCompliance): Override and add extra tests.
19556
19557         * driver.cs (CSCParseOption): New command line options (clscheck[+|-]).
19558         clscheck- disable CLS-Compliant verification event if assembly is has
19559         CLSCompliantAttribute(true).
19560
19561         * enum.cs (Emit): Override and call base for CLS-Compliant tests.
19562         ApllyAttribute is now called in emit section as in the other cases.
19563         Possible future Emit integration.
19564         (IsIdentifierClsCompliant): New override.
19565         (VerifyClsCompliance): New override.
19566         (GetEnumeratorName): Returns full enum name.
19567
19568         * parameter.cs (GetSignatureForError): Implemented.
19569
19570         * report.cs (WarningData): New struct for Warning message information.
19571         (LocationOfPreviousError): New method.
19572         (Warning): New method. Reports warning based on the warning table.
19573         (Error_T): New method. Reports error based on the error table.
19574
19575         * rootcontext.cs (EmitCode): Added new Emit(s) because CLS-Compliant
19576         verifications are done here.
19577
19578         * tree.cs (RecordDecl): Used new LocationOfPreviousError method.
19579
19580         * typemanager.cs (cls_compliant_attribute_type): New member thath holds
19581         CLSCompliantAttribute.
19582         (all_imported_types): New member holds all imported types from other
19583         assemblies.
19584         (LoadAllImportedTypes): New method fills static table with exported types
19585         from all referenced assemblies.
19586         (Modules): New property returns all assembly modules.
19587
19588 2004-03-30  Miguel de Icaza  <miguel@ximian.com>
19589
19590         * cs-parser.jay: Add a rule to catch wrong event syntax instead of
19591         throwing a parser error.
19592
19593         * ecore.cs (PropertyExpr.GetAccessor): Apply patch from Patrik Reali
19594         which removes the hardcoded get_/set_ prefixes for properties, as
19595         IL allows for the properties to be named something else.  
19596
19597         Bug #56013
19598
19599         * expression.cs: Do not override operand before we know if it is
19600         non-null.  Fix 56207
19601
19602 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19603
19604         * typemanager.cs: support for pinned variables.
19605
19606 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19607
19608         * decl.cs, typemanager.cs: Avoid using an arraylist
19609         as a buffer if there is only one result set.
19610
19611 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
19612
19613         * expression.cs: Make sure you cant call a static method
19614         with an instance expression, bug #56174.
19615
19616 2004-03-29  Miguel de Icaza  <miguel@ximian.com>
19617
19618         * class.cs (IsDuplicateImplementation): Improve error reporting to
19619         flag 663 (method only differs in parameter modifier).
19620
19621         * cs-tokenizer.cs: Do not require whitespace when a ( or " will do
19622         in preprocessor directives.
19623
19624         * location.cs (LookupFile): Allow for the empty path.
19625
19626         * attribute.cs (DefinePInvokeMethod): Fix 56148;  I would like a
19627         better approach for some of that patch, but its failing with the
19628         CharSet enumeration.  For now try/catch will do.
19629
19630         * typemanager.cs: Do not crash if a struct does not have fields.
19631         Fixes 56150.
19632
19633 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19634
19635         * expression.cs: cs0213, cant fix a fixed expression.
19636         fixes 50231.
19637
19638 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19639
19640         * cs-parser.jay: detect invalid embeded statements gracefully.
19641         bug #51113.
19642
19643 2004-03-28 Ben Maurer  <bmaurer@users.sourceforge.net>
19644
19645         * ecore.cs, typemanager.cs: Correct impl of cs1540 check.
19646         As a regex:
19647         s/
19648         the invocation type may not be a subclass of the tye of the item/
19649         The type of the item must be a subclass of the invocation item.
19650         /g
19651
19652         Fixes bug #50820.
19653
19654 2004-03-25  Sebastien Pouliot  <sebastien@ximian.com>
19655
19656         * attribute.cs: Added methods to get a string and a bool from an
19657         attribute. Required to information from AssemblyKeyFileAttribute,
19658         AttributeKeyNameAttribute (string) and AssemblyDelaySign (bool).
19659         * codegen.cs: Modified AssemblyName creation to include support for
19660         strongnames. Catch additional exceptions to report them as CS1548.
19661         * compiler.csproj: Updated include CryptoConvert.cs.
19662         * compiler.csproj.user: Removed file - user specific configuration.
19663         * CryptoConvert.cs: New. A COPY of the class CryptoConvert from 
19664         Mono.Security assembly. The original class is maintained and tested in
19665         /mcs/class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs.
19666         * drivers.cs: Added support for /keyfile, /keycontainer and /delaysign
19667         like CSC 8.0 (C# v2) supports.
19668         * Makefile: Added CryptoConvert.cs to mcs sources.
19669         * rootcontext.cs: Added new options for strongnames.
19670
19671 2004-03-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19672
19673         * driver.cs: For --expect-error, report error code `2'
19674         if the program compiled with no errors, error code `1' if
19675         it compiled with an error other than the one expected.
19676
19677 2004-03-24  Sebastien Pouliot  <sebastien@ximian.com>
19678
19679         * compiler.csproj: Updated for Visual Studio .NET 2003.
19680         * compiler.csproj.user: Updated for Visual Studio .NET 2003.
19681         * compiler.sln: Updated for Visual Studio .NET 2003.
19682
19683 2004-03-24  Ravi Pratap M  <ravi@ximian.com>
19684
19685         * expression.cs: Fix bug #47234. We basically need to apply the
19686         rule that we prefer the conversion of null to a reference type
19687         when faced with a conversion to 'object' (csc behaviour).
19688
19689 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19690
19691         * statement.cs: Shorter form for foreach, eliminates
19692         a local variable. r=Martin.
19693
19694 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19695
19696         * constant.cs, ecore.cs, literal.cs: New prop IsZeroInteger that
19697         checks if we can use brtrue/brfalse to test for 0.
19698         * expression.cs: use the above in the test for using brtrue/brfalse.
19699         cleanup code a bit.
19700
19701 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19702
19703         * expression.cs: Rewrite string concat stuff. Benefits:
19704
19705         - "a" + foo + "b" + "c" becomes "a" + foo + "bc"
19706         - "a" + foo + "b" + bar + "c" + baz ... uses concat (string []).
19707         rather than a concat chain.
19708
19709         * typemanager.cs: Add lookups for more concat overloads.
19710
19711 2004-03-23 Ben Maurer  <bmaurer@users.sourceforge.net>
19712
19713         * expression.cs: Emit shorter il code for array init.
19714
19715         newarr
19716         dup
19717         // set 1
19718
19719         // set 2
19720
19721         newarr
19722         stloc.x
19723
19724         ldloc.x
19725         // set 1
19726
19727         ldloc.x
19728         // set 2
19729
19730 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
19731
19732         * statement.cs: Before, two switch blocks would be merged if the
19733         total size of the blocks (end_item - begin_item + 1) was less than
19734         two times the combined sizes of the blocks.
19735
19736         Now, it will only merge if after the merge at least half of the
19737         slots are filled.
19738
19739         fixes 55885.
19740
19741 2004-03-20  Atsushi Enomoto  <atsushi@ximian.com>
19742
19743         * class.cs : csc build fix for GetMethods(). See bug #52503.
19744
19745 2004-03-20 Ben Maurer  <bmaurer@users.sourceforge.net>
19746
19747         * expression.cs: Make sure fp comparisons work with NaN.
19748         This fixes bug #54303. Mig approved this patch a long
19749         time ago, but we were not able to test b/c the runtime
19750         had a related bug.
19751
19752 2004-03-19  Miguel de Icaza  <miguel@ximian.com>
19753
19754         * ecore.cs (TypExpr.GetHashCode): implement this overload. 
19755
19756 2004-03-19  Martin Baulig  <martin@ximian.com>
19757
19758         * class.cs (MemberCore.IsDuplicateImplementation): Report the
19759         error here and not in our caller.
19760
19761 2004-03-19  Martin Baulig  <martin@ximian.com>
19762
19763         * interface.cs: Completely killed this file.
19764         (Interface): We're now a TypeContainer and live in class.cs.
19765
19766         * class.cs (TypeContainer.GetClassBases): Added `bool is_iface'
19767         argument; we're now also called for interfaces.
19768         (TypeContainer.DefineMembers): Allow this method being called
19769         multiple times.
19770         (TypeContainer.GetMethods): New public method; formerly known as
19771         Interface.GetMethod().  This is used by PendingImplementation.
19772         (TypeContainer.EmitDefaultMemberAttr): Moved here from Interface;
19773         it's now private and non-static.
19774         (Interface): Moved this here; it's now implemented similar to
19775         Class and Struct.
19776         (Method, Property, Event, Indexer): Added `bool is_interface'
19777         argument to their .ctor's.
19778         (MemberBase.IsInterface): New public field.
19779
19780         * cs-parser.jay: Create normal Method, Property, Event, Indexer
19781         instances instead of InterfaceMethod, InterfaceProperty, etc.
19782         (opt_interface_base): Removed; we now use `opt_class_base' instead.
19783         (InterfaceAccessorInfo): Create `Get' and `Set' Accessor's.
19784
19785 2004-03-19  Martin Baulig  <martin@ximian.com>
19786
19787         * class.cs (MethodCore.IsDuplicateImplementation): New private
19788         method which does the CS0111 checking.
19789         (Method.CheckBase, Constructor.CheckBase, PropertyBase.CheckBase):
19790         Use IsDuplicateImplementation().
19791
19792 2004-03-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19793
19794         * decl.cs (FindMemberToOverride): New method to find the correct
19795         method or property to override in the base class.
19796         * class.cs
19797             - Make Method/Property use the above method to find the
19798               version in the base class.
19799             - Remove the InheritableMemberSignatureCompare as it is now
19800               dead code.
19801
19802         This patch makes large code bases much faster to compile, as it is
19803         O(n) rather than O(n^2) to do this validation.
19804
19805         Also, it fixes bug 52458 which is that nested classes are not
19806         taken into account when finding the base class member.
19807
19808         Reviewed/Approved by Martin.
19809
19810 2004-03-17  Marek Safar  <marek.safar@seznam.cz>
19811
19812         * interface.cs: In all interface classes removed redundant
19813         member initialization.
19814
19815 2004-03-16  Martin Baulig  <martin@ximian.com>
19816
19817         * class.cs (TypeContainer.GetClassBases): Fix the CS0528 check.
19818
19819 2004-03-15  Miguel de Icaza  <miguel@ximian.com>
19820
19821         * decl.cs (DefineTypeAndParents): New helper method to define a
19822         type's containers before the type itself is defined;  This is a
19823         bug exposed by the recent changes to Windows.Forms when an
19824         implemented interface was defined inside a class that had not been
19825         built yet.   
19826
19827         * modifiers.cs (MethodAttr): All methods in C# are HideBySig.
19828
19829         (Check): Loop correctly to report errors modifiers
19830         (UNSAFE was not in the loop, since it was the same as TOP).
19831
19832         * interface.cs: Every interface member now takes a ModFlags,
19833         instead of a "is_new" bool, which we set on the base MemberCore. 
19834
19835         Every place where we called "UnsafeOk" in the interface, now we
19836         call the proper member (InterfaceMethod.UnsafeOK) instead to get
19837         the unsafe settings from the member declaration instead of the
19838         container interface. 
19839
19840         * cs-parser.jay (opt_new): Allow unsafe here per the spec. 
19841
19842         * pending.cs (TypeAndMethods): Add `get_indexer_name' and
19843         `set_indexer_name' to the pending bits (one per type).
19844
19845         We fixed a bug today that was picking the wrong method to
19846         override, since for properties the existing InterfaceMethod code
19847         basically ignored the method name.  Now we make sure that the
19848         method name is one of the valid indexer names.
19849
19850 2004-03-14  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
19851  
19852         * support.cs (SeekableStreamReader): Keep track of stream byte
19853         positions and don't mix them with character offsets to the buffer.
19854
19855         Patch from Gustavo Giráldez
19856
19857 2004-03-15  Marek Safar  <marek.safar@seznam.cz>
19858
19859         * interface.cs (InterfaceSetGetBase): Removed double member
19860         initialization, base class does it as well.
19861
19862 2004-03-13  Martin Baulig  <martin@ximian.com>
19863
19864         * class.cs: Reverted Miguel's latest commit; it makes mcs crash
19865         when compiling corlib.
19866
19867 2004-03-13  Miguel de Icaza  <miguel@ximian.com>
19868
19869         * convert.cs (ExplicitConversion): We were reporting an error on
19870         certain conversions (object_type source to a value type, when the
19871         expression was `null') before we had a chance to pass it through
19872         the user defined conversions.
19873
19874         * driver.cs: Replace / and \ in resource specifications to dots.
19875         Fixes 50752
19876
19877         * class.cs: Add check for duplicate operators.  Fixes 52477
19878
19879 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
19880
19881         * statement.cs (Switch.SimpleSwitchEmit): Deal with default labels
19882         that are in the middle of the statements, not only at the end.
19883         Fixes #54987
19884
19885         * class.cs (TypeContainer.AddField): No longer set the
19886         `HaveStaticConstructor' flag, now we call it
19887         `UserDefineStaticConstructor' to diferentiate the slightly
19888         semantic difference.
19889
19890         The situation is that we were not adding BeforeFieldInit (from
19891         Modifiers.TypeAttr) to classes that could have it.
19892         BeforeFieldInit should be set to classes that have no static
19893         constructor. 
19894
19895         See:
19896
19897         http://www.yoda.arachsys.com/csharp/beforefieldinit.html
19898
19899         And most importantly Zoltan's comment:
19900
19901         http://bugzilla.ximian.com/show_bug.cgi?id=44229
19902
19903         "I think beforefieldinit means 'it's ok to initialize the type sometime 
19904          before its static fields are used', i.e. initialization does not need
19905          to be triggered by the first access to the type. Setting this flag
19906          helps the JIT to compile better code, since it can run the static
19907          constructor at JIT time, and does not need to generate code to call it
19908          (possibly lots of times) at runtime. Unfortunately, mcs does not set
19909          this flag for lots of classes like String. 
19910          
19911          csc sets this flag if the type does not have an explicit static 
19912          constructor. The reasoning seems to be that if there are only static
19913          initalizers for a type, and no static constructor, then the programmer
19914          does not care when this initialization happens, so beforefieldinit
19915          can be used.
19916          
19917          This bug prevents the AOT compiler from being usable, since it 
19918          generates so many calls to mono_runtime_class_init that the AOT code
19919          is much slower than the JITted code. The JITted code is faster, 
19920          because it does not generate these calls if the vtable is type is
19921          already initialized, which is true in the majority of cases. But the
19922          AOT compiler can't do this."
19923
19924 2004-03-10  Miguel de Icaza  <miguel@ximian.com>
19925
19926         * class.cs (MethodData.Emit): Refactor the code so symbolic
19927         information is generated for destructors;  For some reasons we
19928         were taking a code path that did not generate symbolic information
19929         before. 
19930
19931 2004-03-11 Ben Maurer  <bmaurer@users.sourceforge.net>
19932
19933         * class.cs: Create a Constructor.CheckBase method that
19934         takes care of all validation type code. The method
19935         contains some code that was moved from Define.
19936
19937         It also includes new code that checks for duplicate ctors.
19938         This fixes bug #55148.
19939
19940 2004-03-09  Joshua Tauberer <tauberer@for.net>
19941
19942         * expression.cs (ArrayCreation): Fix: More than 6 nulls in
19943         a { ... }-style array creation invokes EmitStaticInitializers
19944         which is not good for reference-type arrays.  String, decimal
19945         and now null constants (NullCast) are not counted toward
19946         static initializers.
19947
19948 2004-03-05  Martin Baulig  <martin@ximian.com>
19949
19950         * location.cs (SourceFile.HasLineDirective): New public field;
19951         specifies whether the file contains or is referenced by a "#line"
19952         directive.
19953         (Location.DefineSymbolDocuments): Ignore source files which
19954         either contain or are referenced by a "#line" directive.        
19955
19956 2004-02-29  Ben Maurer <bmaurer@users.sourceforge.net>
19957
19958         * class.cs (Method.CheckBase): Avoid using FindMembers, we have
19959         direct access to our parent, so check the method inline there.
19960
19961 2004-02-27 Ben Maurer  <bmaurer@users.sourceforge.net>
19962
19963         * expression.cs (Invocation.EmitCall): Miguel's last commit
19964         caused a regression. If you had:
19965
19966             T t = null;
19967             t.Foo ();
19968
19969         In Foo the implict this would be null.
19970
19971 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
19972
19973         * expression.cs (Invocation.EmitCall): If the method is not
19974         virtual, do not emit a CallVirt to it, use Call.
19975
19976         * typemanager.cs (GetFullNameSignature): Improve the method to
19977         cope with ".ctor" and replace it with the type name.
19978
19979         * class.cs (ConstructorInitializer.Resolve): Now the method takes
19980         as an argument the ConstructorBuilder where it is being defined,
19981         to catch the recursive constructor invocations.
19982
19983 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
19984
19985         * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
19986         routines to check if a type is an enumerable/enumerator allow
19987         classes that implement the IEnumerable or IEnumerator interfaces.
19988
19989         * class.cs (Property, Operator): Implement IIteratorContainer, and
19990         implement SetYields.
19991
19992         (Property.Define): Do the block swapping for get_methods in the
19993         context of iterators.   We need to check if Properties also
19994         include indexers or not.
19995
19996         (Operator): Assign the Block before invoking the
19997         OperatorMethod.Define, so we can trigger the Iterator code
19998         replacement. 
19999
20000         * cs-parser.jay (SimpleIteratorContainer): new helper class.  Both
20001         Property and Operator classes are not created when we parse the
20002         declarator but until we have the block completed, so we use a
20003         singleton SimpleIteratorContainer.Simple to flag whether the
20004         SetYields has been invoked.
20005
20006         We propagate this setting then to the Property or the Operator to
20007         allow the `yield' to function.
20008
20009 2004-02-25  Marek Safar  <marek.safar@seznam.cz>
20010
20011         * codegen.cs: Implemented attribute support for modules.
20012         New AssemblyClass, ModuleClass and CommonAssemblyModulClass for
20013         Assembly/Module functionality.
20014
20015         * attribute.cs, class.cs, cs-parser.jay, delegate.cs, driver.cs, enum.cs
20016         interface.cs, rootcontext.cs, statement.cs, typemanager.cs:
20017         Updated dependencies on CodeGen.ModuleBuilder and CodeGen.AssemblyBuilder.
20018
20019 2004-02-16  Marek Safar  <marek.safar@seznam.cz>
20020
20021         * interface.cs (FindMembers): The operation is performed on all base
20022         interfaces and not only on the first. It is required for future CLS Compliance patch.
20023
20024 2004-02-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20025
20026         * statement.cs, codegen.cs:
20027         This patch deals with patterns such as:
20028
20029         public class List : IEnumerable {
20030
20031                 public MyEnumerator GetEnumerator () {
20032                         return new MyEnumerator(this);
20033                 }
20034
20035                 IEnumerator IEnumerable.GetEnumerator () {
20036                         ...
20037                 }
20038                 
20039                 public struct MyEnumerator : IEnumerator {
20040                         ...
20041                 }
20042         }
20043
20044         Before, there were a few things we did wrong:
20045         1) we would emit callvirt on a struct, which is illegal
20046         2) we emited ldarg when we needed to emit ldarga
20047         3) we would mistakenly call the interface methods on an enumerator
20048         type that derived from IEnumerator and was in another assembly. For example:
20049
20050         public class MyEnumerator : IEnumerator
20051
20052         Would have the interface methods called, even if there were public impls of the
20053         method. In a struct, this lead to invalid IL code.
20054
20055 2004-02-11  Marek Safar  <marek.safar@seznam.cz>
20056
20057         * const.cs: Const is now derived from FieldBase. Method EmitConstant name
20058           renamed to Emit.
20059
20060         * delegate.cs (Define): Fixed crash when delegate type is undefined.
20061
20062 2004-02-11  Miguel de Icaza  <miguel@ximian.com>
20063
20064         * cs-parser.jay: Fix small regression: we were not testing V2
20065         compiler features correctly.
20066
20067         * interface.cs: If the emit context is null, then create one
20068
20069 2004-02-09  Marek Safar  <marek.safar@seznam.cz>
20070
20071         * decl.cs (GetSignatureForError): New virtual method to get full name
20072           for error messages.
20073
20074         * attribute.cs (IAttributeSupport): New interface for attribute setting.
20075           Now it is possible to rewrite ApplyAttributes method to be less if/else.
20076
20077         * interface.cs : All InterfaceXXX classes are now derived from MemberCore.
20078           Duplicated members and code in these classes has been removed.
20079           Better encapsulation in these classes.
20080
20081 2004-02-07  Miguel de Icaza  <miguel@ximian.com>
20082
20083         * assign.cs (Assign.DoResolve): When dealing with compound
20084         assignments, there is a new rule in ECMA C# 2.4 (might have been
20085         there before, but it is documented here) that states that in:
20086
20087         a op= b;
20088
20089         If b is of type int, and the `op' is a shift-operator, then the
20090         above is evaluated as:
20091
20092         a = (int) a op b 
20093
20094         * expression.cs (Binary.ResolveOperator): Instead of testing for
20095         int/uint/long/ulong, try to implicitly convert to any of those
20096         types and use that in pointer arithmetic.
20097
20098         * delegate.cs (Error_NoMatchingMethodForDelegate): Compute the
20099         method to print information for from the type, not from the
20100         null-method we were given.
20101
20102 2004-02-01  Duncan Mak  <duncan@ximian.com>
20103
20104         * cs-tokenizer.cs (get_cmd_arg): Skip over whitespace before
20105         parsing for cmd, fixes bug #53694.
20106
20107 2004-02-04  Marek Safar  <marek.safar@seznam.cz>
20108
20109         * class.cs, decl.cs: Fixed problem where IndexerName attribute was ignored
20110         in the member name duplication tests. Property and operator name duplication
20111         was missing too (error tests cs0102-{2,3,4,5}.cs, cs0111-{3,4}.cs).
20112
20113 2004-02-03  Marek Safar  <marek.safar@seznam.cz>
20114
20115         * interface.cs (PopulateMethod): Fixed crash when interface method
20116         returns not existing type (error test cs0246-3.cs).
20117
20118 2004-02-02  Ravi Pratap M <ravi@ximian.com>
20119
20120         * cs-parser.jay (interface_accessors): Re-write actions to also
20121         store attributes attached to get and set methods. Fix spelling
20122         while at it.
20123
20124         (inteface_property_declaration): Modify accordingly.
20125
20126         (InterfaceAccessorInfo): New helper class to store information to pass
20127         around between rules that use interface_accessors.
20128
20129         * interface.cs (Emit): Apply attributes on the get and set
20130         accessors of properties and indexers too.
20131
20132         * attribute.cs (ApplyAttributes): Modify accordingly to use the
20133         right MethodBuilder when applying attributes to the get and set accessors.
20134
20135 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20136
20137         * cs-tokenizer.cs: Applied patch from Marek Safar to fix bug 53386
20138
20139 2004-01-26  Miguel de Icaza  <miguel@ximian.com>
20140
20141         * cs-tokenizer.cs: Handle #line hidden from PDC bits.
20142
20143 2004-01-25  Miguel de Icaza  <miguel@ximian.com>
20144
20145         * cs-parser.jay: Remove YIELD token, instead use the new grammar
20146         changes that treat `yield' specially when present before `break'
20147         or `return' tokens.
20148
20149         * cs-tokenizer.cs: yield is no longer a keyword.
20150
20151 2004-01-23  Marek Safar  <marek.safar@seznam.cz>
20152
20153         * cs-parser.jay, class.cs (DefineDefaultConstructor): Fixed ModFlags
20154         setting for default constructors.
20155         For default constructors are almost every time set wrong Modifier. The
20156         generated IL code has been alright. But inside mcs this values was
20157         wrong and this was reason why several of my CLS Compliance tests
20158         failed.
20159
20160 2004-01-22  Martin Baulig  <martin@ximian.com>
20161
20162         * cs-parser.jay (namespace_or_type_name): Return an Expression,
20163         not a QualifiedIdentifier.  This is what `type_name_expression'
20164         was previously doing.
20165         (type_name_expression): Removed; the code is now in
20166         `namespace_or_type_name'.
20167         (qualified_identifier): Removed, use `namespace_or_type_name'
20168         instead.
20169         (QualifiedIdentifier): Removed this class.      
20170
20171 2004-01-22  Martin Baulig  <martin@ximian.com>
20172
20173         * namespace.cs (NamespaceEntry.UsingAlias): Take an Expression,
20174         not a string as alias name.
20175
20176 2004-01-21  Miguel de Icaza  <miguel@ximian.com>
20177
20178         * ecore.cs (FieldInfo.AddressOf): Revert patch from previous
20179         #52730 bug, and instead compute correctly the need to use a
20180         temporary variable when requesting an address based on the
20181         static/instace modified of the field and the constructor.
20182  
20183 2004-01-21  Martin Baulig  <martin@ximian.com>
20184
20185         * ecore.cs (SimpleName.ResolveAsTypeStep): Lookup in the current
20186         class and namespace before looking up aliases.  Fixes #52517.
20187
20188 2004-01-21  Martin Baulig  <martin@ximian.com>
20189
20190         * flowanalysis.cs (UsageVector.Merge): Allow variables being
20191         assinged in a 'try'; fixes exception4.cs.
20192
20193 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20194         * class.cs : Implemented parameter-less constructor for TypeContainer
20195
20196         * decl.cs: Attributes are now stored here. New property OptAttributes
20197
20198         * delegate.cs, enum.cs, interface.cs: Removed attribute member.
20199
20200         * rootcontext.cs, tree.cs: Now use parameter-less constructor of TypeContainer
20201
20202 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20203
20204         * typemanager.cs (CSharpSignature): Now reports also inner class name.
20205           (CSharpSignature): New method for indexer and property signature.
20206
20207 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20208
20209         * pending.cs (IsVirtualFilter): Faster implementation.
20210
20211 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20212
20213         * typemanager.cs: Avoid inclusion of same assembly more than once.
20214
20215 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20216
20217         * cs-parser.jay: Fixed problem where the last assembly attribute
20218           has been applied also to following declaration (class, struct, etc.)
20219           
20220 2004-01-21  Marek Safar  <marek.safar@seznam.cz>
20221
20222         * class.cs: Added error CS0538, CS0539 reporting.
20223         Fixed crash on Microsoft runtime when field type is void.
20224
20225         * cs-parser.jay: Added error CS0537 reporting.
20226
20227         * pending.cs: Added error CS0535 reporting.
20228         Improved error report for errors CS0536, CS0534.
20229
20230 2004-01-20  Miguel de Icaza  <miguel@ximian.com>
20231
20232         Merge a few bits from the Anonymous Method MCS tree.
20233
20234         * statement.cs (ToplevelBlock): New class for toplevel methods,
20235         will hold anonymous methods, lifted variables.
20236
20237         * cs-parser.jay: Create toplevel blocks for delegates and for
20238         regular blocks of code. 
20239
20240 2004-01-20  Martin Baulig  <martin@ximian.com>
20241
20242         * codegen.cs (EmitContext): Removed `InTry', `InCatch',
20243         `InFinally', `InLoop', `TryCatchLevel', `LoopBeginTryCatchLevel'
20244         and `NeedExplicitReturn'; added `IsLastStatement'.
20245         (EmitContext.EmitTopBlock): Emit the explicit "ret" if we either
20246         have a `ReturnLabel' or we're not unreachable.
20247
20248         * flowanalysis.cs (FlowBranching.MergeChild): Actually merge the
20249         child's reachability; don't just override ours with it.  Fixes
20250         #58058 (lluis's example).
20251         (FlowBranching): Added public InTryOrCatch(), InCatch(),
20252         InFinally(), InLoop(), InSwitch() and
20253         BreakCrossesTryCatchBoundary() methods.
20254
20255         * statement.cs (Return): Do all error checking in Resolve().
20256         Unless we are the last statement in a top-level block, always
20257         create a return label and jump to it.
20258         (Break, Continue): Do all error checking in Resolve(); also make
20259         sure we aren't leaving a `finally'.
20260         (Block.DoEmit): Set `ec.IsLastStatement' when emitting the last
20261         statement in a top-level block.
20262         (Block.Flags): Added `IsDestructor'.
20263         (Block.IsDestructor): New public property.
20264
20265 2004-01-20  Martin Baulig  <martin@ximian.com>
20266
20267         * statement.cs (Break.DoEmit): Set ec.NeedExplicitReturn; fixes #52427.
20268
20269 2004-01-20  Martin Baulig  <martin@ximian.com>
20270
20271         * statement.cs (Statement.ResolveUnreachable): New public method.
20272         (If, While): Do the dead-code elimination in Resolve(), not in Emit().
20273         (Block.Resolve): Resolve unreachable statements.
20274
20275 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20276
20277         * expression.cs: We need to fix the case where we do
20278         not have a temp variable here.
20279
20280         * assign.cs: Only expression compound assignments need
20281         temporary variables.
20282
20283 2004-01-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20284
20285         * flowanalysis.cs: Reduce memory allocation in a few ways:
20286           - A block with no variables should not allocate a bit
20287             vector for itself.
20288           - A method with no out parameters does not need any tracking
20289             for assignment of the parameters, so we need not allocate
20290             any data for it.
20291           - The arrays:
20292                 public readonly Type[] VariableTypes;
20293                 public readonly string[] VariableNames;
20294             Are redundant. The data is already stored in the variable
20295             map, so we need not allocate another array for it.
20296           - We need to add alot of checks for if (params | locals) == null
20297             due to the first two changes.
20298
20299 2004-01-18  Miguel de Icaza  <miguel@ximian.com>
20300
20301         * ecore.cs (FieldExpr.AddressOf): For ValueTypes that do not
20302         implement IMemoryLocation, we store a copy on a local variable and
20303         take the address of it.  Patch from Benjamin Jemlich
20304
20305         * cs-parser.jay: Applied patch from Ben Maurer to the "type" rule
20306         to use a special "type_name_expression" rule which reduces the
20307         number of "QualifiedIdentifier" classes created, and instead
20308         directly creates MemberAccess expressions.
20309
20310 2004-01-17  Miguel de Icaza  <miguel@ximian.com>
20311
20312         * convert.cs: Applied patch from Benjamin Jemlich (pcgod@gmx.net)
20313         that fixes #52853.  Null literal assignment to ValueType
20314
20315         * class.cs (MethodData.Emit): Instead of checking the name of the
20316         method to determine if its a destructor, create a new derived
20317         class from Method called Destructor, and test for that.  
20318
20319         * cs-parser.jay: Create a Destructor object instead of a Method.  
20320
20321         Based on a fix from Benjamin Jemlich (pcgod@gmx.net)
20322
20323         Fixes: 52933
20324
20325 2004-01-16  Miguel de Icaza  <miguel@ximian.com>
20326
20327         * expression.cs (Binary.ResolveOperator): Perform an implicit
20328         conversion from MethodGroups to their delegate types on the
20329         Addition operation.
20330
20331         * delegate.cs: Introduce a new class DelegateCreation that is the
20332         base class for `NewDelegate' and `ImplicitDelegateCreation',
20333         factor some code in here.
20334
20335         * convert.cs (Convert.ImplicitConversionStandard): Add an implicit
20336         conversion from MethodGroups to compatible delegate types. 
20337
20338         * ecore.cs (Expression.Resolve): Do not flag error 654
20339         (Methodgroupd needs parenthesis) if running on the V2 compiler, as
20340         we allow conversions from MethodGroups to delegate types now.
20341
20342         * assign.cs (Assign.DoResolve): Do not flag errors on methodgroup
20343         assignments in v2 either.
20344
20345 2004-01-10  Miguel de Icaza  <miguel@ximian.com>
20346
20347         * ecore.cs (FieldExpr.AddressOf): Fix generated IL for accessing
20348         static read-only fields in ctors.
20349
20350         Applied patch from Benjamin Jemlich 
20351
20352         * expression.cs (UnaryMutator): Avoid leaking local variables. 
20353
20354 2004-01-09  Miguel de Icaza  <miguel@ximian.com>
20355
20356         * cs-tokenizer.cs (IsCastToken): Allow the various native types
20357         here to return true, as they can be used like this:
20358
20359                 (XXX) int.MEMBER ()
20360
20361         Fixed 49836 and all the other dups
20362
20363 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20364
20365         * driver.cs: Implement /win32res and /win32icon.
20366
20367 2004-01-08  Miguel de Icaza  <miguel@ximian.com>
20368
20369         * cs-parser.jay: Add a rule to improve error handling for the
20370         common mistake of placing modifiers after the type.
20371
20372 2004-01-07  Miguel de Icaza  <miguel@ximian.com>
20373
20374         * cs-parser.jay (interface_event_declaration): Catch
20375         initialization of events on interfaces, and report cs0068
20376
20377         * cs-parser.jay (interface_event_declaration): Catch
20378         initialization of events. 
20379
20380         * ecore.cs: Better report missing constructors.
20381
20382         * expression.cs (Binary.ResolveOperator): My previous bug fix had
20383         the error reporting done in the wrong place.  Fix.
20384
20385         * expression.cs (Binary.ResolveOperator): Catch the 
20386         operator + (E x, E y) error earlier, and later allow for implicit
20387         conversions in operator +/- (E e, U x) from U to the underlying
20388         type of E.
20389
20390         * class.cs (TypeContainer.DefineDefaultConstructor): Fix bug
20391         52596, if the container class is abstract, the default constructor
20392         is protected otherwise its public (before, we were always public).
20393
20394         * statement.cs (Fixed.Resolve): Catch a couple more errors in the
20395         fixed statement.
20396
20397         (Using.EmitLocalVariableDecls): Applied patch from Benjamin
20398         Jemlich that fixes bug #52597, MCS was generating invalid code for
20399         idisposable structs.   Thanks to Ben for following up with this
20400         bug as well.
20401
20402 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
20403
20404         * driver.cs: Allow assemblies without code to be generated, fixes
20405         52230.
20406
20407 2004-01-07  Nick Drochak <ndrochak@gol.com>
20408
20409         * attribute.cs: Remove unneeded catch variables. Eliminates a warning.
20410
20411 2004-01-05  Miguel de Icaza  <miguel@ximian.com>
20412
20413         * cs-parser.jay: Add rules to improve error reporting if fields or
20414         methods are declared at the namespace level (error 116)
20415
20416         * Add rules to catch event add/remove
20417
20418 2004-01-04  David Sheldon <dave-mono@earth.li>
20419
20420   * expression.cs: Added matching ")" to error message for 
20421   CS0077
20422
20423 2004-01-03 Todd Berman <tberman@gentoo.org>
20424
20425         * ecore.cs, attribute.cs:
20426         Applying fix from #52429.
20427
20428 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20429
20430         * ecore.cs, expression.cs, statement.cs:
20431         Total rewrite of how we handle branching. We
20432         now handle complex boolean expressions with fewer
20433         jumps. As well if (x == 0) no longer emits a ceq.
20434
20435         if (x is Foo) is much faster now, because we generate
20436         better code.
20437
20438         Overall, we get a pretty big improvement on our benchmark
20439         tests. The code we generate is smaller and more readable.
20440
20441         I did a full two-stage bootstrap. The patch was reviewed
20442         by Martin and Miguel.
20443
20444 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20445
20446         * cs-parser.jay: Make primary_expression not take a QI.
20447         we dont need this because the member_access rule covers
20448         us here. So we replace the rule with just IDENTIFIER.
20449
20450         This has two good effects. First, we remove a s/r conflict.
20451         Second, we allocate many fewer QualifiedIdentifier objects.
20452
20453 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20454
20455         * attribute.cs: Handle MarshalAs attributes as pseudo, and
20456         set the correct information via SRE. This prevents
20457         hanging on the MS runtime. Fixes #29374.
20458
20459 2004-01-03 Ben Maurer  <bmaurer@users.sourceforge.net>
20460
20461         * convert.cs: correctly handle conversions to value types
20462         from Enum and ValueType as unboxing conversions.
20463
20464         Fixes bug #52569. Patch by Benjamin Jemlich.
20465
20466 2004-01-02  Ravi Pratap  <ravi@ximian.com>
20467
20468         * expression.cs (BetterConversion): Prefer int -> uint
20469         over int -> ulong (csc's behaviour). This fixed bug #52046.
20470
20471 2004-01-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20472
20473         * decl.cs (MemberCache.FindMembers): now returns a
20474         MemberInfo [].
20475
20476         * typemanager.cs: In general, go with with ^^.
20477         (CopyNewMethods): take an IList.
20478         (RealMemberLookup): Only allocate an arraylist
20479         if we copy from two sets of methods.
20480
20481         This change basically does two things:
20482         1) Fewer array lists allocated due to CopyNewMethods.
20483         2) the explicit cast in MemberList costed ALOT.
20484
20485 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20486
20487         * cs-tokenizer.cs (consume_identifier) driver.cs: Cache identifiers in
20488         a hashtable to avoid needless string allocations when an identifier is
20489         used more than once (the common case).
20490
20491 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20492
20493         * pending.cs: MS's TypeBuilder.GetInterfaces ()
20494         is broken, it will not return anything. So, we
20495         have to use the information we have in mcs to
20496         do the task.
20497
20498         * typemanager.cs: Add a cache for GetInterfaces,
20499         since this will now be used more often (due to ^^)
20500
20501         (GetExplicitInterfaces) New method that gets the
20502         declared, not effective, interfaces on a type
20503         builder (eg, if you have interface IFoo, interface
20504         IBar, Foo : IFoo, Bar : Foo, IBar, GetExplInt (Bar) ==
20505         { IBar }.
20506
20507         This patch makes MCS able to bootstrap itself on
20508         Windows again.
20509
20510 2004-01-01 Ben Maurer  <bmaurer@users.sourceforge.net>
20511
20512         * expression.cs: Remove the Nop's that Miguel put
20513         in by mistake.
20514
20515 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20516
20517         * report.cs, codegen.cs: Give the real stack trace to
20518         the error when an exception is thrown.
20519
20520 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20521
20522         * decl.cs: only allocate hashtables for ifaces if 
20523         it is an iface!
20524
20525 2003-12-31 Ben Maurer  <bmaurer@users.sourceforge.net>
20526
20527         * expression.cs: fix the error from cs0121-2.cs
20528         (a parent interface has two child interfaces that
20529         have a function with the same name and 0 params
20530         and the function is called through the parent).
20531
20532 2003-12-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20533
20534         * class.cs, rootcontext.cs, typmanager.cs: do not
20535         leak pointers.
20536
20537 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
20538
20539         * codegen.cs: remove stack for the ec flow branching.
20540         It is already a linked list, so no need.
20541
20542 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20543
20544         * Makefile: Allow custom profiler here.
20545
20546 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20547
20548         * typemanager.cs (LookupType):
20549           - Use a static char [], because split takes
20550             a param array for args, so it was allocating
20551             every time.
20552           - Do not store true in a hashtable, it boxes.
20553
20554 2003-12-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20555
20556         * flowanalysis.cs: bytify common enums.
20557
20558 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20559
20560         * modifiers.cs: Add a new set of flags for the
20561         flags allowed on explicit interface impls.
20562         * cs-parser.jay: catch the use of modifiers in
20563         interfaces correctly.
20564         * class.cs: catch private void IFoo.Blah ().
20565
20566         All related to bug #50572.
20567
20568 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20569
20570         * decl.cs: Rewrite the consistant accessability checking.
20571         Accessability is not linear, it must be implemented in
20572         a tableish way. Fixes #49704.
20573
20574 2003-12-25 Ben Maurer  <bmaurer@users.sourceforge.net>
20575
20576         * expression.cs: Handle negation in a checked context.
20577         We must use subtraction from zero. Fixes #38674.
20578
20579 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20580
20581         * class.cs: Ignore static void main in DLLs.
20582         * rootcontext.cs: Handle the target type here,
20583         since we are have to access it from class.cs
20584         * driver.cs: account for the above.
20585
20586 2003-12-23 Ben Maurer  <bmaurer@users.sourceforge.net>
20587
20588         * report.cs: Give line numbers and files if available.
20589
20590 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
20591
20592         * driver.cs: Implement /addmodule.
20593
20594         * typemanager.cs:  Change 'modules' field so it now contains Modules not
20595         ModuleBuilders.
20596
20597 2003-12-20  Martin Baulig  <martin@ximian.com>
20598
20599         * class.cs (TypeContainer.DefineMembers): Don't do the CS0649 check here.
20600         (FieldBase.IsAssigned): Removed this field.
20601         (FieldBase.SetAssigned): New public method.
20602         (TypeContainer.Emit): Make the CS0169/CS0649 checks actually work.
20603
20604 2003-12-20  Martin Baulig  <martin@ximian.com>
20605
20606         * expression.cs (LocalVariableReference.DoResolve): Don't set
20607         `vi.Used' if we're called from DoResolveLValue().
20608
20609         * statement.cs (Block.DoResolve): `ec.DoEndFlowBranching()' now
20610         returns the usage vector it just merged into the current one -
20611         pass this one to UsageWarning().
20612         (Block.UsageWarning): Take the `FlowBranching.UsageVector' instead
20613         of the `EmitContext', don't call this recursively on our children.
20614
20615 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20616
20617         * driver.cs: Implement /target:module.
20618
20619 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20620
20621         * support.cs (CharArrayHashtable): New helper class.
20622
20623         * cs-tokenizer.cs: Store keywords in a hashtable indexed by 
20624         char arrays, not strings, so we can avoid creating a string in
20625         consume_identifier if the identifier is a keyword.
20626
20627 2003-12-16  Martin Baulig  <martin@ximian.com>
20628
20629         * statement.cs (LocalInfo.Assigned): Removed this property.
20630         (LocalInfo.Flags): Removed `Assigned'.
20631         (LocalInfo.IsAssigned): New public method; takes the EmitContext
20632         and uses flow analysis.
20633         (Block.UsageWarning): Made this method private.
20634         (Block.Resolve): Call UsageWarning() if appropriate.
20635
20636         * expression.cs (LocalVariableReference.DoResolve): Always set
20637         LocalInfo.Used here.
20638
20639 2003-12-13  Martin Baulig  <martin@ximian.com>
20640
20641         * statement.cs (Statement.DoEmit, Statement.Emit): Don't return
20642         any value here; we're now using flow analysis to figure out
20643         whether a statement/block returns a value.
20644
20645 2003-12-13  Martin Baulig  <martin@ximian.com>
20646
20647         * flowanalysis.cs (UsageVector.MergeFinallyOrigins): Made this
20648         working again.
20649         (FlowBranching.MergeFinally): Don't call
20650         `branching.CheckOutParameters()' here, this is called in
20651         MergeTopBlock().
20652         (FlowBranchingException.AddSibling): Call MergeFinallyOrigins()
20653         when adding the `finally' vector.       
20654
20655 2003-12-13  Martin Baulig  <martin@ximian.com>
20656
20657         * flowanalysis.cs
20658         (UsageVector.MergeJumpOrigins, FlowBranching.Label): Make this
20659         actually work and also fix #48962.
20660
20661 2003-12-12 Ben Maurer  <bmaurer@users.sourceforge.net>
20662
20663         * decl.cs: Do not check System.Object for nested types,
20664         since we know it does not have any. Big bang for buck:
20665
20666         BEFORE:
20667            Run 1:   8.35 seconds
20668            Run 2:   8.32 seconds
20669            corlib:  17.99 seconds
20670         AFTER:
20671            Run 1:   8.17 seconds
20672            Run 2:   8.17 seconds
20673            corlib:  17.39 seconds
20674
20675 2003-12-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20676
20677         * class.cs (FindMembers): Allocate arraylists on demand. Most of the
20678         time we are returning 0 members, so we save alot here.
20679
20680 2003-12-11  Martin Baulig  <martin@ximian.com>
20681
20682         * flowanalysis.cs (UsageVector.MergeResult): Renamed this back to
20683         `MergeChild()', also just take the `FlowBranching' as argument;
20684         call Merge() on it and return the result.
20685         (FlowBranching.Merge): We don't need to do anything if we just
20686         have one sibling.
20687
20688 2003-12-11  Martin Baulig  <martin@ximian.com>
20689
20690         * flowanalysis.cs: Use a list of `UsageVector's instead of storing
20691         them in an `ArrayList' to reduce memory usage.  Thanks to Ben
20692         Maurer for this idea.
20693
20694 2003-12-11  Martin Baulig  <martin@ximian.com>
20695
20696         * flowanalysis.cs (MergeResult): This class is now gone; we now
20697         use the `UsageVector' for this.  The reason for this is that if a
20698         branching just has one sibling, we don't need to "merge" them at
20699         all - that's the next step to do.
20700         (FlowBranching.Merge): We now return a `UsageVector' instead of a
20701         `MergeResult'.
20702
20703 2003-12-11  Martin Baulig  <martin@ximian.com>
20704
20705         Reworked flow analyis and made it more precise and bug-free.  The
20706         most important change is that we're now using a special `Reachability'
20707         class instead of having "magic" meanings of `FlowReturns'.  I'll
20708         do some more cleanups and optimizations and also add some more
20709         documentation this week.
20710
20711         * flowanalysis.cs (Reachability): Added `Throws' and `Barrier';
20712         largely reworked this class.
20713         (FlowReturns): Removed `Unreachable' and `Exception'; we now use
20714         the new `Reachability' class instead of having "magic" values here.
20715         (FlowBranching): We're now using an instance of `Reachability'
20716         instead of having separate `Returns', `Breaks' etc. fields.
20717
20718         * codegen.cs (EmitContext.EmitTopBlock): Set `has_ret' solely
20719         based on flow analysis; ignore the return value of block.Emit ().
20720
20721 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
20722
20723         * driver.cs typemanager.cs: Find the mono extensions to corlib even
20724         if they are private.
20725
20726 2003-12-09  Martin Baulig  <martin@ximian.com>
20727
20728         * flowanalyis.cs (FlowBranching.Return, Goto, Throw): Removed;
20729         call them directly on the UsageVector.
20730
20731 2003-12-09  Martin Baulig  <martin@ximian.com>
20732
20733         * flowanalysis.cs (FlowBranching.MergeChild, MergeTopBlock):
20734         Changed return type from `FlowReturns' to `Reachability'.
20735
20736 2003-12-09  Martin Baulig  <martin@ximian.com>
20737
20738         * flowanalysis.cs (FlowBranching.Reachability): New sealed class.
20739         (FlowBranching.MergeResult): Replaced the `Returns', `Breaks' and
20740         `Reachable' fields with a single `Reachability' one.
20741
20742 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20743
20744         * class.cs (FindMembers): Remove foreach's.
20745
20746         Bootstrap times:
20747
20748         BEFORE
20749                 Run 1:   8.74 seconds
20750                 Run 2:   8.71 seconds
20751
20752         AFTER
20753                 Run 1:   8.64 seconds
20754                 Run 2:   8.58 seconds
20755
20756
20757 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20758
20759         * cs-parser.jay:
20760         * gen-treedump.cs:
20761         * statement.cs:
20762         This patch does a few things:
20763                 1. EmptyStatement is now a singleton, so it is never reallocated.
20764                 2. All blah is EmptyStatement constructs have been changed to
20765                    blah == EmptyStatement.Value, which is much faster and valid
20766                    now that EmptyStatement is a singleton.
20767                 3. When resolving a block, rather than allocating a new array for
20768                    the non-empty statements, empty statements are replaced with
20769                    EmptyStatement.Value
20770                 4. Some recursive functions have been made non-recursive.
20771         Mainly the performance impact is from (3), however (1) and (2) are needed for
20772         this to work. (4) does not make a big difference in normal situations, however
20773         it makes the profile look saner.
20774
20775         Bootstrap times:
20776
20777         BEFORE
20778         9.25user 0.23system 0:10.28elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20779         9.34user 0.13system 0:10.23elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
20780         Total memory allocated: 56397 KB
20781
20782         AFTER
20783         9.13user 0.09system 0:09.64elapsed 95%CPU (0avgtext+0avgdata 0maxresident)k
20784         8.96user 0.24system 0:10.13elapsed 90%CPU (0avgtext+0avgdata 0maxresident)k
20785         Total memory allocated: 55666 KB
20786
20787 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20788
20789         * support.cs: Rewrite DoubleHash to use its own impl. Is faster
20790         than the hashtable in a hashtable version
20791
20792         * decl.cs: Right now, whenever we try to lookup a type inside a namespace,
20793         we always end up concating a string. This results in a huge perf
20794         loss, because many strings have to be tracked by the GC. In this
20795         patch, we first use a hashtable that works with two keys, so that
20796         the strings do not need to be concat'ed.
20797
20798         Bootstrap times:
20799         BEFORE
20800                 Run 1:   8.74 seconds
20801                 Run 2:   8.71 seconds
20802
20803         AFTER
20804                 Run 1:   8.65 seconds
20805                 Run 2:   8.56 seconds
20806
20807 2003-12-08 Ben Maurer  <bmaurer@users.sourceforge.net>
20808
20809         * Makefile: Add a new target `do-time' that does a quick and simple
20810         profile, leaving easy to parse output.
20811
20812 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20813
20814         * codegen.cs (Init): Create the dynamic assembly with 
20815         AssemblyBuilderAccess.Save, to enable some optimizations in the runtime.
20816
20817 2003-12-02 Ben Maurer  <bmaurer@users.sourceforge.net>
20818
20819         * support.cs: Make the PtrHashtable use only one
20820         instance of its comparer.
20821
20822 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
20823
20824         * typemanager.cs: Fix lookup of GetNamespaces.
20825
20826 2003-11-29  Miguel de Icaza  <miguel@ximian.com>
20827
20828         * expression.cs: Removed redundant line.
20829
20830         * statement.cs (Block.Resolve, Block.Emit): Avoid foreach on
20831         ArrayLists, use for loops with bounds.  
20832
20833         * flowanalysis.cs (FlowBranching.Merge): Avoid foreach on
20834         arraylist.
20835
20836         * expression.cs (Invocation.OverloadResolve): Avoid foreach on
20837         arraylists, use for loop with bounds.
20838
20839         The above three changes give us a 0.071 second performance
20840         improvement out of 3.294 seconds down to 3.223.  On my machine
20841         the above changes reduced the memory usage by 1,387 KB during
20842         compiler bootstrap.
20843
20844         * cs-parser.jay (QualifiedIdentifier): New class used to represent
20845         QualifiedIdentifiers.  Before we created a new string through
20846         concatenation, and mostly later on, the result would be
20847         manipulated by DecomposeQI through string manipulation.
20848
20849         This reduced the compiler memory usage for bootstrapping from
20850         59380 KB to 59007 KB on my machine, 373 KB, and also reduced the
20851         compile times in 0.05 seconds.
20852
20853 2003-11-28  Dick Porter  <dick@ximian.com>
20854
20855         * support.cs: Do string compares with the Invariant culture.
20856
20857         * rootcontext.cs: 
20858         * gen-treedump.cs: 
20859         * expression.cs: 
20860         * driver.cs: 
20861         * decl.cs: 
20862         * codegen.cs: 
20863         * class.cs: Use the char forms of IndexOf and LastIndexOf, so that
20864         the comparison is done with the Invariant culture.
20865
20866 2003-11-27  Miguel de Icaza  <miguel@ximian.com>
20867
20868         * statement.cs (Foreach.TryType): Use DeclaredOnly to find the
20869         GetEnumerator method.
20870
20871         (ProbeCollectionType): Iterate starting at the most specific type
20872         upwards looking for a GetEnumerator
20873
20874         * expression.cs: Shift count can be up to 31 for int/uint and 63
20875         for long/ulong.
20876
20877 2003-11-26  Miguel de Icaza  <miguel@ximian.com>
20878
20879         * statement.cs (Block.LookupLabel): Also look for the label on the
20880         children blocks.  Use a hash table to keep track of visited
20881         nodes. 
20882
20883         * cfold.cs (IntConstant to UIntConstant mapping): Only return if
20884         we actually did transform the other operand, otherwise fall back
20885         to the common codepath that casts to long.
20886
20887         * cs-tokenizer.cs: Use the same code pattern as the int case.
20888         Maybe I should do the parsing myself, and avoid depending on the
20889         Parse routines to get this done.
20890
20891 2003-11-25  Miguel de Icaza  <miguel@ximian.com>
20892
20893         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20894         which fixes bug 51347.  This time test it.
20895
20896         * expression.cs: Make TypeOfVoid derive from TypeOf, so code in
20897         attributes for example can not tell the difference between these.
20898         The difference was only a syntax feature of the language. 
20899
20900         * attribute.cs: Apply attributes to delegates.
20901
20902         * delegate.cs: Call the apply attributes method.
20903
20904 2003-11-24  Miguel de Icaza  <miguel@ximian.com>
20905
20906         * convert.cs (TryImplicitIntConversion): One line bug fix: we were
20907         comparing 0 vs Byte.MinValue, not the value
20908
20909         (ImplicitConversionRequired): When reporting a conversion error,
20910         use error 31 to print out the constant error instead of the
20911         simpler 29.
20912
20913         * expression.cs: Apply fix from l_m@pacbell.net (Laurent Morichetti),  
20914         which fixes bug 51347.
20915
20916 2003-11-22  Miguel de Icaza  <miguel@ximian.com>
20917
20918         * driver.cs: Applied patch from gert.driesen@pandora.be (Gert Driesen) 
20919         which fixes the -warnaserror command line option.
20920
20921 2003-11-21  Miguel de Icaza  <miguel@ximian.com>
20922
20923         * cfold.cs (DoNumericPromotions): During constant folding of
20924         additions on UIntConstant, special case intconstants with
20925         IntConstants like we do on the expression binary operator. 
20926
20927 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
20928
20929         * convert.cs (ImplicitReferenceConversion): We were missing a case
20930         (System.Enum are not value types or class types, so we need to
20931         classify them separatedly).
20932
20933         * driver.cs: We do not support error 2007.
20934
20935 2003-11-12 Jackson Harper <jackson@ximian.com>
20936
20937         * driver.cs: Use corlib.dll or mscorlib.dll when looking up the
20938         system directory. Also use the full file name so users can
20939         libraries names mscorlib-o-tron.dll in a non system dir.
20940
20941 2003-11-10  Martin Baulig  <martin@ximian.com>
20942
20943         * typemanager.cs (TypeManager.ResolveExpressionTypes): Removed.
20944         (TypeManager.InitCoreTypes): Initialize them here, but instead of
20945         calling `ResolveType()' on them, directly assign their `Type'.
20946
20947 2003-11-08  Martin Baulig  <martin@ximian.com>
20948
20949         * class.cs (TypeContainer.GetClassBases): Use TypeExpr's for the
20950         return value and the `out parent' parameter.
20951         (TypeContainer.DefineType): Moved the CS0644 check into
20952         GetClassBases().  Don't pass the interface types to the
20953         `builder.DefineType()'/`builder.DefineNestedType()', but resolve
20954         them later and then call `TypeBuilder.AddInterfaceImplementation()'.
20955
20956         * ecore.cs (TypeExpr.IsAttribute): New property.
20957         (TypeExpr.GetInterfaces): New method.
20958
20959         * interface.cs (Interface.GetInterfaceTypeByName): Return a
20960         TypeExpr instead of a Type.
20961         (Interface.GetInterfaceBases): Return TypeExpr's instead of Type's.
20962         (Interface.DefineType): Don't pass the interface types to the
20963         `builder.Definetype()'/`builder.DefineNestedType()', but resolve
20964         them later and then call `TypeBulider.AddInterfaceImplementation()'.
20965
20966         * typemanager.cs (TypeManager.AddUserType): Take a `TypeExpr[]'
20967         instead of a `Type[]'.
20968         (TypeManager.RegisterBuilder): Likewise.
20969         (TypeManager.AddUserInterface): Likewise.
20970         (TypeManager.ExpandInterfaces): Take a `Type[]' instead of a
20971         `Type[]' and also return a `TypeExpr[]'.
20972         (TypeManager.GetInterfaces): Return a `TypeExpr[]'.
20973
20974 2003-11-08  Martin Baulig  <martin@ximian.com>
20975
20976         * decl.cs (DeclSpace.ResolveTypeExpr): Return a TypeExpr, not an
20977         Expression.     
20978
20979 2003-11-08  Martin Baulig  <martin@ximian.com>
20980
20981         * decl.cs (DeclSpace.GetTypeResolveEmitContext): Call
20982         TypeManager.ResolveExpressionTypes().
20983
20984         * ecore.cs (Expression.ResolveAsTypeTerminal): Return a TypeExpr
20985         instead of an Expression.
20986         (TypeExpr): This is now an abstract base class for `TypeExpression'.
20987         (TypeExpression): New public class; formerly known as `TypeExpr'.
20988
20989         * expression.cs (ComposedCast): Derive from TypeExpr.
20990
20991         * typemanager.cs (TypeManager.system_*_expr): These are now
20992         TypExpr's instead of Expression's.
20993         (TypeManager.ResolveExpressionTypes): New public static function;
20994         called from DeclSpace.GetTypeResolveEmitContext() to resolve all
20995         of them.        
20996
20997 2003-11-06  Miguel de Icaza  <miguel@ximian.com>
20998
20999         * expression.cs (New.DoResolve): Do not dereference value that
21000         might be a null return.
21001
21002         * statement.cs (Block.EmitMeta): Use the Const.ChangeType to make
21003         sure that the constant value has the right type.  Fixes an
21004         unreported bug, similar to 50425.
21005
21006         * const.cs (Const.LookupConstantValue): Call
21007         ImplicitStandardConversionExists before doing a conversion to
21008         avoid havng the TypeManager.ChangeType do conversions.
21009
21010         Reduced the number of casts used
21011
21012         (Const.ChangeType): New routine to enable reuse of the constant
21013         type changing code from statement.
21014
21015         * typemanager.cs (ChangeType): Move common initialization to
21016         static global variables.
21017
21018         Fixes #50425.
21019
21020         * convert.cs (ImplicitReferenceConversion): Somehow we allowed
21021         every value type to go through, even if it was void.  Fix that. 
21022
21023         * cs-tokenizer.cs: Use is_identifier_start_character on the start
21024         character of the define, and the is_identifier_part_character for
21025         the rest of the string.
21026
21027 2003-11-05  Miguel de Icaza  <miguel@ximian.com>
21028
21029         * expression.cs (UnaryMutator.EmitCode): When I updated
21030         LocalVariableReference.DoResolve, I overdid it, and dropped an
21031         optimization done on local variable references.
21032
21033 2003-11-04  Miguel de Icaza  <miguel@ximian.com>
21034
21035         * ecore.cs: Convert the return from Ldlen into an int.
21036
21037 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
21038
21039         * decl.cs (DeclSpace.GetAccessLevel): Handle NotPublic case for
21040         the accessibility, this is a special case for toplevel non-public
21041         classes (internal for instance).
21042
21043 2003-10-20  Nick Drochak <ndrochak@gol.com>
21044
21045         * ecore.cs: Fix typo and build.  Needed another right paren.
21046
21047 2003-10-19  Miguel de Icaza  <miguel@ximian.com>
21048
21049         * ecore.cs: Applied fix from Ben Maurer.   We were handling in the
21050         `internal' case regular and protected, but not allowing protected
21051         to be evaluated later.  Bug 49840
21052
21053 2003-10-15  Miguel de Icaza  <miguel@ximian.com>
21054
21055         * statement.cs (Switch.TableSwitchEmit): Compare the upper bound
21056         to kb.Nlast, and not the kb.nFirst to isolate the switch
21057         statement.
21058
21059         Extract the underlying type, so enumerations of long/ulong are
21060         treated like long/ulong.
21061
21062 2003-10-14  Miguel de Icaza  <miguel@ximian.com>
21063
21064         * expression.cs (New): Overload the meaning of RequestedType to
21065         track the possible creation of the NewDelegate type, since
21066         DoResolve is invoked more than once for new constructors on field
21067         initialization.
21068
21069         See bugs: #48800 and #37014
21070
21071         * cs-parser.jay (declare_local_constants): Take an arraylist
21072         instead of a single constant.
21073
21074         (local_constant_declaration): It should take a
21075         constant_declarators, not a constant_declarator.  Fixes 49487
21076
21077         * convert.cs: Fix error report.
21078
21079 2003-10-13 Jackson Harper <jackson@ximian.com>
21080
21081         * typemanager.cs (TypeToCoreType): Add float and double this fixes
21082         bug #49611
21083
21084 2003-10-09  Martin Baulig  <martin@ximian.com>
21085
21086         * class.cs (MethodCore): Added additional `DeclSpace ds' argument
21087         to the .ctor.
21088         (MethodCore.DoDefineParameters): Removed the TypeContainer
21089         argument; use the DeclSpace which was passed to the .ctor instead.
21090         (MethodCore.CheckParameter): Take a DeclSpace instead of a
21091         TypeContainer; we only need a DeclSpace here.
21092
21093 2003-10-09  Martin Baulig  <martin@ximian.com>
21094
21095         * class.cs (MethodData): Added additional `DeclSpace ds' argument
21096         to the .ctor.
21097         (MethodData.Define, MethodData.Emit): Pass the `ds' to the
21098         EmitContext's .ctor.    
21099
21100 2003-10-09  Martin Baulig  <martin@ximian.com>
21101
21102         * decl.cs (DeclSpace.AsAccessible): Moved here from TypeContainer.
21103         (AccessLevel, CheckAccessLevel, GetAccessLevel): They're used by
21104         AsAccessible(), moved them as well.
21105
21106         * class.cs (TypeContainer.AsAccessible): Moved to DeclSpace.
21107
21108 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
21109
21110         * cs-parser.jay : Renamed yyName to yyNames related to jay.
21111
21112 2003-10-07  Miguel de Icaza  <miguel@ximian.com>
21113
21114         * expression.cs (Binary.Emit.GreatherThanOrEqual): Fix the code
21115         generation for >=, as spotted by Paolo, bug 48679.  
21116         Patch from David Waite.
21117
21118         * cs-tokenizer.cs: Add handling for #pragma.
21119
21120         * cs-parser.jay: Allow for both yield and yield return in the
21121         syntax.  The anti-cobolization of C# fight will go on!
21122
21123         * class.cs (TypeBuilder.DefineType): Catch error condition here
21124         (Parent.DefineType erroring out and returning null).
21125
21126         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
21127         coping with enumerations variables, we were mistakenly processing
21128         them as a regular value type instead of built-in types.  Fixes the
21129         bug #48063
21130
21131         * typemanager.cs (IsBuiltinOrEnum): New method.
21132
21133 2003-09-30  Miguel de Icaza  <miguel@ximian.com>
21134
21135         * cs-parser.jay: Upgrade: yield now needs the return clause.
21136
21137 2003-09-19  Martin Baulig  <martin@ximian.com>
21138
21139         * decl.cs (MemberCache.SetupCacheForInterface): Take a
21140         `MemberCache parent' argument.  Normally, an interface doesn't
21141         have a parent type except System.Object, but we use this in gmcs
21142         for generic type parameters.
21143
21144 2003-09-18  Martin Baulig  <martin@ximian.com>
21145
21146         * typemanager.cs (TypeHandle.ctor): Set `IsInterface' solely based
21147         on `type.IsInterface'; don't check whether the type has a parent
21148         to determine whether it's an interface.
21149
21150 2003-09-15  Martin Baulig  <martin@ximian.com>
21151
21152         * class.cs (TypeContainer.DefineType): Added an error flag to
21153         avoid reporting duplicate CS0146's ("class definition is
21154         circular.").
21155
21156         * driver.cs (Driver.MainDriver): Abort if
21157         RootContext.ResolveTree() reported any errors.
21158
21159 2003-09-07  Martin Baulig  <martin@ximian.com>
21160
21161         * report.cs (Error, Warning): Added overloaded versions which take
21162         a `params object[] args' and call String.Format().
21163
21164 2003-09-07  Martin Baulig  <martin@ximian.com>
21165
21166         * decl.cs (DeclSpace..ctor): Don't call
21167         NamespaceEntry.DefineName() here; do it in RecordDecl() which is
21168         called from Tree.RecordDecl().  Fixes the CS0101 reporting.
21169         (DeclSpace.RecordDecl): New method.
21170
21171         * tree.cs (Tree.RecordDecl): Call ds.RecordDecl().
21172
21173 2003-09-02  Ravi Pratap  <ravi@ximian.com>
21174
21175         * attribute.cs (CheckAttributeTarget): Ensure that we allow return
21176         value attributes to be applied to ParameterBuilders.
21177
21178         * class.cs (MethodCore.LabelParameters): Make static and more
21179         generic so that it can be used from other places - like interface
21180         methods, for instance.
21181
21182         * interface.cs (Interface.Emit): Call LabelParameters before
21183         emitting attributes on the InterfaceMethod.
21184
21185 2003-08-26  Martin Baulig  <martin@ximian.com>
21186
21187         * ecore.cs (SimpleName.SimpleNameResolve): Look for members before
21188         resolving aliases; fixes #47927.
21189
21190 2003-08-26  Martin Baulig  <martin@ximian.com>
21191
21192         * statement.cs (Using.DoResolve): This is internally emitting a
21193         try/finally clause, so we need to set ec.NeedExplicitReturn if we
21194         do not always return.  Fixes #47681.
21195
21196 2003-08-26  Martin Baulig  <martin@ximian.com>
21197
21198         * decl.cs (MemberCore): Moved WarningNotHiding(),
21199         Error_CannotChangeAccessModifiers() and CheckMethodAgainstBase()
21200         into MemberBase.
21201         (AdditionResult): Make this nested in DeclSpace.
21202         (DeclSpace.ctor): The .ctor now takes an additional NamespaceEntry
21203         argument; call NamespaceEntry.Define() unless we're nested in a
21204         class or struct.
21205
21206         * namespace.cs (Namespace.DefineName): New public function.  This
21207         is called from DeclSpace's .ctor to add 
21208         (Namespace.Lookup): Include DeclSpaces in the lookup.
21209
21210         * class.cs (Operator): Derive from MemberBase, not MemberCore.
21211
21212         * const.cs (Const): Derive from MemberBase, not MemberCore.     
21213
21214 2003-08-25  Martin Baulig  <martin@ximian.com>
21215
21216         * convert.cs (Convert.ExplicitReferenceConversion): When
21217         converting from an interface type to a class, unbox if the target
21218         type is a struct type.  Fixes #47822.
21219
21220 2003-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21221
21222         * typemanager.cs: fixed the values of MethodFlags. Closes #47855 and
21223         #47854.
21224
21225 2003-08-22  Martin Baulig  <martin@ximian.com>
21226
21227         * class.cs (TypeManager.DefineType): When defining a nested type,
21228         call DefineType() on our parent; fixes #47801.
21229
21230 2003-08-22  Martin Baulig  <martin@ximian.com>
21231
21232         * class.cs (MethodData.Define): While checking if a method is an
21233         interface implementation, improve the test a bit more to fix #47654.
21234
21235 2003-08-22  Martin Baulig  <martin@ximian.com>
21236
21237         * expression.cs (Probe.DoResolve): Check whether `expr' resolved
21238         correctly; fixes #47722.
21239
21240 2003-08-22  Martin Baulig  <martin@ximian.com>
21241
21242         * expression.cs (UnaryMutator.ResolveVariable): If the target is a
21243         LocalVariableReference, ensure it's not read-only.  Fixes #47536.
21244
21245         * statement.cs (Fixed.DoResolve): Make all variables read-only. 
21246
21247 2003-08-22  Martin Baulig  <martin@ximian.com>
21248
21249         * ecore.cs (FieldExpr.DoResolveLValue): Static read-only fields
21250         can only be assigned in static constructors.  Fixes #47161.
21251
21252 2003-08-22  Martin Baulig  <martin@ximian.com>
21253
21254         Rewrote and improved the flow analysis code.
21255
21256         * flowbranching.cs (FlowBranching): Make this class abstract.
21257         (FlowBranching.CreateBranching): New static function to create a
21258         new flow branching.
21259         (FlowBranchingBlock, FlowBranchingException): New classes.
21260         (FlowBranching.UsageVector.Type): New public readonly field.
21261         (FlowBranching.UsageVector.Breaks): Removed the setter.
21262         (FlowBranching.UsageVector.Returns): Removed the setter.
21263         (FlowBranching.UsageVector): Added Break(), Return(),
21264         NeverReachable() and Throw() methods to modify the reachability.
21265         (FlowBranching.UsageVector.MergeChildren): Removed, this is now
21266         done by FlowBranching.Merge().
21267         (FlowBranching.UsageVector.MergeChild): New method; merges the
21268         merge result into the current vector.
21269         (FlowBranching.Merge): New abstract method to merge a branching.
21270
21271 2003-08-12  Martin Baulig  <martin@ximian.com>
21272
21273         * expression.cs (Indirection.CacheTemporaries): Create the
21274         LocalTemporary with the pointer type, not its element type.
21275
21276 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21277
21278         * cs-parser.jay: FIRST_KEYWORD, LAST_KEYWORD: used to know if a
21279         token was a keyword or not.
21280
21281         Add `error' options where an IDENTIFIER was expected;  Provide
21282         CheckToken and CheckIdentifierToken convenience error reporting
21283         functions. 
21284
21285         Do not use `DeclSpace.Namespace', use `DeclSpace.NamespaceEntry'.
21286
21287         * decl.cs: Rename `NamespaceEntry Namespace' public field into
21288         NameSpaceEntry NameSpaceEntry.
21289
21290         (LookupInterfaceOrClass): Avoid creating a full qualified name
21291         from namespace and name: avoid doing lookups when we know the
21292         namespace is non-existant.   Use new Tree.LookupByNamespace which
21293         looks up DeclSpaces based on their namespace, name pair.
21294
21295         * driver.cs: Provide a new `parser verbose' to display the
21296         exception thrown during parsing.  This is turned off by default
21297         now, so the output of a failure from mcs is more graceful.
21298
21299         * namespace.cs: Track all the namespaces defined in a hashtable
21300         for quick lookup.
21301
21302         (IsNamespace): New method
21303
21304 2003-08-09  Miguel de Icaza  <miguel@ximian.com>
21305
21306         * namespace.cs: Remove redundant call;  Avoid using MakeFQN when
21307         we know that we need to concatenate (full typename can never be
21308         null). 
21309
21310         * class.cs: ditto.
21311
21312         * statement.cs: Use a bitfield;  Do not initialize to null things
21313         which are done by the constructor by default.
21314
21315         * cs-parser.jay: bug fix, parameter was 4, not 3.
21316
21317         * expression.cs: Just use the property;
21318
21319         * statement.cs: No need for GetVariableInfo method.
21320
21321 2003-08-08  Martin Baulig  <martin@ximian.com>
21322
21323         * flowanalysis.cs (FlowReturns): This is now nested in the
21324         `FlowBranching' class.
21325         (MyBitVector): Moved this here from statement.cs.
21326         (FlowBranching.SiblingType): New enum type.
21327         (FlowBranching.CreateSibling): Added `SiblingType' argument.
21328
21329 2003-08-07  Martin Baulig  <martin@ximian.com>
21330
21331         * flowanalysis.cs (FlowBranchingType): This is now nested in the
21332         `FlowBranching' class and called `BranchingType'.
21333
21334 2003-08-07  Martin Baulig  <martin@ximian.com>
21335
21336         * flowanalysis.cs: Moved all the control flow analysis code into
21337         its own file.
21338
21339 2003-08-07  Martin Baulig  <martin@ximian.com>
21340
21341         * assign.cs (Assign.DoResolve): `target' must either be an
21342         IAssignMethod or an EventAccess; report a CS0131 otherwise.  Fixes
21343         #37319.
21344
21345 2003-08-07  Miguel de Icaza  <miguel@ximian.com>
21346
21347         * expression.cs (BinaryMethod): This kind of expression is created by the
21348         Binary class if it determines that the operator has to be handled
21349         by a method.
21350
21351         (BinaryDelegate): This kind of expression is created if we are
21352         dealing with a + or - operator on delegates.
21353
21354         (Binary): remove method, argumetns, and DelegateOperator: when
21355         dealing with methods, 
21356
21357         * ecore.cs (EventExpr.EmitAddOrRemove): Update to new layout.
21358
21359         * statement.cs (Block): use bitfields for the three extra booleans
21360         we had in use.   Remove unused topblock parameter.
21361
21362         * codegen.cs: Remove unecessary argument to Block.EmitTopBlock
21363
21364         * assign.cs: Drop extra unneeded tests.
21365
21366 2003-08-06  Miguel de Icaza  <miguel@ximian.com>
21367
21368         * iterators.cs (Mapvariable): provide a mechanism to use prefixes.
21369
21370         * statement.cs (Foreach): Use VariableStorage instead of
21371         LocalBuilders.   
21372
21373         * codegen.cs (VariableStorage): New class used by clients that
21374         require a variable stored: locals or fields for variables that
21375         need to live across yield.
21376
21377         Maybe provide a convenience api for EmitThis+EmitLoad?
21378
21379         (GetTemporaryLocal, FreeTemporaryLocal): Recycle
21380         these bad boys.
21381
21382 2003-08-05  Miguel de Icaza  <miguel@ximian.com>
21383
21384         * codegen.cs (RemapLocal, RemapLocalLValue, RemapParameter,
21385         RemapParameterLValue): New methods that are used to turn a
21386         precomputed FieldInfo into an expression like this:
21387
21388                 instance.FieldInfo
21389
21390         The idea is to use this instead of making LocalVariableReference
21391         have more than one meaning.
21392
21393         * cs-parser.jay: Add error production to BASE.
21394
21395         * ecore.cs: Deal with TypeManager.GetField returning null, which
21396         is now a valid return value.
21397
21398         (FieldExprNoAddress): New expression for Fields whose address can
21399         not be taken.
21400
21401         * expression.cs (LocalVariableReference): During the resolve
21402         phases, create new expressions if we are in a remapping context.
21403         Remove code that dealt with remapping here.
21404
21405         (ParameterReference): same.
21406
21407         (ProxyInstance): New expression, like the `This' expression, but
21408         it is born fully resolved.  We know what we are doing, so remove
21409         the errors that are targeted to user-provided uses of `this'.
21410
21411         * statement.cs (Foreach): our variable is now stored as an
21412         Expression;  During resolution, follow the protocol, dont just
21413         assume it will return this.
21414
21415 2003-08-06  Martin Baulig  <martin@ximian.com>
21416
21417         * support.cs (SeekableStreamReader.cs): New public class.
21418
21419         * cs-tokenizer.cs, cs-parser.jay, driver.cs: Use the new
21420         SeekableStreamReader instead of the normal StreamReader.
21421
21422 2003-08-04  Martin Baulig  <martin@ximian.com>
21423
21424         * cs-parser.jay (CLOSE_PARENS_CAST, CLOSE_PARENS_NO_CAST,
21425         CLOSE_PARENS_OPEN_PARENS, CLOSE_PARENS_MINUS): New tokens to
21426         deambiguate casts and delegate invocations.
21427         (parenthesized_expression): Use the new tokens to ensure this is
21428         not a cast of method invocation.
21429
21430         * cs-tokenizer.cs (is_punct): Return one of the new special tokens
21431         when reading a `)' and Deambiguate_CloseParens () was previously
21432         called.
21433
21434         * expression.cs (ParenthesizedExpression): New class.  This is
21435         just used for the CS0075 test.
21436         (Binary.DoResolve): Check for CS0075.   
21437
21438 2003-07-29  Ravi Pratap  <ravi@ximian.com>
21439
21440         * expression.cs (Invocation.MakeUnionSet): Patch from Lluis
21441         Sanchez : use TypeManager.ArrayContainsMethod instead of a direct
21442         reference comparison.
21443
21444         (TypeManager.ArrayContainsMethod): When we have a MethodInfo, also
21445         examine the ReturnType for equality - this is necessary in the
21446         cases of implicit and explicit operators whose signature also
21447         includes the return type.
21448
21449 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
21450
21451         * namespace.cs: Cache the result of the namespace computation,
21452         instead of computing it every time.
21453
21454 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
21455
21456         * decl.cs: Use a global arraylist that we reuse over invocations
21457         to avoid excesive memory consumption.  Reduces memory usage on an
21458         mcs compile by one meg (45 average).
21459
21460         * typemanager.cs (LookupTypeReflection): In .NET pointers are
21461         private, work around that.
21462
21463 2003-07-23  Miguel de Icaza  <miguel@ximian.com>
21464
21465         * literal.cs (IntLiteral): Define Zero and One static literals. 
21466
21467         * cs-parser.jay (integer_literal): use static literals to reduce
21468         memory usage for the most used literals (0, 1 and -1).  211kb
21469         reduced in memory usage.
21470
21471         Replace all calls to `new ArrayList' with `new
21472         ArrayList(4)' which is a good average number for most allocations,
21473         and also requires only 16 bytes of memory for its buffer by
21474         default. 
21475
21476         This reduced MCS memory usage in seven megabytes for the RSS after
21477         bootstrapping.
21478
21479 2003-07-28  Ravi Pratap  <ravi@ximian.com>
21480
21481         * expression.cs (Invocation.OverloadResolve): Fix the algorithm to
21482         handle params methods the correct way by forming only one
21483         applicable set with params and normal methods in them. Earlier we
21484         were looking at params methods only if we found no normal methods
21485         which was not the correct thing to do.
21486
21487         (Invocation.BetterFunction): Take separate arguments indicating
21488         when candidate and the best method are params methods in their
21489         expanded form.
21490
21491         This fixes bugs #43367 and #46199.
21492
21493         * attribute.cs: Documentation updates.
21494
21495         (CheckAttribute): Rename to CheckAttributeTarget.
21496         (GetValidPlaces): Rename to GetValidTargets.
21497
21498         * expression.cs (Invocation.IsParamsMethodApplicable): Fix trivial
21499         bug - use Convert.ImplicitConversion, not ImplicitUserConversion!
21500
21501         Fixes bug #44468.
21502
21503 2003-07-28  Martin Baulig  <martin@ximian.com>
21504
21505         * class.cs (TypeContainer.DefineMembers): Use the base type's full
21506         name when looking up the base class of a nested class.  Fixes #46977.
21507
21508 2003-07-26  Martin Baulig  <martin@ximian.com>
21509
21510         * expression.cs (Indexers.Indexer): New nested struct; contains
21511         getter, setter and the indexer's type.
21512         (Indexers.Properties): This is now an ArrayList of
21513         Indexers.Indexer's.
21514         (IndexerAccess.DoResolveLValue): Correctly set the type if the
21515         indexer doesn't have any getters.
21516
21517         * assign.cs (Assign.DoResolve): Also do the implicit conversions
21518         for embedded property and indexer assignments.
21519
21520 2003-07-26  Martin Baulig  <martin@ximian.com>
21521
21522         * cs-tokenizer.cs (Tokenizer.xtoken): Report a CS1040 if a
21523         preprocessor directive is not the first non-whitespace character
21524         on a line.
21525
21526 2003-07-26  Martin Baulig  <martin@ximian.com>
21527
21528         * namespace.cs (NamespaceEntry.Lookup): New method; rewrote the
21529         namespace parsing, follow the spec more closely.
21530
21531         * rootcontext.cs (RootContext.NamespaceLookup): Use the new
21532         NamespaceEntry.Lookup().
21533
21534 2003-07-25  Martin Baulig  <martin@ximian.com>
21535
21536         * MethodCore.cs (OverridesSomething): New public field; it's set
21537         from TypeContainer.DefineMembers if this method overrides
21538         something (which doesn't need to be a method).  Fix #39462.
21539
21540 2003-07-25  Ravi Pratap  <ravi@ximian.com>
21541
21542         * typemanager.cs (GetMembers): Ensure that the list of members is
21543         reversed. This keeps things in sync.
21544
21545         * attribute.cs (Attribute.CheckAttribute): Break as soon as we
21546         find an AttributeUsage attribute.
21547
21548         * expression.cs (Invocation.OverloadResolve): Perform the check
21549         which disallows Invoke to be directly called on a Delegate.
21550
21551         (Error_InvokeOnDelegate): Report error cs1533.
21552
21553 2003-07-25  Martin Baulig  <martin@ximian.com>
21554
21555         * expression.cs (Indexers.GetIndexersForType): Only look in the
21556         interface hierarchy if the requested type is already an
21557         interface.  Fixes #46788 while keeping #46502 fixed.
21558
21559 2003-07-25  Martin Baulig  <martin@ximian.com>
21560
21561         * class.cs (TypeContainer.DefineMembers): Check whether all
21562         readonly fields have been assigned and report warning CS0649 if
21563         not.
21564
21565         * statement.cs (LocalInfo.IsFixed): Always return true if this is
21566         a valuetype.
21567
21568 2003-07-24  Ravi Pratap  <ravi@ximian.com>
21569
21570         * decl.cs (MemberCache.AddMethods): Reverse the order of the array
21571         returned from GetMethods to make things consistent with the
21572         assumptions MCS makes about ordering of methods.
21573
21574         This should comprehensively fix bug #45127 and it does :-)
21575
21576         * ecore.cs (MethodGroupExpr.DeclaringType): Correct bug - the
21577         ordering is actually reverse.
21578
21579         * Clean up some debug messages I left lying around.
21580
21581         * interface.cs (Populate*): Get rid of code which emits attributes
21582         since the stage in which we emit attributes is the 'Emit' stage,
21583         not the define stage.
21584
21585         (Emit): Move attribute emission for interface members here.
21586
21587 2003-07-22  Ravi Pratap  <ravi@ximian.com>
21588
21589         * expression.cs (Invocation.OverloadResolve): Follow the spec more
21590         closely: we eliminate methods in base types when we have an
21591         applicable method in a top-level type.
21592
21593         Please see section 14.5.5.1 for an exact description of what goes
21594         on. 
21595
21596         This fixes bug #45127 and a host of other related to corlib compilation.
21597
21598         * ecore.cs (MethodGroupExpr.DeclaringType): The element in the
21599         array is the method corresponding to the top-level type (this is
21600         because of the changes made to icall.c) so we change this
21601         accordingly.
21602
21603         (MethodGroupExpr.Name): This too.
21604
21605         * typemanager.cs (GetElementType): New method which does the right
21606         thing when compiling corlib. 
21607
21608         * everywhere: Make use of the above in the relevant places.
21609
21610 2003-07-22  Martin Baulig  <martin@ximian.com>
21611
21612         * cs-parser.jay (invocation_expression): Moved
21613         `OPEN_PARENS expression CLOSE_PARENS unary_expression' here from
21614         `cast_expression', but create a InvocationOrCast which later
21615         resolves to either an Invocation or a Cast.
21616
21617         * ecore.cs (ExpressionStatement.ResolveStatement): New virtual
21618         method; call this before EmitStatement() to make sure that this
21619         expression can be used as a statement.
21620
21621         * expression.cs (InvocationOrCast): New class; resolves to either
21622         an Invocation or a Cast.
21623
21624         * statement.cs (StatementExpression): Call ResolveStatement() on
21625         the ExpressionStatement before emitting it.
21626
21627 2003-07-21  Martin Baulig  <martin@ximian.com>
21628
21629         * expression.cs (Invocation.VerifyArgumentsCompat): Check whether
21630         `ref' and `out' attributes match; fixes #46220.
21631         (MemberAccess.ResolveMemberAccess): You can't reference a type
21632         through an expression; fixes #33180.
21633         (Indexers.GetIndexersForType): Don't return the indexers from
21634         interfaces the class implements; fixes #46502.
21635
21636 2003-07-21  Martin Baulig  <martin@ximian.com>
21637
21638         * class.cs (TypeContainer.CheckPairedOperators): Added CS0660 and
21639         CS0661 checks; fixes bug #30442.
21640
21641 2003-07-21  Martin Baulig  <martin@ximian.com>
21642
21643         * decl.cs (AdditionResult): Added `Error'.
21644
21645         * enum.cs (AddEnumMember): Report a CS0076 if name is `value__'.
21646
21647         * typemanager.cs (TypeManager.ChangeType): Catch exceptions;
21648         makes cs0031.cs actually work.
21649
21650 2003-07-20  Martin Baulig  <martin@ximian.com>
21651
21652         * namespace.cs: Fixed that bug which caused a crash when compiling
21653         the debugger's GUI.
21654
21655 2003-07-20  Miguel de Icaza  <miguel@ximian.com>
21656
21657         * typemanager.cs (LookupTypeReflection): Never expose types which
21658         are NotPublic, NestedPrivate, NestedAssembly, or
21659         NestedFamANDAssem.  We used to return these, and later do a check
21660         that would report a meaningful error, but the problem is that we
21661         would not get the real match, if there was a name override.
21662
21663 2003-07-18  Miguel de Icaza  <miguel@ximian.com>
21664
21665         * namespace.cs (Namespace, Name): Do not compute the namespace
21666         name dynamically, compute it in the constructor.  This reduced
21667         memory usage by 1697 KB.
21668
21669         * driver.cs: Use --pause to pause at the end.
21670
21671 2003-07-17  Peter Williams  <peter@newton.cx>
21672
21673         * Makefile: Change the name of the test target so that it doesn't
21674         conflict with the recursive test target.
21675
21676 2003-07-17  Miguel de Icaza  <miguel@ximian.com>
21677
21678         * expression.cs (LocalVariableReference.Emit, EmitAssign,
21679         AddressOf): Do not use EmitThis, that was wrong, use the actual
21680         this pointer.
21681
21682 2003-07-15  Miguel de Icaza  <miguel@ximian.com>
21683
21684         * class.cs (MethodData.Define): While checking if a method is an
21685         interface implementation, improve the test: If we are not public
21686         (use new test here: use the computed MethodAttributes directly,
21687         instead of the parsed modifier flags) check if the `implementing'
21688         method comes from an interface or not.
21689
21690         * pending.cs (VerifyPendingMethods): Slightly better error
21691         message.
21692
21693         * makefile: add test target that does the mcs bootstrap.
21694
21695 2003-07-16  Ravi Pratap  <ravi@ximian.com>
21696
21697         * interface.cs (Define): Do nothing here since there are no
21698         members to populate etc. Move the attribute emission out of here
21699         since this was just totally the wrong place to put it. Attribute
21700         application happens during the 'Emit' phase, not in the 'Define'
21701         phase.
21702
21703         (Emit): Add this method and move the attribute emission here
21704
21705         * rootcontext.cs (EmitCode): Call the Emit method on interface
21706         types too.
21707
21708 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21709
21710         * expression.cs (OverloadResolve): Report error only if Location
21711         is not 'Null' which means that there was a probe going on.
21712
21713 2003-07-14  Martin Baulig  <martin@ximian.com>
21714
21715         * expression.cs (ConditionalLogicalOperator): New public class to
21716         implement user defined conditional logical operators.
21717         This is section 14.11.2 in the spec and bug #40505.
21718
21719 2003-07-14  Martin Baulig  <martin@ximian.com>
21720
21721         * ecore.cs (FieldExpr.DoResolveLValue): Fixed bug #46198.
21722
21723 2003-07-14  Martin Baulig  <martin@ximian.com>
21724
21725         * codegen.cs (EmitContext.InFixedInitializer): New public field.
21726
21727         * ecore.cs (IVariable.VerifyFixed): New interface method.
21728
21729         * expression.cs (Unary.ResolveOperator): When resolving the `&'
21730         operator, check whether the variable is actually fixed.  Fixes bug
21731         #36055.  Set a variable definitely assigned when taking its
21732         address as required by the spec.
21733
21734         * statement.cs (LocalInfo.IsFixed): New field.
21735         (LocalInfo.MakePinned): Set `IsFixed' to true.
21736
21737 2003-07-14  Ravi Pratap M  <ravi@ximian.com>
21738
21739         * attribute.cs (Attribute.Resolve): While doing a Member lookup
21740         for .ctors, ensure that we only ask for members declared in the
21741         attribute type (BindingFlags.DeclaredOnly).
21742
21743         Fixes bug #43632.
21744
21745         * expression.cs (Error_WrongNumArguments): Report error 1501
21746         correctly the way CSC does.
21747
21748 2003-07-13  Martin Baulig  <martin@ximian.com>
21749
21750         * expression.cs (MemberAccess.ResolveAsTypeStep): Try to do a type
21751         lookup on the fully qualified name, to make things like "X.X" work
21752         where "X.X" is a fully qualified type name, but we also have a
21753         namespace "X" in the using list.  Fixes #41975.
21754
21755 2003-07-13  Martin Baulig  <martin@ximian.com>
21756
21757         * assign.cs (Assign.GetEmbeddedAssign): New protected virtual
21758         function. If we're a CompoundAssign, we need to create an embedded
21759         CompoundAssign, not an embedded Assign.
21760         (Assign.DoResolve): Make this work for embedded CompoundAssign's.
21761         Fixes #45854.
21762
21763 2003-07-13  Martin Baulig  <martin@ximian.com>
21764
21765         * typemanager.cs (TypeManager.IsNestedChildOf): Make this actually
21766         work to fix bug #46088.
21767
21768 2003-07-13  Ravi Pratap <ravi@ximian.com>
21769
21770         * class.cs (Operator.Emit): Do not emit attributes here - it is
21771         taken care of by the Method class that we delegate too. This takes
21772         care of bug #45876.
21773
21774 2003-07-10  Martin Baulig  <martin@ximian.com>
21775
21776         * expression.cs (TypeOfVoid): New class.
21777         (TypeOf): Report a CS0673 if it's System.Void.  Fixes #42264.
21778
21779 2003-07-10  Martin Baulig  <martin@ximian.com>
21780
21781         * class.cs (MethodCore.DoDefineParameters): Added CS0225 check;
21782         bug #35957.
21783
21784 2003-07-10  Martin Baulig  <martin@ximian.com>
21785
21786         * rootcontext.cs (RootContext.NamespaceLookup): Take a DeclSpace,
21787         not a NamespaceEntry, so we can use DeclSpace.CheckAccessLevel().
21788
21789         * decl.cs (DeclSpace.FindType): Use DeclSpace.CheckAccessLevel().
21790
21791         * typemanager.cs (TypeManager.IsAccessibleFrom): Removed.
21792
21793 2003-07-10  Martin Baulig  <martin@ximian.com>
21794
21795         * expression.cs (ArrayCreation): Don't use a byte blob for arrays
21796         of decimal.  Fixes #42850.
21797
21798         NOTE: I also fixed the created byte blob, but this doesn't work on
21799         the MS runtime and csc never produces any byte blobs for decimal
21800         arrays.
21801
21802 2003-07-10  Martin Baulig  <martin@ximian.com>
21803
21804         * statement.cs (StructInfo.GetStructInfo): Catch deep cycles in
21805         structs; fixes #32068.
21806         (Block.AddChildVariableNames): Fixed #44302.
21807
21808 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21809
21810         * namespace.cs: fixed compilation with csc. It's bugzilla #44302.
21811
21812 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21813
21814         * attribute.cs: And this test is onger needed.
21815
21816 2003-07-08  Martin Baulig  <martin@ximian.com>
21817
21818         * rootcontext.cs (RootContext.NamespaceLookup): Ignore
21819         inaccessible types.  Fixes #36313.
21820
21821         * decl.cs (DeclSpace.FindType): Ignore inaccessible types.
21822
21823         * namespace.cs (NamespaceEntry): Create implicit entries for all
21824         namespaces; ie. if we have `namespace N1.N2.N3 { ... }', we create
21825         implicit entries for N1.N2 and N1.
21826
21827 2003-07-08  Martin Baulig  <martin@ximian.com>
21828
21829         Rewrote the handling of namespaces to fix a lot of the issues
21830         wrt. `using' aliases etc.
21831
21832         * namespace.cs (Namespace): Splitted this class into a
21833         per-assembly `Namespace' and a per-file `NamespaceEntry'.
21834
21835         * typemanager.cs (TypeManager.IsNamespace): Removed.
21836         (TypeManager.ComputeNamespaces): Only compute namespaces from
21837         loaded assemblies here, not the namespaces from the assembly we're
21838         currently compiling.
21839
21840 2003-07-08  Martin Baulig  <martin@ximian.com>
21841
21842         * rootcontext.cs, class.cs: Fixed the CS1530 reporting.
21843
21844 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21845
21846         * typemanager.cs: Reverted patch from Gonzalo, my previous patch
21847         already fixed it.  
21848
21849         I thought about the memory savings here, but LookupTypeReflection
21850         is used under already very constrained scenarios.  Compiling
21851         corlib or mcs only exposes one hit, so it would not really reduce
21852         any memory consumption.
21853
21854 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21855
21856         * typemanager.cs: fixes bug #45889 by only adding public types from
21857         other assemblies to the list of known types.
21858
21859 2003-07-07  Miguel de Icaza  <miguel@ximian.com>
21860
21861         * attribute.cs (Attribute.Resolve): Add call to CheckAccessLevel
21862         on the type we resolved.
21863
21864 2003-07-05  Martin Baulig  <martin@ximian.com>
21865
21866         * pending.cs (PendingImplementation.ParentImplements): Don't
21867         create the proxy if the parent is abstract.
21868
21869         * class.cs (TypeContainer.DefineIndexers): Process explicit
21870         interface implementations first.  Fixes #37714.
21871
21872 2003-07-04  Miguel de Icaza  <miguel@ximian.com>
21873
21874         * expression.cs (MemberAccess.ResolveMemberAccess): Events are
21875         defined recursively;  but since we modify the input parameters
21876         (left is set to `this' temporarily), we reset this value if the
21877         left_is_explicit is false, which gives the original semantics to
21878         the code.  
21879
21880         * literal.cs (NullPointer): new class used to represent a null
21881         literal in a pointer context.
21882
21883         * convert.cs (Convert.ImplicitReferenceConversion): Is the target
21884         type is a pointer, use a NullPointer object instead of a
21885         NullLiteral.   Closes 43687
21886
21887         (ExplicitConversion): Convert pointer values using
21888         the conv opcode to the proper type.
21889
21890         * ecore.cs (New): change ValueTypeVariable property into a method,
21891         that returns whether the valuetype is suitable for being used.
21892
21893         * expression.cs (Binary.DoNumericPromotions): Only return if we
21894         the int constant was a valid uint, and we can return both left and
21895         right as uints.  If not, we continue processing, to trigger the
21896         type conversion.  This fixes 39018.
21897
21898         * statement.cs (Block.EmitMeta): During constant resolution, set
21899         the CurrentBlock property on the emitcontext, so that we resolve
21900         constants propertly.
21901
21902 2003-07-02  Martin Baulig  <martin@ximian.com>
21903
21904         * codegen.cs (EmitContext.NeedExplicitReturn): New public variable.
21905         (EmitContext.EmitTopBlock): Emit an explicit return if it's set.
21906
21907         * statement.cs (Try.Resolve): Set ec.NeedExplicitReturn rather
21908         than emitting it here.
21909
21910         * statement.cs: Fixed some more flow analysis bugs.
21911
21912 2003-07-02  Martin Baulig  <martin@ximian.com>
21913
21914         * class.cs (MethodData.Define): When implementing interface
21915         methods, set Final unless we're Virtual.
21916
21917         * decl.cs (MemberCore.CheckMethodAgainstBase): Make the CS0506
21918         check work for interface methods.
21919
21920 2003-07-01  Martin Baulig  <martin@ximian.com>
21921
21922         * ecore.cs (EmitContext.This): Replaced this property with a
21923         GetThis() method which takes a Location argument.  This ensures
21924         that we get the correct error location for a CS0188.
21925
21926 2003-07-01  Miguel de Icaza  <miguel@ximian.com>
21927
21928         * ecore.cs: (Convert.ConvertIntLiteral): Add test for
21929         ImplicitStandardConversion.
21930
21931         * class.cs (TypeContainer.GetClassBases): Small bug fix for 45649.
21932
21933 2003-07-01  Zoltan Varga  <vargaz@freemail.hu>
21934
21935         * expression.cs (ResolveOperator): Fix Concat (string, string, string)
21936         optimization.
21937
21938 2003-06-30  Miguel de Icaza  <miguel@ximian.com>
21939
21940         * class.cs (Constructor.Define): Turn off initlocals for unsafe
21941         constructors.
21942
21943         (MethodData.Define): Turn off initlocals for unsafe methods.
21944
21945 2003-06-29  Miguel de Icaza  <miguel@ximian.com>
21946
21947         * decl.cs (DeclSpace.CheckAccessLevel): Make this routine
21948         complete;  Fixes #37521.
21949
21950         * delegate.cs: Use Modifiers.TypeAttr to compute the
21951         TypeAttributes, instead of rolling our own.  This makes the flags
21952         correct for the delegates.
21953
21954 2003-06-28  Miguel de Icaza  <miguel@ximian.com>
21955
21956         * class.cs (Constructor.Define): Set the private flag for static
21957         constructors as well.
21958
21959         * cs-parser.jay (statement_expression): Set the return value to
21960         null, to avoid a crash when we catch an error.
21961
21962 2003-06-24  Miguel de Icaza  <miguel@ximian.com>
21963
21964         * cs-parser.jay: Applied patch from Jackson that adds support for
21965         extern and unsafe modifiers to destructor declarations.
21966
21967         * expression.cs: Report error 21 if the user is trying to index a
21968         System.Array.
21969
21970         * driver.cs: Add an error message, suggested by the bug report.
21971
21972         * class.cs (TypeContainer.Emit): Only call EmitFieldInitializers
21973         if we do not have a ": this ()" constructor initializer.  Fixes 45149
21974
21975 2003-06-14  Miguel de Icaza  <miguel@ximian.com>
21976
21977         * namespace.cs: Add some information to reduce FAQs.
21978
21979 2003-06-13  Miguel de Icaza  <miguel@ximian.com>
21980
21981         * cfold.cs (BinaryFold): BitwiseAnd, BitwiseOr: handle other
21982         underlying enumeration types.  Fixes #43915.
21983
21984         * expression.cs: Treat ushort/short as legal values to be used in
21985         bitwise operations.
21986
21987 Wed Jun 4 13:19:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
21988
21989         * delegate.cs: transfer custom attributes for paramenters from
21990         the delegate declaration to Invoke and BeginInvoke.
21991
21992 Tue Jun 3 11:11:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21993
21994         * attribute.cs: handle custom marshalers and emit marshal info
21995         for fields, too.
21996
21997 2003-05-28  Hector E. Gomez Morales  <hgomez_36@flashmail.com>
21998
21999         * makefile.gnu: Added anonymous.cs to the compiler sources.
22000
22001 2003-05-28  Miguel de Icaza  <miguel@ximian.com>
22002
22003         * iterators.cs: Change the name of the proxy class to include two
22004         underscores.
22005
22006         * cs-parser.jay: Update grammar to include anonymous methods.
22007
22008         * anonymous.cs: new file.
22009
22010 2003-05-27  Miguel de Icaza  <miguel@ximian.com>
22011
22012         * class.cs (Field.Define): Add missing test for pointers and
22013         safety. 
22014
22015 2003-05-27  Ravi Pratap  <ravi@ximian.com>
22016
22017         * expression.cs (ArrayAccess.GetStoreOpCode): For System.IntPtr,
22018         we use the stobj opcode.
22019
22020         (ArrayCreation.EmitDynamicInitializers): Revert Miguel's patch
22021         since it wasn't the correct fix. 
22022
22023         It still is puzzling that we are required to use stobj for IntPtr
22024         which seems to be a ValueType.
22025
22026 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
22027
22028         * ecore.cs (SimpleName.SimpleNameResolve): Consider using aliases
22029         during regular simple name resolution.   Now, the trick is that
22030         instead of returning for processing the simplename, we do a
22031         TypeManager.LookupType (ie, a rooted lookup as opposed to a
22032         contextual lookup type).   If a match is found, return that, if
22033         not, return for further composition.
22034
22035         This fixes long-standing 30485.
22036
22037         * expression.cs (ArrayCreation.EmitDynamicInitializers): When
22038         using the address to initialize an object, do an Stobj instead of
22039         using the regular Stelem.
22040
22041         (IndexerAccess.Emit, IndexerAccess.EmitAssign):
22042         Pass `is_base_indexer' to Invocation.EmitCall instead of false.
22043         Because if we are a BaseIndexerAccess that value will be true.
22044         Fixes 43643.
22045
22046         * statement.cs (GotoCase.Resolve): Return after reporting an
22047         error, do not attempt to continue. 
22048
22049         * expression.cs (PointerArithmetic.Emit): If our operand is a
22050         long, convert our constants to match the operand before
22051         multiplying.  Convert to I type before adding.   Fixes 43670.
22052
22053 2003-05-14  Ravi Pratap  <ravi@ximian.com>
22054
22055         * enum.cs (ImplicitConversionExists) : Rename to
22056         ImplicitEnumConversionExists to remove ambiguity. 
22057
22058         * ecore.cs (NullCast): New type of cast expression class which
22059         basically is very similar to EmptyCast with the difference being
22060         it still is a constant since it is used only to cast a null to
22061         something else
22062         (eg. (string) null)
22063
22064         * convert.cs (ImplicitReferenceConversion): When casting a null
22065         literal, we return a NullCast.
22066
22067         * literal.cs (NullLiteralTyped): Remove - I don't see why this
22068         should be around anymore.
22069
22070         The renaming (reported was slightly wrong). Corrections:
22071
22072         ConvertImplicitStandard -> ImplicitConversionStandard
22073         ConvertExplicitStandard -> ExplicitConversionStandard
22074
22075         * expression.cs (StaticCallExpr.MakeSimpleCall): Resolve arguments
22076         before passing them in !
22077
22078         * convert.cs (ImplicitConversionStandard): When comparing for
22079         equal expr and target types, ensure that expr is not a
22080         NullLiteral.
22081
22082         In general, we must not be checking (expr_type ==
22083         target_type) in the top level conversion methods
22084         (ImplicitConversion, ExplicitConversion etc). This checking is
22085         done in the methods that they delegate to.
22086
22087 2003-05-20  Miguel de Icaza  <miguel@ximian.com>
22088
22089         * convert.cs: Move Error_CannotConvertType,
22090         ImplicitReferenceConversion, ImplicitReferenceConversionExists,
22091         ImplicitNumericConversion, ImplicitConversionExists,
22092         ImplicitUserConversionExists, StandardConversionExists,
22093         FindMostEncompassedType, FindMostSpecificSource,
22094         FindMostSpecificTarget, ImplicitUserConversion,
22095         ExplicitUserConversion, GetConversionOperators,
22096         UserDefinedConversion, ConvertImplicit, ConvertImplicitStandard,
22097         TryImplicitIntConversion, Error_CannotConvertImplicit,
22098         ConvertImplicitRequired, ConvertNumericExplicit,
22099         ExplicitReferenceConversionExists, ConvertReferenceExplicit,
22100         ConvertExplicit, ConvertExplicitStandard from the ecore.cs into
22101         its own file.
22102
22103         Perform the following renames:
22104
22105         StandardConversionExists -> ImplicitStandardConversionExists
22106         ConvertImplicit -> ImplicitConversion
22107         ConvertImplicitStandard -> ImplicitStandardConversion
22108         TryImplicitIntConversion -> ImplicitIntConversion
22109         ConvertImplicitRequired -> ImplicitConversionRequired
22110         ConvertNumericExplicit -> ExplicitNumericConversion
22111         ConvertReferenceExplicit -> ExplicitReferenceConversion
22112         ConvertExplicit -> ExplicitConversion
22113         ConvertExplicitStandard -> ExplicitStandardConversion
22114
22115 2003-05-19  Martin Baulig  <martin@ximian.com>
22116
22117         * statement.cs (TypeInfo.StructInfo): Made this type protected.
22118         (TypeInfo): Added support for structs having structs as fields.
22119
22120         * ecore.cs (FieldExpr): Implement IVariable.
22121         (FieldExpr.DoResolve): Call VariableInfo.GetSubStruct() to get the
22122         VariableInfo for the field.
22123
22124 2003-05-18  Martin Baulig  <martin@ximian.com>
22125
22126         * expression.cs (This.DoResolve): Report a CS0027 if we're
22127         emitting a field initializer.
22128
22129 2003-05-18  Martin Baulig  <martin@ximian.com>
22130
22131         * expression.cs (This.ResolveBase): New public function.
22132         (This.DoResolve): Check for CS0188.
22133
22134         * codegen.cs (EmitContext.This): Just call This.ResolveBase(), not
22135         This.Resolve().
22136
22137         * ecore.cs (MethodGroupExpr.DoResolve): Set the
22138         `instance_expression' to null if we don't have any non-static
22139         methods.
22140
22141 2003-05-18  Martin Baulig  <martin@ximian.com>
22142
22143         Reworked the way how local variables and parameters are handled by
22144         the flow analysis code.
22145
22146         * statement.cs (TypeInfo, VariableMap): New public classes.
22147         (VariableInfo): New public class.  This is now responsible for
22148         checking whether a variable has been assigned.  It is used for
22149         parameters and local variables.
22150         (Block.EmitMeta): Take the InternalParameters as argument; compute
22151         the layout of the flow vectors here.
22152         (Block.LocalMap, Block.ParameterMap): New public properties.
22153         (FlowBranching): The .ctor doesn't get the InternalParameters
22154         anymore since Block.EmitMeta() now computes the layout of the flow
22155         vector.
22156         (MyStructInfo): This class is now known as `StructInfo' and nested
22157         in `TypeInfo'; we don't access this directly anymore.
22158
22159         * ecore.cs (IVariable): Added `VariableInfo VariableInfo'
22160         property and removed IsAssigned(), IsFieldAssigned(),
22161         SetAssigned() and SetFieldAssigned(); we now call them on the
22162         VariableInfo so we don't need to duplicate this code everywhere.
22163
22164         * expression.cs (ParameterReference): Added `Block block' argument
22165         to the .ctor.
22166         (LocalVariableReference, ParameterReference, This): The new
22167         VariableInfo class is now responsible for all the definite
22168         assignment stuff.
22169
22170         * codegen.cs (EmitContext.IsVariableAssigned, SetVariableAssigned,
22171         IsParameterAssigned, SetParameterAssigned): Removed.
22172
22173 2003-05-18  Martin Baulig  <martin@ximian.com>
22174
22175         * typemanager.cs (InitCoreTypes): Try calling
22176         SetCorlibTypeBuilders() with 4 args; if that fails, fall back to
22177         the 3-args-version.  Corlib now also needs our `void_type'.
22178         (GetMethod): Added overloaded version which takes an optional
22179         `bool report_errors' to allow lookups of optional methods.
22180
22181 2003-05-12  Martin Baulig  <martin@ximian.com>
22182
22183         * statement.cs (VariableInfo): Renamed to LocalInfo since it's
22184         only used for locals and not for parameters.
22185
22186 2003-05-12  Miguel de Icaza  <miguel@ximian.com>
22187
22188         * support.cs (InternalParameters.ParameterType): Return the
22189         ExternalType of the parameter.
22190
22191         * parameter.cs (Parameter.ExternalType): drop the two arguments,
22192         they were unused.
22193
22194 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
22195
22196         * class.cs (MethodData.Define): Do not set the `newslot' on
22197         interface members, if they are also flagged as "override".
22198
22199         * expression.cs (UnaryMutator.EmitCode): Simple workaround to emit
22200         better code for ++i and i++.  This only works for static fields
22201         and local variables.
22202
22203         * typemanager.cs (LookupDeclSpace): Add new method, sometimes we
22204         want to pull the DeclSpace out of the builder_to_declspace instead
22205         of the TypeBuilder (like in TypeContainer.FindMembers).
22206
22207         * class.cs (TypeContainer.FindMembers): Use LookupDeclSpace
22208         instead of LookupTypeContainer.  Fixes the crash on .NET for
22209         looking up interface members.
22210
22211         * const.cs: Create our own emit context during the Definition
22212         stage, so that constants are evaluated in the proper context, when
22213         a recursive definition happens.
22214
22215 2003-05-11  Martin Baulig  <martin@ximian.com>
22216
22217         * statement.cs (Block.CreateSwitchBlock): New method.  Creates a
22218         new block for a switch section.
22219         (Block.AddLabel, Block.LookupLabel): If we're a switch section, do
22220         the adding/lookup in the switch block.  Fixes #39828.
22221
22222 2003-05-09  Miguel de Icaza  <miguel@ximian.com>
22223
22224         * expression.cs (UnaryMutator.LoadOneAndEmitOp): Missing
22225         functionality: I needed to convert the data after I had performed
22226         the add/sub operation into the operands type size.
22227
22228         * ecore.cs (ImplicitReferenceConversion): When boxing an interface
22229         pass the type for the box operation, otherwise the resulting
22230         object would have been of type object.
22231
22232         (BoxedCast): Add constructor to specify the type to box as.
22233
22234 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
22235
22236         * iterators.cs: I was reusing the `count' variable inadvertently,
22237         take steps to not allow this to happen.
22238
22239 2003-05-06  Miguel de Icaza  <miguel@ximian.com>
22240
22241         * attribute.cs (Attribute.Resolve): Params attributes are encoded
22242         by creating an array at the point where the params starts and
22243         putting all those arguments there, then adjusting the size of the
22244         array.
22245
22246 2003-05-05  Miguel de Icaza  <miguel@ximian.com>
22247
22248         * expression.cs (New.AddressOf): Implement interface
22249         IMemoryLocation.  This is used when the `new' operator is used in
22250         the context of an invocation to a method on a value type.
22251
22252         See http://bugzilla.ximian.com/show_bug.cgi?id=#42390 for an
22253         example. 
22254
22255         * namespace.cs: Also check the using aliases here.
22256
22257         * driver.cs: Move the test for using validity after the types have
22258         been entered, so we do a single pass that also includes the using
22259         aliases. 
22260
22261         * statement.cs (Try.Resolve): Avoid crashing if there is a failure
22262         in the regular case.   CreateSiblingForFinally is doing extra
22263         error checking.
22264
22265         * attribute.cs (GetAttributeArgumentExpression): Store the result
22266         on an out value, and use the return value to indicate failure
22267         instead of using null (which is a valid return for Constant.GetValue).
22268
22269         * statement.cs: Perform the analysis flow for the increment
22270         portion after the statement, because this will be the real flow of
22271         execution.  Fixes #42385
22272
22273         * codegen.cs (EmitContext.EmitArgument,
22274         EmitContext.EmitStoreArgument): New helper functions when the
22275         RemapToProxy flag is set.
22276
22277         * expression.cs (ParameterReference.EmitLdarg): Expose this useful
22278         function.
22279
22280         Add support for remapping parameters. 
22281
22282         * iterators.cs: Propagate parameter values;  Store parameter
22283         values in the proxy classes.
22284
22285 2003-05-04  Miguel de Icaza  <miguel@ximian.com>
22286
22287         * ecore.cs (FieldExpr): Fix an obvious bug.  static fields do not
22288         need a proxy reference;  I do not know what I was thinking
22289
22290         * cs-parser.jay (constructor_initializer): catch another error,
22291         and display nice message.
22292
22293         (field_declaration): catch void field declaration
22294         to flag a better error. 
22295
22296         * class.cs (MemberBase.CheckBase): Report an error instead of a
22297         warning if a new protected member is declared in a struct. 
22298         (Field.Define): catch the error of readonly/volatile.
22299
22300         * ecore.cs (FieldExpr.EmitAssign): reuse the field lookup.
22301
22302         (FieldExpr.AddressOf): ditto.  Catch error where the address of a
22303         volatile variable is taken
22304
22305 2003-05-02  Miguel de Icaza  <miguel@ximian.com>
22306
22307         * statement.cs (Fixed.Resolve): Report an error if we are not in
22308         an unsafe context.
22309
22310 2003-05-01  Miguel de Icaza  <miguel@ximian.com>
22311
22312         * typemanager.cs: reuse the code that handles type clashes for
22313         delegates and enumerations.
22314
22315         * class.cs (Report28): Always report.
22316
22317         * expression.cs (EncodeAsAttribute): Allow nulls here.
22318
22319 2003-04-28  Miguel de Icaza  <miguel@ximian.com>
22320
22321         * attribute.cs (Attribute.GetAttributeArgumentExpression): Moved
22322         the functionality for testing whether an expression is valid for
22323         an attribute here.  Also handle the case of arrays of elements
22324         being stored. 
22325
22326         * expression.cs (ArrayCreation.EncodeAsAttribute): Add support for
22327         encoding a linear array into an array of objects that are suitable
22328         to be passed to an CustomAttributeBuilder.
22329
22330         * delegate.cs: Check unsafe types being used outside of an Unsafe context.
22331
22332         * ecore.cs: (FieldExpr): Handle field remapping here.
22333
22334         * iteratators.cs: Pass the instance variable (if the method is an
22335         instance method) to the constructors, so we can access the field
22336         variables on the class.
22337
22338         TODO: Test this with structs.  I think the THIS variable on
22339         structs might have to be a pointer, and not a refenrece
22340
22341 2003-04-27  Miguel de Icaza  <miguel@ximian.com>
22342
22343         * codegen.cs (EmitContext.Mapvariable): Adds a mechanism to map
22344         local variables to fields in a proxy class.
22345
22346         * iterators.cs (PopulateProxy): Rename our internal fields to
22347         <XXX>.  
22348         Create a <THIS> field if we are an instance method, so we can
22349         reference our parent container variables.
22350         (MapVariable): Called back from the EmitContext code to enter a
22351         new variable to field mapping into the proxy class (we just create
22352         a FieldBuilder).
22353
22354         * expression.cs
22355         (LocalVariableReference.{Emit,EmitAssign,AddressOf}): Add support
22356         for using the remapped locals to fields.
22357
22358         I placed the code here, because that gives the same semantics to
22359         local variables, and only changes the Emit code.
22360
22361         * statement.cs (Fixed.Resolve): it is not allowed to have fixed
22362         statements inside iterators.
22363         (VariableInfo): Add a FieldBuilder for the cases when we are
22364         remapping local variables to fields in a proxy class
22365
22366         * ecore.cs (SimpleNameResolve): Avoid testing two times for
22367         current_block != null.
22368
22369         * statement.cs (Swithc.SimpleSwitchEmit): Removed code that did
22370         not cope with strings, as it has been moved to the
22371         TableSwitchEmit.  Fixed bug in switch generation.
22372
22373         * expression.cs (New.DoResolve): Provide more context for the user
22374         when reporting an error.
22375
22376         * ecore.cs (Expression.LoadFromPtr): Use ldind_i when loading
22377         pointers. 
22378
22379         * expression.cs (MemberAccess.DoResolve): When we get a type back,
22380         check the permissions for it.  Note than in a type-resolution
22381         context the check was already present in DeclSpace.ResolveType,
22382         but was missing from the MemberAccess.
22383
22384         (ArrayCreation.CheckIndices): warn if the user has
22385         more nested levels of expressions, but there are no more
22386         dimensions specified.  Avoids crash on bug 41906.
22387
22388 2003-04-26  Miguel de Icaza  <miguel@ximian.com>
22389
22390         * statement.cs (Block): replace Implicit bool, for a generic
22391         flags.   
22392         New flag: `Unchecked'.  This is used during the EmitMeta phase
22393         (which is out-of-line with the regular Resolve/Emit process for a
22394         statement, as this is done ahead of time, but still gets a chance
22395         to call constant resolve).
22396
22397         (Block.Flags): new enum for adding a new flag.
22398
22399         (Block.EmitMeta): track the state of unchecked.
22400
22401         (Unchecked): Set the "UnChecked" flags on any blocks we enclose,
22402         to enable constant resolution to work there as well.
22403
22404 2003-04-22  Miguel de Icaza  <miguel@ximian.com>
22405
22406         * typemanager.cs (ienumerable_type): Also look up
22407         System.Collections.IEnumerable. 
22408
22409 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
22410
22411         TODO: Test more than one conditional per method.
22412
22413         * class.cs (Indexer.Define): Report the location where the user is
22414         referencing the unsupported feature.
22415
22416         (MethodData): Overload the use of `conditionals' to
22417         minimize the creation of needless ArrayLists.   This saves roughly
22418         212kb on my machine.
22419
22420         (Method): Implement the new IIteratorContainer interface.
22421         (Method.SetYields): Implement the method by setting the ModFlags
22422         to contain METHOD_YIELDS.
22423
22424         * expression.cs (Unary.ResolveOperator): Use expr_type, not Expr,
22425         which just got set to null.
22426
22427         * iterators.cs: New file.
22428
22429         (Yield, YieldBreak): New statements.
22430
22431         * statement.cs (Return.Resolve): Flag an error if we are used in
22432         an iterator method.
22433
22434         * codegen.cs (InIterator): New flag set if the code is being
22435         compiled in an iterator method.
22436
22437         * modifiers.cs: New flag METHOD_YIELDS.  This modifier is an
22438         internal modifier, and we just use it to avoid adding extra
22439         fields, as this is seldom used.  
22440
22441         * cs-parser.jay: Add yield_statement (yield and yield break).
22442
22443         * driver.cs: New flag -v2 to turn on version 2 features. 
22444
22445         * cs-tokenizer.cs (Tokenizer): Add yield and __yield to the
22446         hashtable when v2 is enabled.
22447
22448 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
22449
22450         * typemanager.cs (TypeManager.NamespaceClash): Use to check if
22451         there is already a namespace defined with this name.
22452
22453         (TypeManager.InitCoreTypes): Remove the temporary workaround, as
22454         people upgraded their corlibs.
22455
22456         (TypeManager.CoreLookupType): Use LookupTypeDirect, as we
22457         always use fully qualified types, no need to use the compiler
22458         front end.
22459
22460         (TypeManager.IsNamespace): Use binarysearch.
22461
22462         * class.cs (AddClass, AddStruct, AddInterface, AddEvent,
22463         AddDelegate): I did not quite use the new IsValid API properly: I
22464         have to pass the short-name and the fullname.  I was passing only
22465         the basename instead of the fullname sometimes. 
22466
22467         (TypeContainer.DefineType): call NamespaceClash.
22468
22469         * interface.cs (Interface.DefineType): use NamespaceClash before
22470         defining the type.
22471
22472         * delegate.cs (Delegate.DefineType): use NamespaceClash before
22473         defining the type.
22474
22475         * enum.cs: (Enum.DefineType): use NamespaceClash before
22476         defining the type.
22477
22478         * typemanager.cs (: 3-line patch that gives us some tasty 11%
22479         speed increase.  First, use the negative_hits cache when we get a
22480         negative.  Second, add the type with its full original name
22481         instead of the new . and + encoded name (reflection uses + to
22482         separate type from a nested type).  Use LookupTypeReflection
22483         directly which bypasses the type->name hashtable (that we already
22484         know does not contain the type.
22485
22486         * decl.cs (DeclSpace.ResolveTypeExpr): track the
22487         location/container type. 
22488
22489         * driver.cs: When passing utf8, use directly the UTF8Encoding.
22490
22491 2003-04-19  Miguel de Icaza  <miguel@ximian.com>
22492
22493         * decl.cs (ResolveTypeExpr): Mirror check acess here too.
22494
22495         * delegate.cs (NewDelegate.Resolve): Test whether an instance
22496         method is being referenced in the method group from a static
22497         context, and report error 120 if so.
22498
22499         * expression.cs, ecore.cs (Error_UnexpectedKind): New name for
22500         Error118. 
22501
22502         * typemanager.cs: Add intermediate namespaces (if a namespace A.B
22503         is created, we create the A namespace).
22504
22505         * cs-parser.jay: A namespace also introduces a DeclarationFound.
22506         Fixes #41591
22507
22508 2003-04-18  Miguel de Icaza  <miguel@ximian.com>
22509
22510         * typemanager.cs (GetReferenceType, GetPointerType): In .NET each
22511         invocation to ModuleBuilder.GetType with the same values will
22512         return a new type instance, so we need to cache its return
22513         values. 
22514
22515         * expression.cs (Binary.ResolveOperator): Only allow the compare
22516         operators on enums if they are of the same type.
22517
22518         * ecore.cs (Expression.ImplicitReferenceConversion): handle target
22519         types of ValueType on their own case.  Before we were giving them
22520         the same treatment as objects.
22521
22522         * decl.cs (DeclSpace.IsValid): IsValid takes the short name and
22523         fullname.  Short name is used to compare against container name.
22524         Fullname is used to check against defined namespace names.
22525
22526         * class.cs (AddProperty, AddField, AddClass, AddStruct, AddEnum,
22527         AddDelegate, AddEvent): Pass new parameter to DeclSpace.IsValid
22528
22529         (Method.CheckBase): Call parent.
22530         (MemberBase.CheckBase): Check for protected members on sealed
22531         classes.
22532         (PropertyBase.CheckBase): Call parent.
22533         (Field.Define): Call parent.
22534
22535         * report.cs: Negative error codes are now mapped to 8000 - code,
22536         so that the display is render more nicely.
22537
22538         * typemanager.cs: Do not use try/catch, instead report a regular
22539         error. 
22540
22541         (GetPointerType, GetReferenceType): These methods provide
22542         mechanisms to obtain the T* and T& from a T.  We had the code
22543         previously scattered around the code base, and it also used
22544         TypeManager.LookupType that would go through plenty of caches.
22545         This one goes directly to the type source.
22546
22547         In some places we did the Type.GetType followed by
22548         ModuleBuilder.GetType, but not in others, so this unifies the
22549         processing as well.
22550
22551         * namespace.cs (VerifyUsing): Perform a non-lazy approach to using
22552         statements now that we have namespace information.
22553
22554         * typemanager.cs (IsNamespace): New method, returns whether the
22555         string presented is a namespace or not.
22556
22557         (ComputeNamespaces): New public entry point, computes the list of
22558         available namespaces, using the GetNamespaces API call in Mono, or
22559         the slower version in MS.NET.   
22560
22561         Now before we start the semantic analysis phase, we have a
22562         complete list of namespaces including everything that the user has
22563         provided.
22564
22565         Deleted old code to cache namespaces in .nsc files.
22566
22567 2003-04-17  Miguel de Icaza  <miguel@ximian.com>
22568
22569         * class.cs: (TypeContainer.DefineDefaultConstructor): Use the
22570         class/struct location definition Location for the implicit
22571         constructor location.
22572
22573         (Operator.Define): Use the location of the operator for the
22574         implicit Method definition.
22575
22576         (Constructor.Emit): use the constructor location for the implicit
22577         base initializer constructor.
22578
22579         * ecore.cs: Remove ITypeExpression.  This interface is now gone,
22580         and the Expression class now contains two new methods:
22581
22582         ResolveAsTypeStep and ResolveAsTypeTerminal.  This is used to
22583         isolate type lookup from the rest of the resolution process.
22584
22585         Since we use Expressions to hold type definitions due to the way
22586         we parse the input we have historically overloaded Resolve to
22587         perform the Type lookups if a special flag is passed.  Now this is
22588         eliminated and two methods take their place. 
22589
22590         The differences in the two methods between xStep and xTerminal is
22591         that xStep is involved in our current lookup system that uses
22592         SimpleNames to compose a name, while xTerminal is used just to
22593         catch the case where the simplename lookup failed.
22594
22595 2003-04-16  Miguel de Icaza  <miguel@ximian.com>
22596
22597         * expression.cs (ResolveMemberAccess): Remove redundant code.
22598         TypeExpr expressions are always born fully resolved.
22599
22600         * interface.cs (PopulateMethod): Do not lookup the types twice.
22601         We were doing it once during SemanticAnalysis and once during
22602         PopulateMethod.
22603
22604         * cs-parser.jay: Due to our hack in the grammar, things like A.B[]
22605         in local variable type definitions, were being returned as a
22606         SimpleName (we decomposed everything into a string), that is
22607         because primary_expression was being used instead of a type in the
22608         grammar (reduce/reduce conflicts).
22609
22610         The part that was wrong is that we converted the expression into a
22611         string (an oversimplification in one hand, compounded with primary
22612         expressions doing string concatenation).
22613
22614         So things like:
22615
22616         A.B.C [] x;
22617
22618         Would return "A.B.C[]" as a SimpleName.  This stopped things like
22619         using clauses from working on this particular context.  And a type
22620         was being matched directly against "A.B.C[]".
22621
22622         We now use the correct approach, and allow for ComposedCast to be
22623         part of the unary expression.  So the "A.B.C []" become a composed
22624         cast of "A.B.C" (as a nested group of MemberAccess with a
22625         SimpleName at the end) plus the rank composition "[]". 
22626
22627         Also fixes 35567
22628
22629 2003-04-10  Miguel de Icaza  <miguel@ximian.com>
22630
22631         * decl.cs (CheckAccessLevel): Implement the NestedPrivate rules
22632         for the access level checking.
22633
22634         * class.cs: Cosmetic changes.  Renamed `TypeContainer parent' to
22635         `TypeContainer container', because I kept getting confused when I
22636         was debugging this code.
22637
22638         * expression.cs (Indexers): Instead of tracking getters/setters,
22639         we now track them in parallel.  We create one arraylist less, but
22640         most importantly it is possible now for the LValue code to find a
22641         matching get for a set.
22642
22643         (IndexerAccess.DoResolveLValue): Update the code.
22644         GetIndexersForType has been modified already to extract all the
22645         indexers from a type.  The code assumed it did not.
22646
22647         Also make the code set the correct return type for the indexer.
22648         This was fixed a long time ago for properties, but was missing for
22649         indexers.  It used to be void_type.
22650
22651         (Binary.Emit): Test first for doubles instead of
22652         floats, as they are more common.
22653
22654         (Binary.EmitBranchable): Use the .un version of the branch opcodes
22655         when dealing with floats and the <=, >= operators.  This fixes bug
22656         #39314 
22657
22658         * statement.cs (Foreach.EmitArrayForeach): bug fix: The code used
22659         to load the array value by emitting a load on the foreach variable
22660         type.  This was incorrect.  
22661
22662         We now emit the code to load an element using the the array
22663         variable type, and then we emit the conversion operator.
22664
22665         Fixed #40176
22666
22667 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22668
22669         * attribute.cs: Avoid allocation of ArrayLists in the common case.
22670
22671 2003-04-09  Miguel de Icaza  <miguel@ximian.com>
22672
22673         * class.cs (MethodSignature.InheritableMemberSignatureCompare):
22674         test for protection before we test for signatures. 
22675
22676         (MethodSignature.ToString): implement.
22677
22678         * expression.cs (Unary.TryReduceNegative): Add missing minus sign
22679         to the case where we reduced into a LongConstant.
22680
22681         * decl.cs (CheckAccessLevel): If the type is an array, we can not
22682         depend on whether the information is acurrate, because the
22683         Microsoft runtime will always claim that the array type is public,
22684         regardless of the real state.
22685
22686         If the type is a pointer, another problem happens: the type is
22687         reported as non-public in Microsoft.  
22688
22689         In both cases we have to call CheckAccessLevel recursively with
22690         the underlying type as the argument to be tested.
22691
22692 2003-04-08  Miguel de Icaza  <miguel@ximian.com>
22693
22694         * assign.cs (Assign.Emit): If we are dealing with a compound
22695         assignment expression, we should use the code path that stores the
22696         intermediate result in a temporary value.  This fixes #40903.
22697
22698         *expression.cs (Indirection.ToString): Provide ToString method for
22699         debugging. 
22700
22701 2003-04-08  Zoltan Varga  <vargaz@freemail.hu>
22702
22703         * class.cs: Null out fields holding references to Block objects so
22704         they can be garbage collected.
22705
22706         * expression.cs (OverloadResolve): Remove unused local.
22707
22708 2003-04-07  Martin Baulig  <martin@ximian.com>
22709
22710         * codegen.cs (EmitContext.CurrentFile): New public field.
22711         (EmitContext.Mark): Use the CurrentFile to check whether the
22712         location is in the correct file.
22713         (EmitContext.EmitTopBlock): Initialize CurrentFile here.
22714
22715 2003-04-07  Martin Baulig  <martin@ximian.com>
22716
22717         * ecore.cs (Expression.ResolveBoolean): Don't call ec.Mark().
22718
22719         * codegen.cs (EmitContext.EmitTopBlock): Don't call Mark() on the
22720         location.  [FIXME: The location argument which gets passed to this
22721         method is sometimes wrong!]
22722
22723 2003-04-07  Nick Drochak <ndrochak@gol.com>
22724
22725         * codegen.cs: Be more verbose when we can't find the symbol writer dll.
22726
22727 2003-04-07  Miguel de Icaza  <miguel@ximian.com>
22728
22729         * expression.cs (Indirection.EmitAssign): We were using the
22730         temporary, but returning immediately instead of continuing the
22731         EmitAssing flow.
22732
22733 2003-04-06  Martin Baulig  <martin@ximian.com>
22734
22735         * ecore.cs (SimpleName.SimpleNameResolve): Don't report an error
22736         if it's a nested child, but also deriving from the outer class.
22737         See test 190.cs.
22738
22739         * typemanager.cs (IsNestedChildOf): Make this work if it's a
22740         nested child, but also deriving from the outer class.  See
22741         test-190.cs.
22742         (FilterWithClosure): We may access private members of the outer
22743         class if we're a nested child and deriving from the outer class.
22744         (RealMemberLookup): Only set `closure_private_ok' if the
22745         `original_bf' contained BindingFlags.NonPublic.
22746
22747 2003-04-05  Martin Baulig  <martin@ximian.com>
22748
22749         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #40670.
22750
22751 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
22752
22753         * class.cs (Event.Define): Do not allow abstract events to have
22754         initializers. 
22755
22756 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
22757
22758         * cs-parser.jay: Add error productions for ADD/REMOVE missing a
22759         block in event declarations.
22760
22761         * ecore.cs (FieldExpr.AddressOf): If our instance expression is a
22762         value type, get its address.
22763
22764         * expression.cs (Is.Emit): For action `LeaveOnStack' we were
22765         leaving a class on the stack instead of a boolean value (int
22766         0/1).  Change the code so we compare against null, and then the
22767         result against zero.
22768
22769         * class.cs (TypeContainer.GetClassBases): We were checking for the
22770         parent class being sealed too late.
22771
22772         * expression.cs (Binary.Emit): For <= and >= when dealing with
22773         floating point values, use cgt.un and clt.un instead of cgt and
22774         clt alone.
22775
22776 2003-04-01  Zoltan Varga  <vargaz@freemail.hu>
22777
22778         * statement.cs: Apply the same optimization as MS: skip the 
22779         GetEnumerator returning an IEnumerator, and use the one returning a 
22780         CharEnumerator instead. This allows us to avoid the try-finally block 
22781         and the boxing.
22782
22783 2003-03-31  Gaurav Vaish <gvaish_mono@lycos.com>
22784
22785         * cs-parser.jay: Attributes cannot be applied to
22786                          namespaces. Fixes #40473
22787
22788 2003-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22789
22790         * class.cs:
22791         (Add*): check if the name is valid using the full name for constants,
22792         fields, properties and events.
22793
22794 2003-03-28  Miguel de Icaza  <miguel@ximian.com>
22795
22796         * enum.cs (Enum.DefineType, Enum.IsValidEnumConstant): Also allow
22797         char constants to be part of the enumeration.
22798
22799         * expression.cs (Conditional.DoResolve): Add support for operator
22800         true. Implements the missing functionality from 14.12
22801
22802         * class.cs (TypeContainer.CheckPairedOperators): Report error for missmatch on
22803         operator true/false as required by the spec.
22804
22805         * expression.cs (Unary.ResolveOperator): In LogicalNot, do an
22806         implicit conversion to boolean.
22807
22808         * statement.cs (Statement.ResolveBoolean): A boolean expression is
22809         also one where the type implements `operator true'. 
22810
22811         * ecore.cs (Expression.GetOperatorTrue): New helper routine to
22812         get an expression that will invoke operator true based on an
22813         expression.  
22814
22815         (GetConversionOperators): Removed the hack that called op_True
22816         here.  
22817
22818         (Expression.ResolveBoolean): Move this from Statement.
22819
22820 2003-03-17  Miguel de Icaza  <miguel@ximian.com>
22821
22822         * ecore.cs (FieldExpr): do not allow initialization of initonly
22823         fields on derived classes
22824
22825 2003-03-13  Martin Baulig  <martin@ximian.com>
22826
22827         * statement.cs (Block.Emit): Call ig.BeginScope() and
22828         ig.EndScope() when compiling with debugging info; call
22829         LocalBuilder.SetLocalSymInfo _after_ opening the scope.
22830
22831 2003-03-08  Miguel de Icaza  <miguel@ximian.com>
22832
22833         * expression.cs (Indexers): Do not construct immediately, allow
22834         for new members to be appended as we go.  Fixes 38143
22835
22836 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22837
22838         * expression.cs: save/restore context when resolving an unchecked
22839         expression.
22840
22841 2003-03-05  Miguel de Icaza  <miguel@ximian.com>
22842
22843         * cfold.cs: Catch division by zero in modulus operator during
22844         constant folding.
22845
22846 2003-03-03  Miguel de Icaza  <miguel@ximian.com>
22847
22848         * interface.cs (Interface.DefineMembers): Avoid defining members
22849         twice. 
22850
22851 2003-02-27  Miguel de Icaza  <miguel@ximian.com>
22852
22853         * driver.cs: handle the +/- options for -noconfig
22854
22855         * statement.cs (Unckeched.Resolve): Also track the state of
22856         unchecked in the Resolve phase.
22857
22858 2003-02-27  Martin Baulig  <martin@ximian.com>
22859
22860         * ecore.cs (Expression.MemberLookup): Don't create a
22861         MethodGroupExpr for something which is not a method.  Fixes #38291.
22862
22863 2003-02-25  Miguel de Icaza  <miguel@ximian.com>
22864
22865         * class.cs (MemberBase.CheckParameters): Also check that the type
22866         is unmanaged if it is a pointer.
22867
22868         * expression.cs (SizeOf.Resolve): Add location information.
22869
22870         * statement.cs (Block.EmitMeta): Flag error (208) if a pointer to
22871         a managed type is declared.
22872
22873         * expression.cs (Invocation.VerifyArgumentsCompat): Check for the
22874         parameter modifiers as well.  Fixes bug 38606
22875
22876         * class.cs: Very sad.  Am backing out the speed up changes
22877         introduced by the ArrayList -> Array in the TypeContainer, as they
22878         were not actually that much faster, and introduced a bug (no error
22879         reports on duplicated methods).
22880
22881         * assign.cs (CompoundAssign.DoLResolve): Resolve the original
22882         source first, this will guarantee that we have a valid expression
22883         before calling in lower levels functions that will require a
22884         resolved object.  Then use this original_source in the
22885         target.ResolveLValue instead of the original source that was
22886         passed to us.
22887
22888         Another change.  Use target.Resolve instead of LValueResolve.
22889         Although we are resolving for LValues, we will let the Assign code
22890         take care of that (it will be called again from Resolve).  This
22891         basically allows code like this:
22892
22893         class X { X operator + (X x, object o) {} X this [int idx] { get; set; } }
22894         class Y { void A (X x) { x [0] += o; }
22895
22896         The problem was that the indexer was trying to resolve for
22897         set_Item (idx, object o) and never finding one.  The real set_Item
22898         was set_Item (idx, X).  By delaying the process we get the right
22899         semantics. 
22900
22901         Fixes bug 36505
22902
22903 2003-02-23  Martin Baulig  <martin@ximian.com>
22904
22905         * statement.cs (Block.Emit): Override this and set ec.CurrentBlock
22906         while calling DoEmit ().
22907
22908         * codegen.cs (EmitContext.Mark): Don't mark locations in other
22909         source files; if you use the #line directive inside a method, the
22910         compiler stops emitting line numbers for the debugger until it
22911         reaches the end of the method or another #line directive which
22912         restores the original file.
22913
22914 2003-02-23  Martin Baulig  <martin@ximian.com>
22915
22916         * statement.cs (FlowBranching.UsageVector.MergeChildren): Fix bug #37708.
22917
22918 2003-02-23  Martin Baulig  <martin@ximian.com>
22919
22920         * statement.cs (Block.AddChildVariableNames): We need to call this
22921         recursively, not just for our immediate children.
22922
22923 2003-02-23  Martin Baulig  <martin@ximian.com>
22924
22925         * class.cs (Event.Define): Always make the field private, like csc does.
22926
22927         * typemanager.cs (TypeManager.RealMemberLookup): Make events
22928         actually work, fixes bug #37521.
22929
22930 2003-02-23  Miguel de Icaza  <miguel@ximian.com>
22931
22932         * delegate.cs: When creating the various temporary "Parameters"
22933         classes, make sure that we call the ComputeAndDefineParameterTypes
22934         on those new parameters (just like we do with the formal ones), to
22935         allow them to be resolved in the context of the DeclSpace.
22936
22937         This fixes the bug that Dick observed in Bugzilla #38530.
22938
22939 2003-02-22  Miguel de Icaza  <miguel@ximian.com>
22940
22941         * expression.cs (ResolveMemberAccess): When resolving a constant,
22942         do not attempt to pull a constant if the value was not able to
22943         generate a valid constant.
22944
22945         * const.cs (LookupConstantValue): Do not report more errors than required.
22946
22947 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22948
22949         * expression.cs: fixes bug #38328.
22950
22951 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22952
22953         * class.cs: Changed all the various members that can be part of a
22954         class from being an ArrayList to be an Array of the right type.
22955         During the DefineType type_list, interface_list, delegate_list and
22956         enum_list are turned into types, interfaces, delegates and enums
22957         arrays.  
22958
22959         And during the member population, indexer_list, event_list,
22960         constant_list, field_list, instance_constructor_list, method_list,
22961         operator_list and property_list are turned into their real arrays.
22962
22963         Although we could probably perform this operation earlier, for
22964         good error reporting we need to keep the lists and remove the
22965         lists for longer than required.
22966
22967         This optimization was triggered by Paolo profiling the compiler
22968         speed on the output of `gen-sample-program.pl' perl script. 
22969
22970         * decl.cs (DeclSpace.ResolveType): Set the ContainerType, so we do
22971         not crash in methods like MemberLookupFailed that use this field.  
22972
22973         This problem arises when the compiler fails to resolve a type
22974         during interface type definition for example.
22975
22976 2003-02-18  Miguel de Icaza  <miguel@ximian.com>
22977
22978         * expression.cs (Indexers.GetIndexersForType): Interfaces do not
22979         inherit from System.Object, so we have to stop at null, not only
22980         when reaching System.Object.
22981
22982 2003-02-17  Miguel de Icaza  <miguel@ximian.com>
22983
22984         * expression.cs: (Indexers.GetIndexersForType): Martin's fix used
22985         DeclaredOnly because the parent indexer might have had a different
22986         name, but did not loop until the top of the hierarchy was reached.
22987
22988         The problem this one fixes is 35492: when a class implemented an
22989         indexer from an interface, we were getting the interface method
22990         (which was abstract) and we were flagging an error (can not invoke
22991         abstract method).
22992
22993         This also keeps bug 33089 functioning, and test-148 functioning.
22994
22995         * typemanager.cs (IsSpecialMethod): The correct way of figuring
22996         out if a method is special is to see if it is declared in a
22997         property or event, or whether it is one of the predefined operator
22998         names.   This should fix correctly #36804.
22999
23000 2003-02-15  Miguel de Icaza  <miguel@ximian.com>
23001
23002         The goal here is to remove the dependency on EmptyCast.Peel ().
23003         Killing it completely.
23004
23005         The problem is that currently in a number of places where
23006         constants are expected, we have to "probe" for an EmptyCast, and
23007         Peel, which is not the correct thing to do, as this will be
23008         repetitive and will likely lead to errors. 
23009
23010         The idea is to remove any EmptyCasts that are used in casts that
23011         can be reduced to constants, so we only have to cope with
23012         constants. 
23013
23014         This bug hunt was triggered by Bug 37363 and the desire to remove
23015         the duplicate pattern where we were "peeling" emptycasts to check
23016         whether they were constants.  Now constants will always be
23017         constants.
23018
23019         * ecore.cs: Use an enumconstant here instead of wrapping with
23020         EmptyCast.  
23021
23022         * expression.cs (Cast.TryReduce): Ah, the tricky EnumConstant was
23023         throwing me off.  By handling this we can get rid of a few hacks.
23024
23025         * statement.cs (Switch): Removed Peel() code.
23026
23027 2003-02-14  Miguel de Icaza  <miguel@ximian.com>
23028
23029         * class.cs: Location information for error 508
23030
23031         * expression.cs (New.DoResolve): Add a guard against double
23032         resolution of an expression.  
23033
23034         The New DoResolve might be called twice when initializing field
23035         expressions (see EmitFieldInitializers, the call to
23036         GetInitializerExpression will perform a resolve on the expression,
23037         and later the assign will trigger another resolution
23038
23039         This leads to bugs (#37014)
23040
23041         * delegate.cs: The signature for EndInvoke should contain any ref
23042         or out parameters as well.  We were not doing this in the past. 
23043
23044         * class.cs (Field.Define): Do not overwrite the type definition
23045         inside the `volatile' group.  Turns out that volatile enumerations
23046         were changing the type here to perform a validity test, which
23047         broke conversions. 
23048
23049 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
23050
23051         * ecore.cs (FieldExpr.AddressOf): In the particular case of This
23052         and structs, we do not want to load the instance variable
23053
23054         (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
23055         enum_type has to be handled like an object reference (implicit
23056         conversions exists from this to object), but the regular IsClass
23057         and IsValueType tests will never return true for this one.
23058
23059         Also we use TypeManager.IsValueType instead of type.IsValueType,
23060         just for consistency with the rest of the code (this is only
23061         needed if we ever use the construct exposed by test-180.cs inside
23062         corlib, which we dont today).
23063
23064 2003-02-12  Zoltan Varga  <vargaz@freemail.hu>
23065
23066         * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
23067         just InternalCall.
23068
23069 2003-02-09  Martin Baulig  <martin@ximian.com>
23070
23071         * namespace.cs (Namespace..ctor): Added SourceFile argument.
23072         (Namespace.DefineNamespaces): New static public method; this is
23073         called when we're compiling with debugging to add all namespaces
23074         to the symbol file.
23075
23076         * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
23077         pass it to the Namespace's .ctor.
23078
23079         * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
23080         and MethodBase arguments; pass the namespace ID to the symwriter;
23081         pass the MethodBase instead of the token to the symwriter.
23082         (SymbolWriter.DefineNamespace): New method to add a namespace to
23083         the symbol file.
23084
23085 2003-02-09  Martin Baulig  <martin@ximian.com>
23086
23087         * symbolwriter.cs: New file.  This is a wrapper around
23088         ISymbolWriter with a cleaner API.  We'll dynamically Invoke()
23089         methods here in near future.
23090
23091 2003-02-09  Martin Baulig  <martin@ximian.com>
23092
23093         * codegen.cs (EmitContext.Mark): Just pass the arguments to
23094         ILGenerator.MarkSequencePoint() which are actually used by the
23095         symbol writer.
23096
23097 2003-02-09  Martin Baulig  <martin@ximian.com>
23098
23099         * location.cs (SourceFile): New public sealed class.  This
23100         contains the name and an index which is used in the location's token.
23101         (Location): Reserve an appropriate number of bits in the token for
23102         the source file instead of walking over that list, this gives us a
23103         really huge performance improvement when compiling with debugging.
23104
23105         * driver.cs (Driver.parse, Driver.tokenize_file): Take a
23106         `SourceFile' argument instead of a string.
23107         (Driver.ProcessFile): Add all the files via Location.AddFile(),
23108         but don't parse/tokenize here, we need to generate the list of all
23109         source files before we do that.
23110         (Driver.ProcessFiles): New static function.  Parses/tokenizes all
23111         the files.
23112
23113         * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
23114         instead of a string.
23115
23116         * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
23117         of a string.
23118
23119 2003-02-09  Martin Baulig  <martin@ximian.com>
23120
23121         * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
23122         filename on `#line default'.
23123
23124 Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23125
23126         * statement.cs: don't clear the pinned var when the fixed statement
23127         returns from the method (fixes bug#37752).
23128
23129 Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23130
23131         * typemanager.cs: fix from mathpup@mylinuxisp.com (Marcus Urban) 
23132         to IsValueType.
23133
23134 2003-02-07  Martin Baulig  <martin@ximian.com>
23135
23136         * driver.cs: Removed the `--debug-args' command line argument.
23137
23138         * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
23139         automatically by the AsssemblyBuilder.
23140         (CodeGen.InitializeSymbolWriter): We don't need to call any
23141         initialization function on the symbol writer anymore.  This method
23142         doesn't take any arguments.
23143
23144 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
23145
23146         * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
23147         from referenced assemblies as well.
23148
23149 2003-02-02  Martin Baulig  <martin@ximian.com>
23150
23151         * class.cs (MethodData.Emit): Generate debugging info for external methods.
23152
23153 2003-02-02  Martin Baulig  <martin@ximian.com>
23154
23155         * class.cs (Constructor.Emit): Open the symbol writer before
23156         emitting the constructor initializer.
23157         (ConstructorInitializer.Emit): Call ec.Mark() to allow
23158         single-stepping through constructor initializers.
23159
23160 2003-01-30  Miguel de Icaza  <miguel@ximian.com>
23161
23162         * class.cs: Handle error 549: do not allow virtual methods in
23163         sealed classes. 
23164
23165 2003-02-01 Jackson Harper <jackson@latitudegeo.com>
23166
23167         * decl.cs: Check access levels when resolving types
23168
23169 2003-01-31 Jackson Harper <jackson@latitudegeo.com>
23170
23171         * statement.cs: Add parameters and locals set in catch blocks that might 
23172         return to set vector
23173
23174 2003-01-29  Miguel de Icaza  <miguel@ximian.com>
23175
23176         * class.cs (Operator): Set the SpecialName flags for operators.
23177
23178         * expression.cs (Invocation.DoResolve): Only block calls to
23179         accessors and operators on SpecialName methods.
23180
23181         (Cast.TryReduce): Handle conversions from char constants.
23182
23183
23184 Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23185
23186         * statement.cs: small memory and time optimization in FlowBranching.
23187
23188 2003-01-28  Pedro Mart  <yoros@wanadoo.es>
23189
23190         * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
23191         problem that the last fix but in the other sid (Set).
23192
23193         * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
23194         access when there is no indexer in the hierarchy.
23195
23196 2003-01-27 Jackson Harper <jackson@latitudegeo.com>
23197
23198         * class.cs: Combine some if statements.
23199
23200 2003-01-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23201
23202         * driver.cs: fixed bug #37187.
23203
23204 2003-01-27  Pedro Martinez Juliá  <yoros@wanadoo.es>
23205
23206         * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
23207         any indexer, it's needed to build a list with all the indexers in the
23208         hierarchy (AllGetters), else we have problems. Fixes #35653.
23209
23210 2003-01-23  Miguel de Icaza  <miguel@ximian.com>
23211
23212         * class.cs (MethodData.Define): It is wrong for an interface
23213         implementation to be static in both cases: explicit and implicit.
23214         We were only handling this in one case.
23215
23216         Improve the if situation there to not have negations.
23217
23218         * class.cs (Field.Define): Turns out that we do not need to check
23219         the unsafe bit on field definition, only on usage.  Remove the test.
23220
23221 2003-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23222
23223         * driver.cs: use assembly.Location instead of Codebase (the latest
23224         patch made mcs fail when using MS assemblies).
23225
23226 2003-01-21  Tim Haynes <thaynes@openlinksw.com>
23227
23228         * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
23229         get the path to *corlib.dll.
23230
23231 2003-01-21  Nick Drochak <ndrochak@gol.com>
23232
23233         * cs-tokenizer.cs:
23234         * pending.cs:
23235         * typemanager.cs: Remove compiler warnings
23236
23237 2003-01-20  Duncan Mak  <duncan@ximian.com>
23238
23239         * AssemblyInfo.cs: Bump the version number to 0.19.
23240
23241 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23242
23243         * cs-tokenizer.cs: little fixes to line numbering when #line is used.
23244
23245 2003-01-18  Zoltan Varga  <vargaz@freemail.hu>
23246
23247         * class.cs (Constructor::Emit): Emit debugging info for constructors.
23248
23249 2003-01-17  Miguel de Icaza  <miguel@ximian.com>
23250
23251         * cs-parser.jay: Small fix: we were not comparing the constructor
23252         name correctly.   Thanks to Zoltan for the initial pointer.
23253
23254 2003-01-16 Jackson Harper <jackson@latitudegeo.com>
23255
23256         * cs-tokenizer.cs: Set file name when specified with #line
23257
23258 2003-01-15  Miguel de Icaza  <miguel@ximian.com>
23259
23260         * cs-parser.jay: Only perform the constructor checks here if we
23261         are named like the class;  This will help provider a better
23262         error.  The constructor path is taken when a type definition is
23263         not found, but most likely the user forgot to add the type, so
23264         report that rather than the constructor error.
23265
23266 Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lupus@ximian.com>
23267
23268         * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
23269         allocations.
23270
23271 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23272
23273         * cs-parser.jay: Add cleanup call.
23274
23275 2003-01-13  Duncan Mak  <duncan@ximian.com>
23276
23277         * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
23278         consistent with other methods.
23279
23280 2003-01-13 Jackson Harper <jackson@latitudegeo.com>
23281
23282         * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
23283
23284 Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lupus@ximian.com>
23285
23286         * attribute.cs: only set GuidAttr to true when we have a
23287         GuidAttribute.
23288
23289 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23290
23291         * ecore.cs:
23292         * expression.cs:
23293         * typemanager.cs: fixes to allow mcs compile corlib with the new
23294         Type.IsSubclassOf fix.
23295
23296 2003-01-08  Miguel de Icaza  <miguel@ximian.com>
23297
23298         * expression.cs (LocalVariableReference.DoResolve): Classify a
23299         constant as a value, not as a variable.   Also, set the type for
23300         the variable.
23301
23302         * cs-parser.jay (fixed_statement): take a type instead of a
23303         pointer_type, so we can produce a better error message later.
23304
23305         * statement.cs (Fixed.Resolve): Flag types that are not pointers
23306         as an error.  
23307
23308         (For.DoEmit): Make inifinite loops have a
23309         non-conditional branch back.
23310
23311         (Fixed.DoEmit): First populate the pinned variables, then emit the
23312         statement, then clear the variables.  Before I was emitting the
23313         code once for each fixed piece.
23314
23315
23316 2003-01-08  Martin Baulig  <martin@ximian.com>
23317
23318         * statement.cs (FlowBranching.MergeChild): A break in a
23319         SWITCH_SECTION does not leave a loop.  Fixes #36155.
23320
23321 2003-01-08  Martin Baulig  <martin@ximian.com>
23322
23323         * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
23324         lives in the same number space than `param_map'.  Fixes #36154.
23325
23326 2003-01-07  Miguel de Icaza  <miguel@ximian.com>
23327
23328         * cs-parser.jay (constructor_declaration): Set the
23329         Constructor.ModFlags before probing for it.  This makes the
23330         compiler report 514, 515 and 132 (the code was there, but got
23331         broken). 
23332
23333         * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
23334         (GotoDefault.Resolve): Set `Returns' to ALWAYS.
23335         (GotoCase.Resolve): Set `Returns' to ALWAYS.
23336
23337 Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lupus@ximian.com>
23338
23339         * enum.cs: create the enum static fields using the enum type.
23340
23341 Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lupus@ximian.com>
23342
23343         * class.cs: don't try to create the ParamBuilder for the return
23344         type if it's not needed (and handle it breaking for the ms runtime
23345         anyway).
23346
23347 2003-01-06 Jackson Harper <jackson@latitudegeo.com>
23348
23349         * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
23350
23351 2002-12-29  Miguel de Icaza  <miguel@ximian.com>
23352
23353         * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
23354         the command.   This showed up while compiling the JANET source
23355         code, which used \r as its only newline separator.
23356
23357 2002-12-28  Miguel de Icaza  <miguel@ximian.com>
23358
23359         * class.cs (Method.Define): If we are an operator (because it
23360         reuses our code), then set the SpecialName and HideBySig.  #36128
23361
23362 2002-12-22  Miguel de Icaza  <miguel@ximian.com>
23363
23364         * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
23365         exception, report error 120 `object reference required'.
23366
23367         * driver.cs: Add --pause option, used during to measure the size
23368         of the process as it goes with --timestamp.
23369
23370         * expression.cs (Invocation.DoResolve): Do not allow methods with
23371         SpecialName to be invoked.
23372
23373 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
23374
23375         * cs-tokenizer.cs: Small fix to the parser: compute the ascii
23376         number before adding it.
23377
23378 2002-12-21  Ravi Pratap  <ravi@ximian.com>
23379
23380         * ecore.cs (StandardImplicitConversion): When in an unsafe
23381         context, we allow conversion between void * to any other pointer
23382         type. This fixes bug #35973.
23383
23384 2002-12-20 Jackson Harper <jackson@latitudegeo.com>
23385
23386         * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
23387         is not thrown when extensionless outputs are used 
23388
23389 2002-12-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23390
23391         * rootcontext.cs: fixed compilation of corlib.
23392
23393 2002-12-19  Miguel de Icaza  <miguel@ximian.com>
23394
23395         * attribute.cs (Attributes.Contains): Add new method.
23396
23397         * class.cs (MethodCore.LabelParameters): if the parameter is an
23398         `out' parameter, check that no attribute `[In]' has been passed.
23399
23400         * enum.cs: Handle the `value__' name in an enumeration.
23401
23402 2002-12-14  Jaroslaw Kowalski <jarek@atm.com.pl>
23403
23404         * decl.cs: Added special case to allow overrides on "protected
23405         internal" methods
23406
23407 2002-12-18  Ravi Pratap  <ravi@ximian.com>
23408
23409         * attribute.cs (Attributes.AddAttributeSection): Rename to this
23410         since it makes much more sense.
23411
23412         (Attributes.ctor): Don't require a Location parameter.
23413
23414         * rootcontext.cs (AddGlobalAttributeSection): Rename again.
23415
23416         * attribute.cs (ApplyAttributes): Remove extra Location parameters
23417         since we already have that information per attribute.
23418
23419         * everywhere : make appropriate changes.
23420
23421         * class.cs (LabelParameters): Write the code which actually
23422         applies attributes to the return type. We can't do this on the MS
23423         .NET runtime so we flag a warning in the case an exception is
23424         thrown.
23425
23426 2002-12-18  Miguel de Icaza  <miguel@ximian.com>
23427
23428         * const.cs: Handle implicit null conversions here too.
23429
23430 2002-12-17  Ravi Pratap  <ravi@ximian.com>
23431
23432         * class.cs (MethodCore.LabelParameters): Remove the extra
23433         Type [] parameter since it is completely unnecessary. Instead
23434         pass in the method's attributes so that we can extract
23435         the "return" attribute.
23436
23437 2002-12-17  Miguel de Icaza  <miguel@ximian.com>
23438
23439         * cs-parser.jay (parse): Use Report.Error to flag errors instead
23440         of ignoring it and letting the compile continue.
23441
23442         * typemanager.cs (ChangeType): use an extra argument to return an
23443         error condition instead of throwing an exception.
23444
23445 2002-12-15  Miguel de Icaza  <miguel@ximian.com>
23446
23447         * expression.cs (Unary.TryReduce): mimic the code for the regular
23448         code path.  Perform an implicit cast in the cases where we can
23449         implicitly convert to one of the integral types, and then reduce
23450         based on that constant.   This fixes bug #35483.
23451
23452 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23453
23454         * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
23455
23456 2002-12-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23457
23458         * namespace.cs: fixed bug #35489.
23459
23460 2002-12-12  Miguel de Icaza  <miguel@ximian.com>
23461
23462         * class.cs: Remove some dead code.
23463
23464         * cs-parser.jay: Estimate the number of methods needed
23465         (RootContext.MethodCount);
23466
23467         * cs-tokenizer.cs: Use char arrays for parsing identifiers and
23468         numbers instead of StringBuilders.
23469
23470         * support.cs (PtrHashtable): Add constructor with initial size;
23471         We can now reduce reallocations of the method table.
23472
23473 2002-12-10  Ravi Pratap  <ravi@ximian.com>
23474
23475         * attribute.cs (ApplyAttributes): Keep track of the emitted
23476         attributes on a per-target basis. This fixes bug #35413.
23477
23478 2002-12-10  Miguel de Icaza  <miguel@ximian.com>
23479
23480         * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
23481         default to the Windows 1252 encoding.
23482
23483         (UnixParseOption): Support version, thanks to Alp for the missing
23484         pointer. 
23485
23486         * AssemblyInfo.cs: Add nice assembly information.
23487
23488         * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
23489         (bug 35169).
23490
23491         * cs-parser.jay: Allow a trailing comma before the close bracked
23492         in the attribute_section production.
23493
23494         * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
23495         address of the instance was being taken, I will take this out,
23496         because we take the address of the object immediately here.
23497
23498 2002-12-09  Ravi Pratap  <ravi@ximian.com>
23499
23500         * typemanager.cs (AreMultipleAllowed): Take care of the most
23501         obvious case where attribute type is not in the current assembly -
23502         stupid me ;-)
23503
23504 2002-12-08  Miguel de Icaza  <miguel@ximian.com>
23505
23506         * ecore.cs (SimpleName.DoResolve): First perform lookups on using
23507         definitions, instead of doing that afterwards.  
23508
23509         Also we use a nice little hack, depending on the constructor, we
23510         know if we are a "composed" name or a simple name.  Hence, we
23511         avoid the IndexOf test, and we avoid 
23512
23513         * codegen.cs: Add code to assist in a bug reporter to track down
23514         the source of a compiler crash. 
23515
23516 2002-12-07  Ravi Pratap  <ravi@ximian.com>
23517
23518         * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
23519         types have been emitted for a given element and flag an error
23520         if something which does not have AllowMultiple set is used more
23521         than once.
23522
23523         * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
23524         attribute types and their corresponding AllowMultiple properties
23525
23526         (AreMultipleAllowed): Check the property for a given type.
23527
23528         * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
23529         property in the case we have a TypeContainer.
23530
23531         (Attributes.AddAttribute): Detect duplicates and just skip on
23532         adding them. This trivial fix catches a pretty gross error in our
23533         attribute emission - global attributes were being emitted twice!
23534
23535         Bugzilla bug #33187 is now fixed.
23536
23537 2002-12-06  Miguel de Icaza  <miguel@ximian.com>
23538
23539         * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
23540         instead of pp_and).
23541
23542         * expression.cs (Binary.ResolveOperator): I can only use the
23543         Concat (string, string, string) and Concat (string, string,
23544         string, string) if the child is actually a concatenation of
23545         strings. 
23546
23547 2002-12-04  Miguel de Icaza  <miguel@ximian.com>
23548
23549         * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
23550         context where we need a 2-character lookahead.
23551
23552         * pending.cs (PendingImplementation): Rework so we can keep track
23553         of interface types all the time, and flag those which were
23554         implemented by parents as optional.
23555
23556 2002-12-03  Miguel de Icaza  <miguel@ximian.com>
23557
23558         * expression.cs (Binary.ResolveOperator): Use
23559         String.Concat(string,string,string) or
23560         String.Concat(string,string,string,string) when possible. 
23561
23562         * typemanager: More helper methods.
23563
23564
23565 Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23566
23567         * pending.cs: remove the bogus return from GetMissingInterfaces()
23568         (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
23569
23570 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23571
23572         * namespace.cs: avoid duplicated 'using xxx' being added to
23573         using_clauses. This prevents mcs from issuing and 'ambiguous type' error
23574         when we get more than one 'using' statement for the same namespace.
23575         Report a CS0105 warning for it.
23576
23577 2002-11-30  Miguel de Icaza  <miguel@ximian.com>
23578
23579         * cs-tokenizer.cs (consume_identifier): use read directly, instead
23580         of calling getChar/putback, uses internal knowledge of it.    
23581
23582         (xtoken): Reorder tokenizer so most common patterns are checked
23583         first.  This reduces the compilation time in another 5% (from 8.11s
23584         average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
23585
23586         The parsing time is 22% of the compilation in mcs, and from that
23587         64% is spent on the tokenization process.  
23588
23589         I tried using a binary search for keywords, but this is slower
23590         than the hashtable.  Another option would be to do a couple of
23591         things:
23592
23593                 * Not use a StringBuilder, instead use an array of chars,
23594                   with a set value.  Notice that this way we could catch
23595                   the 645 error without having to do it *afterwards*.
23596
23597                 * We could write a hand-parser to avoid the hashtable
23598                   compares altogether.
23599
23600         The identifier consumption process takes 37% of the tokenization
23601         time.  Another 15% is spent on is_number.  56% of the time spent
23602         on is_number is spent on Int64.Parse:
23603
23604                 * We could probably choose based on the string length to
23605                   use Int32.Parse or Int64.Parse and avoid all the 64-bit
23606                   computations. 
23607
23608         Another 3% is spend on wrapping `xtoken' in the `token' function.
23609
23610         Handle 0xa0 as whitespace (#34752)
23611
23612 2002-11-26  Miguel de Icaza  <miguel@ximian.com>
23613
23614         * typemanager.cs (IsCLRType): New routine to tell whether a type
23615         is one of the builtin types.  
23616
23617         Maybe it needs to use TypeCodes to be faster.  Maybe we could use
23618         typecode in more places instead of doing pointer comparissions.
23619         We could leverage some knowledge about the way the typecodes are
23620         laid out.
23621
23622         New code to cache namespaces in assemblies, it is currently not
23623         invoked, to be used soon.
23624
23625         * decl.cs (DeclSpace.MakeFQN): Simple optimization.
23626
23627         * expression.cs (Binary.ResolveOperator): specially handle
23628         strings, and do not perform user-defined operator overloading for
23629         built-in types.
23630
23631 2002-11-24  Miguel de Icaza  <miguel@ximian.com>
23632
23633         * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
23634         internalcall as it is a pretty simple operation;  Avoid whenever
23635         possible to call Char.IsLetter.
23636
23637         (consume_identifier): Cut by half the number of
23638         hashtable calls by merging the is_keyword and GetKeyword behavior.
23639
23640         Do not short-circuit, because if we do, we
23641         report errors (ie, #if false && true would produce an invalid
23642         directive error);
23643
23644
23645 2002-11-24  Martin Baulig  <martin@ximian.com>
23646
23647         * expression.cs (Cast.TryReduce): If we're in checked syntax,
23648         check constant ranges and report a CS0221.  Fixes #33186.
23649
23650 2002-11-24  Martin Baulig  <martin@ximian.com>
23651
23652         * cs-parser.jay: Make this work for uninitialized variable
23653         declarations in the `for' initializer.  Fixes #32416.
23654
23655 2002-11-24  Martin Baulig  <martin@ximian.com>
23656
23657         * ecore.cs (Expression.ConvertExplicit): Make casting from/to
23658         System.Enum actually work.  Fixes bug #32269, added verify-6.cs.
23659
23660 2002-11-24  Martin Baulig  <martin@ximian.com>
23661
23662         * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
23663         argument; if true, we also check for user-defined conversions.
23664         This is only needed if both arguments are of a user-defined type.
23665         Fixes #30443, added test-175.cs.
23666         (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
23667
23668         * ecore.cs (Expression.ImplicitUserConversionExists): New method.
23669
23670 2002-11-24  Martin Baulig  <martin@ximian.com>
23671
23672         * expression.cs (ArrayAccess.GetStoreOpcode): New public static
23673         function to get the store opcode.
23674         (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
23675         only emit the Ldelema if the store opcode is Stobj.  You must run
23676         both test-34 and test-167 to test this.  Fixes #34529.
23677
23678 2002-11-23  Martin Baulig  <martin@ximian.com>
23679
23680         * ecore.cs (Expression.MemberLookup): Added additional
23681         `qualifier_type' argument which is used when we're being called
23682         from MemberAccess.DoResolve() and null if we're called from a
23683         SimpleName lookup.
23684         (Expression.MemberLookupFailed): New method to report errors; this
23685         does the CS1540 check and reports the correct error message.
23686
23687         * typemanager.cs (MemberLookup): Added additional `qualifier_type'
23688         argument for the CS1540 check and redone the way how we're dealing
23689         with private members.  See the comment in the source code for details.
23690         (FilterWithClosure): Reverted this back to revision 1.197; renamed
23691         `closure_start_type' to `closure_qualifier_type' and check whether
23692         it's not null.  It was not this filter being broken, it was just
23693         being called with the wrong arguments.
23694
23695         * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
23696         and pass it the correct `qualifier_type'; this also does the error
23697         handling for us.
23698
23699 2002-11-22  Miguel de Icaza  <miguel@ximian.com>
23700
23701         * expression.cs (Invocation.EmitParams): If the we are dealing
23702         with a non-built-in value type, load its address as well.
23703
23704         (ArrayCreation): Use a a pretty constant instead
23705         of the hardcoded value 2.   Use 6 instead of 2 for the number of
23706         static initializers.  
23707
23708         (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
23709         because they are not really value types, just glorified integers. 
23710
23711         * driver.cs: Do not append .exe, the CSC compiler does not do it.
23712
23713         * ecore.cs: Remove redundant code for enumerations, make them use
23714         the same code path as everything else, fixes the casting issue
23715         with enumerations in Windows.Forms.
23716
23717         * attribute.cs: Do only cast to string if it is a string, the
23718         validation happens later.
23719
23720         * typemanager.cs: Temproary hack to avoid a bootstrap issue until
23721         people upgrade their corlibs.
23722
23723         * ecore.cs: Oops, enumerations were not following the entire code path
23724
23725 2002-11-21  Miguel de Icaza  <miguel@ximian.com>
23726
23727         * typemanager.cs (FilterWithClosure): Commented out the test for
23728         1540 in typemanager.cs, as it has problems when accessing
23729         protected methods from a parent class (see test-174.cs). 
23730
23731         * attribute.cs (Attribute.ValidateGuid): new method.
23732         (Attribute.Resolve): Use above.
23733
23734 2002-11-19  Miguel de Icaza  <miguel@ximian.com>
23735
23736         * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
23737
23738         * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
23739         handling for enumerations, as we only needed the TypeContainer
23740         functionality to begin with (this is required for the fix below to
23741         work for enums that reference constants in a container class for
23742         example). 
23743
23744         * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
23745
23746         * enum.cs (Enum.Define): Use `this' instead of parent, so we have
23747         a valid TypeBuilder to perform lookups on.o
23748
23749         * class.cs (InheritableMemberSignatureCompare): Use true in the
23750         call to GetGetMethod and GetSetMethod, because we are comparing
23751         the signature, and we need to get the methods *even* if they are
23752         private. 
23753
23754         (PropertyBase.CheckBase): ditto.
23755
23756         * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
23757         GotoCase.Resolve): Use Peel on EmpytCasts.
23758
23759         * ecore.cs (EmptyCast): drop child, add Peel method.
23760
23761 2002-11-17  Martin Baulig  <martin@ximian.com>
23762
23763         * ecore.cs (EmptyCast.Child): New public property.
23764
23765         * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
23766         label resolved to an EmptyCast.  Fixes #34162.
23767         (GotoCase.Resolve): Likewise.
23768         (Block.EmitMeta): Likewise.
23769
23770 2002-11-17  Martin Baulig  <martin@ximian.com>
23771
23772         * expression.cs (Invocation.BetterConversion): Prefer int over
23773         uint; short over ushort; long over ulong for integer literals.
23774         Use ImplicitConversionExists instead of StandardConversionExists
23775         since we also need to check for user-defined implicit conversions.
23776         Fixes #34165.  Added test-173.cs.
23777
23778 2002-11-16  Martin Baulig  <martin@ximian.com>
23779
23780         * expression.cs (Binary.EmitBranchable): Eliminate comparisions
23781         with the `true' and `false' literals.  Fixes #33151.
23782
23783 2002-11-16  Martin Baulig  <martin@ximian.com>
23784
23785         * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
23786         October 22nd; don't do the cs1540 check for static members.
23787
23788         * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
23789         now using our own filter here and doing the cs1540 check again.
23790
23791 2002-11-16  Martin Baulig  <martin@ximian.com>
23792
23793         * support.cs (InternalParameters): Don't crash if we don't have
23794         any fixed parameters.  Fixes #33532.
23795
23796 2002-11-16  Martin Baulig  <martin@ximian.com>
23797
23798         * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
23799         when looking up static methods to make this work on Windows.
23800         Fixes #33773.
23801
23802 2002-11-16  Martin Baulig  <martin@ximian.com>
23803
23804         * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
23805         a setter rather than using PropertyInfo.CanWrite.
23806
23807 2002-11-15  Nick Drochak  <ndrochak@gol.com>
23808
23809         * class.cs: Allow acces to block member by subclasses. Fixes build
23810         breaker.
23811
23812 2002-11-14  Martin Baulig  <martin@ximian.com>
23813
23814         * class.cs (Constructor.Emit): Added the extern/block check.
23815         Fixes bug #33678.
23816
23817 2002-11-14  Martin Baulig  <martin@ximian.com>
23818
23819         * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
23820         iteration while looking for indexers, this is needed because the
23821         indexer may have a different name in our base classes.  Fixed the
23822         error reporting (no indexers at all, not get accessor, no
23823         overloaded match).  Fixes bug #33089.
23824         (IndexerAccess.DoResolveLValue): Likewise.
23825
23826 2002-11-14  Martin Baulig  <martin@ximian.com>
23827
23828         * class.cs (PropertyBase.CheckBase): Make this work for multiple
23829         indexers.  Fixes the first part of bug #33089.
23830         (MethodSignature.InheritableMemberSignatureCompare): Added support
23831         for properties.
23832
23833 2002-11-13  Ravi Pratap  <ravi@ximian.com>
23834
23835         * attribute.cs (Attribute.Resolve): Catch the
23836         NullReferenceException and report it since it isn't supposed to
23837         happen. 
23838
23839 2002-11-12  Miguel de Icaza  <miguel@ximian.com>
23840
23841         * expression.cs (Binary.EmitBranchable): Also handle the cases for
23842         LogicalOr and LogicalAnd that can benefit from recursively
23843         handling EmitBranchable.  The code now should be nice for Paolo.
23844
23845 2002-11-08  Miguel de Icaza  <miguel@ximian.com>
23846
23847         * typemanager.cs (LookupType): Added a negative-hit hashtable for
23848         the Type lookups, as we perform quite a number of lookups on
23849         non-Types.  This can be removed once we can deterministically tell
23850         whether we have a type or a namespace in advance.
23851
23852         But this might require special hacks from our corlib.
23853
23854         * TODO: updated.
23855
23856         * ecore.cs (TryImplicitIntConversion): Handle conversions to float
23857         and double which avoids a conversion from an integer to a double.
23858
23859         * expression.cs: tiny optimization, avoid calling IsConstant,
23860         because it effectively performs the lookup twice.
23861
23862 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
23863
23864         But a bogus return here to keep the semantics of the old code
23865         until the Mono runtime is fixed.
23866
23867         * pending.cs (GetMissingInterfaces): New method used to remove all
23868         the interfaces that are already implemented by our parent
23869         classes from the list of pending methods. 
23870
23871         * interface.cs: Add checks for calls after ResolveTypeExpr.
23872
23873 2002-11-05  Miguel de Icaza  <miguel@ximian.com>
23874
23875         * class.cs (Class.Emit): Report warning 67: event not used if the
23876         warning level is beyond 3.
23877
23878         * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
23879         being a NullLiteral.
23880
23881         * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
23882         specifiers. 
23883
23884         * class.cs (TypeContainer.GetClassBases): Cover a missing code
23885         path that might fail if a type can not be resolved.
23886
23887         * expression.cs (Binary.Emit): Emit unsigned versions of the
23888         operators. 
23889
23890         * driver.cs: use error 5.
23891
23892 2002-11-02  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
23893
23894         * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
23895
23896 2002-11-01  Miguel de Icaza  <miguel@ximian.com>
23897
23898         * cs-parser.jay (switch_section): A beautiful patch from Martin
23899         Baulig that fixed 33094.
23900
23901 2002-10-31  Miguel de Icaza  <miguel@ximian.com>
23902
23903         * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
23904         Check whether the base is abstract and report an error if so.
23905
23906         * expression.cs (IndexerAccess.DoResolveLValue,
23907         IndexerAccess.DoResolve): ditto. 
23908
23909         (Invocation.DoResolve): ditto.
23910
23911         (Invocation.FullMethodDesc): Improve the report string.
23912
23913         * statement.cs (Block): Eliminate IsVariableDefined as it is
23914         basically just a wrapper for GetVariableInfo.
23915
23916         * ecore.cs (SimpleName): Use new 
23917
23918         * support.cs (ReflectionParamter.ParameterType): We unwrap the
23919         type, as we return the actual parameter ref/unref state on a
23920         different call.
23921
23922 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
23923
23924         * support.cs: Return proper flags REF/OUT fixing the previous
23925         commit.  
23926
23927         * expression.cs: Reverted last patch, that was wrong.  Is_ref is
23928         not used to mean `ref' but `ref or out' in ParameterReference
23929
23930         * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
23931         full type signature instead of calling TypeManger.CSharpName
23932         ourselves. 
23933
23934         * support.cs (InternalParameters.ParameterDesc): Do not compare
23935         directly to the modflags, because REF/OUT will actually be bitsets
23936         if set. 
23937
23938         * delegate.cs (VerifyMethod): Check also the modifiers.
23939
23940         * cs-tokenizer.cs: Fix bug where floating point values with an
23941         exponent where a sign was missing was ignored.
23942
23943         * driver.cs: Allow multiple assemblies to be specified in a single
23944         /r: argument
23945
23946 2002-10-28  Miguel de Icaza  <miguel@ximian.com>
23947
23948         * cs-parser.jay: Ugly.  We had to add a multiplicative_expression,
23949         because identifiers after a parenthesis would end up in this kind
23950         of production, and we needed to desamiguate it for having casts
23951         like:
23952
23953                 (UserDefinedType *) xxx
23954
23955 2002-10-24  Miguel de Icaza  <miguel@ximian.com>
23956
23957         * typemanager.cs (RealMemberLookup): when we deal with a subclass,
23958         we should set on the Bindingflags.NonPublic, but not turn on
23959         private_ok.  private_ok controls whether a Private member is
23960         returned (this is chekced on the filter routine), while the
23961         BindingFlags.NonPublic just controls whether private/protected
23962         will be allowed.   This fixes the problem part of the problem of
23963         private properties being allowed to be used in derived classes.
23964
23965         * expression.cs (BaseAccess): Provide an DoResolveLValue method,
23966         so we can call the children DoResolveLValue method (this will
23967         properly signal errors on lvalue assignments to base properties)
23968
23969         * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
23970         getter are null, and we have a property info, we know that this
23971         happened because the lookup failed, so we report an error 122 for
23972         protection level violation.
23973
23974         We also silently return if setter and getter are null in the
23975         resolve functions, this condition only happens if we have flagged
23976         the error before.  This is the other half of the problem. 
23977
23978         (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
23979         not have accessibility information, that is why we were returning
23980         true in the filter function in typemanager.cs.
23981
23982         To properly report 122 (property is inaccessible because of its
23983         protection level) correctly, we report this error in ResolveAccess
23984         by failing if both the setter and the getter are lacking (ie, the
23985         lookup failed). 
23986
23987         DoResolve and DoLResolve have been modified to check for both
23988         setter/getter being null and returning silently, the reason being
23989         that I did not want to put the knowledge about this error in upper
23990         layers, like:
23991
23992         int old = Report.Errors;
23993         x = new PropertyExpr (...);
23994         if (old != Report.Errors)
23995                 return null;
23996         else
23997                 return x;
23998
23999         So the property expr is returned, but it is invalid, so the error
24000         will be flagged during the resolve process. 
24001
24002         * class.cs: Remove InheritablePropertySignatureCompare from the
24003         class, as we no longer depend on the property signature to compute
24004         whether it is possible to implement a method or not.
24005
24006         The reason is that calling PropertyInfo.GetGetMethod will return
24007         null (in .NET, in Mono it works, and we should change this), in
24008         cases where the Get Method does not exist in that particular
24009         class.
24010
24011         So this code:
24012
24013         class X { public virtual int A { get { return 1; } } }
24014         class Y : X { }
24015         class Z : Y { public override int A { get { return 2; } } }
24016
24017         Would fail in Z because the parent (Y) would not have the property
24018         defined.  So we avoid this completely now (because the alternative
24019         fix was ugly and slow), and we now depend exclusively on the
24020         method names.
24021
24022         (PropertyBase.CheckBase): Use a method-base mechanism to find our
24023         reference method, instead of using the property.
24024
24025         * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
24026         routines are gone now.
24027
24028         * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
24029         names, they were incorrectly named.
24030
24031         * cs-tokenizer.cs: Return are more gentle token on failure. 
24032
24033         * pending.cs (PendingImplementation.InterfaceMethod): This routine
24034         had an out-of-sync index variable, which caused it to remove from
24035         the list of pending methods the wrong method sometimes.
24036
24037 2002-10-22  Miguel de Icaza  <miguel@ximian.com>
24038
24039         * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
24040         CanWrite, because those refer to this particular instance of the
24041         property, and do not take into account the fact that we can
24042         override single members of a property.
24043
24044         Constructor requires an EmitContext.  The resolution process does
24045         not happen here, but we need to compute the accessors before,
24046         because the resolution does not always happen for properties.
24047
24048         * typemanager.cs (RealMemberLookup): Set private_ok if we are a
24049         subclass, before we did not update this flag, but we did update
24050         bindingflags. 
24051
24052         (GetAccessors): Drop this routine, as it did not work in the
24053         presence of partially overwritten set/get methods. 
24054
24055         Notice that this broke the cs1540 detection, but that will require
24056         more thinking. 
24057
24058 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24059
24060         * class.cs:
24061         * codegen.cs:
24062         * driver.cs: issue a warning instead of an error if we don't support
24063         debugging for the platform. Also ignore a couple of errors that may
24064         arise when trying to write the symbols. Undo my previous patch.
24065
24066 2002-10-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24067
24068         * driver.cs: ignore /debug switch except for Unix platforms.
24069
24070 2002-10-23  Nick Drochak  <ndrochak@gol.com>
24071
24072         * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
24073
24074 2002-10-21  Miguel de Icaza  <miguel@ximian.com>
24075
24076         * driver.cs: Do not make mcs-debug conditional, so we do not break
24077         builds that use it.
24078
24079         * statement.cs (UsageVector.MergeChildren): I would like Martin to
24080         review this patch.  But basically after all the children variables
24081         have been merged, the value of "Breaks" was not being set to
24082         new_breaks for Switch blocks.  I think that it should be set after
24083         it has executed.  Currently I set this to the value of new_breaks,
24084         but only if new_breaks is FlowReturn.ALWAYS, which is a bit
24085         conservative, but I do not understand this code very well.
24086
24087         I did not break anything in the build, so that is good ;-)
24088
24089         * cs-tokenizer.cs: Also allow \r in comments as a line separator.
24090
24091 2002-10-20  Mark Crichton  <crichton@gimp.org>
24092
24093         * cfold.cs: Fixed compile blocker.  Really fixed it this time.
24094
24095 2002-10-20  Nick Drochak  <ndrochak@gol.com>
24096
24097         * cfold.cs: Fixed compile blocker.
24098
24099 2002-10-20  Miguel de Icaza  <miguel@ximian.com>
24100
24101         * driver.cs: I was chekcing the key, not the file.
24102
24103 2002-10-19  Ravi Pratap  <ravi@ximian.com>
24104
24105         * ecore.cs (UserDefinedConversion): Get rid of the bogus error
24106         message that we were generating - we just need to silently return
24107         a null.
24108
24109 2002-10-19  Miguel de Icaza  <miguel@ximian.com>
24110
24111         * class.cs (Event.Define): Change my previous commit, as this
24112         breaks the debugger.  This is a temporary hack, as it seems like
24113         the compiler is generating events incorrectly to begin with.
24114
24115         * expression.cs (Binary.ResolveOperator): Added support for 
24116         "U operator - (E x, E y)"
24117
24118         * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
24119         y)".
24120
24121         * ecore.cs (FieldExpr.AddressOf): We had a special code path for
24122         init-only variables, but this path did not take into account that
24123         there might be also instance readonly variables.  Correct this
24124         problem. 
24125
24126         This fixes bug 32253
24127
24128         * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
24129         delegates as well.
24130
24131         * driver.cs: Change the extension for modules to `netmodule'
24132
24133         * cs-parser.jay: Improved slightly the location tracking for
24134         the debugger symbols.
24135
24136         * class.cs (Event.Define): Use Modifiers.FieldAttr on the
24137         modifiers that were specified instead of the hardcoded value
24138         (FamAndAssem).  This was basically ignoring the static modifier,
24139         and others.  Fixes 32429.
24140
24141         * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
24142         fixed a bug in the process (32476)
24143
24144         * expression.cs (ArrayAccess.EmitAssign): Patch from
24145         hwang_rob@yahoo.ca that fixes bug 31834.3
24146
24147 2002-10-18  Miguel de Icaza  <miguel@ximian.com>
24148
24149         * driver.cs: Make the module extension .netmodule.
24150
24151 2002-10-16  Miguel de Icaza  <miguel@ximian.com>
24152
24153         * driver.cs: Report an error if the resource file is not found
24154         instead of crashing.
24155
24156         * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
24157         false, like Emit does.
24158
24159 2002-10-16  Nick Drochak  <ndrochak@gol.com>
24160
24161         * typemanager.cs: Remove unused private member.  Also reported mcs
24162         bug to report this as a warning like csc.
24163
24164 2002-10-15  Martin Baulig  <martin@gnome.org>
24165
24166         * statement.cs (Statement.Emit): Made this a virtual method; emits
24167         the line number info and calls DoEmit().
24168         (Statement.DoEmit): New protected abstract method, formerly knows
24169         as Statement.Emit().
24170
24171         * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
24172
24173 2002-10-11  Miguel de Icaza  <miguel@ximian.com>
24174
24175         * class.cs: Following the comment from 2002-09-26 to AddMethod, I
24176         have fixed a remaining problem: not every AddXXXX was adding a
24177         fully qualified name.  
24178
24179         Now everyone registers a fully qualified name in the DeclSpace as
24180         being defined instead of the partial name.  
24181
24182         Downsides: we are slower than we need to be due to the excess
24183         copies and the names being registered this way.  
24184
24185         The reason for this is that we currently depend (on the corlib
24186         bootstrap for instance) that types are fully qualified, because
24187         we dump all the types in the namespace, and we should really have
24188         types inserted into the proper namespace, so we can only store the
24189         basenames in the defined_names array.
24190
24191 2002-10-10  Martin Baulig  <martin@gnome.org>
24192
24193         * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
24194         from bug #31834, see the bug report for a testcase which is
24195         miscompiled.
24196
24197 2002-10-10  Martin Baulig  <martin@gnome.org>
24198
24199         * codegen.cs (EmitContext.Breaks): Removed, we're now using the
24200         flow analysis code for this.
24201
24202         * statement.cs (Do, While, For): Tell the flow analysis code about
24203         infinite loops.
24204         (FlowBranching.UsageVector): Added support for infinite loops.
24205         (Block.Resolve): Moved the dead code elimination here and use flow
24206         analysis to do it.
24207
24208 2002-10-09  Miguel de Icaza  <miguel@ximian.com>
24209
24210         * class.cs (Field.Define): Catch cycles on struct type
24211         definitions. 
24212
24213         * typemanager.cs (IsUnmanagedtype): Do not recursively check
24214         fields if the fields are static.  We only need to check instance
24215         fields. 
24216
24217         * expression.cs (As.DoResolve): Test for reference type.
24218
24219         * statement.cs (Using.ResolveExpression): Use
24220         ConvertImplicitRequired, not ConvertImplicit which reports an
24221         error on failture
24222         (Using.ResolveLocalVariableDecls): ditto.
24223
24224         * expression.cs (Binary.ResolveOperator): Report errors in a few
24225         places where we had to.
24226
24227         * typemanager.cs (IsUnmanagedtype): Finish implementation.
24228
24229 2002-10-08  Miguel de Icaza  <miguel@ximian.com>
24230
24231         * expression.cs: Use StoreFromPtr instead of extracting the type
24232         and then trying to use Stelem.  Patch is from hwang_rob@yahoo.ca
24233
24234         * ecore.cs (ImplicitReferenceConversion): It is possible to assign
24235         an enumeration value to a System.Enum, but System.Enum is not a
24236         value type, but an class type, so we need to box.
24237
24238         (Expression.ConvertExplicit): One codepath could return
24239         errors but not flag them.  Fix this.  Fixes #31853
24240
24241         * parameter.cs (Resolve): Do not allow void as a parameter type.
24242
24243 2002-10-06  Martin Baulig  <martin@gnome.org>
24244
24245         * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
24246         if it's a class type and not a struct.  Fixes #31815.
24247
24248 2002-10-06  Martin Baulig  <martin@gnome.org>
24249
24250         * statement.cs: Reworked the flow analysis code a bit to make it
24251         usable for dead code elimination.
24252
24253 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24254
24255         * cs-parser.jay: allow empty source files. Fixes bug #31781.
24256
24257 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24258
24259         * expression.cs (ComposedCast.DoResolveType): A quick workaround
24260         to fix the test 165, will investigate deeper.
24261
24262 2002-10-04  Martin Baulig  <martin@gnome.org>
24263
24264         * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
24265         finally blocks actually work.
24266         (Try.Resolve): We don't need to create a sibling for `finally' if
24267         there is no finally block.
24268
24269 2002-10-04  Martin Baulig  <martin@gnome.org>
24270
24271         * class.cs (Constructor.Define): The default accessibility for a
24272         non-default constructor is private, not public.
24273
24274 2002-10-04  Miguel de Icaza  <miguel@ximian.com>
24275
24276         * class.cs (Constructor): Make AllowedModifiers public, add
24277         EXTERN.
24278
24279         * cs-parser.jay: Perform the modifiers test here, as the
24280         constructor for the Constructor class usually receives a zero
24281         because of the way we create it (first we create, later we
24282         customize, and we were never checking the modifiers).
24283
24284         * typemanager.cs (Typemanager.LookupTypeDirect): This new function
24285         is a version of LookupTypeReflection that includes the type-name
24286         cache.  This can be used as a fast path for functions that know
24287         the fully qualified name and are only calling into *.GetType() to
24288         obtain a composed type.
24289
24290         This is also used by TypeManager.LookupType during its type
24291         composition.
24292
24293         (LookupType): We now also track the real type name, as sometimes
24294         we can get a quey for the real type name from things like
24295         ComposedCast.  This fixes bug 31422.
24296
24297         * expression.cs (ComposedCast.Resolve): Since we are obtaining a
24298         complete type fullname, it does not have to go through the type
24299         resolution system to obtain the composed version of the type (for
24300         obtaining arrays or pointers).
24301
24302         (Conditional.Emit): Use the EmitBoolExpression to
24303         generate nicer code, as requested by Paolo.
24304
24305         (ArrayCreation.CheckIndices): Use the patch from
24306         hwang_rob@yahoo.ca to validate the array initializers. 
24307
24308 2002-10-03  Miguel de Icaza  <miguel@ximian.com>
24309
24310         * class.cs (ConstructorInitializer.Emit): simplify code by using
24311         Invocation.EmitCall, and at the same time, fix the bugs in calling
24312         parent constructors that took variable arguments. 
24313
24314         * ecore.cs (Expression.ConvertNumericExplicit,
24315         Expression.ImplicitNumericConversion): Remove the code that
24316         manually wrapped decimal (InternalTypeConstructor call is now gone
24317         as well).
24318
24319         * expression.cs (Cast.TryReduce): Also handle decimal types when
24320         trying to perform a constant fold on the type.
24321
24322         * typemanager.cs (IsUnmanagedtype): Partially implemented.
24323
24324         * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
24325         that only turned off an error report, and did nothing else. 
24326
24327 2002-10-02  Miguel de Icaza  <miguel@ximian.com>
24328
24329         * driver.cs: Handle and ignore /fullpaths
24330
24331 2002-10-01  Miguel de Icaza  <miguel@ximian.com>
24332
24333         * expression.cs (Binary.ResolveOperator): Catch the case where
24334         DoNumericPromotions returns true, 
24335
24336         (Binary.DoNumericPromotions): Simplify the code, and the tests.
24337
24338 2002-09-27  Miguel de Icaza  <miguel@ximian.com>
24339
24340         * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
24341         report error 70.
24342
24343 2002-09-26  Miguel de Icaza  <miguel@ximian.com>
24344
24345         * ecore.cs (ConvertNumericExplicit): It is not enough that the
24346         conversion exists, but it is also required that the conversion be
24347         performed.  This manifested in "(Type64Enum) 2".  
24348
24349         * class.cs (TypeManager.AddMethod): The fix is not to change
24350         AddEnum, because that one was using a fully qualified name (every
24351         DeclSpace derivative does), but to change the AddMethod routine
24352         that was using an un-namespaced name.  This now correctly reports
24353         the duplicated name.
24354
24355         Revert patch until I can properly fix it.  The issue
24356         is that we have a shared Type space across all namespaces
24357         currently, which is wrong.
24358
24359         Options include making the Namespace a DeclSpace, and merge
24360         current_namespace/current_container in the parser.
24361
24362 2002-09-25  Miguel de Icaza  <miguel@ximian.com>
24363
24364         * cs-parser.jay: Improve error reporting when we get a different
24365         kind of expression in local_variable_type and
24366         local_variable_pointer_type. 
24367
24368         Propagate this to avoid missleading errors being reported.
24369
24370         * ecore.cs (ImplicitReferenceConversion): treat
24371         TypeManager.value_type as a target just like object_type.   As
24372         code like this:
24373
24374         ValueType v = 1;
24375
24376         Is valid, and needs to result in the int 1 being boxed before it
24377         is assigned to the value type v.
24378
24379         * class.cs (TypeContainer.AddEnum): Use the basename, not the name
24380         to validate the enumeration name.
24381
24382         * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
24383         EmitDynamicInitializers for the criteria to use Ldelema.  Thanks
24384         to hwang_rob@yahoo.ca for finding the bug and providing a patch.
24385
24386         * ecore.cs (TryImplicitIntConversion): When doing an
24387         implicit-enumeration-conversion, check if the type is 64-bits and
24388         perform a conversion before passing to EnumConstant.
24389
24390 2002-09-23  Miguel de Icaza  <miguel@ximian.com>
24391
24392         * decl.cs (Error_AmbiguousTypeReference); New routine used to
24393         report ambiguous type references.  Unlike the MS version, we
24394         report what the ambiguity is.   Innovation at work ;-)
24395
24396         (DeclSpace.FindType): Require a location argument to
24397         display when we display an ambiguous error.
24398
24399         * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
24400
24401         * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
24402
24403         * expression.cs (EmitDynamicInitializers): Apply patch from
24404         hwang_rob@yahoo.ca that fixes the order in which we emit our
24405         initializers. 
24406
24407 2002-09-21  Martin Baulig  <martin@gnome.org>
24408
24409         * delegate.cs (Delegate.VerifyApplicability): Make this work if the
24410         delegate takes no arguments.
24411
24412 2002-09-20  Miguel de Icaza  <miguel@ximian.com>
24413
24414         * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
24415         from integers.
24416
24417         * expression.cs: Extract the underlying type.
24418
24419         * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
24420
24421         * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
24422
24423 2002-09-19  Miguel de Icaza  <miguel@ximian.com>
24424
24425         * class.cs (TypeContainer.DefineType): We can not use the nice
24426         PackingSize with the size set to 1 DefineType method, because it
24427         will not allow us to define the interfaces that the struct
24428         implements.
24429
24430         This completes the fixing of bug 27287
24431
24432         * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
24433         means also structs.  This fixes part of the problem. 
24434         (Expresion.ImplicitReferenceConversionExists): ditto.
24435
24436         * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
24437         error if there were no errors reported during the type lookup
24438         process, to avoid duplicates or redundant errors.  Without this
24439         you would get an ambiguous errors plus a type not found.  We have
24440         beaten the user enough with the first error.  
24441
24442         (DeclSparce.FindType): Emit a warning if we have an ambiguous
24443         reference. 
24444
24445         * ecore.cs (SimpleName.DoResolveType): If an error is emitted
24446         during the resolution process, stop the lookup, this avoids
24447         repeated error reports (same error twice).
24448
24449         * rootcontext.cs: Emit a warning if we have an ambiguous reference.
24450
24451         * typemanager.cs (LookupType): Redo the type lookup code to match
24452         the needs of System.Reflection.  
24453
24454         The issue is that System.Reflection requires references to nested
24455         types to begin with a "+" sign instead of a dot.  So toplevel
24456         types look like: "NameSpace.TopLevelClass", and nested ones look
24457         like "Namespace.TopLevelClass+Nested", with arbitrary nesting
24458         levels. 
24459
24460 2002-09-19  Martin Baulig  <martin@gnome.org>
24461
24462         * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
24463         says that a method always returns or always throws an exception,
24464         don't report the CS0161.
24465
24466         * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
24467         set `Returns = new_returns'.
24468
24469 2002-09-19  Martin Baulig  <martin@gnome.org>
24470
24471         * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
24472         to an enum constant, check for a CS0176.
24473
24474 2002-09-18  Miguel de Icaza  <miguel@ximian.com>
24475
24476         * class.cs (TypeContainer.CheckPairedOperators): Now we check
24477         for operators that must be in pairs and report errors.
24478
24479         * ecore.cs (SimpleName.DoResolveType): During the initial type
24480         resolution process, when we define types recursively, we must
24481         check first for types in our current scope before we perform
24482         lookups in the enclosing scopes.
24483
24484         * expression.cs (MakeByteBlob): Handle Decimal blobs.
24485
24486         (Invocation.VerifyArgumentsCompat): Call
24487         TypeManager.TypeToCoreType on the parameter_type.GetElementType.
24488         I thought we were supposed to always call this, but there are a
24489         few places in the code where we dont do it.
24490
24491 2002-09-17  Miguel de Icaza  <miguel@ximian.com>
24492
24493         * driver.cs: Add support in -linkres and -resource to specify the
24494         name of the identifier.
24495
24496 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24497
24498         * ecore.cs (StandardConversionExists): Sync with the conversion
24499         code: allow anything-* to void* conversions.
24500
24501         (FindMostSpecificSource): Use an Expression argument
24502         instead of a Type, because we might be handed over a Literal which
24503         gets a few more implicit conversions that plain types do not.  So
24504         this information was being lost.
24505
24506         Also, we drop the temporary type-holder expression when not
24507         required.
24508
24509 2002-09-17  Martin Baulig  <martin@gnome.org>
24510
24511         * class.cs (PropertyBase.CheckBase): Don't check the base class if
24512         this is an explicit interface implementation.
24513
24514 2002-09-17  Martin Baulig  <martin@gnome.org>
24515
24516         * class.cs (PropertyBase.CheckBase): Make this work for indexers with
24517         different `IndexerName' attributes.
24518
24519         * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
24520         (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
24521         virtual CommonResolve().
24522
24523 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
24524
24525         * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
24526         and convert that to the UnderlyingType.
24527
24528         * statement.cs (Foreach.Resolve): Indexers are just like variables
24529         or PropertyAccesses.
24530
24531         * cs-tokenizer.cs (consume_string): Track line numbers and columns
24532         inside quoted strings, we were not doing this before.
24533
24534 2002-09-16  Martin Baulig  <martin@gnome.org>
24535
24536         * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
24537         resolve it.  This is needed for the definite assignment check of the
24538         instance expression, fixes bug #29846.
24539         (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
24540
24541 2002-09-16  Nick Drochak  <ndrochak@gol.com>
24542
24543         * parameter.cs: Fix compile error.  Cannot reference static member
24544         from an instance object.  Is this an mcs bug?
24545
24546 2002-09-14  Martin Baulig  <martin@gnome.org>
24547
24548         * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
24549         multiple times.  Fixes bug #30295, added test-166.cs.
24550
24551 2002-09-14  Martin Baulig  <martin@gnome.org>
24552
24553         * statement.cs (Block.Emit): Don't emit unreachable code.
24554         (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
24555         `break' statements.
24556         (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
24557
24558 2002-09-14  Martin Baulig  <martin@gnome.org>
24559
24560         * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
24561         is set.
24562
24563 2002-09-14  Martin Baulig  <martin@gnome.org>
24564
24565         * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
24566         if `type == parent' since in this case `type.IsSubclassOf (parent)' will
24567         be false on the ms runtime.
24568
24569 2002-09-13  Martin Baulig  <martin@gnome.org>
24570
24571         * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
24572         the CS0038 error message.
24573
24574 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
24575
24576         * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
24577         constant inside, return it.
24578
24579 2002-09-12  Martin Baulig  <martin@gnome.org>
24580
24581         * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
24582         implicit conversion can be done between enum types.
24583
24584         * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
24585         check whether an implicit conversion to the current enum's UnderlyingType
24586         exists and report an error if not.
24587
24588         * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
24589         without debugging support.
24590
24591         * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
24592         Fixes bug #30235.  Thanks to Ricardo Fernández Pascual.
24593
24594 2002-09-12  Martin Baulig  <martin@gnome.org>
24595
24596         * typemanager.cs (TypeManager.IsNestedChildOf): New method.
24597
24598         * ecore.cs (IMemberExpr.DeclaringType): New property.
24599         (SimpleName.SimpleNameResolve): Check whether we're accessing a
24600         nonstatic member of an outer type (CS0038).
24601
24602 2002-09-11  Miguel de Icaza  <miguel@ximian.com>
24603
24604         * driver.cs: Activate the using-error detector at warning level
24605         4 (at least for MS-compatible APIs).
24606
24607         * namespace.cs (VerifyUsing): Small buglett fix.
24608
24609         * pending.cs (PendingImplementation): pass the container pointer. 
24610
24611         * interface.cs (GetMethods): Allow for recursive definition.  Long
24612         term, I would like to move every type to support recursive
24613         definitions, not the current ordering mechanism that we have right
24614         now.
24615
24616         The situation is this: Attributes are handled before interfaces,
24617         so we can apply attributes to interfaces.  But some attributes
24618         implement interfaces, we will now handle the simple cases
24619         (recursive definitions will just get an error).  
24620
24621         * parameter.cs: Only invalidate types at the end if we fail to
24622         lookup all types.  
24623
24624 2002-09-09  Martin Baulig  <martin@gnome.org>
24625
24626         * ecore.cs (PropertyExpr.Emit): Also check for
24627         TypeManager.system_int_array_get_length so this'll also work when
24628         compiling corlib.  Fixes #30003.
24629
24630 2002-09-09  Martin Baulig  <martin@gnome.org>
24631
24632         * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
24633         and throw an exception if we can't get the type's size.  Fixed #30040,
24634         added test-165.cs.
24635
24636 2002-09-09  Martin Baulig  <martin@gnome.org>
24637
24638         * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
24639
24640         * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
24641         context.  Fixes bug #30027.
24642
24643         * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
24644         virtual functions.  Fixes bug #30043, added test-164.cs.
24645
24646 2002-09-08  Ravi Pratap  <ravi@ximian.com>
24647
24648         * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
24649
24650 2002-09-08  Nick Drochak  <ndrochak@gol.com>
24651
24652         * driver.cs: Use an object to get the windows codepage since it's not a
24653         static property.
24654
24655 2002-09-08  Miguel de Icaza  <miguel@ximian.com>
24656
24657         * statement.cs (For.Emit): for infinite loops (test == null)
24658         return whether there is a break inside, not always "true".
24659
24660         * namespace.cs (UsingEntry): New struct to hold the name of the
24661         using definition, the location where it is defined, and whether it
24662         has been used in a successful type lookup.
24663
24664         * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
24665         strings.
24666
24667         * decl.cs: ditto.
24668
24669 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24670
24671         * attribute.cs : Fix incorrect code which relied on catching
24672         a NullReferenceException to detect a null being passed in
24673         where an object was expected.
24674
24675 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
24676
24677         * statement.cs (Try): flag the catch variable as assigned
24678
24679         * expression.cs (Cast): Simplified by using ResolveType instead of
24680         manually resolving.
24681
24682         * statement.cs (Catch): Fix bug by using ResolveType.
24683
24684 2002-09-06  Ravi Pratap  <ravi@ximian.com>
24685
24686         * expression.cs (BetterConversion): Special case for when we have
24687         a NullLiteral as the argument and we have to choose between string
24688         and object types - we choose string the way csc does.
24689
24690         * attribute.cs (Attribute.Resolve): Catch the
24691         NullReferenceException and report error #182 since the Mono
24692         runtime no more has the bug and having this exception raised means
24693         we tried to select a constructor which takes an object and is
24694         passed a null.
24695
24696 2002-09-05  Ravi Pratap  <ravi@ximian.com>
24697
24698         * expression.cs (Invocation.OverloadResolve): Flag a nicer error
24699         message (1502, 1503) when we can't locate a method after overload
24700         resolution. This is much more informative and closes the bug
24701         Miguel reported.
24702
24703         * interface.cs (PopulateMethod): Return if there are no argument
24704         types. Fixes a NullReferenceException bug.
24705
24706         * attribute.cs (Attribute.Resolve): Ensure we allow TypeOf
24707         expressions too. Previously we were checking only in one place for
24708         positional arguments leaving out named arguments.
24709
24710         * ecore.cs (ImplicitNumericConversion): Conversion from underlying
24711         type to the enum type is not allowed. Remove code corresponding to
24712         that.
24713
24714         (ConvertNumericExplicit): Allow explicit conversions from
24715         the underlying type to enum type. This precisely follows the spec
24716         and closes a bug filed by Gonzalo.
24717
24718 2002-09-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24719
24720         * compiler.csproj:
24721         * compiler.csproj.user: patch from Adam Chester (achester@bigpond.com).
24722
24723 2002-09-03  Miguel de Icaza  <miguel@ximian.com>
24724
24725         * statement.cs (SwitchLabel.ResolveAndReduce): In the string case,
24726         it was important that we stored the right value after the
24727         reduction in `converted'.
24728
24729 2002-09-04  Martin Baulig  <martin@gnome.org>
24730
24731         * location.cs (Location.SymbolDocument): Use full pathnames for the
24732         source files.
24733
24734 2002-08-30  Miguel de Icaza  <miguel@ximian.com>
24735
24736         * expression.cs (ComposedCast): Use DeclSparce.ResolveType instead
24737         of the expression resolve mechanism, because that will catch the
24738         SimpleName error failures.
24739
24740         (Conditional): If we can not resolve the
24741         expression, return, do not crash.
24742
24743 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24744
24745         * cs-tokenizer.cs:
24746         (location): display token name instead of its number.
24747
24748 2002-08-28  Martin Baulig  <martin@gnome.org>
24749
24750         * expression.cs (Binary.ResolveOperator): Don't silently return
24751         but return an error if an operator cannot be applied between two
24752         enum types.
24753
24754 2002-08-28  Martin Baulig  <martin@gnome.org>
24755
24756         * class.cs (Constructor.Define): Set the permission attributes
24757         correctly instead of making all constructors public.
24758
24759 2002-08-28  Martin Baulig  <martin@gnome.org>
24760
24761         * ecore.cs (Expression.DoResolve): Do a TypeManager.MemberLook
24762         for private members before reporting a CS0103; if we find anything,
24763         it's a CS0122.
24764
24765 2002-08-28  Martin Baulig  <martin@gnome.org>
24766
24767         * typemanager.cs (TypeManager.FilterWithClosure): It's not enough
24768         to check whether `closure_start_type == closure_invocation_type',
24769         we also need to check whether `m.DeclaringType == closure_invocation_type'
24770         before bypassing the permission checks.  We might be accessing
24771         protected/private members from the base class.
24772         (TypeManager.RealMemberLookup): Only set private_ok if private
24773         members were requested via BindingFlags.NonPublic.
24774
24775         * ecore.cs (MethodGroupExpr.IsExplicitImpl): New property.
24776
24777         * expression.cs (MemberAccess.ResolveMemberAccess): Set
24778         MethodGroupExpr.IsExplicitImpl if appropriate.
24779         (Invocation.DoResolve): Don't report the CS0120 for explicit
24780         interface implementations.
24781
24782 2002-08-27  Martin Baulig  <martin@gnome.org>
24783
24784         * expression.cs (Invocation.DoResolve): If this is a static
24785         method and we don't have an InstanceExpression, we must report
24786         a CS0120.
24787
24788 2002-08-25  Martin Baulig  <martin@gnome.org>
24789
24790         * expression.cs (Binary.ResolveOperator): Don't allow `!=' and
24791         `==' between a valuetype and an object.
24792
24793 2002-08-25  Miguel de Icaza  <miguel@ximian.com>
24794
24795         * ecore.cs (TypeExpr): Provide a ToString method.
24796
24797 2002-08-24  Martin Baulig  <martin@gnome.org>
24798
24799         * codegen.cs (CodeGen.InitMonoSymbolWriter): The symbol file is
24800         now called proggie.dbg and it's a binary file.
24801
24802 2002-08-23  Martin Baulig  <martin@gnome.org>
24803
24804         * decl.cs (MemberCache.AddMethods): Ignore varargs methods.
24805
24806 2002-08-23  Martin Baulig  <martin@gnome.org>
24807
24808         * struct.cs (MyStructInfo.ctor): Make this work with empty
24809         structs; it's not allowed to use foreach() on null.
24810
24811 2002-08-23  Martin Baulig  <martin@gnome.org>
24812
24813         * codegen.cs (CodeGen.InitMonoSymbolWriter): Tell the symbol
24814         writer the full pathname of the generated assembly.
24815
24816 2002-08-23  Martin Baulig  <martin@gnome.org>
24817
24818         * statements.cs (FlowBranching.UsageVector.MergeChildren):
24819         A `finally' block never returns or breaks; improved handling of
24820         unreachable code.
24821
24822 2002-08-23  Martin Baulig  <martin@gnome.org>
24823
24824         * statement.cs (Throw.Resolve): Allow `throw null'.
24825
24826 2002-08-23  Martin Baulig  <martin@gnome.org>
24827
24828         * expression.cs (MemberAccess.ResolveMemberAccess): If this is an
24829         EventExpr, don't do a DeclaredOnly MemberLookup, but check whether
24830         `ee.EventInfo.DeclaringType == ec.ContainerType'.  The
24831         MemberLookup would return a wrong event if this is an explicit
24832         interface implementation and the class has an event with the same
24833         name.
24834
24835 2002-08-23  Martin Baulig  <martin@gnome.org>
24836
24837         * statement.cs (Block.AddChildVariableNames): New public method.
24838         (Block.AddChildVariableName): Likewise.
24839         (Block.IsVariableNameUsedInChildBlock): Likewise.
24840         (Block.AddVariable): Check whether a variable name has already
24841         been used in a child block.
24842
24843         * cs-parser.jay (declare_local_variables): Mark all variable names
24844         from the current block as being used in a child block in the
24845         implicit block.
24846
24847 2002-08-23  Martin Baulig  <martin@gnome.org>
24848
24849         * codegen.cs (CodeGen.InitializeSymbolWriter): Abort if we can't
24850         find the symbol writer.
24851
24852         * driver.cs: csc also allows the arguments to /define being
24853         separated by commas, not only by semicolons.
24854
24855 2002-08-23  Martin Baulig  <martin@gnome.org>
24856
24857         * interface.cs (Interface.GetMembers): Added static check for events.
24858
24859 2002-08-15  Martin Baulig  <martin@gnome.org>
24860
24861         * class.cs (MethodData.EmitDestructor): In the Expression.MemberLookup
24862         call, use ec.ContainerType.BaseType as queried_type and invocation_type.
24863
24864         * ecore.cs (Expression.MemberLookup): Added documentation and explained
24865         why the MethodData.EmitDestructor() change was necessary.
24866
24867 2002-08-20  Martin Baulig  <martin@gnome.org>
24868
24869         * class.cs (TypeContainer.FindMembers): Added static check for events.
24870
24871         * decl.cs (MemberCache.AddMembers): Handle events like normal members.
24872
24873         * typemanager.cs (TypeHandle.GetMembers): When queried for events only,
24874         use Type.GetEvents(), not Type.FindMembers().
24875
24876 2002-08-20  Martin Baulig  <martin@gnome.org>
24877
24878         * decl.cs (MemberCache): Added a special method cache which will
24879         be used for method-only searched.  This ensures that a method
24880         search will return a MethodInfo with the correct ReflectedType for
24881         inherited methods.      
24882
24883 2002-08-20  Martin Baulig  <martin@gnome.org>
24884
24885         * decl.cs (DeclSpace.FindMembers): Made this public.
24886
24887 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24888
24889         * delegate.cs: fixed build on windows.
24890         [FIXME:  Filed as bug #29150: MCS must report these errors.]
24891
24892 2002-08-19  Ravi Pratap  <ravi@ximian.com>
24893
24894         * ecore.cs (StandardConversionExists): Return a false
24895         if we are trying to convert the void type to anything else
24896         since that is not allowed.
24897
24898         * delegate.cs (DelegateInvocation.DoResolve): Ensure that
24899         we flag error 70 in the event an event is trying to be accessed
24900         directly from outside the declaring type.
24901
24902 2002-08-20  Martin Baulig  <martin@gnome.org>
24903
24904         * typemanager.cs, decl.cs: Moved MemberList, IMemberContainer and
24905         MemberCache from typemanager.cs to decl.cs.
24906
24907 2002-08-19  Martin Baulig  <martin@gnome.org>
24908
24909         * class.cs (TypeContainer): Implement IMemberContainer.
24910         (TypeContainer.DefineMembers): Create the MemberCache.
24911         (TypeContainer.FindMembers): Do better BindingFlags checking; only
24912         return public members if BindingFlags.Public was given, check
24913         whether members are static.
24914
24915 2002-08-16  Martin Baulig  <martin@gnome.org>
24916
24917         * decl.cs (DeclSpace.Define): Splitted this in Define and
24918         DefineMembers.  DefineMembers is called first and initializes the
24919         MemberCache.
24920
24921         * rootcontext.cs (RootContext.DefineMembers): New function.  Calls
24922         DefineMembers() on all our DeclSpaces.
24923
24924         * class.cs (TypeContainer.Define): Moved all code to DefineMembers(),
24925         but call DefineMembers() on all nested interfaces.  We call their
24926         Define() in our new Define() function.
24927
24928         * interface.cs (Interface): Implement IMemberContainer.
24929         (Interface.Define): Moved all code except the attribute stuf to
24930         DefineMembers().
24931         (Interface.DefineMembers): Initialize the member cache.
24932
24933         * typemanager.cs (IMemberFinder): Removed this interface, we don't
24934         need this anymore since we can use MemberCache.FindMembers directly.
24935
24936 2002-08-19  Martin Baulig  <martin@gnome.org>
24937
24938         * typemanager.cs (MemberCache): When creating the cache for an
24939         interface type, add all inherited members.
24940         (TypeManager.MemberLookup_FindMembers): Changed `ref bool searching'
24941         to `out bool used_cache' and documented it.
24942         (TypeManager.MemberLookup): If we already used the cache in the first
24943         iteration, we don't need to do the interfaces check.
24944
24945 2002-08-19  Martin Baulig  <martin@gnome.org>
24946
24947         * decl.cs (DeclSpace.FindMembers): New abstract method.  Moved this
24948         here from IMemberFinder and don't implement this interface anymore.
24949         (DeclSpace.MemberCache): Moved here from IMemberFinder.
24950
24951         * typemanager.cs (IMemberFinder): This interface is now only used by
24952         classes which actually support the member cache.
24953         (TypeManager.builder_to_member_finder): Renamed to builder_to_declspace
24954         since we only put DeclSpaces into this Hashtable.
24955         (MemberLookup_FindMembers): Use `builder_to_declspace' if the type is
24956         a dynamic type and TypeHandle.GetTypeHandle() otherwise.
24957
24958 2002-08-16  Martin Baulig  <martin@gnome.org>
24959
24960         * typemanager.cs (ICachingMemberFinder): Removed.
24961         (IMemberFinder.MemberCache): New property.
24962         (TypeManager.FindMembers): Merged this with RealFindMembers().
24963         This function will never be called from TypeManager.MemberLookup()
24964         so we can't use the cache here, just the IMemberFinder.
24965         (TypeManager.MemberLookup_FindMembers): Check whether the
24966         IMemberFinder has a MemberCache and call the cache's FindMembers
24967         function.
24968         (MemberCache): Rewrote larger parts of this yet another time and
24969         cleaned it up a bit.
24970
24971 2002-08-15  Miguel de Icaza  <miguel@ximian.com>
24972
24973         * driver.cs (LoadArgs): Support quoting.
24974
24975         (Usage): Show the CSC-like command line arguments.
24976
24977         Improved a few error messages.
24978
24979 2002-08-15  Martin Baulig  <martin@gnome.org>
24980
24981         * typemanager.cs (IMemberContainer.Type): New property.
24982         (IMemberContainer.IsInterface): New property.
24983
24984         The following changes are conditional to BROKEN_RUNTIME, which is
24985         defined at the top of the file.
24986
24987         * typemanager.cs (MemberCache.MemberCache): Don't add the base
24988         class'es members, but add all members from TypeHandle.ObjectType
24989         if we're an interface.
24990         (MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
24991         is the current type.
24992         (MemberCache.CacheEntry.Container): Removed this field.
24993         (TypeHandle.GetMembers): Include inherited members.
24994
24995 2002-08-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24996
24997         * typemanager.cs: fixed compilation and added a comment on a field that
24998         is never used.
24999
25000 2002-08-15  Martin Baulig  <martin@gnome.org>
25001
25002         * class.cs (ConstructorInitializer.Resolve): In the
25003         Expression.MemberLookup call, use the queried_type as
25004         invocation_type.
25005
25006         * typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
25007         declared' attribute, it's always true.
25008         (IMemberContainer.Parent, IMemberContainer.Name): New properties.
25009         (TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
25010         temporary wrapper for FindMembers which tells MemberLookup whether
25011         members from the base classes are included in the return value.
25012         This will go away soon.
25013         (TypeManager.MemberLookup): Use this temporary hack here; once the
25014         new MemberCache is completed, we don't need to do the DeclaredOnly
25015         looping here anymore since the MemberCache will take care of this.
25016         (TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
25017         (MemberCache): When creating the MemberCache for a class, get
25018         members from the current class and all its base classes.
25019         (MemberCache.CacheEntry.Container): New field.  This is a
25020         temporary hack until the Mono runtime is fixed to distinguish
25021         between ReflectedType and DeclaringType.  It allows us to use MCS
25022         with both the MS runtime and the unfixed Mono runtime without
25023         problems and without accecting performance.
25024         (MemberCache.SearchMembers): The DeclaredOnly looping from
25025         TypeManager.MemberLookup is now done here.      
25026
25027 2002-08-14  Martin Baulig  <martin@gnome.org>
25028
25029         * statement.cs (MyStructInfo.MyStructInfo): Don't call
25030         Type.GetFields on dynamic types but get the fields from the
25031         corresponding TypeContainer.
25032         (MyStructInfo.GetStructInfo): Added check for enum types.
25033
25034         * typemanager.cs (MemberList.IsSynchronized): Implemented.
25035         (MemberList.SyncRoot): Implemented.
25036         (TypeManager.FilterWithClosure): No need to check permissions if
25037         closure_start_type == closure_invocation_type, don't crash if
25038         closure_invocation_type is null.
25039
25040 2002-08-13  Martin Baulig  <martin@gnome.org>
25041
25042         Rewrote TypeContainer.FindMembers to use a member cache.  This
25043         gives us a speed increase of about 35% for the self-hosting MCS
25044         build and of about 15-20% for the class libs (both on GNU/Linux).
25045
25046         * report.cs (Timer): New class to get enhanced profiling.  This
25047         whole class is "TIMER" conditional since it remarkably slows down
25048         compilation speed.
25049
25050         * class.cs (MemberList): New class.  This is an IList wrapper
25051         which we're now using instead of passing MemberInfo[]'s around to
25052         avoid copying this array unnecessarily.
25053         (IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
25054         (ICachingMemberFinder, IMemberContainer): New interface.
25055         (TypeManager.FilterWithClosure): If `criteria' is null, the name
25056         has already been checked, otherwise use it for the name comparision.
25057         (TypeManager.FindMembers): Renamed to RealMemberFinder and
25058         provided wrapper which tries to use ICachingMemberFinder.FindMembers
25059         if possible.  Returns a MemberList, not a MemberInfo [].
25060         (TypeHandle): New class, implements IMemberContainer.  We create
25061         one instance of this class per type, it contains a MemberCache
25062         which is used to do the member lookups.
25063         (MemberCache): New class.  Each instance of this class contains
25064         all members of a type and a name-based hash table.
25065         (MemberCache.FindMembers): This is our new member lookup
25066         function.  First, it looks up all members of the requested name in
25067         the hash table.  Then, it walks this list and sorts out all
25068         applicable members and returns them.
25069
25070 2002-08-13  Martin Baulig  <martin@gnome.org>
25071
25072         In addition to a nice code cleanup, this gives us a performance
25073         increase of about 1.4% on GNU/Linux - not much, but it's already
25074         half a second for the self-hosting MCS compilation.
25075
25076         * typemanager.cs (IMemberFinder): New interface.  It is used by
25077         TypeManager.FindMembers to call FindMembers on a TypeContainer,
25078         Enum, Delegate or Interface.
25079         (TypeManager.finder_to_member_finder): New PtrHashtable.
25080         (TypeManager.finder_to_container): Removed.
25081         (TypeManager.finder_to_delegate): Removed.
25082         (TypeManager.finder_to_interface): Removed.
25083         (TypeManager.finder_to_enum): Removed.
25084
25085         * interface.cs (Interface): Implement IMemberFinder.
25086
25087         * delegate.cs (Delegate): Implement IMemberFinder.
25088
25089         * enum.cs (Enum): Implement IMemberFinder.
25090
25091         * class.cs (TypeContainer): Implement IMemberFinder.
25092
25093 2002-08-12  Martin Baulig  <martin@gnome.org>
25094
25095         * ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.
25096
25097 2002-08-12  Martin Baulig  <martin@gnome.org>
25098
25099         * ecore.cs (ITypeExpression): New interface for expressions which
25100         resolve to a type.
25101         (TypeExpression): Renamed to TypeLookupExpression.
25102         (Expression.DoResolve): If we're doing a types-only lookup, the
25103         expression must implement the ITypeExpression interface and we
25104         call DoResolveType() on it.
25105         (SimpleName): Implement the new ITypeExpression interface.
25106         (SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
25107         hack, the situation that we're only looking up types can't happen
25108         anymore when this method is called.  Moved the type lookup code to
25109         DoResolveType() and call it.
25110         (SimpleName.DoResolveType): This ITypeExpression interface method
25111         is now doing the types-only lookup.
25112         (TypeExpr, TypeLookupExpression): Implement ITypeExpression.
25113         (ResolveFlags): Added MaskExprClass.
25114
25115         * expression.cs (MemberAccess): Implement the ITypeExpression
25116         interface.
25117         (MemberAccess.DoResolve): Added support for a types-only lookup
25118         when we're called via ITypeExpression.DoResolveType().
25119         (ComposedCast): Implement the ITypeExpression interface.
25120
25121         * codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
25122         Expression.Resolve() with ResolveFlags.Type instead.
25123
25124 2002-08-12  Martin Baulig  <martin@gnome.org>
25125
25126         * interface.cs (Interface.Define): Apply attributes.
25127
25128         * attribute.cs (Attribute.ApplyAttributes): Added support for
25129         interface attributes.
25130
25131 2002-08-11  Martin Baulig  <martin@gnome.org>
25132
25133         * statement.cs (Block.Emit): Only check the "this" variable if we
25134         do not always throw an exception.
25135
25136         * ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
25137         whether the property has a set accessor.
25138
25139 2002-08-11  Martin Baulig  <martin@gnome.org>
25140
25141         Added control flow analysis support for structs.
25142
25143         * ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
25144         with control flow analysis turned off.
25145         (IVariable): New interface.
25146         (SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
25147         returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
25148         (FieldExpr.DoResolve): Resolve the instance expression with flow
25149         analysis turned off and do the definite assignment check after the
25150         resolving when we know what the expression will resolve to.
25151
25152         * expression.cs (LocalVariableReference, ParameterReference):
25153         Implement the new IVariable interface, only call the flow analysis
25154         code if ec.DoFlowAnalysis is true.
25155         (This): Added constructor which takes a Block argument.  Implement
25156         the new IVariable interface.
25157         (MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
25158         DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
25159         This does the definite assignment checks for struct members.
25160
25161         * class.cs (Constructor.Emit): If this is a non-static `struct'
25162         constructor which doesn't have any initializer, call
25163         Block.AddThisVariable() to tell the flow analysis code that all
25164         struct elements must be initialized before control returns from
25165         the constructor.
25166
25167         * statement.cs (MyStructInfo): New public class.
25168         (UsageVector.this [VariableInfo vi]): Added `int field_idx'
25169         argument to this indexer.  If non-zero, check an individual struct
25170         member, not the whole struct.
25171         (FlowBranching.CheckOutParameters): Check struct members.
25172         (FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
25173         overloaded versions of these methods which take an additional
25174         `int field_idx' argument to check struct members.
25175         (FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
25176         overloaded versions of these methods which take an additional
25177         `string field_name' argument to check struct member.s
25178         (VariableInfo): Implement the IVariable interface.
25179         (VariableInfo.StructInfo): New public property.  Returns the
25180         MyStructInfo instance of the variable if it's a struct or null.
25181         (Block.AddThisVariable): New public method.  This is called from
25182         Constructor.Emit() for non-static `struct' constructor which do
25183         not have any initializer.  It creates a special variable for the
25184         "this" instance variable which will be checked by the flow
25185         analysis code to ensure that all of the struct's fields are
25186         initialized before control returns from the constructor.
25187         (UsageVector): Added support for struct members.  If a
25188         variable/parameter is a struct with N members, we reserve a slot
25189         in the usage vector for each member.  A struct is considered fully
25190         initialized if either the struct itself (slot 0) or all its
25191         members are initialized.
25192
25193 2002-08-08  Martin Baulig  <martin@gnome.org>
25194
25195         * driver.cs (Driver.MainDriver): Only report an error CS5001
25196         if there were no compilation errors.
25197
25198         * codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
25199         `UnsafeContext' property to determine whether the parent is in
25200         unsafe context rather than checking the parent's ModFlags:
25201         classes nested in an unsafe class are unsafe as well.
25202
25203 2002-08-08  Martin Baulig  <martin@gnome.org>
25204
25205         * statement.cs (UsageVector.MergeChildren): Distinguish between
25206         `Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
25207         we return.  Added test17() and test18() to test-154.cs.
25208
25209 2002-08-08  Martin Baulig  <martin@gnome.org>
25210
25211         * typemanager.cs (TypeManager.FilterWithClosure): If we have
25212         Family access, make sure the invoking type isn't a subclass of the
25213         queried type (that'd be a CS1540).
25214
25215         * ecore.cs (Expression.MemberLookup): Added overloaded version of
25216         this method which takes an additional `Type invocation_type'.
25217
25218         * expression.cs (BaseAccess.DoResolve): Use the base type as
25219         invocation and query type.
25220         (MemberAccess.DoResolve): If the lookup failed and we're about to
25221         report a CS0122, try a lookup with the ec.ContainerType - if this
25222         succeeds, we must report a CS1540.
25223
25224 2002-08-08  Martin Baulig  <martin@gnome.org>
25225
25226         * ecore.cs (IMemberExpr): Added `bool IsInstance' property.
25227         (MethodGroupExpr): Implement the IMemberExpr interface.
25228
25229         * expression (MemberAccess.ResolveMemberAccess): No need to have
25230         any special code for MethodGroupExprs anymore, they're now
25231         IMemberExprs.   
25232
25233 2002-08-08  Martin Baulig  <martin@gnome.org>
25234
25235         * typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
25236         Family, FamANDAssem and FamORAssem permissions.
25237         (TypeManager.IsSubclassOrNestedChildOf): New public method.
25238
25239 2002-08-08  Martin Baulig  <martin@gnome.org>
25240
25241         * statement.cs (FlowBranchingType): Added LOOP_BLOCK.
25242         (UsageVector.MergeChildren): `break' breaks unless we're in a switch
25243         or loop block.
25244
25245 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
25246
25247         * driver.cs: implemented /resource option to embed managed resources.
25248
25249 2002-08-07  Martin Baulig  <martin@gnome.org>
25250
25251         * class.cs (FieldBase.Initializer): Renamed to `init' and made private.
25252         (FieldBase.HasFieldInitializer): New public property.
25253         (FieldBase.GetInitializerExpression): New public method.  Resolves and
25254         returns the field initializer and makes sure it is only resolved once.
25255         (TypeContainer.EmitFieldInitializers): Call
25256         FieldBase.GetInitializerExpression to get the initializer, this ensures
25257         that it isn't resolved multiple times.
25258
25259         * codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
25260         the resolving process (SimpleName/MemberLookup) that we're currently
25261         emitting a field initializer (which must not access any instance members,
25262         this is an error CS0236).
25263
25264         * ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
25265         argument, if the `IsFieldInitializer' flag is set, we must report and
25266         error CS0236 and not an error CS0120.   
25267
25268 2002-08-07  Martin Baulig  <martin@gnome.org>
25269
25270         * ecore.cs (IMemberExpr): New public interface.
25271         (FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
25272         (SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
25273         if the expression is an IMemberExpr.
25274
25275         * expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
25276         to be null, implicitly default to `this' if we're non-static in
25277         this case.  Simplified the code a lot by using the new IMemberExpr
25278         interface.  Also fixed bug #28176 here.
25279
25280 2002-08-06  Martin Baulig  <martin@gnome.org>
25281
25282         * cs-parser.jay (SimpleLookup): Removed.  We need to create
25283         ParameterReferences during semantic analysis so that we can do a
25284         type-only search when resolving Cast, TypeOf and SizeOf.
25285         (block): Pass the `current_local_parameters' to the Block's
25286         constructor.
25287
25288         * class.cs (ConstructorInitializer): Added `Parameters parameters'
25289         argument to the constructor.
25290         (ConstructorInitializer.Resolve): Create a temporary implicit
25291         block with the parameters.
25292
25293         * ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
25294         references here if we aren't doing a type-only search.
25295
25296         * statement.cs (Block): Added constructor which takes a
25297         `Parameters parameters' argument.
25298         (Block.Parameters): New public property.
25299
25300         * support.cs (InternalParameters.Parameters): Renamed `parameters'
25301         to `Parameters' and made it public readonly.
25302
25303 2002-08-06  Martin Baulig  <martin@gnome.org>
25304
25305         * ecore.cs (Expression.Warning): Made this public as well.
25306
25307         * report.cs (Report.Debug): Print the contents of collections.
25308
25309 2002-08-06  Martin Baulig  <martin@gnome.org>
25310
25311         * ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
25312         used to tell Resolve() which kinds of expressions it may return.
25313         (Expression.Resolve): Added overloaded version of this method which
25314         takes a `ResolveFlags flags' argument.  This can be used to tell
25315         Resolve() which kinds of expressions it may return.  Reports a
25316         CS0118 on error.
25317         (Expression.ResolveWithSimpleName): Removed, use Resolve() with
25318         ResolveFlags.SimpleName.
25319         (Expression.Error118): Added overloaded version of this method which
25320         takes a `ResolveFlags flags' argument.  It uses the flags to determine
25321         which kinds of expressions are allowed.
25322
25323         * expression.cs (Argument.ResolveMethodGroup): New public method.
25324         Resolves an argument, but allows a MethodGroup to be returned.
25325         This is used when invoking a delegate.
25326
25327         * TODO: Updated a bit.
25328
25329 2002-08-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25330
25331         Fixed compilation with csc.
25332
25333         * ecore.cs: Expression.Error made public. Is this correct? Should
25334         Warning be made public too?
25335
25336         * expression.cs: use ea.Location instead of ea.loc.
25337         [FIXME:  Filed as bug #28607: MCS must report these errors.]
25338
25339 2002-08-06  Martin Baulig  <martin@gnome.org>
25340
25341         * ecore.cs (Expression.loc): Moved the location here instead of
25342         duplicating it in all derived classes.
25343         (Expression.Location): New public property.
25344         (Expression.Error, Expression.Warning): Made them non-static and
25345         removed the location argument.
25346         (Expression.Warning): Added overloaded version which takes an
25347         `int level' argument.
25348         (Expression.Error118): Make this non-static and removed the
25349         expression and location arguments.
25350         (TypeExpr): Added location argument to the constructor.
25351
25352         * expression.cs (StaticCallExpr): Added location argument to
25353         the constructor.
25354         (Indirection, PointerArithmetic): Likewise.
25355         (CheckedExpr, UnCheckedExpr): Likewise.
25356         (ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
25357         (StringPtr): Likewise.
25358
25359
25360 2002-08-05  Martin Baulig  <martin@gnome.org>
25361
25362         * expression.cs (BaseAccess.DoResolve): Actually report errors.
25363
25364         * assign.cs (Assign.DoResolve): Check whether the source
25365         expression is a value or variable.
25366
25367         * statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
25368         while resolving the corresponding blocks.
25369
25370         * interface.cs (Interface.GetInterfaceTypeByName): Actually report
25371         an error, don't silently return null.
25372
25373         * statement.cs (Block.AddVariable): Do the error reporting here
25374         and distinguish between CS0128 and CS0136.
25375         (Block.DoResolve): Report all unused labels (warning CS0164).
25376         (LabeledStatement): Pass the location to the constructor.
25377         (LabeledStatement.HasBeenReferenced): New property.
25378         (LabeledStatement.Resolve): Set it to true here.
25379
25380         * statement.cs (Return.Emit): Return success even after reporting
25381         a type mismatch error (CS0126 or CS0127), this is what csc does and
25382         it avoids confusing the users with any consecutive errors.
25383
25384 2002-08-05  Martin Baulig  <martin@gnome.org>
25385
25386         * enum.cs (Enum.LookupEnumValue): Catch circular definitions.
25387
25388         * const.cs (Const.LookupConstantValue): Catch circular definitions.
25389
25390         * expression.cs (MemberAccess.DoResolve): Silently return if an
25391         error has already been reported.
25392
25393         * ecore.cs (Expression.MemberLookupFinal): Silently return if an
25394         error has already been reported.
25395
25396 2002-08-05  Martin Baulig  <martin@gnome.org>
25397
25398         * statement.cs (UsageVector): Only initialize the `parameters'
25399         vector if we actually have any "out" parameters.
25400
25401 2002-08-05  Martin Baulig  <martin@gnome.org>
25402
25403         * expression.cs (Binary.ResolveOperator): When combining delegates,
25404         they must have the same type.
25405
25406 2002-08-05  Martin Baulig  <martin@gnome.org>
25407
25408         * typemanager.cs (TypeManager.GetArgumentTypes): Don't call
25409         PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
25410         work with the ms runtime and we also don't need it: if we're a
25411         PropertyBuilder and not in the `indexer_arguments' hash, then we
25412         are a property and not an indexer.
25413
25414         * class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
25415         Type.IsPointer and Type.IsByRef instead of Type.HasElementType
25416         since the latter one doesn't work with the ms runtime.
25417
25418 2002-08-03  Martin Baulig  <martin@gnome.org>
25419
25420         Fixed bugs #27998 and #22735.
25421
25422         * class.cs (Method.IsOperator): New public field.
25423         (Method.CheckBase): Report CS0111 if there's already a method
25424         with the same parameters in the current class.  Report CS0508 when
25425         attempting to change the return type of an inherited method.
25426         (MethodData.Emit): Report CS0179 if a method doesn't have a body
25427         and it's not marked abstract or extern.
25428         (PropertyBase): New abstract base class for Property and Indexer.
25429         (PropertyBase.CheckBase): Moved here from Property and made it work
25430         for indexers.
25431         (PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
25432         the same so we can reuse it there.
25433         (Property, Indexer): Derive from PropertyBase.
25434         (MethodSignature.inheritable_property_signature_filter): New delegate
25435         to find properties and indexers.
25436
25437         * decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
25438         argument and improved error reporting.
25439
25440         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
25441         EmptyReadOnlyParameters and made it a property.
25442
25443         * typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
25444         version of this method which takes a `PropertyInfo indexer'.
25445         (TypeManager.RegisterIndexer): New method.
25446
25447         * class.cs: Added myself as author of this file :-)
25448
25449 2002-08-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25450
25451         * class.cs: fixed compilation on windoze.
25452
25453 2002-08-03  Martin Baulig  <martin@gnome.org>
25454
25455         * interface.cs (Interface.GetInterfaceBases): Check whether all
25456         base interfaces are at least as accessible than the current one.
25457
25458         * class.cs (TypeContainer.GetClassBases): Check whether base types
25459         are at least as accessible than the current type.
25460         (TypeContainer.AsAccessible): Implemented and made non-static.
25461         (MemberBase.CheckParameters): Report errors if the accessibility
25462         checks fail.
25463
25464         * delegate.cs (Delegate.Delegate): The default visibility is
25465         internal for top-level types and private for nested types.
25466         (Delegate.Define): Report errors if the accessibility checks fail.
25467
25468         * enum.cs (Enum.Enum): The default visibility is internal for
25469         top-level types and private for nested types.
25470         (Enum.DefineType): Compute the correct visibility.
25471
25472         * modifiers.cs (Modifiers.TypeAttr): Added a version of this
25473         function which takes a `bool is_toplevel' instead of a TypeContainer.
25474
25475         * typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
25476         builtin type.
25477
25478 2002-08-02  Martin Baulig  <martin@gnome.org>
25479
25480         * expression.cs (LocalVariableReferenc): Added constructor which
25481         takes additional `VariableInfo vi' and `bool is_readonly' arguments.
25482         (LocalVariableReference.IsReadOnly): New property.
25483         (LocalVariableReference.DoResolveLValue): Report a CS1604 if the
25484         variable is readonly, use our own readonly flag to do this; you can
25485         use the new constructor to get a writable reference to a read-only
25486         variable.
25487
25488         * cs-parser.jay (foreach_statement, using_statement): Get a writable
25489         reference to the local variable.
25490
25491 2002-08-01  Miguel de Icaza  <miguel@ximian.com>
25492
25493         * rootcontext.cs (ResolveCore): Also include System.Exception
25494
25495         * statement.cs (Block.Emit): Do not emit the dead-code warnings if
25496         we reach an EmptyStatement.
25497
25498         (Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
25499         is also fine.
25500
25501         * expression.cs (Binary.ResolveOperator): Check error result in
25502         two places.
25503
25504         use brtrue/brfalse directly and avoid compares to null.
25505
25506 2002-08-02  Martin Baulig  <martin@gnome.org>
25507
25508         * class.cs (TypeContainer.Define): Define all nested interfaces here.
25509         Fixes bug #28407, added test-155.cs.
25510
25511 2002-08-01  Martin Baulig  <martin@gnome.org>
25512
25513         * class.cs (Event.EmitDefaultMethod): Make this work with static
25514         events.  Fixes #28311, added verify-3.cs.
25515
25516 2002-08-01  Martin Baulig  <martin@gnome.org>
25517
25518         * statement.cs (ForeachHelperMethods): Added `enumerator_type' and
25519         `is_disposable' fields.
25520         (Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
25521         `hm.is_disposable' if we're using the collection pattern.
25522         (Foreach.EmitCollectionForeach): Use the correct type for the
25523         enumerator's local variable, only emit the try/finally block if
25524         necessary (fixes #27713).
25525
25526 2002-08-01  Martin Baulig  <martin@gnome.org>
25527
25528         * ecore.cs (Expression.report118): Renamed to Error118 and made
25529         it public static.
25530
25531         * statement.cs (Throw.Resolve): Check whether the expression is of
25532         the correct type (CS0118) and whether the type derives from
25533         System.Exception (CS0155).
25534         (Catch.Resolve): New method.  Do the type lookup here and check
25535         whether it derives from System.Exception (CS0155).
25536         (Catch.CatchType, Catch.IsGeneral): New public properties.
25537
25538         * typemanager.cs (TypeManager.exception_type): Added.
25539
25540 2002-07-31  Miguel de Icaza  <miguel@ximian.com>
25541
25542         * driver.cs: Updated About function.
25543
25544 2002-07-31  Martin Baulig  <martin@gnome.org>
25545
25546         Implemented Control Flow Analysis.
25547
25548         * codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
25549         (EmitContext.CurrentBranching): Added.
25550         (EmitContext.StartFlowBranching): Added.
25551         (EmitContext.EndFlowBranching): Added.
25552         (EmitContext.KillFlowBranching): Added.
25553         (EmitContext.IsVariableAssigned): Added.
25554         (EmitContext.SetVariableAssigned): Added.
25555         (EmitContext.IsParameterAssigned): Added.
25556         (EmitContext.SetParameterAssigned): Added.
25557         (EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
25558         Added control flow analysis stuff here.
25559
25560         * expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
25561         resolve the expression as lvalue.
25562         (LocalVariableReference.DoResolve): Check whether the variable has
25563         already been assigned.
25564         (ParameterReference.DoResolveLValue): Override lvalue resolve to mark
25565         the parameter as assigned here.
25566         (ParameterReference.DoResolve): Check whether the parameter has already
25567         been assigned.
25568         (Argument.Resolve): If it's a `ref' or `out' argument, resolve the
25569         expression as lvalue.
25570
25571         * statement.cs (FlowBranching): New class for the flow analysis code.
25572         (Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
25573         (LabeledStatement.IsDefined): New public property.
25574         (LabeledStatement.AddUsageVector): New public method to tell flow
25575         analyis that the label may be reached via a forward jump.
25576         (GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
25577         flow analysis.
25578         (VariableInfo.Number): New public field.  This is used by flow analysis
25579         to number all locals of a block.
25580         (Block.CountVariables): New public property.  This is the number of
25581         local variables in this block (including the locals from all parent
25582         blocks).
25583         (Block.EmitMeta): Number all the variables.
25584
25585         * statement.cs: Added flow analysis support to all classes.
25586
25587 2002-07-31  Martin Baulig  <martin@gnome.org>
25588
25589         * driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
25590         To get debugging messages, compile mcs with /define:MCS_DEBUG and
25591         then use this argument.
25592
25593         * report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".
25594
25595         * makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
25596         use this to specify /define options.
25597
25598 2002-07-29  Martin Baulig  <martin@gnome.org>
25599
25600         * statement.cs (Fixed): Moved all code that does variable lookups
25601         and resolvings from Emit to Resolve.
25602
25603         * statement.cs (For): Moved all code that does variable lookups
25604         and resolvings from Emit to Resolve.
25605
25606         * statement.cs (Using): Moved all code that does variable lookups
25607         and resolvings from Emit to Resolve.
25608
25609 2002-07-29  Martin Baulig  <martin@gnome.org>
25610
25611         * attribute.cs (Attribute.Resolve): Explicitly catch a
25612         System.NullReferenceException when creating the
25613         CustromAttributeBuilder and report a different warning message.
25614
25615 2002-07-29  Martin Baulig  <martin@gnome.org>
25616
25617         * support.cs (ParameterData.ParameterName): Added method to
25618         get the name of a parameter.
25619
25620         * typemanager.cs (TypeManager.IsValueType): New public method.
25621
25622 2002-07-29  Martin Baulig  <martin@gnome.org>
25623
25624         * parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
25625         is a flag which specifies that it's either ref or out.
25626         (Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
25627         the out parameter to `out Parameter.Modifier mod', also set the
25628         Parameter.Modifier.ISBYREF flag on it if it's either ref or out.
25629
25630         * support.cs (InternalParameters.ParameterModifier): Distinguish
25631         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25632         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25633
25634         * expression.cs (Argument.GetParameterModifier): Distinguish
25635         between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
25636         Parameter.Modifier.ISBYREF flag if it's either ref or out.
25637
25638 2002-07-29  Martin Baulig  <martin@gnome.org>
25639
25640         * expression.cs (ParameterReference.ParameterReference): Added
25641         `Location loc' argument to the constructor.
25642
25643         * cs-parser.jay: Pass location to ParameterReference.
25644
25645 2002-07-28  Miguel de Icaza  <miguel@ximian.com>
25646
25647         * statement.cs (Try): Initialize the location.
25648
25649         * cs-parser.jay: pass location to Try.
25650
25651         * expression.cs (Unary.Reduce): Change the prototype to return
25652         whether a constant fold could be performed or not.  The result is
25653         returned in an out parameters.  In the case of Indirection and
25654         AddressOf, we want to perform the full tests.
25655
25656 2002-07-26  Miguel de Icaza  <miguel@ximian.com>
25657
25658         * statement.cs (Statement.Emit): Flag dead code.
25659
25660 2002-07-27  Andrew Birkett  <andy@nobugs.org>
25661
25662         * expression.cs (Unary.Reduce): Handle AddressOf and Indirection.
25663
25664 2002-07-27  Martin Baulig  <martin@gnome.org>
25665
25666         * class.cs (MethodData.Define): Put back call to
25667         TypeManager.AddMethod(), accidentally commented this out.
25668
25669         * report.cs (Debug): New public method to print debugging information,
25670         this is `[Conditional ("DEBUG")]'.
25671
25672 2002-07-26  Martin Baulig  <martin@gnome.org>
25673
25674         * cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
25675         (switch_statement): Push the current_block to the switch_stack and
25676         pop it again when we're done with the switch.
25677         (switch_section): The new block is a child of the current_block.
25678         Fixes bug #24007, added test-152.cs.
25679
25680 2002-07-27  Martin Baulig  <martin@gnome.org>
25681
25682         * expression.cs (Invocation.EmitArguments): When calling a varargs
25683         function with only its fixed arguments, we need to pass an empty
25684         array.
25685
25686 2002-07-27  Martin Baulig  <martin@gnome.org>
25687
25688         Mono 0.13 has been released.
25689
25690 2002-07-25  Miguel de Icaza  <miguel@ximian.com>
25691
25692         * driver.cs: Rename --resource to --linkres, because that is what
25693         we do currently, we dont support --resource yet.
25694
25695         * cs-tokenizer.cs: Fix test for reporting endif mismatches.
25696
25697 2002-07-25  Martin Baulig  <martin@gnome.org>
25698
25699         * class.cs (MethodData): New public class.  This is a `method builder'
25700         class for a method or one accessor of a Property/Indexer/Event.
25701         (MethodData.GetMethodFlags): Moved here from MemberBase.
25702         (MethodData.ApplyAttributes): Likewise.
25703         (MethodData.ApplyObsoleteAttribute): Likewise.
25704         (MethodData.ApplyConditionalAttribute): Likewise.
25705         (MethodData.ApplyDllImportAttribute): Likewise.
25706         (MethodData.CheckAbstractAndExternal): Likewise.
25707         (MethodData.Define): Formerly knows as MemberBase.DefineMethod().
25708         (MethodData.Emit): Formerly known as Method.Emit().
25709         (MemberBase): Moved everything which was specific to a single
25710         accessor/method to MethodData.
25711         (Method): Create a new MethodData and call Define() and Emit() on it.
25712         (Property, Indexer, Event): Create a new MethodData objects for each
25713         accessor and call Define() and Emit() on them.
25714
25715 2002-07-25  Martin Baulig  <martin@gnome.org>
25716
25717         Made MethodCore derive from MemberBase to reuse the code from there.
25718         MemberBase now also checks for attributes.
25719
25720         * class.cs (MethodCore): Derive from MemberBase, not MemberCore.
25721         (MemberBase.GetMethodFlags): Moved here from class Method and marked
25722         as virtual.
25723         (MemberBase.DefineAccessor): Renamed to DefineMethod(), added
25724         `CallingConventions cc' and `Attributes opt_attrs' arguments.
25725         (MemberBase.ApplyAttributes): New virtual method; applies the
25726         attributes to a method or accessor.
25727         (MemberBase.ApplyObsoleteAttribute): New protected virtual method.
25728         (MemberBase.ApplyConditionalAttribute): Likewise.
25729         (MemberBase.ApplyDllImportAttribute): Likewise.
25730         (MemberBase.CheckAbstractAndExternal): Likewise.
25731         (MethodCore.ParameterTypes): This is now a property instead of a
25732         method, it's initialized from DoDefineParameters().
25733         (MethodCore.ParameterInfo): Removed the set accessor.
25734         (MethodCore.DoDefineParameters): New protected virtual method to
25735         initialize ParameterTypes and ParameterInfo.
25736         (Method.GetReturnType): We can now simply return the MemberType.
25737         (Method.GetMethodFlags): Override the MemberBase version and add
25738         the conditional flags.
25739         (Method.CheckBase): Moved some code from Define() here, call
25740         DoDefineParameters() here.
25741         (Method.Define): Use DoDefine() and DefineMethod() from MemberBase
25742         here to avoid some larger code duplication.
25743         (Property.Emit, Indexer.Emit): Call CheckAbstractAndExternal() to
25744         ensure that abstract and external accessors don't declare a body.
25745
25746         * attribute.cs (Attribute.GetValidPieces): Make this actually work:
25747         `System.Attribute.GetCustomAttributes (attr.Type)' does a recursive
25748         lookup in the attribute's parent classes, so we need to abort as soon
25749         as we found the first match.
25750         (Attribute.Obsolete_GetObsoleteMessage): Return the empty string if
25751         the attribute has no arguments.
25752
25753         * typemanager.cs (TypeManager.AddMethod): Now takes a MemberBase instead
25754         of a Method.
25755
25756 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25757
25758         * cs-parser.jay: reverted previous patch.
25759
25760 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25761
25762         * cs-parser.jay: fixed bug #22119.
25763
25764 2002-07-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25765
25766         * attribute.cs: fixed compilation. The error was:
25767         "attribute.cs(571,17): error CS0177: The out parameter 'is_error' must 
25768         be assigned to before control leaves the current method."
25769         [FIXME:  Filed as bug #28186: MCS must report this error.]
25770
25771 2002-07-25  Martin Baulig  <martin@gnome.org>
25772
25773         * attribute.cs (Attribute.Conditional_GetConditionName): New static
25774         method to pull the condition name ouf of a Conditional attribute.
25775         (Attribute.Obsolete_GetObsoleteMessage): New static method to pull
25776         the obsolete message and error flag out of an Obsolete attribute.
25777
25778         * class.cs (Method.GetMethodFlags): New public method to get the
25779         TypeManager.MethodFlags for this method.
25780         (Method.ApplyConditionalAttribute, Method.ApplyObsoleteAttribute): New
25781         private methods.
25782         (Method.Define): Get and apply the Obsolete and Conditional attributes;
25783         if we're overriding a virtual function, set the new private variable
25784         `parent_method'; call the new TypeManager.AddMethod().
25785
25786         * typemanager.cs (TypeManager.AddMethod): New static method.  Stores
25787         the MethodBuilder and the Method in a PtrHashtable.
25788         (TypeManager.builder_to_method): Added for this purpose.
25789         (TypeManager.MethodFlags): Added IsObsoleteError.
25790         (TypeManager.GetMethodFlags): Added `Location loc' argument.  Lookup
25791         Obsolete and Conditional arguments in MethodBuilders.  If we discover
25792         an Obsolete attribute, emit an appropriate warning 618 / error 619 with
25793         the message from the attribute.
25794
25795 2002-07-24  Martin Baulig  <martin@gnome.org>
25796
25797         * cs-tokenizer.cs: Eat up trailing whitespaces and one-line comments in
25798         preprocessor directives, ensure that the argument to #define/#undef is
25799         exactly one identifier and that it's actually an identifier.
25800
25801         Some weeks ago I did a `#define DEBUG 1' myself and wondered why this
25802         did not work ....
25803
25804 2002-07-24  Martin Baulig  <martin@gnome.org>
25805
25806         * statement.cs (Foreach.ForeachHelperMethods): Added `Type element_type',
25807         initialize it to TypeManager.object_type in the constructor.
25808         (Foreach.GetEnumeratorFilter): Set `hm.element_type' to the return type
25809         of the `hm.get_current' method if we're using the collection pattern.
25810         (Foreach.EmitCollectionForeach): Use `hm.element_type' as the source type
25811         for the explicit conversion to make it work when we're using the collection
25812         pattern and the `Current' property has a different return type than `object'.
25813         Fixes #27713.
25814
25815 2002-07-24  Martin Baulig  <martin@gnome.org>
25816
25817         * delegate.cs (Delegate.VerifyMethod): Simply return null if the method
25818         does not match, but don't report any errors.  This method is called in
25819         order for all methods in a MethodGroupExpr until a matching method is
25820         found, so we don't want to bail out if the first method doesn't match.
25821         (NewDelegate.DoResolve): If none of the methods in the MethodGroupExpr
25822         matches, report the 123.  Fixes #28070.
25823
25824 2002-07-24  Martin Baulig  <martin@gnome.org>
25825
25826         * expression.cs (ArrayAccess.EmitStoreOpcode): Moved the
25827         TypeManager.TypeToCoreType() to the top of the method so the
25828         following equality checks will work.  Fixes #28107.
25829
25830 2002-07-24  Martin Baulig  <martin@gnome.org>
25831
25832         * cfold.cs (ConstantFold.DoConstantNumericPromotions): "If either
25833         operand is of type uint, and the other operand is of type sbyte,
25834         short or int, the operands are converted to type long." -
25835         Actually do what this comment already told us.  Fixes bug #28106,
25836         added test-150.cs.
25837
25838 2002-07-24  Martin Baulig  <martin@gnome.org>
25839
25840         * class.cs (MethodBase): New abstract class.  This is now a base
25841         class for Property, Indexer and Event to avoid some code duplication
25842         in their Define() and DefineMethods() methods.
25843         (MethodBase.DoDefine, MethodBase.DefineAccessor): Provide virtual
25844         generic methods for Define() and DefineMethods().
25845         (FieldBase): Derive from MemberBase, not MemberCore.
25846         (Property): Derive from MemberBase, not MemberCore.
25847         (Property.DefineMethod): Moved all the code from this method to the
25848         new MethodBase.DefineAccessor(), just call it with appropriate
25849         argumetnts.
25850         (Property.Define): Call the new Property.DoDefine(), this does some
25851         sanity checks and we don't need to duplicate the code everywhere.
25852         (Event): Derive from MemberBase, not MemberCore.
25853         (Event.Define): Use the new MethodBase.DefineAccessor() to define the
25854         accessors, this will also make them work with interface events.
25855         (Indexer): Derive from MemberBase, not MemberCore.
25856         (Indexer.DefineMethod): Removed, call MethodBase.DefineAccessor() insstead.
25857         (Indexer.Define): Use the new MethodBase functions.
25858
25859         * interface.cs (InterfaceEvent.InterfaceEvent): Added `Location loc'
25860         argument to the constructor.
25861         (Interface.FindMembers): Added support for interface events.
25862         (Interface.PopluateEvent): Implemented.
25863
25864         Added test-149.cs for this.  This also fixes bugs #26067 and #24256.
25865
25866 2002-07-22  Miguel de Icaza  <miguel@ximian.com>
25867
25868         * class.cs (TypeContainer.AddMethod): Adding methods do not use IsValid,
25869         but this is required to check for a method name being the same as
25870         the containing class.  
25871
25872         Handle this now.
25873
25874 2002-07-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25875
25876         * interface.cs: initialize variable.
25877
25878 2002-07-23  Martin Baulig  <martin@gnome.org>
25879
25880         Implemented the IndexerName attribute in interfaces.
25881
25882         * class.cs (TypeContainer.DefineIndexers): Don't set the indexer
25883         name if this is an explicit interface implementation.
25884         (Indexer.InterfaceIndexerName): New public variable.  If we're
25885         implementing an interface indexer, this is the IndexerName in that
25886         interface.  Otherwise, it's the IndexerName.
25887         (Indexer.DefineMethod): If we're implementing interface indexer,
25888         set InterfaceIndexerName.  Use the new Pending.IsInterfaceIndexer
25889         and Pending.ImplementIndexer methods.
25890         (Indexer.Define): Also define the PropertyBuilder if we're
25891         implementing an interface indexer and this is neither an explicit
25892         interface implementation nor do the IndexerName match the one in
25893         the interface.
25894
25895         * pending.cs (TypeAndMethods): Added `MethodInfo [] need_proxy'.
25896         If a method is defined here, then we always need to create a proxy
25897         for it.  This is used when implementing interface indexers.
25898         (Pending.IsInterfaceIndexer): New public method.
25899         (Pending.ImplementIndexer): New public method.
25900         (Pending.InterfaceMethod): Added `MethodInfo need_proxy' argument.
25901         This is used when implementing interface indexers to define a proxy
25902         if necessary.
25903         (Pending.VerifyPendingMethods): Look in the `need_proxy' array and
25904         define a proxy if necessary.
25905
25906         * interface.cs (Interface.IndexerName): New public variable.
25907         (Interface.PopulateIndexer): Set the IndexerName.
25908         (Interface.DefineIndexers): New private method.  Populate all the
25909         indexers and make sure their IndexerNames match.
25910
25911         * typemanager.cs (IndexerPropertyName): Added support for interface
25912         indexers.
25913
25914 2002-07-22  Martin Baulig  <martin@gnome.org>
25915
25916         * codegen.cs (EmitContext.HasReturnLabel): New public variable.
25917         (EmitContext.EmitTopBlock): Always mark the ReturnLabel and emit a
25918         ret if HasReturnLabel.
25919         (EmitContext.TryCatchLevel, LoopBeginTryCatchLevel): New public
25920         variables.
25921
25922         * statement.cs (Do.Emit, While.Emit, For.Emit, Foreach.Emit): Save
25923         and set the ec.LoopBeginTryCatchLevel.
25924         (Try.Emit): Increment the ec.TryCatchLevel while emitting the block.
25925         (Continue.Emit): If the ec.LoopBeginTryCatchLevel is smaller than
25926         the current ec.TryCatchLevel, the branch goes out of an exception
25927         block.  In this case, we need to use Leave and not Br.
25928
25929 2002-07-22  Martin Baulig  <martin@gnome.org>
25930
25931         * statement.cs (Try.Emit): Emit an explicit ret after the end of the
25932         block unless the block does not always return or it is contained in
25933         another try { ... } catch { ... } block.  Fixes bug #26506.
25934         Added verify-1.cs to the test suite.
25935
25936 2002-07-22  Martin Baulig  <martin@gnome.org>
25937
25938         * statement.cs (Switch.TableSwitchEmit): If we don't have a default,
25939         then we do not always return.  Fixes bug #24985.
25940
25941 2002-07-22  Martin Baulig  <martin@gnome.org>
25942
25943         * expression.cs (Invocation.OverloadedResolve): Do the BetterFunction()
25944         lookup on a per-class level; ie. walk up the class hierarchy until we
25945         found at least one applicable method, then choose the best among them.
25946         Fixes bug #24463 and test-29.cs.
25947
25948 2002-07-22  Martin Baulig  <martin@gnome.org>
25949
25950         * typemanager.cs (TypeManager.ArrayContainsMethod): Don't check the
25951         return types of the methods.  The return type is not part of the
25952         signature and we must not check it to make the `new' modifier work.
25953         Fixes bug #27999, also added test-147.cs.
25954         (TypeManager.TypeToCoreType): Added TypeManager.type_type.
25955
25956         * expression.cs (Invocation.DoResolve): Call TypeManager.TypeToCoreType()
25957         on the method's return type.
25958
25959 2002-07-21  Martin Baulig  <martin@gnome.org>
25960
25961         * assign.cs: Make this work if the rightmost source is a constant and
25962         we need to do an implicit type conversion.  Also adding a few more tests
25963         to test-38.cs which should have caught this.
25964
25965         * makefile.gnu: Disable debugging, there's already the mcs-mono2.exe
25966         target in the makefile for this.  The makefile.gnu is primarily intended
25967         for end-users who don't want to debug the compiler.
25968
25969 2002-07-21  Martin Baulig  <martin@gnome.org>
25970
25971         * assign.cs: Improved the Assign class so it can now handle embedded
25972         assignments (X = Y = Z = something).  As a side-effect this'll now also
25973         consume less local variables.  test-38.cs now passes with MCS, added
25974         a few new test cases to that test.
25975
25976 2002-07-20  Martin Baulig  <martin@gnome.org>
25977
25978         * expression.cs (Binary.EmitBranchable): Emit correct unsigned branch
25979         instructions.  Fixes bug #27977, also added test-146.cs.
25980
25981 2002-07-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25982
25983         * cs-tokenizer.cs: fixed getHex ().
25984
25985 2002-07-19  Martin Baulig  <martin@gnome.org>
25986
25987         * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
25988         not Type.GetType() to lookup the array type.  This is needed when
25989         we're constructing an array of a user-defined type.
25990         (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
25991         single-dimensional arrays, but also for single-dimensial arrays of
25992         type decimal.
25993
25994 2002-07-19  Martin Baulig  <martin@gnome.org>
25995
25996         * expression.cs (New.DoEmit): Create a new LocalTemporary each time
25997         this function is called, it's not allowed to share LocalBuilders
25998         among ILGenerators.
25999
26000 2002-07-19  Martin Baulig  <martin@gnome.org>
26001
26002         * expression.cs (Argument.Resolve): Report an error 118 when trying
26003         to pass a type as argument.
26004
26005 2002-07-18  Martin Baulig  <martin@gnome.org>
26006
26007         * ecore.cs (Expression.ImplicitNumericConversion): Don't emit a
26008         Conv_R_Un for the signed `long' type.
26009
26010 2002-07-15  Miguel de Icaza  <miguel@ximian.com>
26011
26012         * expression.cs (MemberAccess.DoResolve): Do not reuse the field
26013         `expr' for the temporary result, as that will fail if we do
26014         multiple resolves on the same expression.
26015
26016 2002-07-05  Miguel de Icaza  <miguel@ximian.com>
26017
26018         * ecore.cs (SimpleNameResolve): Use ec.DeclSpace instead of
26019         ec.TypeContainer for looking up aliases. 
26020
26021         * class.cs (TypeContainer): Remove LookupAlias from here.
26022
26023         * decl.cs (DeclSpace); Move here.
26024
26025 2002-07-01  Miguel de Icaza  <miguel@ximian.com>
26026
26027         * class.cs (FindMembers): Only call filter if the constructor
26028         bulider is not null.
26029
26030         Also handle delegates in `NestedTypes' now.  Now we will perform
26031         type lookups using the standard resolution process.  This also
26032         fixes a bug.
26033
26034         * decl.cs (DeclSpace.ResolveType): New type resolution routine.
26035         This uses Expressions (the limited kind that can be parsed by the
26036         tree) instead of strings.
26037
26038         * expression.cs (ComposedCast.ToString): Implement, used to flag
26039         errors since now we have to render expressions.
26040
26041         (ArrayCreation): Kill FormElementType.  Use ComposedCasts in
26042         FormArrayType. 
26043
26044         * ecore.cs (SimpleName.ToString): ditto.
26045
26046         * cs-parser.jay: Instead of using strings to assemble types, use
26047         Expressions to assemble the type (using SimpleName, ComposedCast,
26048         MemberAccess).  This should fix the type lookups in declarations,
26049         because we were using a different code path for this.
26050
26051         * statement.cs (Block.Resolve): Continue processing statements
26052         even when there is an error.
26053
26054 2002-07-17  Miguel de Icaza  <miguel@ximian.com>
26055
26056         * class.cs (Event.Define): Also remove the `remove' method from
26057         the list of pending items.
26058
26059         * expression.cs (ParameterReference): Use ldarg.N (0..3) to
26060         generate more compact code. 
26061
26062 2002-07-17  Martin Baulig  <martin@gnome.org>
26063
26064         * const.cs (Const.LookupConstantValue): Add support for constant
26065         `unchecked' and `checked' expressions.
26066         Also adding test case test-140.cs for this.
26067
26068 2002-07-17  Martin Baulig  <martin@gnome.org>
26069
26070         * statement.cs (Foreach.GetEnumeratorFilter): When compiling corlib,
26071         check whether mi.ReturnType implements the IEnumerator interface; the
26072         `==' and the IsAssignableFrom() will fail in this situation.
26073
26074 2002-07-16  Ravi Pratap  <ravi@ximian.com>
26075
26076         * ecore.cs (SimpleName.SimpleNameResolve) : Apply Gonzalo's fix 
26077         here too.
26078
26079 2002-07-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26080
26081         * expression.cs: fixed bug #27811.
26082
26083 2002-07-14  Miguel de Icaza  <miguel@ximian.com>
26084
26085         * expression.cs (ParameterReference.AddressOf): Patch from Paolo
26086         Molaro: when we are a ref, the value already contains a pointer
26087         value, do not take the address of it.
26088
26089 2002-07-14 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
26090         * removed mb-parser.jay and mb-tokenizer.cs
26091
26092 Sat Jul 13 19:38:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26093
26094         * expression.cs: check against the building corlib void type.
26095
26096 Sat Jul 13 19:35:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
26097
26098         * ecore.cs: fix for valuetype static readonly fields: when 
26099         initializing them, we need their address, not the address of a copy.
26100
26101 Sat Jul 13 17:32:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26102
26103         * typemanager.cs: register also enum_type in corlib.
26104
26105 Sat Jul 13 15:59:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26106
26107         * class.cs: allow calling this (but not base) initializers in structs.
26108
26109 Sat Jul 13 15:12:06 CEST 2002 Paolo Molaro <lupus@ximian.com>
26110
26111         * ecore.cs: make sure we compare against the building base types
26112         in GetTypeSize ().
26113
26114 Sat Jul 13 15:10:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26115
26116         * typemanager.cs: fix TypeToCoreType() to handle void and object
26117         (corlib gets no more typerefs after this change).
26118
26119 2002-07-12  Miguel de Icaza  <miguel@ximian.com>
26120
26121         * expression.cs (ArrayCreation.EmitArrayArguments): use
26122         Conv.Ovf.U4 for unsigned and Conv.Ovf.I4 for signed.
26123
26124         (ArrayAccess.LoadArrayAndArguments): Use Conv_Ovf_I and
26125         Conv_Ovf_I_Un for the array arguments.  Even if C# allows longs as
26126         array indexes, the runtime actually forbids them.
26127
26128         * ecore.cs (ExpressionToArrayArgument): Move the conversion code
26129         for array arguments here.
26130
26131         * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
26132         instead of the default for ValueTypes.
26133
26134         (New.DoEmit): Use IsValueType instead of
26135         IsSubclassOf (value_type)
26136         (New.DoResolve): ditto.
26137         (Invocation.EmitCall): ditto.
26138
26139         * assign.cs (Assign): ditto.
26140
26141         * statement.cs (Unsafe): Ok, so I got the semantics wrong.
26142         Statements *are* currently doing part of their resolution during
26143         Emit.  
26144
26145         Expressions do always resolve during resolve, but statements are
26146         only required to propagate resolution to their children.
26147
26148 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
26149
26150         * driver.cs (CSCParseOption): Finish the /r: and /lib: support.
26151
26152         (LoadAssembly): Do not add the dll if it is already specified
26153
26154         (MainDriver): Add the System directory to the link path at the end,
26155         after all the other -L arguments. 
26156
26157         * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
26158         wrong opcode for loading bytes and bools (ldelem.i1 instead of
26159         ldelem.u1) and using the opposite for sbytes.
26160
26161         This fixes Digger, and we can finally run it.
26162
26163         * driver.cs (UnixParseOption): Move the option parsing here.  
26164         (CSCParseOption): Implement CSC-like parsing of options.
26165
26166         We now support both modes of operation, the old Unix way, and the
26167         new CSC-like way.  This should help those who wanted to make cross
26168         platform makefiles.
26169
26170         The only thing broken is that /r:, /reference: and /lib: are not
26171         implemented, because I want to make those have the same semantics
26172         as the CSC compiler has, and kill once and for all the confussion
26173         around this.   Will be doing this tomorrow.
26174
26175         * statement.cs (Unsafe.Resolve): The state is checked during
26176         resolve, not emit, so we have to set the flags for IsUnsfe here.
26177
26178 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26179
26180         * expression.cs (MemberAccess.ResolveMemberAccess): Since we can
26181         not catch the Error_ObjectRefRequired in SimpleName (as it is
26182         possible to have a class/instance variable name that later gets
26183         deambiguated), we have to check this here.      
26184
26185 2002-07-10  Ravi Pratap  <ravi@ximian.com>
26186
26187         * class.cs (TypeContainer.GetFieldFromEvent): Move away from here,
26188         make static and put into Expression.
26189
26190         (Event.Define): Register the private field of the event with the 
26191         TypeManager so that GetFieldFromEvent can get at it.
26192
26193         (TypeManager.RegisterPrivateFieldOfEvent): Implement to
26194         keep track of the private field associated with an event which
26195         has no accessors.
26196
26197         (TypeManager.GetPrivateFieldOfEvent): Implement to get at the
26198         private field.
26199
26200         * ecore.cs (GetFieldFromEvent): RE-write to use the above methods.
26201
26202 2002-07-10  Miguel de Icaza  <miguel@ximian.com>
26203
26204         * expression.cs (Binary.EmitBranchable): this routine emits the
26205         Binary expression in a branchable context.  This basically means:
26206         we need to branch somewhere, not just get the value on the stack.
26207
26208         This works together with Statement.EmitBoolExpression.
26209
26210         * statement.cs (Statement.EmitBoolExpression): Use
26211         EmitBranchable. 
26212
26213 2002-07-09  Miguel de Icaza  <miguel@ximian.com>
26214
26215         * statement.cs (For): Reduce the number of jumps in loops.
26216
26217         (For): Implement loop inversion for the For statement.
26218
26219         (Break): We can be breaking out of a Try/Catch controlled section
26220         (foreach might have an implicit try/catch clause), so we need to
26221         use Leave instead of Br.
26222
26223         * ecore.cs (FieldExpr.AddressOf): Fix for test-139 (augmented
26224         now).  If the instace expression supports IMemoryLocation, we use
26225         the AddressOf method from the IMemoryLocation to extract the
26226         address instead of emitting the instance.
26227
26228         This showed up with `This', as we were emitting the instance
26229         always (Emit) instead of the Address of This.  Particularly
26230         interesting when This is a value type, as we dont want the Emit
26231         effect (which was to load the object).
26232
26233 2002-07-08  Miguel de Icaza  <miguel@ximian.com>
26234
26235         * attribute.cs: Pass the entry point to the DefinePInvokeMethod
26236
26237         * statement.cs (Checked): Set the CheckedState during the resolve
26238         process too, as the ConvCast operations track the checked state on
26239         the resolve process, and not emit.
26240
26241         * cs-parser.jay (namespace_member_declaration): Flag that we have
26242         found a declaration when we do.  This is used to flag error 1529
26243
26244         * driver.cs: Report ok when we display the help only.
26245
26246 2002-07-06  Andrew Birkett  <adb@tardis.ed.ac.uk>
26247
26248         * cs-tokenizer.cs (xtoken): Improve handling of string literals.
26249
26250 2002-07-04  Miguel de Icaza  <miguel@ximian.com>
26251
26252         * cs-tokenizer.cs (define): We also have to track locally the
26253         defines.  AllDefines is just used for the Conditional Attribute,
26254         but we also need the local defines for the current source code. 
26255
26256 2002-07-03  Miguel de Icaza  <miguel@ximian.com>
26257
26258         * statement.cs (While, For, Do): These loops can exit through a
26259         Break statement, use this information to tell whether the
26260         statement is the last piece of code.
26261
26262         (Break): Flag that we break.
26263
26264         * codegen.cs (EmitContexts): New `Breaks' state variable.
26265
26266 2002-07-03  Martin Baulig  <martin@gnome.org>
26267
26268         * class.cs (TypeContainer.MethodModifiersValid): Allow override
26269         modifiers in method declarations in structs.  Otherwise, you won't
26270         be able to override things like Object.Equals().
26271
26272 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26273
26274         * class.cs (Method, Property, Indexer): Do not allow the public
26275         modifier to be used in explicit interface implementations.
26276
26277         (TypeContainer.MethodModifiersValid): Catch virtual, abstract and
26278         override modifiers in method declarations in structs
26279
26280 2002-07-02   Andrew Birkett <adb@tardis.ed.ac.uk>
26281
26282         * cs-tokenizer.cs (adjust_int, adjust_real): Do not abort on
26283         integer or real overflow, report an error
26284
26285 2002-07-02  Martin Baulig  <martin@gnome.org>
26286
26287         * typemanager.cs (TypeManager.InitCoreTypes): When compiling
26288         corlib, dynamically call AssemblyBuilder.SetCorlibTypeBuilders()
26289         to tell the runtime about our newly created System.Object and
26290         System.ValueType types.
26291
26292 2002-07-02  Miguel de Icaza  <miguel@ximian.com>
26293
26294         * expression.cs (This): Use Stobj/Ldobj when we are a member of a
26295         struct instead of Ldarg/Starg.
26296
26297 2002-07-02  Martin Baulig  <martin@gnome.org>
26298
26299         * expression.cs (Indirection.Indirection): Call
26300         TypeManager.TypeToCoreType() on `expr.Type.GetElementType ()'.
26301
26302 2002-07-02  Martin Baulig  <martin@gnome.org>
26303
26304         * expression.cs (ArrayAccess.EmitStoreOpcode): If the type is a
26305         ValueType, call TypeManager.TypeToCoreType() on it.
26306         (Invocations.EmitParams): Call TypeManager.TypeToCoreType() on
26307         the OpCodes.Newarr argument.
26308
26309 2002-07-02  Martin Baulig  <martin@gnome.org>
26310
26311         * expression.cs (Invocation.EmitCall): When compiling corlib,
26312         replace all calls to the system's System.Array type to calls to
26313         the newly created one.
26314
26315         * typemanager.cs (TypeManager.InitCodeHelpers): Added a few more
26316         System.Array methods.
26317         (TypeManager.InitCoreTypes): When compiling corlib, get the methods
26318         from the system's System.Array type which must be replaced.
26319
26320 Tue Jul 2 19:05:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26321
26322         * typemanager.cs: load unverifiable_code_ctor so we can build
26323         corlib using the correct type. Avoid using GetTypeCode() with
26324         TypeBuilders.
26325         * rootcontext.cs: uses TypeManager.unverifiable_code_ctor and
26326         TypeManager.object_type to allow building corlib.
26327
26328 Tue Jul 2 19:03:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26329
26330         * ecore.cs: handle System.Enum separately in LoadFromPtr().
26331
26332 2002-07-01  Martin Baulig  <martin@gnome.org>
26333
26334         * class.cs: Make the last change actually work, we need to check
26335         whether `ifaces != null' to avoid a crash.
26336
26337 Mon Jul 1 16:15:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26338
26339         * class.cs: when we build structs without fields that implement
26340         interfaces, we need to add the interfaces separately, since there is
26341         no API to both set the size and add the interfaces at type creation
26342         time.
26343
26344 Mon Jul 1 14:50:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26345
26346         * expression.cs: the dimension arguments to the array constructors
26347         need to be converted if they are a long.
26348
26349 Mon Jul 1 12:26:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26350
26351         * class.cs: don't emit ldarg.0 if there is no parent constructor
26352         (fixes showstopper for corlib).
26353
26354 2002-06-29  Martin Baulig  <martin@gnome.org>
26355
26356         MCS now compiles corlib on GNU/Linux :-)
26357
26358         * attribute.cs (Attribute.ApplyAttributes): Treat Accessors like Method,
26359         ie. check for MethodImplOptions.InternalCall.
26360
26361         * class.cs (TypeContainer.DefineType): When compiling corlib, both parent
26362         and TypeManager.attribute_type are null, so we must explicitly check
26363         whether parent is not null to find out whether it's an attribute type.
26364         (Property.Emit): Always call Attribute.ApplyAttributes() on the GetBuilder
26365         and SetBuilder, not only if the property is neither abstract nor external.
26366         This is necessary to set the MethodImplOptions on the accessor methods.
26367         (Indexer.Emit): Call Attribute.ApplyAttributes() on the GetBuilder and
26368         SetBuilder, see Property.Emit().
26369
26370         * rootcontext.cs (RootContext.PopulateTypes): When compiling corlib, don't
26371         populate "System.Object", "System.ValueType" and "System.Attribute" since
26372         they've already been populated from BootCorlib_PopulateCoreTypes().
26373
26374 2002-06-29  Martin Baulig  <martin@gnome.org>
26375
26376         * ecore.cs (Expression.ImplicitReferenceConversionExists): If expr
26377         is the NullLiteral, we also need to make sure that target_type is not
26378         an enum type.   
26379
26380 2002-06-29  Martin Baulig  <martin@gnome.org>
26381
26382         * rootcontext.cs (RootContext.ResolveCore): We must initialize
26383         `TypeManager.multicast_delegate_type' and `TypeManager.delegate_type'
26384         before calling BootstrapCorlib_ResolveDelegate ().
26385
26386 2002-06-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26387
26388         * statement.cs: fixed build-breaker. All tests passed ok.
26389
26390 2002-06-27  Martin Baulig  <martin@gnome.org>
26391
26392         * typemanager.cs (TypeManager.VerifyUnManaged): Added explicit check
26393         for System.Decimal when compiling corlib.
26394
26395 2002-06-27  Martin Baulig  <martin@gnome.org>
26396
26397         * statement.cs (Switch.TableSwitchEmit): Make this work with empty
26398         switch blocks which contain nothing but a default clause.
26399
26400 2002-06-26  Andrew  <adb@tardis.ed.ac.uk>
26401
26402        * ../errors/cs1501-3.cs: Added new test for struct ctr typechecks.
26403
26404 2002-06-27  Martin Baulig  <martin@gnome.org>
26405
26406         * ecore.cs (PropertyExpr.PropertyExpr): Call
26407         TypeManager.TypeToCoreType() on the `pi.PropertyType'.
26408
26409         * typemanager.cs (TypeManager.TypeToCoreType): Return if the type
26410         is already a TypeBuilder.
26411
26412 2002-06-27  Martin Baulig  <martin@gnome.org>
26413
26414         * ecore.cs (Expression.ImplicitReferenceConversionExists): Use
26415         `target_type == TypeManager.array_type', not IsAssignableFrom() in
26416         the "from an array-type to System.Array" case.  This makes it work
26417         when compiling corlib.
26418
26419 2002-06-27  Martin Baulig  <martin@gnome.org>
26420
26421         * ecore.cs (Expression.SimpleNameResolve): If the expression is a
26422         non-static PropertyExpr, set its InstanceExpression.  This makes
26423         the `ICollection.Count' property work in System/Array.cs.
26424
26425 2002-06-25  Andrew Birkett  <adb@tardis.ed.ac.uk>
26426
26427         * driver.cs: Made error handling more consistent.  Errors now
26428         tracked by Report class, so many methods which used to return int
26429         now return void.  Main() now prints success/failure and 
26430         errors/warnings message.
26431
26432         Renamed '--probe' compiler argument to '--expect-error'.  Removed
26433         the magic number return values (123 and 124).  Now, if the
26434         expected error occurs, the compiler exits with success (exit value
26435         0).  If the compilation completes without seeing that particular
26436         error, the compiler exits with failure (exit value 1).  The
26437         makefile in mcs/errors has been changed to handle the new behaviour.
26438
26439         * report.cs: Made 'expected error' number a property and renamed
26440         it from 'Probe' to 'ExpectedError'.
26441
26442         * genericparser.cs: Removed error handling support, since it is
26443         now all done by Report class.
26444
26445         * cs-parser.jay, mb-parser.jay: Errors are tracked by Report
26446         class, so parse() no longer returns an int.
26447
26448         * namespace.cs: Use Report.Error instead of GenericParser.error
26449
26450 2002-06-22  Miguel de Icaza  <miguel@ximian.com>
26451
26452         * class.cs (TypeContainer.AddMethod, TypeContainer.AddIndexer,
26453         TypeContainer.AddOperator): At the front of the list put the
26454         explicit implementations, so they get resolved/defined first. 
26455
26456 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
26457
26458         * class.cs (TypeContainer.VerifyImplements): Verifies that a given
26459         interface type is implemented by this TypeContainer.  Used during
26460         explicit interface implementation.
26461
26462         (Property.Define, Indexer.Define, Method.Define): Validate that
26463         the given interface in the explicit implementation is one of the
26464         base classes for the containing type.
26465
26466         Also if we are explicitly implementing an interface, but there is
26467         no match in the pending implementation table, report an error.
26468
26469         (Property.Define): Only define the property if we are
26470         not explicitly implementing a property from an interface.  Use the
26471         correct name also for those properties (the same CSC uses,
26472         although that is really not needed).
26473
26474         (Property.Emit): Do not emit attributes for explicitly implemented
26475         properties, as there is no TypeBuilder.
26476
26477         (Indexer.Emit): ditto.
26478
26479         Hiding then means that we do not really *implement* a pending
26480         implementation, which makes code fail.
26481
26482 2002-06-22  Martin Baulig  <martin@gnome.org>
26483
26484         * ecore.cs (Expression.Constantify): Call TypeManager.TypeToCoreType() on
26485         the return value of Object.GetType().  [FIXME: we need to do this whenever
26486         we get a type back from the reflection library].
26487
26488 Fri Jun 21 13:37:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26489
26490         * typemanager.cs: make ExpandInterfaces() slip duplicated interfaces.
26491
26492 2002-06-20  Miguel de Icaza  <miguel@ximian.com>
26493
26494         * attribute.cs: Return null if we can not look up the type.
26495
26496         * class.cs (TypeContainer.GetClassBases): Use ExpandInterfaces on
26497         the interface types found.
26498
26499         * interface.cs (Interface.GetInterfaceBases): Use ExpandInterfaces on the
26500         interface types found.
26501
26502         * typemanager.cs (GetInterfaces): Make this routine returns alll
26503         the interfaces and work around the lame differences between
26504         System.Type and System.Reflection.Emit.TypeBuilder in the results
26505         result for GetInterfaces.
26506
26507         (ExpandInterfaces): Given an array of interface types, expand and
26508         eliminate repeated ocurrences of an interface.  This expands in
26509         context like: IA; IB : IA; IC : IA, IB; the interface "IC" to
26510         be IA, IB, IC.
26511
26512 2002-06-21  Martin Baulig  <martin@gnome.org>
26513
26514         * typemanager.cs (TypeManager.EnumToUnderlying): It's now safe to call this function
26515         on System.Enum.
26516
26517 2002-06-21  Martin Baulig  <martin@gnome.org>
26518
26519         * typemanager.cs (TypeManager.TypeToCoreType): New function.  When compiling corlib
26520         and called with one of the core types, return the corresponding typebuilder for
26521         that type.
26522
26523         * expression.cs (ArrayAccess.DoResolve): Call TypeManager.TypeToCoreType() on the
26524         element type.
26525
26526 2002-06-21  Martin Baulig  <martin@gnome.org>
26527
26528         * ecore.cs (Expression.ExplicitReferenceConversionExists): Use
26529         `target_type.IsArray' instead of `target_type.IsSubclassOf (TypeManager.array_type)'.
26530         (Expression.ConvertReferenceExplicit): Likewise.
26531
26532         * expression.cs (ElementAccess.DoResolve): Likewise.
26533         (ElementAccess.DoResolveLValue): Likewise.
26534
26535 2002-06-10  Martin Baulig  <martin@gnome.org>
26536
26537         * interface.cs (Interface.PopulateIndexer): When creating the setter, we need to
26538         add the "value" parameter to the parameter list.
26539
26540         * statement.cs (Fixed.Emit): Pass the return value of the child block's Emit()
26541         to our caller.
26542
26543 2002-06-19  Miguel de Icaza  <miguel@ximian.com>
26544
26545         * expression.cs (ArrayCreation.ExpressionToArrayArgument): Convert
26546         the argument to an int, uint, long or ulong, per the spec.  Also
26547         catch negative constants in array creation.
26548
26549 Thu Jun 20 17:56:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26550
26551         * class.cs: do not allow the same interface to appear twice in
26552         the definition list.
26553
26554 Wed Jun 19 22:33:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26555
26556         * ecore.cs: don't use ldlen with System.Array.
26557
26558 Wed Jun 19 20:57:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26559
26560         * ecore.cs: stobj requires a type argument. Handle indirect stores on enums.
26561
26562 Wed Jun 19 20:17:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26563
26564         * modifiers.cs: produce correct field attributes for protected
26565         internal. Easy fix so miguel can work on ther harder stuff:-)
26566
26567 2002-06-18  Miguel de Icaza  <miguel@ximian.com>
26568
26569         * pending.cs: New file.  Move the code from class.cs here.
26570         Support clearning the pending flag for all methods (when not doing
26571         explicit interface implementation).
26572
26573 Tue Jun 18 10:36:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26574
26575         * rootcontext.cs: added a couple more types needed to bootstrap.
26576
26577 2002-06-17  Miguel de Icaza  <miguel@ximian.com>
26578
26579         * typemanager.cs (GetConstructor): Use DeclaredOnly to look the
26580         constructor in the type, instead of any constructor in the type
26581         hierarchy.  Thanks to Paolo for finding this bug (it showed up as
26582         a bug in the Mono runtime when applying the params attribute). 
26583
26584 2002-06-16  Rafael Teixeira  <rafaelteixeirabr@hotmail.com>
26585         * changed namespace.cs to use "GenericParser.error(...)" instead of "CSharpParser.error(...)"
26586
26587 2002-06-14  Rachel Hestilow  <hestilow@ximian.com>
26588
26589         * expression.cs (Unary.ResolveOperator): Use TypeManager
26590         to resolve the type.
26591
26592 2002-06-13  Ravi Pratap  <ravi@ximian.com>
26593
26594         * cs-parser.jay (enum_member_declaration): Pass in the attributes
26595         attached.
26596
26597         * enum.cs (AddEnumMember): Add support to store the attributes associated 
26598         with each member too.
26599
26600         * attribute.cs (CheckAttribute, ApplyAttributes): Update to handle
26601         field builders too - this takes care of the enum member case.
26602
26603 2002-06-10  Rachel Hestilow  <hestilow@ximian.com>
26604
26605         * typemanager.cs (TypeManager.VerifyUnManaged): Allow
26606         address-of operator on both value types and pointers.
26607
26608 2002-06-10  Martin Baulig  <martin@gnome.org>
26609
26610         * interface.cs (Interface.PopulateIndexer): Add the indexer's
26611         PropertyBuilder to the `property_builders' list.
26612
26613         * expression.cs (Indexers.GetIndexersForTypeOrInterface): New private method.
26614         (Indexers.GetIndexersForType): Call GetIndexersForTypeOrInterface() on the
26615         `lookup_type' and all its interfaces.  Unfortunately, Type.FindMembers() won't
26616         find any indexers which are inherited from an interface.
26617
26618 2002-06-09  Martin Baulig  <martin@gnome.org>
26619
26620         * const.cs (Const.LookupConstantValue): Convert `Expr' to a literal of
26621         the same type as the constant if necessary.  There's also a test-130.cs
26622         for this.
26623
26624         * enum.cs (Enum.ChangeEnumType): Moved to typemanager.cs and made public.
26625
26626         * typemanager.cs (TypeManager.ChangeType): Previously known as
26627         Enum.ChangeEnumType().
26628
26629 2002-06-09  Martin Baulig  <martin@gnome.org>
26630
26631         * expression.cs (Cast.TryReduce): Added support for consts.
26632
26633 2002-06-08  Ravi Pratap  <ravi@ximian.com>
26634
26635         * class.cs (Accessor): Hold attributes information so we can pass
26636         it along.
26637
26638         * cs-parser.jay (get_accessor_declaration, set_accessor_declaration):
26639         Modify to pass in attributes attached to the methods.
26640
26641         (add_accessor_declaration, remove_accessor_declaration): Ditto.
26642
26643         * attribute.cs (ApplyAttributes, CheckAttribute): Update accordingly
26644         to handle the Accessor kind :-)
26645
26646         * class.cs (Property.Emit, Event.Emit): Apply attributes to the accessors
26647
26648 2002-06-08  Martin Baulig  <martin@gnome.org>
26649
26650         * expression.cs (Unary.TryReduceNegative): Added support for
26651         ULongConstants.
26652
26653 2002-06-08  Martin Baulig  <martin@gnome.org>
26654
26655         * enum.cs (Enum.LookupEnumValue): Don't report an error if the
26656         name can't be found in the `defined_names' - the caller will do a
26657         MemberLookup in this case and thus find methods in System.Enum
26658         such as Enum.IsDefined().
26659
26660 2002-06-08  Martin Baulig  <martin@gnome.org>
26661
26662         * enum.cs (Enum.ChangeEnumType): This is a custom version of
26663         Convert.ChangeType() which works with TypeBuilder created types.
26664         (Enum.LookupEnumValue, Enum.Define): Use it here.
26665
26666         * class.cs (TypeContainer.RegisterRequiredImplementations): Added
26667         `TypeBuilder.BaseType != null' check.
26668         (TypeContainer.FindMembers): Only lookup parent members if we
26669         actually have a parent.
26670         (Method.EmitDestructor): Added `ec.ContainerType.BaseType != null' check.
26671         (ConstructorInitializer.Resolve): Likewise.
26672
26673         * interface.cs (Interface.FindMembers): Added
26674         `TypeBuilder.BaseType != null' check.
26675
26676         * rootcontext.cs (RootContext.ResolveCore): Added
26677         "System.Runtime.CompilerServices.IndexerNameAttribute" to
26678         classes_second_stage.
26679
26680         * typemanager.cs (TypeManager.InitCoreTypes): Don't initialize
26681         debug_type and trace_type when compiling with --nostdlib.       
26682
26683 2002-06-07  Martin Baulig  <martin@gnome.org>
26684
26685         * class.cs (TypeContainer): Added `have_nonstatic_fields' field.
26686         (AddField): Set it to true when adding a non-static field.
26687         (DefineType): Use `have_nonstatic_fields' to find out whether we
26688         have non-static fields, not `Fields != null'.
26689
26690 2002-06-02  Miguel de Icaza  <miguel@ximian.com>
26691
26692         * ecore.cs (SimpleNameResolve): Removed simple bug (we were
26693         dereferencing a null on the static-field code path)
26694
26695 2002-05-30  Martin Baulig  <martin@gnome.org>
26696
26697         * codegen.cs (InitMonoSymbolWriter): Added `string[] args' argument
26698         to take command line arguments.  Use reflection to call the new
26699         custom `Initialize' function on the symbol writer and pass it the
26700         command line arguments.
26701
26702         * driver.cs (--debug-args): New command line argument to pass command
26703         line arguments to the symbol writer.
26704
26705 2002-05-28  Miguel de Icaza  <miguel@ximian.com>
26706
26707         * assign.cs (DoResolve): Forgot to do the implicit conversion to
26708         the target type for indexers and properties.  Thanks to Joe for
26709         catching this.
26710
26711 2002-05-27  Miguel de Icaza  <miguel@ximian.com>
26712
26713         * typemanager.cs (MethodFlags): returns the method flags
26714         (Obsolete/ShouldIgnore) that control warning emission and whether
26715         the invocation should be made, or ignored. 
26716
26717         * expression.cs (Invocation.Emit): Remove previous hack, we should
26718         not do this on matching a base type, we should do this based on an attribute
26719
26720         Only emit calls to System.Diagnostics.Debug and
26721         System.Diagnostics.Trace if the TRACE and DEBUG defines are passed
26722         on the command line.
26723
26724         * rootcontext.cs: Global settings for tracing and debugging.
26725
26726         * cs-tokenizer.cs (define): New utility function to track
26727         defines.   Set the global settings for TRACE and DEBUG if found.
26728
26729 2002-05-25  Ravi Pratap  <ravi@ximian.com>
26730
26731         * interface.cs (Populate*): Pass in the TypeContainer as well as
26732         the DeclSpace as parameters so that we can create EmitContexts and
26733         then use that to apply attributes etc.
26734
26735         (PopulateMethod, PopulateEvent, PopulateProperty)
26736         (PopulateIndexer): Apply attributes everywhere.
26737
26738         * attribute.cs (CheckAttribute): Include InterfaceMethod, InterfaceEvent
26739         etc.
26740
26741         (ApplyAttributes): Update accordingly.
26742
26743         We now apply interface attributes for all members too.
26744
26745 2002-05-26  Miguel de Icaza  <miguel@ximian.com>
26746
26747         * class.cs (Indexer.Define); Correctly check if we are explicit
26748         implementation (instead of checking the Name for a ".", we
26749         directly look up if the InterfaceType was specified).
26750
26751         Delay the creation of the PropertyBuilder.
26752
26753         Only create the PropertyBuilder if we are not an explicit
26754         interface implementation.   This means that explicit interface
26755         implementation members do not participate in regular function
26756         lookups, and hence fixes another major ambiguity problem in
26757         overload resolution (that was the visible effect).
26758
26759         (DefineMethod): Return whether we are doing an interface
26760         implementation. 
26761
26762         * typemanager.cs: Temporary hack until we get attributes in
26763         interfaces (Ravi is working on that) and we get IndexerName
26764         support in interfaces.
26765
26766         * interface.cs: Register the indexers as properties.
26767
26768         * attribute.cs (Attribute.Resolve): Catch the error, and emit a
26769         warning, I have verified that this is a bug in the .NET runtime
26770         (JavaScript suffers of the same problem).
26771
26772         * typemanager.cs (MemberLookup): When looking up members for
26773         interfaces, the parent of an interface is the implicit
26774         System.Object (so we succeed in searches of Object methods in an
26775         interface method invocation.  Example:  IEnumerable x;  x.ToString
26776         ()) 
26777
26778 2002-05-25  Miguel de Icaza  <miguel@ximian.com>
26779
26780         * class.cs (Event): Events should also register if they do
26781         implement the methods that an interface requires.
26782
26783         * typemanager.cs (MemberLookup); use the new GetInterfaces
26784         method. 
26785
26786         (GetInterfaces): The code used to lookup interfaces for a type is
26787         used in more than one place, factor it here. 
26788
26789         * driver.cs: Track the errors at the bottom of the file, we kept
26790         on going.
26791
26792         * delegate.cs (NewDelegate.Emit): We have to emit a null as the
26793         instance if the method we are calling is static!
26794
26795 2002-05-24  Miguel de Icaza  <miguel@ximian.com>
26796
26797         * attribute.cs (ApplyAttributes): Make this function filter out
26798         the IndexerName attribute (as that attribute in reality is never
26799         applied) and return the string constant for the IndexerName
26800         attribute. 
26801
26802         * class.cs (TypeContainer.Emit): Validate that all the indexers
26803         have the same IndexerName attribute, and if so, set the
26804         DefaultName attribute on the class. 
26805
26806         * typemanager.cs: The return value might contain other stuff (not
26807         only methods).  For instance, consider a method with an "Item"
26808         property and an Item method.
26809
26810         * class.cs: If there is a problem with the parameter types,
26811         return. 
26812
26813 2002-05-24  Ravi Pratap  <ravi@ximian.com>
26814
26815         * ecore.cs (ImplicitConversionExists): Wrapper function which also
26816         looks at user defined conversion after making a call to 
26817         StandardConversionExists - we need this for overload resolution.
26818
26819         * expression.cs : Update accordingly the various method calls.
26820
26821         This fixes 2 bugs filed against implicit user defined conversions 
26822
26823 2002-05-22  Miguel de Icaza  <miguel@ximian.com>
26824
26825         * statement.cs: Track the result of the assignment.
26826
26827 2002-05-21  Miguel de Icaza  <miguel@ximian.com>
26828
26829         * expression.cs (MemberAccess): Improved error reporting for
26830         inaccessible members.
26831
26832 2002-05-22  Martin Baulig  <martin@gnome.org>
26833
26834         * makefile (mcs-mono2.exe): New target.  This is mcs compiled with
26835         itself with debugging support.
26836
26837 2002-05-22  Martin Baulig  <martin@gnome.org>
26838
26839         * typemanager.cs ("System.Runtime.InteropServices.StructLayoutAttribute"):
26840         Removed, this isn't needed anymore.
26841
26842 2002-05-20  Martin Baulig  <martin@gnome.org>
26843
26844         * typemanager.cs (InitEnumUnderlyingTypes): "System.Char" can't
26845         be underlying type for an enum.
26846
26847 2002-05-20  Miguel de Icaza  <miguel@ximian.com>
26848
26849         * typemanager.cs (InitEnumUnderlyingTypes): New helper function
26850         that splits out the loading of just the core types.
26851
26852         * rootcontext.cs (ResolveCore): Split the struct resolution in
26853         two, so we can load the enumeration underlying types before any
26854         enums are used.
26855
26856         * expression.cs (Is): Bandaid until we fix properly Switch (see
26857         bug #24985 for details).
26858
26859         * typemanager.cs (ImplementsInterface): The hashtable will contain
26860         a null if there are no interfaces implemented.
26861
26862 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
26863
26864         * cs-parser.jay (indexer_declarator): It is fine to have array
26865         parameters
26866
26867 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26868
26869         * typemanager.cs: (RegisterBuilder): New function used to register
26870         TypeBuilders that implement interfaces.  Since
26871         TypeBuilder.GetInterfaces (as usual) does not work with lame
26872         Reflection.Emit. 
26873         (AddUserType): register interfaces.
26874
26875         (ImplementsInterface): Use the builder_to_ifaces hash if we are
26876         dealing with TypeBuilder.  Also, arrays are showing up as
26877         SymbolTypes, which are not TypeBuilders, but whose GetInterfaces
26878         methods can not be invoked on them!
26879
26880         * ecore.cs (ExplicitReferenceConversionExists): Made public.
26881         (ImplicitReferenceConversionExists): Split out from
26882         StandardConversionExists. 
26883
26884         * expression.cs (As): We were only implementing one of the three
26885         cases for the as operator.  We now implement them all.
26886         (Is): Implement the various other cases for Is as well.
26887
26888         * typemanager.cs (CACHE): New define used to control if we want or
26889         not the FindMembers cache.  Seems to have a negative impact on
26890         performance currently
26891
26892         (MemberLookup): Nested types have full acess to
26893         enclosing type members
26894
26895         Remove code that coped with instance/static returns for events, we
26896         now catch this in RealFindMembers.
26897
26898         (RealFindMembers): only perform static lookup if the instance
26899         lookup did not return a type or an event.  
26900
26901 2002-05-17  Miguel de Icaza  <miguel@ximian.com>
26902
26903         * assign.cs (CompoundAssign): We pass more semantic information
26904         now to Compound Assignments than we did before: now we have all
26905         the information at hand, and now we resolve the target *before* we
26906         do the expression expansion, which allows the "CacheValue" method
26907         to have the effect we intended (before, a [x] += 1 would generate
26908         two differen ArrayAccess expressions from the ElementAccess,
26909         during the resolution process).
26910
26911         (CompoundAssign.DoResolve): Resolve target and original_source here.
26912
26913 2002-05-16  Miguel de Icaza  <miguel@ximian.com>
26914
26915         * expression.cs (ArrayAccess): dropped debugging information. 
26916
26917         * typemanager.cs: Small bug fix: I was always returning i_members,
26918         instead of one of i_members or s_members (depending on which had
26919         the content).
26920
26921         * assign.cs (IAssignMethod.CacheTemporaries): New method.  This
26922         method is invoked before any code generation takes place, and it
26923         is a mechanism to inform that the expression will be invoked more
26924         than once, and that the method should use temporary values to
26925         avoid having side effects
26926
26927         (Assign.Emit): Call CacheTemporaries in the IAssignMethod.
26928
26929         * ecore.cs (Expression.CacheTemporaries): Provide empty default
26930         implementation.
26931
26932         * expression.cs (Indirection, ArrayAccess): Add support for
26933         CacheTemporaries in these two bad boys. 
26934
26935         * ecore.cs (LoadFromPtr): figure out on our own if we need to use
26936         ldobj or ldind_ref.  
26937         (StoreFromPtr): Handle stobj as well.
26938
26939         * expression.cs (UnaryMutator): Share more code.
26940
26941         * typemanager.cs (FindMembers): Thanks to Paolo for tracking this
26942         down: I was not tracking the Filter function as well, which
26943         was affecting the results of the cache.
26944
26945 2002-05-15  Miguel de Icaza  <miguel@ximian.com>
26946
26947         * attribute.cs: Remove the hack to handle the CharSet property on
26948         StructLayouts. 
26949
26950 2002-05-14  Miguel de Icaza  <miguel@ximian.com>
26951
26952         * attribute.cs (DoResolve): More uglyness, we now only try to
26953         resolve the attribute partially, to extract the CharSet
26954         information (only if we are a StructLayout attribute).  Otherwise 
26955
26956         (GetExtraTypeInfo): Add some code to conditionally kill in the
26957         future this.   I am more and more convinced that the .NET
26958         framework has special code to handle the attribute setting on
26959         certain elements.
26960
26961         * expression.cs (IsParamsMethodApplicable): Revert my previous
26962         foreach change here, it was wrong.
26963
26964 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
26965
26966         * cs-tokenizer.cs: (pp_primary): Eat the ')' at the end.
26967         (pp_expr): do not abort on unknown input, just return.
26968         (eval): abort if there are pending chars.
26969
26970         * attribute.cs (Attribute.Resolve): Positional parameters are
26971         optional.  Deal with that case.
26972
26973         * class.cs (DefineType): Call Attribute.GetExtraTypeInfo to fetch
26974         the Ansi/Unicode/Auto information for the type.
26975
26976         (TypeContainer.DefineType): instantiate the EmitContext here, as
26977         we will be using it during the type definition (to resolve
26978         attributes) and during the emit phase.
26979
26980         * attribute.cs (Attribute.GetExtraTypeInfo): This routine is used
26981         to pull type information out of the attributes
26982
26983         (Attribute.Resolve): track the constructor builder, and allow for
26984         multiple invocations (structs and classes will use this).
26985
26986         * ecore.cs (MemberLookupFinal): new version with all the
26987         parameters customizable.
26988
26989         * expression.cs (New.DoResolve): Use MemberLookupFinal to locate
26990         constructors.  Return if the result value is null (as the error
26991         would have been flagged already by MemberLookupFinal)
26992
26993         Do not allow instances of abstract classes or interfaces to be
26994         created.
26995
26996         * class.cs: (MethodSignature.InheritableMemberSignatureCompare):
26997         We have to compare the assembly property here when dealing with
26998         FamANDAssem and Assembly access modifiers, because we might be
26999         creating an assembly from *modules* (that means that we are not
27000         getting TypeBuilders for types defined in other modules that are
27001         part of this assembly).
27002
27003         (Method.Emit): If the method is marked abstract and has a body,
27004         emit an error. 
27005
27006         (TypeContainer.DefineMembers): If both the defined member and the
27007         parent name match are methods, then do not emit any warnings: let
27008         the Method.Define routine take care of flagging warnings.  But if
27009         there is a mismatch (method overrides something else, or method is
27010         overriwritten by something, then emit warning).
27011
27012         (MethodSignature.MemberSignatureCompare): If the sig.ret_type is
27013         set to null, this means `do not check for the return type on the
27014         signature'. 
27015
27016         (Method.Define): set the return type for the method signature to
27017         null, so that we get methods with the same name and parameters and
27018         different return types.  This is used to flag warning 114 (you are
27019         hiding a method, and you probably want to use the new/override
27020         keywords instead).
27021
27022         * typemanager.cs (MemberLookup): Implemented proper access
27023         control, closing a long standing set of bug reports.  The problem
27024         was that the Framework only has two bits: Public and NonPublic,
27025         and NonPublic includes private and protected methods, but we need
27026         to enforce the FamANDAssem, FamOrAssem and Family. 
27027
27028 2002-05-11  Miguel de Icaza  <miguel@ximian.com>
27029
27030         * statement.cs (GotoCase): Return true: Ammounts to giving up
27031         knowledge on whether we return or not, and letting the other case
27032         be responsible for it.
27033
27034 2002-05-10  Miguel de Icaza  <miguel@ximian.com>
27035
27036         * driver.cs: Do not load directories for each file processed, only
27037         do it if there is a pattern.
27038
27039         * ecore.cs: Report readonly assigns here as well, as we might have
27040         been resolved only by MemberAccess.
27041
27042         (SimpleName.SimpleNameResolve): Also be useful for LValue
27043         resolution.   We need this to propagate assign to local readonly variables
27044
27045         * typemanager.cs: Use a ptrhashtable for the criteria, because we
27046         do not want to reuse potential criteria memory.
27047
27048         * class.cs (MyEventBuilder): Set reflected_type;
27049
27050         * ecore.cs (Constantify): Added support for constifying bools.
27051
27052         (RootContext.LookupType): Added a cache for values looked up in
27053         the declaration space.
27054
27055         * typemanager.cs (FindMembers): Now is a front-end to
27056         RealFindMembers, and provides a two-level hashtable-based cache to
27057         the request.  
27058
27059         15% performance improvement: from 22.5 to 19.2 seconds.
27060
27061         * expression.cs (IsParamsMethodApplicable): use foreach.
27062         (Invocation.DoResolve): ditto.
27063         (New.DoResolve): ditto.
27064         (ArrayCreation.DoResolve): ditto.
27065
27066         * ecore.cs (FindMostEncompassingType): use foreach.
27067
27068         * delegate.cs (NewDelegate.DoResolve): Use foreach
27069
27070         * ecore.cs (Expression.FindMostSpecificSource): Use foreach.
27071         (RemoveMethods): use foreach.
27072
27073         * expression.cs (Invocation.MakeUnionSet): Optimization: Use two
27074         nested foreach statements instead of for, and also break out of
27075         the inner loop once a match is found.
27076
27077         (Invocation.OverloadResolve): Use foreach, simplify the code. 
27078
27079 2002-05-08  Miguel de Icaza  <miguel@ximian.com>
27080
27081         * cfold.cs (BinaryFold): During an enumeration evaluation context,
27082         we actually unwrap the expression to allow for extra information
27083         to be extracted. 
27084
27085         * expression.cs: Use Shr_Un on unsigned operations. 
27086
27087 2002-05-08  Ravi Pratap  <ravi@ximian.com>
27088
27089         * ecore.cs (FindMostEncompass*): Fix trivial bug where the set of 
27090         applicable operators was not being considered correctly. This closes
27091         the bug Miguel reported.
27092
27093 Wed May 8 16:40:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
27094
27095         * attribute.cs: check that the type derives from System.Attribute
27096         and report the correct error in that case (moved the duplicate code to
27097         its own method, too).
27098
27099 Wed May 8 11:50:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27100
27101         * attribute.cs: lookup attribute type name as the spec says: first the
27102         bare attribute name and then name + "Attribute" (nant compiles with
27103         mcs after this fix).
27104
27105 2002-05-07  Miguel de Icaza  <miguel@ximian.com>
27106
27107         * expression.cs (Unary.TryReduceNegative): Ah!  Tricky!  Tricky!
27108         Because of the way we parse things, we should try to see if a
27109         UIntConstant can fit in an integer.
27110
27111 2002-05-07  Ravi Pratap  <ravi@ximian.com>
27112
27113         * ecore.cs (GetConversionOperators): Do not pick up op_True operators
27114         when we are in an explicit context.
27115
27116         (ConvertReferenceExplicit): When converting from Iface type S to Class
27117         T make sure the rules are implemented as an OR.
27118
27119         * parameter.cs (ParameterType): Make it a property for now although the
27120         purpose really isn't anything immediate.
27121
27122         * expression.cs (Is*Applicable): Do better checking on the parameter type
27123         of a ref/out parameter. The ones from the system assemblies are already 
27124         marked with the correct type so we don't need to do any correction.
27125
27126         * ecore.cs (StandardConversionExists): Conversion from Interface types to 
27127         the object type is standard too so include that.
27128
27129 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27130
27131         * ecore.cs (StandardConversionExists): Augment with missing code:
27132         deal with IntConstant, LongConstants and Enumerations.
27133
27134         * assign.cs: Report the error, instead of failing silently
27135
27136         * rootcontext.cs (AddGlobalAttributes): Track attributes on the
27137         typecontainer that they are declared, because the
27138         typecontainer/namespace will have the list of using clauses that
27139         need to be applied.
27140
27141         Assembly Attributes were escaping the normal registration
27142         mechanism. 
27143
27144         (EmitCode): Apply attributes within an EmitContext that represents
27145         the container they were declared on.
27146
27147         * cs-parser.jay: Track bases for structs.  How did I get this wrong?
27148
27149 2002-05-06  Ravi Pratap  <ravi@ximian.com>
27150
27151         * ecore.cs (FindMostEncompassingType, FindMostEncompassedType):
27152         Revamp completely - make much cleaner as we now operate only
27153         on a set of Types.
27154
27155         (FindMostSpecificSource, FindMostSpecificTarget): New methods
27156         to implement the logic detailed in the spec more correctly.
27157
27158         (UserDefinedConversion): Update accordingly.
27159
27160 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27161
27162         * statement.cs: Return flow analysis information up.
27163
27164         * cs-tokenizer.cs (adjust_real): Share code between LITERAL_DOUBLE
27165         and the default.
27166
27167         (token): Do not consume an extra character before calling
27168         decimal_digits.
27169
27170 2002-05-06  Piers Haken <piersh@friskit.com>
27171
27172         * cs-parser.jay: add 'override' attribute to System.Object.Finalize
27173
27174 2002-05-06  Miguel de Icaza  <miguel@ximian.com>
27175
27176         * class.cs (Constructor.Emit): Set the IsStatic flag in the
27177         EmitContext during the instance constructor initializer
27178         resolution, to stop access to instance variables.
27179
27180         This is mandated by the spec, last paragraph of the `constructor
27181         initializers' section. 
27182
27183 2002-05-05  Miguel de Icaza  <miguel@ximian.com>
27184
27185         * cs-parser.jay, class.cs (Accessor): new class used to represent
27186         an accessor (get or set).  In the past we used `null' to represent
27187         a missing accessor.  But this is ambiguous because there was no
27188         way to tell in abstract indexers/properties if one of them was
27189         specified.
27190
27191         Now there is a way of addressing that.
27192
27193         * expression.cs (Indexers.GetIndexersForType): Use TypeManager.MemberLookup
27194         instead of FindMembers.
27195
27196         * class.cs (TypeContainer.EmitFieldInitializer): Do not typecast
27197         the result of Assign.Resolve as Assign, but rather as ExpressionStatement.
27198
27199         * attribute.cs: Treat indexers and properties as the same in terms
27200         of applying attributes
27201
27202         * ecore.cs (FindMostEncompassedType): Use statically initialized
27203         EmptyExpressions()s like we do elsewhere to avoid creating useless
27204         objects (and we take this out of the tight loop).
27205
27206         (GetConversionOperators): Move the code to extract the actual
27207         operators to a separate routine to clean things up.
27208
27209 2002-05-04  Miguel de Icaza  <miguel@ximian.com>
27210
27211         * ecore.cs (FieldExpr): Remove un-needed tests for null, since now
27212         events are always registered FieldBuilders.
27213
27214         * class.cs (FieldBase): New class shared by Fields 
27215
27216         * delegate.cs: If we are a toplevel delegate, use our full name.
27217         If we are a nested delegate, then only use our tail name.
27218
27219 2002-05-02  Ravi Pratap  <ravi@ximian.com>
27220
27221         * expression.cs (IsApplicable): Ensure that we add the "&" to
27222         ref/out types before comparing it with the type of the argument.
27223
27224         (IsParamsMethodApplicable): Ditto.
27225
27226         (Argument.Type): Use TypeManager.LookupType instead of Type.GetType - 
27227         silly me ;-)
27228
27229         * delegate.cs : Handle the case when we have more than one applicable
27230         method. Flag an error only when we finish checking all.
27231
27232 2002-05-02  Miguel de Icaza  <miguel@ximian.com>
27233
27234         * expression.cs: Add support for boolean static initializers.
27235
27236 2002-05-01  Miguel de Icaza  <miguel@ximian.com>
27237
27238         * attribute.cs: Use proper cast for Events, since we use a MyEventBuilder.
27239
27240         * parameter.cs (ComputeParameterTypes,
27241         ComputeAndDefineParameterTypes): Better error handling: now we
27242         clear the `types' cache if we fail during any of the type lookups.
27243         We also return the status code correctly to our caller
27244
27245         * delegate.cs: If we fail to define a delegate, abort the extra
27246         steps. 
27247
27248         * expression.cs (Binary.ResolveOperator): for
27249         operator==(object,object) and operator !=(object, object) we also
27250         have to verify that there is an implicit conversion from one to
27251         the other.
27252
27253         (ArrayAccess.DoResolve): Array Access can operate on
27254         non-variables. 
27255
27256 2002-04-30  Miguel de Icaza  <miguel@ximian.com>
27257
27258         * assign.cs (CompoundAssign): A new class used as a "flag" that
27259         the assignment actually is happening as part of a compound
27260         assignment operator.
27261
27262         During compound assignment, a few new rules exist to enable things
27263         like:
27264
27265         byte b |= 1 + 2
27266
27267         From the spec:
27268
27269         x op= y can be evaluated as x = (T) (x op y) (ie, an explicit cast
27270         to the type of x) if y is implicitly convertible to the type of x,
27271         and the operator is a builtin operator and the return type of the
27272         operator is explicitly convertible to the type of x. 
27273
27274         * rootcontext.cs: Reset warning level to 2.  4 catches various
27275         "interesting" features in mcs, we must clean this up at some
27276         point, but currently am trying to kill other bugs ;-)
27277
27278         * ecore.cs (SimpleName.SimpleNameResolve): Perform member lookups
27279         in container classes as well.  
27280
27281         * expression.cs (Binary.ResolveOperator): Handle string case
27282         before anything else (as operator overloading does emit an error
27283         before doing anything else).
27284
27285         This code could go away when we move to a table driven model, but
27286         i could not come up with a good plan last night.
27287
27288 2002-04-30  Lawrence Pit <loz@cable.a2000.nl>
27289
27290         * typemanager.cs (CSharpName): reimplementation using regex.
27291         * class.cs: added null check for fields in Emit
27292         * rootcontext.cs: set warninglevel to 4
27293
27294 2002-04-29  Miguel de Icaza  <miguel@ximian.com>
27295
27296         * typemanager.cs (CSharpName): reimplemented with Lupus
27297         suggestion.
27298
27299 2002-04-28  Miguel de Icaza  <miguel@ximian.com>
27300
27301         * statement.cs (If): correclty implement Resolve, because we were
27302         not catching sem errors in there.  The same process is needed
27303         everywhere else. 
27304         (Return, StatementExpression, For, While, Do, Throw, Lock): Implement Resolve
27305
27306
27307         (Statement.Warning_DeadCodeFound): Factorize code.
27308         (While): Report dead code here too.
27309
27310         (Statement): Added Resolve virtual method to allow
27311         for resolution split from the emit code.
27312
27313 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27314
27315         * statement.cs (EmitBoolExpression): No longer try to resolve the
27316         expression here.    
27317         (MakeBoolean): New utility function that resolve, implicitly
27318         converts to boolean and tags the expression. 
27319
27320
27321         (If, Do): Implement dead code elimination.
27322         (While): Implement loop inversion
27323
27324         (Do, While, For, If): Resolve the expression prior to calling our
27325         code generation.
27326
27327 2002-04-22  Lawrence Pit <loz@cable.a2000.nl>
27328
27329         * class.cs:
27330           - added method Report28 (warning: program has more than one entry point)
27331           - added method IsEntryPoint, implements paragraph 10.1 of the spec
27332           - modified method Method.Define, the part at the end of the method
27333
27334         * rootcontext.cs: added static public Location EntryPointLocation;
27335           
27336         * ../errors/cs0028.cs : Add test case for the above warning.              
27337
27338         * typemanager.cs:
27339           - modified method CSharpName to allow arrays of primitive type to
27340             be printed nicely (e.g. instead of System.Int32[][] it now prints
27341             int[][])
27342           - added method CSharpSignature: returns the signature of a method
27343             in string format to be used in reporting errors, warnings, etc.
27344
27345         * support.cs: InternalParameters.ParameterDesc variable tmp initialized
27346         with String.Empty.
27347
27348 2002-04-26  Ravi Pratap  <ravi@ximian.com>
27349
27350         * delegate.cs (Define): Fix extremely silly bug where I was
27351         setting the type of the 'object' parameter of the BeginInvoke
27352         method to System.IAsyncResult instead of System.Object ;-)
27353
27354 2002-04-26  Miguel de Icaza  <miguel@ximian.com>
27355
27356         * class.cs (ConstructorInitializer.Resolve): Also use DeclaredOnly
27357         here. 
27358
27359         (Constructor.Emit): return if we fail to initialize the
27360         constructor.  Another door closed!  
27361
27362         * expression.cs (New.DoResolve): Improve error message (from -6 to
27363         1501).  Use DeclaredOnly lookup to find the exact constructor.
27364
27365         * typemanager.cs (MemberLookup): If DeclaredOnly is set, do not
27366         loop.  This is useful.
27367
27368         * cs-parser.jay: Adjust the default parameters so that destructors
27369         have the proper signature.
27370
27371 2002-04-26  Martin Baulig  <martin@gnome.org>
27372
27373         * driver.cs (LoadAssembly): If `assembly' contains any characters
27374         which are only valid in path names and not in assembly names
27375         (currently slash, backslash and point), use Assembly.LoadFrom ()
27376         instead of Assembly.Load () on the `assembly' (before iteration
27377         over the link_paths).
27378
27379 2002-04-26  Martin Baulig  <martin@gnome.org>
27380
27381         * cs-tokenizer.cs (is_hex): Correctly handle lowercase chars.
27382
27383 2002-04-25  Miguel de Icaza  <miguel@ximian.com>
27384
27385         * class.cs (Property): use the new typemanager.MemberLookup
27386
27387         (TypeContainer.MemberLookup): Implement using the
27388         TypeManager.MemberLookup now. 
27389
27390         * typemanager.cs: Make MemberLookup a function of the TypeManager,
27391         and return MemberInfos, so that these can be used without an
27392         EmitContext (what we had before).
27393
27394 2002-04-24  Miguel de Icaza  <miguel@ximian.com>
27395
27396         * expression.cs: Fix the case where the argument to params if the
27397         type of the params.  I omitted handling this before.   Fixed
27398
27399 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27400
27401         * driver.cs: Call BootCorlib_PopulateCoreType
27402
27403         * class.cs (Property.CheckBase): Check for properties only, not
27404         for all members. 
27405
27406         * interface.cs: Temporary hack: try/catch around the
27407         CustomAttributeBuilder, because I am getting an exception that I
27408         do not understand.
27409
27410         * rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
27411         types whose definitions are required to be there (attributes are
27412         defined before standard types).
27413
27414         Compute definitions as we boot the various types, as they are used
27415         immediately (value_type class will need object_type, but if we do
27416         not initialize object_type, we will pass a null, which will let
27417         the runtime pick the System.Object from the existing corlib, which
27418         is not what we want).
27419
27420 2002-04-22  Patrik Torstensson <totte@labs2.com>
27421
27422         * cs-tokenizer.cs: fixed a number of trim() issues.
27423
27424 2002-04-22  Ravi Pratap  <ravi@ximian.com>
27425
27426         * expression.cs (Argument.Type): Ensure that we return the correct
27427         type when we have out or ref parameters [in which case we 
27428         append a "&"].
27429
27430 2002-04-22  Miguel de Icaza  <miguel@ximian.com>
27431
27432         * class.cs (Property, Indexer): Allow extern modifier in there. 
27433
27434         * typemanager.cs (InitBaseTypes): Initializes object_type and
27435         value_type, since those will be used early on during the bootstrap
27436         process to compile corlib.
27437
27438         (InitCoreTypes): Move code from here to InitBaseTypes.
27439
27440 2002-04-21  Miguel de Icaza  <miguel@ximian.com>
27441
27442         * ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
27443         single-dimension arrays as using the ldlen opcode.  
27444
27445         Daniel Lewis discovered this optimization.  
27446
27447         * typemanager.cs: Add signature for System.Array::get_Length
27448
27449 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27450
27451         * statement.cs: report the error when the foreach does not apply to an
27452         array nor a collection.
27453
27454 2002-04-19  Miguel de Icaza  <miguel@ximian.com>
27455
27456         * expression.cs: Add implicit conversions to the operator ~.
27457
27458         * constant.cs (DecimalConstant.Emit): Emit decimal value.
27459
27460         * typemanager.cs: Locate the decimal constructor.
27461
27462 2002-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27463
27464         * attribute.cs: use the new property of TypeOf.
27465         * expression.cs: added 'get' property around typearg.
27466
27467         These changes fix a build breaker reported by NickD. Is this the
27468         correct way to fix?  If not, please, revert my changes and make it
27469         work :-).
27470
27471 2002-04-17  Miguel de Icaza  <miguel@ximian.com>
27472
27473         * attribute.cs: Add support for typeof in attribute invocations.
27474         I am not sure that this is right though.
27475
27476 2002-04-14  Duncan Mak  <duncan@ximian.com>
27477
27478         * cfold.cs (BinaryFold): Catch DivideByZeroException in the
27479         Binary.Operator.Division case.
27480
27481 2002-04-13  Ravi Pratap  <ravi@ximian.com>
27482
27483         * class.cs (DefineType): Ensure that we do a proper check on
27484         attribute types and also register it with the TypeManager.
27485
27486         (TypeContainer.Targets): The default for attribute types is
27487         AttributeTargets.All.
27488
27489         * attribute.cs (ApplyAttributes): Registering the attribute type
27490         is done elsewhere, not when we discover we have a Usage attribute.
27491
27492 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27493
27494         * expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
27495         and get rid of is_delegate parameter.
27496
27497         * everywhere : update.
27498
27499 2002-04-12  Ravi Pratap  <ravi@ximian.com>
27500
27501         * cs-parser.jay (compilation_unit): Revamp completely to use
27502         some new ideas that I got from Rhys' grammar to solve the problems
27503         with assembly level attributes.
27504
27505         (outer_declaration): New grammar production.
27506
27507         (attribute_sections): Add.
27508
27509         (opt_attributes): Base on attribute_sections
27510
27511         (namespace_declaration): Allow opt_attributes to tackle the case
27512         when we have assembly level attributes - we are clever in this
27513         regard now ;-)
27514
27515         * attribute.cs (ApplyAttributes): Do not worry about assembly 
27516         attributes in the non-global context.
27517
27518         * rootcontext.cs (AddGlobalAttributes): Go back to using this
27519         instead of SetGlobalAttributes.
27520
27521         * class.cs, rootcontext.cs : Ensure we define and generate 
27522         attribute types before anything else.
27523
27524         * attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
27525         and flag the new error -20 for the case when the attribute type
27526         does not have valid targets specified. csc does not catch this.
27527
27528         * ../errors/errors.txt : update for error # -20
27529
27530 2002-04-11  Ravi Pratap  <ravi@ximian.com>
27531
27532         * support.cs (InternalParameters.ParameterModifier): Do some null
27533         checking and return sane values.
27534
27535         * class.cs (Method.Define): If we are a PInvoke method, ensure
27536         that we are static and extern. Report error # 601
27537
27538         * ../errors/cs0601.cs : Add test case for the above error.
27539
27540 2002-04-07  Ravi Pratap  <ravi@ximian.com>
27541
27542         * rootcontext.cs (attribute_types): We need to keep type of
27543         all attribute types separately and emit code for them first.
27544
27545         (RegisterAttribute) : Implement.
27546
27547         * class.cs (DefineType): Check if the current Type is a custom
27548         attribute type and register it accordingly.
27549
27550         * rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
27551         adding the first attribute twice and rename to
27552
27553         (SetGlobalAttributes): this.
27554
27555         * rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
27556         lookups.
27557
27558         * attribute.cs (ApplyAttributes): Take an additional argument telling us
27559         if we are processing global arguments. Hmm, I am unsure of this.
27560
27561 2002-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27562
27563         * expression.cs: added static array of strings to avoid calling
27564         Enum.ToString () for Operator in Binary. Significant recover of
27565         performance.
27566
27567 2002-04-10  Miguel de Icaza  <miguel@ximian.com>
27568
27569         * class.cs (FindMembers): Allow the Builders of the various
27570         members to be null.  If they are skip them.  This only happens
27571         during the PInvoke declaration.
27572
27573 2002-04-09  Miguel de Icaza  <miguel@ximian.com>
27574
27575         * parameter.cs (Parameters.ComputeParameterTypes): Flag the
27576         failure, so we do not keep going afterwards.
27577
27578         * expression.cs: (Invocation.OverloadResolve): I believe Ravi
27579         wanted to pass `false' as the `is_delegate' argument.  If this is
27580         the case, why not use delegate_type == null to mean `is_delegate =
27581         false' and anything else as is_delegate = true.
27582
27583 Tue Apr  9 05:40:12  2002 Piers Haken <piersh@friskit.com>
27584
27585         * statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
27586         code for the section, not the beginning of the tests.
27587
27588 2002-04-08  Miguel de Icaza  <miguel@ximian.com>
27589
27590         * cfold.cs: Handle operator + (Enum x, Underlying x) 
27591
27592         * expression.cs (Binary): same.  Warn about errors where we have
27593         Enum/Enum in operator + as well.
27594
27595 Mon Apr  8 06:29:03  2002 Piers Haken <piersh@friskit.com>
27596
27597         * statement.cs:
27598                 - added support for switch(bool)
27599                 - optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
27600                 - add TableSwitchEmit() to handle table-based switch statements
27601
27602 2002-04-05  Ravi Pratap  <ravi@ximian.com>
27603
27604         * expression.cs (Invocation.OverloadResolve): Factor out code which
27605         does parameter compatibility checking with arguments so that we can 
27606         re-use the code even from Delegate.VerifyApplicability
27607
27608         (VerifyArgumentsCompat): Move above code here.
27609
27610         * delegate.cs (VerifyApplicability): Get rid of duplicate code
27611         and instead make a call to the above method.
27612
27613 2002-03-31  Ravi Pratap  <ravi@ximian.com>
27614
27615         * typemanager.cs (attribute_type): Corresponds to System.Attribute.
27616         We use it to keep track of classes which are attribute types.
27617
27618 2002-04-02  Miguel de Icaza  <miguel@ximian.com>
27619
27620         * delegate.cs (Delegate.Define): Correctly define the types in the
27621         presence of fixed and array parameters.
27622
27623         * class.cs (TypeContainers.FindMembers): Use NonPublic flag while
27624         doing FindMembers.
27625
27626         * ecore.cs (Expression.MemberLookup): Reset binding flags to not
27627         include NonPublic after the first iteration.
27628
27629         * class.cs (Indexer.CheckBase): Only check if both parents are
27630         non-null. 
27631
27632         * cs-parser.jay (accessor_body): If empty, set to null.
27633
27634         * ecore.cs (SimpleName.SimpleNameResolve): We did not have the
27635         same code path here to resolve constants names that we did have in
27636         MemberAccess.DoResolve.  There is too much code duplicated here.
27637
27638 2002-04-01  Miguel de Icaza  <miguel@ximian.com>
27639
27640         * statement.cs, makefile: Drop Statementcollection and just use ArrayLists
27641
27642         * ecore.cs: Optimize UserDefinedConversion by minimizing the calls
27643         to MakeUnionSet.
27644
27645         * cs-tokenizer.cs: Reuse a single StringBuilder for assembling
27646         tokens, numbers and strings.
27647
27648         * ecore.cs (MethodGroupExpr): Make Emit warn about missing
27649         parenthesis.
27650
27651         * delegate.cs: Use ComputeAndDefineParameterTypes for both the
27652         asyncronous parameters and the regular parameters.  
27653
27654         * codegen.cs (CodeGen.Init): Use the constructor that allows us to
27655         specify the target directory.
27656
27657         * expression.cs: (This.DoResolve): Simplify
27658         (As.Emit): Optimize, do not generate IsInst if the expression is
27659         always of the given type.
27660
27661         (Is.DoResolve): Bug fix, we were reporting both always/never for
27662         the is expression.
27663
27664         * (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
27665         creating too many unnecessary arrays.
27666
27667 2002-03-31  Miguel de Icaza  <miguel@ximian.com>
27668
27669         * class.cs (EmitFieldInitializer): Use Assign expression to assign
27670         fields instead of rolling our own initializer.   Takes care of all
27671         implicit conversions, and drops unnecessary static checks/argument.
27672
27673 2002-03-31  Dick Porter  <dick@ximian.com>
27674
27675         * driver.cs: use the GetDirectories() return values properly, and
27676         use "/" as path separator.
27677
27678 2002-03-30  Miguel de Icaza  <miguel@ximian.com>
27679
27680         * expression.cs (Unary): Optimize - - expr into expr.
27681         (Binary): Optimize a + (-b) into a -b.
27682
27683         * codegen.cs (CodeGen): Made all methods static.
27684
27685 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
27686
27687         * rootcontext.cs: 
27688
27689         * decl.cs: Rename `definition' into `TypeBuilder' and drop the
27690         TypeBuilder property.
27691
27692         * cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
27693         instead. 
27694
27695         * tree.cs: Removed the various RecordXXXX, and replaced with a
27696         single RecordDecl.  Removed all the accessor methods, and just
27697         left a single access point Type 
27698
27699         * enum.cs: Rename DefineEnum to DefineType.
27700
27701         * decl.cs: New abstract method `DefineType' used to unify the
27702         Defines for Enumerations, Interfaces, TypeContainers and
27703         Delegates.
27704
27705         (FindType): Moved LookupInterfaceOrClass here.  Moved the
27706         LookupBaseClasses method that used to live in class.cs and
27707         interface.cs here, and renamed to FindType.
27708
27709         * delegate.cs: Implement DefineType.  Take advantage of the
27710         refactored pattern for locating the parent builder without taking
27711         the parent_builder argument (which we know does not work if we are
27712         nested, and triggering a toplevel definition).
27713
27714 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27715
27716         * decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
27717         accessibility of a member has changed during override and report
27718         an error if so.
27719
27720         * class.cs (Method.Define, Property.Define): Only complain on
27721         overrides if the method is private, any other accessibility is
27722         fine (and since we just checked the permission is the same, we are
27723         good to go).
27724
27725         * cs-tokenizer.cs: only line, region, endregion, if, endif, else
27726         and elif are processed always.  The other pre-processing
27727         directives are only processed if we are "taking" the path
27728
27729 2002-03-29  Martin Baulig  <martin@gnome.org>
27730
27731         * class.cs (Method.Emit): Only emit symbolic debugging info if the
27732         current location is not Null.
27733
27734         * codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
27735         a separate method so we can profile it.
27736
27737         * driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
27738         `span.Seconds' are just seconds, but no minutes or hours.
27739         (MainDriver): Profile the CodeGen.SaveSymbols calls.
27740
27741 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27742
27743         * class.cs (Method.Define), (Property.Define), (Indexer.Define):
27744         Remove the gratuitous set of Final:
27745
27746                                 // If an interface implementation, then we can set Final.
27747                                 if (((flags & MethodAttributes.Abstract) == 0) &&
27748                                     implementing.DeclaringType.IsInterface)
27749                                         flags |= MethodAttributes.Final;
27750
27751         I do not know what I was smoking when I used that.
27752
27753
27754         * cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
27755         step into fixing the name resolution issues for delegates and
27756         unifying the toplevel name resolution.
27757
27758 2002-03-28  Martin Baulig  <martin@gnome.org>
27759
27760         * class.cs (Method.Emit): If we have a symbol writer, call its
27761         OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
27762         tell it about the current method.
27763
27764         * codegen.cs (EmitContext.Mark): New public method. Tell the symbol
27765         writer that we're going to emit the first byte of IL code for a new
27766         statement (a new source line).
27767         (EmitContext.EmitTopBlock): If we have a symbol writer, call
27768         EmitContext.Mark() before emitting any code.
27769
27770         * location.cs (SymbolDocument): Return null when we're Null.
27771
27772         * statement.cs (Statement): Moved the `Location loc' variable here.
27773         (Statement.EmitBoolExpression): If we have a symbol writer, call
27774         ec.Mark() before emitting any code to tell it that we're at the
27775         beginning of a new statement.
27776         (StatementExpression): Added `Location' argument to the constructor.
27777         (Block): Added public readonly variable `StartLocation' and public
27778         variable `EndLocation'.  The latter is to be set using SetEndLocation().
27779         (Block): Added constructor which takes a start and end location.
27780         (Block.SetEndLocation): New method. This sets the end location.
27781         (Block.EmitMeta): If we have a symbol writer, tell it the names of the
27782         local variables we create.
27783         (Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
27784         each statement and do also mark the begin and end of the block.
27785
27786         * cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
27787         tell it the current lexer.Location, use Location.Null for the end of the
27788         block.
27789         (block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
27790         current block, set its end location using SetEndLocation().
27791         (statement_expression): StatementExpression constructor now takes the
27792         lexer.Location as additional argument.
27793         (for_statement, declare_local_variables): Likewise.
27794         (declare_local_variables): When creating a new implicit block, use the
27795         new Block constructor and pass it the lexer.Location.
27796
27797 2002-03-28  Miguel de Icaza  <miguel@ximian.com>
27798
27799         * ecore.cs (Expression.MemberLookup): On interfaces, lookup
27800         members also on the parent interfaces recursively.
27801
27802 2002-03-27  Miguel de Icaza  <miguel@ximian.com>
27803
27804         * report.cs: Use new formats, since Gonzalo finished the missing
27805         bits. 
27806
27807         * expression.cs (Binary.ResolveOperator): added missing operator|
27808         operator& and operator^ for bool/bool.
27809
27810         * cs-parser.jay: CheckDef now takes a Location argument that is
27811         used to report errors more precisly (instead of reporting the end
27812         of a definition, we try to track something which is a lot closer
27813         to the source of the problem).
27814
27815         * cs-tokenizer.cs: Track global token use, so we can properly flag
27816         the use of #define/#undef after the first token has been seen.
27817
27818         Also, rename the reportXXXX to Error_DescriptiveName
27819
27820         * decl.cs (DeclSpace.IsTopLevel): Move property here from
27821         TypeContainer, so that Enum and Interface can use this too.
27822
27823         * class.cs (TypeContainer.LookupInterfaceOrClass,
27824         GetInterfaceOrClass, GetClassBases, DefineType): Drop the
27825         `builder' argument.  Typically this was used to pass the parent
27826         builder (a ModuleBuilder or a TypeBuilder from whoever triggered
27827         the definition).  
27828
27829         The problem is that a nested class could trigger the definition of
27830         a toplevel class, and the builder would be obviously wrong in that
27831         case. 
27832
27833         So we drop this argument, and we compute dynamically the
27834         TypeBuilder/ModuleBuilder (the correct information was available
27835         to us anyways from DeclSpace.Parent)
27836
27837         * interface.cs (Interface.DefineInterface): Drop builder
27838         parameter cleanup like class.cs
27839
27840         * enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
27841         like class.cs
27842
27843         * statement.cs (Switch.EmitObjectInteger): Emit short/ushort
27844         values. 
27845
27846         (Try.Emit): Propagate the returns value from the statement.
27847
27848         (Return.Emit): Even if we are leavning 
27849
27850         * driver.cs: Catch IOExpcetion for Directory.GetFiles as well.
27851
27852         * modifiers.cs: Fix the computation of MethodAttributes flags.
27853
27854 Tue Mar 26 21:14:36 CET 2002 Paolo Molaro <lupus@ximian.com>
27855
27856         * driver.cs: allow compilation of files that start with '/'.
27857         Add a default case when checking the argument of --target.
27858
27859 2002-03-25  Miguel de Icaza  <miguel@ximian.com>
27860
27861         * interface.cs: Implement the same search algorithm for types in
27862         the interface code.
27863
27864         * delegate.cs: Do not allow multiple definition.
27865
27866         * Recovered ChangeLog that got accidentally amputated
27867
27868         * interface.cs (Interface.DefineInterface): Prevent from double definitions.
27869
27870         * rootcontext.cs: Load manually enum to allow core classes to
27871         contain enumerations.
27872
27873         * enum.cs, ecore.cs, driver.cs, attribute.cs, class.cs, expression.cs:
27874         Update to new static methods in TypeManager.
27875
27876         * typemanager.cs (GetMethod, GetConstructor): Use our
27877         implementation of FindMembers to find the members, since during
27878         corlib compilation, the types are TypeBuilders and GetMethod and
27879         GetConstructor do not work.
27880
27881         Make all methods in TypeManager static.
27882
27883         (InitCodeHelpers): Split the functionality from
27884         the InitCodeTypes function.
27885
27886         * driver.cs: Call InitCodeHelpers after we have populated the
27887         types. 
27888
27889         * cs-parser.jay (delegate_declaration): we did not used to compute
27890         the delegate name correctly for void delegates.
27891
27892 2002-03-24  Miguel de Icaza  <miguel@ximian.com>
27893
27894         * rootcontext.cs (RootContext): Init the interface_resolve_order
27895         and type_container_resolve_order always.
27896
27897         (ResolveCore, BootstrapCorlib_ResolveClass,
27898         BootstrapCorlib_ResolveStruct): New functions to bootstrap the
27899         compiler when compiling with --nostdlib
27900
27901         * class.cs (TypeContainer.DefineType): Check that our parent is
27902         not null.  This test is most important when we are bootstraping
27903         the core types.
27904
27905         * codegen.cs: Split out the symbol writing code.
27906
27907 2002-03-25  Martin Baulig  <martin@gnome.org>
27908
27909         * driver.cs (-g): Made -g an alias for --debug.
27910
27911 2002-03-24  Martin Baulig  <martin@gnome.org>
27912
27913         * codegen.cs (SymbolWriter): New public variable. Returns the
27914         current symbol writer.
27915         (CodeGen): Added `bool want_debugging_support' argument to the
27916          constructor. If true, tell the ModuleBuild that we want debugging
27917         support and ask it for the ISymbolWriter.
27918         (Save): If we have a symbol writer, call it's Close() method after
27919         saving the assembly.
27920
27921         * driver.c (--debug): New command line argument to create a
27922         debugger information file.
27923
27924         * location.cs (SymbolDocument): New public property. Returns an
27925         ISymbolDocumentWriter object for the current source file or null
27926         if we don't have a symbol writer.
27927
27928 2002-03-21  Miguel de Icaza  <miguel@ximian.com>
27929
27930         * driver.cs (LoadAssembly): Correctly return when all the paths
27931         have been tried and not before.
27932
27933         * statement.cs (Switch.Emit): return the actual coverage for this
27934         statement (returns/not-returns)
27935
27936         (Switch.SimpleSwitchEmit): Do not generate jumps to the end of the
27937         switch of the statement if we are the last switch section.  That
27938         kills two problems: try/catch problems (we used to emit an empty
27939         nop at the end) and switch statements where all branches would
27940         return. 
27941
27942 2002-03-19  Miguel de Icaza  <miguel@ximian.com>
27943
27944         * driver.cs: Add default assemblies (the equivalent to the
27945         Microsoft CSC.RSP file)
27946
27947         * cs-tokenizer.cs: When updating `cols and setting it to zero,
27948         also update tokens_seen and set it to false.
27949
27950         * driver.cs: Implement --recurse for Mike.
27951
27952         * driver.cs (SplitPathAndPattern): Small bug fix, I was not
27953         correctly splitting out the paths.
27954
27955 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
27956
27957         * interface.cs (Interface.PopulateProperty): Instead of using
27958         `parent' as the declaration space for the set parameters, use
27959         `this' 
27960
27961         * support.cs (InternalParameters): InternalParameters constructor
27962         takes a DeclSpace instead of a TypeContainer.
27963
27964         * expression.cs (ArrayCreation.EmitDynamicInitializers): If value
27965         types are being initialized, load the address of it before calling
27966         the function.  
27967
27968         (New): Provide a mechanism to disable the generation of local
27969         value type temporaries when the caller will be providing us with
27970         an address to store it.
27971
27972         (ArrayCreation.EmitDynamicInitializers): Use it.
27973
27974 2002-03-17  Miguel de Icaza  <miguel@ximian.com>
27975
27976         * expression.cs (Invocation.EmitArguments): Only probe for array
27977         property if there is more than one argument.  Sorry about that.
27978
27979         * class.cs (Invocation.EmitArguments): Fix to emit arguments for
27980         empty param arrays.
27981
27982         * class.cs (Method.LabelParameters): Fix incorrect code path that
27983         prevented the `ParamArrayAttribute' from being applied to the
27984         params attribute.
27985
27986 2002-03-16  Miguel de Icaza  <miguel@ximian.com>
27987
27988         * support.cs (ReflectionParameters): Correctly compute whether the
27989         last argument is a params array.  Fixes the problem with
27990         string.Split ('a')
27991
27992         * typemanager.cs: Make the assemblies array always be non-null
27993         (empty, but non-null)
27994
27995         * tree.cs (RecordDecl): New function that abstracts the recording
27996         of names.  This reports error 101, and provides a pointer to the
27997         previous declaration.  Fixes a crash in the compiler.
27998
27999         * cs-parser.jay (constructor_declaration): Update to new grammar,
28000         and provide a constructor_body that can be empty.
28001
28002 2002-03-15  Miguel de Icaza  <miguel@ximian.com>
28003
28004         * driver.cs: Add support for --resources.
28005
28006         * expression.cs: (FetchGetMethod, FetchAddressMethod, EmitAssign):
28007         Make all types for the various array helper methods be integer.
28008
28009         * ecore.cs (Expression.ConvertNumericExplicit): Pass the
28010         CheckState to ConvCast.
28011
28012         (ConvCast): Now it takes a `checked' state argument, to avoid
28013         depending on the emit context for the conversion, and just using
28014         the resolve time setting.
28015
28016         * expression.cs (ArrayCreation.EmitArrayArguments): New function,
28017         instead of Invocation.EmitArguments.  We do not emit the original
28018         arguments, instead we emit those which have been converted to
28019         unsigned int expressions.
28020
28021         * statement.cs (Block.EmitMeta): Drop tracking of indexes.
28022
28023         * codegen.cs: ditto.
28024
28025         * expression.cs (LocalVariableReference): Drop the use of the
28026         Store function that depended on the variable index.
28027
28028         * statement.cs (VariableInfo): Drop the `Idx' property from this
28029         class, as this is not taking into account the indexes for
28030         temporaries tat we generate during the execution, getting the
28031         indexes wrong.
28032
28033         * class.cs: First emit class initializers, then call the parent
28034         constructor. 
28035
28036         * expression.cs (Binary): Fix opcode emision.
28037         (UnaryMutator.EmitCode): Support checked code generation
28038
28039         * ecore.cs (MemberLookup): TypeManager.FindMembers will return
28040         matches for events for both the Static and Instance scans,
28041         pointing to the same element.   Fix that.
28042
28043 2002-03-14  Miguel de Icaza  <miguel@ximian.com>
28044
28045         * rootcontext.cs (ResolveTree): Always set the
28046         interface_resolve_order, because nested interfaces will be calling
28047         into us.
28048
28049         * class.cs (GetInterfaceOrClass): Track the same resolution
28050         process used by TypeManager.LookupType.  This fixes the nested
28051         type lookups in class declarations (separate path from
28052         LookupType). 
28053
28054         (TypeContainer.DefineType): Also define nested interfaces.
28055         (TypeContainer.RegisterOrder): New public function used to
28056         register the order in which child interfaces need to be closed.
28057
28058         Nested interfaces need to be closed after their parents have been
28059         created. 
28060
28061         * interface.cs (InterfaceAttr): Put all the logic for computing
28062         the interface attribute here. 
28063
28064         (DefineInterface): Register our interface order with the
28065         RootContext or with the TypeContainer depending on the case.
28066
28067 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28068
28069         * cs-parser.jay: rework foreach statement to work with the new
28070         changes to the policy on SimpleNames.
28071
28072         * report.cs: support Stacktrace on warnings as well.
28073
28074         * makefile: drop --unsafe and /unsafe from the compile.
28075
28076 2002-03-13  Ravi Pratap  <ravi@ximian.com>
28077
28078         * ecore.cs (StandardConversionExists): Modify to take an Expression
28079         as the first parameter. Ensure we do null -> reference type conversion
28080         checking.
28081
28082         * Everywhere : update calls accordingly, making use of MyEmptyExpr to store
28083         temporary Expression objects.
28084
28085 Wed Mar 13 12:32:40 CET 2002 Paolo Molaro <lupus@ximian.com>
28086
28087         * interface.cs: workaround bug in method overloading resolution
28088         (there is already a bugzilla bug for it).
28089
28090 2002-03-12  Miguel de Icaza  <miguel@ximian.com>
28091
28092         We could also solve this problem by having a separate path for
28093         performing type lookups, instead of DoResolve, we could have a
28094         ResolveType entry point, and only participating pieces of the
28095         production (simplename, deref, array) would implement this. 
28096
28097         * codegen.cs (EmitContext): New field OnlyLookupTypes used to
28098         signal SimpleName to only resolve type names and not attempt to
28099         resolve anything else.
28100
28101         * expression.cs (Cast): Set the flag.
28102
28103         * ecore.cs (SimpleName): Use the OnlyLookupTypes flag
28104
28105         * class.cs: Only report 108 if there is no `new' modifier.
28106
28107         * cs-parser.jay: rework foreach statement to work with the new
28108         changes to the policy on SimpleNames.
28109
28110         * report.cs: support Stacktrace on warnings as well.
28111
28112         * makefile: drop --unsafe and /unsafe from the compile.
28113
28114 2002-03-11  Miguel de Icaza  <miguel@ximian.com>
28115
28116         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28117         lookups here, instead of doing that at parse time.  This means
28118         that our grammar will not introduce `LocalVariableReferences' as
28119         expressions at this point.  That solves the problem of code like
28120         this:
28121
28122         class X {
28123            static void Main ()
28124            { int X = 1;
28125             { X x = null }}}
28126
28127         This is only half the fix.  The full fix requires parameters to
28128         also be handled in this way.
28129
28130         * Everywhere: Use ec.DeclSpace on calls to LookupType, as this
28131         makes the use more obvious of the DeclSpace.  The
28132         ec.TypeContainer.TypeBuilder is now only used to pull the
28133         TypeBuilder for it.
28134
28135         My theory is that I can get rid of the TypeBuilder completely from
28136         the EmitContext, and have typecasts where it is used (from
28137         DeclSpace to where it matters).  
28138
28139         The only pending problem is that the code that implements Aliases
28140         is on TypeContainer, and probably should go in DeclSpace.
28141
28142         * ecore.cs (SimpleName.SimpleNameResolve): Perform local variable
28143         lookups here, instead of doing that at parse time.  This means
28144         that our grammar will not introduce `LocalVariableReferences' as
28145         expressions at this point.  That solves the problem of code like
28146         this:
28147
28148         class X {
28149            static void Main ()
28150            { int X = 1;
28151             { X x = null }}}
28152
28153         This is only half the fix.  The full fix requires parameters to
28154         also be handled in this way.
28155
28156         * class.cs (Property.DefineMethod): When implementing an interface
28157         method, set newslot, when implementing an abstract method, do not
28158         set the flag (before we tried never setting it, or always setting
28159         it, which is the difference).
28160         (Indexer.DefineMethod): same.
28161         (Method.DefineMethod): same.
28162
28163         * ecore.cs: Only set the status used flag if we get back a Field.
28164
28165         * attribute.cs: Temporary hack, so Paolo can keep working.
28166
28167 2002-03-08  Ravi Pratap  <ravi@ximian.com>
28168
28169         * attribute.cs (Attribute.UnmanagedType): This is to keep track of
28170         the unmanaged type in the case we have a MarshalAs attribute.
28171
28172         (Resolve): Handle the case when we are parsing the special MarshalAs
28173         attribute [we need to store the unmanaged type to use later]
28174
28175         * typemanager.cs (marshal_as_attr_type): Built in type for the 
28176         MarshalAs Attribute.
28177
28178         * attribute.cs (ApplyAttributes): Recognize the MarshalAs attribute 
28179         on parameters and accordingly set the marshalling info.
28180
28181 2002-03-09  Miguel de Icaza  <miguel@ximian.com>
28182
28183         * class.cs: Optimizing slightly by removing redundant code after
28184         we switched to the `NoTypes' return value.
28185         (Property.DefineMethod): use NoTypes here too.
28186
28187         This fixes the bug I introduced in my last batch of changes.
28188
28189 2002-03-05  Ravi Pratap  <ravi@ximian.com>
28190
28191         * tree.cs (RecordEnum): Add. We now keep track of enums too.
28192
28193         * class.cs (LookupInterfaceOrClass): Check against the list of recorded
28194         Enums since those are types too. 
28195
28196         * cs-parser.jay (enum_declaration): Record enums as we parse them.
28197
28198         * enum.cs (DefineEnum): Return if the TypeBuilder has already been defined 
28199         thanks to a call during the lookup process.
28200
28201 2002-03-07  Miguel de Icaza  <miguel@ximian.com>
28202
28203         * statement.cs (Foreach): Lots of work to accomodate a particular
28204         kind of foreach statement that I had not kept in mind.  It is
28205         possible to have foreachs on classes that provide a GetEnumerator
28206         method that return objects that implement the "pattern" for using
28207         a foreach, there is no need to support GetEnumerator
28208         specifically. 
28209
28210         This is needed to compile nant.
28211
28212         * decl.cs: Only report 114 if the member is not `Finalize' and if
28213         the warning level is at least 2.
28214
28215         * class.cs: Moved the compare function from Method to
28216         MethodSignature. 
28217
28218         (MethodSignature.InheritableMemberSignatureCompare): Add new
28219         filter function that is used to extract inheritable methods from a
28220         class. 
28221
28222         (Method.Define): Use the new `inheritable_method_signature_filter'
28223         delegate
28224
28225         * cs-tokenizer.cs (get_cmd_arg): Do not add white space to the
28226         command. 
28227
28228 2002-03-06  Miguel de Icaza  <miguel@ximian.com>
28229
28230         * ecore.cs (Expression.ConvertReferenceExplicit): Removed dead code.
28231
28232         * cs-parser.jay: Add opt_semicolon to the interface declaration.
28233
28234         * expression.cs: Pass location information to
28235         ConvertImplicitStandard. 
28236
28237         * class.cs: Added debugging code to track return values from
28238         interfaces. 
28239
28240 2002-03-05  Miguel de Icaza  <miguel@ximian.com>
28241
28242         * expression.cs (Is.DoResolve): If either side of the `is' is an
28243         interface, do not flag the warning.
28244
28245         * ecore.cs (ImplicitReferenceConversion): We need a separate test
28246         for interfaces
28247
28248         * report.cs: Allow for --fatal to be used with --probe.
28249
28250         * typemanager.cs (NoTypes): Move the definition for the empty Type
28251         array here. 
28252
28253         * class.cs (TypeContainer.FindMembers): Also look for methods defined by
28254         properties. 
28255         (TypeContainer.DefineProxy): New function used to proxy to parent
28256         implementations when implementing interfaces.
28257         (TypeContainer.ParentImplements): used to lookup if our parent
28258         implements a public function that is required by an interface.
28259         (TypeContainer.VerifyPendingMethods): Hook this up.
28260
28261         * typemanager.cs (TypeManager, AddModule, AddAssembly): Make the
28262         `modules' and `assemblies' arraylists into arrays.  We only grow
28263         these are the very early start up of the program, so this improves
28264         the speedof LookupType (nicely measured).
28265
28266         * expression.cs (MakeByteBlob): Replaced unsafe code with
28267         BitConverter, as suggested by Paolo.
28268
28269         * cfold.cs (ConstantFold.Binary): Special case: perform constant
28270         folding of string concatenation, but if either side is a string,
28271         and the other is not, then return null, and let the runtime use
28272         the concatenation on the string plus the object (using
28273         `Object.ToString'). 
28274
28275 2002-03-04  Miguel de Icaza  <miguel@ximian.com>
28276
28277         Constant Folding has been implemented now.
28278
28279         * expression.cs (Unary.Reduce): Do not throw an exception, catch
28280         the error instead on types that are not supported in one's
28281         complement. 
28282
28283         * constant.cs (Constant and all children): New set of functions to
28284         perform implict and explicit conversions.
28285
28286         * ecore.cs (EnumConstant): Implement the new functions to perform
28287         conversion by proxying to the child expression.
28288
28289         * codegen.cs: (ConstantCheckState): Constant evaluation has its
28290         own separate setting that can not be turned off from the command
28291         line using --unchecked or --checked and is only controlled using
28292         the checked/unchecked statements and expressions.  This setting is
28293         used by the constant folder to flag errors.
28294
28295         * expression.cs (CheckedExpr, UncheckedExpr): Set the
28296         ConstantCheckState as well.   
28297
28298         During Resolve, they also have to flag the state, because the
28299         constant folder runs completely in the Resolve phase.
28300
28301         * statement.cs (Checked, Unchecked): Set the ConstantCheckState as
28302         well.
28303
28304 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28305
28306         * cfold.cs: New file, this file contains the constant folder.
28307
28308         * ecore.cs (IMemoryLocation.AddressOf): Now takes an extra
28309         argument to track whether we are using the resulting address to
28310         load or store a value and provide better error messages. 
28311
28312         (FieldExpr.Emit, FieldExpr.EmitAssign, FieldExpr.AddressOf): Use
28313         new AddressOf arguments.
28314
28315         * statement.cs (Foreach.EmitCollectionForeach): Update
28316
28317         * expression.cs (Argument.Emit): Call AddressOf with proper
28318         arguments to track usage.
28319
28320         (New.DoEmit): Call AddressOf with new arguments.
28321
28322         (Unary.Emit): Adjust AddressOf call.
28323
28324 2002-03-01  Ravi Pratap  <ravi@ximian.com>
28325
28326         * cs-parser.jay (member_access): Change the case for pre-defined types
28327         to use a MemberAccess instead of a SimpleName. Thanks to Felix again for 
28328         this suggestion.
28329
28330         * class.cs (Operator::Emit): If we are abstract or extern, we don't have
28331         a method body.
28332
28333         * attribute.cs (CheckAttribute, ApplyAttribute): Ensure that we treat operators
28334         essentially like methods and apply attributes like MethodImplOptions to them too.
28335
28336         * ecore.cs (SimpleName.SimpleNameResolve): Perform a check on ec.TypeContainer.TypeBuilder
28337         not being null.
28338
28339         * codegen.cs (EmitContext): The constructor now takes in an extra argument specifying the
28340         DeclSpace as the distinction is important. We provide sane defaults as usually the TypeContainer
28341         is the DeclSpace.
28342
28343         * Update code everywhere accordingly.
28344
28345         * ecore.cs : Change references to ec.TypeContainer to ec.DeclSpace where appropriate.
28346
28347         * cs-parser.jay (enum_declaration): Set the current namespace of the enum.
28348
28349 2002-02-28  Ravi Pratap  <ravi@ximian.com>
28350
28351         * rootcontext.cs (LookupType): As we cycle through the chain of namespaces
28352         try performing lookups against those instead of jumping straight into using
28353         the 'using' clauses.
28354
28355         (ImplicitParent): Add. Thanks to Felix Arrese-Igor for this idea.
28356
28357         (LookupType): Perform lookups in implicit parents too.
28358
28359         * class.cs (GetInterfaceOrClass): Modify to perform the exact same lookup
28360         sequence as RootContext.LookupType. 
28361
28362         * rootcontext.cs (NamespaceLookup): Split out code from LookupType which tries 
28363         the various cases of namespace lookups into this method.
28364
28365 2002-03-01  Miguel de Icaza  <miguel@ximian.com>
28366
28367         * cs-parser.jay: Add support for [Attribute ()] (empty arguments
28368         in positional arguments)
28369
28370         * class.cs (Operator): Update the AllowedModifiers to contain
28371         extern. 
28372
28373         * cs-parser.jay: Update operator declaration to allow for the
28374         operator body to be empty.
28375
28376         * cs-tokenizer.cs: Added '\u' unicode support in strings and hex
28377         values. 
28378
28379 2002-02-27  Miguel de Icaza  <miguel@ximian.com>
28380
28381         * class.cs (Method.Emit): Label parameters.
28382
28383         * driver.cs: Return 1 or 0 as the program exit code.
28384
28385 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
28386
28387         * expression.cs: Special case the `null' object when trying to
28388         auto-compute the type, as anything can be explicitly converted to
28389         that. 
28390
28391         * ecore.cs (Expression.ConvertExplicit): Bug fix, thanks for
28392         spotting this Paolo.
28393
28394         (Expression.ImplicitNumericConversion): Perform comparissions of
28395         the type using the underlying type in the case of an enumeration
28396         rather than using the enumeration type for the compare.
28397
28398         Cope with the underlying == type case, which is not possible to
28399         catch before. 
28400
28401         (Expression.ConvertNumericExplicit): Perform comparissions of
28402         the type using the underlying type in the case of an enumeration
28403         rather than using the enumeration type for the compare.
28404
28405         * driver.cs: If the user does not supply an extension, assume .exe
28406
28407         * cs-parser.jay (if_statement): Rewrote so that we can track the
28408         location for the if statement.
28409
28410         * expression.cs (Binary.ConstantFold): Only concat strings when
28411         the operation is "+", not everything ;-)
28412
28413         * statement.cs (Statement.EmitBoolExpression): Take a location
28414         argument. 
28415         (If, While, Do): Track location.
28416
28417         * expression.cs (Binary.ResolveOperator): In the object + string
28418         case, I was missing a call to ConvertImplicit
28419
28420 2002-02-25  Ravi Pratap  <ravi@ximian.com>
28421
28422         * parameter.cs (Parameter.ExternalType): Take in extra DeclSpace and
28423         Location arguments. Ensure we use RootContext.LookupType to do our work
28424         and not try to do a direct Type.GetType and ModuleBuilder.GetType
28425
28426         * interface.cs (PopulateMethod): Handle the type of the parameter being
28427         null gracefully.
28428
28429         * expression.cs (Invocation.BetterFunction): Handle the case when we 
28430         have a params method with no fixed arguments and a call is made with no
28431         arguments.
28432
28433 2002-02-25  Miguel de Icaza  <miguel@ximian.com>
28434
28435         * cs-tokenizer.cs: Add support for the quote-escape-sequence in
28436         the verbatim-string-literal
28437
28438         * support.cs (InternalParameters.ParameterModifier): handle null
28439         fixed parameters.
28440         (InternalParameters.ParameterType): ditto.
28441
28442         * parameter.cs (VerifyArgs): Also check if the fixed parameter is
28443         duplicating the name of the variable parameter.
28444         (GetParameterByName): Fix bug where we were not looking up array
28445         paramters if they were the only present (thanks Paolo!).
28446         (GetParameterInfo): We only have an empty set of types if both
28447         fixed and array are set to null.
28448         (GetParameterInfo-idx): Handle FixedParameter == null
28449
28450         * cs-parser.jay: Handle the case where there is no catch
28451         statements (missing null test).
28452
28453 2002-02-22  Miguel de Icaza  <miguel@ximian.com>
28454
28455         * driver.cs (MainDriver): Be conservative on our command line
28456         handling.
28457
28458         Catch DirectoryNotFoundException when calling GetFiles.
28459
28460         (SplitPathAndPattern): Used to split the input specification into
28461         a path and a pattern that we can feed to Directory.GetFiles.
28462
28463 2002-02-21  Miguel de Icaza  <miguel@ximian.com>
28464
28465         * statement.cs (Fixed): Implement the last case of the Fixed
28466         statement (string handling).
28467
28468         * expression.cs (StringPtr): New class used to return a char * to
28469         a string;  Used by the Fixed statement.
28470
28471         * typemanager.cs: Add char_ptr_type.  Add get_OffsetToStringData method.
28472
28473         * expression.cs (Binary.ResolveOperator): Remove redundant
28474         MemberLookup pn parent type.
28475         Optimize union call, we do not need a union if the types are the same.
28476         (Unary.ResolveOperator): REmove redundant MemberLookup on parent
28477         type.
28478
28479         Specialize the use of MemberLookup everywhere, instead of using
28480         the default settings. 
28481
28482         (StackAlloc): Implement stackalloc keyword.
28483
28484         * cs-parser.jay: Add rule to parse stackalloc.
28485
28486         * driver.cs: Handle /h, /help, /?
28487
28488         * expression.cs (MakeByteBlob): Removed the hacks we had in place
28489         before we supported unsafe code.
28490
28491         * makefile: add --unsafe to the self compilation of mcs.
28492
28493 2002-02-20  Miguel de Icaza  <miguel@ximian.com>
28494
28495         * expression.cs (PointerArithmetic): New class that is used to
28496         perform pointer arithmetic.
28497         (Binary.Resolve): Handle pointer arithmetic
28498         Handle pointer comparission.
28499         (ArrayPtr): Utility expression class that is used to take the
28500         address of an array.
28501
28502         (ElementAccess): Implement array access for pointers
28503
28504         * statement.cs (Fixed): Implement fixed statement for arrays, we
28505         are missing one more case before we are done.
28506
28507         * expression.cs (Indirection): Implement EmitAssign and set the
28508         ExprClass to Variable.  This allows pointer dereferences to be
28509         treated as variables, and to have values assigned to them.
28510
28511         * ecore.cs (Expression.StoreFromPtr): New utility function to
28512         store values dereferencing.
28513
28514 2002-02-20  Ravi Pratap  <ravi@ximian.com>
28515
28516         * expression.cs (Binary.ResolveOperator): Ensure that we are
28517         not trying to operate on a void type - this fixes the reported
28518         bug.
28519
28520         * decl.cs (CheckMethodAgainstBase): Do not allow overriding if
28521         the parent implementation is sealed.
28522
28523         * ../errors/cs0239.cs : Add.
28524
28525         * attribute.cs (ApplyAttributes): Handle Modulebuilders too.
28526
28527         * typemanager.cs (unverifiable_code_type): Corresponds to 
28528         System.Security.UnverifiableCodeAttribute. We need to emit this for modules
28529         which have unsafe code in them.
28530
28531         * rootcontext.cs (EmitCode): Emit the above attribute when we are in an 
28532         unsafe context.
28533
28534 2002-02-19  Miguel de Icaza  <miguel@ximian.com>
28535
28536         * cs-tokenizer.cs: Add support for @"litreal strings"
28537
28538         Make tokenizer accept pre-processor directives
28539         on any column (remove the old C-like limitation). 
28540
28541         * rootcontext.cs (EmitCode): Emit any global attributes.
28542         (AddGlobalAttributes): Used to keep track of assembly attributes. 
28543
28544         * attribute.cs (ApplyAttributes): Support AssemblyAttributes.
28545
28546         * cs-parser.jay: Add support for global attributes.  
28547
28548 2002-02-17  Miguel de Icaza  <miguel@ximian.com>
28549
28550         * expression.cs (Indirection): New helper class.  Unary will
28551         create Indirection classes to be able to implement the
28552         IMemoryLocation interface on it.
28553
28554 2002-02-16  Miguel de Icaza  <miguel@ximian.com>
28555
28556         * cs-parser.jay (fixed_statement): reference the right statement.
28557
28558         * statement.cs (Fixed.Emit): Finish implementing the fixed
28559         statement for the &x case.
28560
28561 2002-02-14  Miguel de Icaza  <miguel@ximian.com>
28562
28563         * class.cs (Property.Define, Method.Define): Remove newslot when
28564         `implementing'.  
28565
28566         * modifiers.cs: My use of NewSlot when `Abstract' was set was
28567         wrong.  NewSlot should only be used if the `new' keyword is present.
28568
28569         * driver.cs (GetSystemDir): Use CodeBase instead of FullName for
28570         locating our system dir.  Sorry about this.
28571
28572 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28573
28574         * driver.cs (GetSystemDir): Compute correctly the location of our
28575         system assemblies.  I was using the compiler directory instead of
28576         the library directory.
28577
28578 2002-02-13  Ravi Pratap  <ravi@ximian.com>
28579
28580         * expression.cs (BetterFunction): Put back in what Miguel commented out
28581         since it is the correct fix. The problem is elsewhere ;-)
28582
28583         (IsParamsMethodApplicable): Fix bug where we were not checking that the fixed
28584         parameters of the parms method are themselves compatible or not !
28585
28586         (StandardConversionExists): Fix very dangerous bug where we were forgetting
28587         to check that a class implements an interface before saying that an implicit
28588         conversion was allowed. Use ImplementsInterface to do the checking.
28589
28590 2002-02-13  Miguel de Icaza  <miguel@ximian.com>
28591
28592         * class.cs (Method.Define): Track whether we are an explicit
28593         implementation or not.  And only call DefineMethodOverride if we
28594         are an explicit implementation.
28595
28596         (Property.DefineMethod): Ditto.
28597
28598 2002-02-11  Ravi Pratap  <ravi@ximian.com>
28599
28600         * expression.cs (BetterFunction): Catch hideous bug which was
28601          preventing us from detecting ambiguous calls due to implicit casts i.e
28602         cs0121.
28603
28604 2002-01-29  Miguel de Icaza  <miguel@ximian.com>
28605
28606         * support.cs (Pair): Remove un-needed method.  I figured why I was
28607         getting the error in cs-parser.jay, the variable in a foreach loop
28608         is readonly, and the compiler does not really treat this as a variable.
28609
28610         * cs-parser.jay (fixed_statement): Fix grammar.  Use ASSIGN
28611         instead of EQUALS in grammar.  
28612
28613         * typemanager.cs (VerifyUnmanaged): Report correct error (208)
28614
28615         * expression.cs (Unary.DoResolve): Check whether the argument is
28616         managed or not.
28617
28618 2002-01-28  Miguel de Icaza  <miguel@ximian.com>
28619
28620         * support.cs: Api for Pair to set a value.  Despite the fact that
28621         the variables are public the MS C# compiler refuses to compile
28622         code that accesses the field if the variable is part of a foreach
28623         statement. 
28624
28625         * statement.cs (Fixed): Begin implementation of the fixed
28626         statement.
28627
28628         (Block.AddVariable): Return the VariableInfo on success and null
28629         on failure instead of true/false. 
28630
28631         * cs-parser.jay (foreach): Catch errors on variables already
28632         defined (we were ignoring this value before) and properly unwind
28633         the block hierarchy
28634
28635         (fixed_statement): grammar for the fixed statement.
28636
28637 2002-01-25  Miguel de Icaza  <miguel@ximian.com>
28638
28639         * expression.cs (UnaryMutator.IsIncrementableNumber): Allow also
28640         pointer types to be incretemented.
28641
28642         (SizeOf): Implement.
28643
28644         * cs-parser.jay (pointer_member_access): Implement
28645         expr->IDENTIFIER production.
28646
28647         * expression.cs (IndexerAccess.DoResolve, ArrayAccess.DoResolve,
28648         MemberAccess.DoResolve, Invocation.DoResolve): Check for pointers
28649         on safe contexts.
28650
28651         (Unary): Implement indirection.
28652
28653         * ecore.cs (Expression.UnsafeError): Reports error 214 (pointer
28654         use in non-unsafe context).
28655
28656         (SimpleName.DoResolve): Check for pointers in field access on safe
28657         contexts. 
28658
28659         (Expression.LoadFromPtr): Factor the load-indirect code in this
28660         function.  This was duplicated in UnboxCast and ParameterReference
28661
28662 2002-01-24  Miguel de Icaza  <miguel@ximian.com>
28663
28664         * expression.cs (ComposedCast): report an error if a pointer cast
28665         is used in a safe region.
28666
28667         * ecore.cs (Expression.ConvertExplicit): Add rules for implicit
28668         pointer type casts in unsafe context.
28669
28670         * codegen.cs (EmitContext): Set up IsUnsafe.
28671
28672         * cs-parser.jay (non_expression_type): Add productions for pointer
28673         casts. 
28674
28675         * expression.cs (Invocation.EmitCall): Remove chunk of buggy
28676         code.  We should not use force into static mode if the method is
28677         not virtual.  Fixes bug in MIS
28678
28679         * statement.cs (Do.Emit, While.Emit, For.Emit,
28680         Statement.EmitBoolExpression): Add support to Do and While to
28681         propagate infinite loop as `I do return' semantics.
28682
28683         Improve the For case to also test for boolean constants.
28684
28685         * attribute.cs (Attribute.ApplyAttributes): Add ParameterBuilder
28686         to the list of attributes we can add.
28687
28688         Remove `EmitContext' argument.
28689
28690         * class.cs (Method.Define): Apply parameter attributes.
28691         (Constructor.Define): Apply parameter attributes.
28692         (MethodCore.LabelParameters): Move here the core of labeling
28693         parameters. 
28694
28695         * support.cs (ReflectionParameters.ParameterModifier,
28696         InternalParameters.ParameterModifier): Use IsByRef on the type and
28697         only return the OUT bit for these parameters instead of in/out/ref
28698         flags.
28699
28700         This is because I miss-understood things.  The ParameterInfo.IsIn
28701         and IsOut represent whether the parameter has the [In] and [Out]
28702         attributes set.  
28703
28704 2002-01-22  Miguel de Icaza  <miguel@ximian.com>
28705
28706         * ecore.cs (FieldExpr.Emit): Release temporaries.
28707
28708         * assign.cs (LocalTemporary.Release): new function.
28709
28710         * codegen.cs (EmitContext.GetTemporaryStorage,
28711         EmitContext.FreeTemporaryStorage): Rework the way we deal with
28712         temporary storage.  Now we can "put back" localbuilders when we
28713         are done with them
28714
28715 2002-01-21  Miguel de Icaza  <miguel@ximian.com>
28716
28717         * ecore.cs (FieldExpr.Emit): Handle initonly fields specially: we
28718         need to make a copy of the variable to generate verifiable code.
28719
28720 2002-01-19  Miguel de Icaza  <miguel@ximian.com>
28721
28722         * driver.cs: Compute dynamically the system directory.
28723
28724         * ecore.cs (CopyNewMethods): reworked, exposed, made public.
28725         Slower, but more generally useful.  Used by the abstract
28726         registering implementation. 
28727
28728         * expression.cs (ResolveMemberAccess): Reorder the way we evaluate
28729         the rules for the special rule on Type/instances.  First check if
28730         we have the same name, and if so, try that special static path
28731         rather than the instance path.
28732
28733 2002-01-18  Miguel de Icaza  <miguel@ximian.com>
28734
28735         * cs-parser.jay: Emit 642 (warning: possible empty statement) for
28736         for, while and if.
28737
28738         * class.cs (TypeBuilder.DefineType): Do not allow inheritance from
28739         Enum, ValueType, Delegate or Array for non-corlib compiles.
28740
28741         * cs-tokenizer.cs: Catch long identifiers (645)
28742
28743         * typemanager.cs (IndexerPropetyName): Ravi never tested this
28744         piece of code.
28745
28746         * class.cs (TypeContainer.RegisterRequiredImplementations): Bug
28747         fix, we were returning too early, so we were not registering
28748         pending methods from abstract classes.
28749
28750         Do not register pending methods if the class is abstract.
28751
28752         * expression.cs (Conditional.DoResolve): Report circular implicit
28753         conversions when we neecd to compute it for conditional
28754         expressions. 
28755
28756         (Is.DoResolve): If the expression is always of the provided type,
28757         flag warning 183.  If the expression can not ever be of the
28758         provided type flag warning 184.
28759
28760         * class.cs: Catch 169 as well.
28761
28762         * ecore.cs (FieldExpr): For now in AddressOf mark as assigned and
28763         read. 
28764
28765 2002-01-18  Nick Drochak  <ndrochak@gol.com>
28766
28767         * makefile: remove path to beta2 csc.exe.  path to csc.exe must be in PATH instead.
28768
28769 2002-01-17  Miguel de Icaza  <miguel@ximian.com>
28770
28771         * interface.cs: (PopulateMethod): Check for pointers being defined
28772         only if the unsafe context is active.
28773         (PopulateProperty): ditto.
28774         (PopulateIndexer): ditto.
28775
28776         * class.cs (Method, Method.Define): Allow `unsafe' modifier to be
28777         specified.  If pointers are present, make sure that they are
28778         present in an unsafe context.
28779         (Constructor, Constructor.Define): ditto.
28780         (Field, Field.Define): ditto.
28781         (Property, Property.Define): ditto.
28782         (Event, Event.Define): ditto.
28783
28784         * interface.cs (Interface.GetInterfaceTypeByName): Only lookup the
28785         hashtable if there are classes or structs defined.
28786
28787         * expression.cs (LocalVariableReference.DoResolve): Simplify this
28788         code, as the constant resolution moved.
28789
28790         * statement.cs (Block.EmitMeta): Resolve all constants as we emit
28791         the metadata, so we can flag error 133. 
28792
28793         * decl.cs (MemberCore.UnsafeOK): New function to test that a
28794         pointer is being declared in an unsafe context.
28795
28796 2002-01-16  Miguel de Icaza  <miguel@ximian.com>
28797
28798         * modifiers.cs (Modifiers.Check): Require a Location argument.
28799         Report error 227 for Unsafe use.
28800
28801         * typemanager.cs: Remove IsPointerType, we should be using Type.IsPointer
28802
28803         * statement.cs (For.Emit): If the test is null, then report that
28804         we do `return', as we wont reach anything afterwards.
28805
28806         (Switch.SwitchGoverningType): Track the expression that matched
28807         the conversion.
28808
28809         * driver.cs: Allow negative numbers as an error code to flag.
28810
28811         * cs-parser.jay: Handle 1551.
28812
28813         * namespace.cs: Add 1537 checking (repeated using alias namespaces).
28814
28815 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28816
28817         * cs-parser.jay: Report 1518 (type declaration can only contain
28818         class, struct, interface, enum or delegate)
28819
28820         (switch_label): Report 1523 (keywords `case' or `default' must
28821         preced code)
28822
28823         (opt_switch_sections): Report 1522 (empty switch)
28824
28825         * driver.cs: Report 1515 (response file specified multiple times)
28826         Report 1516 (Source file specified multiple times).
28827
28828         * expression.cs (Argument.Resolve): Signal 1510
28829
28830         (BaseAccess.Resolve, BaseIndexer.Resolve): Signal 1511 (base
28831         access not allowed in static code)
28832
28833 2002-01-11  Ravi Pratap  <ravi@ximian.com>
28834
28835         * typemanager.cs (IsPointerType): Utility method which we are going
28836         to need a lot.
28837
28838         * ecore.cs (ImplicitReferenceConversion): A pointer type cannot be cast to
28839         the object type, so we take care of that.
28840
28841         * expression.cs (FullMethodDesc): Also include the return type in descriptions.
28842
28843         * support.cs (ParameterDesc): Fix minor bug which was causing params tags to be
28844         added to non-params parameters :-)
28845
28846         * typemanager.cs (CSharpName): Include 'void' type too. 
28847
28848         (void_ptr_type): Include in the set of core types.
28849
28850         * ecore.cs (ConvertImplicit): Make use of ConvertImplicitStandard instead of 
28851         duplicating code.
28852
28853         (ConvertImplicitStandard): Handle standard implicit pointer conversions when we have 
28854         an unsafe context.
28855
28856         * cs-parser.jay (local_variable_pointer_type): Add support for 'void *' as I had 
28857         completely forgotten about it.
28858
28859 2002-01-10  Ravi Pratap  <ravi@ximian.com>
28860
28861         * cs-parser.jay (pointer_type): Add. This begins our implementation
28862         of parsing rules for unsafe code.
28863
28864         (unsafe_statement): Implement.
28865
28866         (embedded_statement): Modify to include the above.
28867
28868         * statement.cs (Unsafe): Implement new class for unsafe blocks.
28869
28870         * codegen.cs (EmitContext.InUnsafe): Add. This determines
28871         if the current context is an unsafe one.
28872
28873         * cs-parser.jay (local_variable_pointer_type): Since local variable types
28874         are handled differently, we need separate rules for them.
28875
28876         (local_variable_declaration): Update to use local_variable_pointer_type
28877         to allow variable declarations of unmanaged pointer types.
28878
28879         * expression.cs (Unary.ResolveOperator): Ensure that the '&' operator is used only
28880         in unsafe contexts.
28881
28882         * ../errors/cs0214.cs : Add.
28883
28884 2002-01-16  Nick Drochak  <ndrochak@gol.com>
28885
28886         * makefile: remove 'response' file when cleaning.
28887
28888 2002-01-15  Miguel de Icaza  <miguel@ximian.com>
28889
28890         * cs-parser.jay: Report 1524.
28891
28892 2002-01-14  Miguel de Icaza  <miguel@ximian.com>
28893
28894         * typemanager.cs (RegisterMethod): drop checking if we have
28895         registered this from here
28896
28897 2002-01-12  Miguel de Icaza  <miguel@ximian.com>
28898
28899         * class.cs (Method.EmitDestructor): Implement calling our base
28900         destructor. 
28901
28902         * statement.cs (Try.Emit): Fix to reset the InFinally to the old
28903         value of InFinally.
28904
28905         * codegen.cs (EmitContext.EmitTopBlock): Destructors will call
28906         this routine and will wrap the call in a try/catch block.  Deal
28907         with the case.
28908
28909 2002-01-11  Miguel de Icaza  <miguel@ximian.com>
28910
28911         * ecore.cs (Expression.MemberLookup): instead of taking a
28912         parameter `same_type' that was used to tell whether we could
28913         access private members we compute our containing type from the
28914         EmitContext.
28915
28916         (FieldExpr): Added partial support for volatile fields.  This does
28917         not work for volatile fields exposed from assemblies, as I can not
28918         figure out how to extract the modreq from it.
28919
28920         Updated all the source files to use this.
28921
28922         * codegen.cs (EmitContext): Compute ContainerType ahead of time,
28923         because it is referenced by MemberLookup very often. 
28924
28925 2002-01-09  Ravi Pratap  <ravi@ximian.com>
28926
28927         * typemanager.cs (IndexerPropertyName): If we have a TypeBuilder, use
28928         TypeBuilder.GetCustomAttributes to retrieve what we need.
28929
28930         Get rid of redundant default_member_attr_type as this is the same as
28931         default_member_type which already exists.
28932
28933         * interface.cs, attribute.cs : Update accordingly.
28934
28935 2002-01-08  Miguel de Icaza  <miguel@ximian.com>
28936
28937         * typemanager.cs: Enable IndexerPropertyName again.  It does not
28938         work for TYpeBuilders though.  Ravi, can you please fix this?
28939
28940         * cs-tokenizer.cs: Accept _ as a name in pp-expressions.
28941
28942         * expression.cs (Argument.Emit): Handle the case of ref objects
28943         being passed to ref functions;  
28944
28945         (ParameterReference.EmitLoad): Loads the content of the pointer
28946         without dereferencing.
28947
28948 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28949
28950         * cs-tokenizer.cs: Implemented the pre-processing expressions.
28951
28952 2002-01-08  Ravi Pratap  <ravi@ximian.com>
28953
28954         * class.cs (Indexer.DefineMethod): Incorporate the interface
28955         type in the name of the method if we are doing explicit interface
28956         implementation.
28957
28958         * expression.cs (ConversionExists): Remove as it is completely obsolete.
28959
28960         (BetterConversion): Fix extremely trivial bug where we were referring to
28961         ConversionExists instead of StandardConversionExists ! Hooray, things are fine
28962         again !
28963
28964         * ../errors/bug16.cs : Add although we have fixed it.
28965
28966 2002-01-07  Miguel de Icaza  <miguel@ximian.com>
28967
28968         * expression.cs (BaseIndexer): Begin implementation.
28969
28970         * class.cs (TypeContainer.IsInterfaceMethod): Bug fix.
28971
28972         * cs-parser.jay (indexer_declarator): Use qualified_identifier
28973         production directly to remove a shift/reduce, and implement
28974         explicit interface implementation.
28975
28976         * cs-tokenizer.cs: Fix tokenizer, it was consuming one extra char
28977         after a floating point suffix.
28978
28979         * expression.cs (DoNumericPromotions): Improved the conversion for
28980         uint/uint.  If we have a constant, we avoid doing a typecast to a
28981         larger type.
28982
28983         * class.cs (Indexer): Implement explicit interface implementation
28984         for indexers.
28985
28986 Sat Jan 5 16:08:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28987
28988         * class.cs: make the default instance constructor public and hidebysig.
28989
28990 2001-01-03  Ravi Pratap  <ravi@ximian.com>
28991
28992         * interface.cs (EmitDefaultMemberAttr): Make this helper method static
28993         so we can call it from elsewhere.
28994
28995         * class.cs (TypeContainer.Emit): Emit the attribute here too. The rule is that
28996         we emit it internally if the class has a defined indexer; otherwise the user
28997         emits it by decorating the class definition with the DefaultMemberAttribute.
28998
28999         * attribute.cs (ApplyAttributes): Perform checks to see that the DefaultMember
29000         attribute is not used on a type which defines an indexer.
29001
29002         * cs-tokenizer.cs (get_cmd_arg): Ensure we trim whitespace and also include the tab
29003         character when we skip whitespace.
29004
29005         * ../errors/cs0646.cs : Add.
29006
29007 2002-01-03  Miguel de Icaza  <miguel@ximian.com>
29008
29009         * ecore.cs (SimpleName.ResolveSimpleName): Report error 120
29010         again. 
29011
29012         * makefile: Add practical target `mcs3.exe' which builds the third
29013         generation compiler. 
29014
29015         * expression.cs (New): Fix structures constructor calling.
29016
29017         * class.cs (Property, Method, Indexer): Emit Final flag on the
29018         method if we are an interface implementation and we are not
29019         abstract. 
29020
29021         * ecore.cs (PropertyExpr): New public field `IsBase', tells
29022         whether this property is referencing a `base' method.
29023
29024         * expression.cs (Invocation.EmitCall): take an extra argument:
29025         is_base, this is used to determine whether the `call' or
29026         `callvirt' opcode should be used.
29027
29028
29029         * delegate.cs: update EmitCall.
29030
29031         * class.cs (Method.Define): Set NewSlot for the cases where we are
29032         not implementing an interface method.
29033
29034         (Property.Define): ditto.
29035
29036 2002-01-02  Miguel de Icaza  <miguel@ximian.com>
29037
29038         * cs-tokenizer.cs: (Tokenizer.escape): Escape '\r' as '\r' not as
29039         'r'.  Allows mcs to parse itself fully.
29040
29041 2002-01-02  Ravi Pratap  <ravi@ximian.com>
29042
29043         * expression.cs (ArrayCreation.num_automatic_initializers): Keep track
29044         of the number of initializers that require the InitializeArray method.
29045
29046         (CheckIndices): Store the Expression in all cases - not the plain value. Also
29047         update the above field where necessary.
29048
29049         (MakeByteBlob): Update accordingly.
29050
29051         (DoEmit): Call EmitStaticInitializers only if the number of initializers is 
29052         greater than 2.
29053
29054         (EmitDynamicInitializers): Update in accordance with the new optimization.
29055
29056         (ArrayAccess.EmitStoreOpcode): Include char type along with short and ushort - the
29057         same OpCode applies.
29058
29059         * cs-parser.jay : Fix some glaring errors I introduced.
29060
29061 2002-01-01  Ravi Pratap  <ravi@ximian.com> 
29062
29063         * parameters.cs (AddVariable, AddConstant): Pass in current_local_parameters
29064         so that we can check for name clashes there too.
29065
29066         * typemanager.cs (default_member_attr_type): The attribute that we need to emit
29067         for interface indexers.
29068
29069         * interfaces.cs (Define): Emit the default member attribute.
29070
29071         * expression.cs (MakeByteBlob): Fix extremely trivial bug where the wrong
29072         variable was being referred to while setting the value ;-)
29073
29074 2002-01-01  Miguel de Icaza  <miguel@ximian.com>
29075
29076         * expression.cs (MakeByteBlob): Optimize: we do not need to fill
29077         byte-by-byte information when we know the data is zero.
29078
29079         Make the block always a multiple of 4, because
29080         DefineInitializedData has a bug.
29081
29082         * assign.cs: Fix, we should assign from the temporary, not from
29083         the source. 
29084
29085         * expression.cs (MakeByteBlob): Fix my incorrect code.
29086
29087 2001-12-31  Miguel de Icaza  <miguel@ximian.com>
29088
29089         * typemanager.cs (EnumToUnderlying): This function is used to get
29090         the underlying type from an enumeration, because it does not
29091         always work. 
29092
29093         * constant.cs: Use the I4_S form for values between -128 and 127.
29094
29095         * statement.cs (Block.LookupLabel): Looks up a label.
29096         (Block): Drop support for labeled blocks.
29097
29098         (LabeledStatement): New kind of statement that represents a label
29099         only.
29100
29101         (Goto): Finally implement this bad boy.
29102
29103         * cs-parser.jay: Update to reflect new mechanism to implement
29104         labels.
29105
29106 2001-12-30  Miguel de Icaza  <miguel@ximian.com>
29107
29108         * codegen.cs (EmitContext.This): a codegen property that keeps the
29109         a single instance of this instead of creating many different this
29110         instances. 
29111
29112         * delegate.cs (Delegate.DoResolve): Update to use the property;
29113
29114         * ecore.cs (SimpleName.SimpleNameResolve): Ditto
29115
29116         * expression.cs (BaseAccess.DoResolve): Ditto.
29117
29118 2001-12-29  Ravi Pratap  <ravi@ximian.com>
29119
29120         * typemanager.cs (methodimpl_attr_type): Add to hold the type
29121         corresponding to System.Runtime.CompilerServices.MethodImplAttribute.
29122
29123         (InitCoreTypes): Update accordingly.
29124
29125         * attribute.cs (Resolve): Remember if the attribute is a MethodImplAttribute
29126         so we can quickly store the state.
29127
29128         (ApplyAttributes): Set the correct implementation flags
29129         for InternalCall methods.
29130
29131 2001-12-29  Miguel de Icaza  <miguel@ximian.com>
29132
29133         * expression.cs (EmitCall): if a method is not virtual, then do
29134         not use callvirt on it.
29135
29136         (ArrayAccess.EmitAssign): storing non-builtin value types (ie,
29137         user defined stuff) requires the use of stobj, which takes an
29138         address on the stack instead of an array and an index.  So emit
29139         the Ldelema operation for it.
29140
29141         (EmitStoreOpcode): Use stobj for valuetypes.
29142
29143         (UnaryMutator.EmitCode): Use the right 1 value depending on
29144         whether we are dealing with int64/uint64, float or doubles.
29145
29146         * class.cs (TypeContainer.AddConstructor): Fix the logic to define
29147         constructors that I implemented last night.
29148
29149         (Constructor.IsDefault): Fix to work properly for static
29150         constructors.
29151
29152         * cs-parser.jay (CheckDef): report method signature errors.
29153         Update error number 103 to be 132.
29154
29155         * decl.cs: New AdditionResult enumeration value: MethodExists.
29156         Although we do this check for methods later on in the semantic
29157         analysis, catching repeated default constructors is so easy that
29158         we catch these here. 
29159
29160         * expression.cs (Binary.DoNumericPromotions): Fix the uint64 type
29161         promotions code.
29162
29163         (ParameterReference.EmitAssign, Emit): handle
29164         bools as bytes.
29165
29166         (ArrayAccess.EmitLoadOpcode): Handle bool type here.
29167         (ArrayAccess.EmitStoreOpcode): ditto.
29168
29169         * cs-tokenizer.cs (is_punct): Eliminated empty computation.
29170
29171         * expression.cs (MakeByteBlob): Complete all the missing types
29172         (uint, short, ushort, byte, sbyte)
29173
29174         * class.cs: Only init instance field initializers on instance
29175         constructors. 
29176
29177         Rename `constructors' to instance_constructors. 
29178
29179         (TypeContainer.AddConstructor): Only add constructors to the list
29180         if it is not static.
29181
29182         Make sure that we handle default_static_constructor independently
29183         everywhere where we handle instance_constructors
29184
29185 2001-12-28  Miguel de Icaza  <miguel@ximian.com>
29186
29187         * class.cs: Do not lookup or create a base initializer for a
29188         static constructor.
29189
29190         (ConstructorInitializer.Resolve): use the proper type to lookup
29191         for constructors.
29192
29193         * cs-parser.jay: Report error 1585 (modifiers between type and name).
29194
29195         * enum.cs, interface.cs: Remove CloseType, this is taken care by
29196         in DeclSpace. 
29197
29198         * decl.cs: CloseType is now an virtual method, the default
29199         implementation just closes this type.
29200
29201 2001-12-28  Ravi Pratap  <ravi@ximian.com>
29202
29203         * attribute.cs (DefinePInvokeMethod): Set the implementation flags
29204         to PreserveSig by default. Also emit HideBySig on such methods.
29205
29206         Basically, set the defaults to standard values.
29207
29208         * expression.cs (Invocation.BetterFunction): We need to make sure that for each
29209         argument, if candidate is better, it can't be worse than the best !
29210
29211         (Invocation): Re-write bits to differentiate between methods being
29212         applicable in their expanded form and their normal form - for params
29213         methods of course.
29214
29215         Get rid of use_standard everywhere as only standard conversions are allowed
29216         in overload resolution. 
29217
29218         More spec conformance.
29219
29220 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29221
29222         * driver.cs: Add --timestamp, to see where the compiler spends
29223         most of its time.
29224
29225         * ecore.cs (SimpleName.DoResolve): Do not create an implicit
29226         `this' in static code.
29227
29228         (SimpleName.DoResolve): Implement in terms of a helper function
29229         that allows static-references to be passed upstream to
29230         MemberAccess.
29231
29232         (Expression.ResolveWithSimpleName): Resolve specially simple
29233         names when called by MemberAccess to implement the special
29234         semantics. 
29235
29236         (Expression.ImplicitReferenceConversion): Handle conversions from
29237         Null to reference types before others, as Null's type is
29238         System.Object. 
29239
29240         * expression.cs (Invocation.EmitCall): Handle the special case of
29241         calling methods declared on a reference type from a ValueType
29242         (Base classes System.Object and System.Enum)
29243
29244         (MemberAccess.Resolve): Only perform lookups on Enumerations if
29245         the left hand side is a TypeExpr, not on every enumeration. 
29246
29247         (Binary.Resolve): If types are reference types, then do a cast to
29248         object on operators != and == of both arguments.
29249
29250         * typemanager.cs (FindMembers): Extract instance and static
29251         members if requested.
29252
29253         * interface.cs (PopulateProperty): Use void_type instead of null
29254         as the return type for the setter method.
29255
29256         (PopulateIndexer): ditto.
29257
29258 2001-12-27  Ravi Pratap  <ravi@ximian.com>
29259
29260         * support.cs (ReflectionParameters): Fix minor bug where we
29261         were examining the wrong parameter for the ParamArray attribute.
29262
29263         Cope with requests for the type of the parameter at position
29264         greater than the params parameter's. We now return the element
29265         type of the params array as that makes more sense.
29266
29267         * expression.cs (Invocation.IsParamsMethodApplicable): Update 
29268         accordingly as we no longer have to extract the element type
29269         ourselves.
29270
29271         (Invocation.OverloadResolve): Update.
29272
29273 2001-12-27  Miguel de Icaza  <miguel@ximian.com>
29274
29275         * statement.cs (Foreach.GetEnumeratorFilter): Do not compare
29276         against IEnumerator, test whether the return value is a descendant
29277         of the IEnumerator interface.
29278
29279         * class.cs (Indexer.Define): Use an auxiliary method to implement
29280         the other bits of the method definition.  Begin support for
29281         explicit interface implementation.
29282
29283         (Property.DefineMethod): Use TypeManager.void_type instead of null
29284         for an empty return value.
29285
29286 2001-12-26  Miguel de Icaza  <miguel@ximian.com>
29287
29288         * expression.cs (MemberAccess.ResolveMemberAccess): if we are
29289         dealing with a FieldExpr which is composed of a FieldBuilder, in
29290         the code path we did extract the constant, but we should have
29291         obtained the underlying value to be able to cast it (otherwise we
29292         end up in an infinite loop, this is what Ravi was running into).
29293
29294         (ArrayCreation.UpdateIndices): Arrays might be empty.
29295
29296         (MemberAccess.ResolveMemberAccess): Add support for section
29297         14.5.4.1 that deals with the special case of E.I when E is a type
29298         and something else, that I can be a reference to a static member.
29299
29300         (ArrayCreation.MakeByteBlob): It is not an error to not be able to
29301         handle a particular array type to create byte blobs, it is just
29302         something we dont generate byteblobs for.
29303
29304         * cs-tokenizer.cs (get_cmd_arg): Ignore \r in commands and
29305         arguments. 
29306
29307         * location.cs (Push): remove the key from the hashtable that we
29308         are about to add.   This happens for empty files.
29309
29310         * driver.cs: Dispose files after we have parsed them.
29311
29312         (tokenize): new function that only runs the tokenizer on its
29313         input, for speed testing.
29314
29315 2001-12-26  Ravi Pratap  <ravi@ximian.com>
29316
29317         * class.cs (Event.Define): Define the private field only if there
29318         are no accessors defined.
29319
29320         * expression.cs (ResolveMemberAccess): If there is no associated
29321         field with the event, that means we have an event defined with its
29322         own accessors and we should flag error cs0070 since transforming
29323         ourselves into a field is not valid in that case.
29324
29325         * ecore.cs (SimpleName.DoResolve): Same as above.
29326
29327         * attribute.cs (DefinePInvokeMethod): Set the default calling convention
29328         and charset to sane values.
29329
29330 2001-12-25  Ravi Pratap  <ravi@ximian.com>
29331
29332         * assign.cs (DoResolve): Perform check on events only if they 
29333         are being accessed outside the declaring type.
29334
29335         * cs-parser.jay (event_declarations): Update rules to correctly
29336         set the type of the implicit parameter etc.
29337
29338         (add_accessor, remove_accessor): Set current local parameters.
29339
29340         * expression.cs (Binary): For delegate addition and subtraction,
29341         cast the return value from the method into the appropriate delegate
29342         type.
29343
29344 2001-12-24  Ravi Pratap  <ravi@ximian.com>
29345
29346         * typemanager.cs (RegisterDelegateData, GetDelegateData): Get rid
29347         of these as the workaround is unnecessary.
29348
29349         * delegate.cs (NewDelegate.DoResolve): Get rid of bits which registered
29350         delegate data - none of that is needed at all.
29351
29352         Re-write bits to extract the instance expression and the delegate method
29353         correctly.
29354
29355         * expression.cs (Binary.ResolveOperator): Handle the '-' binary operator 
29356         on delegates too.
29357
29358         * attribute.cs (ApplyAttributes): New method to take care of common tasks
29359         of attaching attributes instead of duplicating code everywhere.
29360
29361         * everywhere : Update code to do attribute emission using the above method.
29362
29363 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29364
29365         * expression.cs (IsParamsMethodApplicable): if there are not
29366         parameters, return immediately.
29367
29368         * ecore.cs: The 0 literal can be implicity converted to an enum
29369         type. 
29370
29371         (SimpleName.DoResolve): First lookup the type, then lookup the
29372         members. 
29373
29374         (FieldExpr.Emit): If the InstanceExpression is a ValueType, we
29375         want to get its address.  If the InstanceExpression is not
29376         addressable, store the result in a temporary variable, then get
29377         the address of it.
29378
29379         * codegen.cs: Only display 219 errors on warning level or above. 
29380
29381         * expression.cs (ArrayAccess): Make it implement the
29382         IMemoryLocation interface.
29383
29384         (Binary.DoResolve): handle the operator == (object a, object b)
29385         and operator != (object a, object b) without incurring into a
29386         BoxedCast (because 5 != o should never be performed).
29387
29388         Handle binary enumerator operators.
29389
29390         (EmitLoadOpcode): Use Ldelema if the object we are loading is a
29391         value type, otherwise use Ldelem_ref.
29392
29393         Use precomputed names;
29394
29395         (AddressOf): Implement address of
29396
29397         * cs-parser.jay (labeled_statement): Fix recursive block
29398         addition by reworking the production.
29399
29400         * expression.cs (New.DoEmit): New has a special case:
29401                 
29402                  If we are dealing with a ValueType, we have a few
29403                  situations to deal with:
29404                 
29405                     * The target of New is a ValueType variable, that is
29406                       easy, we just pass this as the variable reference
29407                 
29408                     * The target of New is being passed as an argument,
29409                       to a boxing operation or a function that takes a
29410                       ValueType.
29411                 
29412                       In this case, we need to create a temporary variable
29413                       that is the argument of New.
29414
29415
29416 2001-12-23  Ravi Pratap  <ravi@ximian.com>
29417
29418         * rootcontext.cs (LookupType): Check that current_type is not null before
29419         going about looking at nested types.
29420
29421         * ecore.cs (EventExpr.EmitAddOrRemove): Rename from EmitAssign as we do
29422         not implement the IAssignMethod interface any more.
29423
29424         * expression.cs (MemberAccess.ResolveMemberAccess): Handle EventExprs specially
29425         where we tranform them into FieldExprs if they are being resolved from within
29426         the declaring type.
29427
29428         * ecore.cs (SimpleName.DoResolve): Do the same here.
29429
29430         * assign.cs (DoResolve, Emit): Clean up code considerably. 
29431
29432         * ../errors/bug10.cs : Add.
29433
29434         * ../errors/cs0070.cs : Add.
29435
29436         * typemanager.cs : Use PtrHashtable for Delegate data hashtable etc.
29437
29438         * assign.cs : Get rid of EventIsLocal everywhere.
29439
29440 2001-12-23  Miguel de Icaza  <miguel@ximian.com>
29441
29442         * ecore.cs (ConvertIntLiteral): finished the implementation.
29443
29444         * statement.cs (SwitchLabel): Convert the value we are using as a
29445         key before looking up the table.
29446
29447 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29448
29449         * codegen.cs (EmitTopBlock): Require a Location argument now.
29450
29451         * cs-parser.jay (constructor_declarator): We need to setup
29452         current_local_parameters before we parse the
29453         opt_constructor_initializer, to allow the variables to be bound
29454         to the constructor arguments.
29455
29456         * rootcontext.cs (LookupType): First lookup nested classes in our
29457         class and our parents before we go looking outside our class.
29458
29459         * expression.cs (ConstantFold): Extract/debox the values at the
29460         beginnning. 
29461
29462         * rootcontext.cs (EmitCode): Resolve the constants first before we
29463         resolve the types.  This is not really needed, but it helps debugging.
29464
29465         * statement.cs: report location.
29466
29467         * cs-parser.jay: pass location to throw statement.
29468
29469         * driver.cs: Small bug fix.
29470
29471         * report.cs: Updated format to be 4-zero filled digits.
29472
29473 2001-12-22  Ravi Pratap  <ravi@ximian.com>
29474
29475         * expression.cs (CheckIndices): Fix minor bug where the wrong
29476         variable was being referred to ;-)
29477
29478         (DoEmit): Do not call EmitStaticInitializers when the 
29479         underlying type is System.Object.
29480
29481 2001-12-21  Ravi Pratap  <ravi@ximian.com>
29482
29483         * ecore.cs (EventExpr.Resolve): Implement to correctly set the type
29484         and do the usual workaround for SRE.
29485
29486         * class.cs (MyEventBuilder.EventType): New member to get at the type
29487         of the event, quickly.
29488
29489         * expression.cs (Binary.ResolveOperator): Handle delegate addition.
29490
29491         * assign.cs (Assign.DoResolve): Handle the case when the target
29492         is an EventExpr and perform the necessary checks.
29493
29494         * ecore.cs (EventExpr.EmitAssign): Implement the IAssignMethod
29495         interface.
29496
29497         (SimpleName.MemberStaticCheck): Include check for EventExpr.
29498
29499         (EventExpr): Set the type in the constructor itself since we 
29500         are meant to be born fully resolved.
29501
29502         (EventExpr.Define): Revert code I wrote earlier.
29503                 
29504         * delegate.cs (NewDelegate.Resolve): Handle the case when the MethodGroup's
29505         instance expression is null. The instance expression is a This in that case
29506         or a null, depending on whether it is a static method or not.
29507
29508         Also flag an error if the reference to a method is ambiguous i.e the MethodGroupExpr
29509         refers to more than one method.
29510
29511         * assign.cs (DoResolve): Check whether the event belongs to the same Type container
29512         and accordingly flag errors.
29513
29514 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29515
29516         * statement.cs (Throw.Emit): Add support for re-throwing exceptions.
29517
29518 2001-12-22  Miguel de Icaza  <miguel@ximian.com>
29519
29520         * location.cs (ToString): Provide useful rutine.
29521
29522 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
29523
29524         * ecore.cs (Expression.ConvertIntLiteral): Do not return Constant
29525         objects, return the actual integral boxed.
29526
29527         * statement.cs (SwitchLabel): define an ILLabel for each
29528         SwitchLabel. 
29529
29530         (Switch.CheckSwitch): If the value is a Literal, extract
29531         the underlying literal.
29532
29533         Also in the unused hashtable we had, add the SwitchLabel so we can
29534         quickly look this value up.
29535
29536         * constant.cs: Implement a bunch of new constants.  Rewrite
29537         Literal based on this.  Made changes everywhere to adapt to this.
29538
29539         * expression.cs (Expression.MakeByteBlob): Optimize routine by
29540         dereferencing array only once, and also copes with enumrations.
29541
29542         bytes are two bytes wide, not one.
29543
29544         (Cast): Perform constant conversions.
29545
29546         * ecore.cs (TryImplicitIntConversion): Return literals instead of
29547         wrappers to the literals here.
29548
29549         * expression.cs (DoNumericPromotions): long literals can converted
29550         to ulong implicity (this is taken care of elsewhere, but I was
29551         missing this spot).
29552
29553         * ecore.cs (Expression.Literalize): Make the return type Literal,
29554         to improve type checking.
29555
29556         * rootcontext.cs: Lookup for nested classes in our class hierarchy.
29557
29558 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29559
29560         * literal.cs: Revert code from ravi that checked the bounds.  The
29561         bounds are sane by the definition of the type itself. 
29562
29563         * typemanager.cs: Fix implementation of ImplementsInterface.  We
29564         need to actually look up in our parent hierarchy for interfaces
29565         implemented. 
29566
29567         * const.cs: Use the underlying type for enumerations
29568
29569         * delegate.cs: Compute the basename for the delegate creation,
29570         that should fix the delegate test case, and restore the correct
29571         Type Lookup semantics in rootcontext
29572
29573         * rootcontext.cs: Revert Ravi's last patch.  The correct way of
29574         referencing a nested type with the Reflection API is using the "+"
29575         sign. 
29576
29577         * cs-parser.jay: Do not require EOF token at the end.
29578
29579 2001-12-20  Ravi Pratap  <ravi@ximian.com>
29580
29581         * rootcontext.cs (LookupType): Concatenate type names with
29582         a '.' instead of a '+' The test suite passes again.
29583
29584         * enum.cs (Enum.DefineEnum): Set RTSpecialName on the 'value__'
29585         field of the enumeration.
29586
29587         * expression.cs (MemberAccess.ResolveMemberAccess): Add support for
29588         the case when the member is an EventExpr.
29589
29590         * ecore.cs (EventExpr.InstanceExpression): Every event which is not
29591         static has an associated instance expression.
29592
29593         * typemanager.cs (RegisterEvent): The usual workaround, now for events.
29594
29595         (GetAddMethod, GetRemoveMethod): Workarounds, as usual.
29596
29597         * class.cs (Event.Define): Register event and perform appropriate checks
29598         for error #111.
29599
29600         We define the Add and Remove methods even if the use provides none because
29601         in that case, we provide default implementations ourselves.
29602
29603         Define a private field of the type of the event. This is done by the CSC compiler
29604         and we should be doing it too ;-)
29605
29606         * typemanager.cs (delegate_combine_delegate_delegate, delegate_remove_delegate_delegate):
29607         More methods we use in code we generate.
29608
29609         (multicast_delegate_type, delegate_type): Two separate types since the distinction
29610         is important.
29611
29612         (InitCoreTypes): Update accordingly for the above.
29613
29614         * class.cs (Event.Emit): Generate code for default accessors that we provide
29615
29616         (EmitDefaultMethod): Do the job in the above.
29617
29618         * delegate.cs (DefineDelegate): Use TypeManager.multicast_delegate_type in the 
29619         appropriate place.
29620
29621 2001-12-20  Miguel de Icaza  <miguel@ximian.com>
29622
29623         * class.cs (Indexer.Define): Fix bug, we were setting both Get/Set
29624         builders even if we were missing one.
29625
29626         * interface.cs, class.cs, enum.cs: When calling DefineNestedType
29627         pass the Basename as our class name instead of the Name.  The
29628         basename will be correctly composed for us.
29629
29630         * parameter.cs (Paramters): Now takes a Location argument.
29631
29632         * decl.cs (DeclSpace.LookupType): Removed convenience function and
29633         make all the code call directly LookupType in RootContext and take
29634         this chance to pass the Location information everywhere.
29635
29636         * Everywhere: pass Location information.
29637
29638 2001-12-19  Miguel de Icaza  <miguel@ximian.com>
29639
29640         * class.cs (Constructor.Define): Updated way of detecting the
29641         length of the parameters.
29642
29643         (TypeContainer.DefineType): Use basename as the type name for
29644         nested types.
29645
29646         (TypeContainer.Define): Do not recursively define types here, as
29647         definition is taken care in order by the RootContext.
29648
29649         * tree.cs: Keep track of namespaces in a per-file basis.
29650
29651         * parameter.cs (Parameter.ComputeSignature): Update to use
29652         DeclSpace. 
29653
29654         (Parameters.GetSignature): ditto.
29655
29656         * interface.cs (InterfaceMethod.GetSignature): Take a DeclSpace
29657         instead of a TypeContainer.
29658
29659         (Interface.SemanticAnalysis): Use `this' instead of our parent to
29660         resolve names.  Because we need to be resolve in our context, not
29661         our parents.
29662
29663         * driver.cs: Implement response files.
29664
29665         * class.cs (TypeContainer.DefineType): If we are defined, do not
29666         redefine ourselves.
29667
29668         (Event.Emit): Emit the code for add/remove handlers.
29669         (Event.Define): Save the MethodBuilders for add/remove.
29670
29671         * typemanager.cs: Use pair here too.
29672
29673         * cs-parser.jay: Replaced use of DictionaryEntry for Pair because
29674         DictionaryEntry requires the first argument to be non-null.  
29675
29676         (enum_declaration): Compute full name for registering the
29677         enumeration.
29678
29679         (delegate_declaration): Instead of using
29680         formal_parameter_list, use opt_formal_parameter_list as the list
29681         can be empty.
29682
29683         * cs-tokenizer.cs (PropertyParsing): renamed from `properties'
29684         (EventParsing): New property that controls whether `add' and
29685         `remove' are returned as tokens or identifiers (for events);
29686
29687 2001-12-19  Ravi Pratap  <ravi@ximian.com>
29688
29689         * class.cs (Event.Define): Revamp use of EventBuilder completely. We now
29690         use MyEventBuilder only and let it wrap the real builder for us.
29691
29692         (MyEventBuilder): Revamp constructor etc.
29693
29694         Implement all operations that we perform on EventBuilder in precisely the same
29695         way here too.
29696
29697         (FindMembers): Update to use the EventBuilder member.
29698
29699         (Event.Emit): Update accordingly.
29700
29701 2001-12-18  Ravi Pratap  <ravi@ximian.com>
29702
29703         * class.cs (MyEventBuilder.Set*): Chain to the underlying builder
29704         by calling the appropriate methods.
29705
29706         (GetCustomAttributes): Make stubs as they cannot possibly do anything
29707         useful.
29708
29709         (Event.Emit): Use MyEventBuilder everywhere - even to set attributes.
29710
29711 2001-12-17  Ravi Pratap  <ravi@ximian.com>
29712
29713         * delegate.cs (Delegate.Populate): Check that the return type
29714         and various parameters types are indeed accessible.
29715
29716         * class.cs (Constructor.Define): Same here.
29717
29718         (Field.Define): Ditto.
29719
29720         (Event.Define): Ditto.
29721
29722         (Operator.Define): Check that the underlying Method defined itself
29723         correctly - so it's MethodBuilder should not be null.
29724
29725         * delegate.cs (DelegateInvocation.DoResolve): Bale out if the type of the Instance
29726         expression happens to be null.
29727
29728         * class.cs (MyEventBuilder): Workaround for SRE lameness. Implement various abstract
29729         members but as of now we don't seem to be able to do anything really useful with it.
29730
29731         (FindMembers): Handle events separately by returning the MyEventBuilder of the event,
29732         not the EventBuilder.
29733
29734 2001-12-18  Miguel de Icaza  <miguel@ximian.com>
29735
29736         * cs-tokenizer.cs: Add support for defines.
29737         Add support for #if, #elif, #else, #endif
29738
29739         (eval_var): evaluates a variable.
29740         (eval): stubbed for evaluating functions.
29741
29742         * cs-parser.jay: Pass the defines information
29743
29744         * driver.cs: Add --define command line option.
29745
29746         * decl.cs: Move MemberCore here.
29747
29748         Make it the base class for DeclSpace.  This allows us to catch and
29749         report 108 and 109 for everything now.
29750
29751         * class.cs (TypeContainer.Define): Extract all the members
29752         before populating and emit the warning 108 (new keyword required
29753         to override) instead of having each member implement this.
29754
29755         (MemberCore.Define): New abstract method, we will be using this in
29756         the warning reporting engine in Populate.
29757
29758         (Operator.Define): Adjust to new MemberCore protocol. 
29759
29760         * const.cs (Const): This does not derive from Expression, it is a
29761         temporary object we use to create fields, it is a MemberCore. 
29762
29763         * class.cs (Method.Define): Allow the entry point to be in a
29764         specific class.
29765
29766         * driver.cs: Rewrite the argument handler to clean it up a bit.
29767
29768         * rootcontext.cs: Made it just an auxiliary namespace feature by
29769         making everything static.
29770
29771         * driver.cs: Adapt code to use RootContext type name instead of
29772         instance variable.
29773
29774         * delegate.cs: Remove RootContext argument.
29775
29776         * class.cs: (Struct, TypeContainer, Class): Remove RootContext
29777         argument. 
29778
29779         * class.cs (Event.Define): The lookup can fail.
29780
29781         * cs-tokenizer.cs: Begin implementation of pre-procesor. 
29782
29783         * expression.cs: Resolve the this instance before invoking the code.
29784
29785 2001-12-17  Miguel de Icaza  <miguel@ximian.com>
29786
29787         * cs-parser.jay: Add a production in element_access that allows
29788         the thing to become a "type" reference.  This way we can parse
29789         things like "(string [])" as a type.
29790
29791         Note that this still does not handle the more complex rules of
29792         casts. 
29793
29794
29795         * delegate.cs (Delegate.Populate): Register the delegage constructor builder here. 
29796
29797         * ecore.cs: (CopyNewMethods): new utility function used to
29798         assemble the list of methods from running FindMembers.
29799
29800         (MemberLookup): Rework FindMembers so that 
29801
29802 2001-12-16  Miguel de Icaza  <miguel@ximian.com>
29803
29804         * class.cs (TypeContainer): Remove Delegates who fail to be
29805         defined.
29806
29807         * delegate.cs (Populate): Verify that we dont get null return
29808         values.   TODO: Check for AsAccessible.
29809
29810         * cs-parser.jay: Use basename to emit error 574 (destructor should
29811         have the same name as container class), not the full name.
29812
29813         * cs-tokenizer.cs (adjust_int): Fit the integer in the best
29814         possible representation.  
29815
29816         Also implements integer type suffixes U and L.
29817
29818 2001-12-15  Miguel de Icaza  <miguel@ximian.com>
29819
29820         * expression.cs (ArrayCreation.DoResolve): We need to do the
29821         argument resolution *always*.
29822
29823         * decl.cs: Make this hold the namespace.  Hold the root context as
29824         well.
29825         (LookupType): Move here.
29826
29827         * enum.cs, class.cs, interface.cs: Adapt to new hierarchy.
29828
29829         * location.cs (Row, Name): Fixed the code, it was always returning
29830         references to the first file.
29831
29832         * interface.cs: Register properties defined through interfaces.
29833
29834         * driver.cs: Add support for globbing on the command line
29835
29836         * class.cs (Field): Make it derive from MemberCore as well.
29837         (Event): ditto.
29838
29839 2001-12-15  Ravi Pratap  <ravi@ximian.com>
29840
29841         * class.cs (Event::Define): Check that the type of the event is a delegate
29842         type else flag error #66.
29843
29844         Also, re-use TypeContainer.MethodModifiersValid here too as the rules are the
29845         same.
29846
29847         * attribute.cs (DefinePInvokeMethod): Handle named arguments and process
29848         values of EntryPoint, CharSet etc etc.
29849
29850         Pass in the values to TypeBuilder.DefinePInvokeMethod; determine Type etc neatly.
29851
29852         * class.cs (FindMembers): If a method is in transit, its MethodBuilder will
29853         be null and we should ignore this. I am not sure if this is really clean. Apparently,
29854         there's no way of avoiding hitting this because the call is coming from SimpleName.DoResolve,
29855         which needs this to do its work.
29856
29857         * ../errors/cs0066.cs : Add.
29858
29859 2001-12-14  Miguel de Icaza  <miguel@ximian.com>
29860
29861         * typemanager.cs: (GetPropertyGetter, GetPropertyGetter): New
29862         helper functions.
29863
29864         * class.cs: (MethodSignature.MethodSignature): Removed hack that
29865         clears out the parameters field.
29866         (MemberSignatureCompare): Cleanup
29867
29868         (MemberCore): New base class used to share code between MethodCore
29869         and Property.
29870
29871         (RegisterRequiredImplementations) BindingFlags.Public requires
29872         either BindingFlags.Instace or Static.  Use instance here.
29873
29874         (Property): Refactored code to cope better with the full spec.
29875
29876         * parameter.cs (GetParameterInfo): Return an empty array instead
29877         of null on error.
29878
29879         * class.cs (Property): Abstract or extern properties have no bodies.
29880
29881         * parameter.cs (GetParameterInfo): return a zero-sized array.
29882
29883         * class.cs (TypeContainer.MethodModifiersValid): Move all the
29884         method modifier validation to the typecontainer so we can reuse
29885         this on properties.
29886
29887         (MethodCore.ParameterTypes): return an empty sized array of types.
29888
29889         (Property.Define): Test property modifier validity.
29890
29891         Add tests for sealed/override too.
29892
29893         (Method.Emit): abstract or extern methods have no bodies.
29894
29895 2001-12-14  Ravi Pratap  <ravi@ximian.com>
29896
29897         * class.cs (Method.IsPInvoke): Get rid of it as it is an expensive
29898         thing.
29899
29900         (Method::Define, ::Emit): Modify accordingly.
29901
29902         * expression.cs (Invocation::OverloadResolve): Handle error # 121.
29903
29904         (ArrayCreation::MakeByteBlob): Handle floats and doubles.
29905
29906         * makefile: Pass in /unsafe.
29907
29908 2001-12-13  Miguel de Icaza  <miguel@ximian.com>
29909
29910         * class.cs (MakeKey): Kill routine.
29911
29912         * class.cs (TypeContainer.Define): Correctly define explicit
29913         method implementations (they require the full interface name plus
29914         the method name).
29915
29916         * typemanager.cs: Deply the PtrHashtable here and stop using the
29917         lame keys.  Things work so much better.
29918
29919         This of course broke everyone who depended on `RegisterMethod' to
29920         do the `test for existance' test.  This has to be done elsewhere.
29921
29922         * support.cs (PtrHashtable): A hashtable that avoid comparing with
29923         the object stupid Equals method (because, that like fails all over
29924         the place).  We still do not use it.
29925
29926         * class.cs (TypeContainer.SetRequiredInterface,
29927         TypeContainer.RequireMethods): Killed these two routines and moved
29928         all the functionality to RegisterRequiredImplementations.
29929
29930         (TypeContainer.RegisterRequiredImplementations): This routine now
29931         registers all the implementations required in an array for the
29932         interfaces and abstract methods.  We use an array of structures
29933         which can be computed ahead of time to reduce memory usage and we
29934         also assume that lookups are cheap as most classes will not
29935         implement too many interfaces.
29936
29937         We also avoid creating too many MethodSignatures.
29938
29939         (TypeContainer.IsInterfaceMethod): Update and optionally does not
29940         clear the "pending" bit if we find that there are problems with
29941         the declaration.
29942
29943         (TypeContainer.VerifyPendingMethods): Update to report errors of
29944         methods that look like implementations but are not.
29945
29946         (TypeContainer.Define): Add support for explicit interface method
29947         implementation. 
29948
29949 2001-12-12  Miguel de Icaza  <miguel@ximian.com>
29950
29951         * typemanager.cs: Keep track of the parameters here instead of
29952         being a feature of the TypeContainer.
29953
29954         * class.cs: Drop the registration of parameters here, as
29955         InterfaceMethods are also interface declarations.
29956
29957         * delegate.cs: Register methods with the TypeManager not only with
29958         the TypeContainer.  This code was buggy.
29959
29960         * interface.cs: Full registation here.
29961
29962 2001-12-11  Miguel de Icaza  <miguel@ximian.com>
29963
29964         * expression.cs: Remove reducer for binary expressions, it can not
29965         be done this way.
29966
29967         * const.cs: Put here the code that used to go into constant.cs
29968
29969         * constant.cs: Put here the code for constants, this is a new base
29970         class for Literals.
29971
29972         * literal.cs: Make Literal derive from Constant.
29973
29974 2001-12-09  Miguel de Icaza  <miguel@ximian.com>
29975
29976         * statement.cs (Return.Emit): Report error 157 if the user
29977         attempts to return from a finally block.
29978
29979         (Return.Emit): Instead of emitting a return, jump to the end of
29980         the function.
29981
29982         * codegen.cs (EmitContext): ReturnValue, ReturnLabel: new
29983         LocalBuilder to store the result of the function.  ReturnLabel is
29984         the target where we jump.
29985
29986
29987 2001-12-09  Radek Doulik  <rodo@ximian.com>
29988
29989         * cs-parser.jay: remember alias in current namespace
29990
29991         * ecore.cs (SimpleName::DoResolve): use aliases for types or
29992         namespaces
29993
29994         * class.cs (LookupAlias): lookup alias in my_namespace
29995
29996         * namespace.cs (UsingAlias): add alias, namespace_or_type pair to
29997         aliases hashtable
29998         (LookupAlias): lookup alias in this and if needed in parent
29999         namespaces
30000
30001 2001-12-08  Miguel de Icaza  <miguel@ximian.com>
30002
30003         * support.cs: 
30004
30005         * rootcontext.cs: (ModuleBuilder) Made static, first step into
30006         making things static.  I need this to avoid passing the
30007         TypeContainer when calling ParameterType.
30008
30009         * support.cs (InternalParameters.ParameterType): Remove ugly hack
30010         that did string manipulation to compute the type and then call
30011         GetType.  Use Parameter.ParameterType instead.
30012
30013         * cs-tokenizer.cs: Consume the suffix for floating values.
30014
30015         * expression.cs (ParameterReference): figure out whether this is a
30016         reference parameter or not.  Kill an extra variable by computing
30017         the arg_idx during emission.
30018
30019         * parameter.cs (Parameters.GetParameterInfo): New overloaded
30020         function that returns whether a parameter is an out/ref value or not.
30021
30022         (Parameter.ParameterType): The type of the parameter (base,
30023         without ref/out applied).
30024
30025         (Parameter.Resolve): Perform resolution here.
30026         (Parameter.ExternalType): The full type (with ref/out applied).
30027
30028         * statement.cs (Using.Emit, Using.EmitExpression): Implement
30029         support for expressions on the using statement.
30030
30031 2001-12-07  Miguel de Icaza  <miguel@ximian.com>
30032
30033         * statement.cs (Using.EmitLocalVariableDecls): Split the
30034         localvariable handling of the using statement.
30035
30036         (Block.EmitMeta): Keep track of variable count across blocks.  We
30037         were reusing slots on separate branches of blocks.
30038
30039         (Try.Emit): Emit the general code block, we were not emitting it. 
30040
30041         Check the type of the declaration to be an IDisposable or
30042         something that can be implicity converted to it. 
30043
30044         Emit conversions if required.
30045
30046         * ecore.cs (EmptyExpression): New utility class.
30047         (Expression.ImplicitConversionExists): New utility function.
30048
30049 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
30050
30051         * statement.cs (Using): Implement.
30052
30053         * expression.cs (LocalVariableReference): Support read only variables.
30054
30055         * statement.cs: Remove the explicit emit for the Leave opcode.
30056         (VariableInfo): Add a readonly field.
30057
30058 2001-12-05  Miguel de Icaza  <miguel@ximian.com>
30059
30060         * ecore.cs (ConvCast): new class used to encapsulate the various
30061         explicit integer conversions that works in both checked and
30062         unchecked contexts.
30063
30064         (Expression.ConvertNumericExplicit): Use new ConvCast class to
30065         properly generate the overflow opcodes.
30066
30067 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30068
30069         * statement.cs: The correct type for the EmptyExpression is the
30070         element_type, not the variable type.  Ravi pointed this out.
30071
30072 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30073
30074         * class.cs (Method::Define): Handle PInvoke methods specially
30075         by using DefinePInvokeMethod instead of the usual one.
30076
30077         * attribute.cs (DefinePInvokeMethod): Implement as this is what is called
30078         above to do the task of extracting information and defining the method.
30079
30080 2001-12-04  Ravi Pratap  <ravi@ximian.com>
30081
30082         * expression.cs (ArrayCreation::EmitStaticInitializers): Get rid
30083         of the condition for string type.
30084
30085         (Emit): Move that here. 
30086
30087         (ArrayCreation::CheckIndices): Keep string literals in their expression
30088         form.
30089
30090         (EmitDynamicInitializers): Handle strings appropriately.
30091
30092 2001-12-04  Miguel de Icaza  <miguel@ximian.com>
30093
30094         * codegen.cs (EmitContext): Replace multiple variables with a
30095         single pointer to the current Switch statement.
30096
30097         * statement.cs (GotoDefault, Switch): Adjust to cleaned up
30098         EmitContext.
30099
30100 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30101
30102         * statement.cs 
30103
30104         * statement.cs (GotoDefault), cs-parser.jay: Implement `goto
30105         default'.
30106
30107         (Foreach.Emit): Foreach on arrays was not setting
30108         up the loop variables (for break/continue).
30109
30110         (GotoCase): Semi-implented.
30111
30112 2001-12-03  Ravi Pratap  <ravi@ximian.com>
30113
30114         * attribute.cs (CheckAttribute): Handle system attributes by using
30115         Attribute.GetAttributes to examine information we need.
30116
30117         (GetValidPlaces): Same here.
30118
30119         * class.cs (Method::Define): Catch invalid use of extern and abstract together.
30120
30121         * typemanager.cs (dllimport_type): Core type for System.DllImportAttribute.
30122
30123         * class.cs (Method.IsPinvoke): Used to determine if we are a PInvoke method.
30124
30125         (Method::Define): Set appropriate flags if we have a DllImport attribute.
30126
30127         (Method::Emit): Handle the case when we are a PInvoke method.
30128
30129 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
30130
30131         * expression.cs: Use ResolveWithSimpleName on compound names.
30132
30133 2001-12-02  Ravi Pratap  <ravi@ximian.com>
30134
30135         * constant.cs (EmitConstant): Make sure we resolve the associated expression
30136         before trying to reduce it.
30137
30138         * typemanager.cs (RegisterConstant, LookupConstant): Implement.
30139
30140         * constant.cs (LookupConstantValue): Implement.
30141
30142         (EmitConstant): Use the above in emitting the constant.
30143
30144         * expression.cs (MemberAccess::ResolveMemberAccess): Handle constants
30145         that are user-defined by doing a LookupConstantValue on them.
30146
30147         (SimpleName::DoResolve): When we have a FieldExpr, cope with constants
30148         too, like above.
30149
30150 2001-11-29  Miguel de Icaza  <miguel@ximian.com>
30151
30152         * expression.cs (BaseAccess, BaseIndexer): Also split this out.
30153
30154         (BaseAccess.DoResolve): Implement.
30155
30156         (MemberAccess.DoResolve): Split this routine into a
30157         ResolveMemberAccess routine that can be used independently
30158
30159 2001-11-28  Miguel de Icaza  <miguel@ximian.com>
30160
30161         * expression.cs (Probe, Is, As): Split Probe in two classes Is and
30162         As that share bits of the implementation.  Is returns a boolean,
30163         while As returns the Type that is being probed.
30164
30165 2001-12-01  Ravi Pratap  <ravi@ximian.com>
30166
30167         * enum.cs (LookupEnumValue): Re-write various bits, return an object value
30168         instead of a Literal - much easier.
30169
30170         (EnumInTransit): Remove - utterly useless :-)
30171
30172         (Populate): Re-write bits - remove duplicate code etc. The code is much neater now.
30173
30174         * expression.cs (MemberLookup): Cope with user-defined enums when they are in transit.
30175
30176         * enum.cs (LookupEnumValue): Auto-compute next values by going down the dependency
30177         chain when we have no associated expression.
30178
30179 2001-11-30  Ravi Pratap  <ravi@ximian.com>
30180
30181         * constant.cs (Define): Use Location while reporting the errror.
30182
30183         Also emit a warning when 'new' is used and there is no inherited
30184         member to hide.
30185
30186         * enum.cs (EnumInTransit): Used to tell if an enum type is in the process of being 
30187         populated.
30188
30189         (LookupEnumValue): Implement to lookup an enum member's value and define it
30190         if necessary.
30191
30192         (Populate): Re-write accordingly to use the above routine.
30193
30194 2001-11-27  Miguel de Icaza  <miguel@ximian.com>
30195
30196         * expression.cs (This): Fix prototype for DoResolveLValue to
30197         override the base class DoResolveLValue.
30198
30199         * cs-parser.cs: Report errors cs574 and cs575 (destructor
30200         declarations) 
30201
30202         * ecore.cs (FieldExpr.EmitAssign): Handle value types specially
30203         (we need to load the address of the field here).  This fixes
30204         test-22. 
30205
30206         (FieldExpr.DoResolveLValue): Call the DoResolve
30207         function to initialize the Instance expression.
30208
30209         * statement.cs (Foreach.Emit): Fix the bug where we did not invoke
30210         correctly the GetEnumerator operation on a value type.
30211
30212         * cs-parser.jay: Add more simple parsing error catches.
30213
30214         * statement.cs (Switch): Add support for string switches.
30215         Handle null specially.
30216
30217         * literal.cs (NullLiteral): Make NullLiteral objects singletons. 
30218
30219 2001-11-28  Ravi Pratap  <ravi@ximian.com>
30220
30221         * cs-parser.jay (local_constant_declaration): Use declare_local_constant.
30222
30223         (declare_local_constant): New helper function.
30224
30225         * statement.cs (AddConstant): Keep a separate record of constants
30226
30227         (IsConstant): Implement to determine if a variable is a constant.
30228
30229         (GetConstantExpression): Implement.
30230
30231         * expression.cs (LocalVariableReference): Handle the case when it is a constant.
30232
30233         * statement.cs (IsVariableDefined): Re-write.
30234
30235 2001-11-27  Ravi Pratap  <ravi@ximian.com>
30236
30237         * class.cs (TypeContainer::FindMembers): Look for constants
30238         in the case when we are looking for MemberTypes.Field
30239
30240         * expression.cs (MemberAccess::DoResolve): Check that in the
30241         case we are a FieldExpr and a Literal, we are not being accessed
30242         by an instance reference.
30243
30244         * cs-parser.jay (local_constant_declaration): Implement.
30245
30246         (declaration_statement): Implement for constant declarations.
30247
30248 2001-11-26  Miguel de Icaza  <miguel@ximian.com>
30249
30250         * statement.cs (Switch): Catch double defaults.
30251
30252         (Switch): More work on the switch() statement
30253         implementation.  It works for integral values now, need to finish
30254         string support.
30255
30256
30257 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30258
30259         * ecore.cs (Expression.ConvertIntLiteral): New function to convert
30260         integer literals into other integer literals.  To be used by
30261         switch. 
30262
30263 2001-11-24  Ravi Pratap  <ravi@ximian.com>
30264
30265         * expression.cs (ArrayCreation): Get rid of ArrayExprs : we save
30266         some memory.
30267
30268         (EmitDynamicInitializers): Cope with the above since we extract data
30269         directly from ArrayData now.
30270
30271         (ExpectInitializers): Keep track of whether initializers are mandatory
30272         or not.
30273
30274         (Bounds): Make it a hashtable to prevent the same dimension being 
30275         recorded for every element in that dimension.
30276
30277         (EmitDynamicInitializers): Fix bug which prevented the Set array method
30278         from being found.
30279
30280         Also fix bug which was causing the indices to be emitted in the reverse
30281         order.
30282
30283 2001-11-24  Miguel de Icaza  <miguel@ximian.com>
30284
30285         * expression.cs (ArrayCreation): Implement the bits that Ravi left
30286         unfinished.  They do not work, because the underlying code is
30287         sloppy.
30288
30289 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30290
30291         * cs-parser.jay: Remove bogus fixme.
30292
30293         * statement.cs (Switch, SwitchSection, SwithLabel): Started work
30294         on Switch statement.
30295
30296 2001-11-23  Ravi Pratap  <ravi@ximian.com>
30297
30298         * typemanager.cs (IsDelegateType, IsEnumType): Fix logic to determine
30299         the same. 
30300
30301         * expression.cs (ArrayCreation::CheckIndices): Get rid of the require_constant
30302         parameter. Apparently, any expression is allowed. 
30303
30304         (ValidateInitializers): Update accordingly.
30305
30306         (CheckIndices): Fix some tricky bugs thanks to recursion.
30307
30308         * delegate.cs (NewDelegate::DoResolve): Re-write large portions as 
30309         I was being completely brain-dead.
30310
30311         (VerifyMethod, VerifyApplicability, VerifyDelegate): Make static
30312         and re-write acordingly.
30313
30314         (DelegateInvocation): Re-write accordingly.
30315
30316         * expression.cs (ArrayCreation::Emit): Handle string initialization separately.
30317
30318         (MakeByteBlob): Handle types more correctly.
30319
30320         * expression.cs (ArrayCreation:Emit): Write preliminary code to do
30321         initialization from expressions but it is incomplete because I am a complete
30322         Dodo :-|
30323
30324 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30325
30326         * statement.cs (If.Emit): Fix a bug that generated incorrect code
30327         on If.  Basically, we have to return `true' (ie, we do return to
30328         our caller) only if both branches of the if return.
30329
30330         * expression.cs (Binary.Emit): LogicalOr and LogicalAnd are
30331         short-circuit operators, handle them as short circuit operators. 
30332
30333         (Cast.DoResolve): Resolve type.
30334         (Cast.Cast): Take an expression as the target type.
30335
30336         * cs-parser.jay (cast_expression): Remove old hack that only
30337         allowed a limited set of types to be handled.  Now we take a
30338         unary_expression and we resolve to a type during semantic
30339         analysis.
30340
30341         Use the grammar productions from Rhys to handle casts (this is
30342         not complete like Rhys syntax yet, we fail to handle that corner
30343         case that C# has regarding (-x), but we will get there.
30344
30345 2001-11-22  Ravi Pratap  <ravi@ximian.com>
30346
30347         * class.cs (EmitFieldInitializer): Take care of the case when we have a
30348         field which is an array type.
30349
30350         * cs-parser.jay (declare_local_variables): Support array initialization too.
30351
30352         * typemanager.cs (MakeKey): Implement.
30353
30354         (everywhere): Use the above appropriately.
30355
30356         * cs-parser.jay (for_statement): Update for array initialization while
30357         declaring variables.
30358
30359         * ecore.cs : The error message was correct, it's the variable's names that
30360         were misleading ;-) Make the code more readable.
30361
30362         (MemberAccess::DoResolve): Fix the code which handles Enum literals to set
30363         the correct type etc.
30364
30365         (ConvertExplicit): Handle Enum types by examining the underlying type.
30366
30367 2001-11-21  Ravi Pratap  <ravi@ximian.com>
30368
30369         * parameter.cs (GetCallingConvention): Always return
30370         CallingConventions.Standard for now.
30371
30372 2001-11-22  Miguel de Icaza  <miguel@ximian.com>
30373
30374         * expression.cs (Binary.ResolveOperator): Update the values of `l'
30375         and `r' after calling DoNumericPromotions.
30376
30377         * ecore.cs: Fix error message (the types were in the wrong order).
30378
30379         * statement.cs (Foreach.ProbeCollectionType): Need to pass
30380         BindingFlags.Instance as well 
30381
30382         * ecore.cs (Expression.TryImplicitIntConversion): Wrap the result
30383         implicit int literal conversion in an empty cast so that we
30384         propagate the right type upstream.
30385
30386         (UnboxCast): new class used to unbox value types.
30387         (Expression.ConvertExplicit): Add explicit type conversions done
30388         by unboxing.
30389
30390         (Expression.ImplicitNumericConversion): Oops, forgot to test for
30391         the target type before applying the implicit LongLiterals to ULong
30392         literal cast.
30393
30394 2001-11-21  Miguel de Icaza  <miguel@ximian.com>
30395
30396         * cs-parser.jay (for_statement): Reworked the way For works: now
30397         we declare manually any variables that are introduced in
30398         for_initializer to solve the problem of having out-of-band code
30399         emition (that is what got for broken).
30400
30401         (declaration_statement): Perform the actual variable declaration
30402         that used to be done in local_variable_declaration here.
30403
30404         (local_variable_declaration): Do not declare anything, just pass
30405         the information on a DictionaryEntry
30406
30407 2001-11-20  Ravi Pratap  <ravi@ximian.com>
30408
30409         * expression.cs (ArrayCreation::CheckIndices): The story continues :-) Complete
30410         re-write of the logic to now make it recursive.
30411
30412         (UpdateIndices): Re-write accordingly.
30413
30414         Store element data in a separate ArrayData list in the above methods.
30415
30416         (MakeByteBlob): Implement to dump the array data into a byte array.
30417
30418 2001-11-19  Ravi Pratap  <ravi@ximian.com>
30419
30420         * expression.cs (ArrayCreation): Factor out some code from ValidateInitializers
30421         into CheckIndices.
30422
30423         * constant.cs (Define): Implement.
30424
30425         (EmitConstant): Re-write fully.
30426
30427         Pass in location info.
30428
30429         * class.cs (Populate, Emit): Call Constant::Define and Constant::EmitConstant
30430         respectively.
30431
30432         * cs-parser.jay (constant_declarator): Use VariableDeclaration instead of
30433         DictionaryEntry since we need location info too.
30434
30435         (constant_declaration): Update accordingly.
30436
30437         * expression.cs (ArrayCreation): Make ValidateInitializers simpler by factoring
30438         code into another method : UpdateIndices.
30439
30440 2001-11-18  Ravi Pratap  <ravi@ximian.com>
30441
30442         * expression.cs (ArrayCreation::ValidateInitializers): Update to perform
30443         some type checking etc.
30444
30445 2001-11-17  Ravi Pratap  <ravi@ximian.com>
30446
30447         * expression.cs (ArrayCreation::ValidateInitializers): Implement
30448         bits to provide dimension info if the user skips doing that.
30449
30450         Update second constructor to store the rank correctly.
30451
30452 2001-11-16  Ravi Pratap  <ravi@ximian.com>
30453
30454         * expression.cs (ArrayCreation::ValidateInitializers): Poke around
30455         and try to implement.
30456
30457         * ../errors/cs0150.cs : Add.
30458
30459         * ../errors/cs0178.cs : Add.
30460
30461 2001-11-16  Miguel de Icaza  <miguel@ximian.com>
30462
30463         * statement.cs: Implement foreach on multi-dimensional arrays. 
30464
30465         * parameter.cs (Parameters.GetParameterByName): Also lookup the
30466         name of the params argument.
30467
30468         * expression.cs: Use EmitStoreOpcode to get the right opcode while
30469         initializing the array.
30470
30471         (ArrayAccess.EmitStoreOpcode): move the opcode generation here, so
30472         we can use this elsewhere.
30473
30474         * statement.cs: Finish implementation of foreach for single
30475         dimension arrays.
30476
30477         * cs-parser.jay: Use an out-of-band stack to pass information
30478         around, I wonder why I need this.
30479
30480         foreach_block: Make the new foreach_block the current_block.
30481
30482         * parameter.cs (Parameters.GetEmptyReadOnlyParameters): New
30483         function used to return a static Parameters structure.  Used for
30484         empty parameters, as those are created very frequently.
30485
30486         * cs-parser.jay, class.cs: Use GetEmptyReadOnlyParameters
30487
30488 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30489
30490         * interface.cs : Default modifier is private, not public. The
30491         make verify test passes again.
30492
30493 2001-11-15  Ravi Pratap  <ravi@ximian.com>
30494
30495         * support.cs (ReflectionParameters): Fix logic to determine
30496         whether the last parameter is a params one. Test 9 passes again.
30497
30498         * delegate.cs (Populate): Register the builders we define with
30499         RegisterParameterForBuilder. Test 19 passes again.
30500
30501         * cs-parser.jay (property_declaration): Reference $6 instead
30502         of $$ to get at the location.
30503
30504         (indexer_declaration): Similar stuff.
30505
30506         (attribute): Ditto.
30507
30508         * class.cs (Property): Register parameters for the Get and Set methods
30509         if they exist. Test 23 passes again.
30510
30511         * expression.cs (ArrayCreation::Emit): Pass null for the method in the
30512         call to EmitArguments as we are sure there aren't any params arguments. 
30513         Test 32 passes again.
30514
30515         * suppor.cs (ParameterDesc, ParameterModifier): Fix trivial bug causing
30516         IndexOutOfRangeException. 
30517
30518         * class.cs (Property::Define): Register property using TypeManager.RegisterProperty
30519         Test 33 now passes again.
30520
30521 2001-11-15  Miguel de Icaza  <miguel@ximian.com>
30522
30523         * cs-parser.jay: Kill horrendous hack ($??? = lexer.Location) that
30524         broke a bunch of things.  Will have to come up with a better way
30525         of tracking locations.
30526
30527         * statement.cs: Implemented foreach for single dimension arrays.
30528
30529 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30530
30531         * enum.cs (Enum.Emit): Delay the lookup of loc until we run into
30532         an error.  This removes the lookup from the critical path.
30533
30534         * cs-parser.jay: Removed use of temporary_loc, which is completely
30535         broken. 
30536
30537 2001-11-14  Miguel de Icaza  <miguel@ximian.com>
30538
30539         * support.cs (ReflectionParameters.ParameterModifier): Report
30540         whether the argument is a PARAMS argument or not.
30541
30542         * class.cs: Set the attribute `ParamArrayAttribute' on the
30543         parameter argument.
30544
30545         * typemanager.cs: Define param_array_type (ParamArrayAttribute)
30546         and cons_param_array_attribute (ConstructorInfo for
30547         ParamArrayAttribute)., 
30548
30549         * codegen.cs: Emit the return using the `Return' statement, that
30550         way we can report the error correctly for missing return values. 
30551
30552         * class.cs (Method.Emit): Clean up.
30553
30554         * expression.cs (Argument.Resolve): Take another argument: the
30555         location where this argument is used.  Notice that this is not
30556         part of the "Argument" class as to reduce the size of the
30557         structure (we know the approximate location anyways).
30558
30559         Test if the argument is a variable-reference, if not, then
30560         complain with a 206.
30561
30562         (Argument.Emit): Emit addresses of variables.
30563
30564         (Argument.FullDesc): Simplify.
30565
30566         (Invocation.DoResolve): Update for Argument.Resolve.
30567
30568         (ElementAccess.DoResolve): ditto.
30569
30570         * delegate.cs (DelegateInvocation.Emit): Invocation of Invoke
30571         method should be virtual, as this method is always virtual.
30572
30573         (NewDelegate.DoResolve): Update for Argument.Resolve.
30574
30575         * class.cs (ConstructorInitializer.DoResolve): ditto.
30576
30577         * attribute.cs (Attribute.Resolve): ditto.
30578
30579 2001-11-13  Miguel de Icaza  <miguel@ximian.com>
30580
30581         * statement.cs (Foreach.Emit): Use EmitAssign instead of Store.
30582
30583         * expression.cs (ParameterReference): Drop IStackStorage and implement
30584         IAssignMethod instead. 
30585
30586         (LocalVariableReference): ditto.
30587
30588         * ecore.cs (FieldExpr): Drop IStackStorage and implement
30589         IAssignMethod instead. 
30590
30591 2001-11-13  Miguel de Icaza <miguel@ximian.com>
30592
30593         * parameter.cs, expression.cs, class.cs, ecore.cs: Made all
30594         enumerations that are used in heavily used structures derive from
30595         byte in a laughable and pathetic attempt to reduce memory usage.
30596         This is the kind of pre-optimzations that you should not do at
30597         home without adult supervision.
30598
30599         * expression.cs (UnaryMutator): New class, used to handle ++ and
30600         -- separatedly from the other unary operators.  Cleans up the
30601         code, and kills the ExpressionStatement dependency in Unary.
30602
30603         (Unary): Removed `method' and `Arguments' from this class, making
30604         it smaller, and moving it all to SimpleCall, so I can reuse this
30605         code in other locations and avoid creating a lot of transient data
30606         strucutres when not required.
30607
30608         * cs-parser.jay: Adjust for new changes.
30609
30610 2001-11-11  Miguel de Icaza  <miguel@ximian.com>
30611
30612         * enum.cs (Enum.Populate): If there is a failure during
30613         definition, return
30614
30615         * cs-parser.jay (opt_enum_base): we used to catch type errors
30616         here, but this is really incorrect.  The type error should be
30617         catched during semantic analysis.
30618
30619 2001-12-11  Ravi Pratap  <ravi@ximian.com>
30620
30621         * cs-parser.jay (operator_declarator, conversion_operator_declarator): Set
30622         current_local_parameters as expected since I, in my stupidity, had forgotten
30623         to do this :-)
30624
30625         * attribute.cs (GetValidPlaces): Fix stupid bug.
30626
30627         * class.cs (Method::Emit): Perform check on applicability of attributes.
30628
30629         (Constructor::Emit): Ditto.
30630
30631         (Field::Emit): Ditto.
30632
30633         (Field.Location): Store location information.
30634
30635         (Property, Event, Indexer, Operator): Ditto.
30636
30637         * cs-parser.jay (field_declaration): Pass in location for each field.
30638
30639         * ../errors/cs0592.cs : Add.
30640
30641 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30642
30643         * typemanager.cs (attribute_usage_type): New static member for System.AttributeUsage.
30644
30645         (InitCoreTypes): Update accordingly.
30646
30647         (RegisterAttrType, LookupAttr): Implement.
30648
30649         * attribute.cs (Attribute.Targets, AllowMultiple, Inherited): New fields to hold
30650         info about the same.
30651
30652         (Resolve): Update to populate the above as necessary.
30653
30654         (Error592): Helper.
30655
30656         (GetValidPlaces): Helper to the above.
30657
30658         (CheckAttribute): Implement to perform validity of attributes on declarative elements.
30659
30660         * class.cs (TypeContainer::Emit): Update attribute emission code to perform checking etc.
30661
30662 2001-11-12  Ravi Pratap  <ravi@ximian.com>
30663
30664         * attribute.cs (Attribute::Resolve): Expand to handle named arguments too.
30665
30666         * ../errors/cs0617.cs : Add.
30667
30668 2001-11-11  Ravi Pratap  <ravi@ximian.com>
30669
30670         * enum.cs (Emit): Rename to Populate to be more consistent with what
30671         we expect it to do and when exactly it is called.
30672
30673         * class.cs, rootcontext.cs : Update accordingly.
30674
30675         * typemanager.cs (RegisterField, GetValue): Workarounds for the fact that
30676         FieldInfo.GetValue does not work on dynamic types ! S.R.E lameness strikes again !
30677
30678         * enum.cs (Populate): Register fields with TypeManager.RegisterField.
30679
30680         * expression.cs (MemberAccess.DoResolve): Adjust code to obtain the value
30681         of a fieldinfo using the above, when dealing with a FieldBuilder.
30682
30683 2001-11-10  Ravi Pratap  <ravi@ximian.com>
30684
30685         * ../errors/cs0031.cs : Add.
30686
30687         * ../errors/cs1008.cs : Add.
30688
30689         * ../errrors/cs0543.cs : Add.
30690
30691         * enum.cs (DefineEnum): Check the underlying type and report an error if not a valid
30692         enum type.
30693
30694         (FindMembers): Implement.
30695
30696         * typemanager.cs (FindMembers): Re-write to call the appropriate methods for
30697         enums and delegates too.
30698
30699         (enum_types): Rename to builder_to_enum.
30700
30701         (delegate_types): Rename to builder_to_delegate.
30702
30703         * delegate.cs (FindMembers): Implement.
30704
30705 2001-11-09  Ravi Pratap  <ravi@ximian.com>
30706
30707         * typemanager.cs (IsEnumType): Implement.
30708
30709         * enum.cs (Emit): Re-write parts to account for the underlying type
30710         better and perform checking etc.
30711
30712         (GetNextDefaultValue): Helper to ensure we don't overshoot max value
30713         of the underlying type.
30714
30715         * literal.cs (GetValue methods everywhere): Perform bounds checking and return
30716         value
30717
30718         * enum.cs (error31): Helper to report error #31.
30719
30720         * cs-parser.jay (enum_declaration): Store location of each member too.
30721
30722         * enum.cs (member_to_location): New hashtable. 
30723
30724         (AddEnumMember): Update location hashtable.
30725
30726         (Emit): Use the location of each member while reporting errors.
30727
30728 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
30729
30730         * cs-parser.jay: A for_initializer if is a
30731         local_variable_declaration really ammount to have an implicit
30732         block with the variable declaration and no initializer for for.
30733
30734         * statement.cs (For.Emit): Cope with null initializers.
30735
30736         This fixes the infinite loop on for initializers.
30737
30738 2001-11-08  Miguel de Icaza  <miguel@ximian.com>
30739
30740         * enum.cs: More cleanup.
30741
30742         * ecore.cs: Remove dead code.
30743
30744         * class.cs (Property.Emit): More simplification.
30745         (Event.Emit): ditto.
30746
30747         Reworked to have less levels of indentation.
30748
30749 2001-11-08  Ravi Pratap  <ravi@ximian.com>
30750
30751         * class.cs (Property): Emit attributes.
30752
30753         (Field): Ditto.
30754
30755         (Event): Ditto.
30756
30757         (Indexer): Ditto.
30758
30759         (Operator): Ditto.
30760
30761         * enum.cs (Emit): Ditto.
30762
30763         * rootcontext.cs (ResolveTree, EmitCode, CloseTypes): Do the same for
30764         Enums too.
30765
30766         * class.cs (Field, Event, etc.): Move attribute generation into the
30767         Emit method everywhere.
30768
30769         * enum.cs (Enum): Revamp to use the same definition semantics as delegates so
30770         we have a DefineEnum, CloseEnum etc. The previous way of doing things was not right
30771         as we had no way of defining nested enums !
30772
30773         * rootcontext.cs : Adjust code accordingly.
30774
30775         * typemanager.cs (AddEnumType): To keep track of enum types separately.
30776
30777 2001-11-07  Ravi Pratap  <ravi@ximian.com>
30778
30779         * expression.cs (EvalConstantExpression): Move into ecore.cs
30780
30781         * enum.cs (Enum): Rename some members and make them public and readonly
30782         according to our convention.
30783
30784         * modifiers.cs (EnumAttr): Implement as we need to set only visibility flags,
30785         nothing else.
30786
30787         * enum.cs (Enum::Define): Use the above instead of TypeAttr.
30788
30789         (Enum::Emit): Write a simple version for now which doesn't try to compute
30790         expressions. I shall modify this to be more robust in just a while.
30791
30792         * class.cs (TypeContainer::Emit): Make sure we include Enums too.
30793
30794         (TypeContainer::CloseType): Create the Enum types too.
30795
30796         * attribute.cs (Resolve): Use the new Reduce method instead of EvalConstantExpression.
30797
30798         * expression.cs (EvalConstantExpression): Get rid of completely.
30799
30800         * enum.cs (Enum::Emit): Use the new expression reducer. Implement assigning
30801         user-defined values and other cases.
30802
30803         (IsValidEnumLiteral): Helper function.
30804
30805         * expression.cs (ExprClassfromMemberInfo): Modify to not do any literalizing 
30806         out there in the case we had a literal FieldExpr.
30807
30808         (MemberAccess:DoResolve): Do the literalizing of the FieldExpr here.
30809
30810         (Literalize): Revamp a bit to take two arguments.
30811
30812         (EnumLiteral): New class which derives from Literal to wrap enum literals.
30813
30814 2001-11-06  Ravi Pratap  <ravi@ximian.com>
30815
30816         * cs-parser.jay (compilation_unit): Remove extra opt_attributes for now.
30817
30818         * expression.cs (ArrayCreation::ValidateInitializers): Implement.
30819
30820         (Resolve): Use the above to ensure we have proper initializers.
30821
30822 2001-11-05  Ravi Pratap  <ravi@ximian.com>
30823
30824         * expression.cs (Expression::EvalConstantExpression): New method to 
30825         evaluate constant expressions.
30826
30827         * attribute.cs (Attribute::Resolve): Modify bits to use the above function.
30828
30829 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
30830
30831         * expression.cs (ArrayCreation.Emit): Some bits to initialize data
30832         in an array.
30833
30834         (Binary.ResolveOperator): Handle operator != (object a, object b)
30835         and operator == (object a, object b);
30836
30837         (Binary.DoNumericPromotions): Indicate whether the numeric
30838         promotion was possible.
30839
30840         (ArrayAccess.DoResolve, ArrayAccess.Emit, ArrayAccess.EmitAssign):
30841         Implement.  
30842
30843         Made the ArrayAccess implement interface IAssignMethod instead of
30844         IStackStore as the order in which arguments are passed reflects
30845         this.
30846
30847         * assign.cs: Instead of using expr.ExprClass to select the way of
30848         assinging, probe for the IStackStore/IAssignMethod interfaces.
30849
30850         * typemanager.cs: Load InitializeArray definition.
30851
30852         * rootcontext.cs (RootContext.MakeStaticData): Used to define
30853         static data that can be used to initialize arrays. 
30854
30855 2001-11-05  Miguel de Icaza  <miguel@ximian.com>
30856
30857         * expression.cs: Handle operator== and operator!= for booleans.
30858
30859         (Conditioal.Reduce): Implement reducer for the ?: operator.
30860
30861         (Conditional.Resolve): Implement dead code elimination.
30862
30863         (Binary.Resolve): Catch string literals and return a new
30864         concatenated string.
30865
30866         (Unary.Reduce): Implement reduction of unary expressions.
30867
30868         * ecore.cs: Split out the expression core handling here.
30869
30870         (Expression.Reduce): New method used to perform constant folding
30871         and CSE.  This is needed to support constant-expressions. 
30872
30873         * statement.cs (Statement.EmitBoolExpression): Pass true and false
30874         targets, and optimize for !x.
30875
30876 2001-11-04  Ravi Pratap  <ravi@ximian.com>
30877
30878         * attribute.cs (Attribute::Resolve): Implement guts. Note that resolution
30879         of an attribute gives us a CustomAttributeBuilder which we use accordingly to
30880         set custom atttributes.
30881
30882         * literal.cs (Literal::GetValue): New abstract method to return the actual
30883         value of the literal, cast as an object.
30884
30885         (*Literal): Implement GetValue method.
30886
30887         * cs-parser.jay (positional_argument_list, named_argument_list): Add not just plain
30888         expressions to the arraylist but objects of type Argument.
30889
30890         * class.cs (TypeContainer::Emit): Emit our attributes too.
30891
30892         (Method::Emit, Constructor::Emit): Ditto.
30893
30894         * cs-parser.jay (constructor_declaration): Set attributes too, which we seemed
30895         to be ignoring earlier.
30896
30897 2001-11-03  Ravi Pratap  <ravi@ximian.com>
30898
30899         * attribute.cs (AttributeSection::Define): Implement to do the business
30900         of constructing a CustomAttributeBuilder.
30901
30902         (Attribute): New trivial class. Increases readability of code.  
30903
30904         * cs-parser.jay : Update accordingly.
30905
30906         (positional_argument_list, named_argument_list, named_argument): New rules
30907
30908         (attribute_arguments): Use the above so that we are more correct.
30909
30910 2001-11-02  Ravi Pratap  <ravi@ximian.com>
30911
30912         * expression.cs (Invocation::IsParamsMethodApplicable): Implement
30913         to perform all checks for a method with a params parameter.
30914
30915         (Invocation::OverloadResolve): Update to use the above method and therefore
30916         cope correctly with params method invocations.
30917
30918         * support.cs (InternalParameters::ParameterDesc): Provide a desc for 
30919         params too.
30920
30921         * class.cs (ConstructorInitializer::Resolve): Make sure we look for Non-public
30922         constructors in our parent too because we can't afford to miss out on 
30923         protected ones ;-)
30924
30925         * attribute.cs (AttributeSection): New name for the class Attribute
30926
30927         Other trivial changes to improve readability.
30928
30929         * cs-parser.jay (opt_attributes, attribute_section etc.): Modify to
30930         use the new class names.
30931
30932 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30933
30934         * class.cs (Method::Define): Complete definition for params types too
30935
30936         (Indexer::Define): Ditto.
30937
30938         * support.cs (InternalParameters::ParameterType, ParameterDesc, ParameterModifier):
30939         Cope everywhere with a request for info about the array parameter.
30940
30941 2001-11-01  Ravi Pratap  <ravi@ximian.com>
30942
30943         * tree.cs (RecordNamespace): Fix up to check for the correct key.
30944
30945         * cs-parser.jay (GetQualifiedIdentifier): New Helper method used in 
30946         local_variable_type to extract the string corresponding to the type.
30947
30948         (local_variable_type): Fixup the action to use the new helper method.
30949
30950         * codegen.cs : Get rid of RefOrOutParameter, it's not the right way to 
30951         go.
30952
30953         * expression.cs : Clean out code which uses the above.
30954
30955 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30956
30957         * typemanager.cs (RegisterMethod): Check if we already have an existing key
30958         and bale out if necessary by returning a false.
30959
30960         (RegisterProperty): Ditto.
30961
30962         * class.cs (everywhere): Check the return value from TypeManager.RegisterMethod
30963         and print out appropriate error messages.
30964
30965         * interface.cs (everywhere): Ditto.
30966
30967         * cs-parser.jay (property_declaration, event_declaration, indexer_declaration): Pass
30968         location to constructor.
30969
30970         * class.cs (Property, Event, Indexer): Update accordingly.
30971
30972         * ../errors/cs111.cs : Added.
30973
30974         * expression.cs (Invocation::IsApplicable): New static method to determine applicability
30975         of a method, as laid down by the spec.
30976
30977         (Invocation::OverloadResolve): Use the above method.
30978
30979 2001-10-31  Ravi Pratap  <ravi@ximian.com>
30980
30981         * support.cs (InternalParameters): Get rid of crap taking in duplicate info. We
30982         now take a TypeContainer and a Parameters object.
30983
30984         (ParameterData): Modify return type of ParameterModifier method to be 
30985         Parameter.Modifier and not a string.
30986
30987         (ReflectionParameters, InternalParameters): Update accordingly.
30988
30989         * expression.cs (Argument::GetParameterModifier): Same here.
30990
30991         * support.cs (InternalParameters::ParameterType): Find a better way of determining
30992         if we are a ref/out parameter. Actually, the type shouldn't be holding the '&'
30993         symbol in it at all so maybe this is only for now.
30994
30995 2001-10-30  Ravi Pratap  <ravi@ximian.com>
30996
30997         * support.cs (InternalParameters): Constructor now takes an extra argument 
30998         which is the actual Parameters class.
30999
31000         (ParameterDesc): Update to provide info on ref/out modifiers.
31001
31002         * class.cs (everywhere): Update call to InternalParameters to pass in
31003         the second argument too.
31004
31005         * support.cs (ParameterData): Add ParameterModifier, which is a method 
31006         to return the modifier info [ref/out etc]
31007
31008         (InternalParameters, ReflectionParameters): Implement the above.
31009
31010         * expression.cs (Argument::ParameterModifier): Similar function to return
31011         info about the argument's modifiers.
31012
31013         (Invocation::OverloadResolve): Update to take into account matching modifiers 
31014         too.
31015
31016         * class.cs (Indexer::Define): Actually define a Parameter object and put it onto
31017         a new SetFormalParameters object which we pass to InternalParameters.
31018
31019 2001-10-30  Ravi Pratap  <ravi@ximian.com>
31020
31021         * expression.cs (NewArray): Merge into the ArrayCreation class.
31022
31023 2001-10-29  Ravi Pratap  <ravi@ximian.com>
31024
31025         * expression.cs (NewArray): Merge classes NewBuiltinArray and 
31026         NewUserdefinedArray into one as there wasn't much of a use in having
31027         two separate ones.
31028
31029         * expression.cs (Argument): Change field's name to ArgType from Type.
31030
31031         (Type): New readonly property which returns the proper type, taking into 
31032         account ref/out modifiers.
31033
31034         (everywhere): Adjust code accordingly for the above.
31035
31036         * codegen.cs (EmitContext.RefOrOutParameter): New field to determine
31037         whether we are emitting for a ref or out parameter.
31038
31039         * expression.cs (Argument::Emit): Use the above field to set the state.
31040
31041         (LocalVariableReference::Emit): Update to honour the flag and emit the
31042         right stuff.
31043
31044         * parameter.cs (Attributes): Set the correct flags for ref parameters.
31045
31046         * expression.cs (Argument::FullDesc): New function to provide a full desc.
31047
31048         * support.cs (ParameterData): Add method ParameterDesc to the interface.
31049
31050         (ReflectionParameters, InternalParameters): Implement the above method.
31051
31052         * expression.cs (Invocation::OverloadResolve): Use the new desc methods in
31053         reporting errors.
31054
31055         (Invocation::FullMethodDesc): Ditto. 
31056
31057 2001-10-29  Miguel de Icaza  <miguel@ximian.com>
31058
31059         * cs-parser.jay: Add extra production for the second form of array
31060         creation. 
31061
31062         * expression.cs (ArrayCreation): Update to reflect the above
31063         change. 
31064
31065         * Small changes to prepare for Array initialization.
31066
31067 2001-10-28  Miguel de Icaza  <miguel@ximian.com>
31068
31069         * typemanager.cs (ImplementsInterface): interface might be null;
31070         Deal with this problem;
31071
31072         Also, we do store negative hits on the cache (null values), so use
31073         this instead of calling t.GetInterfaces on the type everytime.
31074
31075 2001-10-28  Ravi Pratap  <ravi@ximian.com>
31076
31077         * typemanager.cs (IsBuiltinType): New method to help determine the same.
31078
31079         * expression.cs (New::DoResolve): Get rid of array creation code and instead
31080         split functionality out into different classes.
31081
31082         (New::FormArrayType): Move into NewBuiltinArray.
31083
31084         (Invocation::EmitArguments): Get rid of the MethodBase argument. Appears
31085         quite useless.
31086
31087         (NewBuiltinArray): New class to handle creation of built-in arrays.
31088
31089         (NewBuiltinArray::DoResolve): Implement guts of array creation. Also take into
31090         account creation of one-dimensional arrays.
31091
31092         (::Emit): Implement to use Newarr and Newobj opcodes accordingly.
31093
31094         (NewUserdefinedArray::DoResolve): Implement.
31095
31096         * cs-parser.jay (local_variable_type): Fix up to add the rank to the variable too.
31097
31098         * typemanager.cs (AddModule): Used to add a ModuleBuilder to the list of modules
31099         we maintain inside the TypeManager. This is necessary to perform lookups on the
31100         module builder.
31101
31102         (LookupType): Update to perform GetType on the module builders too.     
31103
31104         * driver.cs (Driver): Add the ModuleBuilder to the list maintained by the TypeManager.
31105
31106         * exprssion.cs (NewUserdefinedArray::Emit): Implement.
31107
31108 2001-10-23  Ravi Pratap  <ravi@ximian.com>
31109
31110         * expression.cs (New::DoResolve): Implement guts of array creation.
31111
31112         (New::FormLookupType): Rename to FormArrayType and modify ever so slightly.
31113
31114 2001-10-27  Miguel de Icaza  <miguel@ximian.com>
31115
31116         * expression.cs: Fix bug I introduced lsat night that broke
31117         Delegates. 
31118
31119         (Expression.Resolve): Report a 246 error (can not resolve name)
31120         if we find a SimpleName in the stream.
31121
31122         (Expression.ResolveLValue): Ditto.
31123
31124         (Expression.ResolveWithSimpleName): This function is a variant of
31125         ResolveName, this one allows SimpleNames to be returned without a
31126         warning.  The only consumer of SimpleNames is MemberAccess
31127
31128 2001-10-26  Miguel de Icaza  <miguel@ximian.com>
31129
31130         * expression.cs (Invocation::DoResolve): Catch SimpleNames that
31131         might arrive here.  I have my doubts that this is correct.
31132
31133         * statement.cs (Lock): Implement lock statement.
31134
31135         * cs-parser.jay: Small fixes to support `lock' and `using'
31136
31137         * cs-tokenizer.cs: Remove extra space
31138
31139         * driver.cs: New flag --checked, allows to turn on integer math
31140         checking. 
31141
31142         * typemanger.cs: Load methodinfos for Threading.Monitor.Enter and
31143         Threading.Monitor.Exit 
31144
31145 2001-10-23  Miguel de Icaza  <miguel@ximian.com>
31146
31147         * expression.cs (IndexerAccess::DoResolveLValue): Set the
31148         Expression Class to be IndexerAccess.
31149
31150         Notice that Indexer::DoResolve sets the eclass to Value.
31151
31152 2001-10-22  Miguel de Icaza  <miguel@ximian.com>
31153
31154         * class.cs (TypeContainer::Emit): Emit code for indexers.
31155
31156         * assign.cs (IAssignMethod): New interface implemented by Indexers
31157         and Properties for handling assignment.
31158
31159         (Assign::Emit): Simplify and reuse code. 
31160
31161         * expression.cs (IndexerAccess, PropertyExpr): Implement
31162         IAssignMethod, clean up old code. 
31163
31164 2001-10-22  Ravi Pratap  <ravi@ximian.com>
31165
31166         * typemanager.cs (ImplementsInterface): New method to determine if a type
31167         implements a given interface. Provides a nice cache too.
31168
31169         * expression.cs (ImplicitReferenceConversion): Update checks to use the above
31170         method.
31171
31172         (ConvertReferenceExplicit): Ditto.
31173
31174         * delegate.cs (Delegate::Populate): Update to define the parameters on the 
31175         various methods, with correct names etc.
31176
31177         * class.cs (Operator::OpType): New members Operator.UnaryPlus and 
31178         Operator.UnaryNegation.
31179
31180         * cs-parser.jay (operator_declarator): Be a little clever in the case where
31181         we have a unary plus or minus operator.
31182
31183         * expression.cs (Unary): Rename memebers of Operator enum to UnaryPlus and 
31184         UnaryMinus.
31185
31186         * everywhere : update accordingly.
31187
31188         * everywhere : Change Negate and BitComplement to LogicalNot and OnesComplement
31189         respectively.
31190
31191         * class.cs (Method::Define): For the case where we are implementing a method
31192         inherited from an interface, we need to set the MethodAttributes.Final flag too. 
31193         Also set MethodAttributes.NewSlot and MethodAttributes.HideBySig.
31194
31195 2001-10-21  Ravi Pratap  <ravi@ximian.com>
31196
31197         * interface.cs (FindMembers): Implement to work around S.R.E
31198         lameness.
31199
31200         * typemanager.cs (IsInterfaceType): Implement.
31201
31202         (FindMembers): Update to handle interface types too.
31203
31204         * expression.cs (ImplicitReferenceConversion): Re-write bits which
31205         use IsAssignableFrom as that is not correct - it doesn't work.
31206
31207         * delegate.cs (DelegateInvocation): Derive from ExpressionStatement
31208         and accordingly override EmitStatement.
31209
31210         * expression.cs (ConvertReferenceExplicit): Re-write similary, this time
31211         using the correct logic :-)
31212
31213 2001-10-19  Ravi Pratap  <ravi@ximian.com>
31214
31215         * ../errors/cs-11.cs : Add to demonstrate error -11 
31216
31217 2001-10-17  Miguel de Icaza  <miguel@ximian.com>
31218
31219         * assign.cs (Assign::Resolve): Resolve right hand side first, and
31220         then pass this as a hint to ResolveLValue.
31221
31222         * expression.cs (FieldExpr): Add Location information
31223
31224         (FieldExpr::LValueResolve): Report assignment to readonly
31225         variable. 
31226
31227         (Expression::ExprClassFromMemberInfo): Pass location information.
31228
31229         (Expression::ResolveLValue): Add new method that resolves an
31230         LValue. 
31231
31232         (Expression::DoResolveLValue): Default invocation calls
31233         DoResolve. 
31234
31235         (Indexers): New class used to keep track of indexers in a given
31236         Type. 
31237
31238         (IStackStore): Renamed from LValue, as it did not really describe
31239         what this did.  Also ResolveLValue is gone from this interface and
31240         now is part of Expression.
31241
31242         (ElementAccess): Depending on the element access type
31243
31244         * typemanager.cs: Add `indexer_name_type' as a Core type
31245         (System.Runtime.CompilerServices.IndexerNameAttribute)
31246
31247         * statement.cs (Goto): Take a location.
31248
31249 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31250
31251         * delegate.cs (Delegate::VerifyDelegate): New method to verify
31252         if two delegates are compatible.
31253
31254         (NewDelegate::DoResolve): Update to take care of the case when
31255         we instantiate a delegate from another delegate.
31256
31257         * typemanager.cs (FindMembers): Don't even try to look up members
31258         of Delegate types for now.
31259
31260 2001-10-18  Ravi Pratap  <ravi@ximian.com>
31261
31262         * delegate.cs (NewDelegate): New class to take care of delegate
31263         instantiation.
31264
31265         * expression.cs (New): Split the delegate related code out into 
31266         the NewDelegate class.
31267
31268         * delegate.cs (DelegateInvocation): New class to handle delegate 
31269         invocation.
31270
31271         * expression.cs (Invocation): Split out delegate related code into
31272         the DelegateInvocation class.
31273
31274 2001-10-17  Ravi Pratap  <ravi@ximian.com>
31275
31276         * expression.cs (New::DoResolve): Implement delegate creation fully
31277         and according to the spec.
31278
31279         (New::DoEmit): Update to handle delegates differently.
31280
31281         (Invocation::FullMethodDesc): Fix major stupid bug thanks to me
31282         because of which we were printing out arguments in reverse order !
31283
31284         * delegate.cs (VerifyMethod): Implement to check if the given method
31285         matches the delegate.
31286
31287         (FullDelegateDesc): Implement.
31288
31289         (VerifyApplicability): Implement.
31290
31291         * expression.cs (Invocation::DoResolve): Update to accordingly handle
31292         delegate invocations too.
31293
31294         (Invocation::Emit): Ditto.
31295
31296         * ../errors/cs1593.cs : Added.
31297
31298         * ../errors/cs1594.cs : Added.
31299
31300         * delegate.cs (InstanceExpression, TargetMethod): New properties.
31301
31302 2001-10-16  Ravi Pratap  <ravi@ximian.com>
31303
31304         * typemanager.cs (intptr_type): Core type for System.IntPtr
31305
31306         (InitCoreTypes): Update for the same.
31307
31308         (iasyncresult_type, asynccallback_type): Ditto.
31309
31310         * delegate.cs (Populate): Fix to use System.Intptr as it is indeed
31311         correct.
31312
31313         * typemanager.cs (AddDelegateType): Store a pointer to the Delegate class
31314         too.
31315
31316         * delegate.cs (ConstructorBuilder, InvokeBuilder, ...): New members to hold
31317         the builders for the 4 members of a delegate type :-)
31318
31319         (Populate): Define the BeginInvoke and EndInvoke methods on the delegate
31320         type.
31321
31322         * expression.cs (New::DoResolve): Implement guts for delegate creation.
31323
31324         * ../errors/errors.txt : Update for an error (-11) which only we catch :-)
31325
31326 2001-10-15  Miguel de Icaza  <miguel@ximian.com>
31327
31328         * statement.cs (Break::Emit): Implement.   
31329         (Continue::Emit): Implement.
31330
31331         (For::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31332         (While::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31333         (Do::Emit): Track old being/end loops;  Set Begin loop, ack end loop
31334         (Foreach::Emit): Track old being/end loops;  Set Begin loop, ack
31335         end loop
31336
31337         * codegen.cs (EmitContext::LoopEnd, EmitContext::LoopBegin): New
31338         properties that track the label for the current loop (begin of the
31339         loop and end of the loop).
31340
31341 2001-10-15  Ravi Pratap  <ravi@ximian.com>
31342
31343         * delegate.cs (Emit): Get rid of it as there doesn't seem to be any ostensible
31344         use of emitting anything at all.
31345
31346         * class.cs, rootcontext.cs : Get rid of calls to the same.
31347
31348         * delegate.cs (DefineDelegate): Make sure the class we define is also sealed.
31349
31350         (Populate): Define the constructor correctly and set the implementation
31351         attributes.
31352
31353         * typemanager.cs (delegate_types): New hashtable to hold delegates that
31354         have been defined.
31355
31356         (AddDelegateType): Implement.
31357
31358         (IsDelegateType): Implement helper method.
31359
31360         * delegate.cs (DefineDelegate): Use AddDelegateType instead of AddUserType.
31361
31362         * expression.cs (New::DoResolve): Check if we are trying to instantiate a delegate type
31363         and accordingly handle it.
31364
31365         * delegate.cs (Populate): Take TypeContainer argument.
31366         Implement bits to define the Invoke method. However, I still haven't figured out
31367         how to take care of the native int bit :-(
31368
31369         * cs-parser.jay (delegate_declaration): Fixed the bug that I had introduced :-) 
31370         Qualify the name of the delegate, not its return type !
31371
31372         * expression.cs (ImplicitReferenceConversion): Implement guts of implicit array
31373         conversion.
31374
31375         (StandardConversionExists): Checking for array types turns out to be recursive.
31376
31377         (ConvertReferenceExplicit): Implement array conversion.
31378
31379         (ExplicitReferenceConversionExists): New method to determine precisely that :-)
31380
31381 2001-10-12  Ravi Pratap  <ravi@ximian.com>
31382
31383         * cs-parser.jay (delegate_declaration): Store the fully qualified
31384         name as it is a type declaration.
31385
31386         * delegate.cs (ReturnType, Name): Rename members to these. Make them 
31387         readonly.
31388
31389         (DefineDelegate): Renamed from Define. Does the same thing essentially,
31390         as TypeContainer::DefineType.
31391
31392         (Populate): Method in which all the definition of the various methods (Invoke)
31393         etc is done.
31394
31395         (Emit): Emit any code, if necessary. I am not sure about this really, but let's
31396         see.
31397
31398         (CloseDelegate): Finally creates the delegate.
31399
31400         * class.cs (TypeContainer::DefineType): Update to define delegates.
31401         (Populate, Emit and CloseType): Do the same thing here too.
31402
31403         * rootcontext.cs (ResolveTree, PopulateTypes, EmitCode, CloseTypes): Include
31404         delegates in all these operations.
31405
31406 2001-10-14  Miguel de Icaza  <miguel@ximian.com>
31407
31408         * expression.cs: LocalTemporary: a new expression used to
31409         reference a temporary that has been created.
31410
31411         * assign.cs: Handle PropertyAccess back here, so that we can
31412         provide the proper semantic access to properties.
31413
31414         * expression.cs (Expression::ConvertReferenceExplicit): Implement
31415         a few more explicit conversions. 
31416
31417         * modifiers.cs: `NEW' modifier maps to HideBySig.
31418
31419         * expression.cs (PropertyExpr): Make this into an
31420         ExpressionStatement, and support the EmitStatement code path. 
31421
31422         Perform get/set error checking, clean up the interface.
31423
31424         * assign.cs: recognize PropertyExprs as targets, and if so, turn
31425         them into toplevel access objects.
31426
31427 2001-10-12  Miguel de Icaza  <miguel@ximian.com>
31428
31429         * expression.cs: PropertyExpr::PropertyExpr: use work around the
31430         SRE.
31431
31432         * typemanager.cs: Keep track here of our PropertyBuilders again to
31433         work around lameness in SRE.
31434
31435 2001-10-11  Miguel de Icaza  <miguel@ximian.com>
31436
31437         * expression.cs (LValue::LValueResolve): New method in the
31438         interface, used to perform a second resolution pass for LValues. 
31439
31440         (This::DoResolve): Catch the use of this in static methods.
31441
31442         (This::LValueResolve): Implement.
31443
31444         (This::Store): Remove warning, assigning to `this' in structures
31445         is 
31446
31447         (Invocation::Emit): Deal with invocation of
31448         methods on value types.  We need to pass the address to structure
31449         methods rather than the object itself.  (The equivalent code to
31450         emit "this" for structures leaves the entire structure on the
31451         stack instead of a pointer to it). 
31452
31453         (ParameterReference::DoResolve): Compute the real index for the
31454         argument based on whether the method takes or not a `this' pointer
31455         (ie, the method is static).
31456
31457         * codegen.cs (EmitContext::GetTemporaryStorage): Used to store
31458         value types returned from functions when we need to invoke a
31459         method on the sturcture.
31460
31461
31462 2001-10-11  Ravi Pratap  <ravi@ximian.com>
31463
31464         * class.cs (TypeContainer::DefineType): Method to actually do the business of
31465         defining the type in the Modulebuilder or Typebuilder. This is to take
31466         care of nested types which need to be defined on the TypeBuilder using
31467         DefineNestedMethod.
31468
31469         (TypeContainer::GetClassBases): Implement. Essentially the code from the 
31470         methods in RootContext, only ported to be part of TypeContainer.
31471
31472         (TypeContainer::GetInterfaceOrClass): Ditto.
31473
31474         (TypeContainer::LookupInterfaceOrClass, ::MakeFQN): Ditto.
31475
31476         * interface.cs (Interface::DefineInterface): New method. Does exactly
31477         what RootContext.CreateInterface did earlier, only it takes care of nested types 
31478         too.
31479
31480         (Interface::GetInterfaces): Move from RootContext here and port.
31481
31482         (Interface::GetInterfaceByName): Same here.
31483
31484         * rootcontext.cs (ResolveTree): Re-write.
31485
31486         (PopulateTypes): Re-write.
31487
31488         * class.cs (TypeContainer::Populate): Populate nested types too.
31489         (TypeContainer::Emit): Emit nested members too.
31490
31491         * typemanager.cs (AddUserType): Do not make use of the FullName property,
31492         instead just use the name argument passed in as it is already fully
31493         qualified.
31494
31495         (FindMembers): Check in the Builders to TypeContainer mapping instead of the name
31496         to TypeContainer mapping to see if a type is user-defined.
31497
31498         * class.cs (TypeContainer::CloseType): Implement. 
31499
31500         (TypeContainer::DefineDefaultConstructor): Use Basename, not Name while creating
31501         the default constructor.
31502
31503         (TypeContainer::Populate): Fix minor bug which led to creating default constructors
31504         twice.
31505
31506         (Constructor::IsDefault): Fix up logic to determine if it is the default constructor
31507
31508         * interface.cs (CloseType): Create the type here.
31509
31510         * rootcontext.cs (CloseTypes): Re-write to recursively close types by running through
31511         the hierarchy.
31512
31513         Remove all the methods which are now in TypeContainer.
31514
31515 2001-10-10  Ravi Pratap  <ravi@ximian.com>
31516
31517         * delegate.cs (Define): Re-write bits to define the delegate
31518         correctly.
31519
31520 2001-10-10  Miguel de Icaza  <miguel@ximian.com>
31521
31522         * makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe
31523
31524         * expression.cs (ImplicitReferenceConversion): handle null as well
31525         as a source to convert to any reference type.
31526
31527         * statement.cs (Return): Perform any implicit conversions to
31528         expected return type.  
31529
31530         Validate use of return statement.  
31531
31532         * codegen.cs (EmitContext): Pass the expected return type here.
31533
31534         * class.cs (Method, Constructor, Property): Pass expected return
31535         type to EmitContext.
31536
31537 2001-10-09  Miguel de Icaza  <miguel@ximian.com>
31538
31539         * expression.cs: Make DoResolve take an EmitContext instead of a
31540         TypeContainer.
31541
31542         Replaced `l' and `location' for `loc', for consistency.
31543
31544         (Error, Warning): Remove unneeded Tc argument.
31545
31546         * assign.cs, literal.cs, constant.cs: Update to new calling
31547         convention. 
31548
31549         * codegen.cs: EmitContext now contains a flag indicating whether
31550         code is being generated in a static method or not.
31551
31552         * cs-parser.jay: DecomposeQI, new function that replaces the old
31553         QualifiedIdentifier.  Now we always decompose the assembled
31554         strings from qualified_identifier productions into a group of
31555         memberaccesses.
31556
31557 2001-10-08  Miguel de Icaza  <miguel@ximian.com>
31558
31559         * rootcontext.cs: Deal with field-less struct types correctly now
31560         by passing the size option to Define Type.
31561
31562         * class.cs: Removed hack that created one static field. 
31563
31564 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31565
31566         * statement.cs: Moved most of the code generation here. 
31567
31568 2001-10-09  Ravi Pratap  <ravi@ximian.com>
31569
31570         * expression.cs (New::DoResolve): Revert changes for array creation, doesn't
31571         seem very right.
31572
31573         (ElementAccess): Remove useless bits for now - keep checks as the spec
31574         says.
31575
31576 2001-10-08  Ravi Pratap  <ravi@ximian.com>
31577
31578         * expression.cs (ElementAccess::DoResolve): Remove my crap code
31579         and start performing checks according to the spec.
31580
31581 2001-10-07  Ravi Pratap  <ravi@ximian.com>
31582
31583         * cs-parser.jay (type_suffix*): Remove - they are redundant. Use
31584         rank_specifiers instead.
31585
31586         (rank_specifiers): Change the order in which the rank specifiers are stored
31587
31588         (local_variable_declaration): Use opt_rank_specifier instead of type_suffixes.
31589
31590         * expression.cs (ElementAccess): Implement the LValue interface too.
31591
31592 2001-10-06  Ravi Pratap  <ravi@ximian.com>
31593
31594         * expression.cs (ConvertExplicitStandard): Add. Same as ConvertExplicit
31595         except that user defined conversions are not included.
31596
31597         (UserDefinedConversion): Update to use the ConvertExplicitStandard to 
31598         perform the conversion of the return type, if necessary.
31599
31600         (New::DoResolve): Check whether we are creating an array or an object
31601         and accordingly do the needful.
31602
31603         (New::Emit): Same here.
31604
31605         (New::DoResolve): Implement guts of array creation.
31606
31607         (New::FormLookupType): Helper function.
31608
31609 2001-10-07  Miguel de Icaza  <miguel@ximian.com>
31610
31611         * codegen.cs: Removed most of the code generation here, and move the
31612         corresponding code generation bits to the statement classes. 
31613
31614         Added support for try/catch/finalize and throw.
31615
31616         * cs-parser.jay: Added support for try/catch/finalize.
31617
31618         * class.cs: Catch static methods having the flags override,
31619         virtual or abstract.
31620
31621         * expression.cs (UserCast): This user cast was not really doing
31622         what it was supposed to do.  Which is to be born in fully resolved
31623         state.  Parts of the resolution were being performed at Emit time! 
31624
31625         Fixed this code.
31626
31627 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31628
31629         * expression.cs: Implicity convert the result from UserCast.
31630
31631 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31632
31633         * expression.cs (Expression::FindMostEncompassingType): Fix bug which
31634         prevented it from working correctly. 
31635
31636         (ConvertExplicit): Make the first try, a call to ConvertImplicitStandard, not
31637         merely ConvertImplicit.
31638
31639 2001-10-05  Miguel de Icaza  <miguel@ximian.com>
31640
31641         * typemanager.cs: Make the LookupTypeContainer function static,
31642         and not per-instance.  
31643
31644         * class.cs: Make static FindMembers (the one that takes a Type
31645         argument). 
31646
31647         * codegen.cs: Add EmitForeach here.
31648
31649         * cs-parser.jay: Make foreach a toplevel object instead of the
31650         inline expansion, as we need to perform semantic analysis on it. 
31651
31652 2001-10-05  Ravi Pratap  <ravi@ximian.com>
31653
31654         * expression.cs (Expression::ImplicitUserConversion): Rename to
31655         UserDefinedConversion.
31656
31657         (Expression::UserDefinedConversion): Take an extra argument specifying 
31658         whether we look for explicit user conversions too.
31659
31660         (Expression::ImplicitUserConversion): Make it a call to UserDefinedConversion.
31661
31662         (UserDefinedConversion): Incorporate support for user defined explicit conversions.
31663
31664         (ExplicitUserConversion): Make it a call to UserDefinedConversion
31665         with the appropriate arguments.
31666
31667         * cs-parser.jay (cast_expression): Record location too.
31668
31669         * expression.cs (Cast): Record location info.
31670
31671         (Expression::ConvertExplicit): Take location argument.
31672
31673         (UserImplicitCast): Change name to UserCast. Take an extra constructor argument
31674         to determine if we are doing explicit conversions.
31675
31676         (UserCast::Emit): Update accordingly.
31677
31678         (Expression::ConvertExplicit): Report an error if everything fails.
31679
31680         * ../errors/cs0030.cs : Add.
31681
31682 2001-10-04  Miguel de Icaza  <miguel@ximian.com>
31683
31684         * modifiers.cs: If the ABSTRACT keyword is present, also set the
31685         virtual and newslot bits. 
31686
31687         * class.cs (TypeContainer::RegisterRequiredImplementations):
31688         Record methods we need.
31689
31690         (TypeContainer::MakeKey): Helper function to make keys for
31691         MethodBases, since the Methodbase key is useless.
31692
31693         (TypeContainer::Populate): Call RegisterRequiredImplementations
31694         before defining the methods.   
31695
31696         Create a mapping for method_builders_to_methods ahead of time
31697         instead of inside a tight loop.
31698
31699         (::RequireMethods):  Accept an object as the data to set into the
31700         hashtable so we can report interface vs abstract method mismatch.
31701
31702 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31703
31704         * report.cs: Make all of it static.
31705
31706         * rootcontext.cs: Drop object_type and value_type computations, as
31707         we have those in the TypeManager anyways.
31708
31709         Drop report instance variable too, now it is a global.
31710
31711         * driver.cs: Use try/catch on command line handling.
31712
31713         Add --probe option to debug the error reporting system with a test
31714         suite. 
31715
31716         * report.cs: Add support for exiting program when a probe
31717         condition is reached.
31718
31719 2001-10-03  Ravi Pratap  <ravi@ximian.com>
31720
31721         * expression.cs (Binary::DoNumericPromotions): Fix the case when
31722         we do a forcible conversion regardless of type, to check if 
31723         ForceConversion returns a null.
31724
31725         (Binary::error19): Use location to report error.
31726
31727         (Unary::error23): Use location here too.
31728
31729         * ../errors/cs0019.cs : Check in.
31730
31731         * ../errors/cs0023.cs : Check in.
31732
31733         * expression.cs (Expression.MemberLookup): Return null for a rather esoteric
31734         case of a non-null MethodInfo object with a length of 0 !
31735
31736         (Binary::ResolveOperator): Flag error if overload resolution fails to find
31737         an applicable member - according to the spec :-)
31738         Also fix logic to find members in base types.
31739
31740         (Unary::ResolveOperator): Same here.
31741
31742         (Unary::report23): Change name to error23 and make first argument a TypeContainer
31743         as I was getting thoroughly confused between this and error19 :-)
31744
31745         * expression.cs (Expression::ImplicitUserConversion): Re-write fully
31746         (::FindMostEncompassedType): Implement.
31747         (::FindMostEncompassingType): Implement.
31748         (::StandardConversionExists): Implement.
31749
31750         (UserImplicitCast): Re-vamp. We now need info about most specific
31751         source and target types so that we can do the necessary conversions.
31752
31753         (Invocation::MakeUnionSet): Completely re-write to make sure we form a proper
31754         mathematical union with no duplicates.
31755
31756 2001-10-03  Miguel de Icaza  <miguel@ximian.com>
31757
31758         * rootcontext.cs (RootContext::PopulateTypes): Populate containers
31759         in order from base classes to child classes, so that we can in
31760         child classes look up in our parent for method names and
31761         attributes (required for handling abstract, virtual, new, override
31762         constructs: we need to instrospect our base class, and if we dont
31763         populate the classes in order, the introspection might be
31764         incorrect.  For example, a method could query its parent before
31765         the parent has any methods and would determine that the parent has
31766         no abstract methods (while it could have had them)).
31767
31768         (RootContext::CreateType): Record the order in which we define the
31769         classes.
31770
31771 2001-10-02  Miguel de Icaza  <miguel@ximian.com>
31772
31773         * class.cs (TypeContainer::Populate): Also method definitions can
31774         fail now, keep track of this.
31775
31776         (TypeContainer::FindMembers): Implement support for
31777         DeclaredOnly/noDeclaredOnly flag.
31778
31779         (Constructor::Emit) Return the ConstructorBuilder.
31780
31781         (Method::Emit) Return the MethodBuilder. 
31782         Check for abstract or virtual methods to be public.
31783
31784         * rootcontext.cs (RootContext::CreateType): Register all the
31785         abstract methods required for the class to be complete and the
31786         interface methods that must be implemented. 
31787
31788         * cs-parser.jay: Report error 501 (method requires body if it is
31789         not marked abstract or extern).
31790
31791         * expression.cs (TypeOf::Emit): Implement.
31792
31793         * typemanager.cs: runtime_handle_type, new global type.
31794
31795         * class.cs (Property::Emit): Generate code for properties.
31796
31797 2001-10-02  Ravi Pratap  <ravi@ximian.com>
31798
31799         * expression.cs (Unary::ResolveOperator): Find operators on base type
31800         too - we now conform exactly to the spec.
31801
31802         (Binary::ResolveOperator): Same here.
31803
31804         * class.cs (Operator::Define): Fix minor quirk in the tests.
31805
31806         * ../errors/cs0215.cs : Added.
31807
31808         * ../errors/cs0556.cs : Added.
31809
31810         * ../errors/cs0555.cs : Added.
31811
31812 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31813
31814         * cs-tokenizer.cs: Reimplemented Location to be a struct with a
31815         single integer which is really efficient
31816
31817 2001-10-01  Ravi Pratap  <ravi@ximian.com>
31818
31819         *  expression.cs (Expression::ImplicitUserConversion): Use location
31820         even in the case when we are examining True operators.
31821  
31822         * class.cs (Operator::Define): Perform extensive checks to conform
31823         with the rules for operator overloading in the spec.
31824
31825         * expression.cs (Expression::ImplicitReferenceConversion): Implement
31826         some of the other conversions mentioned in the spec.
31827
31828         * typemanager.cs (array_type): New static member for the System.Array built-in
31829         type.
31830
31831         (cloneable_interface): For System.ICloneable interface.
31832
31833         * driver.cs (Driver::Driver): Initialize TypeManager's core types even before
31834         we start resolving the tree and populating types.
31835
31836         * ../errors/errors.txt : Update for error numbers -7, -8, -9, -10
31837  
31838 2001-10-01  Miguel de Icaza  <miguel@ximian.com>
31839
31840         * expression.cs (Expression::ExprClassFromMemberInfo,
31841         Expression::Literalize): Create literal expressions from
31842         FieldInfos which are literals.
31843
31844         (ConvertNumericExplicit, ImplicitNumericConversion): Fix a few
31845         type casts, because they were wrong.  The test suite in tests
31846         caught these ones.
31847
31848         (ImplicitNumericConversion): ushort to ulong requires a widening
31849         cast. 
31850
31851         Int32 constant to long requires widening cast as well.
31852
31853         * literal.cs (LongLiteral::EmitLong): Do not generate i4 constants
31854         for integers because the type on the stack is not i4.
31855
31856 2001-09-30  Miguel de Icaza  <miguel@ximian.com>
31857
31858         * expression.cs (report118): require location argument. 
31859
31860         * parameter.cs: Do not dereference potential null value.
31861
31862         * class.cs: Catch methods that lack the `new' keyword when
31863         overriding a name.  Report warnings when `new' is used without
31864         anything being there to override.
31865
31866         * modifiers.cs: Handle `NEW' as MethodAttributes.NewSlot.
31867
31868         * class.cs: Only add constructor to hashtable if it is non-null
31869         (as now constructors can fail on define).
31870
31871         (TypeManager, Class, Struct): Take location arguments.
31872
31873         Catch field instance initialization in structs as errors.
31874
31875         accepting_filter: a new filter for FindMembers that is static so
31876         that we dont create an instance per invocation.
31877
31878         (Constructor::Define): Catch errors where a struct constructor is
31879         parameterless 
31880
31881         * cs-parser.jay: Pass location information for various new
31882         constructs. 
31883
31884         * delegate.cs (Delegate): take a location argument.
31885
31886         * driver.cs: Do not call EmitCode if there were problesm in the
31887         Definition of the types, as many Builders wont be there. 
31888
31889         * decl.cs (Decl::Decl): Require a location argument.
31890
31891         * cs-tokenizer.cs: Handle properly hex constants that can not fit
31892         into integers, and find the most appropiate integer for it.
31893
31894         * literal.cs: Implement ULongLiteral.
31895
31896         * rootcontext.cs: Provide better information about the location of
31897         failure when CreateType fails.
31898
31899 2001-09-29  Miguel de Icaza  <miguel@ximian.com>
31900
31901         * rootcontext.cs (RootContext::PopulateTypes): Populates structs
31902         as well.
31903
31904         * expression.cs (Binary::CheckShiftArguments): Add missing type
31905         computation.
31906         (Binary::ResolveOperator): Add type to the logical and and logical
31907         or, Bitwise And/Or and Exclusive Or code paths, it was missing
31908         before.
31909
31910         (Binary::DoNumericPromotions): In the case where either argument
31911         is ulong (and most signed types combined with ulong cause an
31912         error) perform implicit integer constant conversions as well.
31913
31914 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31915
31916         * expression.cs (UserImplicitCast): Method should always be
31917         non-null. 
31918         (Invocation::BetterConversion): Simplified test for IntLiteral.
31919
31920         (Expression::ImplicitNumericConversion): Split this routine out.
31921         Put the code that performs implicit constant integer conversions
31922         here. 
31923
31924         (Expression::Resolve): Become a wrapper around DoResolve so we can
31925         check eclass and type being set after resolve.
31926
31927         (Invocation::Badness): Remove this dead function
31928
31929         (Binary::ResolveOperator): Do not compute the expensive argumnets
31930         unless we have a union for it.
31931
31932         (Probe::Emit): Is needs to do an isinst and then
31933         compare against null.
31934
31935         (::CanConvert): Added Location argument.  If the Location argument
31936         is null (Location.Null), then we do not report errors.  This is
31937         used by the `probe' mechanism of the Explicit conversion.  We do
31938         not want to generate an error for something that the user
31939         explicitly requested to be casted.  But the pipeline for an
31940         explicit cast first tests for potential implicit casts.
31941
31942         So for now, if the Location is null, it means `Probe only' to
31943         avoid adding another argument.   Might have to revise this
31944         strategy later.
31945
31946         (ClassCast): New class used to type cast objects into arbitrary
31947         classes (used in Explicit Reference Conversions).
31948
31949         Implement `as' as well.
31950
31951         Reverted all the patches from Ravi below: they were broken:
31952
31953                 * The use of `level' as a mechanism to stop recursive
31954                   invocations is wrong.  That was there just to catch the
31955                   bug with a strack trace but not as a way of addressing
31956                   the problem.
31957
31958                   To fix the problem we have to *understand* what is going
31959                   on and the interactions and come up with a plan, not
31960                   just get things going.
31961
31962                 * The use of the type conversion cache that I proposed
31963                   last night had an open topic: How does this work across
31964                   protection domains.  A user defined conversion might not
31965                   be public in the location where we are applying the
31966                   conversion, a different conversion might be selected
31967                   (ie, private A->B (better) but public B->A (worse),
31968                   inside A, A->B applies, but outside it, B->A will
31969                   apply).
31970
31971                 * On top of that (ie, even if the above is solved),
31972                   conversions in a cache need to be abstract.  Ie, `To
31973                   convert from an Int to a Short use an OpcodeCast', not
31974                   `To convert from an Int to a Short use the OpcodeCast on
31975                   the variable 5' (which is what this patch was doing).
31976
31977 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31978
31979         * expression.cs (Invocation::ConversionExists): Re-write to use
31980         the conversion cache
31981
31982         (Expression::ConvertImplicit): Automatic bailing out if level != 0. Also
31983         cache all conversions done, not just user-defined ones.
31984
31985         (Invocation::BetterConversion): The real culprit. Use ConversionExists
31986         to determine if a conversion exists instead of acutually trying to 
31987         perform the conversion. It's faster too.
31988
31989         (Expression::ConvertExplicit): Modify to use ConversionExists to check
31990         and only then attempt the implicit conversion.
31991
31992 2001-09-28  Ravi Pratap  <ravi@ximian.com>
31993
31994         * expression.cs (ConvertImplicit): Use a cache for conversions
31995         already found. Check level of recursion and bail out if necessary.
31996
31997 2001-09-28  Miguel de Icaza  <miguel@ximian.com>
31998
31999         * typemanager.cs (string_concat_string_string, string_concat_object_object):
32000         Export standard methods that we expect for string operations.
32001
32002         * statement.cs (Block::UsageWarning): Track usage of variables and
32003         report the errors for not used variables.
32004
32005         * expression.cs (Conditional::Resolve, ::Emit): Implement ?:
32006         operator. 
32007
32008 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32009
32010         * codegen.cs: remove unnneded code 
32011
32012         * expression.cs: Removed BuiltinTypeAccess class
32013
32014         Fix the order in which implicit conversions are
32015         done.  
32016
32017         The previous fixed dropped support for boxed conversions (adding a
32018         test to the test suite now)
32019
32020         (UserImplicitCast::CanConvert): Remove test for source being null,
32021         that code is broken.  We should not feed a null to begin with, if
32022         we do, then we should track the bug where the problem originates
32023         and not try to cover it up here.
32024
32025         Return a resolved expression of type UserImplicitCast on success
32026         rather than true/false.  Ravi: this is what I was talking about,
32027         the pattern is to use a static method as a "constructor" for
32028         objects. 
32029
32030         Also, do not create arguments until the very last minute,
32031         otherwise we always create the arguments even for lookups that
32032         will never be performed. 
32033
32034         (UserImplicitCast::Resolve): Eliminate, objects of type
32035         UserImplicitCast are born in a fully resolved state. 
32036
32037         * typemanager.cs (InitCoreTypes): Init also value_type
32038         (System.ValueType). 
32039
32040         * expression.cs (Cast::Resolve): First resolve the child expression.
32041
32042         (LValue): Add new method AddressOf to be used by
32043         the `&' operator.  
32044
32045         Change the argument of Store to take an EmitContext instead of an
32046         ILGenerator, because things like FieldExpr need to be able to call
32047         their children expression to generate the instance code. 
32048
32049         (Expression::Error, Expression::Warning): Sugar functions for
32050         reporting errors.
32051
32052         (Expression::MemberLookup): Accept a TypeContainer instead of a
32053         Report as the first argument.
32054
32055         (Expression::ResolvePrimary): Killed.  I still want to improve
32056         this as currently the code is just not right.
32057
32058         (Expression::ResolveMemberAccess): Simplify, but it is still
32059         wrong. 
32060
32061         (Unary::Resolve): Catch errors in AddressOf operators.
32062
32063         (LocalVariableReference::Emit, ::Store, ::AddressOf): typecast
32064         index to a byte for the short-version, or the compiler will choose
32065         the wrong Emit call, which generates the wrong data.
32066
32067         (ParameterReference::Emit, ::Store): same.
32068
32069         (FieldExpr::AddressOf): Implement.
32070
32071         * typemanager.cs: TypeManager: made public variable instead of
32072         property.
32073
32074         * driver.cs: document --fatal.
32075
32076         * report.cs (ErrorMessage, WarningMessage): new names for the old
32077         Error and Warning classes.
32078
32079         * cs-parser.jay (member_access): Turn built-in access to types
32080         into a normal simplename
32081
32082 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32083
32084         * expression.cs (Invocation::BetterConversion): Fix to cope
32085         with q being null, since this was introducing a bug.
32086
32087         * expression.cs (ConvertImplicit): Do built-in conversions first.
32088
32089 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32090
32091         * expression.cs (UserImplicitCast::Resolve): Fix bug.
32092
32093 2001-09-27  Ravi Pratap  <ravi@ximian.com>
32094
32095         * class.cs (TypeContainer::AddConstructor): Fix a stupid bug
32096         I had introduced long ago (what's new ?).
32097
32098         * expression.cs (UserImplicitCast::CanConvert): Static method to do 
32099         the work of all the checking. 
32100         (ConvertImplicit): Call CanConvert and only then create object if necessary.
32101         (UserImplicitCast::CanConvert, ::Resolve): Re-write.
32102
32103         (Unary::Operator): Rename Add and Subtract to Addition and Subtraction because
32104         that is the right way. 
32105
32106         (Invocation::MakeUnionSet): Convenience function to make unions of sets for 
32107         overloading resolution. Use everywhere instead of cutting and pasting code.
32108
32109         (Binary::ResolveOperator): Use MakeUnionSet.
32110
32111         (UserImplicitCast::CanConvert, ::Resolve): Update to take care of the case when 
32112         we have to convert to bool types. Not complete yet.
32113
32114 2001-09-27  Miguel de Icaza  <miguel@ximian.com>
32115
32116         * typemanager.cs (TypeManager::CSharpName): support ushort.
32117
32118         * expression.cs (Expression::TryImplicitIntConversion): Attempts
32119         to provide an expression that performsn an implicit constant int
32120         conversion (section 6.1.6).
32121         (Expression::ConvertImplicitRequired): Reworked to include
32122         implicit constant expression conversions.
32123
32124         (Expression::ConvertNumericExplicit): Finished.
32125
32126         (Invocation::Emit): If InstanceExpression is null, then it means
32127         that we perform a call on this.
32128
32129 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32130
32131         * expression.cs (Unary::Emit): Remove some dead code.
32132         (Probe): Implement Resolve and Emit for `is'.
32133         (Expression::ConvertImplicitRequired): Attempt to do constant
32134         expression conversions here.  Maybe should be moved to
32135         ConvertImplicit, but I am not sure.
32136         (Expression::ImplicitLongConstantConversionPossible,
32137         Expression::ImplicitIntConstantConversionPossible): New functions
32138         that tell whether is it possible to apply an implicit constant
32139         expression conversion.
32140
32141         (ConvertNumericExplicit): Started work on explicit numeric
32142         conversions.
32143
32144         * cs-parser.jay: Update operator constants.
32145
32146         * parameter.cs (Parameters::GetParameterInfo): Hook up VerifyArgs
32147         (Parameters::GetSignature): Hook up VerifyArgs here.
32148         (Parameters::VerifyArgs): Verifies that no two arguments have the
32149         same name. 
32150
32151         * class.cs (Operator): Update the operator names to reflect the
32152         ones that the spec expects (as we are just stringizing the
32153         operator names).
32154
32155         * expression.cs (Unary::ResolveOperator): Fix bug: Use
32156         MethodInfo's ReturnType instead of LookupMethodByBuilder as the
32157         previous usage did only work for our methods.
32158         (Expression::ConvertImplicit): Handle decimal implicit numeric
32159         conversions as well.
32160         (Expression::InternalTypeConstructor): Used to invoke constructors
32161         on internal types for default promotions.
32162
32163         (Unary::Emit): Implement special handling for the pre/post
32164         increment/decrement for overloaded operators, as they need to have
32165         the same semantics as the other operators.
32166
32167         (Binary::ResolveOperator): ditto.
32168         (Invocation::ConversionExists): ditto.
32169         (UserImplicitCast::Resolve): ditto.
32170
32171 2001-09-26  Ravi Pratap  <ravi@ximian.com>
32172
32173         * expression.cs (Unary::Emit and Binary::Emit): If we have an overloaded
32174         operator, return after emitting body. Regression tests pass again !
32175
32176         * expression.cs (ConvertImplicit): Take TypeContainer as first argument
32177         (Unary::ForceConversion, Binary::ForceConversion): Ditto.
32178         (Invocation::OverloadResolve): Ditto.
32179         (Invocation::BetterFunction, BetterConversion, ConversionExists): Ditto.
32180
32181         * everywhere : update calls to the above methods accordingly.
32182
32183 2001-09-26  Miguel de Icaza  <miguel@ximian.com>
32184
32185         * assign.cs (Assign): Make it inherit from ExpressionStatement.
32186
32187         * expression.cs (ExpressionStatement): New base class used for
32188         expressions that can appear in statements, so that we can provide
32189         an alternate path to generate expression that do not leave a value
32190         on the stack.
32191
32192         (Expression::Emit, and all the derivatives): We no longer return
32193         whether a value is left on the stack or not.  Every expression
32194         after being emitted leaves a single value on the stack.
32195
32196         * codegen.cs (EmitContext::EmitStatementExpression): Use the
32197         facilties of ExpressionStatement if possible.
32198
32199         * cs-parser.jay: Update statement_expression.
32200
32201 2001-09-25  Miguel de Icaza  <miguel@ximian.com>
32202
32203         * driver.cs: Change the wording of message
32204
32205 2001-09-25  Ravi Pratap  <ravi@ximian.com>
32206
32207         * expression.cs (Binary::ResolveOperator): Had forgottten to set 
32208         the type of the expression to the return type of the method if
32209         we have an overloaded operator match ! The regression tests pass again !
32210         (Unary::ResolveOperator): Ditto.
32211
32212         * expression.cs (Invocation::ConversionExists): Correct the member lookup
32213         to find "op_Implicit", not "implicit" ;-)
32214         (UserImplicitCast): New class to take care of user-defined implicit conversions.
32215         (ConvertImplicit, ForceConversion): Take TypeContainer argument
32216
32217         * everywhere : Correct calls to the above accordingly.
32218
32219         * expression.cs (UserImplicitCast::Resolve, ::Emit): Implement.
32220         (ConvertImplicit): Do user-defined conversion if it exists.
32221
32222 2001-09-24  Miguel de Icaza  <miguel@ximian.com>
32223
32224         * assign.cs: track location.
32225         (Resolve): Use implicit conversions on assignment.
32226
32227         * literal.cs: Oops.  Not good, Emit of short access values should
32228         pass (Bytes) or the wrong argument will be selected.
32229
32230         * expression.cs (Unary::Emit): Emit code for -expr.
32231
32232         (Unary::ResolveOperator): Handle `Substract' for non-constants
32233         (substract from zero from the non-constants).
32234         Deal with Doubles as well. 
32235
32236         (Expression::ConvertImplicitRequired): New routine that reports an
32237         error if no implicit conversion exists. 
32238
32239         (Invocation::OverloadResolve): Store the converted implicit
32240         expressions if we make them
32241
32242 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32243
32244         * class.cs (ConstructorInitializer): Take a Location argument.
32245         (ConstructorBaseInitializer): Same here.
32246         (ConstructorThisInitializer): Same here.
32247
32248         * cs-parser.jay : Update all calls accordingly.
32249
32250         * expression.cs (Unary, Binary, New): Take location argument.
32251         Update accordingly everywhere.
32252
32253         * cs-parser.jay : Update all calls to the above to take a location
32254         argument.
32255
32256         * class.cs : Ditto.
32257
32258 2001-09-24  Ravi Pratap  <ravi@ximian.com>
32259
32260         * expression.cs (Invocation::BetterFunction): Take TypeContainer argument
32261         (Invocation::BetterConversion): Same here
32262         (Invocation::ConversionExists): Ditto.
32263
32264         (Invocation::ConversionExists): Implement.
32265
32266 2001-09-22  Ravi Pratap  <ravi@ximian.com>
32267
32268         * expression.cs (OverloadResolve): Improve some more to catch errors 1502 and 1503
32269         Also take an additional TypeContainer argument.
32270
32271         * All over : Pass in TypeContainer as argument to OverloadResolve.
32272
32273         * typemanager.cs (CSharpName): Update to check for the string type and return
32274         that too.
32275
32276         * expression.cs (Invocation::FullMethodDesc): New static method to return a string fully describing
32277         a given method.
32278
32279 2001-09-21  Ravi Pratap  <ravi@ximian.com>
32280
32281         * expression.cs (Invocation::OverloadResolve): Re-write to conform more to the spec.
32282         (Invocation::BetterFunction): Implement.
32283         (Invocation::BetterConversion): Implement.
32284         (Invocation::ConversionExists): Skeleton, no implementation yet.
32285
32286         Okay, things work fine !
32287
32288 2001-09-21  Miguel de Icaza  <miguel@ximian.com>
32289
32290         * typemanager.cs: declare and load enum_type, delegate_type and
32291         void_type. 
32292
32293         * expression.cs (Expression::Emit): Now emit returns a value that
32294         tells whether a value is left on the stack or not.  This strategy
32295         might be reveted tomorrow with a mechanism that would address
32296         multiple assignments.
32297         (Expression::report118): Utility routine to report mismatches on
32298         the ExprClass.
32299
32300         (Unary::Report23): Report impossible type/operator combination
32301         utility function.
32302
32303         (Unary::IsIncrementableNumber): Whether the type can be
32304         incremented or decremented with add.
32305         (Unary::ResolveOperator): Also allow enumerations to be bitwise
32306         complemented. 
32307         (Unary::ResolveOperator): Implement ++, !, ~,
32308
32309         (Invocation::Emit): Deal with new Emit convetion.
32310
32311         * All Expression derivatives: Updated their Emit method to return
32312         whether they leave values on the stack or not.
32313
32314         * codegen.cs (CodeGen::EmitStatement): Pop values left on the
32315         stack for expressions that are statements. 
32316
32317 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32318
32319         * expression.cs (LValue): New interface.  Must be implemented by
32320         LValue objects.
32321         (LocalVariableReference, ParameterReference, FieldExpr): Implement
32322         LValue interface.
32323
32324         * assign.cs (Assign::Emit, Assign::Resolve): Use new LValue
32325         interface for generating code, simplifies the code.
32326
32327 2001-09-20  Ravi Pratap  <ravi@ximian.com>
32328
32329         * expression.cs (everywhere): Comment out return statements in ::Resolve
32330         methods to avoid the warnings.
32331
32332 2001-09-20  Miguel de Icaza  <miguel@ximian.com>
32333
32334         * driver.cs (parse): Report error 2001 if we can not open the
32335         source file.
32336
32337         * expression.cs (SimpleName::ResolveSimpleName): Error if we can
32338         not resolve it.
32339
32340         * cs-parser.jay (QualifierIdentifier): Pass location to SimpleName
32341         object. 
32342
32343         * statement.cs (Block::EmitMeta): Reuse the count across all the variables,
32344         otherwise nested blocks end up with the same index.
32345
32346         * codegen.cs (CodeGen::EmitTopBlock): Pass initial sequence
32347
32348         * expression.cs:  Instead of having FIXMEs in the Resolve
32349         functions, throw exceptions so it is obvious that we are facing a
32350         bug. 
32351
32352         * cs-parser.jay (invocation_expression): Pass Location information.
32353
32354         * codegen.cs (CodeGen::Save, CodeGen::CodeGen, CodeGen::Basename):
32355         Use a basename for those routines because .NET does not like paths
32356         on them. 
32357
32358         * class.cs (TypeContainer::AddMethod): Do not call DefineName if the name was
32359         already defined.
32360
32361 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
32362
32363         * typemanager.cs (TypeManager::CoreLookupType): A function to make sure that we
32364         are loading the correct data types (throws an exception if not).
32365         (TypeManager::InitCoreTypes): Use CoreLookupType
32366
32367         * expression.cs (Unary::ResolveOperator): return the child
32368         expression for expressions which are just +expr.
32369         (Unary::ResolveOperator): Return negative literals for -LITERAL
32370         expressions (otherwise they are Unary {Literal}).
32371         (Invocation::Badness): Take into account `Implicit constant
32372         expression conversions'.
32373
32374         * literal.cs (LongLiteral): Implement long literal class.
32375         (IntLiteral): export the `Value' of the intliteral. 
32376
32377 2001-09-19  Ravi Pratap  <ravi@ximian.com>
32378
32379         * expression.cs (Binary::Emit): Finally get the emission right ! Woo!
32380
32381         * class.cs (Operator::Define): Change the methodname prefix to 'op_' 
32382         instead of 'Operator'
32383
32384         * expression.cs (Binary::ResolveOperator): Update accordingly.
32385         (Unary::Operator): Change names to 'Add' and 'Subtract' instead 'Plus'
32386         and 'Minus'
32387
32388         * cs-parser.jay (unary_expression): Update to use the new names.
32389
32390         * gen-treedump.cs (GetUnary): Same here.
32391
32392         * expression.cs (Unary::Resolve): Implement.
32393         (Binary::ResolveOperator): Re-write bits to quietly continue if no overloaded 
32394         operators are found instead of making noise ;-)
32395         (Unary::ResolveOperator): New method to do precisely the same thing which
32396         Binary::ResolveOperator does for Binary expressions.
32397         (Unary.method, .Arguments): Add.
32398         (Unary::OperName): Implement.   
32399         (Unary::ForceConversion): Copy and Paste !
32400
32401         * class.cs (Operator::Define): Fix a small bug for the case when we have 
32402         a unary operator.
32403
32404         * expression.cs (Unary::Emit): Implement. Need to find the right Opcodes
32405         for the inbuilt operators. Only overloading works for now ;-)
32406
32407 2001-09-18  Miguel de Icaza  <miguel@ximian.com>
32408
32409         * expression.cs (CheckedExpr::Resolve, CheckedExpr::Emit,
32410         UnCheckedExpr::Resolve, UnCheckedExpr::Emit): Implement.
32411
32412         * expression.cs (This::Emit): Implement. 
32413         (This::Resolve): Implement.
32414         (TypeOf:Resolve): Implement.
32415         (Expression::ResolveSimpleName): Add an implicit this to instance
32416         field references. 
32417         (MemberAccess::Resolve): Deal with Parameters and Fields. 
32418         Bind instance variable to Field expressions.
32419         (FieldExpr::Instance): New field used to track the expression that
32420         represents the object instance.
32421         (FieldExpr::Resolve): Track potential errors from MemberLookup not
32422         binding 
32423         (FieldExpr::Emit): Implement.
32424
32425         * codegen.cs (EmitIf, EmitStatement, EmitBlock): Propagate whether
32426         the last instruction contains a return opcode to avoid generating
32427         the last `ret' instruction (this generates correct code, and it is
32428         nice to pass the peverify output).
32429
32430         * class.cs (TypeContainer::EmitFieldInitializers): Implement field
32431         initializer for static and instance variables.
32432         (Constructor::Emit): Allow initializer to be null in the case of
32433         static constructors.  Only emit initializer for instance
32434         constructors. 
32435
32436         (TypeContainer::FindMembers): Return a null array if there are no
32437         matches.
32438
32439         Also fix the code for the MemberTypes.Method branch, as it was not
32440         scanning that for operators (or tried to access null variables before).
32441
32442         * assign.cs (Assign::Emit): Handle instance and static fields. 
32443
32444         * TODO: Updated.
32445
32446         * driver.cs: Stop compilation if there are parse errors.
32447
32448         * cs-parser.jay (constructor_declaration): Provide default base
32449         initializer for non-static constructors.
32450         (constructor_declarator): Do not provide a default base
32451         initializers if none was specified.
32452         Catch the fact that constructors should not have parameters.
32453
32454         * class.cs: Do not emit parent class initializers for static
32455         constructors, that should be flagged as an error.
32456
32457 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32458
32459         * class.cs (RegisterMethodBuilder): Remove : it's unnecessary.
32460         Move back code into TypeContainer::Populate.
32461
32462 2001-09-18  Ravi Pratap  <ravi@ximian.com>
32463
32464         * class.cs (TypeContainer::AddConstructor): Fix the check to
32465         compare against Name, not Basename. 
32466         (Operator::OpType): Change Plus and Minus to Add and Subtract.
32467
32468         * cs-parser.jay : Update accordingly.
32469
32470         * class.cs (TypeContainer::FindMembers): For the case where we are searching
32471         for methods, don't forget to look into the operators too.
32472         (RegisterMethodBuilder): Helper method to take care of this for
32473         methods, constructors and operators.
32474         (Operator::Define): Completely revamp.
32475         (Operator.OperatorMethod, MethodName): New fields.
32476         (TypeContainer::Populate): Move the registering of builders into
32477         RegisterMethodBuilder.
32478         (Operator::Emit): Re-write.
32479
32480         * expression.cs (Binary::Emit): Comment out code path to emit method
32481         invocation stuff for the case when we have a user defined operator. I am
32482         just not able to get it right !
32483
32484 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32485
32486         * expression.cs (Expression::OverloadResolve): Drop TypeContainer
32487         argument. 
32488
32489         (Expression::MemberLookup): Provide a version that allows to
32490         specify the MemberTypes and BindingFlags. 
32491
32492         * statement.cs (Block::GetVariableInfo): Forgot to recurse here,
32493         so it was not fetching variable information from outer blocks.
32494
32495         * modifiers.cs: (Modifiers::TypeAttr): Invert condition on
32496         Beforefieldinit as it was buggy.
32497
32498         * rootcontext.cs (::LookupInterfaceOrClass): Removed an Error -200
32499         that Ravi put here.  
32500
32501         * class.cs (Constructor::Emit): Only emit if block is not null.
32502         (TypeContainer::EmitDefaultConstructor): Removed routine, now we
32503         deal with this by semantically definining it as if the user had
32504         done it.
32505
32506         (TypeContainer::FindMembers): Removed ad-hoc hack to deal with
32507         constructors as we now "emit" them at a higher level.
32508
32509         (TypeContainer::DefineDefaultConstructor): Used to define the
32510         default constructors if none was provided.
32511
32512         (ConstructorInitializer): Add methods Resolve and Emit. 
32513
32514         * expression.cs: Cast to ConstructorInfo instead of MethodInfo
32515
32516 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32517
32518         * class.cs (TypeContainer::EmitDefaultConstructor): Register
32519         the default constructor builder with our hashtable for methodbuilders
32520         to methodcores.
32521
32522         * expression.cs (Invocation::OverloadResolve): Add a check for pd == null
32523         and argument_count is 0 in which case we have a match.
32524         (Binary::ResolveOperator): More null checking and miscellaneous coding
32525         style cleanup.
32526
32527 2001-09-17  Ravi Pratap  <ravi@ximian.com>
32528
32529         * rootcontext.cs (IsNameSpace): Compare against null.
32530
32531         * everywhere : Correct spelling to 'Greater' and to 'Subtract'
32532
32533         * class.cs (Operator::OpType): Change names to match the ones in Binary::Operator
32534         and Unary::Operator.
32535
32536         * cs-parser.jay (operator_declaration, CheckBinaryOperator, CheckUnaryOperator): Update
32537         accordingly.
32538
32539         * expression.cs (Binary::method): New member to hold the MethodBase for the case when
32540         we have overloaded operators.
32541         (Binary::ResolveOperator): Implement the part which does the operator overload
32542         resolution.
32543
32544         * class.cs (Operator::Emit): Implement.
32545         (TypeContainer::Emit): Emit the operators we have too.
32546
32547         * expression.cs (Binary::Emit): Update to emit the appropriate code for
32548         the case when we have a user-defined operator.
32549
32550 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
32551
32552         * rootcontext.cs: Fix bug: tree.Namespaces might be null.
32553
32554 2001-09-16  Ravi Pratap  <ravi@ximian.com>
32555
32556         * class.cs (EmitStaticFieldInitializers, EmitFieldInitializers): Make public.
32557         (TypeContainer::EmitConstructor): Remove and move code into Contructor::Emit.
32558         (Constructor::Emit): Implement.
32559         (EmitStaticFieldInitializers, EmitFieldInitializers): Ensure we return immediately
32560         if we have no work to do. 
32561         (TypeContainer::Emit): Pass in TypeContainer as argument to the constructor's 
32562         Emit method.
32563
32564         * interface.cs (Interface::InterfaceAttr): Re-write to be more correct and complete.
32565         (Interface::IsTopLevel): Add. Same as TypeContainer::IsTopLevel.
32566
32567         * class.cs (TypeContainer::IsTopLevel): Modify to use parent.Parent instead
32568         of parent.parent.
32569
32570 2001-09-15  Ravi Pratap  <ravi@ximian.com>
32571
32572         * tree.cs (Tree::namespaces): New hashtable to keep track of namespaces
32573         in the source.
32574         (Tree::RecordNamespace): Method to do what the name says ;-)
32575         (Tree::Namespaces): Property to get at the namespaces hashtable.
32576
32577         * cs-parser.jay (namespace_declaration): Call RecordNamespace to 
32578         keep track.
32579
32580         * rootcontext.cs (IsNamespace): Fixed it :-)
32581
32582 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32583
32584         * class.cs (TypeContainer::FindMembers): Add support for
32585         constructors. 
32586         (MethodCore): New class that encapsulates both the shared aspects
32587         of a Constructor and a Method.  
32588         (Method, Constructor): Factored pieces into MethodCore.
32589
32590         * driver.cs: Added --fatal which makes errors throw exceptions.
32591         Load System assembly as well as part of the standard library.
32592
32593         * report.cs: Allow throwing exceptions on errors for debugging.
32594
32595         * modifiers.cs: Do not use `parent', instead use the real type
32596         container to evaluate permission settings.
32597
32598         * class.cs: Put Ravi's patch back in.  He is right, and we will
32599         have to cope with the
32600
32601 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32602
32603         * modifiers.cs (TypeAttr, MethodAttr, FieldAttr): Map protected internal to
32604         FamORAssem, not FamANDAssem.
32605
32606 2001-09-14  Miguel de Icaza  <miguel@ximian.com>
32607
32608         * driver.cs: Added --parse option that only parses its input files
32609         and terminates.
32610
32611         * class.cs: Reverted last change from Ravi to IsTopLevel.  That is
32612         incorrect.  IsTopLevel is not used to tell whether an object is
32613         root_types or not (that can be achieved by testing this ==
32614         root_types).  But to see if this is a top-level *class* (not
32615         necessarly our "toplevel" container). 
32616
32617 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32618
32619         * enum.cs (Enum::Define): Modify to call the Lookup method on the
32620         parent instead of a direct call to GetType.
32621
32622 2001-09-14  Ravi Pratap  <ravi@ximian.com>
32623
32624         * class.cs (TypeContainer::TypeAttr): Remove property code and move it into
32625         Modifiers.TypeAttr. This should just be a call to that method.
32626
32627         * modifiers.cs (TypeAttr): Re-write and take an extra argument, the TypeContainer
32628         object so that we can determine if we are top-level or not.
32629
32630         * delegate.cs (Delegate::Define): Update call to TypeAttr method to pass in the 
32631         TypeContainer too.
32632
32633         * enum.cs (Enum::Define): Ditto.
32634
32635         * modifiers.cs (FieldAttr): Re-write.
32636
32637         * class.cs (TypeContainer::IsTopLevel): Change accessibility to public.
32638         (TypeContainer::HaveStaticConstructor): New property to provide access
32639         to precisely that info.
32640
32641         * modifiers.cs (MethodAttr): Re-write.
32642         (EventAttr): Remove altogether as there seems to be no ostensible use for it.
32643
32644         * class.cs (TypeContainer::IsTopLevel): Re-write. root_types doesn't seem to be the parent
32645         of top-level types as claimed.
32646
32647 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32648
32649         * expression.cs (MemberLookup): Fruitless attempt to lookup
32650         constructors.  Maybe I need to emit default constructors?  That
32651         might be it (currently .NET emits this for me automatically).
32652         (Invocation::OverloadResolve): Cope with Arguments == null.
32653         (Invocation::EmitArguments): new function, shared by the new
32654         constructor and us.
32655         (Invocation::Emit): Handle static and instance methods.  Emit
32656         proper call instruction for virtual or non-virtual invocations.
32657         (New::Emit): Implement.
32658         (New::Resolve): Implement.
32659         (MemberAccess:Resolve): Implement.
32660         (MethodGroupExpr::InstanceExpression): used conforming to the spec
32661         to track instances.
32662         (FieldExpr::Resolve): Set type.
32663
32664         * support.cs: Handle empty arguments.
32665                 
32666         * cs-parser.jay (CompositeLookup, QualifierIdentifier,
32667         SimpleLookup): Auxiliary routines to help parse a qualifier
32668         identifier.  
32669
32670         Update qualifier_identifier rule.
32671
32672         * codegen.cs: Removed debugging messages.
32673
32674         * class.cs: Make this a global thing, this acts just as a "key" to
32675         objects that we might have around.
32676
32677         (Populate): Only initialize method_builders_to_methods once.
32678
32679         * expression.cs (PropertyExpr): Initialize type from the
32680         PropertyType. 
32681
32682         * codegen.cs (EmitContext::EmitBoolExpression): Use propper
32683         Resolve pattern.  Attempt to implicitly convert value to boolean.
32684         Emit code.
32685
32686         * expression.cs: Set the type for the int32/int32 argument case.
32687         (Binary::ResolveOperator): Set the return type to boolean for
32688         comparission operators
32689
32690         * typemanager.cs: Remove debugging print code.
32691
32692         (Invocation::Resolve): resolve type.
32693
32694         * class.cs: Allocate a MemberInfo of the correct size, as the code
32695         elsewhere depends on the test to reflect the correct contents.
32696
32697         (Method::) Keep track of parameters, due to System.Reflection holes
32698
32699         (TypeContainer::Populate): Keep track of MethodBuilders to Method
32700         mapping here.
32701
32702         (TypeContainer::FindMembers): Use ArrayList and then copy an array
32703         of the exact size and return that.
32704
32705         (Class::LookupMethodByBuilder): New function that maps
32706         MethodBuilders to its methods.  Required to locate the information
32707         on methods because System.Reflection bit us again.
32708
32709         * support.cs: New file, contains an interface ParameterData and
32710         two implementations: ReflectionParameters and InternalParameters
32711         used to access Parameter information.  We will need to grow this
32712         as required.
32713
32714         * expression.cs (Invocation::GetParameterData): implement a cache
32715         and a wrapper around the ParameterData creation for methods. 
32716         (Invocation::OverloadResolve): Use new code.
32717
32718 2001-09-13  Ravi Pratap  <ravi@ximian.com>
32719
32720         * class.cs (TypeContainer::EmitField): Remove and move into 
32721         (Field::Define): here and modify accordingly.
32722         (Field.FieldBuilder): New member.
32723         (TypeContainer::Populate): Update accordingly.
32724         (TypeContainer::FindMembers): Implement.
32725
32726 2001-09-13  Miguel de Icaza  <miguel@ximian.com>
32727
32728         * statement.cs: (VariableInfo::VariableType): New field to be
32729         initialized with the full type once it is resolved. 
32730
32731 2001-09-12  Miguel de Icaza  <miguel@ximian.com>
32732
32733         * parameter.cs (GetParameterInfo): Use a type cache to compute
32734         things only once, and to reuse this information
32735
32736         * expression.cs (LocalVariableReference::Emit): Implement.
32737         (OpcodeCast::Emit): fix.
32738
32739         (ParameterReference::Resolve): Implement.
32740         (ParameterReference::Emit): Implement.
32741
32742         * cs-parser.jay: Fix bug introduced by Ravi, variable initializers
32743         that are expressions need to stay as Expressions.
32744
32745         * typemanager.cs (CSharpName): Returns the C# name of a type if
32746         possible. 
32747
32748         * expression.cs (Expression::ConvertImplicit): New function that
32749         implements implicit type conversions.
32750
32751         (Expression::ImplicitReferenceConversion): Implements implicit
32752         reference conversions.
32753
32754         (EmptyCast): New type for transparent casts.
32755
32756         (OpcodeCast): New type for casts of types that are performed with
32757         a sequence of bytecodes.
32758
32759         (BoxedCast): New type used for casting value types into reference
32760         types.  Emits a box opcode.
32761
32762         (Binary::DoNumericPromotions): Implements numeric promotions of
32763         and computation of the Binary::Type.
32764
32765         (Binary::EmitBranchable): Optimization.
32766
32767         (Binary::Emit): Implement code emission for expressions.
32768
32769         * typemanager.cs (TypeManager): Added two new core types: sbyte
32770         and byte.
32771
32772 2001-09-12  Ravi Pratap  <ravi@ximian.com>
32773
32774         * class.cs (TypeContainer::FindMembers): Method which does exactly
32775         what Type.FindMembers does, only we don't have to use reflection. No
32776         implementation yet.
32777
32778         * typemanager.cs (typecontainers): New hashtable to hold the corresponding
32779         typecontainer objects as we need to get at them.
32780         (TypeManager::AddUserType): Overload to take an extra argument, the TypeContainer.
32781
32782         * rootcontext.cs : Correspondingly modify called to AddUserType to pass the
32783         typecontainer object.
32784
32785         * expression.cs (MemberLookup): Modify signature to take a RootContext object instead
32786         of just a Report object.
32787
32788 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32789
32790         * class.cs (Event::Define): Go back to using the prefixes "add_" and
32791         "remove_"
32792         (TypeContainer::Populate): Now define the delegates of the type too.
32793         (TypeContainer.Delegates): Property to access the list of delegates defined
32794         in the type.
32795
32796         * delegates.cs (Delegate::Define): Implement partially.
32797
32798         * modifiers.cs (TypeAttr): Handle more flags.
32799
32800 2001-09-11  Ravi Pratap  <ravi@ximian.com>
32801
32802         * class.cs (Indexer::Define): Fix for loop iteration condition to be just <
32803         and not <=
32804         (Operator::Define): Re-write logic to get types by using the LookupType method
32805         instead of blindly doing a Type.GetType ! How stupid can I get ;-) ?
32806         (Indexer::Define): Ditto.
32807         (Event::Define): Ditto.
32808         (Property::Define): Ditto.
32809
32810 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32811
32812         * class.cs (TypeContainer::Populate): Now define operators too. 
32813         (TypeContainer.Operators): New property to access the list of operators
32814         in a type.
32815         (Operator.OperatorMethodBuilder): New member to hold the method builder
32816         for the operator we are defining.
32817         (Operator::Define): Implement.
32818
32819 2001-09-10  Ravi Pratap  <ravi@ximian.com>
32820
32821         * class.cs (Event::Define): Make the prefixes of the accessor methods
32822         addOn_ and removeOn_ 
32823
32824         * genericparser.cs (GenericParser::error): Overloaded method to handle the case
32825         of the location being passed in too. Ideally, this should go later since all
32826         error reporting should be done through the Report object.
32827
32828         * class.cs (TypeContainer.Indexers): New property to access the list of indexers.
32829         (Populate): Iterate thru the indexers we have and define them too.
32830         (Indexer.GetMethodBuilder, .SetMethodBuilder): New members to hold the method builders
32831         for the get and set accessors.
32832         (Indexer::Define): Implement.
32833
32834 2001-09-09  Miguel de Icaza  <miguel@ximian.com>
32835
32836         * expression.cs (Binary::Resolve): Beginning of it.  I scratched
32837         my previous implementation, did not work.
32838
32839         * typemanager.cs: Add a couple of missing types (the longs).
32840
32841         * literal.cs: Use TypeManager.bool_type instead of getting it.
32842
32843         * expression.cs (EventExpr): New kind of expressions.
32844         (Expressio::ExprClassFromMemberInfo): finish
32845
32846 2001-09-08  Miguel de Icaza  <miguel@ximian.com>
32847
32848         * assign.cs: Emit stores to static fields differently.
32849
32850 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32851
32852         * Merge in changes and adjust code to tackle conflicts. Backed out my
32853         code in Assign::Resolve ;-) 
32854
32855 2001-09-08  Ravi Pratap  <ravi@ximian.com>
32856
32857         * cs-parser.jay (CheckAttributeTarget): Modify call to error to use
32858         instead Report.Error and also pass in the location.
32859         (CSharpParser::Lexer): New readonly property to return the reference
32860         to the Tokenizer object.
32861         (declare_local_variables): Use Report.Error with location instead of plain 
32862         old error.
32863         (CheckDef): Ditto.
32864
32865         * class.cs (Operator::CheckUnaryOperator): Move into cs-parser.jay.
32866         (Operator.CheckBinaryOperator): Ditto.
32867
32868         * cs-parser.jay (operator_declarator): Update accordingly.
32869
32870         * cs-parser.jay (CheckUnaryOperator): Modify to use Report.Error
32871         (CheckBinaryOperator): Same here.
32872
32873         * rootcontext.cs (LookupType): Add an extra lookup which simply does a lookup
32874         on the name without any prefixes of namespace names etc. This is because we
32875         already might have something already fully qualified like 
32876         'System.Console.WriteLine'
32877
32878         * assign.cs (Resolve): Begin implementation. Stuck ;-)
32879
32880 2001-09-07  Ravi Pratap  <ravi@ximian.com>
32881
32882         * cs-tokenizer.cs (location): Return a string which also contains
32883         the file name.
32884
32885         * expression.cs (ElementAccess): New class for expressions of the
32886         type 'element access.'
32887         (BaseAccess): New class for expressions of the type 'base access.'
32888         (CheckedExpr, UnCheckedExpr): New classes for Checked and Unchecked expressions
32889         respectively.
32890
32891         * cs-parser.jay (element_access): Implement action.
32892         (base_access): Implement actions.
32893         (checked_expression, unchecked_expression): Implement.
32894
32895         * cs-parser.jay (local_variable_type): Correct and implement.
32896         (type_suffixes, type_suffix_list, type_suffix): Implement actions.
32897
32898         * cs-tokenizer.cs (real_type_suffix): Comment out the extra getchar.
32899
32900         * cs-parser.jay (rank_specifiers): Remove space while concatenating the type's
32901         name and the specifiers.
32902
32903         * interface.cs (InterfaceAttr): New property to return the corresponding TypeAttributes
32904
32905         * rootcontext.cs (CreateInterface): Use the InterfaceAttr property instead of 
32906         making them all public ;-)
32907
32908         * cs-parser.jay (error): Remove entirely as we have an implementation in the base
32909         class anyways.
32910
32911 2001-09-07  Miguel de Icaza  <miguel@ximian.com>
32912
32913         * expression.cs (ExprClassFromMemberInfo): Return FieldExpr and
32914         PropertyExprs.
32915         (FieldExpr, PropertyExprs): New resolved expressions.
32916         (SimpleName::MemberStaticCheck): Perform static checks for access
32917         to non-static fields on static methods. Maybe this should be
32918         generalized for MemberAccesses. 
32919         (SimpleName::ResolveSimpleName): More work on simple name
32920         resolution. 
32921
32922         * cs-parser.jay (primary_expression/qualified_identifier): track
32923         the parameter index.
32924
32925         * codegen.cs (CodeGen::Save): Catch save exception, report error.
32926         (EmitContext::EmitBoolExpression): Chain to expression generation
32927         instead of temporary hack.
32928         (::EmitStatementExpression): Put generic expression code generation.
32929
32930         * assign.cs (Assign::Emit): Implement variable assignments to
32931         local variables, parameters and fields.
32932
32933 2001-09-06  Miguel de Icaza  <miguel@ximian.com>
32934
32935         * statement.cs (Block::GetVariableInfo): New method, returns the
32936         VariableInfo for a variable name in a block.
32937         (Block::GetVariableType): Implement in terms of GetVariableInfo
32938
32939         * literal.cs (IntLiteral::Emit, FloatLiteral::Emit,
32940         DoubleLiteral::Emit, CharLiteral::Emit, BoolLiteral::Emit): Implement
32941
32942 2001-09-06  Ravi Pratap  <ravi@ximian.com>
32943
32944         * cs-parser.jay (operator_declaration): Continue on my quest : update
32945         to take attributes argument.
32946         (event_declaration): Ditto.
32947         (enum_declaration): Ditto.
32948         (indexer_declaration): Ditto.
32949
32950         * class.cs (Operator::Operator): Update constructor accordingly.
32951         (Event::Event): Ditto.
32952
32953         * delegate.cs (Delegate::Delegate): Same here.
32954
32955         * enum.cs (Enum::Enum): Same here.
32956
32957 2001-09-05  Ravi Pratap  <ravi@ximian.com>
32958
32959         * cs-parser.jay (CheckAttributeTarget): Update to use the right error number.
32960
32961         * ../tests/cs0658.cs : New file to demonstrate error 0658.
32962
32963         * attribute.cs (Attributes): New class to encapsulate all attributes which were
32964         being passed around as an arraylist.
32965         (Attributes::AddAttribute): Method to add attribute sections.
32966
32967         * cs-parser.jay (opt_attributes): Modify actions to use the new Attributes class.
32968         (struct_declaration): Update accordingly.
32969         (constant_declaration): Update.
32970         (field_declaration): Update.
32971         (method_header): Update.
32972         (fixed_parameter): Update.
32973         (parameter_array): Ditto.
32974         (property_declaration): Ditto.
32975         (destructor_declaration): Ditto.
32976
32977         * class.cs (Struct::Struct): Update constructors accordingly.
32978         (Class::Class): Ditto.
32979         (Field::Field): Ditto.
32980         (Method::Method): Ditto.
32981         (Property::Property): Ditto.
32982         (TypeContainer::OptAttribute): update property's return type.
32983
32984         * interface.cs (Interface.opt_attributes): New member.
32985         (Interface::Interface): Update to take the extra Attributes argument.
32986
32987         * parameter.cs (Parameter::Parameter): Ditto.
32988
32989         * constant.cs (Constant::Constant): Ditto.
32990
32991         * interface.cs (InterfaceMemberBase): New OptAttributes field.
32992         (InterfaceMemberBase::InterfaceMemberBase): Update constructor to take 
32993         the attributes as a parameter.
32994         (InterfaceProperty): Update constructor call.
32995         (InterfaceEvent): Ditto.
32996         (InterfaceMethod): Ditto.
32997         (InterfaceIndexer): Ditto.
32998
32999         * cs-parser.jay (interface_indexer_declaration): Update call to constructor to 
33000         pass the attributes too.
33001         (interface_event_declaration): Ditto.
33002         (interface_property_declaration): Ditto.
33003         (interface_method_declaration): Ditto.
33004         (interface_declaration): Ditto.
33005
33006 2001-09-05  Miguel de Icaza  <miguel@ximian.com>
33007
33008         * class.cs (Method::Define): Track the "static Main" definition to
33009         create an entry point. 
33010
33011         * rootcontext.cs (RootContext::EntryPoint): MethodInfo that holds the
33012         EntryPoint if we find it. 
33013
33014         * codegen.cs (EmitContext::EmitInvocation): Emit invocations.
33015         (EmitContext::ig): Make this variable public.
33016
33017         * driver.cs: Make the default output file be the first file name
33018         with the .exe extension.  
33019
33020         Detect empty compilations
33021
33022         Handle various kinds of output targets.  Handle --target and
33023         rename -t to --dumper.
33024
33025         * expression.cs, literal.cs, assign.cs, constant.cs: All `Resolve'
33026         methods inherited from Expression return now an Expression.  This
33027         will is used during the tree rewriting as we resolve them during
33028         semantic analysis.
33029
33030         (Expression::MemberLookup): Implements the MemberLookup (7.3) from
33031         the spec.  Missing entirely is the information about
33032         accessability of elements of it.
33033
33034         (Expression::ExprClassFromMemberInfo): New constructor for
33035         Expressions that creates a fully initialized Expression based on
33036         a MemberInfo that is one of Eventinfo, FieldINfo, PropertyInfo or
33037         a Type.
33038
33039         (Invocation::Resolve): Begin implementing resolution of invocations.
33040
33041         * literal.cs (StringLiteral):  Implement Emit.
33042
33043 2001-09-05  Ravi Pratap  <ravi@ximian.com>
33044
33045         * cs-parser.jay (error): Add new modifier because we are hiding an inherited
33046         member.
33047
33048 2001-09-04  Ravi Pratap  <ravi@ximian.com>
33049
33050         * cs-parser.jay (attribute_arguments): Implement actions.
33051         (attribute): Fix bug in production. Implement action.
33052         (attribute_list): Implement.
33053         (attribute_target): Implement.
33054         (attribute_target_specifier, opt_target_specifier): Implement
33055         (CheckAttributeTarget): New method to check if the attribute target
33056         is valid.
33057         (attribute_section): Implement.
33058         (opt_attributes): Implement.
33059
33060         * attribute.cs : New file to handle attributes.
33061         (Attribute): Class to hold attribute info.
33062
33063         * cs-parser.jay (opt_attribute_target_specifier): Remove production
33064         (attribute_section): Modify production to use 2 different rules to 
33065         achieve the same thing. 1 s/r conflict down !
33066         Clean out commented, useless, non-reducing dimension_separator rules.
33067
33068         * class.cs (TypeContainer.attributes): New member to hold list
33069         of attributes for a type.
33070         (Struct::Struct): Modify to take one more argument, the attribute list.
33071         (Class::Class): Ditto.
33072         (Field::Field): Ditto.
33073         (Method::Method): Ditto.
33074         (Property::Property): Ditto.
33075
33076         * cs-parser.jay (struct_declaration): Update constructor call to
33077         pass in the attributes too.
33078         (class_declaration): Ditto.
33079         (constant_declaration): Ditto.
33080         (field_declaration): Ditto.
33081         (method_header): Ditto.
33082         (fixed_parameter): Ditto.
33083         (parameter_array): Ditto.
33084         (property_declaration): Ditto.
33085
33086         * constant.cs (Constant::Constant): Update constructor similarly.
33087         Use System.Collections.
33088
33089         * parameter.cs (Parameter::Parameter): Update as above.
33090
33091 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33092
33093         * class.cs (TypeContainer::AddDelegate): New method to add a delegate.
33094         (TypeContainer.delegates): New member to hold list of delegates.
33095
33096         * cs-parser.jay (delegate_declaration): Implement the action correctly 
33097         this time as I seem to be on crack ;-)
33098
33099 2001-09-02  Miguel de Icaza  <miguel@ximian.com>
33100
33101         * rootcontext.cs (RootContext::IsNamespace): new function, used to
33102         tell whether an identifier represents a namespace.
33103
33104         * expression.cs (NamespaceExpr): A namespace expression, used only
33105         temporarly during expression resolution.
33106         (Expression::ResolveSimpleName, ::ResolvePrimary, ::ResolveName):
33107         utility functions to resolve names on expressions.
33108
33109 2001-09-01  Miguel de Icaza  <miguel@ximian.com>
33110
33111         * codegen.cs: Add hook for StatementExpressions. 
33112
33113         * class.cs: Fix inverted test for static flag in methods.
33114
33115 2001-09-02  Ravi Pratap  <ravi@ximian.com>
33116
33117         * class.cs (Operator::CheckUnaryOperator): Correct error number used
33118         to make it coincide with MS' number.
33119         (Operator::CheckBinaryOperator): Ditto.
33120
33121         * ../errors/errors.txt : Remove error numbers added earlier.
33122
33123         * ../errors/cs1019.cs : Test case for error # 1019
33124
33125         * ../errros/cs1020.cs : Test case for error # 1020
33126
33127         * cs-parser.jay : Clean out commented cruft.
33128         (dimension_separators, dimension_separator): Comment out. Ostensibly not
33129         used anywhere - non-reducing rule.
33130         (namespace_declarations): Non-reducing rule - comment out.
33131
33132         * enum.cs (Enum::AddEnum): Rename to AddEnumMember as I was getting confused
33133         with TypeContainer::AddEnum.
33134
33135         * delegate.cs : New file for delegate handling classes.
33136         (Delegate): Class for declaring delegates.
33137
33138         * makefile : Update.
33139
33140         * cs-parser.jay (delegate_declaration): Implement.
33141
33142 2001-09-01  Ravi Pratap  <ravi@che.iitm.ac.in>
33143
33144         * class.cs (Event::Define): Implement.
33145         (Event.EventBuilder): New member.
33146
33147         * class.cs (TypeContainer::Populate): Update to define all enums and events
33148         we have.
33149         (Events): New property for the events arraylist we hold. Shouldn't we move to using
33150         readonly fields for all these cases ?
33151
33152 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33153
33154         * class.cs (Property): Revamp to use the convention of making fields readonly.
33155         Accordingly modify code elsewhere.
33156
33157         * class.cs : Apply patch from Mr. Mandar <go_mono@hotmail.com> for implementing
33158         the Define method of the Property class.
33159
33160         * class.cs : Clean up applied patch and update references to variables etc. Fix 
33161         trivial bug.
33162         (TypeContainer::Populate): Update to define all the properties we have. Also
33163         define all enumerations.
33164
33165         * enum.cs (Define): Implement.
33166
33167 2001-08-31  Ravi Pratap  <ravi@che.iitm.ac.in>
33168
33169         * cs-parser.jay (overloadable_operator): The semantic value is an
33170         enum of the Operator class.
33171         (operator_declarator): Implement actions.
33172         (operator_declaration): Implement.
33173
33174         * class.cs (Operator::CheckUnaryOperator): New static method to help in checking
33175         validity of definitions.
33176         (Operator::CheckBinaryOperator): Static method to check for binary operators
33177         (TypeContainer::AddOperator): New method to add an operator to a type.
33178
33179         * cs-parser.jay (indexer_declaration): Added line to actually call the
33180         AddIndexer method so it gets added ;-)
33181
33182         * ../errors/errors.txt : Update to include new error numbers. Are these numbers 
33183         already taken care of by the MS compiler ?  
33184
33185 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33186
33187         * class.cs (Operator): New class for operator declarations.
33188         (Operator::OpType): Enum for the various operators.
33189
33190 2001-08-29  Ravi Pratap  <ravi@che.iitm.ac.in>
33191
33192         * class.cs (TypeContainer::AddIndexer): Remove FIXME comment. We
33193         ostensibly handle this in semantic analysis.
33194
33195         * cs-parser.jay (general_catch_clause): Comment out
33196         (specific_catch_clauses, specific_catch_clause): Ditto.
33197         (opt_general_catch_clause, opt_specific_catch_clauses): Ditto
33198         (catch_args, opt_catch_args): New productions.
33199         (catch_clause): Rewrite to use the new productions above
33200         (catch_clauses): Modify accordingly.
33201         (opt_catch_clauses): New production to use in try_statement
33202         (try_statement): Revamp. Basically, we get rid of one unnecessary rule
33203         and re-write the code in the actions to extract the specific and
33204         general catch clauses by being a little smart ;-)
33205
33206         * ../tests/try.cs : Fix. It's not 'finalize' my friend, it's 'finally' !
33207         Hooray, try and catch statements parse fine !
33208
33209 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33210
33211         * statement.cs (Block::GetVariableType): Fix logic to extract the type
33212         string from the hashtable of variables.
33213
33214         * cs-parser.jay (event_accessor_declarations): Trivial fix. Man, how did
33215         I end up making that mistake ;-)
33216         (catch_clauses): Fixed gross error which made Key and Value of the 
33217         DictionaryEntry the same : $1 !!
33218
33219 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33220
33221         * cs-tokenizer.cs (initTokens): Add keywords 'add' and 'remove'
33222
33223         * cs-parser.jay (event_declaration): Correct to remove the semicolon
33224         when the add and remove accessors are specified. 
33225
33226 2001-08-28  Ravi Pratap  <ravi@che.iitm.ac.in>
33227
33228         * cs-parser.jay (IndexerDeclaration): New helper class to hold
33229         information about indexer_declarator.
33230         (indexer_declarator): Implement actions.
33231         (parsing_indexer): New local boolean used to keep track of whether
33232         we are parsing indexers or properties. This is necessary because 
33233         implicit_parameters come into picture even for the get accessor in the 
33234         case of an indexer.
33235         (get_accessor_declaration, set_accessor_declaration): Correspondingly modified.
33236
33237         * class.cs (Indexer): New class for indexer declarations.
33238         (TypeContainer::AddIndexer): New method to add an indexer to a type.
33239         (TypeContainer::indexers): New member to hold list of indexers for the
33240         type.
33241
33242 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33243
33244         * cs-parser.jay (add_accessor_declaration): Implement action.
33245         (remove_accessor_declaration): Implement action.
33246         (event_accessors_declaration): Implement
33247         (variable_declarators): swap statements for first rule - trivial.
33248
33249         * class.cs (Event): New class to hold information about event
33250         declarations.
33251         (TypeContainer::AddEvent): New method to add an event to a type
33252         (TypeContainer::events): New member to hold list of events.
33253
33254         * cs-parser.jay (event_declaration): Implement actions.
33255
33256 2001-08-27  Ravi Pratap  <ravi@che.iitm.ac.in>
33257
33258         * cs-parser.jay (dim_separators): Implement. Make it a string
33259         concatenating all the commas together, just as they appear.
33260         (opt_dim_separators): Modify accordingly
33261         (rank_specifiers): Update accordingly. Basically do the same
33262         thing - instead, collect the brackets here.
33263         (opt_rank_sepcifiers): Modify accordingly.
33264         (array_type): Modify to actually return the complete type string
33265         instead of ignoring the rank_specifiers.
33266         (expression_list): Implement to collect the expressions
33267         (variable_initializer): Implement. We make it a list of expressions
33268         essentially so that we can handle the array_initializer case neatly too.
33269         (variable_initializer_list): Implement.
33270         (array_initializer): Make it a list of variable_initializers
33271         (opt_array_initializer): Modify accordingly.
33272
33273         * expression.cs (New::NType): Add enumeration to help us
33274         keep track of whether we have an object/delegate creation
33275         or an array creation.
33276         (New:NewType, New::Rank, New::Indices, New::Initializers): New
33277         members to hold data about array creation.
33278         (New:New): Modify to update NewType
33279         (New:New): New Overloaded contructor for the array creation
33280         case.
33281
33282         * cs-parser.jay (array_creation_expression): Implement to call
33283         the overloaded New constructor.
33284
33285 2001-08-26  Ravi Pratap  <ravi@che.iitm.ac.in>
33286
33287         * class.cs (TypeContainer::Constructors): Return member
33288         constructors instead of returning null.
33289
33290 2001-08-26  Miguel de Icaza  <miguel@ximian.com>
33291
33292         * typemanager.cs (InitCoreTypes): Initialize the various core
33293         types after we have populated the type manager with the user
33294         defined types (this distinction will be important later while
33295         compiling corlib.dll)
33296
33297         * expression.cs, literal.cs, assign.cs, constant.cs: Started work
33298         on Expression Classification.  Now all expressions have a method
33299         `Resolve' and a method `Emit'.
33300
33301         * codegen.cs, cs-parser.jay: Fixed the bug that stopped code
33302         generation from working.     Also add some temporary debugging
33303         code. 
33304
33305 2001-08-24  Miguel de Icaza  <miguel@ximian.com>
33306
33307         * codegen.cs: Lots of code generation pieces.  This is only the
33308         beginning, will continue tomorrow with more touches of polish.  We
33309         handle the fundamentals of if, while, do, for, return.  Others are
33310         trickier and I need to start working on invocations soon.
33311
33312         * gen-treedump.cs: Bug fix, use s.Increment here instead of
33313         s.InitStatement. 
33314
33315         * codegen.cs (EmitContext): New struct, used during code
33316         emission to keep a context.   Most of the code generation will be
33317         here. 
33318
33319         * cs-parser.jay: Add embedded blocks to the list of statements of
33320         this block.  So code generation proceeds in a top down fashion.
33321
33322 2001-08-23  Miguel de Icaza  <miguel@ximian.com>
33323
33324         * statement.cs: Add support for multiple child blocks.
33325
33326 2001-08-22  Miguel de Icaza  <miguel@ximian.com>
33327
33328         * codegen.cs (EmitCode): New function, will emit the code for a
33329         Block of code given a TypeContainer and its ILGenerator. 
33330
33331         * statement.cs (Block): Standard public readonly optimization.
33332         (Block::Block constructors): Link children. 
33333         (Block::Child): Child Linker.
33334         (Block::EmitVariables): Emits IL variable declarations.
33335
33336         * class.cs: Drop support for MethodGroups here, delay until
33337         Semantic Analysis.
33338         (Method::): Applied the same simplification that I did before, and
33339         move from Properties to public readonly fields.
33340         (Method::ParameterTypes): Returns the parameter types for the
33341         function, and implements a cache that will be useful later when I
33342         do error checking and the semantic analysis on the methods is
33343         performed.
33344         (Constructor::GetCallingConvention): Renamed from CallingConvetion
33345         and made a method, optional argument tells whether this is a class
33346         or a structure to apply the `has-this' bit.
33347         (Method::GetCallingConvention): Implement, returns the calling
33348         convention. 
33349         (Method::Define): Defines the type, a second pass is performed
33350         later to populate the methods.
33351
33352         (Constructor::ParameterTypes): implement a cache similar to the
33353         one on Method::ParameterTypes, useful later when we do semantic
33354         analysis. 
33355
33356         (TypeContainer::EmitMethod):  New method.  Emits methods.
33357
33358         * expression.cs: Removed MethodGroup class from here.
33359
33360         * parameter.cs (Parameters::GetCallingConvention): new method.
33361
33362 2001-08-21  Miguel de Icaza  <miguel@ximian.com>
33363
33364         * class.cs (TypeContainer::Populate): Drop RootContext from the
33365         argument. 
33366
33367         (Constructor::CallingConvention): Returns the calling convention.
33368         (Constructor::ParameterTypes): Returns the constructor parameter
33369         types. 
33370
33371         (TypeContainer::AddConstructor): Keep track of default constructor
33372         and the default static constructor.
33373
33374         (Constructor::) Another class that starts using `public readonly'
33375         instead of properties. 
33376
33377         (Constructor::IsDefault): Whether this is a default constructor. 
33378
33379         (Field::) use readonly public fields instead of properties also.
33380
33381         (TypeContainer::TypeAttr, TypeContainer::AddConstructor): Keep
33382         track of static constructors;  If none is used, turn on
33383         BeforeFieldInit in the TypeAttributes. 
33384
33385         * cs-parser.jay (opt_argument_list): now the return can be null
33386         for the cases where there are no arguments. 
33387
33388         (constructor_declarator): If there is no implicit `base' or
33389         `this', then invoke the default parent constructor. 
33390
33391         * modifiers.cs (MethodAttr): New static function maps a set of
33392         modifiers flags into a MethodAttributes enum
33393         (FieldAttr): renamed from `Map'.  So now we have FieldAttr,
33394         MethodAttr, TypeAttr to represent the various mappings where the
33395         modifiers are used.
33396         (FieldAttr): Map also `readonly' to `FieldAttributes.InitOnly'  
33397
33398 2001-08-19  Miguel de Icaza  <miguel@ximian.com>
33399
33400         * parameter.cs (GetParameterInfo): Fix bug where there would be no
33401         method arguments.
33402
33403         * interface.cs (PopulateIndexer): Implemented the code generator
33404         for interface indexers.
33405
33406 2001-08-17  Miguel de Icaza  <miguel@ximian.com>
33407
33408         * interface.cs (InterfaceMemberBase): Now we track the new status
33409         here.  
33410
33411         (PopulateProperty): Implement property population.  Woohoo!  Got
33412         Methods and Properties going today. 
33413
33414         Removed all the properties for interfaces, and replaced them with
33415         `public readonly' fields. 
33416
33417 2001-08-16  Miguel de Icaza  <miguel@ximian.com>
33418
33419         * interface.cs (AddEvent, AddMethod, AddIndexer, AddProperty):
33420         initialize their hashtables/arraylists only when they are needed
33421         instead of doing this always.
33422
33423         * parameter.cs: Handle refs and out parameters.
33424
33425         * cs-parser.jay: Use an ArrayList to construct the arguments
33426         instead of the ParameterCollection, and then cast that to a
33427         Parameter[] array.
33428
33429         * parameter.cs: Drop the use of ParameterCollection and use
33430         instead arrays of Parameters.
33431
33432         (GetParameterInfo): Use the Type, not the Name when resolving
33433         types. 
33434
33435 2001-08-13  Miguel de Icaza  <miguel@ximian.com>
33436
33437         * parameter.cs: Eliminate the properties Name, Type and ModFlags,
33438         and instead use public readonly fields.
33439
33440         * class.cs: Put back walking code for type containers.
33441
33442 2001-08-11  Miguel de Icaza  <miguel@ximian.com>
33443
33444         * class.cs (MakeConstant): Code to define constants.
33445
33446         * rootcontext.cs (LookupType): New function.  Used to locate types 
33447
33448
33449 2001-08-08  Miguel de Icaza  <miguel@ximian.com>
33450
33451         * rootcontext.cs: OH MY!  My trick works!   It is amazing how nice
33452         this System.Reflection code is.  Kudos to Microsoft
33453
33454         * typemanager.cs: Implement a type cache and avoid loading all
33455         types at boot time.  Wrap in LookupType the internals.  This made
33456         the compiler so much faster.  Wow.  I rule!
33457
33458         * driver.cs: Make sure we always load mscorlib first (for
33459         debugging purposes, nothing really important).
33460
33461         * Renamespaced things that were on `CSC' to `CIR'.  Maybe I should
33462         have moved to `CSC' rather than `CIR'.  Oh man!  The confussion!  
33463
33464         * rootcontext.cs: Lookup types on their namespace;  Lookup types
33465         on namespaces that have been imported using the `using' keyword.
33466
33467         * class.cs (TypeContainer::TypeAttr): Virtualize.
33468         (Class::TypeAttr): Return attributes suitable for this bad boy.
33469         (Struct::TypeAttr): ditto.
33470         Handle nested classes.
33471         (TypeContainer::) Remove all the type visiting code, it is now
33472         replaced with the rootcontext.cs code
33473
33474         * rootcontext.cs (GetClassBases): Added support for structs. 
33475
33476 2001-08-06  Miguel de Icaza  <miguel@ximian.com>
33477
33478         * interface.cs, statement.cs, class.cs, parameter.cs,
33479         rootcontext.cs, gen-treedump.cs, enum.cs, cs-parse.jay:
33480         Drop use of TypeRefs, and use strings instead.
33481
33482 2001-08-04  Miguel de Icaza  <miguel@ximian.com>
33483
33484         * rootcontext.cs: 
33485
33486         * class.cs (Struct::Struct): set the SEALED flags after
33487         checking the modifiers.
33488         (TypeContainer::TypeAttr): new property, returns the
33489         TypeAttributes for a class.  
33490
33491         * cs-parser.jay (type_list): Oops, list production was creating a
33492         new list of base types.
33493
33494         * rootcontext.cs (StdLib): New property.
33495         (GetInterfaceTypeByName): returns an interface by type name, and
33496         encapsulates error handling here.
33497         (GetInterfaces): simplified.
33498         (ResolveTree): Encapsulated all the tree resolution here.
33499         (CreateClass, GetClassBases, GetInterfaceOrClass): Create class
33500         types. 
33501
33502         * driver.cs: Add support for --nostdlib, to avoid loading the
33503         default assemblies.
33504         (Main): Do not put tree resolution here. 
33505
33506         * rootcontext.cs: Beginning of the class resolution.
33507
33508 2001-08-03  Miguel de Icaza  <miguel@ximian.com>
33509
33510         * rootcontext.cs: Provide better error reporting. 
33511
33512         * cs-parser.jay (interface_base): set our $$ to be interfaces.
33513
33514         * rootcontext.cs (CreateInterface): Handle the case where there
33515         are no parent interfaces.
33516
33517         (CloseTypes): Routine to flush types at the end.
33518         (CreateInterface): Track types.
33519         (GetInterfaces): Returns an array of Types from the list of
33520         defined interfaces.
33521
33522         * typemanager.c (AddUserType): Mechanism to track user types (puts
33523         the type on the global type hash, and allows us to close it at the
33524         end). 
33525
33526 2001-08-02  Miguel de Icaza  <miguel@ximian.com>
33527
33528         * tree.cs: Removed RecordType, added RecordClass, RecordStruct and
33529         RecordInterface instead.
33530
33531         * cs-parser.jay: Updated to reflect changes above.
33532
33533         * decl.cs (Definition): Keep track of the TypeBuilder type that
33534         represents this type here.  Not sure we will use it in the long
33535         run, but wont hurt for now.
33536
33537         * driver.cs: Smaller changes to accomodate the new code.
33538
33539         Call ResolveInterfaceBases, Call ResolveClassBases, Save assembly
33540         when done. 
33541
33542         * rootcontext.cs (CreateInterface):  New method, used to create
33543         the System.TypeBuilder type for interfaces.
33544         (ResolveInterfaces): new entry point to resolve the interface
33545         hierarchy. 
33546         (CodeGen): Property, used to keep track of the code generator.
33547
33548 2001-07-26  Miguel de Icaza  <miguel@ximian.com>
33549
33550         * cs-parser.jay: Add a second production for delegate_declaration
33551         with `VOID'.
33552
33553         (enum_body): Put an opt_comma here instead of putting it on
33554         enum_body or enum_member_declarations so we can handle trailing
33555         commas on enumeration members.  Gets rid of a shift/reduce.
33556
33557         (type_list): Need a COMMA in the middle.
33558
33559         (indexer_declaration): Tell tokenizer to recognize get/set
33560
33561         * Remove old targets.
33562
33563         * Re-add the parser target.
33564
33565 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33566
33567         * cs-parser.jay: Add precendence rules for a number of operators
33568         ot reduce the number of shift/reduce conflicts in the grammar.
33569
33570 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33571
33572         * tree.cs: moved IGenerator interface and renamed it to ITreeDump
33573         and put it here.
33574
33575         Get rid of old crufty code.
33576
33577         * rootcontext.cs: Use this to keep track of the parsed
33578         representation and the defined types available to the program. 
33579
33580         * gen-treedump.cs: adjust for new convention.
33581
33582         * type.cs: Split out the type manager, and the assembly builder
33583         from here. 
33584
33585         * typemanager.cs: the type manager will live here now.
33586
33587         * cil-codegen.cs: And the code generator here. 
33588
33589 2001-07-14  Sean MacIsaac  <macisaac@ximian.com>
33590
33591         * makefile: Fixed up for easy making.
33592
33593 2001-07-13  Simon Cozens <simon@simon-cozens.org>
33594
33595         * cs-parser.jay (rank_specifier): Remove a conflict by reordering
33596         the 
33597
33598         (unary_expression): Expand pre_increment_expression and
33599         post_decrement_expression to reduce a shift/reduce.
33600
33601 2001-07-11  Simon Cozens
33602
33603         * cs-tokenizer.cs: Hex numbers should begin with a 0.
33604
33605         Improve allow_keyword_as_indent name.
33606
33607 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33608
33609         * Adjustments for Beta2. 
33610
33611 2001-06-13  Miguel de Icaza  <miguel@ximian.com>
33612
33613         * decl.cs: Added `Define' abstract method.
33614         (InTransit): new property, used to catch recursive definitions. 
33615
33616         * interface.cs: Implement `Define'. 
33617
33618         * modifiers.cs: Map Modifiers.constants to
33619         System.Reflection.TypeAttribute flags.
33620
33621         * class.cs: Keep track of types and user-defined types.
33622         (BuilderInit): New method for creating an assembly
33623         (ResolveType): New function to launch the resolution process, only
33624         used by interfaces for now.
33625
33626         * cs-parser.jay: Keep track of Classes, Structs and Interfaces
33627         that are inserted into the name space. 
33628
33629 2001-06-08  Miguel de Icaza  <miguel@ximian.com>
33630
33631         * ARGH.  I have screwed up my tree so many times due to the use of
33632         rsync rather than using CVS.  Going to fix this at once. 
33633
33634         * driver.cs: Objetify driver.  Load assemblies, use assemblies to
33635         load types.
33636
33637 2001-06-07  Miguel de Icaza  <miguel@ximian.com>
33638
33639         * Experiment successful: Use System.Type rather that our own
33640         version of Type.  
33641
33642 2001-05-25  Miguel de Icaza  <miguel@ximian.com>
33643
33644         * cs-parser.jay: Removed nsAliases from here.
33645
33646         Use new namespaces, handle `using XXX;' 
33647
33648         * namespace.cs: Reimplemented namespace handling, use a recursive
33649         definition of the class.  Now we can keep track of using clauses
33650         and catch invalid using clauses.
33651
33652 2001-05-24  Miguel de Icaza  <miguel@ximian.com>
33653
33654         * gen-treedump.cs: Adapted for all the renaming.
33655
33656         * expression.cs (Expression): this class now has a Type property
33657         which returns an expression Type.
33658
33659         (Probe::, New::, TypeOf::, SizeOf::, Constant::): renamed from
33660         `Type', as this has a different meaning now in the base
33661
33662 2001-05-22  Miguel de Icaza  <miguel@ximian.com>
33663
33664         * interface.cs, class.cs: Removed from all the sources the
33665         references to signature computation, as we can not do method
33666         signature computation during the parsing time, as we are not
33667         trying to solve at that point distinguishing:
33668
33669         class X {
33670                 void a (Blah x) {}
33671                 void a (NS.Blah x) {}
33672         }
33673
33674         Which depending on the context might be valid or not, as we do not
33675         know if Blah is the same thing as NS.Blah at that point.
33676
33677         * Redid everything so the code uses TypeRefs now instead of
33678         Types.  TypeRefs are just temporary type placeholders, that need
33679         to be resolved.  They initially have a pointer to a string and the
33680         current scope in which they are used.  This is used later by the
33681         compiler to resolve the reference to an actual Type. 
33682
33683         * DeclSpace is no longer a CIR.Type, and neither are
33684         TypeContainers (Class and Struct) nor Interfaces nor Enums.  They
33685         are all DeclSpaces, but no Types. 
33686
33687         * type.cs (TypeRefManager): This implements the TypeRef manager,
33688         which keeps track of all the types that need to be resolved after
33689         the parsing has finished. 
33690
33691 2001-05-13  Miguel de Icaza  <miguel@ximian.com>
33692
33693         * ARGH.  We are going to have to store `foreach' as a class rather
33694         than resolving it, as we need to verify error 1579 after name
33695         resolution.   *OR* we could keep a flag that says `This request to
33696         IEnumerator comes from a foreach statement' which we can then use
33697         to generate the error.
33698
33699 2001-05-10  Miguel de Icaza  <miguel@ximian.com>
33700
33701         * class.cs (TypeContainer.AddMethod): we now add methods to the
33702         MethodGroup instead of the method hashtable.  
33703
33704         * expression.cs: Add MethodGroup abstraction, which gets us one
33705         step closer to the specification in the way we handle method
33706         declarations.  
33707
33708         * cs-parser.jay (primary_expression): qualified_identifier now
33709         tried to match up an identifier to a local variable reference or
33710         to a parameter reference.
33711
33712         current_local_parameters is now a parser global variable that
33713         points to the current parameters for the block, used during name
33714         lookup.
33715
33716         (property_declaration): Now creates an implicit `value' argument to
33717         the set accessor.
33718
33719 2001-05-09  Miguel de Icaza  <miguel@ximian.com>
33720
33721         * parameter.cs: Do not use `param' arguments as part of the
33722         signature, per the spec.
33723
33724 2001-05-08  Miguel de Icaza  <miguel@ximian.com>
33725
33726         * decl.cs: Base class for classes, structs and interfaces.  This
33727         is the "Declaration Space" 
33728
33729         * cs-parser.jay: Use CheckDef for checking declaration errors
33730         instead of having one on each function.
33731
33732         * class.cs: Factor out some code for handling error handling in
33733         accordance to the "Declarations" section in the "Basic Concepts"
33734         chapter in the ECMA C# spec.
33735
33736         * interface.cs: Make all interface member classes derive from
33737         InterfaceMemberBase.
33738
33739 2001-05-07  Miguel de Icaza  <miguel@ximian.com>
33740
33741         * Many things: all interfaces are parsed and generated in
33742         gen-treedump.  Support for member variables, constructors,
33743         destructors, properties, constants is there.
33744
33745         Beginning of the IL backend, but very little done, just there for
33746         testing purposes. 
33747
33748 2001-04-29  Miguel de Icaza  <miguel@ximian.com>
33749
33750         * cs-parser.jay: Fix labeled statement.
33751
33752         * cs-tokenizer.cs (escape): Escape " and ' always.
33753         ref_line, ref_name: keep track of the line/filename as instructed
33754         by #line by the compiler.
33755         Parse #line.
33756
33757 2001-04-27  Miguel de Icaza  <miguel@ximian.com>
33758
33759         * System.CodeDOM/CodeBinaryOperatorExpression.cs: Rearrange enum
33760         to match the values in System.CodeDOM.
33761
33762         Divid renamed to Divide.
33763
33764         * System.CodeDOM/CodeForLoopStatement.cs: Always have valid
33765         statements. 
33766         (Statements.set): remove.
33767
33768         * System.CodeDOM/CodeCatchClause.cs: always have a valid
33769         statements. 
33770
33771         * System.CodeDOM/CodeIfStatement.cs: trueStatements and
33772         falseStatements always have valid values. 
33773
33774         * cs-parser.jay: Use System.CodeDOM now.
33775